@antv/aimapui 0.3.1 → 0.3.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +31 -31
- package/dist/index.d.ts +101 -17
- package/dist/index.es.js +12891 -6962
- package/dist/index.iife.js +31 -31
- package/dist/style.css +1 -1
- package/package.json +16 -16
package/dist/index.cjs
CHANGED
|
@@ -1,49 +1,49 @@
|
|
|
1
|
-
"use strict";var S0=Object.create;var Wt=Object.defineProperty;var z0=Object.getOwnPropertyDescriptor;var j0=Object.getOwnPropertyNames;var H0=Object.getPrototypeOf,V0=Object.prototype.hasOwnProperty;var E0=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of j0(t))!V0.call(e,o)&&o!==n&&Wt(e,o,{get:()=>t[o],enumerable:!(r=z0(t,o))||r.enumerable});return e};var Ae=(e,t,n)=>(n=e!=null?S0(H0(e)):{},E0(t||!e||!e.__esModule?Wt(n,"default",{value:e,enumerable:!0}):n,e));Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("react/jsx-runtime"),u=require("react"),C1=require("@antv/l7"),Re=require("react-dom"),A0=require("clsx"),Z0=require("react-dom/client"),F0=require("supercluster");function T0(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const ge=T0(C1),je={basemap:"map",center:[105,35],zoom:4,pitch:0,rotation:0};function nt(e){return{basemap:e.basemap??je.basemap,engine:e.engine,token:e.token,style:e.style,center:e.center??[...je.center],zoom:e.zoom??je.zoom,pitch:e.pitch??je.pitch,rotation:e.rotation??je.rotation,minZoom:e.minZoom,maxZoom:e.maxZoom,bounds:e.bounds,gestureConfig:e.gestureConfig}}let N0=0;function I0(){return`aimap-layer-${++N0}`}function v1(e){return{id:e.id??I0(),type:e.type,name:e.name??e.type,visible:e.visible??!0,zIndex:e.zIndex??0,minZoom:e.minZoom,maxZoom:e.maxZoom,autoFit:e.autoFit??!1,source:e.source,sourceType:e.sourceType,sourceConfig:e.sourceConfig,color:e.color,colorField:e.colorField,colorValues:e.colorValues,size:e.size,sizeField:e.sizeField,sizeValues:e.sizeValues,shape:e.shape,shapeField:e.shapeField,shapeValues:e.shapeValues,style:e.style,filterField:e.filterField,filterValues:e.filterValues,animate:e.animate,active:e.active,select:e.select,events:e.events}}const P0={zoom:"topright",scale:"bottomleft",fullscreen:"topright",geoLocate:"topright",mapTheme:"topright",mouseLocation:"bottomright",exportImage:"topright",layerSwitch:"topright",draw:"topright"};function b1(e){return{type:e.type,position:e.position??P0[e.type]??"topright",options:e.options}}const R0={breakpoint:768};function D0(e){return{breakpoint:(e==null?void 0:e.breakpoint)??R0.breakpoint,mobile:e==null?void 0:e.mobile}}function xt(e){return{map:nt(e.map),layers:(e.layers??[]).map(v1),controls:(e.controls??[]).map(b1),interactions:e.interactions??[],legends:e.legends??[],responsive:e.responsive?D0(e.responsive):void 0,events:e.events}}function L1(e){return xt(e)}function $0(e){const t=[];if(e.basemap||t.push("map.basemap is required"),e.center){const[n,r]=e.center;(n<-180||n>180)&&t.push("map.center[0] (longitude) must be between -180 and 180"),(r<-90||r>90)&&t.push("map.center[1] (latitude) must be between -90 and 90")}return t}function _0(e,t){const n=[];return e.type||n.push(`layers[${t}].type is required`),e.source===void 0&&e.source,e.colorField&&!e.colorValues&&e.color,n}function O0(e){const t=[];return t.push(...$0(e.map)),(e.layers??[]).forEach((n,r)=>{t.push(..._0(n,r))}),{valid:t.length===0,errors:t}}const w1=u.createContext(null);function M1({schema:e,children:t}){return i.jsx(w1.Provider,{value:e,children:t})}function B0(){return u.useContext(w1)}class k1{constructor(){this.listeners=new Map}on(t,n){return this.listeners.has(t)||this.listeners.set(t,new Set),this.listeners.get(t).add(n),()=>{var r;(r=this.listeners.get(t))==null||r.delete(n)}}once(t,n){const r=(...a)=>{n(...a),o()},o=this.on(t,r);return o}emit(t,...n){const r=this.listeners.get(t);r&&r.forEach(o=>{try{o(...n)}catch(a){console.error(`[aimapui EventBus] Error in event "${t}":`,a)}})}off(t){this.listeners.delete(t)}clear(){this.listeners.clear()}}function S1(){return new k1}const z1=u.createContext(null);function j1({events:e,children:t}){const n=u.useRef(null);return n.current||(n.current=S1()),u.useEffect(()=>{if(!e||!n.current)return;const r=n.current,o=[];for(const[a,s]of Object.entries(e))s&&o.push(r.on(a,s));return()=>{o.forEach(a=>a())}},[e]),i.jsx(z1.Provider,{value:n.current,children:t})}function Ct(){const e=u.useContext(z1);if(!e)throw new Error("[aimapui] useEventBus must be used within an EventBusProvider");return e}const H1=u.createContext({resolvedTheme:"light",theme:"light",setTheme:()=>{},toggleTheme:()=>{}});function V1({defaultTheme:e="light",target:t="container",children:n}){const[r,o]=u.useState(e),[a,s]=u.useState("light");u.useEffect(()=>{const h=window.matchMedia("(prefers-color-scheme: dark)");s(h.matches?"dark":"light");const f=p=>{s(p.matches?"dark":"light")};return h.addEventListener("change",f),()=>h.removeEventListener("change",f)},[]);const l=r==="system"?a:r,c=u.useCallback(()=>{o(h=>h==="system"?a==="light"?"dark":"light":h==="light"?"dark":"light")},[a]);u.useEffect(()=>{t==="root"&&document.documentElement.setAttribute("data-theme",l)},[l,t]);const d=u.useMemo(()=>({resolvedTheme:l,theme:r,setTheme:o,toggleTheme:c}),[l,r,c]);return i.jsx(H1.Provider,{value:d,children:t==="container"?i.jsx("div",{"data-theme":l,style:{display:"contents"},children:n}):n})}function E1(){return u.useContext(H1)}const W0=u.createContext({isMobile:!1,breakpoint:768,width:typeof window<"u"?window.innerWidth:1024,schema:void 0});function U0({responsive:e,children:t}){const[n,r]=u.useState(typeof window<"u"?window.innerWidth:1024);u.useEffect(()=>{let l;const c=()=>{cancelAnimationFrame(l),l=requestAnimationFrame(()=>r(window.innerWidth))};return window.addEventListener("resize",c),()=>{window.removeEventListener("resize",c),cancelAnimationFrame(l)}},[]);const o=(e==null?void 0:e.breakpoint)??768,a=n<o,s=u.useMemo(()=>({isMobile:a,breakpoint:o,width:n,schema:e}),[a,o,n,e]);return i.jsx(W0.Provider,{value:s,children:t})}const A1=u.createContext(null);function Z1({scene:e,children:t}){const n=u.useRef(e);return n.current=e,i.jsx(A1.Provider,{value:n.current,children:t})}function ye(){return u.useContext(A1)}async function F1(e){var a,s,l;const t=e.basemap??je.basemap,n=e.token??"",r=e.style??"normal",o={center:e.center??je.center,zoom:e.zoom??je.zoom,pitch:e.pitch??je.pitch,rotation:e.rotation??je.rotation,minZoom:e.minZoom,maxZoom:e.maxZoom,dragEnable:((a=e.gestureConfig)==null?void 0:a.dragPan)??!0,zoomEnable:((s=e.gestureConfig)==null?void 0:s.pinchZoom)??!0,rotateEnable:((l=e.gestureConfig)==null?void 0:l.dragRotate)??!0};if(e.engine)return new e.engine({...o,style:r,token:n});switch(t){case"gaode":{const{GaodeMap:c}=await import("@antv/l7-maps/gaode");return new c({...o,style:q0(r),token:n})}case"mapbox":{const{Mapbox:c}=await import("@antv/l7-maps/mapbox");return new c({...o,style:Y0(r),token:n})}case"tianditu":{const{TMap:c}=await import("@antv/l7-maps/tianditu");return new c({...o,token:n})}case"tencent":{const{TencentMap:c}=await import("@antv/l7-maps/tencent");return new c({...o,token:n})}case"baidu":{const{BaiduMap:c}=await import("@antv/l7-maps/baidu");return new c({...o,style:X0(r),token:n})}case"maplibre":{const{MapLibre:c}=await import("@antv/l7-maps/maplibre");return new c({...o,style:J0(r),token:n})}case"google":{const{GoogleMap:c}=await import("@antv/l7-maps/google"),d=new c({...o,style:G0(r),token:n});return K0(d),d}case"map":default:{const{Map:c}=await import("@antv/l7-maps/simple");return new c({center:e.center??je.center,zoom:e.zoom??je.zoom})}}}function q0(e){return{light:"light",dark:"dark",normal:"normal",darkblue:"dark",satellite:"satellite"}[e]??e}function Y0(e){return{light:"https://tiles.openfreemap.org/styles/positron",dark:"https://tiles.openfreemap.org/styles/dark",normal:"https://tiles.openfreemap.org/styles/bright",liberty:"https://tiles.openfreemap.org/styles/liberty",fiord:"https://tiles.openfreemap.org/styles/fiord"}[e]??e}function X0(e){return{light:"light",dark:"dark",normal:"normal",darkblue:"dark",satellite:"satellite"}[e]??e}function G0(e){return{light:"roadmap",dark:"roadmap",normal:"roadmap",darkblue:"roadmap",satellite:"satellite",hybrid:"hybrid",terrain:"terrain"}[e]??"roadmap"}function J0(e){return{light:"https://tiles.openfreemap.org/styles/positron",dark:"https://tiles.openfreemap.org/styles/dark",normal:"https://tiles.openfreemap.org/styles/bright",liberty:"https://tiles.openfreemap.org/styles/liberty",fiord:"https://tiles.openfreemap.org/styles/fiord"}[e]??e}function K0(e){const t=["zoomControl","mapTypeControl","streetViewControl","fullscreenControl","scaleControl","rotateControl","panControl"],n={};for(const s of t)n[s]=!1;const r=()=>{const s=e.map;if(!s||typeof s.setOptions!="function")return!1;s.setOptions(n);const l=s.setOptions.bind(s);return s.setOptions=c=>{const d={...c};for(const h of t)h in d&&delete d[h];l(d)},!0};if(r())return;let o=0;const a=setInterval(()=>{o+=1,(r()||o>100)&&clearInterval(a)},50)}function T1({mapSchema:e,children:t,onSceneReady:n,mapEventHandlers:r,events:o,className:a,style:s}){const l=u.useRef(null),c=u.useRef(null),[d,h]=u.useState(null),f=u.useRef(n);f.current=n;const p=u.useRef(r);p.current=r;const g=Ct(),m=u.useCallback((k,b)=>{var M,j,T;if(b.basemap==="map")return;const z=((M=b.gestureConfig)==null?void 0:M.dragPan)??!0,V=((j=b.gestureConfig)==null?void 0:j.pinchZoom)??!0,F=((T=b.gestureConfig)==null?void 0:T.dragRotate)??!0;try{const H=k.mapService;if(H&&typeof H.setMapStatus=="function"&&H.setMapStatus({dragEnable:z,zoomEnable:V,rotateEnable:F,doubleClickZoom:V}),b.basemap==="google"&&(H!=null&&H.map)){const Z=H.map;typeof Z.setOptions=="function"&&Z.setOptions({zoomControl:!1,mapTypeControl:!1,streetViewControl:!1,fullscreenControl:!1,scaleControl:!1,rotateControl:!1,panControl:!1})}}catch{}},[]);u.useEffect(()=>{if(!l.current)return;let k=!1;const b=nt(e),z=F=>{if(k||!l.current)return;const M=new C1.Scene({id:l.current,map:F,logoVisible:!1});c.current=M,M.on("loaded",()=>{var j;k||(m(M,b),h(M),(j=f.current)==null||j.call(f,M),V(M))}),b.bounds&&M.on("loaded",()=>{try{const[j,T]=b.bounds;M.fitBounds([j[0],j[1],T[0],T[1]])}catch{}})};if(b.engine){const F={center:b.center,zoom:b.zoom,pitch:b.pitch,rotation:b.rotation,minZoom:b.minZoom,maxZoom:b.maxZoom,style:b.style??"normal",token:b.token??""},M=new b.engine(F);z(M)}else F1(b).then(z);function V(F){F.on("mapmove",()=>{var j,T;const M={originalEvent:null,center:[F.getCenter().lng,F.getCenter().lat],zoom:F.getZoom(),pitch:F.getPitch(),rotation:F.getRotation()};(T=(j=p.current)==null?void 0:j.onMove)==null||T.call(j,M),o!=null&&o.mapMove&&g.emit(o.mapMove,M)}),F.on("zoomchange",()=>{var j,T;const M={originalEvent:null,center:[F.getCenter().lng,F.getCenter().lat],zoom:F.getZoom(),pitch:F.getPitch(),rotation:F.getRotation()};(T=(j=p.current)==null?void 0:j.onZoom)==null||T.call(j,M),o!=null&&o.mapZoom&&g.emit(o.mapZoom,M)})}return()=>{if(k=!0,c.current){try{c.current.destroy()}catch{}c.current=null}h(null)}},[e.basemap,e.engine,m]);const x=JSON.stringify(e.center),v=JSON.stringify(e.gestureConfig);u.useEffect(()=>{if(!d)return;const k=nt(e);try{d.setCenter(k.center)}catch{}try{d.setZoom(k.zoom)}catch{}try{d.setPitch(k.pitch)}catch{}try{d.setRotation(k.rotation)}catch{}m(d,k)},[d,x,e.zoom,e.pitch,e.rotation,v,m]);const L=u.useCallback(()=>{if(c.current)try{const k=c.current.map;k&&typeof k.resize=="function"&&k.resize()}catch{}},[]);return u.useEffect(()=>(window.addEventListener("resize",L),()=>window.removeEventListener("resize",L)),[L]),i.jsx("div",{ref:l,className:a??"aimapui-container",style:s??{width:"100%",height:"100%"},children:d&&i.jsx(Z1,{scene:d,children:t})})}function N1(e){if(e.colorField)return{field:e.colorField,values:e.colorValues};if(e.color)return{values:e.color}}function Q0(e){if(e.sizeField)return{field:e.sizeField,values:e.sizeValues};if(e.size!==void 0)return{values:e.size}}function I1(e){if(e.shapeField)return{field:e.shapeField,values:e.shapeValues};if(e.shape)return{values:e.shape}}function vt(e){return{color:N1(e),size:Q0(e),shape:I1(e),style:e.style?{...e.style}:void 0}}function en(e){var t,n;return{data:e.source,options:{parser:{type:"json",x:((t=e.sourceConfig)==null?void 0:t.x)??"lng",y:((n=e.sourceConfig)==null?void 0:n.y)??"lat"}}}}function tn(e){var t,n;return{data:e.source,options:{parser:{type:"csv",x:(t=e.sourceConfig)==null?void 0:t.x,y:(n=e.sourceConfig)==null?void 0:n.y}}}}function bt(e){return{data:e.source,options:void 0}}function nn(e){var t;return(t=e.sourceConfig)!=null&&t.parser?{data:e.source,options:{parser:e.sourceConfig.parser}}:e.sourceType==="geojson"?bt(e):e.sourceType==="csv"?tn(e):en(e)}function P1(e){return{type:"PointLayer",sourceConfig:nn(e),visual:vt(e),schema:e}}function R1(e){return{type:"LineLayer",sourceConfig:rn(e),visual:vt(e),schema:e}}function rn(e){var t,n,r,o,a,s,l,c,d,h;return(t=e.sourceConfig)!=null&&t.parser?{data:e.source,options:{parser:e.sourceConfig.parser}}:e.sourceType==="geojson"?bt(e):e.sourceType==="csv"?{data:e.source,options:{parser:{type:"csv",x:(n=e.sourceConfig)==null?void 0:n.x,y:(r=e.sourceConfig)==null?void 0:r.y,x1:(o=e.sourceConfig)==null?void 0:o.x1,y1:(a=e.sourceConfig)==null?void 0:a.y1}}}:{data:e.source,options:{parser:{type:"json",x:((s=e.sourceConfig)==null?void 0:s.x)??"lng",y:((l=e.sourceConfig)==null?void 0:l.y)??"lat",x1:(c=e.sourceConfig)==null?void 0:c.x1,y1:(d=e.sourceConfig)==null?void 0:d.y1,coordinates:(h=e.sourceConfig)==null?void 0:h.coordinates}}}}function D1(e){return{type:"PolygonLayer",sourceConfig:on(e),visual:vt(e),schema:e}}function on(e){var t;return e.sourceType==="geojson"?bt(e):{data:e.source,options:{parser:{type:"json",coordinates:((t=e.sourceConfig)==null?void 0:t.coordinates)??"coordinates"}}}}function $1(e){return{type:"HeatmapLayer",sourceConfig:sn(e),visual:an(e),schema:e}}function sn(e){var t,n,r,o,a,s,l,c;return(t=e.sourceConfig)!=null&&t.parser?{data:e.source,options:{parser:e.sourceConfig.parser,...e.sourceConfig.transforms?{transforms:e.sourceConfig.transforms}:{}}}:e.sourceType==="geojson"?{data:e.source,options:(n=e.sourceConfig)!=null&&n.transforms?{transforms:e.sourceConfig.transforms}:void 0}:e.sourceType==="csv"?{data:e.source,options:{parser:{type:"csv",x:(r=e.sourceConfig)==null?void 0:r.x,y:(o=e.sourceConfig)==null?void 0:o.y},...(a=e.sourceConfig)!=null&&a.transforms?{transforms:e.sourceConfig.transforms}:{}}}:{data:e.source,options:{parser:{type:"json",x:((s=e.sourceConfig)==null?void 0:s.x)??"lng",y:((l=e.sourceConfig)==null?void 0:l.y)??"lat"},...(c=e.sourceConfig)!=null&&c.transforms?{transforms:e.sourceConfig.transforms}:{}}}}function an(e){const t=e.sizeField?{field:e.sizeField,values:e.sizeValues}:void 0,n=N1(e),r=I1(e),o=e.style?{...e.style}:void 0;return{color:n,size:t,shape:r,style:o}}function _1(e){return{type:"RasterLayer",sourceConfig:ln(e),visual:cn(e),schema:e}}function ln(e){var t;return(t=e.sourceConfig)!=null&&t.parser?{data:e.source,options:{parser:e.sourceConfig.parser}}:{data:e.source,options:e.sourceType==="raster"?{parser:{type:"raster",extent:[73.482190241,3.82501784112,135.106618732,53.557926206]}}:e.sourceType==="rasterTile"?{parser:{type:"rasterTile",tileSize:256,zoomOffset:1}}:void 0}}function cn(e){return{color:void 0,size:void 0,shape:void 0,style:e.style?{...e.style}:void 0}}function O1(e){var t;return{type:"ImageLayer",sourceConfig:{data:e.source,options:{parser:((t=e.sourceConfig)==null?void 0:t.parser)??(e.sourceType==="image"?{type:"image"}:void 0)}},visual:{color:void 0,size:void 0,shape:void 0,style:e.style?{...e.style}:void 0},schema:e}}function Lt(e,t,n,r){const o=u.useRef(t),a=u.useRef(n);o.current=t,a.current=n;const s=u.useRef(r);s.current=r;const l=u.useRef(null),c=u.useRef(e);c.current=e;const d=u.useCallback(()=>{const f=c.current;if(f)try{const p=f.mapService;if(p){const g=p.lngLatToContainer([o.current,a.current]);g&&s.current(g.x,g.y)}else{const g=f.lngLatToContainer([o.current,a.current]);g&&s.current(g.x,g.y)}}catch{}},[]),h=u.useCallback(()=>{d()},[d]);u.useEffect(()=>{if(!e)return;const f=()=>{setTimeout(()=>d(),0)};return e.loaded?f():e.on("loaded",f),()=>{e.off("loaded",f)}},[e,d]),u.useEffect(()=>{d()},[t,n,d]),u.useEffect(()=>{if(e){try{const f=e.mapService;if(f)return f.on("camerachange",h),f.on("viewchange",h),()=>{f.off("camerachange",h),f.off("viewchange",h)}}catch{}return e.on("camerachange",h),e.on("resize",h),()=>{e.off("camerachange",h),e.off("resize",h)}}},[e,h]),u.useEffect(()=>()=>{l.current!==null&&(cancelAnimationFrame(l.current),l.current=null)},[])}function pe(...e){return A0(e)}function un(e,t=1){const n=e.replace("#","").match(/.{2}/g);if(!n||n.length<3)return e;const[r,o,a]=n.map(s=>parseInt(s,16));return`rgba(${r}, ${o}, ${a}, ${t})`}function Ye(e){return typeof e=="string"&&/<[a-zA-Z][^>]*>/.test(e)}let Ue=null;const ht=new Set;function dn(e,t){Ue&&Ue!==e&&ht.forEach(n=>n(e)),Ue=e}function hn(e){Ue===e&&(Ue=null)}function pn(e,t,n,r,o,a,s,l){if(s!=="auto")return _e(s,l);const c=t,d=a-t,h=e,f=o-e,p=8;if(c>=r+l+p)return _e("top",l);if(d>=r+l+p)return _e("bottom",l);if(f>=n+l+p)return _e("right",l);if(h>=n+l+p)return _e("left",l);const m=Object.entries({top:c,bottom:d,right:f,left:h}).sort((x,v)=>v[1]-x[1])[0][0];return _e(m,l)}function _e(e,t){switch(e){case"top":return{placement:"top",transform:`translate(-50%, -100%) translateY(-${t}px)`};case"bottom":return{placement:"bottom",transform:`translate(-50%, 0) translateY(${t}px)`};case"left":return{placement:"left",transform:`translate(-100%, -50%) translateX(-${t}px)`};case"right":return{placement:"right",transform:`translate(0, -50%) translateX(${t}px)`}}}function et({onClick:e}){return i.jsx("button",{onClick:t=>{t.stopPropagation(),e()},className:"aimapui-popup-close-btn absolute top-2 right-2 size-8 flex items-center justify-center text-on-surface-variant rounded-lg transition-[color,background] duration-200 cursor-pointer bg-transparent border-none p-0 hover:text-on-surface hover:bg-surface-container-high [&_.material-symbols-outlined]:text-xl","aria-label":"关闭",children:i.jsx("span",{className:"material-symbols-outlined",children:"close"})})}const fn={top:"M0 0L8 8L16 0",bottom:"M0 8L8 0L16 8",left:"M0 0L8 8L0 16",right:"M8 0L0 8L8 16"};function Xe({placement:e}){const t=e==="top"||e==="bottom",n=t?16:8,r=t?8:16,o=t?"0 0 16 8":"0 0 8 16",a=fn[e];return i.jsx("div",{className:`aimapui-popup-tip-arrow aimapui-popup-tip-arrow--${e==="top"?"bottom":e==="bottom"?"top":e}`,children:i.jsxs("svg",{width:n,height:r,viewBox:o,fill:"none",children:[i.jsx("path",{d:a,fill:"rgba(248, 249, 255, 0.95)"}),i.jsx("path",{d:a,stroke:"rgba(195, 198, 215, 0.3)",strokeWidth:"0.5",fill:"none"})]})})}function gn({header:e,onClose:t}){return e.coverUrl?i.jsxs("div",{className:"aimapui-popup-cover relative aspect-video overflow-hidden",children:[i.jsx("img",{src:e.coverUrl,alt:e.title,className:"aimapui-popup-cover-img w-full h-full object-cover"}),i.jsx("button",{className:"aimapui-popup-close-btn aimapui-popup-close-btn--cover absolute top-2 right-2 size-8 bg-black/30 backdrop-blur-sm text-white flex items-center justify-center rounded-full border-none cursor-pointer transition-colors duration-200 z-10 hover:bg-black/50 [&_.material-symbols-outlined]:text-lg","aria-label":"关闭",onClick:n=>{n.stopPropagation(),t()},children:i.jsx("span",{className:"material-symbols-outlined",children:"close"})}),e.statusLabel&&i.jsxs("div",{className:"aimapui-popup-status-badge absolute bottom-2 left-2 flex items-center gap-1.5 px-2 py-0.5 bg-surface/90 backdrop-blur-sm rounded-md shadow-sm text-[10px] font-semibold uppercase tracking-wide text-on-surface",children:[i.jsx("div",{className:"size-2 rounded-full",style:{background:e.statusColor||"#10b981"}}),i.jsx("span",{children:e.statusLabel})]})]}):null}function mn({header:e,onClose:t,hasCover:n,showStatusDot:r}){return i.jsxs("div",{className:pe("aimapui-popup-header relative flex items-center p-4",!n&&"pr-10"),children:[r&&e.statusDot&&i.jsx("div",{className:"size-2 rounded-full shrink-0 mr-2 animate-pulse",style:{background:e.statusDot}}),i.jsx("h3",{className:"aimapui-popup-title text-xl leading-7 font-semibold text-on-surface m-0 flex-1 min-w-0 truncate",children:e.title}),!n&&i.jsx(et,{onClick:t})]})}function yn({attributes:e,size:t}){const n=t==="compact",r=t==="detailed",o=n?1:2;return i.jsx("div",{className:pe("aimapui-popup-attrs",n?"flex flex-col":"grid gap-2"),style:n?void 0:{gridTemplateColumns:`repeat(${o}, 1fr)`},children:e.map((a,s)=>r&&a.icon?i.jsxs("div",{className:"aimapui-popup-attr flex items-center gap-2",children:[i.jsx("div",{className:"aimapui-popup-attr-icon size-12 rounded-lg bg-surface-container-highest flex items-center justify-center text-primary shrink-0 [&_.material-symbols-outlined]:text-[28px]",children:i.jsx("span",{className:"material-symbols-outlined",children:a.icon})}),i.jsxs("div",{children:[i.jsx("p",{className:"aimapui-popup-attr-label text-sm leading-5 text-on-surface-variant m-0",children:a.label}),i.jsx("p",{className:"aimapui-popup-attr-value text-sm leading-5 font-medium text-on-surface m-0",style:a.valueColor?{color:a.valueColor}:void 0,children:a.value})]})]},s):i.jsxs("div",{className:pe("aimapui-popup-attr","flex justify-between items-baseline gap-2",n&&"py-2 border-b border-outline-variant/30 last:border-b-0 last:pb-0 first:pt-0"),children:[i.jsx("p",{className:"aimapui-popup-attr-label text-sm leading-5 text-on-surface-variant m-0",children:a.label}),i.jsx("p",{className:"aimapui-popup-attr-value text-sm leading-5 font-medium text-on-surface m-0 text-right",style:a.valueColor?{color:a.valueColor}:void 0,children:a.value})]},s))})}function xn({actions:e}){return i.jsx("div",{className:"aimapui-popup-actions flex gap-3 px-4 pb-4",children:e.map((t,n)=>i.jsx("button",{className:pe("aimapui-popup-action-btn","flex-1 py-2.5 text-sm leading-5 font-semibold rounded-lg border-none cursor-pointer transition-all duration-150 active:scale-[0.98]",t.variant==="secondary"?"aimapui-popup-action-btn--secondary bg-transparent text-on-surface border-2 border-solid border-outline-variant hover:bg-surface-container-low":"aimapui-popup-action-btn--primary bg-primary text-on-primary shadow-sm hover:shadow-[0_4px_12px_rgba(0,74,198,0.3)]"),onClick:t.onClick,children:t.label},n))})}function qe({longitude:e,latitude:t,content:n,closeButton:r=!0,size:o="standard",placement:a="auto",offset:s=8,header:l,attributes:c,actions:d,visible:h,singleton:f=!1,overlayContainer:p,onClose:g,className:m}){const x=ye(),v=h!==void 0,[L,k]=u.useState(!0),b=v?h:L,[z,V]=u.useState(!1),[F,M]=u.useState("top"),j=u.useRef(null),T=u.useRef(!0);u.useRef(!1);const H=u.useRef(Symbol("popup")),[Z,E]=u.useState(null);u.useEffect(()=>{if(p||!x)return;const U=()=>{try{const ee=x.mapService;if(ee&&typeof ee.getMarkerContainer=="function"){const D=ee.getMarkerContainer();if(D)return E(D),!0}}catch{}return!1};if(U())return;const q=()=>{U()};return x.loaded?q():x.on("loaded",q),()=>{x.off("loaded",q)}},[x,p]);const N=p??Z,y=u.useCallback(()=>{z||(V(!0),setTimeout(()=>{v||k(!1),g==null||g(),V(!1)},150))},[v,g,z]);u.useEffect(()=>{if(!f||!b)return;const U=H.current;return dn(U),()=>hn(U)},[f,b,y]),u.useEffect(()=>{if(!f)return;const U=H.current,q=ee=>{ee!==U&&b&&y()};return ht.add(q),()=>{ht.delete(q)}},[f,b,y]);const w=u.useRef(()=>{});w.current=(U,q)=>{var K;const ee=j.current;if(!ee)return;const D=Math.round(U),B=Math.round(q);let le=0,se=0;try{const O=x==null?void 0:x.mapService,Y=(K=O==null?void 0:O.getContainer)==null?void 0:K.call(O);if(Y){const te=Y.getBoundingClientRect();le=te.width||Y.clientWidth||Y.scrollWidth,se=te.height||Y.clientHeight||Y.scrollHeight}}catch{}const J=ee.querySelector(".aimapui-popup-content"),ie=(J==null?void 0:J.offsetWidth)||320,A=(J==null?void 0:J.offsetHeight)||200,{placement:C,transform:P}=pn(D,B,ie,A,le,se,a,s);M(C),ee.style.left="0",ee.style.top="0",ee.style.transform=`translate3d(${D}px, ${B}px, 0) ${P}`;let S;if(le>0&&se>0)S=D>=-2&&D<=le+2&&B>=-2&&B<=se+2;else{const O=ee.parentElement;O&&O.clientWidth>0&&O.clientHeight>0?S=D>=0&&D<=O.clientWidth&&B>=0&&B<=O.clientHeight:S=T.current}T.current=S,ee.style.display=S?"":"none"};const I=u.useCallback(()=>{if(x)try{const U=x.mapService,q=U?U.lngLatToContainer([e,t]):x.lngLatToContainer([e,t]);q&&w.current(q.x,q.y)}catch{}},[x,e,t]);if(u.useEffect(()=>{if(!N||!b)return;const U=requestAnimationFrame(()=>{I()});return()=>cancelAnimationFrame(U)},[N,b,I]),u.useEffect(()=>{if(!b)return;const U=q=>{q.key==="Escape"&&y()};return document.addEventListener("keydown",U),()=>document.removeEventListener("keydown",U)},[b,y]),u.useEffect(()=>{var D;if(!b||!N)return;const U=B=>{const le=j.current;if(!le||le.contains(B.target))return;const se=B.target;se.closest(".aimapui-marker")||se.closest("[data-marker]")||y()};let q=null;try{const B=x==null?void 0:x.mapService;B&&(q=(D=B.getContainer)==null?void 0:D.call(B))}catch{}const ee=q||N.parentElement||N;return ee.addEventListener("click",U,!0),()=>ee.removeEventListener("click",U,!0)},[b,N,x,y]),Lt(x,e,t,(U,q)=>{w.current(U,q)}),!b||!N)return null;const R=l||c||d,_=!!(l!=null&&l.coverUrl),$=F==="left"||F==="right",G=()=>R?i.jsxs(i.Fragment,{children:[l&&_&&i.jsx(gn,{header:l,onClose:y}),l&&i.jsx(mn,{header:l,onClose:y,hasCover:_,showStatusDot:o==="compact"}),i.jsxs("div",{className:pe("aimapui-popup-body relative p-4 text-sm leading-5 text-on-surface break-words whitespace-normal",!l&&r&&"pr-10"),children:[!l&&r&&i.jsx(et,{onClick:y}),n&&!Ye(n)&&typeof n!="string"&&i.jsx("div",{children:n}),n&&Ye(n)&&i.jsx("div",{dangerouslySetInnerHTML:{__html:n}}),n&&!Ye(n)&&typeof n=="string"&&i.jsx("div",{children:n}),!n&&!(c!=null&&c.length)&&!(d!=null&&d.length)&&!l&&i.jsx("div",{style:{color:"var(--color-on-surface-variant)"},children:"无内容"}),c&&c.length>0&&i.jsx(yn,{attributes:c,size:o})]}),d&&d.length>0&&i.jsx(xn,{actions:d})]}):Ye(n)?i.jsxs("div",{className:"aimapui-popup-body relative p-4 pt-2 pr-10 text-sm leading-5 text-on-surface break-words whitespace-normal",children:[r&&i.jsx(et,{onClick:y}),i.jsx("div",{dangerouslySetInnerHTML:{__html:n}})]}):i.jsxs("div",{className:"aimapui-popup-body relative p-4 pt-2 pr-10 text-sm leading-5 text-on-surface break-words whitespace-normal",children:[r&&i.jsx(et,{onClick:y}),i.jsx("div",{children:n??""})]}),Q=$?{display:"flex",alignItems:"center"}:{display:"flex",flexDirection:"column",alignItems:"center"};return Re.createPortal(i.jsxs("div",{ref:j,className:pe("aimapui-popup",`aimapui-popup--${o}`),style:{position:"absolute",left:0,top:0,transform:"translate(-9999px, -9999px)",display:"none",zIndex:30,pointerEvents:"auto",...Q},children:[F==="bottom"&&i.jsx(Xe,{placement:F}),F==="right"&&i.jsx(Xe,{placement:F}),i.jsx("div",{className:pe("aimapui-popup-content overflow-hidden rounded-xl",z&&"aimapui-popup-content--exit",m),children:G()}),F==="top"&&i.jsx(Xe,{placement:F}),F==="left"&&i.jsx(Xe,{placement:F})]}),N)}const Cn={top:"bottom",bottom:"top",left:"right",right:"left"},vn={top:"translate(-50%, -100%)",bottom:"translate(-50%, 0)",left:"translate(-100%, -50%)",right:"translate(0, -50%)"};function wt({content:e,variant:t="dark",longitude:n,latitude:r,targetElement:o,placement:a="top",offset:s=8,trigger:l="hover",visible:c,title:d,items:h,overlayContainer:f,className:p}){const{resolvedTheme:g}=E1(),m=ye(),x=c!==void 0,[v,L]=u.useState(!1),k=x?c:v,b=u.useRef(null),z=u.useRef(null),V=n!==void 0&&r!==void 0;u.useEffect(()=>{if(V||!o||x)return;const y=()=>{z.current=setTimeout(()=>L(!0),100)},w=()=>{z.current&&(clearTimeout(z.current),z.current=null),L(!1)},I=()=>{z.current&&clearTimeout(z.current),L(R=>!R)};return l==="hover"?(o.addEventListener("mouseenter",y),o.addEventListener("mouseleave",w)):o.addEventListener("click",I),()=>{z.current&&clearTimeout(z.current),o.removeEventListener("mouseenter",y),o.removeEventListener("mouseleave",w),o.removeEventListener("click",I)}},[o,l,V,x]);const F=u.useCallback(()=>{if(!o||!b.current)return;const y=o.getBoundingClientRect(),w=b.current.getBoundingClientRect();let I=0,R=0;switch(a){case"right":I=y.right+s,R=y.top+y.height/2-w.height/2;break;case"bottom":I=y.left+y.width/2-w.width/2,R=y.bottom+s;break;case"left":I=y.left-w.width-s,R=y.top+y.height/2-w.height/2;break;case"top":default:I=y.left+y.width/2-w.width/2,R=y.top-w.height-s;break}const _=8;I=Math.max(_,Math.min(I,window.innerWidth-w.width-_)),R=Math.max(_,Math.min(R,window.innerHeight-w.height-_)),b.current.style.display="",b.current.style.left=`${I}px`,b.current.style.top=`${R}px`},[o,a,s]);u.useEffect(()=>{if(V||!k||!o)return;F();const y=()=>F();return window.addEventListener("resize",y),window.addEventListener("scroll",y,!0),()=>{window.removeEventListener("resize",y),window.removeEventListener("scroll",y,!0)}},[k,o,V,F]);const M=u.useCallback(()=>{var y,w;if(!m)return null;try{const I=m.mapService,R=((y=I==null?void 0:I.getContainer)==null?void 0:y.call(I))??((w=m.getMapContainer)==null?void 0:w.call(m))??m.container;if(R instanceof HTMLElement)return R.getBoundingClientRect()}catch{}return null},[m]),j=u.useRef(()=>{});j.current=(y,w)=>{const I=b.current;if(!I||!V)return;let R=0,_=0;switch(a){case"top":_=-s;break;case"bottom":_=s;break;case"left":R=-s;break;case"right":R=s;break}const $=M();let G=!0;if($&&$.width>0&&$.height>0&&(G=y>=-2&&y<=$.width+2&&w>=-2&&w<=$.height+2),!G){I.style.display="none";return}const Q=$?$.left:0,U=$?$.top:0,q=Math.round(y+R+Q),ee=Math.round(w+_+U),D=vn[a];I.style.display="",I.style.transform=`translate3d(${q}px, ${ee}px, 0) ${D}`};const T=u.useCallback(()=>{if(!(!m||!V))try{const y=m.mapService,w=y?y.lngLatToContainer([n,r]):m.lngLatToContainer([n,r]);if(!w||isNaN(w.x)||isNaN(w.y))return;j.current(w.x,w.y)}catch{}},[m,n,r,V]);if(u.useEffect(()=>{if(!V||!k)return;const y=requestAnimationFrame(()=>T());return()=>cancelAnimationFrame(y)},[k,V,T]),Lt(V?m:null,n??0,r??0,(y,w)=>{j.current(y,w)}),!k)return null;const H=Cn[a],Z=d||h&&h.length>0,E=()=>e?typeof e=="string"?i.jsx("span",{dangerouslySetInnerHTML:{__html:e}}):e:Z?i.jsxs(i.Fragment,{children:[d&&i.jsx("p",{className:"font-sans text-xs leading-4 font-semibold m-0 mb-0.5",children:d}),h&&h.length>0&&i.jsx("div",{className:"flex flex-col gap-0.5",children:h.map((y,w)=>i.jsxs("div",{className:"flex justify-between items-center gap-3",children:[i.jsx("span",{className:"text-xs leading-4 font-normal opacity-70 m-0",children:y.label}),i.jsx("span",{className:"font-mono text-xs leading-4 font-[450] text-right m-0",children:y.value})]},w))})]}):null,N=i.jsxs("div",{ref:b,"data-theme":g,className:pe("aimapui-tooltip",t!=="dark"&&`aimapui-tooltip--${t}`),style:{position:"fixed",left:0,top:0,transform:"translate(-9999px, -9999px)",display:"none",zIndex:9999,pointerEvents:"none"},children:[i.jsx("div",{className:pe("aimapui-tooltip-content",p),children:E()}),i.jsx("div",{className:`aimapui-tooltip-arrow aimapui-tooltip-arrow--${H}`})]});return Re.createPortal(N,document.body)}function bn(e,t){let n;switch(e.type){case"point":n=P1(e);break;case"line":n=R1(e);break;case"polygon":n=D1(e);break;case"heatmap":n=$1(e);break;case"raster":n=_1(e);break;case"image":n=O1(e);break;default:return console.warn(`[aimapui] Unknown layer type: ${e.type}`),null}return Ln(n)}function Ln(e,t){var h;const n=ge[e.type];if(!n)throw new Error(`[aimapui] L7 layer class "${e.type}" not found`);const r=new n({...e.schema.zIndex!==void 0?{zIndex:e.schema.zIndex}:{},...e.schema.name?{name:e.schema.name}:{}}),{data:o,options:a}=e.sourceConfig;a?r.source(o,a):r.source(o);const{color:s,size:l,shape:c,style:d}=e.visual;if(s&&(s.field&&s.values?r.color(s.field,s.values):s.values&&r.color(s.values)),l&&(l.field&&l.values?r.size(l.field,l.values):l.values!==void 0&&r.size(l.values)),c&&(c.field&&c.values?r.shape(c.field,c.values):c.values&&r.shape(c.values)),d&&Object.keys(d).length>0&&r.style(d),e.type==="PointLayer"&&!c&&r.shape("circle"),e.type==="LineLayer"&&!c&&r.shape("line"),e.schema.filterField&&e.schema.filterValues){const f=e.schema.filterField,p=e.schema.filterValues;r.filter(f,g=>p.includes(g))}return(h=e.schema.animate)!=null&&h.enable&&r.animate(!0,e.schema.animate),e.schema.active&&r.active(e.schema.active),e.schema.select&&r.select(e.schema.select),e.schema.opacity!==void 0&&r.style({opacity:e.schema.opacity}),e.schema.blend&&r.blend(e.schema.blend),e.schema.visible===!1&&r.hide(),e.schema.minZoom!==void 0&&r.minZoom(e.schema.minZoom),e.schema.maxZoom!==void 0&&r.maxZoom(e.schema.maxZoom),r}function Ge(e,t,n){var l,c,d,h,f,p,g,m;const r=n,o=Number.isFinite((l=r==null?void 0:r.lnglat)==null?void 0:l.lng)?r.lnglat.lng:Number.isFinite((c=r==null?void 0:r.lngLat)==null?void 0:c.lng)?r.lngLat.lng:Number.isFinite((d=r==null?void 0:r.coordinate)==null?void 0:d.lng)?r.coordinate.lng:0,a=Number.isFinite((h=r==null?void 0:r.lnglat)==null?void 0:h.lat)?r.lnglat.lat:Number.isFinite((f=r==null?void 0:r.lngLat)==null?void 0:f.lat)?r.lngLat.lat:Number.isFinite((p=r==null?void 0:r.coordinate)==null?void 0:p.lat)?r.coordinate.lat:0,s=((g=r==null?void 0:r.feature)==null?void 0:g.properties)??(r==null?void 0:r.feature)??((m=r==null?void 0:r.data)==null?void 0:m.properties)??(r==null?void 0:r.data)??void 0;return{layerId:e,layerType:t,originalEvent:n,lng:o,lat:a,feature:s}}function $e({schema:e,scene:t,eventHandlers:n,onLayerCreated:r}){const o=u.useRef(null),a=Ct(),s=u.useRef(n);s.current=n;const l=u.useMemo(()=>{const{source:h,...f}=e;let p;if(ArrayBuffer.isView(h))p=`TypedArray:${h.length}`;else if(h&&typeof h=="object"&&"width"in h){const g=h;p=`Rasters:${g.width}x${g.height}:${g.length}`}else if(typeof h=="string")p=h;else try{p=JSON.stringify(h)}catch{p=String(h)}return p+"|"+wn(f)},[e]),[c,d]=u.useState({visible:!1,lng:0,lat:0,content:"",trigger:"click"});return u.useEffect(()=>{var F,M,j,T;const h=bn(e);if(!h)return;let f=!1;o.current=h;const p=e.id??e.name??`layer-${e.type}`,g=e.events,m=!!(g!=null&&g.enablePopup),x=(g==null?void 0:g.popupTrigger)??"click",v=H=>{if(!m)return;const Z=H.feature;if(!Z)return;const E=Mn(Z,g==null?void 0:g.popupFields,g==null?void 0:g.popupTemplate);d({visible:!0,lng:H.lng,lat:H.lat,content:E,trigger:x})},L=()=>{d(H=>({...H,visible:!1}))},k=!!((F=s.current)!=null&&F.onClick||g!=null&&g.click||m&&x==="click"),b=!!((M=s.current)!=null&&M.onMouseMove||g!=null&&g.mousemove||m&&x==="hover"),z=!!((j=s.current)!=null&&j.onMouseEnter||g!=null&&g.mouseenter),V=!!((T=s.current)!=null&&T.onMouseLeave||g!=null&&g.mouseleave||m&&x==="hover");return k&&h.on("click",H=>{var E,N;const Z=Ge(p,e.type,H);(N=(E=s.current)==null?void 0:E.onClick)==null||N.call(E,Z),g!=null&&g.click&&a.emit(g.click,Z),x==="click"&&v(Z)}),b&&h.on("mousemove",H=>{var E,N;const Z=Ge(p,e.type,H);(N=(E=s.current)==null?void 0:E.onMouseMove)==null||N.call(E,Z),x==="hover"&&v(Z),g!=null&&g.mousemove&&a.emit(g.mousemove,Z)}),z&&h.on("mouseenter",H=>{var E,N;const Z=Ge(p,e.type,H);(N=(E=s.current)==null?void 0:E.onMouseEnter)==null||N.call(E,Z),g!=null&&g.mouseenter&&a.emit(g.mouseenter,Z)}),V&&h.on("mouseleave",H=>{var E,N;const Z=Ge(p,e.type,H);(N=(E=s.current)==null?void 0:E.onMouseLeave)==null||N.call(E,Z),x==="hover"&&L(),g!=null&&g.mouseleave&&a.emit(g.mouseleave,Z)}),t.addLayer(h),r==null||r(h),h.on("inited",()=>{var H,Z;if(!f){if(e.autoFit){const E=(Z=(H=h.getSource)==null?void 0:H.call(h))==null?void 0:Z.extent;if(E&&Array.isArray(E)&&E.length>=4){const[N,y,w,I]=E;isFinite(N)&&isFinite(y)&&isFinite(w)&&isFinite(I)&&N<w&&y<I&&t.fitBounds([[N,y],[w,I]])}}t.render()}}),()=>{if(f=!0,o.current){try{t.removeLayer(o.current)}catch{}o.current=null}d(H=>({...H,visible:!1}))}},[l,t,a]),u.useEffect(()=>{o.current&&(e.visible===!1?o.current.hide():o.current.show(),e.zIndex!==void 0&&(o.current.zIndex=e.zIndex))},[e.visible,e.zIndex]),c.visible?c.trigger==="hover"?i.jsx(wt,{longitude:c.lng,latitude:c.lat,content:c.content,variant:"dark",placement:"top",visible:!0}):i.jsx(qe,{longitude:c.lng,latitude:c.lat,content:c.content,closeButton:!0,size:"compact",onClose:()=>d(h=>({...h,visible:!1}))}):null}function wn(e){return JSON.stringify(pt(e))}function pt(e){if(ArrayBuffer.isView(e))return`[TypedArray:${e.length}]`;if(e instanceof ArrayBuffer)return`[ArrayBuffer:${e.byteLength}]`;if(Array.isArray(e))return e.length>1e3?`[Array:${e.length}]`:e.map(pt);if(e&&typeof e=="object"){const t=e,n=Object.keys(t).sort(),r={};return n.forEach(o=>{r[o]=pt(t[o])}),r}return e}function Mn(e,t,n){return n?n.replace(/\{\{(\w+)\}\}/g,(a,s)=>String(e[s]??"")):`<table style="font-size:12px">${(t??Object.keys(e).filter(a=>!["_id","id","geometry","coordinates"].includes(a))).map(a=>`<tr><td style="font-weight:600;padding-right:8px">${a}</td><td>${e[a]??""}</td></tr>`).join("")}</table>`}function B1({layers:e,eventHandlers:t}){const n=ye();return n?i.jsx(i.Fragment,{children:e.map((r,o)=>i.jsx($e,{schema:r,scene:n,eventHandlers:t},r.id??`layer-${o}`))}):null}const W1=u.createContext(!1);function Me(){return u.useContext(W1)}const it=new Set,Le={mark(e){e&&typeof e=="object"&&"$$typeof"in e&&it.add(e),e&&typeof e=="function"&&it.add(e)},check(e){if("position"in e.props)return!0;const t=e.type;if(it.has(t))return!0;const n=t==null?void 0:t.displayName;return!!(typeof n=="string"&&n.endsWith("Control"))}};function Mt({children:e,className:t,style:n}){const{controlGroups:r,otherChildren:o}=kn(e);return i.jsx(W1.Provider,{value:!0,children:i.jsxs("div",{className:`l7-control-container${t?` ${t}`:""}`,style:n,children:[Object.entries(r).map(([a,s])=>{const l=zn(a);return i.jsx("div",{className:`l7-control-anchor ${l}`,children:s},a)}),o]})})}function kn(e){const t={},n=[];return u.Children.forEach(e,(r,o)=>{var a;if(!u.isValidElement(r)){n.push(r);return}if(Le.check(r)){const s=((a=r.props)==null?void 0:a.position)??"topright";t[s]||(t[s]=[]),t[s].push(r)}else n.push(u.isValidElement(r)?u.cloneElement(r,{key:r.key??`non-ctrl-${o}`}):r)}),{controlGroups:t,otherChildren:n}}function Sn(e){switch(e){case"topleft":return{vSide:"top",hSide:"left",direction:"column"};case"topright":return{vSide:"top",hSide:"right",direction:"column"};case"bottomleft":return{vSide:"bottom",hSide:"left",direction:"column"};case"bottomright":return{vSide:"bottom",hSide:"right",direction:"column"};case"topcenter":return{vSide:"top",hSide:"left",direction:"row"};case"bottomcenter":return{vSide:"bottom",hSide:"left",direction:"row"};case"lefttop":return{vSide:"top",hSide:"left",direction:"row"};case"leftbottom":return{vSide:"bottom",hSide:"left",direction:"row"};case"righttop":return{vSide:"top",hSide:"right",direction:"row"};case"rightbottom":return{vSide:"bottom",hSide:"right",direction:"row"};default:return{vSide:"top",hSide:"right",direction:"column"}}}function zn(e){if(e==="rightcenter")return"l7-rightcenter l7-column";if(e==="leftcenter")return"l7-leftcenter l7-column";const{vSide:t,hSide:n,direction:r}=Sn(e);return`l7-${t} l7-${n} l7-${r}`}function ke(e){const t=ye(),n=u.useMemo(()=>{if(!t)return null;try{return t.mapService??null}catch{return null}},[t]),r=u.useCallback(()=>{var a;if(!t)return null;try{return n&&typeof n.getContainer=="function"?n.getContainer():((a=t.getContainer)==null?void 0:a.call(t))??null}catch{return null}},[t,n]),o=u.useMemo(()=>{if(e==="rightcenter")return"l7-rightcenter l7-column";if(e==="leftcenter")return"l7-leftcenter l7-column";const{vSide:a,hSide:s,direction:l}=jn(e??"topright");return`l7-${a} l7-${s} l7-${l}`},[e]);return{scene:t,mapsService:n,getMapContainer:r,positionClassName:o}}function jn(e){switch(e){case"topleft":return{vSide:"top",hSide:"left",direction:"column"};case"topright":return{vSide:"top",hSide:"right",direction:"column"};case"bottomleft":return{vSide:"bottom",hSide:"left",direction:"column"};case"bottomright":return{vSide:"bottom",hSide:"right",direction:"column"};case"topcenter":return{vSide:"top",hSide:"left",direction:"row"};case"bottomcenter":return{vSide:"bottom",hSide:"left",direction:"row"};case"lefttop":return{vSide:"top",hSide:"left",direction:"row"};case"leftbottom":return{vSide:"bottom",hSide:"left",direction:"row"};case"righttop":return{vSide:"top",hSide:"right",direction:"row"};case"rightbottom":return{vSide:"bottom",hSide:"right",direction:"row"};case"rightcenter":return{vSide:"top",hSide:"right",direction:"column"};case"leftcenter":return{vSide:"top",hSide:"left",direction:"column"};default:return{vSide:"top",hSide:"right",direction:"column"}}}function kt({position:e="bottomright",zoomInText:t,zoomInTitle:n="Zoom in",zoomOutText:r,zoomOutTitle:o="Zoom out",showZoom:a=!1,className:s,style:l}){const{scene:c,mapsService:d,positionClassName:h}=ke(e),f=Me(),[p,g]=u.useState(0),[m,x]=u.useState(!0),[v,L]=u.useState(!0),k=u.useRef(()=>{if(!d)return;const F=Math.floor(d.getZoom());g(F),x(d.getZoom()<d.getMaxZoom()),L(d.getZoom()>d.getMinZoom())});u.useEffect(()=>{if(!d)return;k.current();const F=()=>k.current();return d.on("zoomend",F),d.on("zoomchange",F),()=>{d.off("zoomend",F),d.off("zoomchange",F)}},[d]);const b=()=>{if(!d||!c)return;const F=d.getZoom(),M=d.getMaxZoom();if(F<M){const j=Math.min(F+1,M);c.setZoom(j)}},z=()=>{if(!d||!c)return;const F=d.getZoom(),M=d.getMinZoom();if(F>M){const j=Math.max(F-1,M);c.setZoom(j)}},V=i.jsxs("div",{className:`l7-control l7-control-zoom l7-control--glass${s?` ${s}`:""}`,style:l,children:[i.jsx("button",{className:"l7-button-control",onClick:b,disabled:!m,title:n,"aria-label":n,children:t??i.jsx("span",{className:"material-symbols-outlined",children:"add"})}),a&&i.jsx("button",{className:"l7-button-control l7-control-zoom__number",disabled:!0,children:p}),i.jsx("button",{className:"l7-button-control",onClick:z,disabled:!v,title:o,"aria-label":o,children:r??i.jsx("span",{className:"material-symbols-outlined",children:"remove"})})]});return f?V:i.jsx("div",{className:`l7-control-anchor ${h}`,children:V})}Le.mark(kt);function Hn(e,t){const[n,r]=e,[o,a]=t,s=63710088e-1,l=(a-r)*Math.PI/180,c=(o-n)*Math.PI/180,d=Math.sin(l/2)*Math.sin(l/2)+Math.cos(r*Math.PI/180)*Math.cos(a*Math.PI/180)*Math.sin(c/2)*Math.sin(c/2),h=2*Math.atan2(Math.sqrt(d),Math.sqrt(1-d));return s*h}function at(e){const t=Math.pow(10,Math.floor(Math.abs(e)).toString().length-1);let n=e/t;return n=n>=10?10:n>=5?5:n>=3?3:n>=2?2:1,t*n}function St({position:e="bottomleft",maxWidth:t=100,metric:n=!0,imperial:r=!1,updateWhenIdle:o=!1,className:a,style:s}){const{mapsService:l,positionClassName:c}=ke(e),d=Me(),[h,f]=u.useState([]),p=u.useRef(()=>{if(l)try{const x=l.getSize()[1]/2,v=l.containerToLngLat([0,x]),L=l.containerToLngLat([t,x]);if(!v||!L)return;const k=Hn([v.lng,v.lat],[L.lng,L.lat]),b=[];if(n&&k){const z=at(k),V=z<1e3?`${z} m`:`${z/1e3} km`;b.push({text:V,width:Math.round(t*(z/k))})}if(r&&k){const z=k*3.2808399;if(z>5280){const V=z/5280,F=at(V);b.push({text:`${F} mi`,width:Math.round(t*(F/V))})}else{const V=at(z);b.push({text:`${V} ft`,width:Math.round(t*(V/z))})}}f(b)}catch{}});u.useEffect(()=>{if(!l)return;p.current();const m=()=>p.current(),x=o?"moveend":"mapmove",v=o?"zoomend":"zoomchange";return l.on(x,m),l.on(v,m),()=>{l.off(x,m),l.off(v,m)}},[l,t,n,r,o]);const g=i.jsx("div",{className:`l7-control l7-control-scale l7-control--glass${a?` ${a}`:""}`,style:s,children:h.map((m,x)=>i.jsx("div",{className:"l7-control-scale-line",style:{width:m.width},children:m.text},x))});return d?g:i.jsx("div",{className:`l7-control-anchor ${c}`,children:g})}Le.mark(St);function zt({position:e="topright",container:t,className:n,style:r}){const{getMapContainer:o,positionClassName:a}=ke(e),s=Me(),[l,c]=u.useState(!1),d=u.useCallback(()=>t??o()??document.documentElement,[t,o]),h=u.useCallback(()=>{const p=d();l?document.exitFullscreen?document.exitFullscreen():document.webkitExitFullscreen&&document.webkitExitFullscreen():p.requestFullscreen?p.requestFullscreen():p.webkitRequestFullscreen&&p.webkitRequestFullscreen()},[l,d]);u.useEffect(()=>{const p=()=>{c(!!document.fullscreenElement)};return document.addEventListener("fullscreenchange",p),()=>document.removeEventListener("fullscreenchange",p)},[]);const f=i.jsx("div",{className:`l7-control l7-control--glass${n?` ${n}`:""}`,style:r,children:i.jsx("button",{className:"l7-button-control",onClick:h,title:l?"退出全屏":"全屏","aria-label":l?"退出全屏":"全屏",children:i.jsx("span",{className:"material-symbols-outlined",children:l?"fullscreen_exit":"fullscreen"})})});return s?f:i.jsx("div",{className:`l7-control-anchor ${a}`,children:f})}Le.mark(zt);function jt({position:e="topright",transform:t,className:n,style:r}){const{mapsService:o,positionClassName:a}=ke(e),s=Me(),l=u.useCallback(async()=>{if(!window.navigator.geolocation){console.warn("[aimapui] Geolocation is not supported by this browser");return}if(o)try{const d=await new Promise((x,v)=>{window.navigator.geolocation.getCurrentPosition(({coords:L})=>x(L),L=>v(L))}),{longitude:h,latitude:f}=d;if(isNaN(h)||isNaN(f))return;const p=[h,f],g=t?await t(p):p,m=o.getZoom();o.setZoomAndCenter(m>15?m:15,g)}catch(d){console.warn("[aimapui] Geolocation error:",d)}},[o,t]),c=i.jsx("div",{className:`l7-control l7-control--glass${n?` ${n}`:""}`,style:r,children:i.jsx("button",{className:"l7-button-control",onClick:l,title:"定位","aria-label":"定位",children:i.jsx("span",{className:"material-symbols-outlined",children:"my_location"})})});return s?c:i.jsx("div",{className:`l7-control-anchor ${a}`,children:c})}Le.mark(jt);const Vn=["l7-popper-left","l7-popper-right","l7-popper-top","l7-popper-bottom"],En=["l7-popper-start","l7-popper-end"];function ft(e){switch(e){case"topleft":return"l7-popper-bottom l7-popper-start";case"topright":return"l7-popper-bottom l7-popper-end";case"bottomleft":return"l7-popper-top l7-popper-start";case"bottomright":return"l7-popper-top l7-popper-end";case"lefttop":return"l7-popper-right l7-popper-start";case"leftbottom":return"l7-popper-right l7-popper-end";case"righttop":return"l7-popper-left l7-popper-start";case"rightbottom":return"l7-popper-left l7-popper-end";default:return"l7-popper-bottom"}}function Ht(e,t,n){const r=u.useRef(null),[o,a]=u.useState(()=>ft(e));return u.useEffect(()=>{if(!t)return;const s=ft(e);a(s),requestAnimationFrame(()=>{const l=r.current;if(!l)return;const c=l.getBoundingClientRect(),d=window.innerWidth,h=window.innerHeight;let f="",p="";if(c.bottom>h-8?f="l7-popper-top":c.top<8&&(f="l7-popper-bottom"),c.right>d-8?p="l7-popper-end":c.left<8&&(p="l7-popper-start"),!f&&!p)return;const g=s.split(" "),m=g.find(v=>Vn.includes(v))??"",x=g.find(v=>En.includes(v))??"";a(`${f||m} ${p||x}`.trim())})},[t,e]),{popperRef:r,popperClass:o}}const gt=[{text:"Standard",value:"normal",preview:"linear-gradient(135deg, #e8e8e8 0%, #c8d8e8 40%, #a8c8d8 100%)"},{text:"Light",value:"light",preview:"linear-gradient(135deg, #f0f4f8 0%, #d6e4f0 40%, #e8eff5 100%)"},{text:"Dark",value:"dark",preview:"linear-gradient(135deg, #0d1b2a 0%, #1b2838 40%, #162032 100%)"},{text:"Dark Blue",value:"darkblue",preview:"linear-gradient(135deg, #0a1628 0%, #0f2040 40%, #091a30 100%)"},{text:"Satellite",value:"satellite",preview:"linear-gradient(135deg, #1a3a1a 0%, #2d5a2d 40%, #1d4a2d 100%)"},{text:"Fresh",value:"fresh",preview:"linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 40%, #d4edda 100%)"}],An=[{text:"Positron",value:"https://tiles.openfreemap.org/styles/positron",preview:"linear-gradient(135deg, #f2f3f0 0%, #d8dcd6 40%, #e8ebe5 100%)"},{text:"Bright",value:"https://tiles.openfreemap.org/styles/bright",preview:"linear-gradient(135deg, #e8e8e8 0%, #c8d8e8 40%, #a8c8d8 100%)"},{text:"Dark",value:"https://tiles.openfreemap.org/styles/dark",preview:"linear-gradient(135deg, #1a1a2e 0%, #16213e 40%, #0f3460 100%)"},{text:"Liberty",value:"https://tiles.openfreemap.org/styles/liberty",preview:"linear-gradient(135deg, #f0ece2 0%, #dfd7c8 40%, #c8bfad 100%)"},{text:"Fiord",value:"https://tiles.openfreemap.org/styles/fiord",preview:"linear-gradient(135deg, #2c3e50 0%, #34495e 40%, #415b76 100%)"}],Zn=[{text:"Light",value:"light",preview:"linear-gradient(135deg, #f0f4f8 0%, #d6e4f0 40%, #e8eff5 100%)"},{text:"Dark",value:"dark",preview:"linear-gradient(135deg, #0d1b2a 0%, #1b2838 40%, #162032 100%)"},{text:"Normal",value:"normal",preview:"linear-gradient(135deg, #e8e8e8 0%, #c8d8e8 40%, #a8c8d8 100%)"}];function Vt({position:e="topright",options:t,defaultValue:n,onThemeChange:r,className:o,style:a}){const{mapsService:s,positionClassName:l}=ke(e),c=Me(),[d,h]=u.useState(!1),[f,p]=u.useState(n??""),[g,m]=u.useState(t??[]),x=u.useRef(null),{popperRef:v,popperClass:L}=Ht(e,d);u.useEffect(()=>{var z;if(t&&t.length>0){m(t);return}if(s){try{const V=(z=s.getMapStyleConfig)==null?void 0:z.call(s);if(V&&typeof V=="object"){const F=Object.entries(V).filter(([,M])=>typeof M=="string").map(([M,j])=>{const T=gt.find(H=>H.value===j);return{text:M,value:j,preview:T==null?void 0:T.preview}});if(F.length>0){m(F);return}}}catch{}m(gt)}},[s,t]),u.useEffect(()=>{var z;if(n){p(n);return}if(s)try{const V=(z=s.getMapStyle)==null?void 0:z.call(s);V&&p(V)}catch{}},[s,n]),u.useEffect(()=>{if(!d)return;const z=V=>{x.current&&!x.current.contains(V.target)&&h(!1)};return document.addEventListener("mousedown",z),()=>document.removeEventListener("mousedown",z)},[d]);const k=u.useCallback(z=>{if(p(z),s)try{s.setMapStyle(z)}catch{}r==null||r(z)},[s,r]),b=i.jsxs("div",{ref:x,className:`l7-control l7-control--glass${o?` ${o}`:""}`,style:a,children:[i.jsx("button",{className:"l7-button-control",onClick:()=>h(!d),title:"地图样式","aria-label":"地图样式",children:i.jsx("span",{className:"material-symbols-outlined",children:"palette"})}),d&&g.length>0&&i.jsx("div",{ref:v,className:`l7-popper ${L}`,children:i.jsxs("div",{className:"l7-popper-content l7-theme-panel",children:[i.jsxs("div",{className:"l7-theme-panel__title",children:[i.jsx("span",{className:"material-symbols-outlined",style:{fontSize:16},children:"palette"}),"Map Themes"]}),i.jsx("div",{className:"l7-theme-panel__grid",children:g.map(z=>{const V=f===z.value,F=z.preview??"linear-gradient(135deg, #e0e0e0 0%, #bdbdbd 100%)";return i.jsxs("button",{className:`l7-theme-card${V?" l7-theme-card--active":""}`,onClick:()=>k(z.value),title:z.text,children:[i.jsx("div",{className:"l7-theme-card__preview",style:{background:F}}),V&&i.jsx("span",{className:"material-symbols-outlined l7-theme-card__check",style:{fontVariationSettings:"'FILL' 1"},children:"check_circle"}),i.jsx("span",{className:"l7-theme-card__label",children:z.text})]},z.value)})})]})})]});return c?b:i.jsx("div",{className:`l7-control-anchor ${l}`,children:b})}Le.mark(Vt);function Et({position:e="bottomleft",precision:t=6,transform:n,className:r,style:o}){const s=n??(([p,g])=>[+p.toFixed(t),+g.toFixed(t)]),{mapsService:l,positionClassName:c}=ke(e),d=Me(),h=u.useRef(null);u.useEffect(()=>{if(!l)return;const p=g=>{const m=g.lngLat??g.lnglat;if(!m)return;const x=[m.lng,m.lat],v=s(x);h.current&&(h.current.innerText=v.join(", "))};return l.on("mousemove",p),()=>{l.off("mousemove",p)}},[l,s]);const f=i.jsx("div",{ref:h,className:`l7-control l7-control-mouse-location l7-control--glass${r?` ${r}`:""}`,style:o,children:" "});return d?f:i.jsx("div",{className:`l7-control-anchor ${c}`,children:f})}Le.mark(Et);function At({position:e="topright",format:t="png",onExport:n,className:r,style:o}){const{scene:a,mapsService:s,positionClassName:l}=ke(e),c=Me(),d=t==="jpg"?"jpeg":"png",h=u.useCallback(async()=>{var g,m;try{const x=s?await((g=s.exportMap)==null?void 0:g.call(s,d)):void 0,v=a?await((m=a.exportPng)==null?void 0:m.call(a,d)):void 0,L=[x,v].filter(k=>!!k);return L.length===0?void 0:L.length===1?L[0]:Fn(L,d)}catch{return}},[a,s,d]),f=u.useCallback(async()=>{var m;const g=await h();if(n&&g){n(g);return}if(g){const x=document.createElement("a");x.download=`aimap-export.${d==="jpeg"?"jpg":"png"}`,x.href=g,x.click()}else try{if(s){const x=(m=s.getContainer)==null?void 0:m.call(s),v=x==null?void 0:x.querySelector("canvas");if(v&&typeof v.toDataURL=="function"){const L=v.toDataURL(`image/${d}`),k=document.createElement("a");k.download=`aimap-export.${d==="jpeg"?"jpg":"png"}`,k.href=L,k.click()}}}catch(x){console.warn("[aimapui] Export image failed:",x)}},[h,n,d,s]),p=i.jsx("div",{className:`l7-control l7-control--glass${r?` ${r}`:""}`,style:o,children:i.jsx("button",{className:"l7-button-control",onClick:f,title:"导出图片","aria-label":"导出图片",children:i.jsx("span",{className:"material-symbols-outlined",children:"photo_camera"})})});return c?p:i.jsx("div",{className:`l7-control-anchor ${l}`,children:p})}async function Fn(e,t){const n=document.querySelector(".l7-map")||document.documentElement,{width:r=0,height:o=0}=n.getBoundingClientRect(),a=document.createElement("canvas");a.width=r,a.height=o;const s=a.getContext("2d");return(await Promise.all(e.map(c=>new Promise(d=>{const h=new Image;h.onload=()=>d(h),h.src=c})))).forEach(c=>{s==null||s.drawImage(c,0,0,r,o)}),a.toDataURL(`image/${t}`)}Le.mark(At);function Zt({position:e="topright",layers:t,onToggle:n,onOpacityChange:r,className:o,style:a}){const[s,l]=u.useState(!1),c=u.useRef(null),[d,h]=u.useState(()=>{const L={};return t.forEach(k=>{L[k.id]=k.opacity??1}),L});u.useEffect(()=>{h(L=>{const k={...L};return t.forEach(b=>{b.opacity!==void 0&&(k[b.id]=b.opacity)}),k})},[t]);const{positionClassName:f}=ke(e),p=Me(),{popperRef:g,popperClass:m}=Ht(e,s);if(u.useEffect(()=>{if(!s)return;const L=k=>{c.current&&!c.current.contains(k.target)&&l(!1)};return document.addEventListener("mousedown",L),()=>document.removeEventListener("mousedown",L)},[s]),!t.length)return null;const x=(L,k)=>{h(b=>({...b,[L]:k})),r==null||r(L,k)},v=i.jsxs("div",{ref:c,className:`l7-control l7-control--glass${o?` ${o}`:""}`,style:a,children:[i.jsx("button",{className:"l7-button-control",onClick:()=>l(!s),title:"图层控制","aria-label":"图层控制",children:i.jsx("span",{className:"material-symbols-outlined",children:"layers"})}),s&&i.jsx("div",{ref:g,className:`l7-popper ${m}`,children:i.jsxs("div",{className:"l7-popper-content l7-layer-panel",children:[i.jsxs("div",{className:"l7-layer-panel__title",children:[i.jsx("span",{className:"material-symbols-outlined",style:{fontSize:16},children:"layers"}),"Layers"]}),i.jsx("div",{className:"l7-layer-panel__list",children:t.map(L=>{const k=L.visible!==!1,b=d[L.id]??L.opacity??1,z=L.icon??"layers";return i.jsxs("div",{className:`l7-layer-item${k?"":" l7-layer-item--disabled"}`,children:[i.jsxs("div",{className:"l7-layer-item__header",children:[i.jsx("span",{className:"material-symbols-outlined l7-layer-item__icon",children:z}),i.jsx("span",{className:"l7-layer-item__name",children:L.name??L.id}),i.jsxs("label",{className:"l7-layer-toggle",children:[i.jsx("input",{type:"checkbox",checked:k,onChange:()=>n(L.id,!k)}),i.jsx("span",{className:"l7-layer-toggle__track"})]})]}),r&&i.jsxs("div",{className:"l7-layer-item__slider",children:[i.jsx("span",{className:"material-symbols-outlined",style:{fontSize:14},children:"opacity"}),i.jsx("input",{type:"range",min:0,max:100,value:Math.round(b*100),onChange:V=>x(L.id,+V.target.value/100),className:"l7-layer-slider"})]})]},L.id)})})]})})]});return p?v:i.jsx("div",{className:`l7-control-anchor ${f}`,children:v})}Le.mark(Zt);function Tn(e){return{mode:"none",features:e?[...e]:[],selectedFeatureId:null,isDrawing:!1,currentVertices:[],startPoint:null,mousePoint:null,dragVertexIndex:null,isDragging:!1,mergeSelectedIds:[],splitTargetId:null}}const Se={point:{color:"#3f51b5",size:6,strokeColor:"#ffffff",strokeWidth:2},line:{color:"#3f51b5",size:2,opacity:1},polygon:{fill:"#3f51b5",fillOpacity:.2,stroke:"#3f51b5",strokeWidth:2},drawing:{fill:"#3f51b5",fillOpacity:.2,stroke:"#3f51b5",strokeWidth:2,dashStroke:"#3f51b5",dashWidth:1.5,dashArray:[4,4]},selected:{stroke:"#3f51b5",strokeWidth:3,fill:"#ffb95f",fillOpacity:.12,dashArray:[6,3]},vertex:{color:"#3f51b5",size:6,strokeColor:"#ffffff",strokeWidth:2,activeColor:"#ffb95f",activeSize:6}};function Nn(e){return e?{point:{...Se.point,...e.point},line:{...Se.line,...e.line},polygon:{...Se.polygon,...e.polygon},drawing:{...Se.drawing,...e.drawing},selected:{...Se.selected,...e.selected},vertex:{...Se.vertex,...e.vertex}}:{...Se}}let In=0;function Pn(){return`draw-${++In}`}function U1(e){return{type:"LineString",coordinates:e.map(([t,n])=>[t,n])}}function q1(e){const t=e.map(([n,r])=>[n,r]);if(t.length>0){const n=t[0],r=t[t.length-1];(n[0]!==r[0]||n[1]!==r[1])&&t.push([n[0],n[1]])}return{type:"Polygon",coordinates:[t]}}function Y1(e,t){const[n,r]=e,[o,a]=t;return{type:"Polygon",coordinates:[[[n,r],[o,r],[o,a],[n,a],[n,r]]]}}function X1(e,t,n=64){const[r,o]=e,a=[];for(let s=0;s<n;s++){const l=s/n*2*Math.PI,c=t/(111320*Math.cos(o*Math.PI/180))*Math.cos(l),d=t/110540*Math.sin(l);a.push([r+c,o+d])}return a.push(a[0]),{type:"Polygon",coordinates:[a]}}function Rn(e){return{type:"Point",coordinates:[e[0],e[1]]}}function Ut(e,t){const r=c=>c*Math.PI/180,o=r(t[1]-e[1]),a=r(t[0]-e[0]),s=Math.sin(o/2)*Math.sin(o/2)+Math.cos(r(e[1]))*Math.cos(r(t[1]))*Math.sin(a/2)*Math.sin(a/2);return 6371e3*(2*Math.atan2(Math.sqrt(s),Math.sqrt(1-s)))}function G1(e,t){const n=t.x-e.x,r=t.y-e.y;return Math.sqrt(n*n+r*r)}function Fe(e,t,n){return{type:"Feature",id:Pn(),geometry:e,properties:{drawType:t}}}function Dn(e,t,n){const r=e.geometry,o=$n(r,t,n);return{...e,geometry:o,properties:{...e.properties}}}function $n(e,t,n){switch(e.type){case"Point":return{type:"Point",coordinates:[e.coordinates[0]+t,e.coordinates[1]+n]};case"LineString":return{type:"LineString",coordinates:e.coordinates.map(([r,o])=>[r+t,o+n])};case"Polygon":return{type:"Polygon",coordinates:e.coordinates.map(r=>r.map(([o,a])=>[o+t,a+n]))};default:return e}}function _n(e,t,n,r){const o=e.geometry;let a;if(o.type==="Point")a={type:"Point",coordinates:[n,r]};else if(o.type==="LineString"){const s=o.coordinates.map(l=>[...l]);t>=0&&t<s.length&&(s[t]=[n,r]),a={type:"LineString",coordinates:s}}else if(o.type==="Polygon"){const s=o.coordinates.map(d=>d.map(h=>[...h])),l=s[0],c=l.length>1&&l[0][0]===l[l.length-1][0]&&l[0][1]===l[l.length-1][1]?l.length-1:l.length;t>=0&&t<c&&(l[t]=[n,r],t===0&&(l[l.length-1]=[n,r])),a={type:"Polygon",coordinates:s}}else a=o;return{...e,geometry:a,properties:{...e.properties}}}function rt(e){const t=e.geometry,n=[];if(t.type==="Point")n.push([t.coordinates[0],t.coordinates[1]]);else if(t.type==="LineString")t.coordinates.forEach(([r,o])=>{n.push([r,o])});else if(t.type==="Polygon"){const r=t.coordinates[0];if(r&&r.length>1){const o=r[0][0]===r[r.length-1][0]&&r[0][1]===r[r.length-1][1]?r.length-1:r.length;for(let a=0;a<o;a++)n.push([r[a][0],r[a][1]])}}return n}function De(e){const t=e.lnglat,n=e.lngLat;if(t&&typeof t.lng=="number"&&typeof t.lat=="number")return[t.lng,t.lat];if(n&&typeof n.lng=="number"&&typeof n.lat=="number")return[n.lng,n.lat];const r=e.coordinate;return r&&typeof r[0]=="number"&&typeof r[1]=="number"?[r[0],r[1]]:null}function On(e){return{type:"FeatureCollection",features:e.filter(t=>t.geometry.type==="LineString")}}function Bn(e){return{type:"FeatureCollection",features:e.filter(t=>t.geometry.type==="Polygon")}}function Wn(e,t){const n=qt(e.coordinates[0]),r=qt(t.coordinates[0]);let o=0;const a=new Set(n.map(s=>`${s[0].toFixed(7)},${s[1].toFixed(7)}`));for(const s of r)a.has(`${s[0].toFixed(7)},${s[1].toFixed(7)}`)&&o++;if(o>=2)return!0;for(let s=0;s<n.length;s++){const l=(s+1)%n.length;for(let c=0;c<r.length;c++){const d=(c+1)%r.length;if(J1(n[s],n[l],r[c],r[d],!0))return!0}}for(const s of n)if(Yt(s,r))return!0;for(const s of r)if(Yt(s,n))return!0;return!1}function qt(e){const t=[],n=e.length>1&&e[0][0]===e[e.length-1][0]&&e[0][1]===e[e.length-1][1]?e.length-1:e.length;for(let r=0;r<n;r++)t.push([e[r][0],e[r][1]]);return t}function Yt(e,t){let n=!1;for(let r=0,o=t.length-1;r<t.length;o=r++){const a=t[r][0],s=t[r][1],l=t[o][0],c=t[o][1];s>e[1]!=c>e[1]&&e[0]<(l-a)*(e[1]-s)/(c-s)+a&&(n=!n)}return n}function Un(e){if(e.length<2)return null;const t=e.filter(l=>l.geometry.type==="Polygon");if(t.length<2)return null;for(let l=0;l<t.length;l++){const c=t[l].geometry;let d=!1;for(let h=0;h<t.length;h++)if(l!==h&&Wn(c,t[h].geometry)){d=!0;break}if(!d)return null}const n=[];for(const l of t){const c=l.geometry.coordinates[0];if(!c)continue;const d=c.length>1&&c[0][0]===c[c.length-1][0]&&c[0][1]===c[c.length-1][1]?c.length-1:c.length;for(let h=0;h<d;h++)n.push([c[h][0],c[h][1]])}if(n.length<3)return null;const r=[],o=new Set;for(const l of n){const c=`${l[0].toFixed(6)},${l[1].toFixed(6)}`;o.has(c)||(o.add(c),r.push(l))}if(r.length<3)return null;const a=qn(r);return a.length<3?null:(a.push(a[0]),Fe({type:"Polygon",coordinates:[a]},"polygon"))}function qn(e){if(e.length<3)return[...e];let t=0;for(let a=1;a<e.length;a++)(e[a][1]<e[t][1]||e[a][1]===e[t][1]&&e[a][0]<e[t][0])&&(t=a);const n=e[t],r=e.filter(a=>a[0]!==n[0]||a[1]!==n[1]).sort((a,s)=>{const l=Math.atan2(a[1]-n[1],a[0]-n[0]),c=Math.atan2(s[1]-n[1],s[0]-n[0]);if(l!==c)return l-c;const d=(a[0]-n[0])**2+(a[1]-n[1])**2,h=(s[0]-n[0])**2+(s[1]-n[1])**2;return d-h}),o=[n];for(const a of r){for(;o.length>1;){const s=o[o.length-2],l=o[o.length-1];if((l[0]-s[0])*(a[1]-s[1])-(l[1]-s[1])*(a[0]-s[0])<=0)o.pop();else break}o.push(a)}return o}function Yn(e,t){if(e.geometry.type!=="Polygon"||t.length<2)return null;const n=e.geometry.coordinates[0];if(!n||n.length<4)return null;const r=[],o=n.length>1&&n[0][0]===n[n.length-1][0]&&n[0][1]===n[n.length-1][1]?n.length-1:n.length;for(let p=0;p<o;p++)r.push([n[p][0],n[p][1]]);const a=[];for(let p=0;p<t.length-1;p++){const g=t[p],m=t[p+1];for(let x=0;x<r.length;x++){const v=(x+1)%r.length,L=r[x],k=r[v],b=J1(g,m,L,k);b&&a.push({edgeIndex:x,point:b,t:p})}}if(a.length<2)return null;a.sort((p,g)=>p.edgeIndex-g.edgeIndex);const s=a[0],l=a[a.length-1],c=[],d=[];c.push(s.point);for(let p=s.edgeIndex+1;p<=l.edgeIndex;p++)c.push(r[p%r.length]);c.push(l.point),c.push(s.point),d.push(l.point);for(let p=l.edgeIndex+1;p<r.length;p++)d.push(r[p]);for(let p=0;p<=s.edgeIndex;p++)d.push(r[p]);if(d.push(s.point),d.push(l.point),c.length<4||d.length<4)return null;const h={type:"Polygon",coordinates:[c]},f={type:"Polygon",coordinates:[d]};return[Fe(h,"polygon"),Fe(f,"polygon")]}function J1(e,t,n,r,o=!1){const a=t[0]-e[0],s=t[1]-e[1],l=r[0]-n[0],c=r[1]-n[1],d=a*c-s*l;if(Math.abs(d)<1e-12)return null;const h=((n[0]-e[0])*c-(n[1]-e[1])*l)/d,f=((n[0]-e[0])*s-(n[1]-e[1])*a)/d;if(o){if(h<=1e-6||h>=1-1e-6||f<=1e-6||f>=1-1e-6)return null}else if(h<0||h>1||f<0||f>1)return null;return[e[0]+h*a,e[1]+h*s]}const Je={type:"FeatureCollection",features:[]},be="aimap-draw-";class Xn{constructor(t,n,r){this.featurePointLayer=null,this.featureLineLayer=null,this.featurePolygonLayer=null,this.featurePolygonOutlineLayer=null,this.drawingLineLayer=null,this.drawingDashLineLayer=null,this.drawingPolygonLayer=null,this.drawingPointLayer=null,this.selectionPolygonLayer=null,this.selectionLineLayer=null,this.selectionPointLayer=null,this.vertexLayer=null,this.midpointLayer=null,this.snapIndicatorLayer=null,this.mergeHighlightLayer=null,this.mergeHighlightOutlineLayer=null,this.splitHighlightLayer=null,this.splitHighlightOutlineLayer=null,this.tooltipEl=null,this.containerEl=null,this.hiddenFeatureId=null,this.allFeatures=[],this.onFeatureClick=null,this.onFeatureMouseDown=null,this.onVertexClick=null,this.onVertexRightClick=null,this.onEmptyClick=null,this.onMidpointClick=null,this.editClickHandlersBound=!1,this.scene=t,this.mapsService=r,this.styles={point:{...Se.point,...n==null?void 0:n.point},line:{...Se.line,...n==null?void 0:n.line},polygon:{...Se.polygon,...n==null?void 0:n.polygon},drawing:{...Se.drawing,...n==null?void 0:n.drawing},selected:{...Se.selected,...n==null?void 0:n.selected},vertex:{...Se.vertex,...n==null?void 0:n.vertex}};try{this.initTooltip()}catch{}}removeAndDestroy(t){var n;if(t){try{this.scene.removeLayer(t)}catch{}try{(n=t.destroy)==null||n.call(t)}catch{}}}addLayerWithRender(t){t.once("inited",()=>{try{this.scene.render()}catch{}}),this.scene.addLayer(t)}initTooltip(){const t=document.createElement("div");t.style.cssText=["position:fixed","pointer-events:none","z-index:9999","padding:6px 10px","border-radius:4px","background:rgba(26,27,34,0.92)","color:#f2eff9",'font:500 11px/16px "JetBrains Mono",monospace',"letter-spacing:0.02em","white-space:nowrap","display:none","flex-direction:column","gap:2px","box-shadow:0 2px 8px rgba(0,0,0,0.3)"].join(";"),document.body.appendChild(t),this.tooltipEl=t,this.containerEl=null}showTooltip(t,n,r,o){if(!this.tooltipEl)return;this.tooltipEl.innerHTML="";const a=document.createElement("div");if(a.textContent=t,a.style.cssText="color:#f2eff9;font-size:11px;line-height:16px;",this.tooltipEl.appendChild(a),o&&o.length>0){const s=document.createElement("div");s.style.cssText="display:flex;gap:8px;";for(const l of o){const c=document.createElement("span");c.textContent=l,c.style.cssText="font-size:9px;line-height:12px;color:#ffc107;font-weight:600;",s.appendChild(c)}this.tooltipEl.appendChild(s)}this.tooltipEl.style.display="flex",this.tooltipEl.style.left=`${n+16}px`,this.tooltipEl.style.top=`${r-8}px`}showSnapTooltip(t,n,r,o,a){if(!this.tooltipEl)return;this.tooltipEl.innerHTML="";const s=document.createElement("div");s.style.cssText="display:flex;gap:6px;align-items:center;";const l=document.createElement("span");l.textContent=t==="vertex"?"Vertex":"Edge",l.style.cssText="color:#ffc107;font-weight:700;font-size:10px;",s.appendChild(l);const c=document.createElement("span");c.textContent=`${r.toFixed(4)}, ${n.toFixed(4)}`,c.style.cssText="color:rgba(242,239,249,0.6);font-size:10px;",s.appendChild(c),this.tooltipEl.appendChild(s),this.tooltipEl.style.display="flex",this.tooltipEl.style.left=`${o+16}px`,this.tooltipEl.style.top=`${a-8}px`}hideTooltip(){this.tooltipEl&&(this.tooltipEl.style.display="none")}destroyTooltip(){var t;this.tooltipEl&&((t=this.tooltipEl.parentElement)==null||t.removeChild(this.tooltipEl),this.tooltipEl=null)}updateFeatures(t){this.scene&&(this.allFeatures=t,this.renderFeatures())}hideFeatureFromStatic(t){this.hiddenFeatureId=t,this.renderFeatures()}showAllFeatures(){this.hiddenFeatureId=null,this.renderFeatures()}renderFeatures(){const t=this.hiddenFeatureId?this.allFeatures.filter(s=>s.id!==this.hiddenFeatureId):this.allFeatures,n=this.styles;this.removeAndDestroy(this.featurePointLayer);const r=t.filter(s=>s.geometry.type==="Point").map(s=>{const l=s.geometry.coordinates;return{lng:l[0],lat:l[1],id:s.id,drawType:s.properties.drawType}});this.featurePointLayer=new ge.PointLayer({name:`${be}feature-point`,zIndex:12}).source(r,{parser:{type:"json",x:"lng",y:"lat"}}).shape("circle").color(n.point.color).size(n.point.size).style({stroke:n.point.strokeColor,strokeWidth:n.point.strokeWidth}),this.addLayerWithRender(this.featurePointLayer),this.removeAndDestroy(this.featureLineLayer),this.featureLineLayer=new ge.LineLayer({name:`${be}feature-line`,zIndex:11}).source(On(t)).shape("line").color(n.line.color).size(n.line.size).style({opacity:n.line.opacity}),this.addLayerWithRender(this.featureLineLayer),this.removeAndDestroy(this.featurePolygonLayer),this.featurePolygonLayer=new ge.PolygonLayer({name:`${be}feature-polygon`,zIndex:10}).source(Bn(t)).shape("fill").color(n.polygon.fill).style({opacity:n.polygon.fillOpacity}),this.addLayerWithRender(this.featurePolygonLayer),this.removeAndDestroy(this.featurePolygonOutlineLayer);const o=t.filter(s=>s.geometry.type==="Polygon"),a=o.length>0?{type:"FeatureCollection",features:o.map(s=>({type:"Feature",geometry:{type:"LineString",coordinates:s.geometry.coordinates[0]},properties:s.properties}))}:Je;this.featurePolygonOutlineLayer=new ge.LineLayer({name:`${be}feature-polygon-outline`,zIndex:10}).source(a).shape("line").color(n.polygon.stroke).size(n.polygon.strokeWidth).style({opacity:1}),this.addLayerWithRender(this.featurePolygonOutlineLayer),this.editClickHandlersBound&&this.rebindEditClickHandlers()}showDrawingFeedback(t,n,r,o){if(!this.scene||r==="point")return;const a=this.styles;let s=Je,l=Je,c=Je,d=[];if(r==="rectangle"&&o&&n){const g=Y1(o,n);c={type:"FeatureCollection",features:[{type:"Feature",geometry:g,properties:{}}]},s={type:"FeatureCollection",features:[{type:"Feature",geometry:{type:"LineString",coordinates:g.coordinates[0]},properties:{}}]}}else if(r==="circle"&&o&&n){const m=V=>V*Math.PI/180,x=m(n[1]-o[1]),v=m(n[0]-o[0]),L=Math.sin(x/2)**2+Math.cos(m(o[1]))*Math.cos(m(n[1]))*Math.sin(v/2)**2,b=6371e3*(2*Math.atan2(Math.sqrt(L),Math.sqrt(1-L))),z=X1(o,Math.max(b,1));c={type:"FeatureCollection",features:[{type:"Feature",geometry:z,properties:{}}]},s={type:"FeatureCollection",features:[{type:"Feature",geometry:{type:"LineString",coordinates:z.coordinates[0]},properties:{}}]},d=[{lng:o[0],lat:o[1],vertexIndex:0}]}else if((r==="polyline"||r==="polygon")&&t.length>0){if(t.length>=2&&(s={type:"FeatureCollection",features:[{type:"Feature",geometry:U1(t),properties:{}}]}),n&&t.length>=1){const g=t[t.length-1],m=[{type:"Feature",geometry:{type:"LineString",coordinates:[[g[0],g[1]],[n[0],n[1]]]},properties:{}}];r==="polygon"&&t.length>=2&&m.push({type:"Feature",geometry:{type:"LineString",coordinates:[[n[0],n[1]],[t[0][0],t[0][1]]]},properties:{}}),l={type:"FeatureCollection",features:m}}if(r==="polygon"&&t.length>=2&&n){const g=[...t,n];g.length>=3&&(c={type:"FeatureCollection",features:[{type:"Feature",geometry:q1(g),properties:{}}]})}d=t.map(([g,m],x)=>({lng:g,lat:m,vertexIndex:x,isFirst:x===0}))}this.drawingLineLayer?this.drawingLineLayer.setData(s):(this.drawingLineLayer=new ge.LineLayer({name:`${be}drawing-line`,zIndex:13}).source(s).shape("line").color(a.drawing.stroke).size(a.drawing.strokeWidth).style({opacity:1}),this.addLayerWithRender(this.drawingLineLayer));const h=a.drawing.dashArray??[4,4],f=a.drawing.dashStroke??a.drawing.stroke,p=a.drawing.dashWidth??1.5;this.drawingDashLineLayer?this.drawingDashLineLayer.setData(l):(this.drawingDashLineLayer=new ge.LineLayer({name:`${be}drawing-dash-line`,zIndex:14}).source(l).shape("line").color(f).size(p).style({opacity:1,lineType:"dash",dashArray:h}),this.addLayerWithRender(this.drawingDashLineLayer)),this.drawingPolygonLayer?this.drawingPolygonLayer.setData(c):(this.drawingPolygonLayer=new ge.PolygonLayer({name:`${be}drawing-polygon`,zIndex:13}).source(c).shape("fill").color(a.drawing.fill).style({opacity:a.drawing.fillOpacity}),this.addLayerWithRender(this.drawingPolygonLayer)),this.drawingPointLayer?this.drawingPointLayer.setData(d):(this.drawingPointLayer=new ge.PointLayer({name:`${be}drawing-point`,zIndex:15}).source(d,{parser:{type:"json",x:"lng",y:"lat"}}).shape("circle").color(a.vertex.color).size(a.vertex.size).style({stroke:a.vertex.strokeColor,strokeWidth:a.vertex.strokeWidth}),this.addLayerWithRender(this.drawingPointLayer))}clearDrawingFeedback(){this.removeAndDestroy(this.drawingLineLayer),this.removeAndDestroy(this.drawingDashLineLayer),this.removeAndDestroy(this.drawingPolygonLayer),this.removeAndDestroy(this.drawingPointLayer),this.drawingLineLayer=null,this.drawingDashLineLayer=null,this.drawingPolygonLayer=null,this.drawingPointLayer=null}removeDrawingLayers(){this.clearDrawingFeedback()}updateSelectionHighlight(t){var a,s,l;if(!this.scene)return;const n=this.styles;if(this.removeAndDestroy(this.selectionPolygonLayer),this.removeAndDestroy(this.selectionLineLayer),this.removeAndDestroy(this.selectionPointLayer),!t){this.selectionPolygonLayer=null,this.selectionLineLayer=null,this.selectionPointLayer=null;return}const r={type:"FeatureCollection",features:[t]},o=n.selected.dashArray??[6,3];if(t.geometry.type==="Point")this.selectionPointLayer=new ge.PointLayer({name:`${be}selection-point`,zIndex:15}).source([{lng:t.geometry.coordinates[0],lat:t.geometry.coordinates[1],id:t.id}],{parser:{type:"json",x:"lng",y:"lat"}}).shape("circle").color(n.selected.stroke).size((n.point.size??6)+4).style({stroke:n.selected.stroke,strokeWidth:n.selected.strokeWidth}),this.addLayerWithRender(this.selectionPointLayer);else if(t.geometry.type==="LineString")this.selectionLineLayer=new ge.LineLayer({name:`${be}selection-line`,zIndex:15}).source(r).shape("line").color(n.selected.stroke).size(n.selected.strokeWidth).style({opacity:1,lineType:"dash",dashArray:o}),this.addLayerWithRender(this.selectionLineLayer);else if(t.geometry.type==="Polygon"){this.selectionPolygonLayer=new ge.PolygonLayer({name:`${be}selection-polygon`,zIndex:15}).source(r).shape("fill").color(n.selected.fill).style({opacity:n.selected.fillOpacity}),this.addLayerWithRender(this.selectionPolygonLayer);const c={type:"FeatureCollection",features:[{type:"Feature",geometry:{type:"LineString",coordinates:t.geometry.coordinates[0]},properties:{}}]};this.selectionLineLayer=new ge.LineLayer({name:`${be}selection-line`,zIndex:15}).source(c).shape("line").color(n.selected.stroke).size(n.selected.strokeWidth).style({opacity:1,lineType:"dash",dashArray:o}),this.addLayerWithRender(this.selectionLineLayer)}if(this.editClickHandlersBound&&this.onFeatureMouseDown){const c=d=>{var f;const h=d.feature;if(h&&this.onFeatureMouseDown){const p=((f=h.properties)==null?void 0:f.id)??h.id;if(p){const g=d.lngLat??d.lnglat;let m=[0,0];if(g&&typeof g=="object"){const x=g;m=[x.lng??x.x??0,x.lat??x.y??0]}this.onFeatureMouseDown(String(p),m)}}};(a=this.selectionPolygonLayer)==null||a.on("mousedown",c),(s=this.selectionLineLayer)==null||s.on("mousedown",c),(l=this.selectionPointLayer)==null||l.on("mousedown",c)}}clearSelectionHighlight(){this.removeAndDestroy(this.selectionPolygonLayer),this.removeAndDestroy(this.selectionLineLayer),this.removeAndDestroy(this.selectionPointLayer),this.selectionPolygonLayer=null,this.selectionLineLayer=null,this.selectionPointLayer=null}removeSelectionLayers(){this.clearSelectionHighlight()}highlightMergeSelected(t,n){if(!this.scene)return;const r=this.styles;if(this.removeAndDestroy(this.mergeHighlightLayer),this.removeAndDestroy(this.mergeHighlightOutlineLayer),this.mergeHighlightLayer=null,this.mergeHighlightOutlineLayer=null,t.length===0)return;const o=n.filter(l=>t.includes(l.id));if(o.length===0)return;const a={type:"FeatureCollection",features:o};this.mergeHighlightLayer=new ge.PolygonLayer({name:`${be}merge-highlight`,zIndex:15}).source(a).shape("fill").color(r.selected.fill).style({opacity:r.selected.fillOpacity}),this.addLayerWithRender(this.mergeHighlightLayer);const s=o.filter(l=>l.geometry.type==="Polygon").map(l=>({type:"Feature",geometry:{type:"LineString",coordinates:l.geometry.coordinates[0]},properties:{}}));if(s.length>0){const l={type:"FeatureCollection",features:s};this.mergeHighlightOutlineLayer=new ge.LineLayer({name:`${be}merge-highlight-outline`,zIndex:15}).source(l).shape("line").color(r.selected.stroke).size(r.selected.strokeWidth).style({opacity:1,lineType:"dash",dashArray:r.selected.dashArray??[6,3]}),this.addLayerWithRender(this.mergeHighlightOutlineLayer)}}clearMergeHighlight(){this.removeAndDestroy(this.mergeHighlightLayer),this.removeAndDestroy(this.mergeHighlightOutlineLayer),this.mergeHighlightLayer=null,this.mergeHighlightOutlineLayer=null}highlightSplitTarget(t,n){if(!this.scene)return;const r=this.styles;this.removeAndDestroy(this.splitHighlightLayer),this.removeAndDestroy(this.splitHighlightOutlineLayer),this.splitHighlightLayer=null,this.splitHighlightOutlineLayer=null;const o=n.find(l=>l.id===t);if(!o)return;const a={type:"FeatureCollection",features:[o]};this.splitHighlightLayer=new ge.PolygonLayer({name:`${be}split-highlight`,zIndex:15}).source(a).shape("fill").color(r.selected.fill).style({opacity:r.selected.fillOpacity}),this.addLayerWithRender(this.splitHighlightLayer);const s={type:"FeatureCollection",features:[{type:"Feature",geometry:{type:"LineString",coordinates:o.geometry.coordinates[0]},properties:{}}]};this.splitHighlightOutlineLayer=new ge.LineLayer({name:`${be}split-highlight-outline`,zIndex:15}).source(s).shape("line").color(r.selected.stroke).size(r.selected.strokeWidth).style({opacity:1,lineType:"dash",dashArray:r.selected.dashArray??[6,3]}),this.addLayerWithRender(this.splitHighlightOutlineLayer)}clearSplitHighlight(){this.removeAndDestroy(this.splitHighlightLayer),this.removeAndDestroy(this.splitHighlightOutlineLayer),this.splitHighlightLayer=null,this.splitHighlightOutlineLayer=null}updateVertexHandles(t){if(!this.scene)return;const n=this.styles;if(this.removeAndDestroy(this.vertexLayer),this.removeAndDestroy(this.midpointLayer),!t){this.vertexLayer=null,this.midpointLayer=null;return}const r=rt(t);if(r.length===0){this.vertexLayer=null,this.midpointLayer=null;return}const o=r.map(([a,s],l)=>({lng:a,lat:s,vertexIndex:l,featureId:t.id}));if(this.vertexLayer=new ge.PointLayer({name:`${be}vertex-handles`,zIndex:16}).source(o,{parser:{type:"json",x:"lng",y:"lat"}}).shape("circle").color(n.vertex.color).size(n.vertex.size).style({stroke:n.vertex.strokeColor,strokeWidth:n.vertex.strokeWidth}),this.addLayerWithRender(this.vertexLayer),t.geometry.type==="LineString"||t.geometry.type==="Polygon"){const a=[],s=t.geometry.type==="Polygon"?r.length:r.length-1;for(let l=0;l<s;l++){const c=(l+1)%r.length;a.push({lng:(r[l][0]+r[c][0])/2,lat:(r[l][1]+r[c][1])/2,edgeIndex:l})}this.midpointLayer=new ge.PointLayer({name:`${be}midpoint-handles`,zIndex:16}).source(a,{parser:{type:"json",x:"lng",y:"lat"}}).shape("circle").color(n.vertex.strokeColor).size(n.vertex.size-1).style({stroke:n.vertex.strokeColor,strokeWidth:.5,opacity:.5}),this.addLayerWithRender(this.midpointLayer)}else this.midpointLayer=null;this.editClickHandlersBound&&this.rebindVertexAndMidpointEvents()}clearVertexHandles(){this.removeAndDestroy(this.vertexLayer),this.removeAndDestroy(this.midpointLayer),this.vertexLayer=null,this.midpointLayer=null}removeVertexLayer(){this.clearVertexHandles()}setupEditClickHandlers(t,n,r,o,a,s){this.onFeatureClick=t,this.onVertexClick=n,this.onEmptyClick=r,this.onVertexRightClick=o??null,this.onMidpointClick=a??null,this.onFeatureMouseDown=s??null,this.editClickHandlersBound=!0,this.rebindEditClickHandlers()}rebindEditClickHandlers(){var a,s,l,c,d,h,f,p,g,m,x,v,L,k,b,z,V,F,M,j,T,H,Z,E,N;const t=y=>{var I;const w=y.feature;if(w){const R=((I=w.properties)==null?void 0:I.id)??w.id;R&&this.onFeatureClick&&this.onFeatureClick(String(R))}},n=y=>{var I;const w=y.feature;if(w){const R=((I=w.properties)==null?void 0:I.id)??w.id;if(R&&this.onFeatureMouseDown){const _=y.lngLat??y.lnglat;let $=[0,0];if(_&&typeof _=="object"){const G=_;$=[G.lng??G.x??0,G.lat??G.y??0]}this.onFeatureMouseDown(String(R),$)}}};(a=this.featurePointLayer)==null||a.on("click",t),(s=this.featureLineLayer)==null||s.on("click",t),(l=this.featurePolygonLayer)==null||l.on("click",t),(c=this.featurePolygonOutlineLayer)==null||c.on("click",t),(d=this.featurePointLayer)==null||d.on("mousedown",n),(h=this.featureLineLayer)==null||h.on("mousedown",n),(f=this.featurePolygonLayer)==null||f.on("mousedown",n),(p=this.featurePolygonOutlineLayer)==null||p.on("mousedown",n);const r=()=>{this.setCursorClass("l7-draw-cursor-grab")},o=()=>{this.clearEditCursors(),this.hideTooltip()};(g=this.featurePointLayer)==null||g.on("mouseenter",r),(m=this.featurePointLayer)==null||m.on("mouseleave",o),(x=this.featureLineLayer)==null||x.on("mouseenter",r),(v=this.featureLineLayer)==null||v.on("mouseleave",o),(L=this.featurePolygonLayer)==null||L.on("mouseenter",r),(k=this.featurePolygonLayer)==null||k.on("mouseleave",o),(b=this.featurePolygonOutlineLayer)==null||b.on("mouseenter",r),(z=this.featurePolygonOutlineLayer)==null||z.on("mouseleave",o),(V=this.selectionPolygonLayer)==null||V.on("mousedown",n),(F=this.selectionLineLayer)==null||F.on("mousedown",n),(M=this.selectionPointLayer)==null||M.on("mousedown",n),(j=this.selectionPolygonLayer)==null||j.on("mouseenter",r),(T=this.selectionPolygonLayer)==null||T.on("mouseleave",o),(H=this.selectionLineLayer)==null||H.on("mouseenter",r),(Z=this.selectionLineLayer)==null||Z.on("mouseleave",o),(E=this.selectionPointLayer)==null||E.on("mouseenter",r),(N=this.selectionPointLayer)==null||N.on("mouseleave",o),this.rebindVertexAndMidpointEvents()}extractClientXY(t){var s,l,c,d;const n=t.originalEvent??t.originEvent??t.e;if(n&&typeof n.clientX=="number"&&typeof n.clientY=="number")return[n.clientX,n.clientY];const r=t.x,o=t.y;if(r!==void 0&&o!==void 0){const h=(l=(s=this.mapsService)==null?void 0:s.getContainer)==null?void 0:l.call(s);if(h){const f=h.getBoundingClientRect();return[r+f.left,o+f.top]}}const a=t.pixel;if(a){const h=(d=(c=this.mapsService)==null?void 0:c.getContainer)==null?void 0:d.call(c);if(h){const f=h.getBoundingClientRect();return[(a.x??0)+f.left,(a.y??0)+f.top]}}return[0,0]}extractFeatureProp(t,n){const r=t.properties;return r&&r[n]!==void 0?r[n]:t[n]}setCursorClass(t){var r,o;const n=(o=(r=this.mapsService)==null?void 0:r.getContainer)==null?void 0:o.call(r);n&&(n.classList.remove("l7-draw-cursor-pointer","l7-draw-cursor-grab","l7-draw-cursor-move"),t&&n.classList.add(t))}clearEditCursors(){var n,r;const t=(r=(n=this.mapsService)==null?void 0:n.getContainer)==null?void 0:r.call(n);t&&t.classList.remove("l7-draw-cursor-pointer","l7-draw-cursor-grab","l7-draw-cursor-move")}rebindVertexAndMidpointEvents(){var t,n,r,o,a,s,l,c,d;(t=this.vertexLayer)==null||t.on("mouseenter",()=>{this.setCursorClass("l7-draw-cursor-pointer")}),(n=this.vertexLayer)==null||n.on("mousemove",h=>{const[f,p]=this.extractClientXY(h);(f||p)&&this.showTooltip("拖拽移动顶点,右键删除",f,p)}),(r=this.vertexLayer)==null||r.on("mouseleave",()=>{this.clearEditCursors(),this.hideTooltip()}),(o=this.midpointLayer)==null||o.on("mouseenter",()=>{this.setCursorClass("l7-draw-cursor-pointer")}),(a=this.midpointLayer)==null||a.on("mousemove",h=>{const[f,p]=this.extractClientXY(h);(f||p)&&this.showTooltip("单击添加新顶点",f,p)}),(s=this.midpointLayer)==null||s.on("mouseleave",()=>{this.clearEditCursors(),this.hideTooltip()}),(l=this.vertexLayer)==null||l.on("mousedown",h=>{var p,g,m,x;const f=h.feature;if(f&&this.onVertexClick){const v=this.extractFeatureProp(f,"vertexIndex");v!==void 0&&((g=(p=this.mapsService)==null?void 0:p.setMapStatus)==null||g.call(p,{dragEnable:!1,zoomEnable:!1}),(x=(m=h.originalEvent)==null?void 0:m.stopPropagation)==null||x.call(m),this.onVertexClick(v))}}),(c=this.vertexLayer)==null||c.on("contextmenu",h=>{var p,g;const f=h.feature;if(f&&this.onVertexRightClick){const m=this.extractFeatureProp(f,"vertexIndex");m!==void 0&&((g=(p=h.originalEvent)==null?void 0:p.preventDefault)==null||g.call(p),this.onVertexRightClick(m))}}),(d=this.midpointLayer)==null||d.on("click",h=>{const f=h.feature;if(f&&this.onMidpointClick){const p=this.extractFeatureProp(f,"edgeIndex"),g=this.extractFeatureProp(f,"lng"),m=this.extractFeatureProp(f,"lat");p!==void 0&&g!==void 0&&m!==void 0&&this.onMidpointClick(p,[g,m])}})}removeEditClickHandlers(){this.onFeatureClick=null,this.onVertexClick=null,this.onVertexRightClick=null,this.onEmptyClick=null,this.onMidpointClick=null,this.editClickHandlersBound=!1}showSnapIndicator(t,n,r){if(!this.scene)return;const o="#ffc107",a=r==="vertex"?8:6;this.removeAndDestroy(this.snapIndicatorLayer),this.snapIndicatorLayer=new ge.PointLayer({name:`${be}snap-indicator`,zIndex:20}).source([{lng:t,lat:n}],{parser:{type:"json",x:"lng",y:"lat"}}).shape("square").color(o).size(a).style({stroke:o,strokeWidth:1.5,opacity:.9}),this.addLayerWithRender(this.snapIndicatorLayer)}hideSnapIndicator(){this.removeAndDestroy(this.snapIndicatorLayer),this.snapIndicatorLayer=null}destroy(){this.removeEditClickHandlers(),this.destroyTooltip();const t=[this.featurePointLayer,this.featureLineLayer,this.featurePolygonLayer,this.featurePolygonOutlineLayer,this.drawingLineLayer,this.drawingDashLineLayer,this.drawingPolygonLayer,this.drawingPointLayer,this.selectionPolygonLayer,this.selectionLineLayer,this.selectionPointLayer,this.vertexLayer,this.midpointLayer,this.snapIndicatorLayer];for(const n of t)this.removeAndDestroy(n);this.featurePointLayer=null,this.featureLineLayer=null,this.featurePolygonLayer=null,this.featurePolygonOutlineLayer=null,this.drawingLineLayer=null,this.drawingDashLineLayer=null,this.drawingPolygonLayer=null,this.drawingPointLayer=null,this.selectionPolygonLayer=null,this.selectionLineLayer=null,this.selectionPointLayer=null,this.vertexLayer=null,this.midpointLayer=null,this.snapIndicatorLayer=null}}const lt={enabled:!0,threshold:8,vertex:!0,edge:!0};function Gn(e){return e===!1?{...lt,enabled:!1}:e===!0||e===void 0?{...lt}:{...lt,...e}}function Jn(e,t,n,r,o){if(!n.enabled||t.length===0)return{snapped:!1,lng:e[0],lat:e[1],type:"none"};const a=r(e);if(!a)return{snapped:!1,lng:e[0],lat:e[1],type:"none"};const s=n.threshold;let l=1/0,c={snapped:!1,lng:e[0],lat:e[1],type:"none"};for(const d of t){if(d.id===o)continue;const h=rt(d);if(h.length!==0){if(n.vertex)for(let f=0;f<h.length;f++){const p=r(h[f]);if(!p)continue;const g=a.x-p.x,m=a.y-p.y,x=Math.sqrt(g*g+m*m);x<s&&x<l&&(l=x,c={snapped:!0,lng:h[f][0],lat:h[f][1],type:"vertex",featureId:d.id,vertexIndex:f})}if(n.edge&&c.type!=="vertex"){const f=d.geometry.type==="Polygon"?h.length:Math.max(0,h.length-1);for(let p=0;p<f;p++){const g=(p+1)%h.length,m=r(h[p]),x=r(h[g]);if(!m||!x)continue;const v=Kn(a,m,x);if(v.t>=0&&v.t<=1&&v.dist<s&&v.dist<l){const L=v.t,k=h[p][0]+L*(h[g][0]-h[p][0]),b=h[p][1]+L*(h[g][1]-h[p][1]);l=v.dist,c={snapped:!0,lng:k,lat:b,type:"edge",featureId:d.id,edgeIndex:p}}}}}}return c}function Kn(e,t,n){const r=n.x-t.x,o=n.y-t.y,a=r*r+o*o;if(a===0)return{t:0,dist:Math.sqrt((e.x-t.x)**2+(e.y-t.y)**2)};let s=((e.x-t.x)*r+(e.y-t.y)*o)/a;s=Math.max(0,Math.min(1,s));const l=t.x+s*r,c=t.y+s*o,d=Math.sqrt((e.x-l)**2+(e.y-c)**2);return{t:s,dist:d}}const Qn=5;function Ne(e){const t=e.originalEvent??e.originEvent??e.e;return(t==null?void 0:t.clientX)??e.x??0}function Ie(e){const t=e.originalEvent??e.originEvent??e.e;return(t==null?void 0:t.clientY)??e.y??0}function Xt(e,t,n){const r=De(e);if(!r)return null;const o=n(r);if(!o){for(const s of t)if(s.geometry.type==="Polygon"&&Jt(r,s.geometry.coordinates[0]))return s;return null}const a=8;for(const s of t)if(s.geometry.type==="Polygon"){if(Jt(r,s.geometry.coordinates[0]))return s;const l=s.geometry.coordinates[0];for(let c=0;c<l.length-1;c++)if(Gt(o,l[c],l[c+1],n)<=a)return s}else if(s.geometry.type==="Point"){const l=s.geometry.coordinates,c=n(l);if(c){const d=c.x-o.x,h=c.y-o.y;if(Math.sqrt(d*d+h*h)<=a)return s}}else if(s.geometry.type==="LineString"){const l=s.geometry.coordinates;for(let c=0;c<l.length-1;c++)if(Gt(o,l[c],l[c+1],n)<=a)return s}return null}function Gt(e,t,n,r){const o=r(t),a=r(n);if(!o||!a)return 1/0;const s=a.x-o.x,l=a.y-o.y,c=s*s+l*l;if(c===0){const m=e.x-o.x,x=e.y-o.y;return Math.sqrt(m*m+x*x)}const d=Math.max(0,Math.min(1,((e.x-o.x)*s+(e.y-o.y)*l)/c)),h=o.x+d*s,f=o.y+d*l,p=e.x-h,g=e.y-f;return Math.sqrt(p*p+g*g)}function Jt(e,t){let n=!1;for(let r=0,o=t.length-1;r<t.length;o=r++){const a=t[r][0],s=t[r][1],l=t[o][0],c=t[o][1];s>e[1]!=c>e[1]&&e[0]<(l-a)*(e[1]-s)/(c-s)+a&&(n=!n)}return n}function Kt(e,t,n){const r=n[0]-t[0],o=n[1]-t[1],a=r*r+o*o;if(a===0){const d=Math.sqrt((e[0]-t[0])**2+(e[1]-t[1])**2);return{point:t,t:0,dist:d}}let s=((e[0]-t[0])*r+(e[1]-t[1])*o)/a;s=Math.max(0,Math.min(1,s));const l=[t[0]+s*r,t[1]+s*o],c=Math.sqrt((e[0]-l[0])**2+(e[1]-l[1])**2);return{point:l,t:s,dist:c}}function Qt(e,t,n){if(e.geometry.type!=="LineString")return null;const r=[...e.geometry.coordinates.map(o=>[...o])];return t<0||t>=r.length-1?null:(r.splice(t+1,0,n),{...e,geometry:{type:"LineString",coordinates:r},properties:{...e.properties}})}function e1(e,t,n){if(e.geometry.type!=="Polygon")return null;const r=e.geometry.coordinates.map(l=>l.map(c=>[...c])),o=r[0],a=o.length>1&&o[0][0]===o[o.length-1][0]&&o[0][1]===o[o.length-1][1]?o.length-1:o.length;if(t<0||t>=a)return null;const s=t+1;return o.splice(s,0,n),o[0][0]===o[o.length-2][0]&&(o[0][1],o[o.length-2][1]),o[o.length-1]=[o[0][0],o[0][1]],{...e,geometry:{type:"Polygon",coordinates:r},properties:{...e.properties}}}function er(e,t){if(e.geometry.type!=="LineString")return null;const n=e.geometry.coordinates.map(r=>[...r]);return n.length<=2||t<0||t>=n.length?null:(n.splice(t,1),{...e,geometry:{type:"LineString",coordinates:n},properties:{...e.properties}})}function tr(e,t){if(e.geometry.type!=="Polygon")return null;const n=e.geometry.coordinates.map(a=>a.map(s=>[...s])),r=n[0],o=r.length>1&&r[0][0]===r[r.length-1][0]&&r[0][1]===r[r.length-1][1]?r.length-1:r.length;return o<=3||t<0||t>=o?null:(r.splice(t,1),r[r.length-1]=[r[0][0],r[0][1]],{...e,geometry:{type:"Polygon",coordinates:n},properties:{...e.properties}})}function nr(e){const{scene:t,mapsService:n,styles:r,snap:o,defaultFeatures:a,features:s,onDrawCreate:l,onDrawUpdate:c,onDrawDelete:d,onDrawSelect:h,onModeChange:f,onChange:p}=e,g=u.useRef(Tn(a)),m=u.useRef(null),x=u.useMemo(()=>Nn(r),[r]),v=u.useMemo(()=>Gn(o),[o]),L=u.useRef({onDrawCreate:l,onDrawUpdate:c,onDrawDelete:d,onDrawSelect:h,onModeChange:f,onChange:p});L.current={onDrawCreate:l,onDrawUpdate:c,onDrawDelete:d,onDrawSelect:h,onModeChange:f,onChange:p};const k=u.useRef("none"),b=u.useRef(a?[...a]:[]),z=u.useRef(null),V=s!==void 0,F=u.useRef(null),M=u.useRef(null),j=u.useRef(null),T=u.useCallback(A=>{var C;if(!n)return null;try{const P=(C=n.lngLatToContainer)==null?void 0:C.call(n,[A[0],A[1]]);if(P)return{x:P.x??P[0],y:P.y??P[1]}}catch{}return null},[n]),H=u.useCallback(A=>{var C,P,S;b.current=A,g.current.features=A,(C=m.current)==null||C.updateFeatures(A),(S=(P=L.current).onChange)==null||S.call(P,A)},[]),Z=u.useCallback(A=>{var P,S;z.current=A,g.current.selectedFeatureId=A;const C=A?b.current.find(K=>K.id===A)??null:null;(S=(P=L.current).onDrawSelect)==null||S.call(P,C)},[]);u.useEffect(()=>{if(!t)return;const A=new Xn(t,x,n);return m.current=A,b.current.length>0&&A.updateFeatures(b.current),()=>{A.destroy(),m.current=null}},[t]);const E=u.useCallback(A=>{var oe,X,ne,W;const C=g.current,P=De(A);if(!P)return;const S=m.current;if(!S)return;const K=j.current,O=K!=null&&K.snapped?K.lng:P[0],Y=K!=null&&K.snapped?K.lat:P[1],te=k.current;if(te==="point"){const ae=Fe(Rn([O,Y]),"point"),de=[...b.current,ae];H(de),(X=(oe=L.current).onDrawCreate)==null||X.call(oe,[ae]);return}if(te==="polyline"){C.currentVertices.push([O,Y]),C.isDrawing=!0,S.showDrawingFeedback(C.currentVertices,C.mousePoint,te,C.startPoint);return}if(te==="polygon"){C.currentVertices.push([O,Y]),C.isDrawing=!0,S.showDrawingFeedback(C.currentVertices,C.mousePoint,te,C.startPoint);return}if(te==="circle"){if(!C.startPoint)C.startPoint=[O,Y],C.isDrawing=!0;else{const ae=Ut(C.startPoint,[O,Y]);if(ae>.5){const de=X1(C.startPoint,ae),ue=Fe(de,"circle"),me=[...b.current,ue];H(me),(W=(ne=L.current).onDrawCreate)==null||W.call(ne,[ue])}C.startPoint=null,C.isDrawing=!1,S.clearDrawingFeedback()}return}if(te==="merge"){const ae=Xt(A,b.current,T);if(ae&&(ae.geometry.type==="Polygon"||ae.properties.drawType==="circle")){const de=ae.id,ue=[...C.mergeSelectedIds],me=ue.indexOf(de);me>=0?ue.splice(me,1):ue.push(de),C.mergeSelectedIds=ue,S.highlightMergeSelected(ue,b.current),ue.length>=2?S.showTooltip(`已选中 ${ue.length} 个面,双击合并`,Ne(A),Ie(A),["[ESC] 取消"]):ue.length===1&&S.showTooltip("继续点击选中更多面",Ne(A),Ie(A),["[ESC] 取消"])}else C.mergeSelectedIds=[],S.highlightMergeSelected([],b.current),S.showTooltip("点击面要素选中",Ne(A),Ie(A),["[ESC] 取消"]);return}if(te==="split"){if(!C.splitTargetId){const ae=Xt(A,b.current,T);ae&&(ae.geometry.type==="Polygon"||ae.properties.drawType==="circle")?(C.splitTargetId=ae.id,S.highlightSplitTarget(ae.id,b.current),S.showTooltip("已选目标面,单击绘制切线起点",Ne(A),Ie(A),["[ESC] 取消"])):S.showTooltip("先点击选择要切分的面",Ne(A),Ie(A),["[ESC] 取消"]);return}C.currentVertices.push([O,Y]),C.isDrawing=!0,S.showDrawingFeedback(C.currentVertices,C.mousePoint,"polyline",C.startPoint),C.currentVertices.length===1?S.showTooltip("单击继续绘制切线,双击完成切分",Ne(A),Ie(A),["[ESC] 取消"]):S.showTooltip(`切线 ${C.currentVertices.length} 个顶点,双击完成切分`,Ne(A),Ie(A),["[ESC] 取消"]);return}},[H,T]),N=u.useCallback(A=>{var K,O,Y,te,oe,X,ne,W,ae,de,ue,me,ve,Ee,re,ce;const C=g.current,P=k.current,S=m.current;if(S){if(P==="edit"&&z.current){De(A);return}if(A.originalEvent&&((O=(K=A.originalEvent).preventDefault)==null||O.call(K),(te=(Y=A.originalEvent).stopPropagation)==null||te.call(Y)),P==="merge"){if(C.mergeSelectedIds.length>=2){const fe=b.current.filter(xe=>C.mergeSelectedIds.includes(xe.id)),he=Un(fe);if(he){const ze=[...b.current.filter(Ce=>!C.mergeSelectedIds.includes(Ce.id)),he];H(ze),(X=(oe=L.current).onDrawCreate)==null||X.call(oe,[he]),(W=(ne=L.current).onDrawDelete)==null||W.call(ne,fe[0])}C.mergeSelectedIds=[],S.highlightMergeSelected([],b.current),S.hideTooltip()}return}if(P==="split"&&C.splitTargetId&&C.currentVertices.length>=2){const fe=b.current.find(he=>he.id===C.splitTargetId);if(fe){const he=Yn(fe,C.currentVertices);if(he){const ze=[...b.current.filter(Ce=>Ce.id!==C.splitTargetId),...he];H(ze),(de=(ae=L.current).onDrawCreate)==null||de.call(ae,he),(me=(ue=L.current).onDrawDelete)==null||me.call(ue,fe)}}C.currentVertices=[],C.isDrawing=!1,C.mousePoint=null,C.splitTargetId=null,S.clearDrawingFeedback(),S.clearSplitHighlight(),S.hideTooltip();return}if(P==="polyline"&&C.currentVertices.length>=2){const fe=U1(C.currentVertices),he=Fe(fe,"polyline"),xe=[...b.current,he];H(xe),(Ee=(ve=L.current).onDrawCreate)==null||Ee.call(ve,[he]),C.currentVertices=[],C.isDrawing=!1,C.mousePoint=null,S.clearDrawingFeedback();return}if(P==="polygon"&&C.currentVertices.length>=3){const fe=q1(C.currentVertices),he=Fe(fe,"polygon"),xe=[...b.current,he];H(xe),(ce=(re=L.current).onDrawCreate)==null||ce.call(re,[he]),C.currentVertices=[],C.isDrawing=!1,C.mousePoint=null,S.clearDrawingFeedback();return}(P==="polyline"||P==="polygon")&&(C.currentVertices=[],C.isDrawing=!1,C.mousePoint=null,S.clearDrawingFeedback())}},[H]),y=u.useCallback(A=>{const C=g.current,P=De(A);if(!P)return;const[S,K]=P,O=m.current,Y=k.current,te=A.originalEvent??A.originEvent??A.e,oe=(te==null?void 0:te.clientX)??A.x??0,X=(te==null?void 0:te.clientY)??A.y??0;if(C.mousePoint=[S,K],O&&(oe||X)){const W=j.current;if((Y==="point"||Y==="polyline"||Y==="polygon"||Y==="circle"||Y==="rectangle")&&(W!=null&&W.snapped)&&W.type!=="none")O.showSnapTooltip(W.type,W.lng,W.lat,oe,X);else if(Y==="point")O.showTooltip("单击放置点",oe,X,["[ESC] 取消"]);else if(Y==="polyline")C.isDrawing?O.showTooltip("单击添加顶点,双击结束",oe,X,["[ESC] 取消"]):O.showTooltip("单击开始绘制线",oe,X,["[ESC] 取消"]);else if(Y==="polygon")C.isDrawing?C.currentVertices.length<3?O.showTooltip("单击添加顶点",oe,X,["[ESC] 取消"]):O.showTooltip("单击继续,双击闭合",oe,X,["[ESC] 取消"]):O.showTooltip("单击开始绘制面",oe,X,["[ESC] 取消"]);else if(Y==="rectangle")C.isDragging||O.showTooltip("按住拖拽绘制矩形",oe,X,["[SHIFT] 正方形","[ESC] 取消"]);else if(Y==="circle")if(!C.startPoint)O.showTooltip("单击设定圆心",oe,X,["[ESC] 取消"]);else{const de=Ut(C.startPoint,[S,K]),ue=de>1e3?`${(de/1e3).toFixed(1)} km`:`${Math.round(de)} m`;O.showTooltip(`半径 ${ue},单击完成`,oe,X,["[ESC] 取消"])}else Y==="merge"?C.mergeSelectedIds.length>=2?O.showTooltip(`已选中 ${C.mergeSelectedIds.length} 个面,双击合并`,oe,X,["[ESC] 取消"]):C.mergeSelectedIds.length===1?O.showTooltip("继续点击选中更多面",oe,X,["[ESC] 取消"]):O.showTooltip("点击面要素选中",oe,X,["[ESC] 取消"]):Y==="split"?C.splitTargetId?C.isDrawing?O.showTooltip(`切线 ${C.currentVertices.length} 个顶点,双击完成切分`,oe,X,["[ESC] 取消"]):O.showTooltip("单击绘制切线起点",oe,X,["[ESC] 取消"]):O.showTooltip("先点击选择要切分的面",oe,X,["[ESC] 取消"]):Y==="edit"||O.hideTooltip()}if((Y==="point"||Y==="polyline"||Y==="polygon"||Y==="circle")&&v.enabled&&O){const W=Jn([S,K],b.current,v,T);j.current=W,W.snapped&&W.type!=="none"?(O.showSnapIndicator(W.lng,W.lat,W.type),C.mousePoint=[W.lng,W.lat]):O.hideSnapIndicator()}else j.current=null,O==null||O.hideSnapIndicator();if((Y==="polyline"||Y==="polygon")&&C.isDrawing){O==null||O.showDrawingFeedback(C.currentVertices,C.mousePoint,Y,C.startPoint);return}if(Y==="circle"&&C.startPoint&&C.isDrawing){O==null||O.showDrawingFeedback(C.currentVertices,C.mousePoint,Y,C.startPoint);return}if(Y==="rectangle"&&C.isDragging&&C.startPoint){O==null||O.showDrawingFeedback(C.currentVertices,C.mousePoint,Y,C.startPoint);return}if(Y==="edit"&&C.isDragging&&C.selectedFeatureId&&C.dragVertexIndex!==null&&F.current){const W=b.current.find(ae=>ae.id===C.selectedFeatureId);if(W){const ae=_n(W,C.dragVertexIndex,S,K),de=b.current.map(ue=>ue.id===ae.id?ae:ue);H(de),O==null||O.updateVertexHandles(ae),O==null||O.updateSelectionHighlight(ae),F.current=[S,K]}return}if(Y==="edit"&&C.isDragging&&C.selectedFeatureId&&C.dragVertexIndex===null&&F.current){const[W,ae]=F.current,de=S-W,ue=K-ae;if(Math.abs(de)>1e-10||Math.abs(ue)>1e-10){const me=b.current.find(ve=>ve.id===C.selectedFeatureId);if(me){const ve=Dn(me,de,ue),Ee=b.current.map(re=>re.id===ve.id?ve:re);H(Ee),O==null||O.updateVertexHandles(ve),O==null||O.updateSelectionHighlight(ve),F.current=[S,K]}}return}},[H]),w=u.useCallback(A=>{var S,K;const C=g.current,P=k.current;if(n&&P==="rectangle"){const O=(S=n.getContainer)==null?void 0:S.call(n);if(!O)return;const Y=O.getBoundingClientRect(),te=A.clientX-Y.left,oe=A.clientY-Y.top,X=(K=n.containerToLngLat)==null?void 0:K.call(n,[te,oe]);if(!X)return;C.startPoint=[X.lng,X.lat],C.isDragging=!0,M.current={x:A.clientX,y:A.clientY},n.setMapStatus({dragEnable:!1,zoomEnable:!1});return}},[n]),I=u.useCallback(A=>{var K,O,Y,te,oe,X;const C=g.current,P=k.current,S=m.current;if(n){if(P==="rectangle"&&C.isDragging&&C.startPoint){const ne=(K=n.getContainer)==null?void 0:K.call(n);if(ne){const W=ne.getBoundingClientRect(),ae=A.clientX-W.left,de=A.clientY-W.top,ue=(O=n.containerToLngLat)==null?void 0:O.call(n,[ae,de]),me=M.current,ve=me?G1(me,{x:A.clientX,y:A.clientY}):1/0;if(ue&&ve>Qn){const Ee=[ue.lng,ue.lat],re=Y1(C.startPoint,Ee),ce=Fe(re,"rectangle"),fe=[...b.current,ce];H(fe),(te=(Y=L.current).onDrawCreate)==null||te.call(Y,[ce])}}C.startPoint=null,C.isDragging=!1,C.mousePoint=null,M.current=null,S==null||S.clearDrawingFeedback(),n.setMapStatus({dragEnable:!0,zoomEnable:!0});return}if(P==="edit"&&C.isDragging&&C.selectedFeatureId){n.setMapStatus({dragEnable:!0,zoomEnable:!0});const ne=b.current.find(W=>W.id===C.selectedFeatureId);ne&&((X=(oe=L.current).onDrawUpdate)==null||X.call(oe,ne)),C.isDragging=!1,C.dragVertexIndex=null,F.current=null;return}}},[n,H]),R=u.useCallback(A=>{var P,S,K;if(k.current!=="edit")return;const C=b.current.find(O=>O.id===A)??null;C&&(Z(A),(P=m.current)==null||P.hideFeatureFromStatic(A),(S=m.current)==null||S.updateSelectionHighlight(C),(K=m.current)==null||K.updateVertexHandles(C))},[Z]),_=u.useCallback(A=>{if(k.current!=="edit"||!n||!z.current)return;const C=g.current,P=b.current.find(K=>K.id===z.current);if(!P)return;const S=rt(P);A>=0&&A<S.length&&(F.current=S[A]),C.isDragging=!0,C.dragVertexIndex=A,n.setMapStatus({dragEnable:!1,zoomEnable:!1})},[n]),$=u.useCallback((A,C)=>{if(k.current!=="edit")return;const P=g.current;P.isDragging||!b.current.find(K=>K.id===A)||P.selectedFeatureId===A&&(P.isDragging=!0,P.dragVertexIndex=null,F.current=C,n.setMapStatus({dragEnable:!1,zoomEnable:!1}))},[n]),G=u.useCallback(A=>{var S,K,O,Y;if(k.current!=="edit"||!z.current)return;const C=b.current.find(te=>te.id===z.current);if(!C)return;let P=null;if(C.geometry.type==="LineString"?P=er(C,A):C.geometry.type==="Polygon"&&(P=tr(C,A)),P){const te=b.current.map(oe=>oe.id===P.id?P:oe);H(te),(K=(S=L.current).onDrawUpdate)==null||K.call(S,P),(O=m.current)==null||O.updateVertexHandles(P),(Y=m.current)==null||Y.updateSelectionHighlight(P)}},[H]);u.useCallback(A=>{var K,O,Y,te;if(k.current!=="edit"||!z.current)return;const C=b.current.find(oe=>oe.id===z.current);if(!C)return;const P=rt(C);let S=null;if(C.geometry.type==="LineString"&&P.length>=2){let oe=-1,X=1/0;for(let ne=0;ne<P.length-1;ne++){const{dist:W}=Kt(A,P[ne],P[ne+1]);W<X&&(X=W,oe=ne)}oe>=0&&X<.001&&(S=Qt(C,oe,A))}else if(C.geometry.type==="Polygon"&&P.length>=3){let oe=-1,X=1/0;for(let ne=0;ne<P.length;ne++){const W=(ne+1)%P.length,{dist:ae}=Kt(A,P[ne],P[W]);ae<X&&(X=ae,oe=ne)}oe>=0&&X<.001&&(S=e1(C,oe,A))}if(S){const oe=b.current.map(X=>X.id===S.id?S:X);H(oe),(O=(K=L.current).onDrawUpdate)==null||O.call(K,S),(Y=m.current)==null||Y.updateVertexHandles(S),(te=m.current)==null||te.updateSelectionHighlight(S)}},[H]);const Q=u.useCallback((A,C)=>{var K,O,Y,te;if(k.current!=="edit"||!z.current)return;const P=b.current.find(oe=>oe.id===z.current);if(!P)return;let S=null;if(P.geometry.type==="LineString"?S=Qt(P,A,C):P.geometry.type==="Polygon"&&(S=e1(P,A,C)),S){const oe=b.current.map(X=>X.id===S.id?S:X);H(oe),(O=(K=L.current).onDrawUpdate)==null||O.call(K,S),(Y=m.current)==null||Y.updateVertexHandles(S),(te=m.current)==null||te.updateSelectionHighlight(S)}},[H]),U=u.useCallback(()=>{var A,C,P;k.current==="edit"&&z.current&&(Z(null),(A=m.current)==null||A.showAllFeatures(),(C=m.current)==null||C.clearSelectionHighlight(),(P=m.current)==null||P.clearVertexHandles())},[Z]),q=u.useCallback(A=>{var K,O,Y,te,oe,X,ne;const C=k.current;if(C===A)return;const P=g.current,S=m.current;if(P.isDrawing&&(P.currentVertices=[],P.startPoint=null,P.mousePoint=null,P.isDrawing=!1,S==null||S.clearDrawingFeedback(),S==null||S.removeDrawingLayers()),C==="merge"&&(P.mergeSelectedIds=[],S==null||S.clearMergeHighlight(),S==null||S.hideTooltip()),C==="split"&&(P.splitTargetId=null,P.currentVertices=[],P.isDrawing=!1,S==null||S.clearDrawingFeedback(),S==null||S.clearSplitHighlight(),S==null||S.hideTooltip()),C==="edit"&&(Z(null),S==null||S.showAllFeatures(),S==null||S.clearSelectionHighlight(),S==null||S.clearVertexHandles(),S==null||S.removeSelectionLayers(),S==null||S.removeVertexLayer(),S==null||S.removeEditClickHandlers(),S==null||S.clearEditCursors(),S==null||S.hideTooltip(),n&&n.setMapStatus({doubleClickZoom:!0})),C!=="edit"&&C!=="none"&&C!=="merge"&&C!=="split"){S==null||S.removeDrawingLayers(),S==null||S.hideTooltip(),n&&n.setMapStatus({doubleClickZoom:!0});const W=(K=n==null?void 0:n.getContainer)==null?void 0:K.call(n);W&&W.classList.remove("l7-draw-cursor-crosshair")}if(k.current=A,P.mode=A,A==="merge"){P.mergeSelectedIds=[];const W=(O=n==null?void 0:n.getContainer)==null?void 0:O.call(n);W&&W.classList.add("l7-draw-cursor-crosshair")}else if(A==="split"){P.splitTargetId=null,P.currentVertices=[],P.isDrawing=!1,n&&n.setMapStatus({doubleClickZoom:!1});const W=(Y=n==null?void 0:n.getContainer)==null?void 0:Y.call(n);W&&W.classList.add("l7-draw-cursor-crosshair")}else if(A==="edit")S==null||S.setupEditClickHandlers(R,_,U,G,Q,$),n&&n.setMapStatus({doubleClickZoom:!1});else if(A!=="none"){n&&(A==="polyline"||A==="polygon")&&n.setMapStatus({doubleClickZoom:!1});const W=(te=n==null?void 0:n.getContainer)==null?void 0:te.call(n);W&&W.classList.add("l7-draw-cursor-crosshair")}else{const W=(oe=n==null?void 0:n.getContainer)==null?void 0:oe.call(n);W&&W.classList.remove("l7-draw-cursor-crosshair")}(ne=(X=L.current).onModeChange)==null||ne.call(X,A)},[n,R,_,U,Z]),ee=u.useCallback(A=>{var K,O;const C=g.current,P=k.current,S=m.current;if(A.key==="Escape"){C.isDrawing&&(C.currentVertices=[],C.startPoint=null,C.mousePoint=null,C.isDrawing=!1,S==null||S.clearDrawingFeedback()),z.current&&(Z(null),S==null||S.showAllFeatures(),S==null||S.clearSelectionHighlight(),S==null||S.clearVertexHandles()),S==null||S.hideTooltip();return}if((A.key==="Delete"||A.key==="Backspace")&&P==="edit"&&z.current){A.preventDefault();const Y=z.current,te=b.current.find(oe=>oe.id===Y);if(te){const oe=b.current.filter(X=>X.id!==Y);H(oe),(O=(K=L.current).onDrawDelete)==null||O.call(K,te),Z(null),S==null||S.showAllFeatures(),S==null||S.clearSelectionHighlight(),S==null||S.clearVertexHandles()}return}},[H,Z]);u.useEffect(()=>{var O;if(!t||!n)return;const A=Y=>E(Y),C=Y=>N(Y),P=Y=>y(Y),S=(O=n.getContainer)==null?void 0:O.call(n);n.on("click",A),n.on("dblclick",C),n.on("mousemove",P),S&&S.addEventListener("mousedown",w),document.addEventListener("mouseup",I),document.addEventListener("keydown",ee);const K=Y=>{k.current==="edit"&&Y.preventDefault()};return S&&S.addEventListener("contextmenu",K),()=>{n.off("click",A),n.off("dblclick",C),n.off("mousemove",P),S&&(S.removeEventListener("mousedown",w),S.removeEventListener("contextmenu",K)),document.removeEventListener("mouseup",I),document.removeEventListener("keydown",ee);try{n.setMapStatus({dragEnable:!0,zoomEnable:!0,doubleClickZoom:!0})}catch{}S&&S.classList.remove("l7-draw-cursor-crosshair")}},[t,n,E,N,y,w,I,ee]),u.useEffect(()=>{var A;V&&s&&(b.current=[...s],g.current.features=[...s],(A=m.current)==null||A.updateFeatures(s))},[V,s]);const D=u.useCallback(A=>{var P,S;if(V)return;const C=[...b.current,...A];H(C),(S=(P=L.current).onDrawCreate)==null||S.call(P,A)},[V,H]),B=u.useCallback(A=>{var S,K,O,Y,te;if(V)return;const C=b.current.find(oe=>oe.id===A);if(!C)return;const P=b.current.filter(oe=>oe.id!==A);H(P),(K=(S=L.current).onDrawDelete)==null||K.call(S,C),z.current===A&&(Z(null),(O=m.current)==null||O.showAllFeatures(),(Y=m.current)==null||Y.clearSelectionHighlight(),(te=m.current)==null||te.clearVertexHandles())},[V,H,Z]),le=u.useCallback(()=>{z.current&&B(z.current)},[B]),se=u.useCallback(()=>{var A,C,P;V||(H([]),Z(null),(A=m.current)==null||A.showAllFeatures(),(C=m.current)==null||C.clearSelectionHighlight(),(P=m.current)==null||P.clearVertexHandles())},[V,H,Z]),J=u.useCallback(()=>[...b.current],[]),ie=u.useCallback(A=>{var C,P,S,K,O,Y;if(k.current==="edit")if(A){const te=b.current.find(oe=>oe.id===A)??null;Z(A),te&&((C=m.current)==null||C.hideFeatureFromStatic(A),(P=m.current)==null||P.updateSelectionHighlight(te),(S=m.current)==null||S.updateVertexHandles(te))}else Z(null),(K=m.current)==null||K.showAllFeatures(),(O=m.current)==null||O.clearSelectionHighlight(),(Y=m.current)==null||Y.clearVertexHandles()},[Z]);return{mode:k.current,features:b.current,selectedFeatureId:z.current,setMode:q,addFeatures:D,deleteFeature:B,deleteSelectedFeature:le,clearAll:se,getFeatures:J,selectFeature:ie,layerManager:m.current}}const t1=[{mode:"none",icon:"pan_tool",title:"手型 — 关闭绘制态,恢复地图交互",label:"手型"},{mode:"point",icon:"location_on",title:"点 — 单击放置",label:"点"},{mode:"polyline",icon:"timeline",title:"线 — 单击添加顶点,双击结束",label:"线"},{mode:"polygon",icon:"pentagon",title:"面 — 单击添加顶点,双击闭合",label:"面"},{mode:"circle",icon:"radio_button_unchecked",title:"圆 — 单击圆心,再单击确定半径",label:"圆形"},{mode:"rectangle",icon:"crop_square",title:"矩形 — 按住拖拽绘制",label:"矩形"},{mode:"edit",icon:"edit_square",title:"编辑 — 选中要素后拖拽移动或编辑顶点",label:"编辑"}],n1=[{mode:"merge",icon:"call_merge",title:"合并 — 选中2+要素合并为一个",label:"合并"},{mode:"split",icon:"content_cut",title:"切分 — 绘制切线将要素分割",label:"切分"}];function K1(){const e=u.useRef(null),t=u.useCallback((r,o)=>{if(!e.current){const p=document.createElement("div");p.style.cssText=["position:fixed","pointer-events:none","z-index:9999","padding:5px 10px","border-radius:4px","background:rgba(26,27,34,0.92)","color:#f2eff9",'font:500 11px/16px "JetBrains Mono",monospace',"white-space:nowrap","box-shadow:0 2px 8px rgba(0,0,0,0.3)"].join(";"),document.body.appendChild(p),e.current=p}const a=e.current;a.textContent=o,a.style.display="block";const s=a.getBoundingClientRect(),l=r.currentTarget.getBoundingClientRect();let c=l.right+8,d=l.top+l.height/2-s.height/2;const h=window.innerWidth,f=window.innerHeight;c+s.width>h-4&&(c=l.left-s.width-8),c<4&&(c=l.left+l.width/2-s.width/2,d=l.top-s.height-8),d<4&&(d=l.bottom+8),d+s.height>f-4&&(d=l.top-s.height-8),a.style.left=`${Math.max(4,c)}px`,a.style.top=`${Math.max(4,d)}px`},[]),n=u.useCallback(()=>{e.current&&(e.current.style.display="none")},[]);return u.useEffect(()=>()=>{var r;e.current&&((r=e.current.parentElement)==null||r.removeChild(e.current),e.current=null)},[]),{showTooltip:t,hideTooltip:n}}function Q1(e,t,n,r,o,a){return e.map(s=>i.jsx("button",{className:`l7-button-control ${a}${t===s.mode?" l7-button-control--active":""}`,onClick:()=>n(s.mode),onMouseEnter:l=>r(l,s.title),onMouseLeave:o,"aria-label":s.title,"aria-pressed":t===s.mode,children:i.jsx("span",{className:"material-symbols-outlined",children:s.icon})},s.mode))}const rr=({activeMode:e,onModeChange:t,modes:n,showDelete:r=!0,hasSelection:o=!1,hasFeatures:a=!1,onDeleteSelected:s,onClearAll:l,className:c,style:d})=>{const{showTooltip:h,hideTooltip:f}=K1(),p=u.useMemo(()=>n?t1.filter(m=>m.mode==="none"||n.includes(m.mode)):t1,[n]),g=u.useCallback(m=>{t(m==="none"||e===m?"none":m)},[e,t]);return i.jsxs("div",{className:`l7-control l7-control-draw l7-control--glass${c?` ${c}`:""}`,style:d,role:"toolbar","aria-label":"基础绘制工具",children:[Q1(p,e,g,h,f,"l7-draw-tool-btn"),r&&e==="edit"&&o&&s&&i.jsxs(i.Fragment,{children:[i.jsx("div",{className:"l7-draw-separator"}),i.jsx("button",{className:"l7-button-control l7-draw-action-btn",onClick:s,onMouseEnter:m=>h(m,"删除选中要素"),onMouseLeave:f,"aria-label":"删除选中要素",children:i.jsx("span",{className:"material-symbols-outlined",children:"delete"})})]}),r&&a&&l&&i.jsx("button",{className:"l7-button-control l7-draw-action-btn",onClick:l,onMouseEnter:m=>h(m,"清除所有要素"),onMouseLeave:f,"aria-label":"清除所有要素",children:i.jsx("span",{className:"material-symbols-outlined",children:"delete_sweep"})})]})},or=({activeMode:e,onModeChange:t,modes:n,className:r,style:o})=>{const{showTooltip:a,hideTooltip:s}=K1(),l=u.useMemo(()=>n?n1.filter(d=>d.mode==="none"||n.includes(d.mode)):n1,[n]),c=u.useCallback(d=>{t(d==="none"||e===d?"none":d)},[e,t]);return i.jsx("div",{className:`l7-control l7-control-draw l7-control--glass${r?` ${r}`:""}`,style:o,role:"toolbar","aria-label":"高级操作工具",children:Q1(l,e,c,a,s,"l7-draw-advanced-btn")})},Ft=u.forwardRef(function({position:t="topright",defaultFeatures:n,features:r,modes:o,showDelete:a=!0,styles:s,snap:l,className:c,style:d,onDrawCreate:h,onDrawUpdate:f,onDrawDelete:p,onDrawSelect:g,onModeChange:m,onChange:x},v){const{scene:L,mapsService:k,positionClassName:b}=ke(t),z=Me(),V=nr({scene:L,mapsService:k,styles:s,snap:l,defaultFeatures:n,features:r,onDrawCreate:h,onDrawUpdate:f,onDrawDelete:p,onDrawSelect:g,onModeChange:m,onChange:x}),[F,M]=u.useState("none");u.useImperativeHandle(v,()=>({setMode:V.setMode,addFeatures:V.addFeatures,deleteFeature:V.deleteFeature,clearAll:V.clearAll,getFeatures:V.getFeatures,selectFeature:V.selectFeature}),[V]);const j=u.useCallback(y=>{M(y),V.setMode(y)},[V]),T=u.useCallback(()=>{V.deleteSelectedFeature()},[V]),H=u.useCallback(()=>{V.clearAll()},[V]),Z=V.selectedFeatureId!==null,E=V.features.length>0,N=i.jsxs(i.Fragment,{children:[i.jsx(rr,{activeMode:F,onModeChange:j,modes:o,showDelete:a,hasSelection:Z,hasFeatures:E,onDeleteSelected:T,onClearAll:H}),i.jsx(or,{activeMode:F,onModeChange:j,modes:o})]});return z?i.jsx("div",{className:c,style:d,children:N}):i.jsx("div",{className:`l7-control-anchor ${b}`,children:N})});Le.mark(Ft);async function e0(e){let t,n;e instanceof File?(t=URL.createObjectURL(e),n=()=>URL.revokeObjectURL(t)):t=e;const{width:r,height:o}=await sr(t);return{url:t,width:r,height:o,revokeUrl:n}}function sr(e){return new Promise((t,n)=>{const r=new Image;r.onload=()=>t({width:r.naturalWidth,height:r.naturalHeight}),r.onerror=()=>n(new Error("Failed to load image")),r.crossOrigin="anonymous",r.src=e})}function t0(e){return new Promise((t,n)=>{const r=new Image;r.onload=()=>t(r),r.onerror=()=>n(new Error("Failed to load image")),r.crossOrigin="anonymous",r.src=e})}async function ir(e,t,n="image/png",r=.92){const o=await t0(e),a=document.createElement("canvas");a.width=Math.round(t.width),a.height=Math.round(t.height);const s=a.getContext("2d");if(!s)throw new Error("Canvas 2D context unavailable");s.drawImage(o,Math.round(t.x),Math.round(t.y),Math.round(t.width),Math.round(t.height),0,0,a.width,a.height);const l=await new Promise((h,f)=>{a.toBlob(p=>p?h(p):f(new Error("Canvas toBlob failed")),n,r)}),c=URL.createObjectURL(l);return{blob:l,url:c,revokeUrl:()=>URL.revokeObjectURL(c),width:a.width,height:a.height}}function ar(e,t,n){const r=Math.max(0,Math.min(e.x,t-e.width)),o=Math.max(0,Math.min(e.y,n-e.height)),a=Math.max(1,Math.min(e.width,t-r)),s=Math.max(1,Math.min(e.height,n-o));return{x:r,y:o,width:a,height:s}}function lr(e,t,n){const r=360/Math.pow(2,t)*.3,o=r*n/2,a=r/2,[s,l]=e;return[[s-o,l+a],[s+o,l+a],[s+o,l-a],[s-o,l-a]]}function cr(e){const t=e.map(r=>r[0]),n=e.map(r=>r[1]);return[Math.min(...t),Math.min(...n),Math.max(...t),Math.max(...n)]}function ur(e,t){const n=[],r=[];for(let a=0;a<4;a++){const[s,l]=e[a],[c,d]=t[a];n.push([-s,-l,-1,0,0,0,c*s,c*l]),r.push(-c),n.push([0,0,0,-s,-l,-1,d*s,d*l]),r.push(-d)}const o=fr(n,r);return[o[0],o[1],o[2],o[3],o[4],o[5],o[6],o[7],1]}function dr(e,t,n,r){const o="naturalWidth"in e?e.naturalWidth:e.width,a="naturalHeight"in e?e.naturalHeight:e.height,s=t.map(j=>j[0]),l=t.map(j=>j[1]),c=Math.min(...s),d=Math.max(...s),h=Math.min(...l),f=Math.max(...l),p=j=>[(j[0]-c)/(d-c)*n,(f-j[1])/(f-h)*r],g=t.map(p),x=ur(g,[[0,0],[o,0],[o,a],[0,a]]),v=document.createElement("canvas");v.width=n,v.height=r;const L=v.getContext("2d"),k=document.createElement("canvas");k.width=o,k.height=a;const b=k.getContext("2d");b.drawImage(e,0,0);const z=b.getImageData(0,0,o,a),V=L.createImageData(n,r),F=z.data,M=V.data;for(let j=0;j<r;j++)for(let T=0;T<n;T++){const H=x[6]*T+x[7]*j+x[8];if(Math.abs(H)<1e-10)continue;const Z=(x[0]*T+x[1]*j+x[2])/H,E=(x[3]*T+x[4]*j+x[5])/H;if(Z>=0&&Z<o-1&&E>=0&&E<a-1){const N=Math.floor(Z),y=Math.floor(E),w=Z-N,I=E-y,R=(y*o+N)*4,_=(j*n+T)*4;for(let $=0;$<4;$++)M[_+$]=Math.round(F[R+$]*(1-w)*(1-I)+F[R+4+$]*w*(1-I)+F[R+o*4+$]*(1-w)*I+F[R+o*4+4+$]*w*I)}}return L.putImageData(V,0,0),v}function hr(e,t,n,r,o,a,s){const l=document.createElement("canvas");return l.width=r,l.height=o,l.getContext("2d").drawImage(e,t,n,r,o,0,0,r,o),new Promise((d,h)=>{l.toBlob(f=>f?d(f):h(new Error("tile export failed")),a,s)})}async function pr(e,t,n){const{outputWidth:r,outputHeight:o,cols:a,rows:s,format:l="image/png",quality:c=.92}=n,d=dr(e,t,r,o),h=t.map(M=>M[0]),f=t.map(M=>M[1]),p=Math.min(...h),g=Math.max(...h),m=Math.min(...f),x=Math.max(...f),v=[p,m,g,x],L=await new Promise((M,j)=>{d.toBlob(T=>T?M(T):j(new Error("export failed")),l,c)}),k=Math.floor(r/a),b=Math.floor(o/s),z=(g-p)/a,V=(x-m)/s,F=[];for(let M=0;M<s;M++)for(let j=0;j<a;j++){const T=j*k,H=M*b,Z=j===a-1?r-T:k,E=M===s-1?o-H:b,N=p+j*z,y=j===a-1?g:N+z,w=x-M*V,I=M===s-1?m:w-V,R=[N,I,y,w],_=[[N,w],[y,w],[y,I],[N,I]],$=await hr(d,T,H,Z,E,l,c);F.push({blob:$,row:M,col:j,extent:R,corners:_,width:Z,height:E})}return{canvas:d,fullBlob:L,tiles:F,extent:v}}function fr(e,t){const r=[];for(let o=0;o<8;o++)r.push([...e[o],t[o]]);for(let o=0;o<8;o++){let a=o,s=Math.abs(r[o][o]);for(let c=o+1;c<8;c++)Math.abs(r[c][o])>s&&(s=Math.abs(r[c][o]),a=c);[r[o],r[a]]=[r[a],r[o]];const l=r[o][o];if(Math.abs(l)<1e-12)throw new Error("Singular matrix in homography computation");for(let c=o;c<=8;c++)r[o][c]/=l;for(let c=0;c<8;c++){if(c===o)continue;const d=r[c][o];for(let h=o;h<=8;h++)r[c][h]-=d*r[o][h]}}return r.map(o=>o[8])}function gr({scene:e,mapsService:t,corners:n,defaultCorners:r,imageSource:o,opacity:a=.7,onCornersChange:s,onImageLoad:l}){const[c,d]=u.useState({phase:"idle",imageUrl:null,imageDimensions:null,corners:r??null,draggingCorner:null,opacity:a}),[h,f]=u.useState(null),p=u.useRef(c.corners),g=u.useRef(null),m=u.useRef(null),x=u.useRef(s);x.current=s;const v=u.useRef(null),L=n!==void 0,k=L?n:c.corners;u.useEffect(()=>{p.current=k??null},[k]),u.useEffect(()=>{L&&n&&d(y=>({...y,corners:n}))},[L,n]),u.useEffect(()=>{o&&M(o)},[o]);const[b,z]=u.useState(k??null);u.useEffect(()=>{c.draggingCorner||z(k??null)},[k,c.draggingCorner]),u.useEffect(()=>{if(!e||!c.imageUrl||!b){if(v.current){try{e==null||e.removeLayer(v.current)}catch{}v.current=null}return}const y=[b[0],b[1],b[2],b[3]];if(v.current){try{e.removeLayer(v.current)}catch{}v.current=null}const w=new ge.ImageLayer({zIndex:10,name:"__calibration_image__"});return w.source(c.imageUrl,{parser:{type:"image",coordinates:y}}),w.style({opacity:c.opacity}),e.addLayer(w),v.current=w,()=>{if(v.current){try{e.removeLayer(v.current)}catch{}v.current=null}}},[e,c.imageUrl,b,c.opacity]);const V=u.useCallback(()=>{if(!t||!p.current){f(null);return}try{const y=p.current.map(w=>{const I=t.lngLatToContainer([w[0],w[1]]);return[I.x,I.y]});f(y)}catch{}},[t]);u.useEffect(()=>{if(!t||!k)return;V();const y=()=>V();return t.on("camerachange",y),t.on("viewchange",y),()=>{t.off("camerachange",y),t.off("viewchange",y)}},[t,k,V]);const F=u.useCallback(y=>{var _;if(!t)return;g.current=y,d($=>({...$,draggingCorner:y})),t.setMapStatus({dragEnable:!1,zoomEnable:!1});const w=(_=t.getContainer)==null?void 0:_.call(t),I=$=>{var D;if(g.current===null||!p.current||!w)return;const G=w.getBoundingClientRect(),Q=$.clientX-G.left,U=$.clientY-G.top,q=t.containerToLngLat([Q,U]);if(!q)return;const ee=[...p.current];ee[g.current]=[q.lng,q.lat],p.current=ee,L||d(B=>({...B,corners:ee})),(D=x.current)==null||D.call(x,ee),V()},R=()=>{g.current=null,d($=>({...$,draggingCorner:null})),t.setMapStatus({dragEnable:!0,zoomEnable:!0}),document.removeEventListener("mousemove",I),document.removeEventListener("mouseup",R)};document.addEventListener("mousemove",I),document.addEventListener("mouseup",R)},[t,L,V]),M=u.useCallback(async(y,w)=>{var I,R;(I=m.current)==null||I.call(m),m.current=null;try{const _=await e0(y);m.current=_.revokeUrl??null;let $=w??p.current;if(!$&&t){const G=t.getCenter(),Q=t.getZoom(),U=_.width/_.height;$=lr([G.lng,G.lat],Q,U)}d(G=>({...G,phase:"calibrating",imageUrl:_.url,imageDimensions:{width:_.width,height:_.height},corners:L?G.corners:$})),!L&&$&&(p.current=$,(R=x.current)==null||R.call(x,$)),l==null||l({width:_.width,height:_.height}),requestAnimationFrame(V)}catch(_){console.error("Failed to load image:",_)}},[t,L,l,V]),j=u.useCallback(y=>{d(w=>({...w,phase:y}))},[]),T=u.useCallback(y=>{d(w=>({...w,opacity:y}))},[]),H=u.useCallback(()=>{var y;if((y=m.current)==null||y.call(m),m.current=null,p.current=null,v.current&&e){try{e.removeLayer(v.current)}catch{}v.current=null}d({phase:"idle",imageUrl:null,imageDimensions:null,corners:null,draggingCorner:null,opacity:a}),f(null)},[a,e]),Z=u.useCallback(()=>p.current,[]),E=u.useCallback(y=>{var w;p.current=y,L||d(I=>({...I,corners:y})),(w=x.current)==null||w.call(x,y),V()},[L,V]),N=u.useCallback(async y=>{if(!c.imageUrl||!p.current||!c.imageDimensions)throw new Error("No image or corners to export");const w=await t0(c.imageUrl),I=p.current,R=(y==null?void 0:y.outputWidth)||c.imageDimensions.width,_=(y==null?void 0:y.outputHeight)||c.imageDimensions.height,$=(y==null?void 0:y.cols)||1,G=(y==null?void 0:y.rows)||1,{fullBlob:Q,tiles:U,extent:q}=await pr(w,I,{outputWidth:R,outputHeight:_,cols:$,rows:G,format:y==null?void 0:y.format,quality:y==null?void 0:y.quality}),ee=URL.createObjectURL(Q);return{tiles:U.map(B=>({blob:B.blob,previewUrl:URL.createObjectURL(B.blob),row:B.row,col:B.col,extent:B.extent,corners:B.corners,width:B.width,height:B.height})),extent:q,previewUrl:ee,blob:Q,outputWidth:R,outputHeight:_}},[c.imageUrl,c.imageDimensions]);return u.useEffect(()=>()=>{var y;if((y=m.current)==null||y.call(m),v.current&&e)try{e.removeLayer(v.current)}catch{}},[e]),{state:c,screenPositions:h,setImage:M,setPhase:j,setOpacity:T,startDrag:F,clear:H,getCorners:Z,setCorners:E,exportImage:N}}const mr=["TL","TR","BR","BL"],Ke=14;function yr({screenPositions:e,draggingCorner:t,phase:n,onStartDrag:r}){const o=u.useCallback(l=>c=>{c.preventDefault(),c.stopPropagation(),r(l)},[r]),a=n==="calibrating",s=`M ${e[0][0]},${e[0][1]} L ${e[1][0]},${e[1][1]} L ${e[2][0]},${e[2][1]} L ${e[3][0]},${e[3][1]} Z`;return i.jsxs(i.Fragment,{children:[i.jsx("svg",{style:{position:"absolute",left:0,top:0,width:"100%",height:"100%",pointerEvents:"none",overflow:"visible"},children:i.jsx("path",{d:s,fill:"none",stroke:"#f59e0b",strokeWidth:"2",strokeDasharray:"6 3"})}),a&&e.map((l,c)=>i.jsx("div",{onMouseDown:o(c),style:{position:"absolute",left:l[0]-Ke/2,top:l[1]-Ke/2,width:Ke,height:Ke,borderRadius:"50%",backgroundColor:"#fff",border:"2px solid #f59e0b",boxShadow:"0 2px 4px rgba(0,0,0,0.3)",cursor:t===c?"grabbing":"grab",transform:t===c?"scale(1.3)":"scale(1)",transition:t===null?"transform 0.15s ease":"none",zIndex:t===c?10:1,pointerEvents:"auto"},title:`${mr[c]} 角点`},c))]})}const r1=["左上 (TL)","右上 (TR)","右下 (BR)","左下 (BL)"],Ve=10;function xr({imageUrl:e,imageDimensions:t,mapCenter:n,mapZoom:r,showInitialCoords:o=!0,onConfirm:a,onCancel:s}){const[l,c]=u.useState({x:0,y:0,width:t.width,height:t.height}),[d,h]=u.useState(null),[f,p]=u.useState(!0),[g,m]=u.useState([[0,0],[0,0],[0,0],[0,0]]),x=u.useRef(null),[v,L]=u.useState(1);u.useEffect(()=>{const Z=()=>{if(!x.current)return;const E=x.current.clientWidth,N=x.current.clientHeight,y=E/t.width,w=N/t.height;L(Math.min(y,w,1))};return Z(),window.addEventListener("resize",Z),()=>window.removeEventListener("resize",Z)},[t]);const k=u.useRef(null);u.useCallback((Z,E)=>{if(!k.current)return{imgX:0,imgY:0};const N=k.current.getBoundingClientRect(),y=(Z-N.left)/v,w=(E-N.top)/v;return{imgX:y,imgY:w}},[v]);const b=u.useCallback((Z,E)=>{Z.preventDefault(),Z.stopPropagation(),h({handle:E,startMouseX:Z.clientX,startMouseY:Z.clientY,startCrop:{...l}})},[l]);u.useEffect(()=>{if(!d)return;const Z=N=>{const y=(N.clientX-d.startMouseX)/v,w=(N.clientY-d.startMouseY)/v,I=d.startCrop;let R;switch(d.handle){case"move":R={...I,x:I.x+y,y:I.y+w};break;case"tl":R={x:I.x+y,y:I.y+w,width:I.width-y,height:I.height-w};break;case"tr":R={x:I.x,y:I.y+w,width:I.width+y,height:I.height-w};break;case"br":R={x:I.x,y:I.y,width:I.width+y,height:I.height+w};break;case"bl":R={x:I.x+y,y:I.y,width:I.width-y,height:I.height+w};break;default:R=I}R.width<20&&((d.handle==="tl"||d.handle==="bl")&&(R.x=I.x+I.width-20),R.width=20),R.height<20&&((d.handle==="tl"||d.handle==="tr")&&(R.y=I.y+I.height-20),R.height=20),c(ar(R,t.width,t.height))},E=()=>{h(null)};return document.addEventListener("mousemove",Z),document.addEventListener("mouseup",E),()=>{document.removeEventListener("mousemove",Z),document.removeEventListener("mouseup",E)}},[d,v,t]);const z=u.useCallback((Z,E,N)=>{const y=parseFloat(N);if(isNaN(y))return;const w=[...g];w[Z]=[E==="lng"?y:w[Z][0],E==="lat"?y:w[Z][1]],m(w)},[g]);u.useEffect(()=>{if(f&&n&&r!==null){const Z=l.width/l.height,E=360/Math.pow(2,r)*.3,N=E*Z/2,y=E/2,[w,I]=n;m([[w-N,I+y],[w+N,I+y],[w+N,I-y],[w-N,I-y]])}},[f,n,r,l.width,l.height]);const V=u.useCallback(()=>{a(l,f?null:g)},[l,f,g,a]),F=l.x*v,M=l.y*v,j=l.width*v,T=l.height*v,H=Z=>({position:"absolute",left:0,top:0,width:t.width*v,height:t.height*v,background:"rgba(0, 0, 0, 0.45)",clipPath:Z,pointerEvents:"none"});return i.jsx("div",{style:{position:"fixed",inset:0,zIndex:1e4,display:"flex",alignItems:"center",justifyContent:"center",background:"rgba(0,0,0,0.6)"},onClick:s,children:i.jsxs("div",{style:{background:"#fff",borderRadius:10,padding:0,width:680,maxHeight:"90vh",overflow:"hidden",boxShadow:"0 8px 32px rgba(0,0,0,0.3)",display:"flex",flexDirection:"column"},onClick:Z=>Z.stopPropagation(),children:[i.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"12px 20px",borderBottom:"1px solid #e5e7eb",fontSize:15,fontWeight:600},children:[i.jsx("span",{children:"图片裁剪 & 初始坐标"}),i.jsx("button",{onClick:s,style:{border:"none",background:"transparent",fontSize:20,cursor:"pointer",color:"#666",lineHeight:1},children:"✕"})]}),i.jsxs("div",{style:{display:"flex",flex:1,overflow:"hidden"},children:[i.jsx("div",{ref:x,style:{flex:1,display:"flex",alignItems:"center",justifyContent:"center",padding:16,background:"#f9fafb",overflow:"hidden",minHeight:300},children:i.jsxs("div",{style:{position:"relative",lineHeight:0},children:[i.jsx("img",{ref:k,src:e,style:{width:t.width*v,height:t.height*v,display:"block",userSelect:"none",pointerEvents:"none"},draggable:!1}),i.jsx("div",{style:H(`polygon(0% 0%, 100% 0%, 100% ${M}px, ${F}px ${M}px, ${F}px ${M+T}px, 0% ${M+T}px)`)}),i.jsx("div",{style:H(`polygon(100% 0%, 100% 100%, ${F+j}px 100%, ${F+j}px ${M}px, 100% ${M}px)`)}),i.jsx("div",{style:H(`polygon(${F+j}px ${M}px, 100% ${M}px, 100% 100%, ${F+j}px 100%, ${F+j}px ${M+T}px)`)}),i.jsx("div",{style:H(`polygon(0% ${M+T}px, ${F}px ${M+T}px, ${F+j}px ${M+T}px, ${F+j}px 100%, 0% 100%)`)}),i.jsxs("div",{onMouseDown:Z=>b(Z,"move"),style:{position:"absolute",left:F,top:M,width:j,height:T,border:"2px solid #f59e0b",cursor:(d==null?void 0:d.handle)==="move"?"grabbing":"grab",pointerEvents:"auto",boxSizing:"border-box"},children:[i.jsxs("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:[i.jsx("div",{style:{position:"absolute",top:"33.3%",left:0,right:0,height:1,background:"rgba(245,158,7,0.3)"}}),i.jsx("div",{style:{position:"absolute",top:"66.6%",left:0,right:0,height:1,background:"rgba(245,158,7,0.3)"}}),i.jsx("div",{style:{position:"absolute",left:"33.3%",top:0,bottom:0,width:1,background:"rgba(245,158,7,0.3)"}}),i.jsx("div",{style:{position:"absolute",left:"66.6%",top:0,bottom:0,width:1,background:"rgba(245,158,7,0.3)"}})]}),["tl","tr","br","bl"].map(Z=>{const E={tl:{left:-Ve/2,top:-Ve/2,cursor:"nwse-resize"},tr:{right:-Ve/2,top:-Ve/2,cursor:"nesw-resize"},br:{right:-Ve/2,bottom:-Ve/2,cursor:"nwse-resize"},bl:{left:-Ve/2,bottom:-Ve/2,cursor:"nesw-resize"}};return i.jsx("div",{onMouseDown:N=>b(N,Z),style:{position:"absolute",width:Ve,height:Ve,background:"#fff",border:"2px solid #f59e0b",borderRadius:2,pointerEvents:"auto",...E[Z]}},Z)}),i.jsxs("div",{style:{position:"absolute",bottom:-22,left:"50%",transform:"translateX(-50%)",fontSize:10,color:"#f59e0b",whiteSpace:"nowrap",pointerEvents:"none",fontFamily:"monospace",background:"rgba(0,0,0,0.5)",padding:"1px 4px",borderRadius:2},children:[Math.round(l.width)," × ",Math.round(l.height)]})]})]})}),o&&i.jsxs("div",{style:{width:260,padding:"16px 20px",borderLeft:"1px solid #e5e7eb",display:"flex",flexDirection:"column",gap:12,overflowY:"auto",fontSize:12},children:[i.jsx("div",{style:{fontWeight:600,marginBottom:4,color:"#333"},children:"裁剪区域"}),i.jsxs("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:"6px 12px",color:"#666",fontFamily:"monospace",fontSize:11},children:[i.jsxs("span",{children:["X: ",Math.round(l.x),"px"]}),i.jsxs("span",{children:["Y: ",Math.round(l.y),"px"]}),i.jsxs("span",{children:["W: ",Math.round(l.width),"px"]}),i.jsxs("span",{children:["H: ",Math.round(l.height),"px"]})]}),i.jsx("button",{onClick:()=>c({x:0,y:0,width:t.width,height:t.height}),style:{padding:"4px 12px",fontSize:11,border:"1px solid #d1d5db",borderRadius:4,background:"#fff",cursor:"pointer",alignSelf:"flex-start"},children:"重置裁剪区域"}),i.jsx("div",{style:{fontWeight:600,color:"#333",marginTop:8},children:"初始坐标"}),i.jsxs("div",{style:{display:"flex",gap:8,alignItems:"center"},children:[i.jsxs("label",{style:{display:"flex",alignItems:"center",gap:4,cursor:"pointer"},children:[i.jsx("input",{type:"radio",name:"coordMode",checked:f,onChange:()=>p(!0)}),i.jsx("span",{children:"自动计算"})]}),i.jsxs("label",{style:{display:"flex",alignItems:"center",gap:4,cursor:"pointer"},children:[i.jsx("input",{type:"radio",name:"coordMode",checked:!f,onChange:()=>p(!1)}),i.jsx("span",{children:"手动输入"})]})]}),f&&i.jsx("div",{style:{color:"#888",fontSize:11,lineHeight:1.5},children:"基于当前地图视口中心自动计算4个角点坐标。确认后将图片放置到地图视口中。"}),!f&&i.jsx("div",{style:{display:"flex",flexDirection:"column",gap:8},children:g.map((Z,E)=>i.jsxs("div",{style:{display:"flex",alignItems:"center",gap:4},children:[i.jsx("span",{style:{width:64,color:"#666",fontSize:11},children:r1[E]}),i.jsx("input",{type:"number",step:"any",value:Z[0],onChange:N=>z(E,"lng",N.target.value),placeholder:"经度",style:{width:72,padding:"3px 6px",border:"1px solid #d1d5db",borderRadius:3,fontSize:11,fontFamily:"monospace"}}),i.jsx("input",{type:"number",step:"any",value:Z[1],onChange:N=>z(E,"lat",N.target.value),placeholder:"纬度",style:{width:72,padding:"3px 6px",border:"1px solid #d1d5db",borderRadius:3,fontSize:11,fontFamily:"monospace"}})]},E))}),i.jsxs("div",{style:{fontSize:10,color:"#999",fontFamily:"monospace",lineHeight:1.6,marginTop:4},children:[f?"自动模式":"手动模式",":",g.map((Z,E)=>i.jsxs("div",{children:[r1[E],": [",Z[0].toFixed(4),", ",Z[1].toFixed(4),"]"]},E))]})]})]}),i.jsxs("div",{style:{display:"flex",justifyContent:"flex-end",gap:8,padding:"12px 20px",borderTop:"1px solid #e5e7eb"},children:[i.jsx("button",{onClick:s,style:{padding:"6px 20px",fontSize:13,border:"1px solid #d1d5db",borderRadius:5,background:"#fff",cursor:"pointer"},children:"取消"}),i.jsx("button",{onClick:V,style:{padding:"6px 20px",fontSize:13,border:"none",borderRadius:5,background:"#2563eb",color:"#fff",cursor:"pointer",fontWeight:500},children:"确认裁剪 & 开始配准"})]})]})})}class Cr{constructor(){this.entries=[]}addFile(t,n){typeof n=="string"?this.entries.push({name:t,data:new TextEncoder().encode(n)}):n instanceof Blob?this.entries.push({name:t,data:new Uint8Array(0)}):this.entries.push({name:t,data:n})}async addBlob(t,n){const r=await n.arrayBuffer();this.entries.push({name:t,data:new Uint8Array(r)})}generate(){const t=[],n=[];let r=0;for(const l of this.entries){const c=new TextEncoder().encode(l.name),d=vr(l.data),h=l.data.length,f=new Uint8Array(30+c.length),p=new DataView(f.buffer);p.setUint32(0,67324752,!0),p.setUint16(4,20,!0),p.setUint16(6,0,!0),p.setUint16(8,0,!0),p.setUint16(10,0,!0),p.setUint16(12,0,!0),p.setUint32(14,d,!0),p.setUint32(18,h,!0),p.setUint32(22,h,!0),p.setUint16(26,c.length,!0),p.setUint16(28,0,!0),f.set(c,30),t.push(f),t.push(l.data);const g=new Uint8Array(46+c.length),m=new DataView(g.buffer);m.setUint32(0,33639248,!0),m.setUint16(4,20,!0),m.setUint16(6,20,!0),m.setUint16(8,0,!0),m.setUint16(10,0,!0),m.setUint16(12,0,!0),m.setUint16(14,0,!0),m.setUint32(16,d,!0),m.setUint32(20,h,!0),m.setUint32(24,h,!0),m.setUint16(28,c.length,!0),m.setUint16(30,0,!0),m.setUint16(32,0,!0),m.setUint16(34,0,!0),m.setUint16(36,0,!0),m.setUint32(38,0,!0),m.setUint32(42,r,!0),g.set(c,46),n.push(g),r+=f.length+l.data.length}const o=n.reduce((l,c)=>l+c.length,0),a=new Uint8Array(22),s=new DataView(a.buffer);return s.setUint32(0,101010256,!0),s.setUint16(4,0,!0),s.setUint16(6,0,!0),s.setUint16(8,this.entries.length,!0),s.setUint16(10,this.entries.length,!0),s.setUint32(12,o,!0),s.setUint32(16,r,!0),s.setUint16(20,0,!0),new Blob([...t,...n,a],{type:"application/zip"})}}const n0=new Uint32Array(256);for(let e=0;e<256;e++){let t=e;for(let n=0;n<8;n++)t=t&1?3988292384^t>>>1:t>>>1;n0[e]=t}function vr(e){let t=4294967295;for(let n=0;n<e.length;n++)t=n0[(t^e[n])&255]^t>>>8;return(t^4294967295)>>>0}function Oe({icon:e,tip:t,onClick:n,disabled:r}){const[o,a]=u.useState(!1);return i.jsxs("div",{style:{position:"relative",display:"flex"},onMouseEnter:()=>a(!0),onMouseLeave:()=>a(!1),children:[i.jsx("button",{className:"l7-button-control",onClick:n,disabled:r,"aria-label":t,children:i.jsx("span",{className:"material-symbols-outlined",children:e})}),o&&i.jsx("div",{style:{position:"absolute",left:"100%",top:"50%",transform:"translateY(-50%)",marginLeft:6,padding:"4px 8px",borderRadius:4,background:"rgba(0,0,0,0.75)",color:"#fff",fontSize:11,whiteSpace:"nowrap",pointerEvents:"none",lineHeight:1.4},children:t})]})}const Tt=u.forwardRef(function({position:t="topright",layout:n="vertical",corners:r,defaultCorners:o,imageSource:a,opacity:s=.7,accept:l="image/*",enableCrop:c=!0,enableInitialCoords:d=!0,className:h,style:f,onCornersChange:p,onCalibrate:g,onExport:m,onImageLoad:x,onPreprocess:v,onClear:L},k){const{scene:b,mapsService:z,positionClassName:V,getMapContainer:F}=ke(t),M=Me(),j=u.useRef(null),T=gr({scene:b,mapsService:z,corners:r,defaultCorners:o,imageSource:a,opacity:s,onCornersChange:p,onImageLoad:x}),{state:H,screenPositions:Z,setImage:E,setPhase:N,setOpacity:y,startDrag:w,clear:I,getCorners:R,setCorners:_,exportImage:$}=T;u.useImperativeHandle(k,()=>({getCorners:R,setCorners:_,setImage:E,exportImage:$,clear:oe}));const G=u.useCallback(async re=>{var fe;const ce=(fe=re.target.files)==null?void 0:fe[0];if(ce)if(re.target.value="",c||d)try{const he=await e0(ce);U({url:he.url,dimensions:{width:he.width,height:he.height},revokeUrl:he.revokeUrl??null})}catch(he){console.error("Failed to load image for crop:",he)}else E(ce)},[c,d,E]),[Q,U]=u.useState(null),q=u.useCallback(async(re,ce)=>{var fe;if(Q){try{if(re.x!==0||re.y!==0||re.width!==Q.dimensions.width||re.height!==Q.dimensions.height){const xe=await ir(Q.url,re);(fe=Q.revokeUrl)==null||fe.call(Q),E(xe.url,ce),D.current=xe.revokeUrl,v==null||v({croppedDimensions:{width:xe.width,height:xe.height},initialCorners:ce}),x==null||x({width:xe.width,height:xe.height})}else E(Q.url,ce),v==null||v({croppedDimensions:Q.dimensions,initialCorners:ce}),x==null||x(Q.dimensions)}catch(he){console.error("Crop/setImage failed:",he)}U(null)}},[Q,E,v,x]),ee=u.useCallback(()=>{var re;Q&&((re=Q.revokeUrl)==null||re.call(Q),U(null))},[Q]),D=u.useRef(null),B=u.useCallback(()=>{const re=R();re&&(N("confirmed"),g==null||g({corners:re,extent:cr(re)}))},[R,N,g]),[le,se]=u.useState(!1),[J,ie]=u.useState({outputWidth:0,outputHeight:0,cols:1,rows:1}),[A,C]=u.useState(null),[P,S]=u.useState(!1),K=u.useCallback(()=>{const re=H.imageDimensions;ie({outputWidth:(re==null?void 0:re.width)||1024,outputHeight:(re==null?void 0:re.height)||1024,cols:1,rows:1}),C(null),se(!0)},[H.imageDimensions]),O=u.useCallback(async()=>{S(!0);try{const re=await $(J);C(re)}catch(re){console.error("Export failed:",re)}S(!1)},[$,J]),Y=u.useCallback(async()=>{if(!A)return;const re=new Cr;for(const Ce of A.tiles)await re.addBlob(`tile_${Ce.row}_${Ce.col}.png`,Ce.blob);const ce=A.tiles.map(Ce=>({file:`tile_${Ce.row}_${Ce.col}.png`,row:Ce.row,col:Ce.col,width:Ce.width,height:Ce.height,extent:Ce.extent,corners:Ce.corners})),fe=JSON.stringify({extent:A.extent,outputWidth:A.outputWidth,outputHeight:A.outputHeight,tiles:ce},null,2);re.addFile("tiles.json",fe);const he=re.generate(),xe=URL.createObjectURL(he),ze=document.createElement("a");ze.href=xe,ze.download="calibrated-tiles.zip",ze.click(),URL.revokeObjectURL(xe),m==null||m(A)},[A,m]),te=u.useCallback(()=>{A&&(URL.revokeObjectURL(A.previewUrl),A.tiles.forEach(re=>URL.revokeObjectURL(re.previewUrl))),C(null),se(!1)},[A]),oe=u.useCallback(()=>{var re;I(),(re=D.current)==null||re.call(D),D.current=null,L==null||L()},[I,L]),X=u.useCallback(()=>{N("calibrating")},[N]),ne=u.useCallback(re=>{y(Number(re.target.value))},[y]),W=u.useCallback(()=>{if(!z||H.phase==="idle")return;const re=z.getBounds();if(!re)return;const[[ce,fe],[he,xe]]=re,ze=(he-ce)*.1,Ce=(xe-fe)*.1,k0=[[ce+ze,xe-Ce],[he-ze,xe-Ce],[he-ze,fe+Ce],[ce+ze,fe+Ce]];_(k0)},[z,H.phase,_]),[ae,de]=u.useState(!1),ue=F(),me=H.phase!=="idle"&&Z&&ue?Re.createPortal(i.jsx("div",{style:{position:"absolute",left:0,top:0,width:"100%",height:"100%",pointerEvents:"none",zIndex:100},children:i.jsx(yr,{screenPositions:Z,draggingCorner:H.draggingCorner,phase:H.phase,onStartDrag:w})}),ue):null,ve=n==="horizontal",Ee=i.jsxs("div",{className:`l7-control l7-control--glass l7-control-image-calibration ${ve?"l7-control-image-calibration--horizontal":""} ${h??""}`,style:{position:"relative",...f},children:[i.jsx(Oe,{icon:"upload",tip:H.phase==="idle"?"上传图片":"更换图片",onClick:()=>{var re;return(re=j.current)==null?void 0:re.click()}}),i.jsx(Oe,{icon:"fit_screen",tip:"放置到当前位置",onClick:W,disabled:H.phase==="idle"}),i.jsx(Oe,{icon:H.phase==="confirmed"?"edit":"check_circle",tip:H.phase==="confirmed"?"重新校准":"确认校准",onClick:H.phase==="confirmed"?X:B,disabled:H.phase==="idle"}),i.jsx(Oe,{icon:"opacity",tip:"透明度",onClick:()=>de(!ae),disabled:H.phase==="idle"}),i.jsx(Oe,{icon:"download",tip:"导出",onClick:K,disabled:H.phase==="idle"}),i.jsx(Oe,{icon:"delete",tip:"清除",onClick:oe,disabled:H.phase==="idle"}),ae&&H.phase!=="idle"&&i.jsxs("div",{className:"l7-control--glass",style:{position:"absolute",left:ve?0:"100%",top:ve?"100%":0,marginLeft:ve?0:6,marginTop:ve?6:0,padding:"8px 10px",borderRadius:6,display:"flex",alignItems:"center",gap:6,fontSize:11,whiteSpace:"nowrap",minWidth:140},children:[i.jsx("input",{type:"range",min:"0",max:"1",step:"0.05",value:H.opacity,onChange:ne,style:{flex:1,height:4}}),i.jsxs("span",{style:{minWidth:28,textAlign:"right"},children:[Math.round(H.opacity*100),"%"]})]}),i.jsx("input",{ref:j,type:"file",accept:l,onChange:G,style:{display:"none"}}),me,Q&&(c||d)&&Re.createPortal(i.jsx(xr,{imageUrl:Q.url,imageDimensions:Q.dimensions,mapCenter:z?[z.getCenter().lng,z.getCenter().lat]:null,mapZoom:z?z.getZoom():null,showInitialCoords:d,onConfirm:q,onCancel:ee}),document.body),le&&Re.createPortal(i.jsx("div",{style:{position:"fixed",inset:0,zIndex:1e4,display:"flex",alignItems:"center",justifyContent:"center",background:"rgba(0,0,0,0.5)"},onClick:te,children:i.jsxs("div",{style:{background:"#fff",borderRadius:8,padding:20,width:520,maxHeight:"85vh",overflow:"auto",boxShadow:"0 8px 32px rgba(0,0,0,0.25)"},onClick:re=>re.stopPropagation(),children:[i.jsx("div",{style:{fontSize:15,fontWeight:600,marginBottom:16},children:"导出配准图片"}),i.jsxs("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:"8px 16px",marginBottom:12,fontSize:12},children:[i.jsxs("label",{style:{display:"flex",alignItems:"center",gap:6},children:["宽度(px)",i.jsx("input",{type:"number",value:J.outputWidth,min:64,max:8192,onChange:re=>ie(ce=>({...ce,outputWidth:+re.target.value||1024})),style:{width:72,padding:"2px 6px",border:"1px solid #d1d5db",borderRadius:4}})]}),i.jsxs("label",{style:{display:"flex",alignItems:"center",gap:6},children:["高度(px)",i.jsx("input",{type:"number",value:J.outputHeight,min:64,max:8192,onChange:re=>ie(ce=>({...ce,outputHeight:+re.target.value||1024})),style:{width:72,padding:"2px 6px",border:"1px solid #d1d5db",borderRadius:4}})]}),i.jsxs("label",{style:{display:"flex",alignItems:"center",gap:6},children:["切片列数",i.jsx("input",{type:"number",value:J.cols,min:1,max:20,onChange:re=>ie(ce=>({...ce,cols:Math.max(1,+re.target.value||1)})),style:{width:48,padding:"2px 6px",border:"1px solid #d1d5db",borderRadius:4}})]}),i.jsxs("label",{style:{display:"flex",alignItems:"center",gap:6},children:["切片行数",i.jsx("input",{type:"number",value:J.rows,min:1,max:20,onChange:re=>ie(ce=>({...ce,rows:Math.max(1,+re.target.value||1)})),style:{width:48,padding:"2px 6px",border:"1px solid #d1d5db",borderRadius:4}})]})]}),i.jsx("button",{onClick:O,disabled:P,style:{padding:"6px 16px",fontSize:12,border:"none",borderRadius:4,background:"#2563eb",color:"#fff",cursor:"pointer",marginBottom:12},children:P?"生成中...":"生成预览"}),A&&i.jsxs(i.Fragment,{children:[i.jsxs("div",{style:{position:"relative",marginBottom:12,border:"1px solid #e5e7eb",borderRadius:4,overflow:"hidden"},children:[i.jsx("img",{src:A.previewUrl,style:{width:"100%",display:"block"}}),(J.cols>1||J.rows>1)&&i.jsxs("svg",{style:{position:"absolute",inset:0,width:"100%",height:"100%",pointerEvents:"none"},children:[Array.from({length:J.cols-1},(re,ce)=>i.jsx("line",{x1:`${(ce+1)/J.cols*100}%`,y1:"0",x2:`${(ce+1)/J.cols*100}%`,y2:"100%",stroke:"#f59e0b",strokeWidth:"1",strokeDasharray:"4 2"},`c${ce}`)),Array.from({length:J.rows-1},(re,ce)=>i.jsx("line",{x1:"0",y1:`${(ce+1)/J.rows*100}%`,x2:"100%",y2:`${(ce+1)/J.rows*100}%`,stroke:"#f59e0b",strokeWidth:"1",strokeDasharray:"4 2"},`r${ce}`))]})]}),i.jsxs("div",{style:{fontSize:11,color:"#666",fontFamily:"monospace",marginBottom:12,maxHeight:160,overflow:"auto"},children:[i.jsxs("div",{style:{marginBottom:4,fontWeight:600,color:"#333"},children:["总计 ",A.tiles.length," 个切片 | ",A.outputWidth,"×",A.outputHeight,"px"]}),i.jsxs("div",{style:{marginBottom:4},children:["Extent: [",A.extent.map(re=>re.toFixed(5)).join(", "),"]"]}),A.tiles.map(re=>i.jsxs("div",{style:{padding:"2px 0",borderBottom:"1px solid #f3f4f6"},children:["tile_",re.row,"_",re.col,".png (",re.width,"×",re.height,") — [",re.extent.map(ce=>ce.toFixed(5)).join(", "),"]"]},`${re.row}_${re.col}`))]}),i.jsxs("div",{style:{display:"flex",gap:8,justifyContent:"flex-end"},children:[i.jsx("button",{onClick:te,style:{padding:"6px 16px",fontSize:12,border:"1px solid #d1d5db",borderRadius:4,background:"#fff",cursor:"pointer"},children:"取消"}),i.jsxs("button",{onClick:Y,style:{padding:"6px 16px",fontSize:12,border:"none",borderRadius:4,background:"#2563eb",color:"#fff",cursor:"pointer"},children:["打包下载 ZIP(",A.tiles.length," 张 + 坐标JSON)"]})]})]}),!A&&i.jsx("div",{style:{display:"flex",justifyContent:"flex-end"},children:i.jsx("button",{onClick:te,style:{padding:"6px 16px",fontSize:12,border:"1px solid #d1d5db",borderRadius:4,background:"#fff",cursor:"pointer"},children:"取消"})})]})}),document.body)]});return!b||!z?null:M?Ee:i.jsx("div",{className:`l7-control-anchor ${V}`,children:Ee})});Le.mark(Tt);function r0({controls:e,layers:t,onLayerToggle:n,containerRef:r}){const o=ye();return i.jsx(Mt,{children:e.map((a,s)=>i.jsx(br,{control:a,layers:t,onLayerToggle:n,scene:o,containerRef:r},`${a.type}-${s}`))})}function br({control:e,layers:t,onLayerToggle:n,scene:r,containerRef:o}){var s,l,c,d,h,f,p,g,m;const a=e.position??void 0;switch(e.type){case"zoom":return i.jsx(kt,{position:a??"bottomright"});case"scale":return i.jsx(St,{position:a??"bottomleft",maxWidth:(s=e.options)==null?void 0:s.maxWidth,metric:((l=e.options)==null?void 0:l.unit)!=="imperial",imperial:((c=e.options)==null?void 0:c.unit)==="imperial"});case"fullscreen":return i.jsx(zt,{position:a??"topright",container:o==null?void 0:o.current});case"geoLocate":return i.jsx(jt,{position:a??"topright"});case"mapTheme":return i.jsx(Vt,{position:a??"topright"});case"mouseLocation":return i.jsx(Et,{position:a??"bottomleft",precision:(d=e.options)==null?void 0:d.precision});case"exportImage":return i.jsx(At,{position:a??"topright",format:(h=e.options)==null?void 0:h.format});case"layerSwitch":return i.jsx(Zt,{position:a??"topright",layers:t.map((x,v)=>({id:x.id??`layer-${v}`,name:x.name,visible:x.visible})),onToggle:n??(()=>{})});case"draw":return i.jsx(Ft,{position:a??"topright",modes:(f=e.options)==null?void 0:f.modes,showDelete:(p=e.options)==null?void 0:p.showDelete});case"imageCalibration":return i.jsx(Tt,{position:a??"topright",opacity:(g=e.options)==null?void 0:g.opacity,imageSource:(m=e.options)==null?void 0:m.imageSource});default:return null}}const Te={aerialway:"M13,5H8V2.6c0.1854-0.1047,0.3325-0.2659,0.42-0.46L13.5,1.5C13.7761,1.5,14,1.2761,14,1s-0.2239-0.5-0.5-0.5L8.28,1.15 C8.0954,0.9037,7.8077,0.7562,7.5,0.75C7.0963,0.752,6.7334,0.9966,6.58,1.37L1.5,2C1.2239,2,1,2.2239,1,2.5S1.2239,3,1.5,3 l5.22-0.65C6.7967,2.4503,6.8917,2.5351,7,2.6V5H2C1.4477,5,1,5.4477,1,6v7c0,0.5523,0.4477,1,1,1h11c0.5523,0,1-0.4477,1-1V6 C14,5.4477,13.5523,5,13,5z M7,11H3V7h4V11z M12,11H8V7h4V11z",airfield:"M6.8182,0.6818H4.7727 C4.0909,0.6818,4.0909,0,4.7727,0h5.4545c0.6818,0,0.6818,0.6818,0,0.6818H8.1818c0,0,0.8182,0.5909,0.8182,1.9545V4h6v2L9,8l-0.5,5 l2.5,1.3182V15H4v-0.6818L6.5,13L6,8L0,6V4h6V2.6364C6,1.2727,6.8182,0.6818,6.8182,0.6818z",airport:"M15,6.8182L15,8.5l-6.5-1 l-0.3182,4.7727L11,14v1l-3.5-0.6818L4,15v-1l2.8182-1.7273L6.5,7.5L0,8.5V6.8182L6.5,4.5v-3c0,0,0-1.5,1-1.5s1,1.5,1,1.5v2.8182 L15,6.8182z","alcohol-shop":"M14,4h-4v3.44l0,0c0,0,0,0,0,0.06c0.003,0.9096,0.6193,1.7026,1.5,1.93V13H11c-0.2761,0-0.5,0.2239-0.5,0.5 S10.7239,14,11,14h2c0.2761,0,0.5-0.2239,0.5-0.5S13.2761,13,13,13h-0.5V9.43c0.8807-0.2274,1.497-1.0204,1.5-1.93c0,0,0,0,0-0.06 l0,0V4z M13,7.5c0,0.5523-0.4477,1-1,1s-1-0.4477-1-1V5h2V7.5z M5.5,2.5V2C5.7761,2,6,1.7761,6,1.5S5.7761,1,5.5,1V0.5 C5.5,0.2239,5.2761,0,5,0H4C3.7239,0,3.5,0.2239,3.5,0.5V1C3.2239,1,3,1.2239,3,1.5S3.2239,2,3.5,2v0.5C3.5,3.93,1,5.57,1,7v6 c0,0.5523,0.4477,1,1,1h5c0.5318-0.0465,0.9535-0.4682,1-1V7C8,5.65,5.5,3.85,5.5,2.5z M4.5,12C3.1193,12,2,10.8807,2,9.5 S3.1193,7,4.5,7S7,8.1193,7,9.5S5.8807,12,4.5,12z","american-football":"M7.53,3C3.09,3,1,7.5,1,7.5S3.09,12,7.53,12S14,7.5,14,7.5S12,3,7.53,3z M11,7v1.5C11,8.7761,10.7761,9,10.5,9 S10,8.7761,10,8.5V8H8v0.5C8,8.7761,7.7761,9,7.5,9S7,8.7761,7,8.5V8H5v0.5C5,8.7761,4.7761,9,4.5,9S4,8.7761,4,8.5v-2 C4,6.2239,4.2239,6,4.5,6S5,6.2239,5,6.5V7h2V6.5C7,6.2239,7.2239,6,7.5,6S8,6.2239,8,6.5V7h2V6.5C10,6.2239,10.2239,6,10.5,6 S11,6.2239,11,6.5V7z","amusement-park":"M13.5 7C13.5 9.02798 12.4939 10.821 10.9535 11.907L12 13.9999H3L4.04645 11.907C2.50613 10.821 1.5 9.02798 1.5 7C1.5 3.68629 4.18629 1 7.5 1C10.8137 1 13.5 3.68629 13.5 7ZM12.2984 7.125H8.99487C8.96844 7.4453 8.84138 7.73706 8.64538 7.96861L10.9814 10.3046C11.7719 9.47202 12.2669 8.35614 12.2984 7.125ZM10.8046 10.4814L8.46861 8.14538C8.33136 8.26156 8.17296 8.35351 8 8.41465V11.7743C9.08206 11.6623 10.0574 11.1908 10.8046 10.4814ZM6.00513 7.125H2.7016C2.73307 8.35614 3.2281 9.47202 4.01864 10.3046L6.35462 7.96861C6.15862 7.73706 6.03156 7.4453 6.00513 7.125ZM4.19542 10.4814C4.94259 11.1908 5.91794 11.6623 7 11.7743V8.41465C6.82704 8.35351 6.66864 8.26156 6.53139 8.14538L4.19542 10.4814ZM12.2984 6.875C12.2669 5.64386 11.7719 4.52798 10.9814 3.69542L8.64538 6.03139C8.84138 6.26294 8.96844 6.5547 8.99487 6.875H12.2984ZM10.8046 3.51864C9.97202 2.7281 8.85614 2.23307 7.625 2.2016V5.50513C7.9453 5.53156 8.23706 5.65862 8.46861 5.85462L10.8046 3.51864ZM7.375 5.50513V2.2016C6.14386 2.23307 5.02798 2.7281 4.19542 3.51864L6.53139 5.85462C6.76294 5.65862 7.0547 5.53156 7.375 5.50513ZM6.35462 6.03139L4.01864 3.69542C3.2281 4.52798 2.73307 5.64386 2.7016 6.875H6.00513C6.03156 6.5547 6.15862 6.26294 6.35462 6.03139Z","animal-shelter":"M 7.528,0.895 9,2 h 1 L 11.473,0.896 C 11.689502,0.73373378 12,0.8884387 12,1.159 V 4.5 c 0,0.722 -0.522,1.184 -1,1.573 V 10 l 0.8,2.4 0.706,0.353 c 0.302922,0.151551 0.494181,0.461283 0.494,0.8 C 13,13.8 12.8,14 12.553,14 H 4.25 C 3.017,14 2,13 2,11.713 2,9.5424588 2.4530836,7.9300225 2.745,6.845 2.8910836,6.3020225 3.0352907,5.8946079 3.138,5.614 3.1956028,5.4566256 3.253276,5.3110749 3.33,5.165 3.7788405,4.3104525 5.0743666,4.9556117 4.672,5.833 4.6232251,5.9393571 4.5778358,6.0512046 4.539,6.15 4.4477518,6.3821288 4.325004,6.7430011 4.193,7.234 3.947004,8.1490011 3.674,9.521 3.558,11.367 3.926,9.307 5.98,7.239 7.635,5.758 7.29,5.432 7.001,5.038 7.001,4.5 l 0,-3.342 c 0,-0.2705613 0.3106215,-0.42543084 0.527,-0.263 z",aquarium:"M1.13505 8.57743C1.98919 6.14741 4.72075 2 10 2C12.6518 2 14 3 14 3C14 3 11.6865 3 10.6203 3.44512C10.54 3.47864 10.4747 3.53744 10.4329 3.61375C10.2432 3.95995 9.75252 5.04744 10.3231 6.19506C10.4172 6.38427 10.6364 6.46548 10.8383 6.40312C11.3474 6.24589 12.3301 5.89727 13.0761 5.35729C13.2973 5.1972 13.615 5.25773 13.6797 5.52298C13.9401 6.59045 13.9401 8.40955 13.6797 9.47702C13.615 9.74227 13.2973 9.8028 13.0761 9.64271C12.3301 9.10273 11.3474 8.75411 10.8383 8.59688C10.6364 8.53452 10.4172 8.61573 10.3231 8.80494C9.75252 9.95256 10.2432 11.04 10.4329 11.3863C10.4747 11.4626 10.54 11.5214 10.6203 11.5549C11.6865 12 14 12 14 12C13.5 12.3333 11.8 13 9.00001 13C4.51722 13 2.02736 10.3427 1.25972 9.35985C1.08546 9.13673 1.04117 8.84452 1.13505 8.57743ZM5.00001 9C5.69037 9 6.25001 8.44036 6.25001 7.75C6.25001 7.05964 5.69037 6.5 5.00001 6.5C4.30966 6.5 3.75001 7.05964 3.75001 7.75C3.75001 8.44036 4.30966 9 5.00001 9Z",arrow:"M8.29289 2.29289C8.68342 1.90237 9.31658 1.90237 9.70711 2.29289L14.2071 6.79289C14.5976 7.18342 14.5976 7.81658 14.2071 8.20711L9.70711 12.7071C9.31658 13.0976 8.68342 13.0976 8.29289 12.7071C7.90237 12.3166 7.90237 11.6834 8.29289 11.2929L11 8.5H1.5C0.947715 8.5 0.5 8.05228 0.5 7.5C0.5 6.94772 0.947715 6.5 1.5 6.5H11L8.29289 3.70711C7.90237 3.31658 7.90237 2.68342 8.29289 2.29289Z","art-gallery":"m10.71 3-2.86-2.849996c-.1945-.1960996-.511-.1973996-.7071-.0029-.001.001-.0019.0019-.0029.0029l-2.85 2.849996h-2.79c-.2761 0-.5.2239-.5.5v9c0 .2761.2239.5.5.5h12c.2761 0 .5-.2239.5-.5v-9c0-.2761-.2239-.5-.5-.5zm-3.21-1.79 1.79 1.79h-3.58zm5.5 10.79h-11v-8h11zm-8-5c-.5523 0-1-.4477-1-1s.4477-1 1-1 1 .4477 1 1-.4477 1-1 1zm7 4h-7.5l1.5-3 1.25 2.5 2.25-4.5z",attraction:"M6,2C5.446,2,5.2478,2.5045,5,3L4.5,4h-2C1.669,4,1,4.669,1,5.5v5C1,11.331,1.669,12,2.5,12h10 c0.831,0,1.5-0.669,1.5-1.5v-5C14,4.669,13.331,4,12.5,4h-2L10,3C9.75,2.5,9.554,2,9,2H6z M2.5,5C2.7761,5,3,5.2239,3,5.5 S2.7761,6,2.5,6S2,5.7761,2,5.5S2.2239,5,2.5,5z M7.5,5c1.6569,0,3,1.3431,3,3s-1.3431,3-3,3s-3-1.3431-3-3S5.8431,5,7.5,5z M7.5,6.5C6.6716,6.5,6,7.1716,6,8l0,0c0,0.8284,0.6716,1.5,1.5,1.5l0,0C8.3284,9.5,9,8.8284,9,8l0,0C9,7.1716,8.3284,6.5,7.5,6.5 L7.5,6.5z",bakery:"M5.294,4.382,6,9.5a.979.979,0,0,0,1,1H8a.979.979,0,0,0,1-1l.706-5.118C9.706,3,7.5,3,7.5,3S5.291,3,5.294,4.382ZM3.5,5C2,5,2,6,2,6l1,4H4.5a.793.793,0,0,0,.794-.765L4.5,5Zm-2,2.5a1.533,1.533,0,0,0-1.059.412A1.366,1.366,0,0,0,0,8.794V11H.882A1.02,1.02,0,0,0,2,10ZM11.5,5C13,5,13,6,13,6l-1,4H10.5a.793.793,0,0,1-.794-.765L10.5,5Zm2,2.5a1.533,1.533,0,0,1,1.059.412A1.366,1.366,0,0,1,15,8.794V11h-.882A1.02,1.02,0,0,1,13,10Z",bank:"M1,3C0.446,3,0,3.446,0,4v7c0,0.554,0.446,1,1,1h13c0.554,0,1-0.446,1-1V4c0-0.554-0.446-1-1-1H1z M1,4h1.5 C2.7761,4,3,4.2239,3,4.5S2.7761,5,2.5,5S2,4.7761,2,4.5L1.5,5C1.7761,5,2,5.2239,2,5.5S1.7761,6,1.5,6S1,5.7761,1,5.5V4z M7.5,4 C8.8807,4,10,5.567,10,7.5l0,0C10,9.433,8.8807,11,7.5,11S5,9.433,5,7.5S6.1193,4,7.5,4z M12.5,4H14v1.5C14,5.7761,13.7761,6,13.5,6 S13,5.7761,13,5.5S13.2239,5,13.5,5L13,4.5C13,4.7761,12.7761,5,12.5,5S12,4.7761,12,4.5S12.2239,4,12.5,4z M7.5,5.5 c-0.323,0-0.5336,0.1088-0.6816,0.25h1.3633C8.0336,5.6088,7.823,5.5,7.5,5.5z M6.625,6C6.5795,6.091,6.5633,6.1711,6.5449,6.25 h1.9102C8.4367,6.1711,8.4205,6.091,8.375,6H6.625z M6.5,6.5v0.25h2V6.5H6.5z M6.5,7v0.25h2V7H6.5z M6.5,7.5v0.25h2V7.5H6.5z M6.5,8 L6.25,8.25h2L8.5,8H6.5z M6,8.5c0,0,0.0353,0.1024,0.1016,0.25H8.375L8,8.5H6z M1.5,9C1.7761,9,2,9.2239,2,9.5S1.7761,10,1.5,10 L2,10.5C2,10.2239,2.2239,10,2.5,10S3,10.2239,3,10.5S2.7761,11,2.5,11H1V9.5C1,9.2239,1.2239,9,1.5,9z M6.2383,9 C6.2842,9.0856,6.3144,9.159,6.375,9.25h2.2676C8.7092,9.1121,8.75,9,8.75,9H6.2383z M13.5,9C13.7761,9,14,9.2239,14,9.5V11h-1.5 c-0.2761,0-0.5-0.2239-0.5-0.5s0.2239-0.5,0.5-0.5s0.5,0.2239,0.5,0.5l0.5-0.5C13.2239,10,13,9.7761,13,9.5S13.2239,9,13.5,9z M6.5664,9.5c0.0786,0.0912,0.1647,0.1763,0.2598,0.25h1.4199C8.3462,9.6727,8.4338,9.5883,8.5,9.5H6.5664z","bank-JP":"M12.2808,3.3763l-2.9,3.625H11.25a.75.75,0,0,1,0,1.5H8.5v1h2.75a.75.75,0,0,1,0,1.5H8.5v1.25a1,1,0,0,1-2,0v-1.25H3.75a.75.75,0,1,1,0-1.5H6.5v-1H3.75a.75.75,0,0,1,0-1.5H5.6193l-2.9-3.625A1,1,0,0,1,4.2771,2.1216l.0037.0047L7.5,6.15l3.2192-4.024a1,1,0,0,1,1.5653,1.2453Z",bar:"M7.5,1c-2,0-7,0.25-6.5,0.75L7,8v4 c0,1-3,0.5-3,2h7c0-1.5-3-1-3-2V8l6-6.25C14.5,1.25,9.5,1,7.5,1z M7.5,2c2.5,0,4.75,0.25,4.75,0.25L11.5,3h-8L2.75,2.25 C2.75,2.25,5,2,7.5,2z",barrier:"m13 2h-11c-.26522 0-.51957.10536-.70711.29289-.18753.18754-.29289.44189-.29289.70711v6c0 .26522.10536.51957.29289.70711.18754.18753.44189.29289.70711.29289h1v2.5c0 .1326.05268.2598.14645.3536.09376.0937.22094.1464.35355.1464s.25979-.0527.35355-.1464c.09377-.0938.14645-.221.14645-.3536v-.5h7v.5c0 .1326.0527.2598.1464.3536.0938.0937.221.1464.3536.1464s.2598-.0527.3536-.1464c.0937-.0938.1464-.221.1464-.3536v-2.5h1c.2652 0 .5196-.10536.7071-.29289.1875-.18754.2929-.44189.2929-.70711v-6c0-.26522-.1054-.51957-.2929-.70711-.1875-.18753-.4419-.29289-.7071-.29289zm0 1v2l-2-2zm-3.5 0 3.5 3.5v2.5l-6-6zm-4 6-3.5-3.5v-2.5l6 6zm-3.5 0v-2l2 2zm9 2h-7v-1h7zm-.207-2h-1.293l-6-6h2l6 6z",baseball:"m9.00003 3.5c0 .8284-.6716 1.5-1.5 1.5s-1.5-.6716-1.5-1.5.6716-1.5 1.5-1.5 1.5.6716 1.5 1.5zm-3-3.22c0-.1546-.1254-.28-.28-.28-.0979.0262-.1852.0821-.25.16l-2.47 4.43c-.0059.0431-.0059.0869 0 .13 0 .1546.1254.28.28.28.1015-.0243.1926-.0803.26-.16l2.46-4.43c.006-.0431.006-.0869 0-.13zm5.89997 13.92-2.89997-7.81c-.0474-.2273-.2478-.3901-.48-.39h-5c-.2761 0-.5.2239-.5.5s.2239.5.5.5h2.48l1.45 2.51-4.27 4.61c-.1141.0932-.1802.2327-.18.38 0 .2761.2239.5.5.5.1224-.0006.2401-.047.33-.13l4.45-4.15 2.75997 4c.0895.1592.2574.2584.44.26.2796.0002.5092-.2207.52-.5-.0042-.1013-.039-.199-.1-.28z",basketball:"M3.66001 7H2.03C2.11012 6.02077 2.45969 5.05281 3.04001 4.26C3.39039 5.12432 3.59972 6.0693 3.66001 7ZM4.73501 7H7V2C5.78985 2.1061 4.72468 2.61284 3.83501 3.44C4.36491 4.54578 4.67079 5.77549 4.73501 7ZM8 2V7H10.265C10.3292 5.77549 10.6351 4.54578 11.165 3.44C10.2753 2.61284 9.21014 2.1061 8 2ZM11.96 4.26C11.6096 5.12432 11.4003 6.0693 11.34 7H12.97C12.8899 6.02077 12.5403 5.05281 11.96 4.26ZM14 8.49919C14 8.77489 13.7765 8.99838 13.5008 8.99838H11.72L10.96 10.5184V12.8984C10.9578 12.9736 10.934 13.0466 10.8915 13.1087C10.8489 13.1707 10.7894 13.2192 10.72 13.2484C10.6743 13.2607 10.6273 13.2674 10.58 13.2684C10.5312 13.2706 10.4825 13.2619 10.4375 13.2428C10.3925 13.2238 10.3524 13.195 10.32 13.1584L9.3 12.1484L7.71 13.2084C7.64698 13.2476 7.57423 13.2684 7.5 13.2684C7.42577 13.2684 7.35303 13.2476 7.29 13.2084L5.7 12.1484L4.68 13.1584C4.62956 13.211 4.56471 13.2477 4.49357 13.2637C4.42243 13.2797 4.34814 13.2744 4.28 13.2484C4.21063 13.2192 4.1511 13.1707 4.10854 13.1087C4.06599 13.0466 4.04219 12.9736 4.04 12.8984V10.5184L3.28 8.99838H1.49919C1.2235 8.99838 1 8.77489 1 8.4992C0.999998 8.2235 1.22349 8 1.49919 8H13.5008C13.7765 8 14 8.2235 14 8.49919ZM6.86 8.99838H4.12L4.75 10.2684C4.7772 10.3173 4.791 10.3725 4.79 10.4284V11.9884L5.35 11.4384L6.86 8.99838ZM8.84 11.5484L7.5 9.38838L6.16 11.5484L7.5 12.4484L8.84 11.5484ZM10.89 8.99838H8.14L9.65 11.4384L10.21 11.9884V10.4284C10.209 10.3725 10.2228 10.3173 10.25 10.2684L10.89 8.99838Z",bbq:"M9.32,7.655C10.8782,7.108,11.9471,5.6506,12,4H3c0.053,1.6299,1.0978,3.0728,2.63,3.631L4.923,9.044 c-1.3571-0.2355-2.6482,0.6737-2.8837,2.0308s0.6737,2.6482,2.0308,2.8837C4.9927,14.1187,5.9273,13.7485,6.49,13h4.223l0.335,0.717 c0.0836,0.1735,0.2594,0.2836,0.452,0.283c0.0733,0.0003,0.1457-0.0158,0.212-0.047c0.2497-0.117,0.3575-0.4141,0.241-0.664 L9.32,7.655z M4.5,12.75c-0.6904,0-1.25-0.5596-1.25-1.25s0.5596-1.25,1.25-1.25s1.25,0.5596,1.25,1.25 C5.7484,12.1897,5.1897,12.7484,4.5,12.75z M6.95,12c0.2066-1.007-0.2268-2.0374-1.091-2.594L6.6,7.923 c0.577,0.1042,1.168,0.1042,1.745,0l1.9,4.07L6.95,12z M4.75,1C4.6119,1,4.5,1.1119,4.5,1.25c0,0.5-0.5,0.5-0.5,0.5c-1,0-1,1-1,1 C3,2.8881,3.1119,3,3.25,3S3.5,2.8881,3.5,2.75c0-0.5,0.5-0.5,0.5-0.5c1,0,1-1,1-1C5,1.1119,4.8881,1,4.75,1z M6.75,1 C6.6119,1,6.5,1.1119,6.5,1.25c0,0.5-0.5,0.5-0.5,0.5c-1,0-1,1-1,1C5,2.8881,5.1119,3,5.25,3S5.5,2.8881,5.5,2.75 c0-0.5,0.5-0.5,0.5-0.5c1,0,1-1,1-1C7,1.1119,6.8881,1,6.75,1z M8.75,1C8.6119,1,8.5,1.1119,8.5,1.25c0,0.5-0.5,0.5-0.5,0.5 c-1,0-1,1-1,1C7,2.8881,7.1119,3,7.25,3S7.5,2.8881,7.5,2.75c0-0.5,0.5-0.5,0.5-0.5c1,0,1-1,1-1C9,1.1119,8.8881,1,8.75,1z M10.75,1 c-0.1381,0-0.25,0.1119-0.25,0.25c0,0.5-0.5,0.5-0.5,0.5c-1,0-1,1-1,1C9,2.8881,9.1119,3,9.25,3S9.5,2.8881,9.5,2.75 c0-0.5,0.5-0.5,0.5-0.5c1,0,1-1,1-1C11,1.1119,10.8881,1,10.75,1z M12.75,1c-0.1381,0-0.25,0.1119-0.25,0.25c0,0.5-0.5,0.5-0.5,0.5 c-1,0-1,1-1,1C11,2.8881,11.1119,3,11.25,3s0.25-0.1119,0.25-0.25c0-0.5,0.5-0.5,0.5-0.5c1,0,1-1,1-1C13,1.1119,12.8881,1,12.75,1z",beach:"M5.3608,1.67l-.01,4.02a4.4523,4.4523,0,0,0-1.1-.11c-.37.1-.74.63-1.1.76A4.2019,4.2019,0,0,1,5.3608,1.67Zm2.41-.64,2.03,3.45a3.1832,3.1832,0,0,1,.84-.61c.36-.1.94.17,1.34.11A4.2018,4.2018,0,0,0,7.7708,1.03ZM1.0008,13h13c-.66-.66-2.64-1.11-4.34-1.33l-1.87-7c.52-.05,1.15.03,1.53,0l-2.11-3.6h-.01a6.1743,6.1743,0,0,0-.7.14,4.3792,4.3792,0,0,0-.64.22l-.01,4.15c.35-.17.84-.54,1.3-.74l1.8,6.74c-.58-.05-1.09-.08-1.45-.08C6.0308,11.5,2.0008,12,1.0008,13Z",beer:"M12,5V2c0,0-1-1-4.5-1S3,2,3,2v3c0.0288,1.3915,0.3706,2.7586,1,4c0.6255,1.4348,0.6255,3.0652,0,4.5c0,0,0,1,3.5,1 s3.5-1,3.5-1c-0.6255-1.4348-0.6255-3.0652,0-4.5C11.6294,7.7586,11.9712,6.3915,12,5z M7.5,13.5 c-0.7966,0.035-1.5937-0.0596-2.36-0.28c0.203-0.7224,0.304-1.4696,0.3-2.22h4.12c-0.004,0.7504,0.097,1.4976,0.3,2.22 C9.0937,13.4404,8.2966,13.535,7.5,13.5z M7.5,5C6.3136,5.0299,5.1306,4.8609,4,4.5v-2C5.131,2.1411,6.3137,1.9722,7.5,2 C8.6863,1.9722,9.869,2.1411,11,2.5v2C9.8694,4.8609,8.6864,5.0299,7.5,5z",bicycle:"M7.5,2c-0.6761-0.01-0.6761,1.0096,0,1H9v1.2656l-2.8027,2.334L5.2226,4H5.5c0.6761,0.01,0.6761-1.0096,0-1h-2 c-0.6761-0.01-0.6761,1.0096,0,1h0.6523L5.043,6.375C4.5752,6.1424,4.0559,6,3.5,6C1.5729,6,0,7.5729,0,9.5S1.5729,13,3.5,13 S7,11.4271,7,9.5c0-0.6699-0.2003-1.2911-0.5293-1.8242L9.291,5.3262l0.4629,1.1602C8.7114,7.0937,8,8.2112,8,9.5 c0,1.9271,1.5729,3.5,3.5,3.5S15,11.4271,15,9.5S13.4271,6,11.5,6c-0.2831,0-0.5544,0.0434-0.8184,0.1074L10,4.4023V2.5 c0-0.2761-0.2239-0.5-0.5-0.5H7.5z M3.5,7c0.5923,0,1.1276,0.2119,1.5547,0.5527l-1.875,1.5625 c-0.5109,0.4273,0.1278,1.1945,0.6406,0.7695l1.875-1.5625C5.8835,8.674,6,9.0711,6,9.5C6,10.8866,4.8866,12,3.5,12S1,10.8866,1,9.5 S2.1133,7,3.5,7L3.5,7z M11.5,7C12.8866,7,14,8.1134,14,9.5S12.8866,12,11.5,12S9,10.8866,9,9.5c0-0.877,0.4468-1.6421,1.125-2.0879 l0.9102,2.2734c0.246,0.6231,1.1804,0.2501,0.9297-0.3711l-0.9082-2.2695C11.2009,7.0193,11.3481,7,11.5,7L11.5,7z","bicycle-share":"M10,1C9.4477,1,9,1.4477,9,2c0,0.5523,0.4477,1,1,1s1-0.4477,1-1C11,1.4477,10.5523,1,10,1z M8.1445,2.9941 c-0.13,0.0005-0.2547,0.0517-0.3477,0.1426l-2.6406,2.5c-0.2256,0.2128-0.2051,0.5775,0.043,0.7637L7,7.75v2.75 c-0.01,0.6762,1.0096,0.6762,1,0v-3c0.0003-0.1574-0.0735-0.3057-0.1992-0.4004L7.0332,6.5234l1.818-1.7212l0.7484,0.9985 C9.6943,5.9265,9.8426,6.0003,10,6h1.5c0.6761,0.01,0.6761-1.0096,0-1h-1.25L9.5,4L8.9004,3.1992 C8.8103,3.0756,8.6685,3,8.5156,2.9941H8.1445z M3,7c-1.6569,0-3,1.3432-3,3s1.3431,3,3,3s3-1.3432,3-3S4.6569,7,3,7z M12,7 c-1.6569,0-3,1.3432-3,3s1.3431,3,3,3s3-1.3432,3-3S13.6569,7,12,7z M3,8c1.1046,0,2,0.8954,2,2s-0.8954,2-2,2s-2-0.8954-2-2 S1.8954,8,3,8z M12,8c1.1046,0,2,0.8954,2,2s-0.8954,2-2,2s-2-0.8954-2-2S10.8954,8,12,8z","blood-bank":"m11.2 6.1-3.7-5.1-3.7 5.1c-.5.7-.8 1.6-.8 2.5 0 2.4 2 4.4 4.5 4.4s4.5-2 4.5-4.4c0-.9-.3-1.8-.8-2.5zm-1.2 2.9h-2v2h-1v-2h-2v-1h2v-2h1v2h2z","bowling-alley":"M10.922 3.166c0 1.006-.335 1.857-.693 2.77-.414 1.052-.86 2.185-.86 3.73 0 2.166.687 4.333 1.409 4.333h1.444c.723 0 1.409-2.166 1.409-4.333 0-1.545-.446-2.678-.86-3.73-.358-.912-.693-1.764-.693-2.77 0-.722.144-.723.144-1.445A.743.743 0 0 0 11.5.999a.743.743 0 0 0-.722.722c0 .723.144.723.144 1.445Zm-2.552 6.5c0-1.234.254-2.236.55-3.091a4.5 4.5 0 1 0-.17 6.038c-.237-.865-.38-1.91-.38-2.947ZM5.24 7.12a.62.62 0 1 1-1.24 0 .62.62 0 0 1 1.24 0Zm-1 2a.62.62 0 1 1-1.24 0 .62.62 0 0 1 1.24 0Zm2 0a.62.62 0 1 1-1.24 0 .62.62 0 0 1 1.24 0Z",bridge:"m0 6.84201v4.15799h2v-1c.036-1.08899.911-1.96399 2-1.99999 1.089.036 1.964.911 2 1.99999v1h3v-1c.036-1.08899.911-1.96399 2-1.99999 1.089.036 1.964.911 2 1.99999v1h2v-4.15799c-4.4-5.76-11.929-4.442-15 0zm9.5-3.108c.514.121 1.016.289 1.5.5v2.766h-1.5zm-.5-.1v3.366h-1.5v-3.494c.503 0 1.005.043 1.5.128zm-5.5.843c.48-.248.982-.451 1.5-.606v3.129h-1.5zm2 2.523v-3.27c.493-.115.995-.187 1.5-.215v3.485zm-2.5-2.256v2.256h-2.5c.676-.906 1.532-1.672 2.5-2.256zm8.5 2.256v-2.5l-.053-.053c1.202.603 2.247 1.477 3.053 2.553z",building:"M3,2v11h5v-3h3v3h1V2H3z M7,12H4v-2h3V12z M7,9H4V7h3V9z M7,6H4V4h3V6z M11,9H8V7h3V9z M11,6H8V4h3V6z","building-alt1":"M11,13.5v-9C11,4.2,10.8,4,10.5,4H9V1L5,2.1v11.4H2V14h11v-0.5H11z M7,13.5V3h1v10.5H7z",bus:"M2 3C2 1.9 2.9 1 4 1H11C12.1 1 13 1.9 13 3V11C13 12 12 12 12 12V13C12 13.55 11.55 14 11 14C10.45 14 10 13.55 10 13V12H5V13C5 13.55 4.55 14 4 14C3.45 14 3 13.55 3 13V12C2 12 2 11 2 11V3ZM3.5 4C3.22 4 3 4.22 3 4.5V7.5C3 7.78 3.22 8 3.5 8H11.5C11.78 8 12 7.78 12 7.5V4.5C12 4.22 11.78 4 11.5 4H3.5ZM4 9C3.45 9 3 9.45 3 10C3 10.55 3.45 11 4 11C4.55 11 5 10.55 5 10C5 9.45 4.55 9 4 9ZM11 9C10.45 9 10 9.45 10 10C10 10.55 10.45 11 11 11C11.55 11 12 10.55 12 10C12 9.45 11.55 9 11 9ZM4 2.5C4 2.78 4.22 3 4.5 3H10.5C10.78 3 11 2.78 11 2.5C11 2.22 10.78 2 10.5 2H4.5C4.22 2 4 2.22 4 2.5Z",cafe:"M12,5h-2V3H2v4c0.0133,2.2091,1.8149,3.9891,4.024,3.9758C7.4345,10.9673,8.7362,10.2166,9.45,9H12c1.1046,0,2-0.8954,2-2 S13.1046,5,12,5z M12,8H9.86C9.9487,7.6739,9.9958,7.3379,10,7V6h2c0.5523,0,1,0.4477,1,1S12.5523,8,12,8z M10,12.5 c0,0.2761-0.2239,0.5-0.5,0.5h-7C2.2239,13,2,12.7761,2,12.5S2.2239,12,2.5,12h7C9.7761,12,10,12.2239,10,12.5z",campsite:"M14 10V11C14 11.5523 13.5523 12 13 12H2C1.44772 12 1 11.5523 1 11V10C1 9.44772 1.44772 9.00001 2 9.00001H2.25L7.03206 1.25762C7.24699 0.90965 7.75302 0.909651 7.96794 1.25762L12.75 9.00001H13C13.5523 9.00001 14 9.44772 14 10ZM10.5 9.00001L7.5 4.00001L4.5 9.00001H10.5Z",car:"M13.84,6.852,12.6,5.7,11.5,3.5a1.05,1.05,0,0,0-.9-.5H4.4a1.05,1.05,0,0,0-.9.5L2.4,5.7,1.16,6.852A.5.5,0,0,0,1,7.219V11.5a.5.5,0,0,0,.5.5h2c.2,0,.5-.2.5-.4V11h7v.5c0,.2.2.5.4.5h2.1a.5.5,0,0,0,.5-.5V7.219A.5.5,0,0,0,13.84,6.852ZM4.5,4h6l1,2h-8ZM5,8.6c0,.2-.3.4-.5.4H2.4C2.2,9,2,8.7,2,8.5V7.4c.1-.3.3-.5.6-.4l2,.4c.2,0,.4.3.4.5Zm8-.1c0,.2-.2.5-.4.5H10.5c-.2,0-.5-.2-.5-.4V7.9c0-.2.2-.5.4-.5l2-.4c.3-.1.5.1.6.4Z","car-rental":"M10.5 1C9.94772 1 9.5 1.44772 9.5 2H2V3L3 4 4 3 5 4 6 3 7 4H9.5C9.5 4.55228 9.94772 5 10.5 5H12.5C12.7761 5 13 4.77614 13 4.5V1.5C13 1.22386 12.7761 1 12.5 1H10.5ZM11 2.5C11 2.22386 11.2239 2 11.5 2 11.7761 2 12 2.22386 12 2.5V3.5C12 3.77614 11.7761 4 11.5 4 11.2239 4 11 3.77614 11 3.5V2.5ZM2.14645 9.35355C2.05268 9.44732 2 9.5745 2 9.70711V13.5C2 13.7761 2.22386 14 2.5 14H4C4.27614 14 4.5 13.7761 4.5 13.5V13H10.5V13.5C10.5 13.7761 10.7239 14 11 14H12.5C12.7761 14 13 13.7761 13 13.5V9.70711C13 9.5745 12.9473 9.44732 12.8536 9.35355L12 8.5 10.6457 6.24275C10.5553 6.09215 10.3925 6 10.2169 6H4.7831C4.60746 6 4.44471 6.09215 4.35435 6.24275L3 8.5 2.14645 9.35355ZM11.1338 9H3.86623L5.06619 7H9.93381L11.1338 9ZM5.5 10.8279V11.2C5.5 11.3657 5.36569 11.5 5.2 11.5H3.3C3.13431 11.5 3 11.3657 3 11.2V10.3659C3 10.1766 3.1732 10.0346 3.35884 10.0718L5.17845 10.4357C5.36542 10.4731 5.5 10.6372 5.5 10.8279ZM12 10.4879V11.2C12 11.3657 11.8657 11.5 11.7 11.5H9.8C9.63431 11.5 9.5 11.3657 9.5 11.2V10.7459C9.5 10.6029 9.60094 10.4798 9.74117 10.4518L11.5216 10.0957C11.7691 10.0462 12 10.2355 12 10.4879Z","car-repair":"M3 5C3.74028 5 4.38662 4.5978 4.73243 4H12C12.5523 4 13 3.55228 13 3 13 2.44772 12.5523 2 12 2H4.73243C4.38662 1.4022 3.74028 1 3 1 2.25972 1 1.61337 1.4022 1.26756 2H3V4H1.26756C1.61337 4.5978 2.25972 5 3 5ZM2.14645 9.35355C2.05268 9.44732 2 9.5745 2 9.70711V13.5C2 13.7761 2.22386 14 2.5 14H4C4.27614 14 4.5 13.7761 4.5 13.5V13H10.5V13.5C10.5 13.7761 10.7239 14 11 14H12.5C12.7761 14 13 13.7761 13 13.5V9.70711C13 9.5745 12.9473 9.44732 12.8536 9.35355L12 8.5 10.6456 6.24275C10.5553 6.09215 10.3925 6 10.2169 6H4.78309C4.60746 6 4.44471 6.09215 4.35435 6.24275L3 8.5 2.14645 9.35355ZM11.1338 9H3.86622L5.06619 7H9.93381L11.1338 9ZM5.5 10.8279V11.2C5.5 11.3657 5.36568 11.5 5.2 11.5H3.3C3.13431 11.5 3 11.3657 3 11.2V10.3659C3 10.1766 3.1732 10.0346 3.35883 10.0718L5.17844 10.4357C5.36541 10.4731 5.5 10.6372 5.5 10.8279ZM12 10.4879V11.2C12 11.3657 11.8657 11.5 11.7 11.5H9.8C9.63431 11.5 9.5 11.3657 9.5 11.2V10.7459C9.5 10.6029 9.60094 10.4798 9.74116 10.4518L11.5216 10.0957C11.7691 10.0462 12 10.2355 12 10.4879Z",casino:"M8.5,10c0.4561,0.6072,1.1821,1,2,1c1.3807,0,2.5-1.1193,2.5-2.5c0-0.5642-0.1938-1.0789-0.509-1.4973L12.5,7l-5-6l-5,6 l0.009,0.0027C2.1938,7.4211,2,7.9358,2,8.5C2,9.8807,3.1193,11,4.5,11c0.8179,0,1.5439-0.3928,2-1 C6.5997,9.8672,6.7902,9.6135,7,9.3337V11.5C7,13,4.5,13,4.5,13C4.2239,13,4,13.2238,4,13.5C4,13.7761,4.2239,14,4.5,14H7h1h2.5 c0.2761,0,0.5-0.2239,0.5-0.5c0-0.2762-0.2239-0.5-0.5-0.5c0,0-2.5,0-2.5-1.5V9.3337C8.2098,9.6135,8.4003,9.8672,8.5,10z",castle:"M11,4H4C3.4477,4,3,3.5523,3,3V0.5C3,0.2239,3.2239,0,3.5,0S4,0.2239,4,0.5V2h1V1c0-0.5523,0.4477-1,1-1s1,0.4477,1,1v1h1V1 c0-0.5523,0.4477-1,1-1s1,0.4477,1,1v1h1V0.5C11,0.2239,11.2239,0,11.5,0S12,0.2239,12,0.5V3C12,3.5523,11.5523,4,11,4z M14,14.5 c0,0.2761-0.2239,0.5-0.5,0.5h-12C1.2239,15,1,14.7761,1,14.5S1.2239,14,1.5,14H2c0.5523,0,1-0.4477,1-1c0,0,1-6,1-7 c0-0.5523,0.4477-1,1-1h5c0.5523,0,1,0.4477,1,1c0,1,1,7,1,7c0,0.5523,0.4477,1,1,1h0.5c0.2723-0.0001,0.4946,0.2178,0.5,0.49V14.5z M9,10.5C9,9.6716,8.3284,9,7.5,9S6,9.6716,6,10.5V14h3V10.5z","castle-JP":"M12.5,12.75a1,1,0,0,1-1-.9995V7.25H10a1,1,0,0,1-1-1v-2H6v2a1,1,0,0,1-1,1H3.5v4.5a1,1,0,0,1-2,0V6.25a1,1,0,0,1,1-1H4v-2a1,1,0,0,1,1-1h5a1,1,0,0,1,1,1v2h1.5a1,1,0,0,1,1,1v5.5a1,1,0,0,1-.9995,1Z",caution:"M1.09302 11.8924L6.84044 1.3905C7.12539 0.869834 7.87461 0.869834 8.15956 1.3905L13.907 11.8924C14.1805 12.3922 13.818 13.0019 13.2474 13.0019H1.75258C1.18195 13.0019 0.819505 12.3922 1.09302 11.8924ZM8.29999 8L8.70296 5.5822C8.75375 5.27743 8.51873 5 8.20976 5H6.79022C6.48125 5 6.24623 5.27743 6.29703 5.5822L6.69999 8H8.29999ZM8.59999 9.9C8.59999 9.29249 8.10751 8.8 7.49999 8.8C6.89248 8.8 6.39999 9.29249 6.39999 9.9C6.39999 10.5075 6.89248 11 7.49999 11C8.10751 11 8.59999 10.5075 8.59999 9.9Z",cemetery:"M11.46,12h-0.68L12,3.55c0.0175-0.2867-0.2008-0.5332-0.4874-0.5507C11.4884,2.9979,11.4641,2.9981,11.44,3h-1.18 c0-0.92-1.23-2-2.75-2S4.77,2.08,4.77,3H3.54C3.253,2.9885,3.0111,3.2117,2.9995,3.4987C2.9988,3.5158,2.999,3.5329,3,3.55L4.2,12 H3.55C3.2609,11.9886,3.0162,12.2112,3,12.5V14h9v-1.51C11.9839,12.2067,11.7435,11.9886,11.46,12z M4.5,5h6v1h-6V5z","cemetery-JP":"M11.5,11h-3V2.5a.9448.9448,0,0,0-1-1,.9448.9448,0,0,0-1,1V11h-3a1,1,0,0,0,0,2h8a.9448.9448,0,0,0,1-1A1.0022,1.0022,0,0,0,11.5,11Z","charging-station":"m14 4v-1.51c-.0054-.2722-.2277-.4901-.5-.49-.2816.0047-.5062.2367-.5015.5184.0002.0105.0007.0211.0015.0316v2.45c0 .5523.4477 1 1 1v5.5c0 .2761-.2239.5-.5.5s-.5-.2239-.5-.5v-2c0-.8284-.6716-1.5-1.5-1.5h-1.5v-6c0-.5523-.4477-1-1-1h-6c-.5523 0-1 .4477-1 1v11c0 .5523.4477 1 1 1h6c.5523 0 1-.4477 1-1v-4h1.5c.2761 0 .5.2239.5.5v2c0 .8284.6716 1.5 1.5 1.5s1.5-.6716 1.5-1.5v-6.5c0-.5523-.4477-1-1-1zm-5.7996 3.3995-2.6006 3.4674-.0164-.0072c-.0465.0787-.1167.1403-.2146.1403-.1476 0-.2672-.1196-.2672-.2672 0-.028.0217-.0463.0297-.0717l-.0177-.0078.7766-2.3245c.054-.1617-.0664-.3288-.2369-.3288h-1.6539c-.2058 0-.3232-.2349-.1998-.3995l2.6006-3.4674.0164.0072c.0465-.0787.1167-.1403.2146-.1403.1476 0 .2672.1196.2672.2672 0 .028-.0217.0463-.0297.0717l.0176.0078-.7764 2.3244c-.0541.1618.0663.3289.2368.3289h1.6539c.2058 0 .3232.2349.1998.3995z",cinema:"M14,7.5v2c0,0.2761-0.2239,0.5-0.5,0.5S13,9.7761,13,9.5c0,0,0.06-0.5-1-0.5h-1v2.5c0,0.2761-0.2239,0.5-0.5,0.5h-8 C2.2239,12,2,11.7761,2,11.5v-4C2,7.2239,2.2239,7,2.5,7h8C10.7761,7,11,7.2239,11,7.5V8h1c1.06,0,1-0.5,1-0.5 C13,7.2239,13.2239,7,13.5,7S14,7.2239,14,7.5z M4,3C2.8954,3,2,3.8954,2,5s0.8954,2,2,2s2-0.8954,2-2S5.1046,3,4,3z M4,6 C3.4477,6,3,5.5523,3,5s0.4477-1,1-1s1,0.4477,1,1S4.5523,6,4,6z M8.5,2C7.1193,2,6,3.1193,6,4.5S7.1193,7,8.5,7S11,5.8807,11,4.5 S9.8807,2,8.5,2z M8.5,6C7.6716,6,7,5.3284,7,4.5S7.6716,3,8.5,3S10,3.6716,10,4.5S9.3284,6,8.5,6z",circle:"M14,7.5c0,3.5899-2.9101,6.5-6.5,6.5S1,11.0899,1,7.5S3.9101,1,7.5,1S14,3.9101,14,7.5z","circle-stroked":"M7.5 12.3C4.84898 12.3 2.7 10.151 2.7 7.5C2.7 4.84898 4.84898 2.7 7.5 2.7C10.151 2.7 12.3 4.84898 12.3 7.5C12.3 10.151 10.151 12.3 7.5 12.3ZM7.5 14C11.0899 14 14 11.0899 14 7.5C14 3.9101 11.0899 1 7.5 1C3.9101 1 1 3.9101 1 7.5C1 11.0899 3.9101 14 7.5 14Z",city:"M12.6368 3.9994H10.9981V2.3608C10.998 2.16148 10.8364 1.99994 10.6371 2H10.3591C10.1598 2 9.9982 2.16158 9.9982 2.3609V3.9994H8.36C8.16068 3.9994 7.9991 4.16098 7.9991 4.3603V9.9984H4.3621C4.16168 9.9984 3.9992 10.1609 3.9992 10.3613V12.6358C3.99975 12.8358 4.16207 12.9977 4.3621 12.9977H12.6368C12.8361 12.9977 12.9977 12.8361 12.9977 12.6368V4.36C12.9977 4.16068 12.8361 3.9994 12.6368 3.9994ZM5.9989 11.9981H4.9989V10.9981H5.9989V11.9981ZM7.9989 11.9981H6.9989V10.9981H7.9989V11.9981ZM9.9989 11.9981H8.9989V10.9981H9.9989V11.9981ZM9.9989 9.9981H8.9989V8.9981H9.9989V9.9981ZM9.9989 7.9981H8.9989V6.9981H9.9989V7.9981ZM9.9989 5.9981H8.9989V4.9981H9.9989V5.9981ZM11.9989 11.9971H10.9989V10.9971H11.9989V11.9971ZM11.9989 9.9971H10.9989V8.9971H11.9989V9.9971ZM11.9989 7.9971H10.9989V6.9971H11.9989V7.9971ZM11.9989 5.9971H10.9989V4.9971H11.9989V5.9971ZM6.9987 2.3608C6.99864 2.16152 6.83708 2 6.6378 2H4.36C4.16068 2 3.9991 2.16158 3.9991 2.3609V4H2.36C2.16138 4.00049 2.00049 4.16138 2 4.36V12.6474C2 12.8407 2.1567 12.9974 2.35 12.9974H2.9994V8.9986H6.9987V2.3608ZM4 7.9981H3V6.9981H4V7.9981ZM4 5.9981H3V4.9981H4V5.9981ZM6 7.9981H5V6.9981H6V7.9981ZM6 5.9981H5V4.9981H6V5.9981ZM6 3.9981H5V3H6V4V3.9981Z","clothing-store":"M4 2L1 4.5L1 7H4V13H11V7H14V4.5L11 2H9.5L7.5 6L5.5 2L4 2Z",college:"M7.5,1L0,4.5l2,0.9v1.7C1.4,7.3,1,7.9,1,8.5s0.4,1.2,1,1.4V10l-0.9,2.1 C0.8,13,1,14,2.5,14s1.7-1,1.4-1.9L3,10c0.6-0.3,1-0.8,1-1.5S3.6,7.3,3,7.1V5.9L7.5,8L15,4.5L7.5,1z M11.9,7.5l-4.5,2L5,8.4v0.1 c0,0.7-0.3,1.3-0.8,1.8l0.6,1.4v0.1C4.9,12.2,5,12.6,4.9,13c0.7,0.3,1.5,0.5,2.5,0.5c3.3,0,4.5-2,4.5-3L11.9,7.5L11.9,7.5z","college-JP":"M12.5,2.9992h-4v-1a1,1,0,0,0-2,0v1h-4a1,1,0,0,0,0,2h.67A10.8169,10.8169,0,0,0,5.15,8.8105c.3331.4313.6594.8248.9785,1.1936a14.3825,14.3825,0,0,1-2.6074,2.117,1,1,0,1,0,.955,1.7581h0A15.65,15.65,0,0,0,7.5,11.4613a15.65,15.65,0,0,0,3.0239,2.4179,1,1,0,1,0,.9551-1.7578,14.3789,14.3789,0,0,1-2.6073-2.1171c.3191-.3688.6453-.7622.9784-1.1935a10.818,10.818,0,0,0,1.98-3.8116h.67a1,1,0,0,0,0-2ZM8.2671,7.5879c-.2614.3385-.5154.6413-.767.937-.2517-.2957-.5057-.5985-.7672-.937A9.5885,9.5885,0,0,1,5.2676,4.9992H9.7319A9.5789,9.5789,0,0,1,8.2671,7.5879Z",commercial:"m14 6h-13c.0881-1.3829.427-2.7383 1-4h11c.5731 1.2617.9119 2.6171 1 4zm-11 1h9v6h-1v-5h-3v5h-5zm1 3h3v-2h-3z","communications-tower":"M11.8545,6.4336l-.4131-.2813a4.7623,4.7623,0,0,0,.2813-4.8779l-.0835-.1533L12.0747.875l.0908.167a5.2619,5.2619,0,0,1-.311,5.3916Zm1.1521,7.1316V14h-11v-.4348H4.4952L6.0439,6.4a.5.5,0,0,1,.4888-.3945h.7255V4.6014A1.14,1.14,0,0,1,6.3756,3.5a1.1568,1.1568,0,1,1,2.3136,0,1.14,1.14,0,0,1-.931,1.1112V6.0059h.7223A.5.5,0,0,1,8.9692,6.4l1.5478,7.1648ZM8.4543,8.751H6.5588L6.236,10.2441H8.777ZM6.1279,10.7441l-.3233,1.4952H9.2082l-.3231-1.4952ZM6.936,7.0059,6.6669,8.251H8.3463L8.0771,7.0059ZM5.5179,13.5652H9.4948l-.1786-.8259h-3.62ZM5.21,5.0137a2.7523,2.7523,0,0,1,.0161-3.0518L4.812,1.6826a3.25,3.25,0,0,0-.019,3.6065ZM10.7568,3.5a3.2433,3.2433,0,0,0-.5341-1.7861l-.418.2754a2.7517,2.7517,0,0,1-.0176,3.0488l.4141.2793A3.2341,3.2341,0,0,0,10.7568,3.5ZM3.5342,6.1182A4.7637,4.7637,0,0,1,3.3813,1.13L2.9478.88a5.2643,5.2643,0,0,0,.1694,5.5137Z",confectionery:"M13,4a1,1,0,0,0-1-1,1,1,0,0,0-2,0V5.0673A3.4808,3.4808,0,0,0,4.3583,9H2a1,1,0,0,0,0,2,1,1,0,0,0,1,1,1,1,0,0,0,2,0V9.9326A3.4807,3.4807,0,0,0,10.6417,6H13a1,1,0,0,0,0-2ZM7.5,9.9925A2.484,2.484,0,0,1,6.3184,5.319a1.0809,1.0809,0,0,1,.5459.307A2.1243,2.1243,0,0,1,7.25,7.0117l.001.9561A2.5821,2.5821,0,0,0,7.76,9.7031a1.5462,1.5462,0,0,0,.2591.2333A2.4861,2.4861,0,0,1,7.5,9.9925ZM8.6815,9.681a1.0813,1.0813,0,0,1-.5458-.307A2.1243,2.1243,0,0,1,7.75,7.9883l-.001-.9561A2.5821,2.5821,0,0,0,7.24,5.2969a1.5557,1.5557,0,0,0-.2592-.2334A2.4843,2.4843,0,0,1,8.6815,9.681Z",construction:"M13.5 11h-1.8L8.2.5C8-.2 7-.2 6.8.5L3.3 11H1.5c-.3 0-.5.2-.5.5v1c0 .3.2.5.5.5h12c.3 0 .5-.2.5-.5v-1c0-.3-.2-.5-.5-.5ZM7 3h1l.7 2H6.4L7 3ZM5.7 7h3.6l.7 2H5l.7-2Z",convenience:"M2.9982,3.0687s.1875-1.062,1-1.062H5.0043V1.7276a.5.5,0,0,1,.5-.5H9.4882a.5.5,0,0,1,.5.5v.2791h1.01a.8324.8324,0,0,1,.6373.2937,1.7589,1.7589,0,0,1,.3627.7683s.3108,1.5719.5921,2.9181h-.938L11,3,3.982,2.9956,3.3336,5.9868H2.382Zm11,4.9144a1,1,0,0,1-.9992,1l-1.0008,3.973s-.1875,1.0417-1,1.0417h-7c-.8125,0-1-1.0417-1-1.0417L1.9822,8.98a.9985.9985,0,0,1,.016-1.9968h11A1,1,0,0,1,13.9982,7.9831ZM5.0327,12.13,5.03,11.0051,4.6392,9.4686a.5373.5373,0,1,0-1.0649.1445L3.78,11.0075l.1874,1.2672A.5373.5373,0,1,0,5.0327,12.13Zm2-2.5967A.5332.5332,0,0,0,6.4994,9l-.0039.0008L6.4886,9a.4992.4992,0,0,0-.3575.1509.529.529,0,0,0-.1648.3828v2.68a.5332.5332,0,1,0,1.0663,0Zm1.998,0A.5314.5314,0,0,0,8.694,9.04a.4992.4992,0,0,0-.393,0,.5312.5312,0,0,0-.3366.4934v2.68a.5331.5331,0,1,0,1.0662,0Zm2.3857.08a.5373.5373,0,1,0-1.0649-.1445L9.96,10.9938,9.9579,12.13a.5373.5373,0,1,0,1.0649.1446Z",cricket:"M8,1.5C8,2.3284,7.3284,3,6.5,3S5,2.3284,5,1.5S5.6716,0,6.5,0S8,0.6716,8,1.5z M10.88,7.18L10.88,7.18l-2-2l0,0l0,0 C8.7815,5.0616,8.6339,4.9952,8.48,5H3.75C3.3736,4.9915,3.0508,5.2669,3,5.64l0,0l-1,7.7l0,0c-0.0068,0.0464-0.0068,0.0936,0,0.14 c0,0.2761,0.2239,0.5,0.5,0.5c0.2251,0.0153,0.4315-0.1251,0.5-0.34l0,0l1.2-3.89l0,0l0.26-0.83l0.4,0.44l0,0L6,10.6v2.9 C6,13.7761,6.2239,14,6.5,14S7,13.7761,7,13.5v-3l0,0l0,0c-0.0081-0.0788-0.0356-0.1544-0.08-0.22l0,0L5.48,8.5l1-2.5h1.71l2,1.84 l0,0c0.0928,0.1077,0.2278,0.1697,0.37,0.17C10.8163,7.9791,11.007,7.7581,11,7.5C10.9997,7.3824,10.9571,7.2688,10.88,7.18z M14,11.27c-0.4142,0-0.75,0.3358-0.75,0.75s0.3358,0.75,0.75,0.75s0.75-0.3358,0.75-0.75S14.4142,11.27,14,11.27z M10.76,9.74V9 c0-0.1381-0.1119-0.25-0.25-0.25S10.26,8.8619,10.26,9v0.74c-0.1522,0.0855-0.2474,0.2455-0.25,0.42v3.34 c0,0.2761,0.2239,0.5,0.5,0.5s0.5-0.2239,0.5-0.5v-3.34C11.0074,9.9855,10.9122,9.8255,10.76,9.74z",cross:"M3.64 2.27L7.5 6.13L11.34 2.29C11.5114 2.1076 11.7497 2.0029 12 2C12.5523 2 13 2.4477 13 3C13.0047 3.2478 12.907 3.4866 12.73 3.66L8.84 7.5L12.73 11.39C12.8948 11.5512 12.9915 11.7696 13 12C13 12.5523 12.5523 13 12 13C11.7423 13.0107 11.492 12.9127 11.31 12.73L7.5 8.87L3.65 12.72C3.4793 12.8963 3.2453 12.9971 3 13C2.4477 13 2 12.5523 2 12C1.9953 11.7522 2.093 11.5134 2.27 11.34L6.16 7.5L2.27 3.61C2.1052 3.4488 2.0085 3.2304 2 3C2 2.4477 2.4477 2 3 2C3.2404 2.0029 3.4701 2.0998 3.64 2.27Z",dam:"M13.94,9.5c0,0.2761-0.2239,0.5-0.5,0.5l0,0c-0.259,0.0219-0.4994,0.1439-0.67,0.34c-0.2714,0.2887-0.6175,0.4964-1,0.6 c-0.6115,0.1816-1.2734,0.0424-1.76-0.37l-0.39-0.35c-0.2976-0.3038-0.7851-0.3087-1.0889-0.0111 C8.5274,10.2126,8.5237,10.2163,8.52,10.22c-0.14,0.12-0.27,0.25-0.42,0.37c-0.7278,0.5784-1.7663,0.5489-2.46-0.07L5.3,10.19 l-0.1-0.06l0.3,1.22l0.49,2c0.0829,0.2634-0.0634,0.5441-0.3267,0.6271C5.6105,13.9937,5.5553,14.0014,5.5,14h-4 C1.2239,14,1,13.7761,1,13.5v-12C1,1.2239,1.2239,1,1.5,1h1.1c0.2346-0.0011,0.4384,0.1611,0.49,0.39L4,5.06V5.2 c0.6569-0.314,1.4361-0.2205,2,0.24c0.16,0.13,0.31,0.28,0.47,0.41c0.2847,0.2546,0.7153,0.2546,1,0c0.16-0.13,0.31-0.28,0.47-0.41 c0.7076-0.5968,1.7424-0.5968,2.45,0c0.15,0.13,0.29,0.27,0.44,0.39c0.2847,0.2546,0.7153,0.2546,1,0l0.47-0.41 c0.3163-0.2672,0.7159-0.4157,1.13-0.42l0,0c0.2761,0,0.5,0.2239,0.5,0.5S13.7061,6,13.43,6l0,0 c-0.259,0.0219-0.4994,0.1439-0.67,0.34c-0.2714,0.2887-0.6175,0.4964-1,0.6C11.1485,7.1216,10.4866,6.9824,10,6.57L9.67,6.23 C9.3724,5.9262,8.8849,5.9213,8.5811,6.2189C8.5774,6.2226,8.5737,6.2263,8.57,6.23C8.43,6.35,8.3,6.48,8.15,6.6 C7.4222,7.1784,6.3837,7.1489,5.69,6.53L5.3,6.19c-0.2847-0.2546-0.7153-0.2546-1,0L4.24,6.24L4.93,9 C5.3226,9.029,5.6965,9.1793,6,9.43c0.16,0.13,0.31,0.28,0.47,0.41c0.2847,0.2546,0.7153,0.2546,1,0c0.16-0.13,0.31-0.28,0.47-0.41 c0.7076-0.5968,1.7424-0.5968,2.45,0c0.15,0.13,0.29,0.27,0.44,0.39c0.2847,0.2546,0.7153,0.2546,1,0l0.47-0.41 c0.3177-0.2636,0.7172-0.4085,1.13-0.41l0,0c0.2761-0.0055,0.5044,0.2138,0.5099,0.4899C13.94,9.4933,13.94,9.4966,13.94,9.5z",danger:"M13.94,14.68c-0.0749,0.194-0.262,0.3215-0.47,0.32c-0.0595,0.0107-0.1205,0.0107-0.18,0L7.5,12.56L1.7,15 c-0.2572,0.1005-0.5472-0.0266-0.6476-0.2838C1.0516,14.7141,1.0508,14.7121,1.05,14.71c-0.1291-0.2441-0.0358-0.5467,0.2084-0.6757 C1.2845,14.0205,1.3118,14.009,1.34,14l4.85-2l-4.85-2C1.0758,9.9197,0.9267,9.6404,1.007,9.3762s0.3596-0.4133,0.6238-0.333 C1.6545,9.0504,1.6776,9.0594,1.7,9.07l5.8,2.41l5.8-2.41c0.2494-0.1185,0.5477-0.0124,0.6662,0.237 c0.1185,0.2494,0.0124,0.5477-0.237,0.6662C13.7068,9.9839,13.6837,9.9928,13.66,10L8.8,12l4.85,2 c0.2607,0.091,0.3983,0.3761,0.3074,0.6368C13.9523,14.6515,13.9465,14.6659,13.94,14.68z M12,4.23v0.45 c-0.0021,0.2129-0.0722,0.4196-0.2,0.59C11.2414,5.8883,10.6399,6.4664,10,7v1.16c0.0015,0.208-0.126,0.3951-0.32,0.47L7.52,9.5 H7.45L5.28,8.63C5.1016,8.5428,4.9917,8.3584,5,8.16V7C4.3528,6.4675,3.7446,5.8893,3.18,5.27C3.0593,5.0972,2.9963,4.8907,3,4.68 V4.23C3.1669,2.0117,4.8974,0.2307,7.11,0h0.36l0,0h0.39C10.0862,0.2131,11.8348,1.9997,12,4.23z M6,4c0-0.5523-0.4477-1-1-1 S4,3.4477,4,4s0.4477,1,1,1S6,4.5523,6,4z M7,7c0-0.2761-0.2239-0.5-0.5-0.5S6,6.7239,6,7v0.5C6,7.7761,6.2239,8,6.5,8 S7,7.7761,7,7.5V7z M9,7c0-0.2761-0.2239-0.5-0.5-0.5S8,6.7239,8,7v0.5C8,7.7761,8.2239,8,8.5,8S9,7.7761,9,7.5V7z M11,4 c0-0.5523-0.4477-1-1-1S9,3.4477,9,4s0.4477,1,1,1S11,4.5523,11,4z",defibrillator:"m1.54995 7.33811c-2.386799-4.5965 3.63-7.660899 5.952-3.0644 2.3215-4.596499 8.33875-1.5322 5.95235 3.0644-.0869.1671-.2028.3456-.3114.5212h-1.8079l-1.81455-2.7216c-.06321-.09473-.1511-.1704-.25417-.21884-.10308-.04843-.21743-.06779-.3307-.05599-.11327.01181-.22117.05433-.31205.12298-.09087.06865-.16126.16082-.20358.26655l-1.6484 4.12-1.33-1.33c-.11716-.11707-.27597-.18288-.4416-.183h-3.1389c-.1086-.1757-.2245-.3542-.3111-.5213zm9.45005 1.7713c-.103-.00003-.2044-.02545-.2951-.07399-.0908-.04854-.1682-.11871-.2254-.20431l-1.34085-2.0111-1.5587 3.89679c-.03839.096-.10002.181-.17936.2474-.07935.0663-.17393.1119-.27524.1326-.04125.0086-.08327.0128-.1254.0126-.16568.0001-.32462-.0656-.4419-.1826l-1.8169-1.81739h-2.0054c1.36645 1.66819 2.85739 3.23039 4.46 4.67319.08531.077.19616.1197.3111.1197s.22579-.0427.3111-.1197c1.59778-1.4447 3.08545-3.0068 4.45055-4.67319z",dentist:"M4.36,14c-1,0-0.56-2.67-0.86-5c-0.1-0.76-1-1.49-1.12-2.06C2,5,1.39,1.44,3.66,1S6,3,7.54,3s1.57-2.36,3.85-2 s1.59,3.9,1.29,5.9c-0.1,0.45-1.1,1.48-1.18,2.06c-0.33,2.4,0.32,5-0.8,5c-0.93,0-1.32-2.72-2-4.5C8.43,8.63,8.06,8,7.54,8 C6,8,5.75,14,4.36,14z",diamond:"M7.03715 1.20147L2.12542 6.7C2.04962 6.78393 2.00568 6.89005 2.00051 7C1.99535 7.10994 2.02925 7.21013 2.09689 7.3L7.0065 13.7601C7.06233 13.8343 7.13629 13.8947 7.22216 13.9365C7.30803 13.9782 7.40331 14 7.5 14C7.59669 14 7.69197 13.9782 7.77784 13.9365C7.86371 13.8947 7.93766 13.8343 7.9935 13.7601L12.9031 7.3C12.9707 7.21013 13.0047 7.10994 12.9995 7C12.9943 6.89005 12.9504 6.78393 12.8746 6.7L7.96285 1.20147C7.90591 1.13833 7.83501 1.08761 7.75508 1.05282C7.67514 1.01802 7.5881 1 7.5 1C7.4119 1 7.32486 1.01802 7.24492 1.05282C7.16499 1.08761 7.09409 1.13833 7.03715 1.20147Z",doctor:"M5.5,7C4.1193,7,3,5.8807,3,4.5l0,0v-2C3,2.2239,3.2239,2,3.5,2H4c0.2761,0,0.5-0.2239,0.5-0.5S4.2761,1,4,1H3.5 C2.6716,1,2,1.6716,2,2.5v2c0.0013,1.1466,0.5658,2.2195,1.51,2.87l0,0C4.4131,8.1662,4.9514,9.297,5,10.5C5,12.433,6.567,14,8.5,14 s3.5-1.567,3.5-3.5V9.93c1.0695-0.2761,1.7126-1.367,1.4365-2.4365C13.1603,6.424,12.0695,5.7809,11,6.057 C9.9305,6.3332,9.2874,7.424,9.5635,8.4935C9.7454,9.198,10.2955,9.7481,11,9.93v0.57c0,1.3807-1.1193,2.5-2.5,2.5S6,11.8807,6,10.5 c0.0511-1.2045,0.5932-2.3356,1.5-3.13l0,0C8.4404,6.7172,9.001,5.6448,9,4.5v-2C9,1.6716,8.3284,1,7.5,1H7 C6.7239,1,6.5,1.2239,6.5,1.5S6.7239,2,7,2h0.5C7.7761,2,8,2.2239,8,2.5v2l0,0C8,5.8807,6.8807,7,5.5,7 M11.5,9 c-0.5523,0-1-0.4477-1-1s0.4477-1,1-1s1,0.4477,1,1S12.0523,9,11.5,9z","dog-park":"M 10.300781 1.2207031 C 9.9144812 1.2207031 9.6 1.2 9.5 2 L 9.0996094 4.5214844 L 11.5 6.5 L 13.5 6.5 C 14.9 6.5 15 5.5410156 15 5.5410156 L 13.099609 3.3222656 C 12.399609 2.6222656 11.7 2.5 11 2.5 L 11 2 C 11 2 11.067481 1.2206031 10.300781 1.2207031 z M 4.75 1.5 C 4.75 1.5 3.7992187 1.5206031 3.1992188 1.7207031 C 2.5992187 1.9207031 2 2.6210938 2 3.6210938 L 2 7.5214844 C 2 9.2214844 1.3 9.5 1 9.5 C 1 9.5 0 9.5214844 0 10.521484 L 0 12.720703 C 0 12.720703 0.00078125 13.521484 0.80078125 13.521484 L 1 13.521484 L 1.5 13.521484 L 2 13.521484 L 2 13.021484 L 2 12.822266 C 2 12.422266 1.8 12.221094 1.5 12.121094 L 1.5 11.021484 C 2.5 11.021484 2.6 10.820703 3 10.720703 L 3.5507812 12.917969 C 3.6507813 13.217969 3.7507813 13.417578 4.0507812 13.517578 L 5.0507812 13.517578 L 6 13.5 L 6 12.699219 C 6 12.022819 5 12 5 12 L 5 9.5 L 8.5 9.5 L 9.1992188 12.121094 C 9.5992188 13.521094 10.5 13.5 10.5 13.5 L 11 13.5 L 12 13.5 L 12 12.699219 C 12 11.987419 11 12 11 12 L 11.099609 7.921875 L 8 5.5 L 3.5 5.5 L 3.5 3.5 C 3.5 3.1 3.7765 3.0053 4 3 C 4.4941 2.9882 4.75 3 4.75 3 C 5.1642 3 5.5 2.6642 5.5 2.25 C 5.5 1.8358 5.1642 1.5 4.75 1.5 z M 11.75 4 C 11.8881 4 12 4.1119 12 4.25 C 12 4.3881 11.8881 4.5 11.75 4.5 C 11.6119 4.5 11.5 4.3881 11.5 4.25 C 11.5 4.1119 11.6119 4 11.75 4 z","drinking-water":"M6,1A2,2,0,0,0,4,3V6.5a.5.5,0,0,0,.5.5h2A.5.5,0,0,0,7,6.5v-2A.5.5,0,0,1,7.5,4H14V1ZM7,15H4a.5.5,0,0,1-.48-.38L2,8.62a.5.5,0,0,1,.365-.606A.558.558,0,0,1,2.5,8h6a.5.5,0,0,1,.514.485A.47.47,0,0,1,9,8.62l-1.5,6A.5.5,0,0,1,7,15ZM3.65,11H7.36l.5-2H3.14Z",elevator:"M11,1H4A1,1,0,0,0,3,2V13a1,1,0,0,0,1,1h7a1,1,0,0,0,1-1V2A1,1,0,0,0,11,1ZM7.5,12.5l-2-4h4Zm-2-6,2-4,2,4Z",embassy:"M6.65,2C5.43,2,4.48,3.38,4.11,3.82C4.0365,3.9102,3.9975,4.0237,4,4.14v4.4C3.9884,8.7827,4.1758,8.9889,4.4185,9.0005 C4.528,9.0057,4.6355,8.9699,4.72,8.9c0.4665-0.6264,1.1589-1.0461,1.93-1.17C8.06,7.73,8.6,9,10.07,9 c0.9948-0.0976,1.9415-0.4756,2.73-1.09c0.1272-0.0934,0.2016-0.2422,0.2-0.4V2.45c0.0275-0.2414-0.1459-0.4595-0.3874-0.487 C12.5332,1.954,12.4527,1.9668,12.38,2c-0.6813,0.5212-1.4706,0.8834-2.31,1.06C8.6,3.08,8.12,2,6.65,2z M2.5,3 c-0.5523,0-1-0.4477-1-1s0.4477-1,1-1s1,0.4477,1,1S3.0523,3,2.5,3z M3,4v9.48c0,0.2761-0.2239,0.5-0.5,0.5S2,13.7561,2,13.48V4 c0-0.2761,0.2239-0.5,0.5-0.5S3,3.7239,3,4z","emergency-phone":"M7.875,11.49a.51.51,0,0,0,.72,0l.72-.72,2.18,2.16-.37.37a2.24,2.24,0,0,1-1.44.7H8.24a2.24,2.24,0,0,1-1.45-.7L1.72,8.23A2.24,2.24,0,0,1,1,6.78V5.33a2.24,2.24,0,0,1,.72-1.45l.36-.36L4.26,5.69l-.73.73a.51.51,0,0,0,0,.72Zm4.72.38a1,1,0,0,0,.036-1.414h0l-.036-.036-.72-.72a1,1,0,0,0-1.414-.036h0l-.036.036ZM5.315,4.62a1,1,0,0,0,.036-1.414h0L4.595,2.45a1,1,0,0,0-1.414-.036h0L3.14,2.45ZM10,2V4H8V5h2V7h1V5h2V4H11V2Z",entrance:"m8 6.5v-1c0-.26522-.10536-.51957-.29289-.70711-.18754-.18753-.44189-.29289-.70711-.29289s-.51957.10536-.70711.29289c-.18753.18754-.29289.44189-.29289.70711v3zm-2-3.5c0-.19778.05865-.39112.16853-.55557s.26606-.29262.44879-.36831c.18272-.07569.38379-.09549.57777-.0569.19398.03858.37216.13382.51202.27367.13985.13986.23509.31804.27368.51202.03858.19398.01878.39505-.05691.57777-.07569.18273-.20386.33891-.36831.44879s-.35779.16853-.55557.16853c-.26522 0-.51957-.10536-.70711-.29289-.18753-.18754-.29289-.44189-.29289-.70711zm9 3c0 .26522-.1054.51957-.2929.70711-.1875.18753-.4419.29289-.7071.29289h-1.58c-.1316-.00076-.2621.02446-.3839.07423-.1218.04976-.2327.12309-.3261.21577l-5.42 5.42c-.18626.1847-.43766.2889-.7.29h-2.59c-.26522 0-.51957-.1054-.70711-.2929-.18753-.1875-.29289-.4419-.29289-.7071s.10536-.5196.29289-.7071c.18754-.1875.44189-.2929.70711-.2929h1.59c.26234-.0011.51374-.1053.7-.29l5.42-5.42c.0934-.09268.2043-.16601.3261-.21577.1218-.04977.2523-.07499.3839-.07423h2.58c.2652 0 .5196.10536.7071.29289.1875.18754.2929.44189.2929.70711z","entrance-alt1":"M6.554,9.639a.5.5,0,0,0,.707.707L9.928,7.669a.25.25,0,0,0,0-.354h0L7.261,4.639a.5.5,0,0,0-.707.707L8.2,7H1.5a.5.5,0,0,0,0,1H8.2ZM12,1H5.5a.5.5,0,0,0,0,1h6a.5.5,0,0,1,.5.5v10a.5.5,0,0,1-.5.5H5.25a.5.5,0,0,0,0,1H12a1,1,0,0,0,1-1V2A1,1,0,0,0,12,1Z",farm:"m8 6-3-2-3 2-1 2v4h2v-2h4v2h2v-4zm-2 2h-2v-2h2zm8 4h-3v-9.5c0-.39782.158-.77936.4393-1.06066s.6629-.43934 1.0607-.43934.7794.15804 1.0607.43934.4393.66284.4393 1.06066z","fast-food":"M14,8c0,0.5523-0.4477,1-1,1H2C1.4477,9,1,8.5523,1,8s0.4477-1,1-1h11C13.5523,7,14,7.4477,14,8z M3.5,10H2 c0,1.6569,1.3431,3,3,3h5c1.6569,0,3-1.3431,3-3H3.5z M3,6H2V4c0-1.1046,0.8954-2,2-2h7c1.1046,0,2,0.8954,2,2v2H3z M11,4.5 C11,4.7761,11.2239,5,11.5,5S12,4.7761,12,4.5S11.7761,4,11.5,4S11,4.2239,11,4.5z M9,3.5C9,3.7761,9.2239,4,9.5,4S10,3.7761,10,3.5 S9.7761,3,9.5,3S9,3.2239,9,3.5z M7,4.5C7,4.7761,7.2239,5,7.5,5S8,4.7761,8,4.5S7.7761,4,7.5,4S7,4.2239,7,4.5z M5,3.5 C5,3.7761,5.2239,4,5.5,4S6,3.7761,6,3.5S5.7761,3,5.5,3S5,3.2239,5,3.5z M3,4.5C3,4.7761,3.2239,5,3.5,5S4,4.7761,4,4.5 S3.7761,4,3.5,4S3,4.2239,3,4.5z",fence:"m13.5 9h-.5v-3h.5c.1326 0 .2598-.05268.3536-.14644.0937-.09377.1464-.22095.1464-.35356s-.0527-.25978-.1464-.35355c-.0938-.09377-.221-.14645-.3536-.14645h-.5v-2l-.286-.573c-.0218-.03651-.0525-.06683-.0894-.08809-.0368-.02125-.0784-.03273-.1209-.03333s-.0845.00969-.1219.0299c-.0374.0202-.069.04964-.0918.08552l-.29.579v2h-1v-2l-.286-.573c-.0218-.03651-.0525-.06683-.0894-.08809-.0368-.02125-.0784-.03273-.1209-.03333s-.0845.00969-.1219.0299c-.0374.0202-.069.04964-.0918.08552l-.29.579v2h-1v-2l-.286-.573c-.02178-.03651-.05254-.06683-.08936-.08809-.03681-.02125-.07846-.03273-.12096-.03333-.04251-.0006-.08446.00969-.12187.0299-.0374.0202-.06901.04964-.09181.08552l-.29.579v2h-1v-2l-.286-.573c-.02178-.03651-.05254-.06683-.08936-.08809-.03681-.02125-.07846-.03273-.12096-.03333-.04251-.0006-.08446.00969-.12187.0299-.0374.0202-.06901.04964-.09181.08552l-.29.579v2h-1v-2l-.286-.573c-.02178-.03651-.05254-.06683-.08936-.08809-.03681-.02125-.07846-.03273-.12096-.03333-.04251-.0006-.08446.00969-.12187.0299-.0374.0202-.06901.04964-.09181.08552l-.29.579v2h-1v-2l-.286-.573c-.02178-.03651-.05254-.06683-.08936-.08809-.03681-.02125-.07846-.03273-.12096-.03333-.04251-.0006-.08446.00969-.12187.0299-.0374.0202-.06901.04964-.09181.08552l-.29.579v2h-.5c-.13261 0-.25979.05268-.35355.14645-.09377.09377-.14645.22094-.14645.35355s.05268.25979.14645.35356c.09376.09376.22094.14644.35355.14644h.5v3h-.5c-.13261 0-.25979.05268-.35355.14645-.09377.09377-.14645.22094-.14645.35355s.05268.25979.14645.35356c.09376.09376.22094.14644.35355.14644h.5v1.5c0 .1326.05268.2598.14645.3536.09376.0937.22094.1464.35355.1464s.25979-.0527.35355-.1464c.09377-.0938.14645-.221.14645-.3536v-1.5h1v1.5c0 .1326.05268.2598.14645.3536.09376.0937.22094.1464.35355.1464s.25979-.0527.35355-.1464c.09377-.0938.14645-.221.14645-.3536v-1.5h1v1.5c0 .1326.05268.2598.14645.3536.09376.0937.22094.1464.35355.1464s.25979-.0527.35355-.1464c.09377-.0938.14645-.221.14645-.3536v-1.5h1v1.5c0 .1326.05268.2598.14645.3536.09376.0937.22094.1464.35355.1464s.25979-.0527.35355-.1464c.09377-.0938.14645-.221.14645-.3536v-1.5h1v1.5c0 .1326.0527.2598.1464.3536.0938.0937.221.1464.3536.1464s.2598-.0527.3536-.1464c.0937-.0938.1464-.221.1464-.3536v-1.5h1v1.5c0 .1326.0527.2598.1464.3536.0938.0937.221.1464.3536.1464s.2598-.0527.3536-.1464c.0937-.0938.1464-.221.1464-.3536v-1.5h.5c.1326 0 .2598-.05268.3536-.14644.0937-.09377.1464-.22095.1464-.35356s-.0527-.25978-.1464-.35355c-.0938-.09377-.221-.14645-.3536-.14645zm-10.5 0v-3h1v3zm2 0v-3h1v3zm2 0v-3h1v3zm2 0v-3h1v3zm2 0v-3h1v3z",ferry:"M5.33,11c0.6745,0.009,1.3262,0.245,1.85,0.67l0.26,0.23h0.05l0.31-0.28c0.9817-0.8115,2.379-0.8846,3.44-0.18L13.5,7L12,6 V2.45c-0.0466-0.8-0.6989-1.4305-1.5-1.45H10c0.0343-0.518-0.3579-0.9657-0.8759-1C9.0828-0.0027,9.0413-0.0027,9,0H6 C5.482-0.0343,5.0343,0.3579,5,0.8759C4.9973,0.9172,4.9973,0.9587,5,1H4.5C3.6989,1.0195,3.0466,1.65,3,2.45V6L1.5,7l2.25,4.53 C4.2143,11.2041,4.7631,11.02,5.33,11z M4,2.45c0.0105-0.2594,0.2293-0.4611,0.4886-0.4506C4.4924,1.9996,4.4962,1.9998,4.5,2h6 c0.259-0.0171,0.4829,0.1789,0.5,0.4379c0.0014,0.0207,0.0014,0.0414,0,0.0621v3l-3.5-2L4,5.45C4,5.45,4,2.45,4,2.45z M14,13v1 c-0.2626,0.0194-0.5069,0.1416-0.68,0.34c-0.2717,0.2883-0.6178,0.4959-1,0.6c-0.6147,0.1815-1.2795,0.0425-1.77-0.37l-0.39-0.35 c-0.3043-0.3026-0.7957-0.3026-1.1,0c-0.14,0.12-0.27,0.25-0.42,0.37c-0.7328,0.5856-1.7814,0.556-2.48-0.07l-0.39-0.35 c-0.2864-0.2502-0.7136-0.2502-1,0c-0.19,0.15-0.36,0.32-0.55,0.47c-0.7043,0.5215-1.6732,0.4968-2.35-0.06l-0.31-0.27 C1.4153,14.1443,1.2172,14.0346,1,14v-1c0.2585-0.032,0.5205,0.0169,0.75,0.14c0.2782,0.1722,0.5424,0.3661,0.79,0.58 c0.2051,0.2235,0.5147,0.319,0.81,0.25c0.1125-0.0333,0.2177-0.0876,0.31-0.16c0.16-0.12,0.29-0.26,0.45-0.39 c0.7106-0.5888,1.7394-0.5888,2.45,0c0.16,0.13,0.31,0.28,0.47,0.41c0.2864,0.2502,0.7136,0.2502,1,0c0.16-0.13,0.31-0.28,0.47-0.41 c0.7123-0.5943,1.7477-0.5943,2.46,0c0.15,0.13,0.29,0.27,0.44,0.39c0.2864,0.2502,0.7136,0.2502,1,0l0.47-0.41 C13.1895,13.1408,13.5886,12.9995,14,13z","ferry-JP":"M9.5 12.5H5.5L5.5 8C5.5 6.91153 6.07979 5.44812 6.85389 4.13809C7.07346 3.76652 7.29495 3.43049 7.5 3.1451C7.70505 3.43049 7.92654 3.76652 8.14611 4.13809C8.92021 5.44812 9.5 6.91153 9.5 8V12.5ZM7.5 1C7 1 4 5 4 8V12.5C4 13.3284 4.67157 14 5.5 14H9.5C10.3284 14 11 13.329 11 12.5006V8C11 5 8 1 7.5 1Z","fire-station":"M7.5 14C11.0899 14 14 11 14 7.50003C14 4.5 11.5 2 11.5 2L10.5 5.5L7.5 1L4.5 5.5L3.5 2C3.5 2 1 4.5 1 7.50003C1 11 3.91015 14 7.5 14ZM7.5 12.5C6.11929 12.5 5 11.3807 5 10C5 8.61929 7.5 5.5 7.5 5.5C7.5 5.5 10 8.61929 10 10C10 11.3807 8.88071 12.5 7.5 12.5Z","fire-station-JP":"M8.5,8.1489V11.75a1,1,0,0,1-2,0V8.1489A5.0084,5.0084,0,0,1,2.5,3.25a1,1,0,0,1,2,0,3,3,0,0,0,6,0,1,1,0,0,1,2,0A5.0082,5.0082,0,0,1,8.5,8.1489Z","fitness-centre":"M14.5,7V8h-1v2h-1v1H11V8H4v3H2.5V10h-1V8H.5V7h1V5h1V4H4V7h7V4h1.5V5h1V7Z",florist:"M1.5,1A2.7,2.7,0,0,1,4,3l.5-3L5,3A2.7,2.7,0,0,1,7.5,1c-.2.03-1,.26-1,2v.083A1.959,1.959,0,0,1,4.5,5H4.417A1.959,1.959,0,0,1,2.5,3C2.5,1.261,1.7,1.03,1.5,1ZM12.012,11l3-.5-3-.5A2.686,2.686,0,0,0,14,7.5c-.03.2-.248,1-1.988,1a2,2,0,0,0,0,4c1.739,0,1.958.8,1.988,1A2.686,2.686,0,0,0,12.012,11ZM9.688,5.548a1,1,0,0,1,0-2,1,1,0,0,1,0-2,.986.986,0,0,1,.852.507l.023-.012a.978.978,0,0,1-.116-.444,1,1,0,1,1,2,0,.978.978,0,0,1-.116.444l.019.01a.986.986,0,0,1,.85-.5,1,1,0,0,1,.025,2,1,1,0,0,1-.025,2,.986.986,0,0,1-.85-.5l-.016.009a.978.978,0,0,1,.113.44,1,1,0,0,1-2,0,.978.978,0,0,1,.113-.44l-.02-.011a.986.986,0,0,1-.852.507Zm.71-1.995A1.051,1.051,0,1,0,11.449,2.5,1.051,1.051,0,0,0,10.4,3.553v0ZM4.946,11.444l-.516-.515L8.892,6.475A1.746,1.746,0,0,1,8.44,6.22L4.076,10.575l-.519-.518A16.051,16.051,0,0,0,4.912,6a3.373,3.373,0,0,1-.412.035c-.041,0-.073-.008-.112-.01A16.953,16.953,0,0,1,3.131,9.631L2.76,9.26a.246.246,0,0,0-.4.079L.231,14.445a.287.287,0,0,0-.016.089.25.25,0,0,0,.25.25.289.289,0,0,0,.1-.019l5.1-2.124a.246.246,0,0,0,.079-.4l-.372-.372a16.874,16.874,0,0,1,3.612-1.256c0-.059-.015-.106-.015-.166A3.349,3.349,0,0,1,9,10.089,16.076,16.076,0,0,0,4.946,11.444Z",fuel:"m14 6v5.5c0 .2761-.2239.5-.5.5s-.5-.2239-.5-.5v-2c0-.8284-.6716-1.5-1.5-1.5h-1.5v-6c0-.5523-.4477-1-1-1h-6c-.5523 0-1 .4477-1 1v11c0 .5523.4477 1 1 1h6c.5523 0 1-.4477 1-1v-4h1.5c.2761 0 .5.2239.5.5v2c0 .8284.6716 1.5 1.5 1.5s1.5-.6716 1.5-1.5v-6.5c0-.5523-.4477-1-1-1v-1.51c-.0054-.2722-.2277-.4901-.5-.49-.2816.0047-.5062.2367-.5015.5184.0002.0105.0007.0211.0015.0316v2.45c0 .5523.4477 1 1 1s1-.4477 1-1-.4477-1-1-1zm-5 .5c0 .2761-.2239.5-.5.5h-5c-.2761 0-.5-.2239-.5-.5v-3c0-.2761.2239-.5.5-.5h5c.2761 0 .5.2239.5.5z",furniture:"m8.69099 10.142v-1.642c0-.13261-.05268-.25979-.14645-.35355-.09377-.09377-.22094-.14645-.35355-.14645h-1c-.13261 0-.25979.05268-.35356.14645-.09376.09376-.14644.22094-.14644.35355v1.641c-.75987.1945-1.4456.6085-1.9715 1.1905-.52591.5819-.86868 1.3059-.9855 2.0815-.01141.0723-.00702.1462.01285.2167.01987.0704.05476.1357.10227.1914s.10651.1004.17295.1311c.06643.0307.13873.0467.21193.0468h6.92201c.0732-.0001.1455-.0161.2119-.0468.0665-.0307.1255-.0754.173-.1311s.0824-.121.1022-.1914c.0199-.0705.0243-.1444.0129-.2167-.1176-.7765-.4616-1.501-.989-2.0828-.5275-.5819-1.2148-.9952-1.97601-1.1882zm4.63901-3.863-2.5-5c-.0412-.08351-.1048-.15387-.1838-.20316s-.1701-.07556-.2632-.07584h-5.38401c-.09261.00019-.18335.02609-.2621.07483-.07875.04873-.14241.11837-.1839.20117l-2.5 5c-.03809.076-.05617.16046-.05253.24539.00363.08494.02886.16754.07331.24001.04444.07247.10663.13241.18068.17416s.15753.06393.24254.06444h8.19401v1.5c0 .13261.0527.25979.1464.35355.0938.09377.221.14645.3536.14645s.2598-.05268.3535-.14645c.0938-.09376.1465-.22094.1465-.35355v-1.5h1.194c.0847-.00059.1678-.02269.2416-.06421s.1359-.1011.1804-.17317c.0444-.07207.0699-.15425.0739-.23884s-.0135-.16882-.0509-.24478z",gaming:"m13.1 11.5c-.6.3-1.4.1-1.8-.5l-1.1-1.4h-5.40002l-1.1 1.4c-.5.7-1.4.8-2.1.3-.5-.4-.700004-1-.600004-1.5l.700004-3.7c.2-1.2 1.3-2.1 2.5-2.1h2.8v-1.5c0-.8.6-1.5 1.4-1.5h3.10002c.3 0 .5.2.5.5s-.2.5-.5.5h-3.00002c-.3 0-.5.2-.5.4v.1 1.5h2.80002c1.2 0 2.3.9 2.5 2.1l.7 3.7c.1.7-.2 1.4-.9 1.7zm-7.10002-5c0-.8-.7-1.5-1.5-1.5s-1.5.7-1.5 1.5.7 1.5 1.5 1.5 1.5-.7 1.5-1.5zm6.00002 0c0-.3-.2-.5-.5-.5h-.5v-.5c0-.3-.2-.5-.5-.5s-.50002.2-.50002.5v.5h-.5c-.3 0-.5.2-.5.5s.2.5.5.5h.5v.5c0 .3.20002.5.50002.5s.5-.2.5-.5v-.5h.5c.3 0 .5-.2.5-.5z",garden:"M13,8c0,3.31-2.19,6-5.5,6S2,11.31,2,8c2.2643,0.0191,4.2694,1.4667,5,3.61V7H4.5C3.6716,7,3,6.3284,3,5.5v-3 C3,2.2239,3.2239,2,3.5,2c0.1574,0,0.3056,0.0741,0.4,0.2l1.53,2l1.65-3c0.1498-0.232,0.4593-0.2985,0.6913-0.1487 C7.8308,1.0898,7.8815,1.1404,7.92,1.2l1.65,3l1.53-2c0.1657-0.2209,0.4791-0.2657,0.7-0.1C11.9259,2.1944,12,2.3426,12,2.5v3 C12,6.3284,11.3284,7,10.5,7H8v4.61C8.7306,9.4667,10.7357,8.0191,13,8z","garden-centre":"M4,5L4,4.5C4,3.12 5.12,2 6.5,2C7.88,2 9,3.12 9,4.5L9,10.293L11.365,7.928L11.018,6.633C11.018,6.631 11.017,6.629 11.017,6.627L11.016,6.627L11.016,6.627C10.973,6.461 11.016,6.276 11.147,6.146C11.342,5.951 11.659,5.951 11.854,6.146L13.854,8.146C14.049,8.341 14.049,8.658 13.854,8.853C13.724,8.983 13.541,9.027 13.375,8.984C13.375,8.984 13.375,8.984 13.375,8.984C13.372,8.983 13.369,8.982 13.365,8.981L12.072,8.635L9,11.707L9,12C9,12.552 8.552,13 8,13L5,13C4.448,13 4,12.552 4,12L4,11.536L1.732,9.268C0.757,8.292 0.757,6.708 1.732,5.732C2.22,5.244 2.86,5 3.5,5L3.5,5L4,5ZM4,6L3.5,6L3.5,6C3.116,6 2.732,6.147 2.439,6.439C1.854,7.025 1.854,7.975 2.439,8.561L4,10.121L4,6ZM8,5L8,4.5C8,3.672 7.328,3 6.5,3C5.672,3 5,3.672 5,4.5L5,5L8,5Z",gate:"M1 2.75A.75.75 0 0 1 1.75 2h1.114c.09 0 .18.016.263.048l3.386 1.27A.75.75 0 0 1 7 4.02v5.96a.75.75 0 0 1-.487.702L3 12v.25a.75.75 0 0 1-.75.75h-.5a.75.75 0 0 1-.75-.75v-9.5Zm3 5.736v-4.87a.25.25 0 0 0-.162-.234l-.5-.187A.25.25 0 0 0 3 3.429v5.224c0 .17.167.291.33.237l.5-.166A.25.25 0 0 0 4 8.486ZM5 4.18v3.807a.25.25 0 0 0 .33.238l.5-.167A.25.25 0 0 0 6 7.82V4.366a.25.25 0 0 0-.162-.234l-.5-.187A.25.25 0 0 0 5 4.179Zm9-1.43a.75.75 0 0 0-.75-.75h-1.114a.75.75 0 0 0-.263.048l-3.386 1.27A.75.75 0 0 0 8 4.02v5.96a.75.75 0 0 0 .487.702L12 12v.25c0 .414.336.75.75.75h.5a.75.75 0 0 0 .75-.75v-9.5Zm-2.83 5.974a.25.25 0 0 1-.17-.238v-4.87a.25.25 0 0 1 .162-.234l.5-.187a.25.25 0 0 1 .338.234v5.224a.25.25 0 0 1-.33.237l-.5-.166ZM10 4.179v3.807a.25.25 0 0 1-.33.238l-.5-.167A.25.25 0 0 1 9 7.82V4.366a.25.25 0 0 1 .162-.234l.5-.187a.25.25 0 0 1 .338.234Z",gift:"M10.5 1.00152C9.0967.957116 7.8503 1.89192 7.5 3.25152 7.1497 1.89192 5.9033.957116 4.5 1.00152 2.7678.947006 2.23515 2.79746 2.81831 4H1.5C1.22386 4 1 4.22386 1 4.5V5.5C1 5.77614 1.22386 6 1.5 6H13.5C13.7761 6 14 5.77614 14 5.5V4.5C14 4.22386 13.7761 4 13.5 4H12.1938C12.8 2.81516 12.2922 1.00143 10.5404 1.00112 10.5269 1.00112 10.5135 1.00122 10.5 1.00152ZM10.6831 4H8.5C8.50082 2.8961 9.3959 2.00152 10.5 2.00152 11.675 2.00152 11.8827 3.87414 10.6831 4ZM6.5 4H4.29187C3.25675 3.88256 3.19576 2.10553 4.3323 2.00152 4.3881 1.99642 4.4442 1.99642 4.5 2.00152 5.60409 2.00152 6.49918 2.8961 6.5 4ZM2 7.00146V11.5015C2 12.3299 2.6716 13.0015 3.5 13.0015H6.5V7.00146H2ZM8.5 7.00146V13.0015H11.5C12.3284 13.0015 13 12.3299 13 11.5015V7.00146H8.5Z",globe:"M11.981,9.481,11.26,8.76A4.979,4.979,0,1,1,4.24,1.74l-.721-.721A5.991,5.991,0,0,0,7,11.475V13H6.5a.5.5,0,0,0,0,1h2a.5.5,0,0,0,0-1H8V11.473A5.983,5.983,0,0,0,11.981,9.481ZM7.5,9A3.5,3.5,0,1,0,4,5.5,3.5,3.5,0,0,0,7.5,9Zm1-5,.364-.592a2.5,2.5,0,0,1,.823.9L9.5,5h-1ZM6.656,3.156,7.5,4V5L8,6H9.94a2.494,2.494,0,0,1-1.5,1.814L8,7H6.5L5.05,5A2.5,2.5,0,0,1,6.656,3.156Z",golf:"M3.3999,1.1c0,0.1,0,0.2,0,0.2c0,0.4,0.3,0.7,0.7,0.7c0.3,0,0.5-0.2,0.6-0.5l0,0L4.9,1l5.6,2.3L6.6,6C6.2,6.3,6.2,6.7,6.3,7.1 l0.9,2.1l-1.3,3.9C5.7,13.6,6.1,14,6.5,14c0.3,0,0.5-0.1,0.6-0.5l1.4-4l0.1,0.3v3.5c0,0,0,0.7,0.7,0.7s0.7-0.7,0.7-0.7V10 c0-0.2,0-0.3-0.1-0.5L8.5,6.1l2.7-1.9c0.2-0.2,0.4-0.3,0.4-0.6s-0.2-0.5-0.4-0.6L4,0.1c-0.0878,0-0.118,0.0179-0.2001,0.1 L3.3999,1.1z M5.5,3C4.7,3,4,3.7,4,4.5S4.7,6,5.5,6S7,5.3,7,4.5S6.2999,3,5.5,3z",grocery:"M 13.199219 1.5 C 13.199219 1.5 11.808806 1.4588 11.253906 2 C 10.720406 2.5202 10.5 2.9177 10.5 4 L 1.1992188 4 L 2.59375 8.8144531 C 2.59725 8.8217531 2.6036219 8.8287375 2.6074219 8.8359375 C 2.8418219 9.4932375 3.4545469 9.9666406 4.1855469 9.9941406 C 4.1885469 9.9954406 4.1992187 10 4.1992188 10 L 10.699219 10 L 10.699219 10.199219 C 10.699219 10.199219 10.7 10.500391 10.5 10.900391 C 10.3 11.300391 10.200391 11.5 9.4003906 11.5 L 2.9003906 11.5 C 1.9003906 11.5 1.9003906 13 2.9003906 13 L 4.0996094 13 L 4.1992188 13 L 9.0996094 13 L 9.1992188 13 L 9.3007812 13 C 10.500781 13 11.399219 12.299609 11.699219 11.599609 C 11.999219 10.899609 12 10.300781 12 10.300781 L 12 10 L 12 4 C 12 3.4764 12.228619 3 12.699219 3 L 13.25 3 C 13.6642 3 14 2.6642 14 2.25 C 14 1.8358 13.6642 1.5 13.25 1.5 L 13.199219 1.5 z M 9.1992188 13 C 8.5992188 13 8.1992188 13.4 8.1992188 14 C 8.1992188 14.6 8.5992187 15 9.1992188 15 C 9.7992187 15 10.199219 14.6 10.199219 14 C 10.199219 13.4 9.7992188 13 9.1992188 13 z M 4.1992188 13 C 3.5992188 13 3.1992188 13.4 3.1992188 14 C 3.1992188 14.6 3.5992187 15 4.1992188 15 C 4.7992188 15 5.1992188 14.6 5.1992188 14 C 5.1992188 13.4 4.7992187 13 4.1992188 13 z",hairdresser:"M15,3c0,0-2-0.6-3.5,0.5l-4.3,3C6.4,5.9,5.2,5.2,4,4.8V4c0-1.1-0.9-2-2-2C0.9,2,0,2.9,0,4v1.5 C0,6,0.5,6,0.5,6H2h0.5C4.5,6,6,7.5,6,7.5S4.5,9,2.5,9H2H0.5C0.5,9,0,9,0,9.5V11c0,1.1,0.9,2,2,2c1.1,0,2-0.9,2-2v-0.8 c1.2-0.4,2.4-1.1,3.2-1.7l4.3,3C13,12.6,15,12,15,12L8.5,7.5L15,3z M3,5H2H1V4c0-0.6,0.4-1,1-1c0.6,0,1,0.4,1,1V5z M3,11 c0,0.6-0.4,1-1,1c-0.6,0-1-0.4-1-1v-1h1h1V11z M7.25,8c-0.2761,0-0.5-0.2239-0.5-0.5S6.9739,7,7.25,7s0.5,0.2239,0.5,0.5 S7.5261,8,7.25,8z",harbor:"M7.5,0C5.5,0,4,1.567,4,3.5c0.0024,1.5629,1.0397,2.902,2.5,3.3379v6.0391 c-0.9305-0.1647-1.8755-0.5496-2.6484-1.2695C2.7992,10.6273,2.002,9.0676,2.002,6.498c0.0077-0.5646-0.4531-1.0236-1.0176-1.0137 C0.4329,5.493-0.0076,5.9465,0,6.498c0,3.0029,1.0119,5.1955,2.4902,6.5723C3.9685,14.4471,5.8379,15,7.5,15 c1.6656,0,3.535-0.5596,5.0117-1.9395S14.998,9.4868,14.998,6.498c0.0648-1.3953-2.0628-1.3953-1.998,0 c0,2.553-0.7997,4.1149-1.8535,5.0996C10.3731,12.3203,9.4288,12.7084,8.5,12.875V6.8418C9.9607,6.4058,10.9986,5.0642,11,3.5 C11,1.567,9.5,0,7.5,0z M7.5,2C8.3284,2,9,2.6716,9,3.5S8.3284,5,7.5,5S6,4.3284,6,3.5S6.6716,2,7.5,2z",hardware:"M13.7919,3.2619c0,0-1.676,1.675-2.1163,2.1208c-0.085,0.0861-0.1688,0.1135-0.282,0.0961 c-0.1481-0.0226-0.2974-0.038-0.4462-0.0558c-0.4072-0.0485-0.8145-0.0966-1.2292-0.1458C9.649,4.6852,9.5787,4.1049,9.5177,3.5236 C9.512,3.4689,9.5509,3.3943,9.5925,3.3522c0.5071-0.5134,1.9261-1.9287,2.134-2.136c-0.4508-0.2129-1.2243-0.2968-1.8007-0.2031 c-2.1801,0.3543-3.5112,2.534-2.8206,4.625C7.1432,5.753,7.1194,5.8201,7.0374,5.902C5.1891,7.7454,3.3436,9.5914,1.498,11.4374 c-0.0616,0.0616-0.1231,0.124-0.1779,0.1913c-0.5264,0.6473-0.3873,1.6264,0.2974,2.102c0.6044,0.4197,1.3658,0.3442,1.9053-0.1948 c1.8534-1.8519,3.7059-3.7047,5.556-5.5598C9.1707,7.884,9.2437,7.8526,9.3779,7.8983c0.6189,0.2109,1.2524,0.2354,1.8884,0.0884 c1.9386-0.4478,3.1251-2.3732,2.6549-4.3034C13.8895,3.5532,13.843,3.4244,13.7919,3.2619z",heart:"m13.91 7.75001c-1.17 2.24999-4.30002 5.30999-6.07002 6.93999-.1903.1718-.4797.1718-.67 0-1.78-1.63-4.91-4.69-6.08-6.93999-2.57-4.95 3.91-8.250002 6.41-3.3 2.5-4.950002 8.98002-1.65 6.41002 3.3z",heliport:"M4,2C3,2,3,3,4,3h4v1C7.723,4,7.5,4.223,7.5,4.5V5H5H3.9707H3.9316 C3.7041,4.1201,2.9122,3.5011,2,3.5c-1.1046,0-2,0.8954-2,2s0.8954,2,2,2c0.3722-0.001,0.7368-0.1058,1.0527-0.3027L5.5,10.5 C6.5074,11.9505,8.3182,12,9,12h5c0,0,1,0,1-1v-0.9941C15,9.2734,14.874,8.874,14.5,8.5l-3-3c0,0-0.5916-0.5-1.2734-0.5H9.5V4.5 C9.5,4.223,9.277,4,9,4V3h4c1,0,1-1,0-1C13,2,4,2,4,2z M2,4.5c0.5523,0,1,0.4477,1,1s-0.4477,1-1,1s-1-0.4477-1-1 C1,4.9477,1.4477,4.5,2,4.5z M10,6c0.5,0,0.7896,0.3231,1,0.5L13.5,9H10c0,0-1,0-1-1V7C9,7,9,6,10,6z","highway-rest-area":"M13.5,13h-3V9h3a.5.5,0,0,0,.4092-.7871L11.66,5h.84a.5.5,0,0,0,.3838-.82l-2.5-3a.5155.5155,0,0,0-.7676,0l-2.5,3A.5.5,0,0,0,7.5,5h.84L6.0908,8.2129A.5.5,0,0,0,6.5,9h3v4H4V11H5.5a.5.5,0,0,0,0-1h-4a.5.5,0,0,0,0,1H3v2H1.5a.5.5,0,0,0,0,1h12a.5.5,0,0,0,0-1Z",historic:"m7.5 1c-1 0-1 1-2 1h-3.5c-.54467 0-1 .45533-1 1v7c0 .5447.45533 1 1 1h5v2.5s0 .5.5.5.5-.5.5-.5v-2.5h5c.5447 0 1-.4553 1-1v-7c0-.54467-.4553-1-1-1h-3.5c-1 0-1-1-2-1zm-4.5 4v-1h9v1zm0 1h4v1h-4zm0 2h7v1h-7z",home:"M2,13.7478c0,0.13807,0.11193,0.25,0.25,0.25h3.749v-3h3v3h3.749c0.13807,0,0.25-0.11193,0.25-0.25V7.9987H2 C2,7.9987,2,13.7478,2,13.7478z M13.93,6.5778l-0.9319-0.8189V2c0-0.55228-0.44771-1-1-1s-1,0.44772-1,1v2L7.6808,1.09 C7.5863,0.9897,7.42846,0.98478,7.3279,1.079L7.3169,1.09L1.0678,6.553C0.9734,6.65376,0.97856,6.81197,1.07932,6.90637 C1.12478,6.94896,1.18451,6.97304,1.2468,6.9739L3,6.9989h10.7468c0.13807,0.00046,0.25037-0.1111,0.25083-0.24917 C13.99784,6.68592,13.97365,6.62445,13.93,6.5779V6.5778z","horse-riding":"M6,1A1,1,0,1,1,7,2,1,1,0,0,1,6,1ZM8,3.5a.484.484,0,0,0,0-.058A.472.472,0,0,0,7.5,3h-1a.484.484,0,0,0-.058,0A.472.472,0,0,0,6,3.5V7H8Zm6.85,3.644L12.8,4.8l.085-.509a.478.478,0,0,0,.008-.063.25.25,0,0,0-.25-.25.346.346,0,0,0-.158.056L9,7H8L9,8V9.5a.5.5,0,0,1-1,0v-1L6,7H4a1.5,1.5,0,0,0-1.243.661A1.466,1.466,0,0,0,1.563,7H1.5A1.449,1.449,0,0,0,0,8.4v.086A3.781,3.781,0,0,0,.559,10.4a.278.278,0,0,0,.191.1A.25.25,0,0,0,1,10.25V9s-.02-.924.753-1c.5-.048.747.253.747.5V11L2,13v1.75a.25.25,0,0,0,.25.25.254.254,0,0,0,.25-.234V13L4,11v1l.5,2.8a.255.255,0,0,0,.246.2A.25.25,0,0,0,5,14.754H5L4.855,12.3,5.5,11H8v1l.508,2.813A.257.257,0,0,0,8.75,15,.25.25,0,0,0,9,14.75V12l.367-1a1.155,1.155,0,0,0,.543-.6l2.161-3.767a.863.863,0,0,0,1.023.4l1.066.818a.591.591,0,0,0,.35.135.487.487,0,0,0,.475-.4A.552.552,0,0,0,14.85,7.144Z",hospital:"M7,1C6.4,1,6,1.4,6,2v4H2C1.4,6,1,6.4,1,7v1 c0,0.6,0.4,1,1,1h4v4c0,0.6,0.4,1,1,1h1c0.6,0,1-0.4,1-1V9h4c0.6,0,1-0.4,1-1V7c0-0.6-0.4-1-1-1H9V2c0-0.6-0.4-1-1-1H7z","hospital-JP":"m12.5038 3h-10.00777c-.26639.00235-.52096.11039-.70772.30036-.18677.18998-.29046.44634-.28828.71274v5.5807c-.00063.18713.05047.37079.14765.5307.09718.1599.23667.2899.40305.3755l4.78 2.8394c.20725.1056.43653.1606.6691.1606.23258 0 .46186-.055.6691-.1606l4.78037-2.8394c.1664-.0856.3059-.2155.4031-.3755.0972-.15989.1483-.34357.1476-.5307v-5.5807c.0012-.13194-.0237-.2628-.0732-.38512-.0494-.12232-.1225-.2337-.215-.32777-.0925-.09408-.2027-.16901-.3241-.22052-.1215-.05151-.2519-.07859-.3839-.07969zm-2.0038 5.5h-1.99997v2h-2v-2h-2v-2h2v-2h2v2h1.99997z","hot-spring":"M6.682,5.759c-.505-.725-.781-1.121-.63-2.376,.139-1.156,.678-1.616,1.198-2.059,.404-.345,.797-.68,.981-1.324,.301,.722-.036,1.47-.349,2.164-.311,.691-.599,1.329-.211,1.836,.971,1.271,1.963,2.88,.971,4.586-.214,.393-.539,.681-.861,.968-.422,.375-.841,.747-1.004,1.348-.269-.677,.008-1.366,.285-2.052,.306-.759,.61-1.516,.172-2.251-.203-.34-.389-.607-.551-.84Zm3.371-1.174c-.098-.632,.034-1.281,.368-1.809,.367-.45,.701-.642,.991-.81,.345-.199,.627-.362,.83-.877,.289,.684,0,1.188-.304,1.718-.119,.207-.24,.418-.329,.645-.191,.61,.101,.893,.467,1.247,.358,.346,.786,.76,.899,1.617,.083,.635-.036,1.156-.372,1.684-.356,.436-.681,.655-.965,.846-.356,.24-.648,.437-.856,.965-.292-.688,.031-1.259,.353-1.828,.123-.217,.246-.434,.334-.658,.073-.558-.234-.867-.581-1.217-.357-.36-.757-.763-.834-1.523Zm-8.018,0c-.098-.632,.005-1.3,.368-1.809,.376-.528,.729-.717,1.035-.881,.323-.173,.594-.318,.786-.806,.289,.683-.014,1.208-.325,1.749-.122,.212-.246,.427-.336,.655-.152,.385,.131,1.014,.501,1.242,1.002,.801,1.227,2.286,.547,3.353-.366,.448-.704,.648-.999,.823-.353,.209-.645,.382-.849,.898-.278-.656,.008-1.18,.3-1.714,.131-.24,.263-.481,.345-.737,.179-.557-.134-.884-.51-1.277-.349-.365-.752-.785-.863-1.498Zm10.965,4.414c.7,2.616-3.474,3-5.5,3s-6.2-.484-5.5-3c-.633,.316-1,.961-1,1.5,0,1.519,2.91,2.9,6.5,2.9s6.5-1.381,6.5-2.9c0-.539-.367-1.184-1-1.5Z","ice-cream":"M5.44,8.17a3.473,3.473,0,0,0,2-.63A3.5,3.5,0,0,0,9,8.14h.44L8,13.7a.5.5,0,0,1-.92,0Zm6-3.473a2,2,0,0,1-4,0h0a2,2,0,1,1-2-2h.12a2,2,0,1,1,3.75,0h.13A2,2,0,0,1,11.439,4.7Z",industry:"M14,1v12H1V8.72c0.0016-0.1419,0.0634-0.2764,0.17-0.37l3-3.22c0.2074-0.1823,0.5234-0.1618,0.7056,0.0456 C4.9568,5.268,5.0011,5.387,5,5.51v3l3.16-3.37c0.2025-0.1878,0.5188-0.1759,0.7066,0.0266C8.9532,5.2599,9.0009,5.3827,9,5.51V11h3 V1H14z",information:"M7.5,1 C6.7,1,6,1.7,6,2.5S6.7,4,7.5,4S9,3.3,9,2.5S8.3,1,7.5,1z M4,5v1c0,0,2,0,2,2v2c0,2-2,2-2,2v1h7v-1c0,0-2,0-2-2V6c0-0.5-0.5-1-1-1H4 z","jewelry-store":"M12,8.5c0,2.4853-2.0147,4.5-4.5,4.5S3,10.9853,3,8.5c0-1.8483,1.1164-3.4329,2.7099-4.1255l0.1761,0.137l0.7739,0.6019 C5.1366,5.4922,4,6.8611,4,8.5C4,10.4299,5.5701,12,7.5,12S11,10.4299,11,8.5c0-1.6389-1.1366-3.0078-2.6599-3.3866l0.95-0.7388 C10.8836,5.0672,12,6.6517,12,8.5z M7.5,4.5L10,2.5555L9,1H6L5,2.5555l1.5,1.1667L7.5,4.5z",karaoke:"M12.1,2.952A2.988,2.988,0,0,0,6.99,4.917l3.142,3.142A2.988,2.988,0,0,0,12.1,2.952Zm-7.428,5.3L2.55,10.377a1,1,0,0,0,0,1.414l.707.707a1,1,0,0,0,1.414,0l2.121-2.121L8.914,8.255,6.793,6.134Zm.741,2.087-.707-.707L6.793,7.548l.707.707Z",landmark:"M12.5,12H12v-0.5c0-0.3-0.2-0.5-0.5-0.5H11V6h1l1-2c-1,0.1-2,0.1-3,0C9.2,3.4,8.6,2.8,8,2V1.5C8,1.2,7.8,1,7.5,1 S7,1.2,7,1.5V2C6.4,2.8,5.8,3.4,5,4C4,4.1,3,4.1,2,4l1,2h1v5c0,0-0.5,0-0.5,0C3.2,11,3,11.2,3,11.5V12H2.5C2.2,12,2,12.2,2,12.5V13 h11v-0.5C13,12.2,12.8,12,12.5,12z M7,11H5V6h2V11z M10,11H8V6h2V11z","landmark-JP":"m9.5 4c0 .39556-.1173.78224-.33706 1.11114s-.53212.58524-.89757.73662c-.36545.15137-.76759.19098-1.15555.11381s-.74433-.26765-1.02403-.54736c-.27971-.2797-.47019-.63607-.54736-1.02403s-.03756-.79009.11381-1.15555c.15138-.36545.40772-.67781.73662-.89757s.71558-.33706 1.11114-.33706c.53043 0 1.03914.21071 1.41421.58579.37508.37507.58579.88378.58579 1.41421zm-6 4c-.39556 0-.78224.1173-1.11114.33706s-.58524.53212-.73662.89757c-.15137.36546-.19098.76757-.11381 1.15557.07717.3879.26765.7443.54736 1.024.2797.2797.63607.4702 1.02403.5474.38796.0771.7901.0375 1.15555-.1138.36545-.1514.67781-.4078.89757-.7367s.33706-.7155.33706-1.1111c0-.53043-.21071-1.03914-.58579-1.41421-.37507-.37508-.88378-.58579-1.41421-.58579zm8 0c-.3956 0-.7822.1173-1.1111.33706s-.58528.53212-.73666.89757c-.15137.36546-.19098.76757-.11381 1.15557.07717.3879.26765.7443.54737 1.024.2797.2797.6361.4702 1.024.5474.388.0771.7901.0375 1.1556-.1138.3654-.1514.6778-.4078.8975-.7367.2198-.3289.3371-.7155.3371-1.1111 0-.53043-.2107-1.03914-.5858-1.41421-.3751-.37508-.8838-.58579-1.4142-.58579z",landuse:"m8.911 2.85401c.02782.02324.05021.0523.06558.08512.01538.03283.02337.06863.02342.10488v3.706c0 .0663-.02634.12989-.07322.17678-.04689.04688-.11048.07322-.17678.07322h-2.5c-.0663 0-.12989-.02634-.17678-.07322-.04688-.04689-.07322-.11048-.07322-.17678v-1.75h-1v1.75c0 .0663-.02634.12989-.07322.17678-.04689.04688-.11048.07322-.17678.07322h-2.5c-.0663 0-.12989-.02634-.17678-.07322-.04688-.04689-.07322-.11048-.07322-.17678v-3.7c.00005-.03625.00804-.07205.02342-.10488.01537-.03282.03776-.06188.06558-.08512l3.254-2.728c.04413-.0370337.09989-.0573335.1575-.0573335s.11337.0202998.1575.0573335zm-1.159 5.646c-.04915.00002-.09718.01464-.138.042l-2.614 1.95799h-1v-1.99999c0-.13261-.05268-.25979-.14645-.35355-.09376-.09377-.22094-.14645-.35355-.14645s-.25979.05268-.35355.14645c-.09377.09376-.14645.22094-.14645.35355v1.99999h-1v-1.99999c0-.13261-.05268-.25979-.14645-.35355-.09376-.09377-.22094-.14645-.35355-.14645s-.25979.05268-.35355.14645c-.09377.09376-.14645.22094-.14645.35355v4.24999c0 .0663.02634.1299.07322.1768.04689.0469.11048.0732.17678.0732h6.5c.0663 0 .12989-.0263.17678-.0732.04688-.0469.07322-.1105.07322-.1768v-3.99999c.00026-.03274-.00596-.0652-.0183-.09552-.01235-.03032-.03057-.0579-.05363-.08114-.02305-.02324-.05048-.04168-.0807-.05427s-.06263-.01907-.09537-.01907zm6.248-3.255v6.49999c0 .0671-.0267.1315-.0741.1789-.0474.0475-.1118.0741-.1789.0741h-3.494c-.0668 0-.1308-.0264-.1782-.0734s-.0743-.1108-.0748-.1776v-6.49699c-.00013-.03287.0062-.06544.0188-.09583.0125-.03039.0309-.058.0541-.08124.0233-.02324.0509-.04165.0813-.05417s.0629-.01889.0958-.01876h.75v-.751c0-.06604.0262-.12937.0729-.17607s.1101-.07293.1761-.07293h1.5c.0668.00053.1306.02742.1776.07481.047.04738.0734.11144.0734.17819v.747h.755c.065 0 .1273.02581.1732.07176.046.04595.0718.10826.0718.17324zm-1 4.75499h-2v1h2zm0-1.99999h-2v1h2zm0-2h-2v1h2z",laundry:"M8,1L6,3H3c0,0-1,0-1,1v9c0,1,1,1,1,1h9c0,0,1,0,1-1V2c0-1-1-1-1-1 S8,1,8,1z M8.5,2h2C10.777,2,11,2.223,11,2.5S10.777,3,10.5,3h-2C8.223,3,8,2.777,8,2.5S8.223,2,8.5,2z M7.5,6 c1.6569,0,3,1.3431,3,3s-1.3431,3-3,3s-3-1.3431-3-3S5.8431,6,7.5,6z",library:"M1.0819,9.9388C0.9871,9.867,1.0007,9.7479,1.0007,9.7479L1.5259,3.5c0,0,0.0082-0.0688,0.0388-0.104 C1.584,3.374,1.6084,3.342,1.6544,3.3232C2.1826,3.1072,5.0537,1.5519,6.5,3c0.2397,0.2777,0.4999,0.6876,0.4999,1v5.2879 c0,0,0.0062,0.1122-0.0953,0.1801c-0.0239,0.016-0.124,0.0616-0.242,0.0026c-2.2253-1.1134-4.711,0.1546-5.3381,0.4871 C1.1987,10.0244,1.1006,9.9531,1.0819,9.9388z M13.6754,9.9577c-0.6271-0.3325-3.1128-1.6005-5.3381-0.4871 c-0.118,0.059-0.2181,0.0134-0.242-0.0026C7.9939,9.4001,8.0001,9.2879,8.0001,9.2879V4c0-0.3124,0.2602-0.7223,0.4999-1 c1.4463-1.4481,4.2991,0.1071,4.8273,0.3232c0.046,0.0188,0.0704,0.0508,0.0897,0.0728C13.4476,3.4312,13.4558,3.5,13.4558,3.5 l0.5435,6.2479c0,0,0.0136,0.1191-0.0812,0.1909C13.8994,9.9531,13.8013,10.0244,13.6754,9.9577z M8.8647,12.6863 c0.0352-0.0085,0.0964-0.0443,0.1179-0.0775c0.0236-0.0364,0.0378-0.0617,0.0423-0.1088c0.0495-0.9379,1.6245-1.8119,4.6477-0.0298 c0.0775,0.0441,0.1666,0.0396,0.2425-0.0155C14.0014,12.392,14,12.2859,14,12.2859v-0.5542c0,0,0.0003-0.0764-0.0272-0.1184 c-0.0205-0.0312-0.0476-0.0643-0.0926-0.0858c-2.0254-1.3145-4.5858-1.8972-5.8854-0.1592 c-0.0181,0.0423-0.0353,0.0613-0.0728,0.0905C7.8654,11.5028,7.7964,11.5,7.7964,11.5H7.2109c0,0-0.069,0.0028-0.1256-0.0412 c-0.0375-0.0292-0.0547-0.0482-0.0728-0.0905c-1.2996-1.738-3.86-1.1828-5.8854,0.1317c-0.045,0.0215-0.0721,0.0546-0.0926,0.0858 c-0.0275,0.042-0.0272,0.1184-0.0272,0.1184v0.5542c0,0-0.0014,0.1061,0.0849,0.1688c0.0759,0.0551,0.165,0.0596,0.2425,0.0155 c3.0232-1.7821,4.5982-0.8806,4.6477,0.0573c0.0045,0.0471,0.0187,0.0724,0.0423,0.1088c0.0215,0.0332,0.0827,0.069,0.1179,0.0775 C6.8645,12.8656,7.9112,12.9363,8.8647,12.6863z","lift-gate":"M1 4a2 2 0 1 1 4 0v8a1 1 0 0 1-1 1H2a1 1 0 0 1-1-1V4Zm3 0a1 1 0 1 0-2 0 1 1 0 0 0 2 0Zm4.5 2L7 3H6v3h2.5ZM10 6h1.5L10 3H8.5L10 6Zm3.25 0H13l-1.5-3h1.75a.75.75 0 0 1 .75.75v1.5a.75.75 0 0 1-.75.75Z",lighthouse:"M4.5,6L0,7V6.5l4.5-1V6z M4.5,3.5L0,2.5V3l4.5,1V3.5z M10.5,3.5V4L15,3V2.5L10.5,3.5z M10.5,6L15,7V6.5l-4.5-1V6z M8,7V2 h2.5c0.2761,0.0552,0.5448-0.1239,0.6-0.4c0.0552-0.2761-0.1239-0.5448-0.4-0.6l-3-1C7.5696-0.0586,7.4204-0.0586,7.29,0l-3,1 c-0.2761,0.0552-0.4552,0.3239-0.4,0.6S4.2139,2.0552,4.49,2H7v5H5l-2,7h9l-2-7H8z","lighthouse-JP":"M9.5,7.4c0,1.1-0.9,2-2,2s-2-0.9-2-2s0.9-2,2-2C8.6,5.4,9.5,6.3,9.5,7.4z M14,7.5C14,7.8,13.8,8,13.5,8h-1.6 c-0.1,0.9-0.311,1.582-0.911,2.282l1.064,1.064c0.2,0.2,0.196,0.504-0.004,0.704c-0.209,0.209-0.5,0.207-0.704,0.004L10.3,11 c-0.6,0.5-1.4,0.8-2.3,0.9v1.6C8,13.8,7.8,14,7.5,14S7,13.8,7,13.5v-1.6c-0.9-0.1-1.7-0.4-2.3-0.9l-1.1,1.1 c-0.207,0.207-0.48,0.213-0.696-0.004c-0.2-0.2-0.207-0.5-0.007-0.7L4,10.3C3.5,9.7,3.1,8.9,3,8H1.5C1.2,8,1,7.8,1,7.5S1.2,7,1.5,7 H3c0.1-0.9,0.4-1.7,1-2.4l-1-1C2.8,3.4,2.8,3.1,3,2.9s0.5-0.2,0.7,0l1,1l0,0C5.3,3.4,6.1,3.1,7,3V1.5C7,1.2,7.2,1,7.5,1S8,1.2,8,1.5 V3c0.9,0.1,1.7,0.5,2.3,1l0,0l1.1-1.1c0.2-0.2,0.5-0.2,0.7,0s0.2,0.5,0,0.7L11,4.7l0,0c0.5,0.7,0.8,1.4,0.9,2.3h1.6 C13.8,7,14,7.2,14,7.5z M11.1,7.4c0-2-1.6-3.6-3.6-3.6S3.8,5.5,3.8,7.4S5.4,11,7.4,11S11.1,9.4,11.1,7.4z",lodging:"M0.5,2.5C0.2,2.5,0,2.7,0,3v7.5v2C0,12.8,0.2,13,0.5,13S1,12.8,1,12.5V11h13v1.5 c0,0.3,0.2,0.5,0.5,0.5s0.5-0.2,0.5-0.5v-2c0-0.3-0.2-0.5-0.5-0.5H1V3C1,2.7,0.8,2.5,0.5,2.5z M3.5,3C2.7,3,2,3.7,2,4.5l0,0 C2,5.3,2.7,6,3.5,6l0,0C4.3,6,5,5.3,5,4.5l0,0C5,3.7,4.3,3,3.5,3L3.5,3z M7,4C5.5,4,5.5,5.5,5.5,5.5V7h-3C2.2,7,2,7.2,2,7.5v1 C2,8.8,2.2,9,2.5,9H6h9V6.5C15,4,12.5,4,12.5,4H7z",logging:"M13.91,3.41,13.5,3l.2-.28c.02-.03.04-.05.06-.08A.969.969,0,0,0,14,1.99a1,1,0,0,0-1.62-.77c-.03.02-.06.05-.09.07L12,1.5l-.386-.386a.354.354,0,0,0-.525.475l.417.417-.5.5-.392-.392a.354.354,0,0,0-.525.475L10.5,3l-.5.5-.381-.381a.354.354,0,1,0-.528.472h0l.028.028L9.5,4,9,4.5l-.395-.395a.354.354,0,0,0-.517.483L8.5,5,8,5.5l-.365-.365a.354.354,0,0,0-.556.439h0C7.1,5.6,7.508,6,7.508,6L7,6.5l-.394-.392a.392.392,0,0,0-.5-.028.384.384,0,0,0-.028.5L6.1,6.6l.4.4L6,7.5l-.4-.4a.37.37,0,0,0-.5,0L6.248,8.244,12.09,2.41,12.5,2H13v.5l-.41.41L6.751,8.749,7.9,9.9a.355.355,0,0,0,0-.5l-.008-.009L7.5,9,8,8.5l.384.384a.354.354,0,0,0,.528-.472L8.5,8,9,7.5l.38.38a.354.354,0,0,0,.528-.472l-.02-.02L9.5,7l.5-.5.377.377A.35.35,0,0,0,10.64,7a.347.347,0,0,0,.252-.6L10.5,6l.5-.5.38.38a.354.354,0,0,0,.528-.472L11.88,5.38,11.5,5l.5-.5.381.381a.354.354,0,0,0,.528-.472l-.025-.025L12.5,4l.5-.5.382.382a.354.354,0,0,0,.528-.472ZM4.39,7.916C3.893,7.419,3.641,7,3,7H1.5a.5.5,0,0,0-.5.5v3A2.19,2.19,0,0,0,1.5,12l.815.811A2.251,2.251,0,0,0,5.493,13h0L7.5,11ZM3.5,10,2.262,11.238A1.3,1.3,0,0,1,2,10.5V8H3a.545.545,0,0,1,.335.194.455.455,0,0,1,.165.418Z",marker:"M7.5 1C5.42312 1 3 2.2883 3 5.56759C3 7.79276 6.46156 12.7117 7.5 14C8.42309 12.7117 12 7.90993 12 5.56759C12 2.2883 9.57688 1 7.5 1Z","marker-stroked":"M5.11697 2.81756C5.76952 2.26561 6.65195 2 7.5 2C8.34805 2 9.23048 2.26561 9.88303 2.81756C10.5075 3.34579 11 4.20017 11 5.56759C11 5.94031 10.8461 6.52407 10.5105 7.29145C10.1859 8.03354 9.73523 8.85087 9.24257 9.65811C8.64175 10.6426 7.999 11.5793 7.48195 12.3097C6.96023 11.5798 6.31599 10.6233 5.71947 9.62296C5.2343 8.80934 4.79303 7.98717 4.47608 7.24844C4.14708 6.48162 4 5.91216 4 5.56759C4 4.20017 4.49248 3.34579 5.11697 2.81756ZM8.10767 13.1554C9.45904 11.2632 12 7.54181 12 5.56759C12 2.2883 9.57688 1 7.5 1C5.42312 1 3 2.2883 3 5.56759C3 7.44926 5.47533 11.2572 6.86751 13.1671C7.12165 13.5157 7.3397 13.8011 7.5 14C7.55627 13.9215 7.62241 13.8299 7.697 13.7266C7.81469 13.5636 7.95343 13.3714 8.10767 13.1554Z","mobile-phone":"M10,2h0V1.5a.5.5,0,0,0-1,0V2H5A1,1,0,0,0,4,3V13a1,1,0,0,0,1,1h5a1,1,0,0,0,1-1V3A1,1,0,0,0,10,2ZM6,13H5V12H6Zm0-2H5V10H6ZM6,9H5V8H6Zm2,4H7V12H8Zm0-2H7V10H8ZM8,9H7V8H8Zm2,4H9V12h1Zm0-2H9V10h1Zm0-2H9V8h1Zm0-2.5a.5.5,0,0,1-.5.5h-4A.5.5,0,0,1,5,6.5v-3A.5.5,0,0,1,5.5,3h4a.5.5,0,0,1,.5.5Z",monument:"M7.5,0L6,2.5v7h3v-7L7.5,0z M3,11.5 L3,15h9v-3.5L10.5,10h-6L3,11.5z","monument-JP":"M12,13H4c-0.5,0-1-0.5-1-1V5c0-2,0.8-4,4-4c3.1,0,4,2,4,4v6h1c0.5,0,1,0.5,1,1S12.5,13,12,13z M5,11h4V5c0-1,0-2-2-2 S5,4,5,5V11z",mountain:"m7.5 1c-.3 0-.4.2-.6.4l-5.8 9.5c-.1.1-.1.3-.1.4 0 .5.4.7.7.7h11.6c.4 0 .7-.2.7-.7 0-.2 0-.2-.1-.4l-5.7-9.5c-.2-.2-.4-.4-.7-.4zm0 1.5 3.3 5.5h-.8l-1.5-1.5-1 1.5-1-1.5-1.5 1.5h-.9z",museum:"M7.5,0L1,3.5V4h13V3.5L7.5,0z M2,5v5l-1,1.6V13h13v-1.4L13,10V5H2z M4,6h1v5.5H4V6z M7,6h1v5.5H7V6z M10,6h1 v5.5h-1V6z",music:"m12.5 0c-.0804.0008-.1594.0213999-.23.0599999l-8.77 2.4400001c-.2761 0-.5.2239-.5.5v6.28c-.3029-.1798-.6478-.2763-1-.28-1.1046 0-2 .8954-2 2s.8954 2 2 2 2-.8954 2-2v-4.64l8-2.22v3.64c-.3029-.1798-.6478-.2763-1-.28-1.1046 0-2 .8954-2 2s.8954 2 2 2 2-.8954 2-2v-9c0-.2761-.2239-.5-.5-.5zm-.5 3.14-8 2.22v-2l8-2.22z",natural:"M8.753,6.278a.5.5,0,0,1-.51,0A4.109,4.109,0,0,1,6.5,3.5a2.779,2.779,0,0,0-.59-1.506l-.019-.027a.257.257,0,0,1-.056-.144.237.237,0,0,1,.25-.25.264.264,0,0,1,.057.011A3.523,3.523,0,0,1,7.5,2.5L8.28.94a.246.246,0,0,1,.44,0L9.5,2.5a3.4,3.4,0,0,1,1.339-.907.283.283,0,0,1,.1-.021c.175.009.212.119.221.249a.35.35,0,0,1-.043.141A5.2,5.2,0,0,0,10.5,3.5,4.113,4.113,0,0,1,8.753,6.278ZM5,8H6.289a.25.25,0,0,0,.25-.25.241.241,0,0,0-.061-.15L4.7,5.235a.255.255,0,0,0-.391,0L2.518,7.589a.274.274,0,0,0-.062.161.25.25,0,0,0,.25.25H4L1.335,10.6a.273.273,0,0,0-.058.152A.25.25,0,0,0,1.529,11H3L1.435,12.565a.255.255,0,0,0,.18.435H4v1H5V13H7.385a.255.255,0,0,0,.18-.435L6,11H7.471a.25.25,0,0,0,.25-.25.233.233,0,0,0-.058-.149Zm9.345,3.748a.252.252,0,0,1-.252.252H8.908a.252.252,0,0,1-.226-.365L11.27,6.451a.252.252,0,0,1,.451,0l2.6,5.184h0A.251.251,0,0,1,14.345,11.748ZM12.75,10,11.5,7.5,10.25,10Z","observation-tower":"M12 12.5H11.5L10 9V7C10.9951 7 10.9951 6.25 10.9951 6.25L11.5 3C11.5 3 11.5 2.5 11 2.5H10C10 2.5 10 2 9.5 2H8.5V1.5C8.5 1.5 8.5 0.5 7.5 0.5C6.5 0.5 6.5 1.5 6.5 1.5V2H5.5C5 2 5 2.5 5 2.5H4C3.5 2.5 3.5 3 3.5 3L4.0049 6.25C4.0049 6.25 4.0049 7 5 7V9L3.5 12.5H3C3 12.5 2 12.5 2 13.25C2 14 3 14 3 14H12C12 14 13 14 13 13.25C13 12.5 12 12.5 12 12.5ZM10.25 3.5L10 5H5L4.75 3.4971L10.25 3.5ZM8.5 7V8H6.5V7H8.5ZM6.5006 9.4971H8.4994L9.5 12.5H5.5L6.5006 9.4971Z",optician:"M1.78483 3.81169C2.03375 3.31421 2.54231 3 3.09859 3C3.48821 3 3.86186 3.15477 4.13736 3.43027L4.85354 4.14645C5.0488 4.34171 5.0488 4.65829 4.85354 4.85355C4.65827 5.04882 4.34169 5.04882 4.14643 4.85355L3.43017 4.1373C3.34226 4.04939 3.22303 4 3.09871 4C2.92116 4 2.75884 4.10032 2.67944 4.25912L1.309 7H5.2476C6.0654 7 6.7487 7.5656 6.941 8.3245C7.1146 8.2834 7.3009 8.25 7.5 8.25C7.6991 8.25 7.8854 8.2835 8.059 8.3246C8.2513 7.5656 8.9344 7 9.752 7H13.691L12.3206 4.25912C12.2412 4.10032 12.0788 4 11.9013 4C11.777 4 11.6577 4.04939 11.5698 4.1373L10.8536 4.85355C10.6583 5.04882 10.3417 5.04882 10.1465 4.85355C9.9512 4.65829 9.9512 4.34171 10.1465 4.14645L10.8626 3.43027C11.1381 3.15477 11.5118 3 11.9014 3C12.4577 3 12.9663 3.31421 13.2152 3.81169L14.9414 7.26172L14.9404 7.26308C14.9784 7.33359 15 7.41428 15 7.5V8.5C15 8.7761 14.7761 9 14.5 9H14V9.5C14 11.0889 12.998 12 11.25 12H10.75C9.002 12 8 11.0889 8 9.5V9.3413C7.8499 9.2933 7.6693 9.25 7.5 9.25C7.3307 9.25 7.1503 9.2933 7 9.3413V9.5C7 11.0889 5.9976 12 4.25 12H3.75C2.0024 12 1 11.0889 1 9.5V9H0.4992C0.2235 9 0 8.7765 0 8.5007V7.5C0 7.41428 0.0215731 7.33359 0.0595866 7.26308L0.0585938 7.26172L1.78483 3.81169ZM9.752 8C9.3369 8 9 8.3374 9 8.7524V9.5C9 10.1982 9.1992 11 10.75 11H11.25C12.8008 11 13 10.1982 13 9.5V8.7529C13 8.3379 12.6621 8 12.2471 8H9.752ZM2.7529 8C2.3379 8 2 8.3374 2 8.7524V9.5C2 10.1982 2.1987 11 3.75 11H4.25C5.8013 11 6 10.1982 6 9.5V8.7524C6 8.3374 5.6626 8 5.2475 8H2.7529Z",paint:"m13.5 3.5h-1v-.9973c0-.2777-.2251-.5027-.5027-.5027h-10.4946c-.2776 0-.5027.225-.5027.5027v2.9946c0 .2776.2251.5027.5027.5027h10.4946c.2776 0 .5027-.2251.5027-.5027v-.9973h.5v3.1021l-6.1123 1.4106c-.2271.0527-.3877.2549-.3877.4873v1.5074c-.2783.02-.5.246-.5.5295v2.9261c0 .2966.2404.537.5369.537h.9261c.2966 0 .537-.2404.537-.5369v-2.9261c0-.2834-.2217-.5095-.5-.5295v-1.11l6.1123-1.4102c.2266-.0522.3877-.2544.3877-.4873v-4c0-.2764-.2236-.5-.5-.5z",park:"M14,5.75c0.0113-0.6863-0.3798-1.3159-1-1.61C12.9475,3.4906,12.4014,2.9926,11.75,3 c-0.0988,0.0079-0.1962,0.0281-0.29,0.06c-0.0607-0.66-0.6449-1.1458-1.3048-1.0851C9.8965,1.9987,9.6526,2.1058,9.46,2.28l0,0 c0-0.6904-0.5596-1.25-1.25-1.25S6.96,1.5896,6.96,2.28C6.96,2.28,7,2.3,7,2.33C6.4886,1.8913,5.7184,1.9503,5.2797,2.4618 C5.1316,2.6345,5.0347,2.8451,5,3.07C4.8417,3.0195,4.6761,2.9959,4.51,3C3.6816,2.9931,3.0044,3.659,2.9975,4.4874 C2.9958,4.6872,3.0341,4.8852,3.11,5.07C2.3175,5.2915,1.8546,6.1136,2.0761,6.9061C2.2163,7.4078,2.6083,7.7998,3.11,7.94 c0.2533,0.7829,1.0934,1.2123,1.8763,0.959C5.5216,8.7258,5.9137,8.2659,6,7.71C6.183,7.8691,6.4093,7.9701,6.65,8v5L5,14h5l-1.6-1 v-2c0.7381-0.8915,1.6915-1.5799,2.77-2c0.8012,0.1879,1.603-0.3092,1.7909-1.1103C12.9893,7.7686,13.0025,7.6444,13,7.52 c0.0029-0.0533,0.0029-0.1067,0-0.16C13.6202,7.0659,14.0113,6.4363,14,5.75z M8.4,10.26V6.82C8.6703,7.3007,9.1785,7.5987,9.73,7.6 h0.28c0.0156,0.4391,0.2242,0.849,0.57,1.12C9.7643,9.094,9.0251,9.6162,8.4,10.26z","park-alt1":"M9.428,10.429a.269.269,0,0,1-.074-.18A.25.25,0,0,1,9.6,10h1.447a.25.25,0,0,0,.25-.25.258.258,0,0,0-.079-.179L9.07,7.419a.3.3,0,0,1-.063-.17A.249.249,0,0,1,9.257,7H10.4a.251.251,0,0,0,.25-.251.247.247,0,0,0-.077-.178L8.432,4.434,8.418,4.42a.262.262,0,0,1-.066-.17A.25.25,0,0,1,8.6,4h.866a.25.25,0,0,0,.25-.25.246.246,0,0,0-.068-.164h.006L7.7,1.238a.253.253,0,0,0-.042-.044A.249.249,0,0,0,7.5,1.139h0a.249.249,0,0,0-.158.055.253.253,0,0,0-.042.044L5.352,3.586a.246.246,0,0,0-.068.164.25.25,0,0,0,.25.25H6.4a.241.241,0,0,1,.184.42l-.014.014L4.431,6.571a.247.247,0,0,0-.077.178A.251.251,0,0,0,4.6,7H5.745a.249.249,0,0,1,.25.249.3.3,0,0,1-.063.17L3.782,9.571A.258.258,0,0,0,3.7,9.75a.25.25,0,0,0,.25.25H5.4a.25.25,0,0,1,.248.249.269.269,0,0,1-.074.18l-2.14,2.132-.009.009a.248.248,0,0,0,0,.351A.256.256,0,0,0,3.605,13H7v1l1-.008V13h3.391a.263.263,0,0,0,.26-.254.248.248,0,0,0-.071-.177Z",parking:"M4 2V13H6V9H8.5C10.433 9 12 7.433 12 5.5C12 3.567 10.433 2 8.5 2H4ZM6 7V4H8.5C9.32843 4 10 4.67157 10 5.5C10 6.32843 9.32843 7 8.5 7H6Z","parking-garage":"M10.5,10.14c-0.6637,0.4788-1.4732,0.7121-2.29,0.66h-1.9V14h-1.9V5h3.92 c0.7801-0.0414,1.5484,0.2041,2.16,0.69c0.5779,0.5595,0.875,1.3483,0.81,2.15C11.4042,8.6892,11.1088,9.5388,10.5,10.14z M9,6.9 C8.711,6.6881,8.3579,6.5822,8,6.6H6.31v2.65H8c0.3612,0.0191,0.717-0.0947,1-0.32c0.2559-0.2675,0.3867-0.6308,0.36-1 C9.4072,7.5493,9.274,7.1684,9,6.9z M14.41,4.21c0.114-0.2486,0.007-0.5427-0.24-0.66L7.5,0.45l-6.71,3.1 C0.5387,3.666,0.429,3.9637,0.545,4.215C0.661,4.4663,0.9587,4.576,1.21,4.46l0,0L7.5,1.55l6.29,2.9 c0.2486,0.114,0.5427,0.007,0.66-0.24H14.41z","parking-paid":"M1 13V2h4.5a3.5 3.5 0 0 1 3.21 2.103 3.36 3.36 0 0 0-.504.676c-.23.41-.232.837-.174 1.154l.3 1.625A3.495 3.495 0 0 1 5.5 9H3v4H1Zm4.5-6a1.5 1.5 0 1 0 0-3H3v3h2.5Zm3.516-1.248a.716.716 0 0 1 .062-.484C9.315 4.848 9.978 4 11.5 4c1.521 0 2.185.847 2.421 1.268a.716.716 0 0 1 .064.484L13.019 11H12v2h-1v-2H9.981l-.965-5.248ZM12.75 7 13 5.655C12.83 5.409 12.42 5 11.5 5s-1.33.41-1.5.655L10.25 7h2.5Z",pharmacy:"M9.5,4l1.07-1.54c0.0599,0.0046,0.1201,0.0046,0.18,0c0.6904-0.0004,1.2497-0.5603,1.2494-1.2506 C11.999,0.519,11.4391-0.0404,10.7487-0.04C10.0584-0.0396,9.499,0.5203,9.4994,1.2106c0,0.0131,0.0002,0.0262,0.0006,0.0394 c0,0,0,0.07,0,0.1L7,4H9.5z M12,6V5H3v1l1.5,3.5L3,13v1h9v-1l-1-3.5L12,6z M10,10H8v2H7v-2H5V9h2V7h1v2h2V10z","picnic-site":"M4,3C3.446,3,3,3.446,3,4s0.446,1,1,1h1.2969 L4.6523,7H2.5c-0.554,0-1,0.446-1,1s0.446,1,1,1h1.5098L3.041,12.0098c-0.1284,0.3939,0.0868,0.8173,0.4807,0.9457 s0.8173-0.0868,0.9457-0.4807c0.0005-0.0013,0.0009-0.0027,0.0013-0.004L5.5859,9h3.8281l1.1172,3.4707 c0.1273,0.3943,0.5501,0.6107,0.9443,0.4834s0.6107-0.5501,0.4834-0.9443l0,0L10.9902,9H12.5c0.554,0,1-0.446,1-1s-0.446-1-1-1 h-2.1523L9.7031,5H11c0.554,0,1-0.446,1-1s-0.446-1-1-1H4z M6.873,5H8.127l0.6445,2h-2.543L6.873,5z",pitch:"M5,3C4.4477,3,4,2.5523,4,2s0.4477-1,1-1s1,0.4477,1,1S5.5523,3,5,3z M12.5,10H10L9,7L8,5.25L9,5l2.3,1l0,0 c0.2761,0.1105,0.5895-0.0239,0.7-0.3S11.9761,5.1105,11.7,5l0,0L9,4H7L5,5L4,6H2.5C2.2239,6,2,6.2239,2,6.5S2.2239,7,2.5,7H5l1-1 l1,2l-2,2v3.5C5,13.7761,5.2239,14,5.5,14S6,13.7761,6,13.5v-3.11L8,9l1,2h3.5c0.2761,0,0.5-0.2239,0.5-0.5S12.7761,10,12.5,10z","place-of-worship":"M7.5,0l-2,2v2h4V2 L7.5,0z M5.5,4.5L4,6h7L9.5,4.5H5.5z M2,6.5c-0.5523,0-1,0.4477-1,1V13h2V7.5C3,6.9477,2.5523,6.5,2,6.5z M4,6.5V13h7V6.5H4z M13,6.5c-0.5523,0-1,0.4477-1,1V13h2V7.5C14,6.9477,13.5523,6.5,13,6.5z",playground:"m3.00002 1.15c.2091-.8016 1.0284-1.2819 1.83-1.0729s1.2819 1.0284 1.0729 1.83c-.2003.7681-.9643 1.2471-1.7429 1.0929-.8126-.161-1.3409-.9502-1.18-1.7629.0058-.0292.0125-.0583.02-.0871zm10.99998 11.17c.1032.5426-.2531 1.066-.7956 1.1692-.0015.0003-.0029.0006-.0044.0008-.4252.086-.8574-.1119-1.07-.49l-1.68-3.37-1.44998.29-.22.08h-.06v2.15l.62-.15h.14c.2871.0054.5155.2425.5101.5297-.0039.2064-.1295.391-.3201.4703l-5 1c-.0563.0095-.1137.0095-.17 0-.2872 0-.52-.2328-.52-.52 0-.2099.1262-.3993.32-.48l4.15-.83v-2.17l-3.22.58c-.164.0423-.336.0423-.5 0-.3394-.0867-.6088-.3446-.71-.68h-.02l-1-4.07c-.0312-.1416-.0312-.2884 0-.43.0936-.387.4078-.6815.8-.75l4.7-.52v-4.13h.22v4.1h.06l.22-.02.4-.08h.21c.2673.0643.43258.3323.37.6-.0439.235-.251.4041-.49.4l-.49.08h-.22-.06v2.86h.06l.22-.06 1.80998-.36c.4275-.0352.8299.2062 1 .6l2 3.94c.077.0758.1411.1636.19.26zm-5.49998-7.19-2.5.27.74 2.94 1.76-.34z",police:"M5.5,1L6,2h5l0.5-1H5.5z M6,2.5v1.25c0,0,0,2.75,2.5,2.75S11,3.75,11,3.75V2.5H6z M1.9844,3.9863 C1.4329,3.9949,0.9924,4.4485,1,5v4c-0.0001,0.6398,0.5922,1.1152,1.2168,0.9766L5,9.3574V14l5.8789-6.9297 C10.7391,7.0294,10.5947,7,10.4414,7H6.5L3,7.7539V5C3.0077,4.4362,2.5481,3.9775,1.9844,3.9863z M11.748,7.7109L6.4121,14H12 V8.5586C12,8.2451,11.9061,7.9548,11.748,7.7109z","police-JP":"M7.5,1A6.5,6.5,0,1,0,14,7.5,6.5,6.5,0,0,0,7.5,1Zm2.6,2.84L7.5,6.44,4.9,3.84A4.4428,4.4428,0,0,1,10.1,3.84ZM3.84,4.9007,6.4394,7.5l-2.6,2.5993A4.4429,4.4429,0,0,1,3.84,4.9007ZM4.9,11.16l2.6-2.6,2.6,2.6A4.4428,4.4428,0,0,1,4.9,11.16Zm6.26-1.0606L8.5606,7.5l2.6-2.5993a4.4429,4.4429,0,0,1-.0006,5.1986Z",post:"M13.5 3.65139C13.5 3.86918 13.3912 4.07257 13.2099 4.19338L7.5 8L1.79006 4.19338C1.60885 4.07257 1.5 3.86918 1.5 3.65139C1.5 3.29164 1.79164 3 2.15139 3L12.8486 3C13.2084 3 13.5 3.29164 13.5 3.65139Z M13.5 5.96713V11C13.5 11.5523 13.0523 12 12.5 12H2.5C1.94772 12 1.5 11.5523 1.5 11L1.5 5.96713C1.5 5.76746 1.72254 5.64836 1.88868 5.75912L7.5 9.5L13.1113 5.75912C13.2775 5.64836 13.5 5.76746 13.5 5.96713Z","post-JP":"m1.5 4c0-.26522.10536-.51957.29289-.70711.18754-.18753.44189-.29289.70711-.29289h10c.2652 0 .5196.10536.7071.29289.1875.18754.2929.44189.2929.70711s-.1054.51957-.2929.70711c-.1875.18753-.4419.29289-.7071.29289h-10c-.26513 0-.51941-.10529-.70693-.29272-.18752-.18742-.29294-.44165-.29307-.70678zm11 2.5h-10c-.26522 0-.51957.10536-.70711.29289-.18753.18754-.29289.44189-.29289.70711s.10536.51957.29289.70711c.18754.18753.44189.29289.70711.29289h4v4.5c0 .2652.10536.5196.29289.7071.18754.1875.44189.2929.70711.2929s.51957-.1054.70711-.2929c.18753-.1875.29289-.4419.29289-.7071v-4.5h4c.2652 0 .5196-.10536.7071-.29289.1875-.18754.2929-.44189.2929-.70711s-.1054-.51957-.2929-.70711c-.1875-.18753-.4419-.29289-.7071-.29289z",prison:"M3.5,1v13H12V1H3.5z M9.5,2H11v3.5H9.5V2z M4.5,2.0547H6V7H4.5V2.0547z M7,2.0547h1.5V7H7V2.0547z M10.25,6.5 C10.6642,6.5,11,6.8358,11,7.25S10.6642,8,10.25,8l0,0C9.8358,8,9.5,7.6642,9.5,7.25l0,0C9.5,6.8358,9.8358,6.5,10.25,6.5z M7,8 h1.4727L8.5,13H7.0273L7,8z M4.5,8.166H6V13H4.5V8.166z M9.5,9H11v4H9.5V9z",racetrack:"M4.99321 1.58228C5.03861 1.30989 4.8546 1.05228 4.58222 1.00688C4.30983 0.961484 4.05222 1.14549 4.00682 1.41788L2.00682 13.4179C1.96142 13.6903 2.14543 13.9479 2.41782 13.9933C2.6902 14.0387 2.94782 13.8547 2.99321 13.5823L3.6632 9.56238C4.46947 9.67976 5.3398 9.7187 6.026 10.2C6.45057 10.505 6.94151 10.7047 7.45839 10.7828C8.424 10.9286 9.28807 10.3976 10.242 10.549L11.531 10.743C11.7908 10.7822 12.0609 10.5828 12.1 10.323L12.984 4.38899L12.988 4.38499C13.0241 4.12469 12.8213 3.85686 12.561 3.82099L11.272 3.62699C10.3092 3.48421 9.44342 3.9997 8.48942 3.85618C8.06155 3.79181 7.65443 3.62915 7.3 3.38099C6.56128 2.86385 5.68119 2.77814 4.81426 2.656L4.99321 1.58228ZM4.40351 5.12049L4.73218 3.14849C5.33161 3.22962 5.96556 3.27693 6.521 3.51699L6.22626 5.48223C5.65576 5.24949 5.01279 5.2037 4.40351 5.12049ZM3.74549 9.0686L4.07436 7.09542C4.69451 7.18147 5.35159 7.22405 5.933 7.46299L6.23273 5.48673C6.89067 5.75614 7.3918 6.21952 8.126 6.32799L8.426 4.34799C9.16402 4.45947 9.77459 4.17131 10.484 4.11399L10.184 6.07999C9.47389 6.1406 8.85956 6.44062 8.124 6.32999L7.83802 8.30784C7.10186 8.19874 6.59996 7.73286 5.939 7.46399L5.639 9.43999C5.04421 9.20148 4.3764 9.15882 3.74549 9.0686ZM7.83898 8.30813C8.57282 8.41936 9.19002 8.11708 9.9 8.05799L10.184 6.07999C10.8385 6.01968 11.5087 6.19133 12.152 6.28899L11.872 8.26499C11.2277 8.16793 10.5563 7.99624 9.901 8.05799L9.601 10.034C8.89229 10.0817 8.26589 10.3943 7.539 10.284L7.83898 8.30813Z","racetrack-boat":"m10.0643 11.2159c.4691-.5125.9358-1.0224 1.5938-1.2417.9212-.3071 1.5902.0778 1.8665.2805.7241.531 1.3904-.2204.5914-.8064-.4269-.3131-1.4451-.86577-2.7741-.4228-.7202.2401-1.2127.7667-1.70487 1.2931-.40012.4279-.80009.8556-1.32212 1.1291-.61911.3243-1.06486-.0266-1.06486-.6352v-.0121c.00021-.7982-.40819-1.3004-1.25-1.3004-.49071 0-.99216.2582-1.50001.5-1.17511.5596-2.31799 1.2859-3.31714 2.1134-.210639.1751-.243189.4951-.06696.7066.2505.3006.58076.1621.82938-.0379.41361-.3329 1.78116-1.3913 2.93376-1.94.47652-.227.86169-.3421 1.12097-.3421.24997 0 .24997.1016.24997.3396-.00202 1.3264 1.29025 2.1428 2.52893 1.4939.50415-.2641.89557-.6917 1.28535-1.1176zm-7.56426-2.2159c1.5-1 3.25492-2 5-2 .75 0 .75.375.75.75s0 .75.75.75c2.52746 0 5.36316-3.21377 5.49996-5.5l-2.5 1-2.34195-.97445c-.61176-.20392-.92799.74476-.31623.94868l1.15818.52577-1.49996.5-4-1.25c-.23606-.07869-.38872.02744-.5.25l-1.5 3-2.00004 1zm2.5-7c0-.5523.4477-1 1-1s1 .4477 1 1-.4477 1-1 1-1-.4477-1-1z","racetrack-cycling":"M8 1L11 4H12C14 4 14 1 12 1H8ZM8.463 3C8.34323 3.00901 8.2307 3.06084 8.146 3.146L5.646 5.646C5.59615 5.69579 5.55739 5.75555 5.53225 5.82136C5.50711 5.88718 5.49617 5.95757 5.50014 6.02791C5.5041 6.09825 5.52289 6.16696 5.55526 6.22953C5.58764 6.2921 5.63287 6.34713 5.688 6.391L7.846 8.117L6.57 10.242C6.50157 10.356 6.48125 10.4926 6.51351 10.6216C6.54577 10.7506 6.62796 10.8616 6.742 10.93C6.85604 10.9984 6.9926 11.0187 7.12162 10.9865C7.25065 10.9542 7.36157 10.872 7.43 10.758L8.93 8.258C8.99256 8.15404 9.01519 8.03088 8.99366 7.91148C8.97214 7.79207 8.90793 7.68457 8.813 7.609L7.304 6.402L9 4.707L10.146 5.854C10.1925 5.9004 10.2477 5.93718 10.3085 5.96223C10.3692 5.98728 10.4343 6.00012 10.5 6H13C13.1326 6 13.2598 5.94732 13.3536 5.85355C13.4473 5.75979 13.5 5.63261 13.5 5.5C13.5 5.36739 13.4473 5.24021 13.3536 5.14645C13.2598 5.05268 13.1326 5 13 5H10.707L8.854 3.146C8.80319 3.09493 8.74195 3.05545 8.67446 3.03025C8.60698 3.00505 8.53484 2.99473 8.463 3ZM2.949 7C2.16222 7.01338 1.4122 7.33534 0.860573 7.89651C0.308947 8.45767 -0.000113683 9.21311 3.13683e-08 10C3.13683e-08 10.7956 0.316071 11.5587 0.87868 12.1213C1.44129 12.6839 2.20435 13 3 13C3.79565 13 4.55871 12.6839 5.12132 12.1213C5.68393 11.5587 6 10.7956 6 10C6.00006 9.60179 5.92083 9.20756 5.76695 8.84028C5.61307 8.47301 5.38761 8.14004 5.10372 7.8608C4.81982 7.58157 4.48318 7.36164 4.11341 7.21385C3.74364 7.06606 3.34815 6.99336 2.95 7H2.949ZM11.949 7C11.1622 7.01338 10.4122 7.33534 9.86057 7.89651C9.30895 8.45767 8.99989 9.21311 9 10C9 10.7956 9.31607 11.5587 9.87868 12.1213C10.4413 12.6839 11.2044 13 12 13C12.7956 13 13.5587 12.6839 14.1213 12.1213C14.6839 11.5587 15 10.7956 15 10C15.0001 9.60179 14.9208 9.20756 14.767 8.84028C14.6131 8.47301 14.3876 8.14004 14.1037 7.8608C13.8198 7.58157 13.4832 7.36164 13.1134 7.21385C12.7436 7.06606 12.3482 6.99336 11.95 7H11.949ZM12.049 8C12.5709 8.01279 13.0671 8.22914 13.4316 8.60283C13.7962 8.97653 14.0002 9.47795 14 10C14 10.5304 13.7893 11.0391 13.4142 11.4142C13.0391 11.7893 12.5304 12 12 12C11.4696 12 10.9609 11.7893 10.5858 11.4142C10.2107 11.0391 10 10.5304 10 10C9.99992 9.73318 10.0532 9.46904 10.1568 9.22314C10.2603 8.97724 10.4121 8.75455 10.603 8.56818C10.7939 8.3818 11.0202 8.23552 11.2686 8.13794C11.5169 8.04036 11.7823 7.99346 12.049 8V8Z","racetrack-horse":"M10 1C9.73478 1 9.48043 1.10536 9.29289 1.29289C9.10536 1.48043 9 1.73478 9 2C9 2.26522 9.10536 2.51957 9.29289 2.70711C9.48043 2.89464 9.73478 3 10 3C10.2652 3 10.5196 2.89464 10.7071 2.70711C10.8946 2.51957 11 2.26522 11 2C11 1.73478 10.8946 1.48043 10.7071 1.29289C10.5196 1.10536 10.2652 1 10 1ZM5.5 3C5.25 3 4.5 3 5 3.75L6.25 6H4.5C4.223 6.003 3.983 6.1 3.75 6.25C2.944 5.121 2.242 5.552 1.51 6C1.107 6.247 0.694 6.499 0.25 6.5C0.184332 6.50201 0.121902 6.52899 0.0754461 6.57545C0.0289898 6.6219 0.00200653 6.68433 0 6.75C0.00200653 6.81567 0.0289898 6.8781 0.0754461 6.92455C0.121902 6.97101 0.184332 6.99799 0.25 7C0.626 7.02 1.057 6.907 1.488 6.793C2.144 6.62 2.798 6.448 3.254 6.75C3.16 6.937 3 7.5 3 8L2.998 9.51C2.792 9.714 2.619 9.633 2.443 9.55C2.303 9.485 2.16 9.42 2 9.5L1 12.45C1 12.7 1.393 12.752 1.5 12.5L2.25 10.744C2.998 10.744 4.5 10 5 9L9 10L11.5 12.5C11.697 12.697 12.12 12.362 11.96 12.115L10 9L12 6.5C12.248 7 12.495 7 12.986 7H13L13.6 7.75C13.988 8.235 14.82 7.743 14.5 7.25L12.834 4.79L13 4.5C13.062 4.313 12.637 3.924 12.5 4L10.5 5.5L8.89 3.187C8.84314 3.12862 8.78377 3.08151 8.71627 3.04915C8.64877 3.01678 8.57486 2.99999 8.5 3H5.5ZM9 5.25L9.5 6L6.777 7.916C6.72243 7.95469 6.66065 7.98204 6.59532 7.99643C6.52999 8.01081 6.46244 8.01194 6.39666 7.99975C6.33089 7.98756 6.26823 7.96229 6.2124 7.92545C6.15656 7.8886 6.10869 7.84093 6.07162 7.78525C6.03454 7.72957 6.00901 7.66701 5.99655 7.60129C5.98409 7.53556 5.98494 7.46801 5.99905 7.40262C6.01317 7.33723 6.04026 7.27534 6.07873 7.22061C6.1172 7.16588 6.16626 7.11943 6.223 7.084L9 5.25Z",rail:"M 3 1 C 2.4477 1 2 1.4477 2 2 L 2 10 C 2 10.5523 2.4477 11 3 11 L 12 11 C 12.5523 11 13 10.5523 13 10 L 13 2 C 13 1.4477 12.5523 1 12 1 L 3 1 z M 5.75 1.5 L 5.7597656 1.5 L 9.2597656 1.5 C 9.3978656 1.5 9.5097656 1.6119 9.5097656 1.75 C 9.5097656 1.8881 9.3978656 2 9.2597656 2 L 5.75 2 C 5.6119 2 5.5 1.8881 5.5 1.75 C 5.5 1.6119 5.6119 1.5 5.75 1.5 z M 3.5 3 L 7 3 L 7 7 L 3.5 7 C 3.2239 7 3 6.7761 3 6.5 L 3 3.5 C 3 3.2239 3.2239 3 3.5 3 z M 8 3 L 11.5 3 C 11.7761 3 12 3.2239 12 3.5 L 12 6.5 C 12 6.7761 11.7761 7 11.5 7 L 8 7 L 8 3 z M 5 8 C 5.5523 8 6 8.4477 6 9 C 6 9.5523 5.5523 10 5 10 C 4.4477 10 4 9.5523 4 9 C 4 8.4477 4.4477 8 5 8 z M 10 8 C 10.5523 8 11 8.4477 11 9 C 11 9.5523 10.5523 10 10 10 C 9.4477 10 9 9.5523 9 9 C 9 8.4477 9.4477 8 10 8 z M 10.445312 11.994141 C 10.380597 11.999652 10.314981 12.018581 10.253906 12.050781 C 10.030606 12.168381 9.9302313 12.433922 10.019531 12.669922 L 10.189453 13 L 4.8105469 13 L 4.9394531 12.730469 C 5.0371531 12.472169 4.9067375 12.183637 4.6484375 12.085938 C 4.4124375 11.996738 4.1468969 12.097113 4.0292969 12.320312 L 3.0292969 14.320312 C 3.0080969 14.377912 2.9986 14.4387 3 14.5 C 3 14.7761 3.2239 15 3.5 15 C 3.6802 14.999 3.8450875 14.899434 3.9296875 14.740234 L 3.9296875 14.689453 L 4 14.689453 L 4.3105469 14 L 10.689453 14 L 11 14.689453 L 11 14.740234 C 11.0846 14.899434 11.249488 14.999 11.429688 15 C 11.705787 15 11.929688 14.7761 11.929688 14.5 C 11.949587 14.4212 11.949587 14.338566 11.929688 14.259766 L 10.929688 12.259766 C 10.833163 12.076541 10.639459 11.977608 10.445312 11.994141 z","rail-light":"M5.5,0C5,0,5,0.5,5,0.5v1C5,1.777,5.223,2,5.5,2S6,1.777,6,1.5V1h1v2H6c0,0-2,0-2,2v3c0,3,3,3,3,3h1 c0,0,3,0,3-3V5c0-2-2-2-2-2H8V1h1v0.5C9,1.777,9.223,2,9.5,2S10,1.777,10,1.5v-1C10,0,9.5,0,9.5,0H5.5z M7.5,4l2.0449,0.7734L10,6.5 C10.1316,7,9.5,7,9.5,7h-4c0,0-0.6316,0-0.5-0.5l0.4551-1.7266L7.5,4z M7.5,8C7.7761,8,8,8.2239,8,8.5S7.7761,9,7.5,9 S7,8.7761,7,8.5S7.2239,8,7.5,8z M4.125,12L3,15h1.5l0.375-1h5.25l0.375,1H12l-1.125-3h-1.5l0.375,1h-4.5l0.375-1H4.125z","rail-metro":"M5.5,0c0,0-0.75,0-1,1L3,6.5V10c0,1,1,1,1,1h7c0,0,1,0,1-1V6.5L10.5,1c-0.2727-1-1-1-1-1H5.5z M6.5,1.5h2 c0,0,0.5357,0,0.75,1L10,6c0.2146,1.0017-1,1-1,1H6c0,0-1.2146,0.0017-1-1l0.75-3.5C5.9643,1.5,6.5,1.5,6.5,1.5z M5,8 c0.5523,0,1,0.4477,1,1s-0.4477,1-1,1S4,9.5523,4,9S4.4477,8,5,8z M6.75,8h1.5C8.3885,8,8.5,8.1115,8.5,8.25S8.3885,8.5,8.25,8.5 h-1.5C6.6115,8.5,6.5,8.3885,6.5,8.25S6.6115,8,6.75,8z M10,8c0.5523,0,1,0.4477,1,1s-0.4477,1-1,1S9,9.5523,9,9S9.4477,8,10,8z M4.125,12L3,15h1.5l0.375-1h5.25l0.375,1H12l-1.125-3h-1.5l0.375,1h-4.5l0.375-1H4.125z","ranger-station":"M9,0.5l-2,1v3.7734L2,8v6h4v-4h3 v4h4V8L8,5.2734V4l1-0.5l2,1l2-1v-3l-2,1L9,0.5z",recycling:"M2.4556,8.6134C2.118,9.2112,1.501,10.3021,2.593,11.0312c0.3432,0.2268,0.7275,0.3836,1.131,0.4614 C4.0314,11.5382,4.0466,12.0111,3.6855,12c-0.3849-0.0193-2.2596-0.1934-2.5606-1.5995c-0.1556-0.8213,0.0204-1.5571,0.504-2.3556 L2.3263,6.812L1.0196,6.0688L4.5,4v4L3.1941,7.3057L2.4556,8.6134z M6.7,2.034c1.155-0.628,1.823,0.43,2.191,1.007l0.8059,1.2631 L8.431,5.112L12,6.986L11.803,2.96l-1.2639,0.8066L9.779,2.578C9.2572,1.8321,8.875,1.2812,7.944,1.033 C6.307,0.7203,5.3007,2.6194,5.311,2.607c-0.1639,0.2871,0.2156,0.5399,0.451,0.21C6.0202,2.4969,6.339,2.2309,6.7,2.034z M13.294,8.221c-0.0877-0.1897-0.5487-0.1413-0.419,0.267c0.1312,0.3892,0.1845,0.8003,0.157,1.21C12.939,11.01,11.684,11,11,11H9.5 V9.5l-3.5,2l3.488,2.025L9.4926,12H11c0.8906,0.0153,1.5999-0.1759,2.2-0.713C14.4,10.226,13.294,8.221,13.294,8.221z","religious-buddhist":"M13.4978,6.9989h-0.5329c-0.09997-1.10708-0.53528-2.15731-1.2478-3.0105l0.378-0.3784 c0.19605-0.19447,0.19733-0.51105,0.00286-0.7071C11.90698,2.71037,11.59733,2.70518,11.4,2.8912l0,0l-0.0123,0.0123L11.01,3.2815 c-0.85331-0.71298-1.90385-1.14864-3.0113-1.2488V1.5c0-0.27614-0.22386-0.5-0.5-0.5s-0.5,0.22386-0.5,0.5v0.5327 C5.8916,2.13306,4.84144,2.56871,3.9884,3.2815L3.61,2.9C3.41007,2.70952,3.09358,2.71717,2.9031,2.9171 c-0.184,0.19312-0.184,0.49668,0,0.6898l0.3784,0.3775C2.56787,4.83856,2.13216,5.89031,2.0327,6.9989H1.5 c-0.27614,0-0.5,0.22386-0.5,0.5s0.22386,0.5,0.5,0.5h0.5327c0.09987,1.10695,0.535,2.15711,1.2473,3.0103l-0.3779,0.3779 c-0.19538,0.19514-0.19557,0.51173-0.00043,0.70711c0.19053,0.19076,0.49798,0.19611,0.69503,0.01209L3.609,12.094l0.3779-0.3779 c0.8533,0.71312,1.90395,1.1488,3.0115,1.2488v0.5329c0,0.27614,0.22386,0.5,0.5,0.5s0.5-0.22386,0.5-0.5v-0.5329 c1.10719-0.10026,2.15744-0.53592,3.0105-1.2488l0.3779,0.3779c0.19514,0.19538,0.51173,0.19557,0.70711,0.00043 c0.19076-0.19053,0.19611-0.49798,0.01209-0.69503l-0.0123-0.0123l0,0l-0.3779-0.3779c0.71283-0.8531,1.14848-1.90333,1.2488-3.0105 h0.5329c0.27609-0.00544,0.49549-0.23366,0.49006-0.50975C13.98227,7.22064,13.76611,7.00435,13.4978,6.9989z M7.9987,3.0505 c0.83871,0.09248,1.63383,0.42154,2.2926,0.9488l-2.15,2.15c-0.04663-0.0218-0.09436-0.04116-0.143-0.058V3.0505H7.9987z M6.9987,3.0505V6.091c-0.04864,0.01684-0.09637,0.0362-0.143,0.058l-2.15-2.15c0.65897-0.52726,1.45431-0.85622,2.2932-0.9485 H6.9987z M3.9987,4.7062l2.15,2.15c-0.0218,0.04663-0.04116,0.09436-0.058,0.143H3.0505 c0.09243-0.83886,0.42154-1.63413,0.9489-2.293L3.9987,4.7062z M3.0505,7.9987H6.091c0.01687,0.04863,0.03623,0.09636,0.058,0.143 l-2.15,2.15C3.47173,9.63281,3.14276,8.83753,3.0505,7.9987z M6.9989,11.9471c-0.83871-0.09248-1.63383-0.42154-2.2926-0.9488 l2.15-2.15c0.04663,0.0218,0.09436,0.04116,0.143,0.058v3.0405L6.9989,11.9471z M7.9989,11.9471V8.9066 c0.04864-0.01683,0.09638-0.03619,0.143-0.058l2.15,2.15c-0.65895,0.5273-1.4543,0.85627-2.2932,0.9485H7.9989z M10.9989,10.2914 l-2.15-2.15c0.02177-0.04664,0.04113-0.09437,0.058-0.143h3.0415c-0.09276,0.83901-0.42232,1.6343-0.9502,2.293H10.9989z M8.9066,6.9989c-0.01684-0.04864-0.0362-0.09637-0.058-0.143l2.15-2.15c0.52726,0.65877,0.85632,1.45389,0.9488,2.2926H8.9066 V6.9989z","religious-christian":"M6,0.9552V4H3v3h3v8h3V7h3V4H9V1 c0-1-0.9776-1-0.9776-1H6.9887C6.9887,0,6,0,6,0.9552z","religious-jewish":"M7.50049 0.5L5.49949 4H1L3.49949 7.5L1 11H5.49949L7.50049 14.5L9.50049 11H14L11.5005 7.5L14 4H9.50049L7.50049 0.5Z","religious-muslim":"M12.0962 12.0962C9.55779 14.6346 5.44221 14.6346 2.90381 12.0962C0.365398 9.55779 0.365398 5.44221 2.90381 2.90381C5.44221 0.365398 9.55779 0.365398 12.0962 2.90381C12.2675 3.07512 12.4273 3.25362 12.5754 3.43832C10.5566 1.86336 7.63341 2.00437 5.77643 3.86135C3.76685 5.87092 3.76685 9.12908 5.77643 11.1387C7.63341 12.9956 10.5566 13.1366 12.5754 11.5617C12.4273 11.7464 12.2675 11.9249 12.0962 12.0962Z M10.1 6.5H8L9.7 8L9 10.5L11 9L13 10.5L12.3 8L14 6.5H11.9L11 4.5L10.1 6.5Z","religious-shinto":"M12.5,2.5H2.5a.9448.9448,0,0,0-1,1,.9448.9448,0,0,0,1,1H3V12a.9448.9448,0,0,0,1,1,.9448.9448,0,0,0,1-1V8h5v4a.9448.9448,0,0,0,1,1,.9448.9448,0,0,0,1-1V4.5h.5a.9448.9448,0,0,0,1-1,.9448.9448,0,0,0-1-1ZM10,6H8V4.5h2ZM7,6H5V4.5H7Z","residential-community":"m11.8 12.5v-2.5c.7-.1 1.2-.7 1.2-1.5s-.7-1.5-1.5-1.5-1.5.7-1.5 1.5c0 .7.5 1.4 1.2 1.5v2.5h-4.2v-11.5h-5v11.5h-1v.5h13v-.5zm-5.8-2.5h-3v-1h3zm0-2h-3v-1h3zm0-2h-3v-1h3zm0-2h-3v-1h3z",restaurant:"M3.5,0l-1,5.5c-0.1464,0.805,1.7815,1.181,1.75,2L4,14c-0.0384,0.9993,1,1,1,1s1.0384-0.0007,1-1L5.75,7.5 c-0.0314-0.8176,1.7334-1.1808,1.75-2L6.5,0H6l0.25,4L5.5,4.5L5.25,0h-0.5L4.5,4.5L3.75,4L4,0H3.5z M12,0 c-0.7364,0-1.9642,0.6549-2.4551,1.6367C9.1358,2.3731,9,4.0182,9,5v2.5c0,0.8182,1.0909,1,1.5,1L10,14c-0.0905,0.9959,1,1,1,1 s1,0,1-1V0z","restaurant-bbq":"M12.0166,12.5H14.5L12,15V12.5165a1.6189,1.6189,0,0,1-1.1367.4806,1.6,1.6,0,0,1-.9931-.3448A6.7838,6.7838,0,0,1,9.8783,2.3418,1.6179,1.6179,0,0,1,12,2.462V0l2.5,2.5H12.036a1.5927,1.5927,0,0,1,.1225.1289,1.6239,1.6239,0,0,1-.2871,2.2793A3.5148,3.5148,0,0,0,10.75,7.4951a3.5578,3.5578,0,0,0,1.1465,2.6162,1.6352,1.6352,0,0,1,.2325,2.2783C12.0949,12.4315,12.0535,12.4624,12.0166,12.5ZM2.504,0l-1,5.5c-.1464.805,1.7815,1.181,1.75,2L3.004,14a.9625.9625,0,0,0,1,1,.9625.9625,0,0,0,1-1l-.25-6.5c-.0314-.8176,1.7334-1.1808,1.75-2l-1-5.5h-.5l.25,4-.75.5L4.254,0h-.5l-.25,4.5L2.754,4l.25-4Z","restaurant-noodle":"M4.457,11.9892,1,8V7H14V8l-3.4961,3.9891ZM3.9882,2.5a.5.5,0,0,0-1,0v.5671l-1.7969.3675a.25.25,0,1,0,.094.4911l1.7029-.2776v.5662l-1.75.0357a.25.25,0,0,0,0,.5l1.75.0357V5.998h1Zm9.5,1.5-7.5.2625V2.9951l7.594-1.0737a.5.5,0,0,0-.1881-.9822L5.9792,2.4555a.4963.4963,0,0,0-.991.0445v.2276l-.493.1009V3.18l.493-.08V4.2974l-.493.01v.4608L13.4882,5a.5.5,0,0,0,0-1ZM10,13H5v.5757h5Z","restaurant-pizza":"M1.393 7.931.025 7.315A14.05 14.05 0 0 1 7.764-.001l.027.07.511 1.331-.003.001a12.613 12.613 0 0 0-6.906 6.53Zm10.963 4.96L2.42 8.414a11.604 11.604 0 0 1 6.354-6.009l.003-.001.817 2.122c-.028-.002-.052-.016-.081-.016a1.062 1.062 0 1 0 .764 1.793l2.413 6.273a.249.249 0 0 1-.334.316ZM7.426 7.52a.925.925 0 1 0-1.849 0 .925.925 0 0 0 1.849 0Zm3.017 2.03a.925.925 0 1 0-.07.353.924.924 0 0 0 .07-.354Z","restaurant-seafood":"M11.433,10.0889h2.49v.75H11.8525A4.81,4.81,0,0,1,13.4751,13.14l-.71.2422a4.01,4.01,0,0,0-1.74-2.1971,1.7775,1.7775,0,0,1-1.0352.4538L8.4374,12.9852H6.5188L4.9839,11.623a2.0222,2.0222,0,0,1-1.0929-.44,4.0093,4.0093,0,0,0-1.7426,2.1988l-.71-.2422a4.8146,4.8146,0,0,1,1.622-2.3007H.99v-.75H3.4839l.8633-.6764L3.3329,7.7567a2.2738,2.2738,0,0,1-.269.0293,2.0192,2.0192,0,0,1-2.0532-2.08c0-2.08,1.979-4.16,1.979-4.16L2.2531,5.9931l1.7255-.0012L4.9913,2.9852l0,2.9956a2.0936,2.0936,0,0,1-.6993,1.4121l.8536,1.3936L5.23,8.7208a3.8669,3.8669,0,0,1,4.4784,0l.0605.0474.869-1.4152a2.1177,2.1177,0,0,1-.6433-1.3722l0-2.9956.9836,3.0067,1.7547.0012-.7367-4.4466s1.982,2.08,1.982,4.16a2.0211,2.0211,0,0,1-2.0562,2.08,2.3125,2.3125,0,0,1-.3441-.0376L10.5676,9.3945l.8407.6593C11.4212,10.0638,11.4218,10.0782,11.433,10.0889Z","restaurant-sushi":"M5.5,3C5.2239,3,5,3.2239,5,3.5H2.75C1.2265,3.5,0,4.7265,0,6.25c0,0.8274,0.3687,1.5592,0.9434,2.0625 C0.3803,8.6675,0,9.2893,0,10c0,1.0994,0.9006,2,2,2h3.5h2H10c1.0994,0,2-0.9006,2-2c0-0.4883-0.1863-0.9294-0.4805-1.2773 l2.1777,0.9629c0.3716,0.1831,0.8213,0.0303,1.0044-0.3413c0.1831-0.3716,0.0303-0.8213-0.3413-1.0044 c-0.0188-0.0093-0.038-0.0178-0.0576-0.0254l-1.8105-0.8027l1.6309-0.2715c0.4099-0.0599,0.6936-0.4408,0.6337-0.8507 c-0.0544-0.3724-0.3765-0.6469-0.7528-0.6415c-0.0426,0.0003-0.085,0.0042-0.127,0.0117l-2.1309,0.3555 C11.2595,4.9521,10.0387,3.7837,8,3.5488V3.5C8,3.2239,7.7761,3,7.5,3H5.5z M6,4h1v5v2H6V9V4z M9.5,8 c0.259,0,0.4638,0.1974,0.4902,0.4492l0.0762-0.1328c0.1385-0.2399,0.4437-0.3201,0.6836-0.1816s0.3201,0.4418,0.1816,0.6816 l-0.2578,0.4473C10.8727,9.445,11,9.7021,11,10c0,0.5626-0.4374,1-1,1H8V9h1V8.5C9,8.223,9.223,8,9.5,8z M2.4395,8.0703 c0.1934-0.0242,0.3903,0.0662,0.4941,0.2461l0.2012,0.3477C3.226,8.5647,3.3538,8.5,3.5,8.5C3.777,8.5,4,8.723,4,9h1v2H2 c-0.5626,0-1-0.4374-1-1s0.4374-1,1-1h0.1738L2.0684,8.8164C1.9299,8.5765,2.0101,8.2733,2.25,8.1348 C2.31,8.1001,2.375,8.0784,2.4395,8.0703z","road-accident":"M12.6,8.7,11.5,6.5a1.05,1.05,0,0,0-.9-.5H4.4a1.05,1.05,0,0,0-.9.5L2.4,8.7,1.16,9.852a.5.5,0,0,0-.16.366V14.5a.5.5,0,0,0,.5.5h2c.2,0,.5-.2.5-.4V14h7v.5c0,.2.2.5.4.5h2.1a.5.5,0,0,0,.5-.5V10.218a.5.5,0,0,0-.16-.366ZM4.5,7h6l1,2h-8ZM5,11.6c0,.2-.3.4-.5.4H2.4c-.2,0-.4-.3-.4-.5V10.4c.1-.3.3-.5.6-.4l2,.4c.2,0,.4.3.4.5Zm8-.1c0,.2-.2.5-.4.5H10.5c-.2,0-.5-.2-.5-.4v-.7c0-.2.2-.5.4-.5l2-.4c.3-.1.5.1.6.4ZM8,4H7L6,0H9ZM1.1,1.8,3.7.3l1.1,4L4,4.7ZM11.3.3l2.6,1.5L11,4.8l-.9-.5Z",roadblock:"M7.5 14C11.0899 14 14 11.0899 14 7.5C14 3.91015 11.0899 1 7.5 1C3.91015 1 1 3.91015 1 7.5C1 11.0899 3.91015 14 7.5 14ZM12 6V9H3V6H12Z",rocket:"m11.5547 2c-2.14407 0-5.02107 1.471-6.95307 4h-1.6016c-1.1573 0-1.8206.8638-2.277302 1.7773l-.6114 1.2227h1.443402 1.4453l1.5 1.5 1.5 1.5v1.4453 1.4434l1.2227-.6113c.9135-.4568 1.7773-1.1201 1.7773-2.2774v-1.6016c2.52897-1.932 3.99997-4.809 3.99997-6.9531v-1.4453zm-2.55467 3c.5523 0 .99997.4477.99997 1s-.44767 1-.99997 1-1-.4477-1-1 .4477-1 1-1zm-6.5 6-.5.5c-.7222.7222-1 2.5-1 2.5s1.698-.198 2.5-1l.5-.5z",school:"M5.542 3.647 3.106 3l.443-1.63a.505.505 0 0 1 .618-.352l1.46.392a.5.5 0 0 1 .355.613l-.44 1.624Zm-4.52 7.356a.496.496 0 0 1-.005-.276l1.819-6.726 2.435.647-1.819 6.726a.499.499 0 0 1-.143.237l-1.457 1.347a.152.152 0 0 1-.247-.066l-.583-1.889ZM10 5c-2.25 0-3-.75-3-3 2.25 0 3 .75 3 3Zm-1.4 7.984c-1.37.21-3.126-1.706-3.52-3.8L5.969 5.9c.399-.35.903-.533 1.419-.533a2.71 2.71 0 0 1 1.564.489.964.964 0 0 0 1.089-.01 2.438 2.438 0 0 1 1.46-.479c.77 0 1.643.489 2.05 1.201 1.536 2.696-1.194 6.709-3.144 6.417a.867.867 0 0 1-.255-.093 1.427 1.427 0 0 0-1.302 0 .866.866 0 0 1-.25.092Z","school-JP":"M12.5,2.9992h-4v-1a1,1,0,0,0-2,0v1h-4a1,1,0,0,0,0,2h.67A10.8169,10.8169,0,0,0,5.15,8.8105c.3331.4313.6594.8248.9785,1.1936a14.3825,14.3825,0,0,1-2.6074,2.117,1,1,0,1,0,.955,1.7581h0A15.65,15.65,0,0,0,7.5,11.4613a15.65,15.65,0,0,0,3.0239,2.4179,1,1,0,1,0,.9551-1.7578,14.3789,14.3789,0,0,1-2.6073-2.1171c.3191-.3688.6453-.7622.9784-1.1935a10.818,10.818,0,0,0,1.98-3.8116h.67a1,1,0,0,0,0-2ZM8.2671,7.5879c-.2614.3385-.5154.6413-.767.937-.2517-.2957-.5057-.5985-.7672-.937A9.5885,9.5885,0,0,1,5.2676,4.9992H9.7319A9.5789,9.5789,0,0,1,8.2671,7.5879Z",scooter:"M4.908,12a1.5,1.5,0,1,1-2.816,0Zm8.65-6C13.539,6,13,6,13,6V3h.351a.282.282,0,0,0,.223-.148l.268-.536a.334.334,0,0,0,.009-.066A.25.25,0,0,0,13.6,2H13V1.7a.215.215,0,0,0-.2-.2H9.25a.25.25,0,0,0,0,.5H12V6.6L7.6,10H6V7.5A.5.5,0,0,0,5.5,7H5V5H6.75a.25.25,0,0,0,0-.5L2.266,4.034c-.006,0-.01-.007-.016-.007a.25.25,0,0,0-.25.25V4.75A.25.25,0,0,0,2.25,5H3V7H2.5A1.538,1.538,0,0,0,1,8.5v2a.472.472,0,0,0,.442.5C1.461,11,7.5,11,7.5,11L10,10h3.5a.472.472,0,0,0,.5-.442C14,9.539,14,6.5,14,6.5A.472.472,0,0,0,13.558,6ZM12.5,11A1.5,1.5,0,1,0,14,12.5,1.538,1.538,0,0,0,12.5,11Z",shelter:"M13 2L1 6V8L2 7.66667V13H12V11H4V7L13 4V2Z",shoe:"M9.5,7a9.97,9.97,0,0,1-1.315-.948L6.01,3.221a.558.558,0,0,0-1,.279H5V5H3.209a.5.5,0,0,1-.357-.148S2.5,4,2,4H1.5a.5.5,0,0,0-.5.5V9H6.5c1.5,0,2,1,3.5,1h4V9.5C14,8,10.547,7.594,9.5,7Zm0,4a3.131,3.131,0,0,1-1.526-.447A4.1,4.1,0,0,0,6,10H1v1.5a.5.5,0,0,0,.5.5h4a.5.5,0,0,0,.5-.5V11a3.134,3.134,0,0,1,1.526.447A4.1,4.1,0,0,0,9.5,12h4a.5.5,0,0,0,.5-.5V11Z",shop:"m13.33 5h-1.83l-.39-2.33c-.1601-.7182-.7017-1.2905-1.41-1.49-.3493-.1124-.7131-.173-1.08-.18h-2.24c-.3669.007-.7307.0676-1.08.18-.7083.1995-1.2499.7718-1.41 1.49l-.39 2.33h-1.83c-.2761-.0017-.5013.2208-.503.497-.0003.0519.0074.1035.023.153l1.88 6.3c.1964.6246.7753 1.0496 1.43 1.05h6c.651-.0047 1.2247-.4289 1.42-1.05l1.88-6.3c.0829-.2634-.0635-.5441-.3269-.627-.0463-.0146-.0945-.0223-.1431-.023zm-8.81 0 .36-2.17c.0807-.3625.3736-.6395.74-.7.2463-.0776.5019-.1213.76-.13h2.24c.2614.0078.5205.0515.77.13.3664.0605.6593.3375.74.7l.35 2.17h-6z",skateboard:"M1.25 5.25V5H2.75V5.25C2.75 5.94036 3.30964 6.5 4 6.5H11C11.6904 6.5 12.25 5.94036 12.25 5.25V5H13.75V5.25C13.75 6.76878 12.5188 8 11 8H4C2.48122 8 1.25 6.76878 1.25 5.25ZM5 10C5 10.5523 4.55228 11 4 11 3.44772 11 3 10.5523 3 10 3 9.44772 3.44772 9 4 9 4.55228 9 5 9.44772 5 10ZM12 10C12 10.5523 11.5523 11 11 11 10.4477 11 10 10.5523 10 10 10 9.44772 10.4477 9 11 9 11.5523 9 12 9.44772 12 10Z",skiing:"M15,4.5C15,5.3284,14.3284,6,13.5,6S12,5.3284,12,4.5S12.6716,3,13.5,3S15,3.6716,15,4.5z M13.72,11.89 c-0.0623-0.1197-0.2083-0.1684-0.33-0.11c-0.6846,0.4194-1.5208,0.5111-2.28,0.25L4.78,8.86L7.5,7.5v-3L9,5.25v3L10.5,9L12,8.25 L10.5,7.5V3l-3-1.5L6,2.25v4.5L3.28,8.11L0.61,6.78C0.4857,6.7192,0.3358,6.7707,0.275,6.895C0.2142,7.0193,0.2657,7.1692,0.39,7.23 l10.5,5.25c0.3156,0.135,0.6568,0.1998,1,0.19c0.5998-0.0103,1.1889-0.161,1.72-0.44c0.1236-0.0615,0.174-0.2116,0.1125-0.3352 C13.7217,11.8932,13.7208,11.8916,13.72,11.89z",slaughterhouse:"M15 6.1c0 1.376-1.363.694-1.363.694L12.5 7H11a5.31 5.31 0 0 1-1.5 2 3.272 3.272 0 0 1-.523 1.125c-.077.091-.06.2-.068.33l.091 2.3a.264.264 0 0 1-.266.25.242.242 0 0 1-.234-.205L8 9.5H4v3.253a.247.247 0 0 1-.247.247.25.25 0 0 1-.24-.2L3 10v-.5a8.2 8.2 0 0 1-1.426-.1A1.886 1.886 0 0 1 .9 10.826c-.128.083-.148.211-.133.386l.19 1.538a.25.25 0 0 1-.25.25.238.238 0 0 1-.23-.174l-.427-1.7a.35.35 0 0 1 .055-.3c.437-.68-.049-2.55-.049-2.55A1.354 1.354 0 0 1 0 7.922V5.5a2.027 2.027 0 0 1 2.736-1.914s.1.03.142.049a15.15 15.15 0 0 0 3.814.038l.18-.062a1.842 1.842 0 0 1 1.26 0c.078.02.154.05.226.089.1.049.196.106.287.171A1.8 1.8 0 0 0 9.5 4h1V3l.5.5c.5-1.5 2.5-1 2.5-1a1.687 1.687 0 0 0-1.5 1l2.5 2a.612.612 0 0 1 .186-.069.318.318 0 0 1 .314.321V6.1Z",slipway:"m2 10 12 1.495V12H2v-2Zm12-4-1 1v.583L5.196 4.332l.063-.125L6.61 2.845h.831a.35.35 0 0 0 0-.7h-.976a.352.352 0 0 0-.248.103L4.723 3.753a.371.371 0 0 0-.066.09l-.109.219L2 3c0 2-.03 3.958 2.86 4.5C6.28 7.765 13 9 13 9l2-2-1-1Z",snowmobile:"M15 10a1 1 0 0 1-1 1H9.414a1 1 0 0 1-.707-.293L7.146 9.146A.499.499 0 0 0 6.793 9H3.334a1 1 0 0 1-.601-.2L1.386 7.788A1.013 1.013 0 0 1 1 7a.995.995 0 0 1 .472-.844L5 4l1.038-1.692A.5.5 0 0 1 7 2.5V6l1 1h1l5.412-.992a.5.5 0 0 1 .355.915L13 8l1.631 1.224A.99.99 0 0 1 15 10Zm-9.5 0H3.225c-.504 0-.999-.127-1.44-.368L.74 9.062a.5.5 0 0 0-.48.877l1.269.693c.441.242.937.368 1.44.368H5.5a.5.5 0 0 0 0-1Z",soccer:"M11,1.5C11,2.3284,10.3284,3,9.5,3S8,2.3284,8,1.5S8.6716,0,9.5,0S11,0.6716,11,1.5z M11,11c-0.5523,0-1,0.4477-1,1 s0.4477,1,1,1s1-0.4477,1-1S11.5523,11,11,11z M12.84,6.09l-1.91-1.91l0,0C10.8399,4.0675,10.7041,4.0014,10.56,4H3.5 C3.2239,4,3,4.2239,3,4.5S3.2239,5,3.5,5h2.7L3,11.3l0,0c-0.0138,0.066-0.0138,0.134,0,0.2c-0.058,0.2761,0.1189,0.547,0.395,0.605 C3.6711,12.163,3.942,11.9861,4,11.71l0,0L5,10h2l-1.93,4.24l0,0C5.0228,14.3184,4.9986,14.4085,5,14.5 c-0.0552,0.2761,0.1239,0.5448,0.4,0.6c0.2761,0.0552,0.5448-0.1239,0.6-0.4l0,0l4.7-9.38l1.44,1.48 c0.211,0.1782,0.5264,0.1516,0.7046-0.0593C13.0037,6.5523,13.0018,6.2761,12.84,6.09z",square:"M12 13H3C2.4477 13 2 12.5523 2 12V3C2 2.4477 2.4477 2 3 2H12C12.5523 2 13 2.4477 13 3V12C13 12.5523 12.5523 13 12 13Z","square-stroked":"M11.7 3.3V11.7H3.3V3.3H11.7ZM12 2H3C2.4477 2 2 2.4477 2 3V12C2 12.5523 2.4477 13 3 13H12C12.5523 13 13 12.5523 13 12V3C13 2.4477 12.5523 2 12 2Z",stadium:"M7,1v2v1.5v0.5098C4.1695,5.1037,2.0021,5.9665,2,7v4.5c0,1.1046,2.4624,2,5.5,2s5.5-0.8954,5.5-2V7 c-0.0021-1.0335-2.1695-1.8963-5-1.9902V4.0625L11,2.75L7,1z M3,8.1465c0.5148,0.2671,1.2014,0.4843,2,0.6328v2.9668 C3.7948,11.477,3,11.0199,3,10.5V8.1465z M12,8.1484V10.5c0,0.5199-0.7948,0.977-2,1.2461V8.7812 C10.7986,8.6328,11.4852,8.4155,12,8.1484z M6,8.9219C6.4877,8.973,6.9925,8.9992,7.5,9C8.0073,8.9999,8.5121,8.9743,9,8.9238 v2.9844C8.5287,11.964,8.0288,12,7.5,12S6.4713,11.964,6,11.9082V8.9219z",star:"M7.5,0l-2,5h-5l4,3.5l-2,6l5-3.5 l5,3.5l-2-6l4-3.5h-5L7.5,0z","star-stroked":"m7.5 2.69 1.07 2.68.25.63h3l-2 1.75-.5.44.23.63 1 3.13-2.48-1.77-.57-.4-.57.4-2.52 1.77 1-3.13.21-.63-.5-.44-2-1.75h3l.25-.63zm0-2.69-2 5h-5l4 3.5-2 6 5-3.5 5 3.5-2-6 4-3.5h-5z",suitcase:"M4.5 4V2C4.5 1.44772 4.94772 1 5.5 1H9.5C10.0523 1 10.5 1.44772 10.5 2V4H12C12.5523 4 13 4.44772 13 5V11C13 11.5523 12.5523 12 12 12H3C2.44771 12 2 11.5523 2 11V5C2 4.44772 2.44772 4 3 4H4.5ZM5.5 2V4H9.5V2H5.5Z",swimming:"M10.1113,2C9.9989,2,9.6758,2.1465,9.6758,2.1465L6.3535,3.8262 C5.9111,4.0024,5.7358,4.7081,6.002,5.0605l0.9707,1.4082L3.002,8.498L5,9.998l2.502-1.5l2.5,1.5l1.002-1.002l-3-4l2.5566-1.5293 c0.5286-0.2662,0.4434-0.7045,0.4434-0.9707C10.9999,2.2861,10.6437,2,10.1113,2z M12.252,5C11.2847,5,10.5,5.7827,10.5,6.75 s0.7847,1.752,1.752,1.752s1.75-0.7847,1.75-1.752S13.2192,5,12.252,5z M2.5,10L0,11.5V13l2.5-1.5L5,13l2.502-1.5l2.5,1.5L12,11.5 l3,1.5v-1.5L12,10l-1.998,1.5l-2.5-1.5L5,11.5L2.5,10z","table-tennis":"M11.9676,10.2275a3.8116,3.8116,0,0,1-1.9122.9831L3.7678,4.9338A4.0283,4.0283,0,0,1,4.7725,3.0324C7.03.7745,9.98.2235,12.3781,2.6219S14.2255,7.97,11.9676,10.2275Zm-6.987,1.6093A3.8422,3.8422,0,0,1,6.149,11.278,4.5328,4.5328,0,0,1,8,11.4452L3.5456,7a4.4126,4.4126,0,0,1,.1572,1.9223,3.6639,3.6639,0,0,1-.5208,1.1159c-1.072,1.263-2.132,1.727-2.132,2.1879A1.8378,1.8378,0,0,0,2.7739,13.95C3.2348,13.95,3.6917,12.9368,4.9806,11.8368Z",teahouse:"M8.00002 5C8.00002 5 10 4.9 10 3.4 10 2.46598 9.17751 2.20864 8.47606 1.98917 7.95458 1.82601 7.5 1.68378 7.5 1.3 7.5.386843 8 0 8 0 8 0 7 .531581 7 1.5 7 2.21063 7.54045 2.46176 8.05947 2.70292 8.53888 2.92568 9 3.13994 9 3.7 9 4.7 8.00002 5 8.00002 5ZM11.8372 6.67447C11.3755 8.62063 10.7854 11.1073 9 12V14H6V12C4.21455 11.1073 3.62454 8.62063 3.16276 6.67447 3.10728 6.44061 3.05364 6.21455 3 6H12C11.9464 6.21453 11.8927 6.44063 11.8372 6.67447ZM6.99998 4C6.99998 5 5.49998 5 5.49998 5 5.49998 5 6.29295 4.9 6.29295 4.3 6.29295 4.02526 6.01604 3.85489 5.71852 3.67184 5.37315 3.45935 5 3.22977 5 2.8 5 1.9661 5.99998 1.5 5.99998 1.5 5.99998 1.5 5.49998 1.77344 5.49998 2.5 5.49998 2.88823 5.85322 3.04095 6.21687 3.19818 6.60257 3.36494 6.99998 3.53675 6.99998 4Z",telephone:"M4.51,8.88a0.51,0.51,0,0,0,0,.72l0.72,0.72L3.07,12.5,2.7,12.13A2.24,2.24,0,0,1,2,10.69V9.24a2.24,2.24,0,0,1,.7-1.45L7.77,2.72A2.24,2.24,0,0,1,9.22,2h1.45a2.24,2.24,0,0,1,1.45.72l0.36,0.36L10.31,5.26,9.58,4.53a0.51,0.51,0,0,0-.72,0ZM4.13,13.6a1,1,0,0,0,1.4137.0363Q5.5623,13.6186,5.58,13.6l0.72-.72a1,1,0,0,0,.0363-1.4137Q6.3186,11.4477,6.3,11.43Zm7.25-7.28a1,1,0,0,0,1.4137.0363C12.8061,6.3445,13.55,5.6,13.55,5.6a1,1,0,0,0,.0363-1.4137Q13.5686,4.1677,13.55,4.15Z",tennis:"M13.1284,1.87c-1.5418-1.5406-4.5535-.7759-6.28,1.05a6.8282,6.8282,0,0,0-1.88,4.4,5.7275,5.7275,0,0,1-.57,2.72.6814.6814,0,0,0-.67.17l-2.49,2.5a.6941.6941,0,0,0,0,.98l.07.07a.7051.7051,0,0,0,.98,0l2.5-2.49a.683.683,0,0,0,.18-.66,8.5694,8.5694,0,0,1,3.12-.58,6.5487,6.5487,0,0,0,3.99-1.87C14.1084,6.13,14.579,3.3194,13.1284,1.87Zm-2.2-.04a2.3071,2.3071,0,0,1,1.64.61,2.548,2.548,0,0,1,.5,2.44l-2.95-2.96A3.8648,3.8648,0,0,1,10.9284,1.83Zm-4.57,6.81a2.6485,2.6485,0,0,1-.48-2.55l3.04,3.04A2.8522,2.8522,0,0,1,6.3584,8.64Zm2.88.39-3.26-3.27a5.1623,5.1623,0,0,1,.49-1.08l3.85,3.85A5.5093,5.5093,0,0,1,9.2384,9.03Zm1.34-.66-3.94-3.95a5.2032,5.2032,0,0,1,.74-.9l4.1,4.1A5.6869,5.6869,0,0,1,10.5784,8.37Zm1.11-.96-4.1-4.1a5.5714,5.5714,0,0,1,.84-.65l3.92,3.92A5.7187,5.7187,0,0,1,11.6884,7.41Zm.82-1.09L8.6984,2.5a4.1707,4.1707,0,0,1,1.09-.48l3.2,3.2A5.5656,5.5656,0,0,1,12.5084,6.32Z",theatre:"M2,1c0,0-1,0-1,1v5.1582C1,8.8885,1.354,11,4.5,11H5V8L2.5,9c0,0,0-2.5,2.5-2.5V5 c0-0.7078,0.0868-1.3209,0.5-1.7754C5.8815,2.805,6.5046,1.9674,8.1562,2.7539L9,3.3027V2c0,0,0-1-1-1C7.2922,1,6.0224,2,5,2 S2.7865,1,2,1z M3,3c0.5523,0,1,0.4477,1,1S3.5523,5,3,5S2,4.5523,2,4S2.4477,3,3,3z M7,4c0,0-1,0-1,1v5c0,2,1,4,4,4s4-2,4-4V5 c0-1-1-1-1-1c-0.7078,0-1.9776,1-3,1S7.7865,4,7,4z M8,6c0.5523,0,1,0.4477,1,1S8.5523,8,8,8S7,7.5523,7,7S7.4477,6,8,6z M12,6 c0.5523,0,1,0.4477,1,1s-0.4477,1-1,1s-1-0.4477-1-1S11.4477,6,12,6z M7.5,10H10h2.5c0,0,0,2.5-2.5,2.5S7.5,10,7.5,10z",toilet:"M3 1.5a1.5 1.5 0 1 0 3 0 1.5 1.5 0 0 0-3 0ZM11.5 0a1.5 1.5 0 1 1 0 3 1.5 1.5 0 0 1 0-3ZM3.29 4a1 1 0 0 0-.868.504L.566 7.752a.5.5 0 1 0 .868.496l1.412-2.472A345.048 345.048 0 0 0 1 11h2v2.5a.5.5 0 0 0 1 0V11h1v2.5a.5.5 0 0 0 1 0V11h2L6.103 5.687l1.463 2.561a.5.5 0 1 0 .868-.496L6.578 4.504A1 1 0 0 0 5.71 4H3.29ZM9 4.5a.5.5 0 0 1 .5-.5h4a.5.5 0 0 1 .5.5v5a.5.5 0 0 1-1 0v4a.5.5 0 0 1-1 0v-4h-1v4a.5.5 0 0 1-1 0v-4a.5.5 0 0 1-1 0v-5Z",toll:"M2.5 1C2.22386 1 2 1.22386 2 1.5V2V13H1.5C1.22386 13 1 13.2239 1 13.5C1 13.7761 1.22386 14 1.5 14H8.5C8.77614 14 9 13.7761 9 13.5C9 13.2239 8.77614 13 8.5 13H7V10.0987L13.7761 5.54576C14.0053 5.39175 14.0663 5.08109 13.9123 4.85189L13.6334 4.43687C13.4794 4.20766 13.1688 4.1467 12.9396 4.3007L7 8.29152V2H7.5C7.77614 2 8 1.77614 8 1.5C8 1.22386 7.77614 1 7.5 1H2.5ZM3 3.5C3 3.22386 3.22386 3 3.5 3H5.5C5.77614 3 6 3.22386 6 3.5V7.5C6 7.77614 5.77614 8 5.5 8H3.5C3.22386 8 3 7.77614 3 7.5V3.5Z",town:"m10.651 6.121c-.0445-.0357-.0999-.05516-.157-.05516s-.1125.01946-.157.05516l-2.245 1.808c-.02881.02323-.05204.05263-.06796.08603-.01593.03341-.02414.06997-.02404.10697v4.625c0 .0671.02666.1315.0741.1789.04745.0474.1118.0741.1789.0741h1.494c.0671 0 .13145-.0267.1789-.0741s.0741-.1118.0741-.1789v-1.747h1v1.747c0 .0671.0267.1315.0741.1789.0475.0474.1118.0741.1789.0741h1.494c.0671 0 .1315-.0267.1789-.0741s.0741-.1118.0741-.1789v-4.627c.0007-.03831-.0074-.07627-.0237-.11095s-.0404-.06514-.0703-.08905zm-.651 3.879h-1v-1h1zm2 0h-1v-1h1zm-6.29-9.184997c-.02299-.034654-.05419-.063081-.09083-.082746s-.07758-.029956-.11917-.029956c-.04158 0-.08252.010291-.11916.029956-.03665.019665-.06785.048092-.09084.082746l-3.248 4.120997c-.02752.0415-.04214.09021-.042.14v7.671c-.00013.0331.00626.0659.0188.0965s.031.0585.0543.082c.02331.0235.05102.0422.08154.0549.03053.0128.06327.0195.09636.0196h2.5c.06632-.0008.12964-.0277.17626-.0749.04661-.0471.07275-.1108.07274-.1771v-1.748h1v1.748c0 .0668.02655.1309.07381.1782s.11136.0738.17819.0738h.748v-6c-.00004-.07511.01684-.14926.04938-.21695.03255-.06769.07993-.12718.13862-.17405l1.812-1.609c0-.05-3.29-4.184997-3.29-4.184997zm-1.71 8.184997h-1v-1h1zm0-3h-1v-1h1zm2 3h-1v-1h1zm0-3h-1v-1h1z","town-hall":"M13,4H9l0-3L7.5,0L6,1v3H2L1,5v1h13V5L13,4z M7.5,1.5c0.4,0,0.7,0.3,0.7,0.8S7.9,3,7.5,3S6.7,2.7,6.7,2.2 C6.7,1.8,7.1,1.5,7.5,1.5z M13,7H2v4l-1,1.5V14h13v-1.5L13,11V7z M5,12.5H4V8h1V12.5z M8,12.5H7V8h1V12.5z M11,12.5h-1V8h1V12.5z",triangle:"m7.5385 1c-.2948 0-.4883.1772-.6154.3846l-5.8462 9.5385c-.0769.0769-.0769.2307-.0769.3846 0 .5385.3846.6923.6923.6923h11.6154c.3846 0 .6923-.1538.6923-.6923 0-.1538 0-.2308-.0769-.3846l-5.7693-9.5385c-.1258-.2081-.3656-.3846-.6153-.3846z","triangle-stroked":"m7.52427.500405c-.2814-.0091-.5456.1419-.6907.3948l-5.5 9.869195c-.3118.5434.0614 1.2355.6664 1.2356h11.00003c.605-.0001.9782-.6922.6664-1.2355l-5.50003-9.869195c-.1362-.2374-.378-.3861-.6421-.3949zm-.0243 2.398895 4.12673 7.4704h-8.25343z",tunnel:"M4 2C2.34315 2 1 3.32706 1 4.96406V12.012C1 12.5576 1.44772 13 2 13H3V8.55391C3 6.09839 5.01472 4.10781 7.5 4.10781C9.98528 4.10781 12 6.09842 12 8.55393V13H13C13.5523 13 14 12.5576 14 12.012V4.96406C14 3.32706 12.6569 2 11 2H4ZM11 10V9.04794C11 6.86526 9.43299 5.09583 7.5 5.09583C5.56701 5.09583 4.00001 6.86526 4 9.04794V13L11 10Z",veterinary:"M7.5,6c-2.5,0-3,2.28-3,3.47h0a6.149,6.149,0,0,0-1.7.89,2,2,0,0,0-.4,2.78,2.06,2.06,0,0,0,2.8.4,4,4,0,0,1,2.3-.69,4,4,0,0,1,2.3.69,2,2,0,0,0,2.8-.3,1.929,1.929,0,0,0-.226-2.72c-.024-.021-.049-.041-.074-.06l-.1-.1a8.992,8.992,0,0,0-1.7-.89h0C10.5,8.29,10,6,7.5,6ZM2.08,4.3a1.58,1.58,0,0,0-.76,2A1.52,1.52,0,0,0,2.93,7.7a1.58,1.58,0,0,0,.76-2A1.52,1.52,0,0,0,2.08,4.3Zm10.85,0a1.58,1.58,0,0,1,.76,2,1.52,1.52,0,0,1-1.61,1.4,1.58,1.58,0,0,1-.76-2A1.52,1.52,0,0,1,12.93,4.3Zm-7.85-3c-.68.09-1,.94-.76,1.87A1.77,1.77,0,0,0,5.93,4.7c.68-.09,1-.94.76-1.87A1.77,1.77,0,0,0,5.08,1.3Zm4.85,0c.68.09,1,.94.76,1.87A1.77,1.77,0,0,1,9.07,4.7c-.68-.08-1-.94-.76-1.87A1.769,1.769,0,0,1,9.93,1.3Z",viewpoint:"M6.02,8.425a2.3859,2.3859,0,0,0-.46.44l-4.55-3.5a7.9976,7.9976,0,0,1,1.51-1.51Zm6.46-4.56-3.5,4.55a2.3971,2.3971,0,0,1,.45.45l4.56-3.5A7.945,7.945,0,0,0,12.48,3.865ZM7.3042,10.0129a1.5,1.5,0,1,0,1.6829,1.2914h0A1.5,1.5,0,0,0,7.3042,10.0129ZM6.43,2.235a7.9329,7.9329,0,0,0-2.06.55l2.2,5.32a2.0438,2.0438,0,0,1,.61-.17Zm2.14.01-.75,5.69a2.49,2.49,0,0,1,.61.16l2.2-5.3A7.2129,7.2129,0,0,0,8.57,2.245Z",village:"M6.176 1.176a.249.249 0 0 0-.352 0l-4.4 4.4A.25.25 0 0 0 1.6 6H3v6.751a.25.25 0 0 0 .249.249h3.5A.248.248 0 0 0 7 12.753v-7.43c0-.066.026-.13.073-.176L8.5 3.5 6.176 1.176ZM6 11H5v-1h1v1Zm0-2H5V8h1v1Zm0-3v1H5V6h1Z M12.75 3h-.5a.25.25 0 0 0-.25.25V5l-1.324-1.824a.249.249 0 0 0-.352 0L8.056 5.932A.246.246 0 0 0 8 6.088v6.66a.249.249 0 0 0 .246.252h1.5a.253.253 0 0 0 .254-.252V11h1v1.747a.253.253 0 0 0 .253.253h1.5a.25.25 0 0 0 .247-.249V3.25a.25.25 0 0 0-.25-.25ZM10 8H9V7h1v1Zm2 0h-1V7h1v1Zm-2 2H9V9h1v1Zm2 0h-1V9h1v1Z",volcano:"M8.4844,1.0002 c-0.1464,0.005-0.2835,0.0731-0.375,0.1875L6.4492,3.2619L4.8438,1.7385C4.4079,1.3374,3.7599,1.893,4.0899,2.385l1.666,2.4004 C5.9472,5.061,6.3503,5.0737,6.5586,4.8108C6.7249,4.6009,7,4.133,7.5,4.133s0.7929,0.4907,0.9414,0.6777 c0.175,0.2204,0.4973,0.2531,0.7129,0.0723l1.668-1.4004c0.4408-0.3741,0.0006-1.0735-0.5273-0.8379L9,3.2268V1.5002 C9.0002,1.2179,8.7666,0.9915,8.4844,1.0002L8.4844,1.0002z M5,6.0002L2.0762,11.924C1.9993,12.0009,2,12.155,2,12.3088 c0,0.5385,0.3837,0.6914,0.6914,0.6914h9.6172c0.3846,0,0.6914-0.153,0.6914-0.6914c0-0.1538,0.0008-0.2309-0.0762-0.3848L10,6.0002 c-0.5,0-1,0.5-1,1v0.5c0,0.277-0.223,0.5-0.5,0.5S8,7.7772,8,7.5002v-0.5c0-0.2761-0.2238-0.5-0.5-0.5S7,6.7241,7,7.0002v2 c0,0.277-0.223,0.5-0.5,0.5S6,9.2772,6,9.0002v-2C6,6.5002,5.5,6.0002,5,6.0002z",volleyball:"M13.91,7.94a5.9086,5.9086,0,0,1-.13.94,8.8218,8.8218,0,0,0-2.17-1.49,8.89,8.89,0,0,0-1.4-.56,8.6142,8.6142,0,0,0-1.82-.35.221.221,0,0,0-.08-.01A7.32,7.32,0,0,1,7.5,4.59c-.01-.01-.01-.01,0-.02a7.7573,7.7573,0,0,1,1.52.15,7.0987,7.0987,0,0,1,1.56.5,6.8585,6.8585,0,0,1,1.4.78A7.4165,7.4165,0,0,1,13.91,7.94Zm-1.87-5a6.2232,6.2232,0,0,0-1.85-1.27,4.2725,4.2725,0,0,0-.98-.36,5.6412,5.6412,0,0,0-1.55-.23,1.2882,1.2882,0,0,0-.32,0A7.4263,7.4263,0,0,0,7.21,2.5c0,.2.01.39.02.58a2.28,2.28,0,0,1,.26-.01,2.6438,2.6438,0,0,1,.28.01,8.2865,8.2865,0,0,1,1.49.16,8.9879,8.9879,0,0,1,1.35.37,8.7922,8.7922,0,0,1,1.53.7,10.18,10.18,0,0,1,1.39.97A6.4588,6.4588,0,0,0,12.04,2.94ZM4.01,8.76a9.4084,9.4084,0,0,1-.62-1.37,9.1038,9.1038,0,0,1-.37-1.41,9.1748,9.1748,0,0,1-.16-1.67V4.28a8.455,8.455,0,0,1,.1-1.34A6.28,6.28,0,0,0,1.47,5.3a6.2222,6.2222,0,0,0-.4,2.2c0,.15.01.3.02.44a5.9086,5.9086,0,0,0,.13.94,5.7343,5.7343,0,0,0,.41,1.23c.22-.05.44-.11.65-.17a8.0188,8.0188,0,0,0,1.9-.88C4.12,8.96,4.06,8.86,4.01,8.76Zm2.6-2.28a9,9,0,0,1-.63-1.76,9.135,9.135,0,0,1-.24-1.48c-.02-.25-.03-.49-.03-.74a9.3777,9.3777,0,0,1,.08-1.19,4.2725,4.2725,0,0,0-.98.36,7.7038,7.7038,0,0,0-.42,1.94c-.02.22-.03.44-.03.67a7.2659,7.2659,0,0,0,.06.93,7.4258,7.4258,0,0,0,.37,1.63,6.4705,6.4705,0,0,0,.59,1.28A8.0174,8.0174,0,0,0,6.65,6.55.2522.2522,0,0,1,6.61,6.48ZM12.7,9.93s0-.01-.01,0a7.0128,7.0128,0,0,0-1.7-1.16c-.06.1-.11.19-.17.29a8.783,8.783,0,0,1-.88,1.22,8.9125,8.9125,0,0,1-1.06,1.07,10.4181,10.4181,0,0,1-1.38.98,8.9933,8.9933,0,0,1-2.64,1.02,6.2985,6.2985,0,0,0,5.28,0,5.9674,5.9674,0,0,0,2.42-1.89,4.8258,4.8258,0,0,0,.65-1.03A6.0315,6.0315,0,0,0,12.7,9.93Zm-5.17-2c-.01.01-.02.03-.03.04a9.26,9.26,0,0,1-1.25,1.4,9.5925,9.5925,0,0,1-1.19.91,9.2683,9.2683,0,0,1-2.62,1.18,6.0989,6.0989,0,0,0,.53.61,7.7353,7.7353,0,0,0,3.15-.72,7.3839,7.3839,0,0,0,1.38-.82A7.6429,7.6429,0,0,0,8.75,9.37a7.7441,7.7441,0,0,0,.82-1.15A7.3414,7.3414,0,0,0,7.53,7.93Z",warehouse:"M13.5,5c-0.0762,0.0003-0.1514-0.0168-0.22-0.05L7.5,2L1.72,4.93C1.4632,5.0515,1.1565,4.9418,1.035,4.685 S1.0232,4.1215,1.28,4L7.5,0.92L13.72,4c0.2761,0.0608,0.4508,0.3339,0.39,0.61C14.0492,4.8861,13.7761,5.0608,13.5,5z M5,10H2v3h3 V10z M9,10H6v3h3V10z M13,10h-3v3h3V10z M11,6H8v3h3V6z M7,6H4v3h3V6z","waste-basket":"M12.41,5.58l-1.34,8c-0.0433,0.2368-0.2493,0.4091-0.49,0.41H4.42c-0.2407-0.0009-0.4467-0.1732-0.49-0.41l-1.34-8 C2.5458,5.3074,2.731,5.0506,3.0035,5.0064C3.0288,5.0023,3.0544,5.0002,3.08,5h8.83c0.2761-0.0036,0.5028,0.2174,0.5064,0.4935 C12.4168,5.5225,12.4146,5.5514,12.41,5.58z M13,3.5C13,3.7761,12.7761,4,12.5,4h-10C2.2239,4,2,3.7761,2,3.5S2.2239,3,2.5,3H5V1.5 C5,1.2239,5.2239,1,5.5,1h4C9.7761,1,10,1.2239,10,1.5V3h2.5C12.7761,3,13,3.2239,13,3.5z M9,3V2H6v1H9z",watch:"M12.5,7H12a.426.426,0,0,0-.049.01A4.484,4.484,0,0,0,10,3.76V1.5A.5.5,0,0,0,9.5,1h-4a.5.5,0,0,0-.5.5V3.76a4.5,4.5,0,0,0,0,7.48V13.5a.5.5,0,0,0,.5.5h4a.5.5,0,0,0,.5-.5V11.24a4.486,4.486,0,0,0,1.951-3.25A.426.426,0,0,0,12,8h.5a.5.5,0,0,0,0-1Zm-5,4A3.5,3.5,0,1,1,11,7.5,3.5,3.5,0,0,1,7.5,11ZM9,7H8V5.5a.5.5,0,0,0-1,0v2a.5.5,0,0,0,.5.5H9A.5.5,0,0,0,9,7Z",water:"M7.5 14C9.57688 14 12 12.7117 12 9.43241C12 7.20724 8.53844 2.2883 7.5 1C6.57691 2.2883 3 7.09007 3 9.43241C3 12.7117 5.42312 14 7.5 14Z",waterfall:"M14 1H5C3.34315 1 2 2.34314 2 4V8.87918C1.39704 9.28261 1 9.96937 1 10.75C1 11.9927 2.00736 13 3.25 13C3.7127 13 4.14279 12.8599 4.5 12.6209C4.85721 12.8599 5.2873 13 5.75 13C6.28601 13 6.77826 12.812 7.16413 12.5H7.51743C8.01909 12.8165 8.61403 13 9.25 13C11.0449 13 12.5 11.5449 12.5 9.75002C12.5 8.39777 11.6747 7.23919 10.5 6.74934V5C10.5 3.89543 11.3954 3 12.5 3H14V1ZM11.5 9.75C11.5 10.9926 10.4926 12 9.25 12C8.71418 12 8.2221 11.8127 7.83567 11.5H6.75009C6.52204 11.8036 6.15895 12 5.75 12C5.34105 12 4.97796 11.8036 4.74991 11.5H4.25009C4.02204 11.8036 3.65895 12 3.25 12C2.55964 12 2 11.4404 2 10.75C2 10.1453 2.42944 9.64082 3 9.525V5.75C3 5.33579 3.33579 5 3.75 5C4.16421 5 4.5 5.33579 4.5 5.75V9C4.5 9.27614 4.72386 9.5 5 9.5C5.27614 9.5 5.5 9.27614 5.5 9V6.75C5.5 6.33579 5.83579 6 6.25 6C6.66421 6 7 6.33579 7 6.75V9C7 9.27614 7.22386 9.5 7.5 9.5C7.77614 9.5 8 9.27614 8 9V5.75C8 5.33579 8.33579 5 8.75 5C9.16421 5 9.5 5.33579 9.5 5.75V7.51373C10.625 7.63809 11.5 8.59186 11.5 9.75Z",watermill:"M2,10.2L4,9l2.5,1.5l1.4659-0.8788C7.6592,9.4698,7.3716,9.285,7.1231,9.0536l1.4131-1.4131 C8.7672,7.836,9.0557,7.9606,9.375,7.9874V9.224l0.25,0.1501V7.9874c0.3193-0.0268,0.6078-0.1514,0.8388-0.3469l1.4131,1.4131 c-0.4059,0.3781-0.9044,0.6492-1.4528,0.8003L11.5,10.5l0.6984-0.4191C13.2863,9.2595,14,7.9682,14,6.5C14,4.0147,11.9853,2,9.5,2 C8.1917,2,7.0241,2.5674,6.2018,3.4587L4.5,2L1,5h1V10.2z M12.0536,8.8769l-1.4131-1.4131c0.1954-0.231,0.3201-0.5196,0.3469-0.8388 h1.9999C12.956,7.4946,12.6089,8.2806,12.0536,8.8769z M12.9874,6.375h-1.9999c-0.0268-0.3193-0.1514-0.6078-0.3469-0.8388 l1.4131-1.4131C12.6089,4.7193,12.956,5.5054,12.9874,6.375z M9.625,3.0126c0.8696,0.0314,1.6557,0.3784,2.2519,0.9337 l-1.4131,1.4131c-0.231-0.1954-0.5196-0.32-0.8388-0.3468C9.625,5.0126,9.625,3.0126,9.625,3.0126z M9.375,3.0126v1.9999 C9.0558,5.0394,8.7672,5.164,8.5362,5.3594L7.1231,3.9463C7.7193,3.3911,8.5054,3.044,9.375,3.0126z M6.9464,4.1231l1.4131,1.4131 C8.164,5.7672,8.0394,6.0557,8.0126,6.375h-2C6.044,5.5054,6.3911,4.7193,6.9464,4.1231z M8.0126,6.625 c0.0268,0.3192,0.1515,0.6078,0.3469,0.8388L6.9464,8.8769C6.3911,8.2807,6.044,7.4946,6.0126,6.625H8.0126z M9.002,10L6.5,11.5 L4,10l-2.5,1.5V13L4,11.5L6.5,13l2.502-1.5L11.5,13l2.5-1.5V10l-2.5,1.5L9.002,10z",wetland:"M1.48,4.5C1.905,4.1467,2.4483,3.968,3,4c1.2273-0.0869,2.3154,0.7836,2.5,2l0.78,4.68c-0.6394-0.2893-1.3759-0.2709-2,0.05 L3.48,6C3.1874,5.1347,2.3926,4.5387,1.48,4.5z M7.48,11.24c0.3816-0.3076,0.825-0.5293,1.3-0.65L10,3 c0.2926-0.8653,1.0874-1.4613,2-1.5c-0.4198-0.3485-0.955-0.5269-1.5-0.5C9.2727,0.9131,8.1846,1.7836,8,3l-1.3,7.79 C6.9786,10.9052,7.2408,11.0565,7.48,11.24z M11.8,10.74L11.8,10.74c0.1565-0.1277,0.3238-0.2414,0.5-0.34L13,6 c0.2926-0.8653,1.0874-1.4613,2-1.5c-0.4198-0.3485-0.955-0.5269-1.5-0.5c-1.2273-0.0869-2.3154,0.7836-2.5,2l-0.67,4 C10.8731,10.123,11.3778,10.377,11.8,10.74z M14,12L14,12c-0.4346-0.01-0.8579,0.1394-1.19,0.42l-0.47,0.41 c-0.2847,0.2546-0.7153,0.2546-1,0c-0.15-0.12-0.29-0.26-0.44-0.39c-0.7076-0.5968-1.7424-0.5968-2.45,0 c-0.16,0.13-0.31,0.28-0.47,0.41c-0.2847,0.2546-0.7153,0.2546-1,0c-0.16-0.13-0.31-0.28-0.47-0.41 c-0.7059-0.5912-1.7341-0.5912-2.44,0c-0.15,0.13-0.29,0.27-0.44,0.39c-0.0892,0.0715-0.1909,0.1258-0.3,0.16 c-0.2922,0.0652-0.5969-0.0301-0.8-0.25c-0.2475-0.214-0.5117-0.4079-0.79-0.58C1.5336,12.0421,1.2974,11.9865,1.06,12H1 c-0.2761,0-0.5,0.2239-0.5,0.5S0.7239,13,1,13l0,0c0.246,0.0145,0.4762,0.126,0.64,0.31L2,13.57 c0.6717,0.55,1.6308,0.5747,2.33,0.06c0.19-0.14,0.36-0.32,0.55-0.47c0.2847-0.2546,0.7153-0.2546,1,0l0.39,0.35 c0.6937,0.6189,1.7322,0.6484,2.46,0.07c0.15-0.11,0.27-0.25,0.42-0.37c0.2976-0.3038,0.7851-0.3087,1.0889-0.0111 c0.0037,0.0037,0.0074,0.0074,0.0111,0.0111l0.39,0.35c0.4866,0.4124,1.1485,0.5516,1.76,0.37c0.3825-0.1036,0.7286-0.3113,1-0.6 c0.1549-0.1772,0.3674-0.294,0.6-0.33l0,0c0.2761,0,0.5-0.2239,0.5-0.5S14.2761,12,14,12z",wheelchair:"M12,1.5C12,2.3284,11.3284,3,10.5,3S9,2.3284,9,1.5S9.6716,0,10.5,0S12,0.6716,12,1.5z M2.82,4.87l1.74-1.71l1.85,1.29 L5.67,5.7c1.0747,0.3341,2.0207,0.9904,2.71,1.88l0.88-1.5c0.2295-0.4158,0.0785-0.939-0.3373-1.1685 C8.9218,4.911,8.9209,4.9105,8.92,4.91L8.3,4.54L4.79,2.1C4.5927,1.9594,4.3231,1.9805,4.15,2.15l-2,2 C1.9852,4.3716,2.0312,4.6848,2.2528,4.8496C2.4193,4.9735,2.645,4.9816,2.82,4.87z M8.13,10.94 c-0.0143,1.2308-0.5794,2.3904-1.54,3.16c-0.7118,0.5804-1.6016,0.8982-2.52,0.9C1.8261,15,0.0055,13.1839,0,10.94 c0.0023-0.9231,0.3238-1.8169,0.91-2.53c0.1868-0.232,0.398-0.4432,0.63-0.63c0.7131-0.5862,1.6069-0.9077,2.53-0.91 C6.3139,6.8755,8.13,8.6961,8.13,10.94z M6,12.21C6.7679,11.2051,6.5758,9.7679,5.5709,9C4.7501,8.3727,3.6109,8.3727,2.79,9 C2.5283,9.151,2.311,9.3683,2.16,9.63c-0.6923,1.0584-0.3956,2.4777,0.6628,3.17c0.7615,0.4981,1.7457,0.4981,2.5072,0 C5.5805,12.6365,5.8061,12.4378,6,12.21z M14.2,13.21l-2.49-5C11.5906,7.9251,11.3088,7.7425,11,7.75H8.51 c0.3293,0.4578,0.5856,0.9638,0.76,1.5h1.26l2.29,4.58c0.185,0.3728,0.6372,0.525,1.01,0.34c0.3728-0.185,0.525-0.6372,0.34-1.01 L14.2,13.21z",windmill:"M6,5L3.5,7.5l1,1L7,6V5.5L7.5,5L8,5.5V6l2.5,2.5l1-1L9,5H8.5L8,4.5L8.5,4H9l2.5-2.5l-1-1L8,3v0.5L7.5,4L7,3.5V3L4.5,0.5 l-1,1L6,4h0.5L7,4.5L6.5,5H6z M11.5,13h-1l-1-4l-2-2l-2,2l-1,4h-1C3.2239,13,3,13.2238,3,13.5C3,13.7761,3.2239,14,3.5,14h8 c0.2761,0,0.5-0.2239,0.5-0.5C12,13.2238,11.7761,13,11.5,13z M8,13H7v-1.5024C7,11.2228,7.2228,11,7.4976,11 C7.7751,11,8,11.2249,8,11.5024V13z",zoo:"M8.3879,3.8928C8.3879,3.8928,7.6818,5,7,5H4.5C3.8182,5,3.2016,5.4086,2.7273,5.8636L0.5,8C0.231,8.258,0.0072,8.7681,0,9 c-0.0156,0.5,0,1,0,1s1,0,1-1V8.5l1-1h0.5l0.158,0.2892c0,0-0.9535,1.8244-0.9535,3.5289C1.7046,12,2.3864,12,2.3864,12h0.6818 c0,0,0.3409,0,0-0.3409l-0.3409-0.3409C2.7273,10.6364,3.5002,9.6667,4,9c0,0,0.0168,1.1579,0,2c-0.008,0.4096,0.2721,1,0.6818,1 h0.6818c0,0,0.3409,0,0-0.3409l-0.3409-0.3409C4.7105,10.7495,5.5,8.5,5.5,8.5C6.7716,8.5,7,9,8.5,9l0.3636,2.3182 C8.975,12.0282,9.5,12,9.5,12H11c0.3409,0,0.9611-0.3115,0.3409-0.7736L11,11V9c1.2142-0.1722,2-1,2-2h1c0.3214,0,1,0,1-0.5v-1 l-1.7045-1.6818C12.5444,3.0772,12,2.5,11,2.5C9.5469,2.5,8.8636,3.0688,8.3879,3.8928z"},Lr=Object.keys(Te);function o0(e,t){const n=Te[e];n||console.warn(`[MakiIcon] Unknown icon: "${e}", falling back to "marker"`);const r=n??Te.marker??"",o=(t==null?void 0:t.size)??32,a=(t==null?void 0:t.fill)??"#333",s=`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 15 15" width="${o}" height="${o}"><path fill="${a}" d="${r}"/></svg>`;return`data:image/svg+xml,${encodeURIComponent(s)}`}function wr(e,t){const n={};for(const r of e)n[r]=o0(r,t);return n}const Mr="M16 0C7.16344 0 0 7.16344 0 16C0 24.8366 16 40 16 40C16 40 32 24.8366 32 16C32 7.16344 24.8366 0 16 0Z";function s0(e,t){const n=Te[e];n||console.warn(`[MakiIcon] Unknown icon: "${e}", falling back to "marker"`);const r=n??Te.marker??"",o=(t==null?void 0:t.size)??40,a=(t==null?void 0:t.fill)??"#2563eb",s=`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 40" width="${o}" height="${Math.round(o*1.25)}"><path d="${Mr}" fill="${a}" stroke="white" stroke-width="1.5"/>`+(r?`<svg x="8" y="8" viewBox="0 0 15 15" width="16" height="16"><path fill="white" d="${r}"/></svg>`:"")+"</svg>";return`data:image/svg+xml,${encodeURIComponent(s)}`}function i0(e,t){const n={};for(const r of e)n[r]=s0(r,t);return n}const st={primary:{fill:"#2563eb",bg:"rgba(37, 99, 235, 0.2)",ring:"rgba(37, 99, 235, 0.2)"},success:{fill:"#00854d",bg:"rgba(0, 133, 77, 0.2)",ring:"rgba(0, 133, 77, 0.2)"},warning:{fill:"#943700",bg:"rgba(148, 55, 0, 0.2)",ring:"rgba(148, 55, 0, 0.2)"},error:{fill:"#ba1a1a",bg:"rgba(186, 26, 26, 0.2)",ring:"rgba(186, 26, 26, 0.2)"}};function kr(e){return typeof e=="string"&&/<[a-zA-Z][^>]*>/.test(e)}function o1({color:e="primary"}){const{fill:t}=st[e];return i.jsxs("svg",{viewBox:"0 0 32 40",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:"aimapui-marker-pin",style:{width:32,height:40,display:"block",filter:"drop-shadow(0 4px 3px rgba(0,0,0,0.07)) drop-shadow(0 2px 2px rgba(0,0,0,0.06))"},children:[i.jsx("path",{d:"M16 0C7.16344 0 0 7.16344 0 16C0 24.8366 16 40 16 40C16 40 32 24.8366 32 16C32 7.16344 24.8366 0 16 0Z",fill:t,stroke:"white",strokeWidth:1.5}),i.jsx("circle",{cx:"16",cy:"16",r:"4",fill:"white"})]})}function Sr({icon:e,color:t="primary"}){const{fill:n}=st[t],r=Te[e]??Te.marker??"";return i.jsxs("div",{className:"aimapui-marker-pin aimapui-marker-pin--icon",style:{position:"relative",display:"inline-flex",alignItems:"flex-start",justifyContent:"center",width:32,height:40,filter:"drop-shadow(0 4px 3px rgba(0,0,0,0.07)) drop-shadow(0 2px 2px rgba(0,0,0,0.06))"},children:[i.jsx("svg",{viewBox:"0 0 32 40",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{position:"absolute",inset:0,width:"100%",height:"100%"},children:i.jsx("path",{d:"M16 0C7.16344 0 0 7.16344 0 16C0 24.8366 16 40 16 40C16 40 32 24.8366 32 16C32 7.16344 24.8366 0 16 0Z",fill:n,stroke:"white",strokeWidth:1.5})}),r&&i.jsx("svg",{viewBox:"0 0 15 15",xmlns:"http://www.w3.org/2000/svg",style:{position:"relative",zIndex:1,width:16,height:16,marginTop:8,fill:"white"},children:i.jsx("path",{d:r,style:{fill:"white"}})})]})}function zr({color:e="primary"}){const{fill:t,bg:n}=st[e];return i.jsx("div",{className:"aimapui-marker-circle",style:{position:"relative",width:24,height:24,borderRadius:"50%",border:"1.5px solid white",boxShadow:"0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -2px rgba(0,0,0,0.1)",display:"flex",alignItems:"center",justifyContent:"center",background:n,borderColor:t},children:i.jsx("div",{className:"aimapui-marker-circle__inner",style:{width:6,height:6,borderRadius:"50%",background:t}})})}function jr({color:e="primary"}){const{fill:t}=st[e];return i.jsx("div",{className:"aimapui-marker-dot",style:{width:8,height:8,borderRadius:"50%",border:"1.5px solid white",boxShadow:"0 1px 3px rgba(0,0,0,0.3)",background:t}})}function Hr({text:e}){return i.jsx("div",{className:"aimapui-marker-label",style:{position:"absolute",top:"calc(100% + 4px)",left:"50%",transform:"translateX(-50%)",fontFamily:"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace",fontSize:12,lineHeight:"16px",fontWeight:450,color:"#1d1d1f",whiteSpace:"nowrap",pointerEvents:"none",textShadow:"-1px -1px 0 #fff, 1px -1px 0 #fff, -1px 1px 0 #fff, 1px 1px 0 #fff, 0 0 2px #fff, 0 0 4px rgba(255,255,255,0.5)"},children:e})}const s1={center:"translate(-50%, -50%)",top:"translate(-50%, 0)",bottom:"translate(-50%, -100%)",left:"translate(0, -50%)",right:"translate(-100%, -50%)","top-left":"translate(0, 0)","top-right":"translate(-100%, 0)","bottom-left":"translate(0, -100%)","bottom-right":"translate(-100%, -100%)"},Vr=[0,0];function Er(e,t,n,r){let o;switch(e){case"pin":o=i.jsx(o1,{color:t});break;case"circle":o=i.jsx(zr,{color:t});break;case"icon":o=i.jsx(Sr,{icon:n||"marker",color:t});break;case"dot":o=i.jsx(jr,{color:t});break;default:o=i.jsx(o1,{color:t})}return r?i.jsxs("div",{style:{position:"relative",display:"inline-flex",flexDirection:"column",alignItems:"center"},children:[o,i.jsx(Hr,{text:r})]}):o}function Pe({longitude:e,latitude:t,variant:n="pin",color:r="primary",icon:o,label:a,content:s,children:l,draggable:c=!1,className:d,overlayContainer:h,onClick:f,onMouseEnter:p,onMouseLeave:g,onDoubleClick:m,onDragEnd:x,onDragging:v,onDragStart:L,selected:k=!1,inactive:b=!1,anchor:z="bottom",offsets:V=Vr,overflowHide:F=!0}){const M=ye(),j=u.useRef(null),T=u.useRef(null),H=u.useRef({lng:e,lat:t}),Z=u.useRef({width:0,height:0}),E=V[0]??0,N=V[1]??0,y=u.useRef(null),w=u.useRef(f);w.current=f;const I=u.useRef(p);I.current=p;const R=u.useRef(g);R.current=g;const _=u.useRef(m);_.current=m;const $=u.useRef(L);$.current=L;const G=u.useRef(v);G.current=v;const Q=u.useRef(x);Q.current=x;const U=u.useMemo(()=>{const D=["aimapui-marker"];return k&&D.push("aimapui-marker--selected"),b&&D.push("aimapui-marker--inactive"),D.push(`aimapui-marker--${r}`),d&&D.push(d),D.join(" ")},[k,b,r,d]),q=u.useMemo(()=>s||l||Er(n,r,o,a),[s,l,n,r,o,a]),ee=D=>{const B=j.current;if(!B||!D)return;const{lng:le,lat:se}=H.current;if(isNaN(le)||isNaN(se))return;let J;try{J=D.lngLatToContainer([le,se])}catch{return}if(!J||isNaN(J.x)||isNaN(J.y))return;const ie=J.x+E,A=J.y-N,C=s1[z]||s1.bottom,P=Math.round(ie),S=Math.round(A);if(B.style.left="0",B.style.top="0",B.style.transform=`translate3d(${P}px, ${S}px, 0) ${C}`,F){const{width:K,height:O}=Z.current;B.style.visibility=ie<0||ie>K||A<0||A>O?"hidden":"visible"}};return u.useEffect(()=>{if(!M)return;let D=!1;const B=M.mapService;if(!B){console.error("[Marker] mapService not available");return}const le=()=>{var P;const C=(P=B.getContainer)==null?void 0:P.call(B);C&&(Z.current={width:C.scrollWidth||C.clientWidth||0,height:C.scrollHeight||C.clientHeight||0})},se=()=>{j.current&&ee(B)},J=(C,P,S)=>{var K;try{(K=C==null?void 0:C.on)==null||K.call(C,P,S)}catch{}},ie=(C,P,S)=>{var K;try{(K=C==null?void 0:C.off)==null||K.call(C,P,S)}catch{}};return le(),J(B,"camerachange",se),J(B,"viewchange",se),J(M,"resize",le),(async()=>{var oe;if(M.loaded||await new Promise(X=>{M.once("loaded",()=>X())}),D)return;const C=document.createElement("div");C.className=U,C.style.position="absolute",C.style.left="0",C.style.top="0",C.style.whiteSpace="nowrap",C.style.pointerEvents="auto",j.current=C;const P=h??((oe=B.getMarkerContainer)==null?void 0:oe.call(B));if(P)P.appendChild(C);else{console.error("[Marker] getMarkerContainer not available");return}ee(B);let S=!1,K={lng:0,lat:0};const O=X=>{var ae;if(!c)return;S=!0,B.setMapStatus({dragEnable:!1,zoomEnable:!1});const ne=B.getContainer(),W=(ae=ne==null?void 0:ne.getClientRects())==null?void 0:ae[0];if(W){const de=W.left,ue=W.top,me=X.x||X.clientX,ve=X.y||X.clientY;K=B.containerToLngLat([me-de,ve-ue])}B.on("mousemove",Y),document.addEventListener("mouseup",te),$.current&&$.current(H.current.lng,H.current.lat)},Y=X=>{if(!S)return;const ne=X.lngLat||X.lnglat,{lng:W,lat:ae}=K,{lng:de,lat:ue}=ne,me={lng:H.current.lng+de-W,lat:H.current.lat+ue-ae};H.current=me,K=ne,ee(B),G.current&&G.current(me.lng,me.lat)},te=()=>{S&&(S=!1,B.setMapStatus({dragEnable:!0,zoomEnable:!0}),B.off("mousemove",Y),document.removeEventListener("mouseup",te),Q.current&&Q.current(H.current.lng,H.current.lat))};C.addEventListener("click",(X=>{var ne;return(ne=w.current)==null?void 0:ne.call(w,X)})),C.addEventListener("mouseenter",(X=>{var ne;return(ne=I.current)==null?void 0:ne.call(I,X)})),C.addEventListener("mouseleave",(X=>{var ne;return(ne=R.current)==null?void 0:ne.call(R,X)})),C.addEventListener("dblclick",(X=>{var ne;return(ne=_.current)==null?void 0:ne.call(_,X)})),c&&C.addEventListener("mousedown",O),y.current={updatePosition:se,handleDragStart:O,handleDragMove:Y,handleDragEnd:te}})(),()=>{if(D=!0,ie(B,"camerachange",se),ie(B,"viewchange",se),ie(M,"resize",le),y.current&&c&&B.setMapStatus({dragEnable:!0,zoomEnable:!0}),j.current){const P=T.current,S=j.current;T.current=null,j.current=null,queueMicrotask(()=>{P&&P.unmount(),S.parentNode&&S.parentNode.removeChild(S)})}y.current=null}},[M,z,E,N,F,c,h]),u.useEffect(()=>{if(!j.current)return;const D=j.current;kr(q)?D.innerHTML=q:(T.current||(T.current=Z0.createRoot(D)),T.current.render(i.jsx(i.Fragment,{children:q})))},[q]),u.useEffect(()=>{j.current&&(j.current.className=U)},[U]),u.useEffect(()=>{if(H.current={lng:e,lat:t},M&&j.current){const D=M.mapService;D&&ee(D)}},[e,t,M]),null}function a0({interactions:e}){const t=ye(),[n,r]=u.useState(null);u.useEffect(()=>{if(!t)return;const s=()=>{try{const c=t.mapService;if(c&&typeof c.getMarkerContainer=="function"){const d=c.getMarkerContainer();if(d){r(d);return}}}catch{}const l=setTimeout(()=>{try{const c=t.mapService;if(c&&typeof c.getMarkerContainer=="function"){const d=c.getMarkerContainer();d&&r(d)}}catch{}},100);return()=>clearTimeout(l)};return t.loaded?s():(t.on("loaded",s),()=>{t.off("loaded",s)})},[t]);const o=e.filter(s=>s.type==="marker"),a=e.filter(s=>s.type==="popup");return i.jsxs(i.Fragment,{children:[n&&o.map((s,l)=>i.jsx(Pe,{...s,overlayContainer:n},`marker-${l}`)),n&&a.map((s,l)=>i.jsx(qe,{...s,overlayContainer:n},`popup-${l}`))]})}function Nt({title:e,labels:t,colors:n,swatchShape:r="square",grid:o=!1,className:a,interaction:s}){const[l,c]=u.useState(-1),[d,h]=u.useState(new Set),f=m=>{var x;c(m),(x=s==null?void 0:s.onHover)==null||x.call(s,m)},p=()=>{var m;c(-1),(m=s==null?void 0:s.onHover)==null||m.call(s,-1)},g=m=>{var x;h(v=>{const L=new Set(v);return L.has(m)?L.delete(m):L.add(m),L}),(x=s==null?void 0:s.onToggle)==null||x.call(s,m)};return i.jsxs("div",{className:pe(a),children:[e&&i.jsx("div",{className:"mb-2 text-xs font-semibold uppercase tracking-wide text-on-surface-variant",children:e}),i.jsx("div",{className:pe("flex flex-col gap-1",o&&"grid grid-cols-2 gap-x-3 gap-y-1"),children:t.map((m,x)=>{const v=l>=0?l!==x:d.has(x);return i.jsxs("div",{className:pe("flex items-center gap-2 rounded px-1 py-0.5 cursor-pointer select-none transition-[background,opacity] duration-150 hover:bg-primary/[0.06]",v&&"opacity-35"),onMouseEnter:()=>f(x),onMouseLeave:p,onClick:()=>g(x),children:[i.jsx("span",{className:pe("size-3 shrink-0 rounded-sm shadow-[inset_0_0_0_1px_rgba(0,0,0,0.08)] transition-opacity duration-150",r==="circle"&&"rounded-full"),style:{backgroundColor:n[x]??"#ccc"}}),i.jsx("span",{className:"text-xs leading-4 text-on-surface truncate",children:m})]},x)})})]})}function It({title:e,labels:t,colors:n,isContinuous:r=!1,showTicks:o=!1,brushable:a=!1,className:s,interaction:l}){const[c,d]=u.useState([0,100]),h=u.useRef(null),f=n.join(", "),p=u.useCallback(g=>m=>{m.stopPropagation(),m.preventDefault();const x=h.current;if(!x)return;const v=x.getBoundingClientRect().width,L=b=>{const z=x.getBoundingClientRect(),V=b.clientX-z.left,F=Math.max(0,Math.min(100,V/v*100));d(M=>{var T;let j;return g==="left"?j=[Math.min(F,M[1]-5),M[1]]:j=[M[0],Math.max(F,M[0]+5)],(T=l==null?void 0:l.onBrush)==null||T.call(l,j),j})},k=()=>{document.removeEventListener("mousemove",L),document.removeEventListener("mouseup",k)};document.addEventListener("mousemove",L),document.addEventListener("mouseup",k)},[l,h]);return i.jsxs("div",{className:pe(s),children:[e&&i.jsx("div",{className:"mb-2 text-xs font-semibold uppercase tracking-wide text-on-surface-variant",children:e}),i.jsxs("div",{className:"flex flex-col gap-1",ref:h,children:[i.jsx("div",{className:pe("flex h-3 rounded overflow-hidden shadow-[inset_0_0_0_1px_rgba(0,0,0,0.06)]",r&&"bg-[length:100%_100%]"),style:r?{background:`linear-gradient(to right, ${f})`}:void 0,children:!r&&n.map((g,m)=>i.jsx("div",{className:"flex-1 relative",style:{backgroundColor:g}},m))}),o&&i.jsx("div",{className:"flex justify-between h-1.5 mt-0.5",children:n.map((g,m)=>m===0?null:i.jsx("div",{className:"w-px h-full bg-outline-variant",style:{position:"absolute",left:`${m/(n.length-1)*100}%`}},m))}),i.jsxs("div",{className:"flex justify-between font-mono text-[11px] leading-3.5 font-[450] text-on-surface-variant",children:[i.jsx("span",{children:t[0]}),t.length>2&&i.jsx("span",{children:t[Math.floor(t.length/2)]}),i.jsx("span",{children:t[t.length-1]})]}),a&&i.jsxs("div",{className:"relative h-3 mt-1 cursor-ew-resize",children:[i.jsx("div",{className:"absolute top-0 h-full border-2 border-primary rounded-sm bg-primary/10 pointer-events-none",style:{left:`${c[0]}%`,width:`${c[1]-c[0]}%`}}),i.jsx("div",{className:"absolute top-1/2 w-2 h-4 bg-primary rounded-sm -translate-x-1/2 -translate-y-1/2 cursor-ew-resize shadow-sm hover:shadow-md hover:shadow-primary/30 transition-shadow duration-150",style:{left:`${c[0]}%`},onMouseDown:p("left")}),i.jsx("div",{className:"absolute top-1/2 w-2 h-4 bg-primary rounded-sm -translate-x-1/2 -translate-y-1/2 cursor-ew-resize shadow-sm hover:shadow-md hover:shadow-primary/30 transition-shadow duration-150",style:{left:`${c[1]}%`},onMouseDown:p("right")})]})]})]})}function Pt({title:e,colors:t,labels:n,middleLabel:r,className:o}){const a=t.join(", ");return i.jsxs("div",{className:pe(o),children:[e&&i.jsx("div",{className:"mb-2 text-xs font-semibold uppercase tracking-wide text-on-surface-variant",children:e}),i.jsxs("div",{className:"flex flex-col gap-1",children:[i.jsxs("div",{style:{position:"relative"},children:[i.jsx("div",{className:"flex h-3 rounded overflow-hidden shadow-[inset_0_0_0_1px_rgba(0,0,0,0.06)]",style:{background:`linear-gradient(to right, ${a})`}}),i.jsx("div",{style:{position:"absolute",top:-4,left:"50%",transform:"translateX(-50%)",width:1,height:20,background:"var(--color-outline-variant, #c3c6d7)"}}),r&&i.jsx("div",{className:"absolute left-1/2 -translate-x-1/2 -bottom-[18px] font-mono text-[11px] text-on-surface-variant whitespace-nowrap",children:r})]}),i.jsxs("div",{className:"flex justify-between font-mono text-[11px] leading-3.5 font-[450] text-on-surface-variant",style:r?{marginBottom:12}:void 0,children:[i.jsx("span",{children:n[0]}),i.jsx("span",{children:n[1]})]})]})]})}function Rt({title:e,ranges:t,colors:n,className:r,interaction:o}){const[a,s]=u.useState(-1),[l,c]=u.useState(new Set),d=p=>{var g;s(p),(g=o==null?void 0:o.onHover)==null||g.call(o,p)},h=()=>{var p;s(-1),(p=o==null?void 0:o.onHover)==null||p.call(o,-1)},f=p=>{var g;c(m=>{const x=new Set(m);return x.has(p)?x.delete(p):x.add(p),x}),(g=o==null?void 0:o.onToggle)==null||g.call(o,p)};return i.jsxs("div",{className:pe(r),children:[e&&i.jsx("div",{className:"mb-2 text-xs font-semibold uppercase tracking-wide text-on-surface-variant",children:e}),i.jsx("div",{className:"flex flex-col gap-1.5",children:t.map(([p,g],m)=>{const x=a>=0?a!==m:l.has(m);return i.jsxs("div",{className:pe("flex items-center gap-2 cursor-pointer select-none transition-opacity duration-150 hover:opacity-80",x&&"opacity-35"),onMouseEnter:()=>d(m),onMouseLeave:h,onClick:()=>f(m),children:[i.jsx("span",{className:"w-6 h-3 shrink-0 rounded-sm shadow-[inset_0_0_0_1px_rgba(0,0,0,0.06)]",style:{backgroundColor:n[m]??"#ccc"}}),i.jsxs("span",{className:"font-mono text-[11px] leading-3.5 text-on-surface-variant",children:["[",p,", ",g,")"]})]},m)})})]})}function Dt({title:e,fillColor:t="#4A90D9",items:n,className:r}){const o=Math.max(...n.map(a=>a.size),1);return i.jsxs("div",{className:pe(r),children:[e&&i.jsx("div",{className:"mb-2 text-xs font-semibold uppercase tracking-wide text-on-surface-variant",children:e}),i.jsxs("div",{className:"flex flex-col gap-2",children:[i.jsx("div",{className:"flex items-end gap-2 px-1",children:n.map((a,s)=>i.jsx("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"flex-end",height:o},children:i.jsx("div",{className:"rounded-full shrink-0 shadow-[inset_0_0_0_1px_rgba(0,0,0,0.06)]",style:{width:a.size,height:a.size,backgroundColor:t,opacity:.85}})},s))}),i.jsx("div",{className:"flex items-end gap-2 mt-1",children:n.map((a,s)=>i.jsx("span",{className:"font-mono text-[11px] leading-3.5 text-on-surface-variant whitespace-nowrap",children:a.label},s))})]})]})}function $t({title:e,color:t="#4A90D9",items:n,className:r,interaction:o}){const[a,s]=u.useState(-1),[l,c]=u.useState(new Set),d=p=>{var g;s(p),(g=o==null?void 0:o.onHover)==null||g.call(o,p)},h=()=>{var p;s(-1),(p=o==null?void 0:o.onHover)==null||p.call(o,-1)},f=p=>{var g;c(m=>{const x=new Set(m);return x.has(p)?x.delete(p):x.add(p),x}),(g=o==null?void 0:o.onToggle)==null||g.call(o,p)};return i.jsxs("div",{className:pe(r),children:[e&&i.jsx("div",{className:"mb-2 text-xs font-semibold uppercase tracking-wide text-on-surface-variant",children:e}),i.jsx("div",{className:"flex flex-col gap-1.5",children:n.map((p,g)=>{const m=a>=0?a!==g:l.has(g);return i.jsxs("div",{className:pe("flex items-center gap-2.5 py-0.5 cursor-pointer select-none transition-opacity duration-150 hover:opacity-80",m&&"opacity-35"),onMouseEnter:()=>d(g),onMouseLeave:h,onClick:()=>f(g),children:[i.jsx("div",{className:"w-7 shrink-0 rounded-full shadow-[0_0_0_1px_rgba(0,0,0,0.06)]",style:{height:p.width,backgroundColor:t,opacity:.85}}),i.jsx("span",{className:"text-xs leading-4 text-on-surface whitespace-nowrap",children:p.label})]},g)})})]})}function _t({title:e,labels:t,fillColor:n="#4A90D9",className:r}){return i.jsxs("div",{className:pe(r),children:[e&&i.jsx("div",{className:"mb-2 text-xs font-semibold uppercase tracking-wide text-on-surface-variant",children:e}),i.jsxs("div",{className:"flex flex-col gap-2",children:[i.jsx("div",{className:"flex items-end gap-2 px-1",children:t.map(([s,l],c)=>{const h=6+c/Math.max(t.length-1,1)*18;return i.jsx("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"flex-end",height:24},children:i.jsx("div",{className:"rounded-full shrink-0 shadow-[inset_0_0_0_1px_rgba(0,0,0,0.06)]",style:{width:h,height:h,backgroundColor:n,opacity:.85}})},c)})}),i.jsx("div",{className:"flex items-end gap-2 mt-1",children:t.map(([s,l],c)=>i.jsxs("span",{className:"font-mono text-[11px] leading-3.5 text-on-surface-variant whitespace-nowrap",children:[s,"–",l]},c))})]})]})}function i1(e){return/^(https?:|\/\/|data:)/i.test(e)}function Ot({title:e,items:t,className:n,interaction:r}){const[o,a]=u.useState(-1),[s,l]=u.useState(new Set),c=f=>{var p;a(f),(p=r==null?void 0:r.onHover)==null||p.call(r,f)},d=()=>{var f;a(-1),(f=r==null?void 0:r.onHover)==null||f.call(r,-1)},h=f=>{var p;l(g=>{const m=new Set(g);return m.has(f)?m.delete(f):m.add(f),m}),(p=r==null?void 0:r.onToggle)==null||p.call(r,f)};return i.jsxs("div",{className:pe(n),children:[e&&i.jsx("div",{className:"mb-2 text-xs font-semibold uppercase tracking-wide text-on-surface-variant",children:e}),i.jsx("div",{className:"flex flex-col gap-1",children:t.map((f,p)=>{const g=o>=0?o!==p:s.has(p);return i.jsxs("div",{className:pe("flex items-center gap-2 px-1 py-0.5 rounded cursor-pointer select-none transition-[background,opacity] duration-150 hover:bg-primary/[0.06]",g&&"opacity-35"),onMouseEnter:()=>c(p),onMouseLeave:d,onClick:()=>h(p),children:[i1(f.icon)?i.jsx("img",{src:f.icon,alt:f.label,className:"size-5 object-contain shrink-0",onError:m=>{const x=m.target;x.style.display="none";const v=x.nextElementSibling;v&&(v.style.display="flex")}}):i.jsx("span",{className:"size-5 flex items-center justify-center shrink-0 text-base leading-none",children:f.icon}),i1(f.icon)&&i.jsx("span",{className:"size-5 hidden items-center justify-center shrink-0 text-base leading-none text-on-surface-variant",children:"□"}),i.jsx("span",{className:"text-xs leading-4 text-on-surface",children:f.label})]},p)})})]})}function l0({legends:e,className:t,style:n,interaction:r}){return e.length?i.jsx("div",{className:pe("absolute z-20 bottom-6 left-6 max-h-[40%] overflow-y-auto rounded-xl border border-outline-variant/30 bg-surface/80 backdrop-blur-md p-3 px-3.5 text-on-surface shadow-lg scrollbar-thin scrollbar-track-transparent scrollbar-thumb-outline-variant",t),style:n,children:i.jsx("div",{className:"flex flex-col gap-4 [&>*+*]:border-t [&>*+*]:border-outline-variant/20 [&>*+*]:pt-4",children:e.map((o,a)=>i.jsx(Ar,{legend:o,interaction:r},`legend-${a}`))})}):null}function Ar({legend:e,interaction:t}){switch(e.type){case"categories":return i.jsx(Nt,{...e,interaction:t});case"ramp":return i.jsx(It,{...e,interaction:t});case"diverging":return i.jsx(Pt,{...e,interaction:t});case"threshold":return i.jsx(Rt,{...e,interaction:t});case"size":return i.jsx(Dt,{...e,interaction:t});case"lineWidth":return i.jsx($t,{...e,interaction:t});case"proportion":return i.jsx(_t,{...e,interaction:t});case"icon":return i.jsx(Ot,{...e,interaction:t});default:return null}}const c0=u.createContext({isMobile:!1,breakpoint:768,width:typeof window<"u"?window.innerWidth:1024,schema:void 0});function Zr({responsive:e,children:t}){const[n,r]=u.useState(typeof window<"u"?window.innerWidth:1024);u.useEffect(()=>{const l=()=>r(window.innerWidth);return window.addEventListener("resize",l),()=>window.removeEventListener("resize",l)},[]);const o=(e==null?void 0:e.breakpoint)??768,a=n<o,s=u.useMemo(()=>({isMobile:a,breakpoint:o,width:n,schema:e}),[a,o,n,e]);return i.jsx(c0.Provider,{value:s,children:t})}function u0(){return u.useContext(c0)}function d0({config:e,className:t}){const n=ye(),{items:r,position:o="bottom"}=e,a=c=>{switch(c){case"zoomIn":n==null||n.zoomIn();break;case"zoomOut":n==null||n.zoomOut();break;case"locate":navigator.geolocation&&navigator.geolocation.getCurrentPosition(d=>{n==null||n.setCenter([d.coords.longitude,d.coords.latitude]),n==null||n.setZoom(14)});break;case"reset":n==null||n.setCenter([105,35]),n==null||n.setZoom(4);break}},s={zoomIn:i.jsx("svg",{viewBox:"0 0 24 24",className:"w-6 h-6",fill:"none",stroke:"currentColor",strokeWidth:2,children:i.jsx("path",{d:"M12 5v14m-7-7h14"})}),zoomOut:i.jsx("svg",{viewBox:"0 0 24 24",className:"w-6 h-6",fill:"none",stroke:"currentColor",strokeWidth:2,children:i.jsx("path",{d:"M5 12h14"})}),locate:i.jsxs("svg",{viewBox:"0 0 24 24",className:"w-6 h-6",fill:"none",stroke:"currentColor",strokeWidth:2,children:[i.jsx("circle",{cx:"12",cy:"12",r:"3"}),i.jsx("path",{d:"M12 2v4m0 12v4m10-10h-4M6 12H2"})]}),reset:i.jsxs("svg",{viewBox:"0 0 24 24",className:"w-6 h-6",fill:"none",stroke:"currentColor",strokeWidth:2,children:[i.jsx("path",{d:"M3 12a9 9 0 1 1 3.3 6.9"}),i.jsx("path",{d:"M3 22v-7h7"})]}),layers:i.jsx("svg",{viewBox:"0 0 24 24",className:"w-6 h-6",fill:"none",stroke:"currentColor",strokeWidth:2,children:i.jsx("path",{d:"M12 2L2 7l10 5 10-5-10-5zM2 17l10 5 10-5M2 12l10 5 10-5"})})},l={zoomIn:"放大",zoomOut:"缩小",locate:"定位",reset:"复位",layers:"图层"};return i.jsx("div",{className:pe("aimapui-mobile-toolbar pointer-events-none",o==="bottom"?"aimapui-mobile-toolbar--bottom":"aimapui-mobile-toolbar--top",t),children:i.jsx("div",{className:"aimapui-mobile-toolbar__bar pointer-events-auto",children:r.map((c,d)=>i.jsxs("button",{onClick:()=>a(c),className:"aimapui-mobile-toolbar__button group",style:{background:"none",border:"none",cursor:"pointer"},"aria-label":l[c]??c,title:l[c]??c,children:[i.jsx("span",{className:"aimapui-mobile-toolbar__icon",children:s[c]}),i.jsx("span",{className:"aimapui-mobile-toolbar__label",children:l[c]??c})]},`${c}-${d}`))})})}function h0({legends:e,className:t,interaction:n}){const[r,o]=u.useState(!1);return e.length?i.jsx("div",{className:pe("aimapui-mobile-sheet-legend",t),children:i.jsxs("div",{className:"aimapui-mobile-sheet-legend__panel",children:[i.jsx("div",{className:"aimapui-mobile-sheet-legend__handle","aria-hidden":"true"}),i.jsxs("button",{onClick:()=>o(!r),className:"aimapui-mobile-sheet-legend__toggle",style:{background:"none",border:"none",cursor:"pointer"},children:[i.jsxs("span",{className:"aimapui-mobile-sheet-legend__toggle-copy",children:[i.jsx("span",{className:"aimapui-mobile-sheet-legend__eyebrow",children:"Legend Panel"}),i.jsxs("span",{className:"aimapui-mobile-sheet-legend__title-row",children:[i.jsx("span",{className:"aimapui-mobile-sheet-legend__title",children:"图例"}),i.jsxs("span",{className:"aimapui-mobile-sheet-legend__badge",children:[e.length," 项"]})]})]}),i.jsx("span",{className:"aimapui-mobile-sheet-legend__chevron-shell","aria-hidden":"true",children:i.jsx("svg",{viewBox:"0 0 24 24",className:pe("aimapui-mobile-sheet-legend__chevron",r&&"aimapui-mobile-sheet-legend__chevron--expanded"),fill:"none",stroke:"currentColor",strokeWidth:2,children:i.jsx("path",{d:"M6 9l6 6 6-6"})})})]}),i.jsx("div",{className:pe("aimapui-mobile-sheet-legend__content custom-scrollbar",r?"aimapui-mobile-sheet-legend__content--expanded":"aimapui-mobile-sheet-legend__content--collapsed"),children:e.map((a,s)=>i.jsx("div",{className:"aimapui-mobile-sheet-legend__section",children:i.jsx(Fr,{legend:a,interaction:n})},`mobile-legend-${s}`))})]})}):null}function Fr({legend:e,interaction:t}){switch(e.type){case"categories":return i.jsx(Nt,{...e,interaction:t});case"ramp":return i.jsx(It,{...e,interaction:t});case"diverging":return i.jsx(Pt,{...e,interaction:t});case"threshold":return i.jsx(Rt,{...e,interaction:t});case"size":return i.jsx(Dt,{...e,interaction:t});case"lineWidth":return i.jsx($t,{...e,interaction:t});case"proportion":return i.jsx(_t,{...e,interaction:t});case"icon":return i.jsx(Ot,{...e,interaction:t});default:return null}}function Tr({map:e,schema:t,theme:n="light",onSceneReady:r,onLayerClick:o,onLayerMouseMove:a,onLayerMouseEnter:s,onLayerMouseLeave:l,onMapMove:c,onMapZoom:d,autoFit:h,events:f,children:p,className:g,style:m}){const x=u.useRef(null),v=u.useMemo(()=>{if(t)return xt(L1(t));const V=e??{basemap:"gaode"};return!V.basemap&&!V.engine&&(V.basemap="gaode"),{map:Ir(V),layers:[],controls:[],interactions:[],legends:[]}},[t,e]),L=!t&&!!e,k=u.useMemo(()=>({onClick:o,onMouseMove:a,onMouseEnter:s,onMouseLeave:l}),[o,a,s,l]),b=u.useMemo(()=>({onMove:c,onZoom:d}),[c,d]),z=u.useCallback(V=>{r==null||r(V)},[r]);return i.jsx(V1,{defaultTheme:n,target:"container",children:i.jsx(M1,{schema:v,children:i.jsx(j1,{events:f,children:i.jsx(U0,{responsive:v.responsive,children:i.jsx(Pr,{schema:v,isComposableMode:L,autoFit:h,onSceneReady:z,layerEventHandlers:k,mapEventHandlers:b,containerRef:x,className:g,style:m,children:p})})})})})}function Nr(){const e=ye();return u.useEffect(()=>{if(!e)return;let t=!1,n=null,r=null;const o=new Set,a=()=>{var v,L;if(t)return;const h=((v=e.getLayers)==null?void 0:v.call(e))??[];if(h.length===0)return;let f=1/0,p=1/0,g=-1/0,m=-1/0,x=!1;for(const k of h)try{const b=(L=k.getSource)==null?void 0:L.call(k),z=b==null?void 0:b.extent;if(!z||!Array.isArray(z)||z.length<4)continue;const[V,F,M,j]=z;if(!isFinite(V)||!isFinite(F)||!isFinite(M)||!isFinite(j)||V>=M||F>=j)continue;f=Math.min(f,V),p=Math.min(p,F),g=Math.max(g,M),m=Math.max(m,j),x=!0}catch{}if(!(!x||f>=g||p>=m))try{e.fitBounds([[f,p],[g,m]]),t=!0}catch{}},s=()=>{t||(n&&clearTimeout(n),n=setTimeout(a,200))};let l=0;const c=50,d=()=>{var f;if(t)return;l+=1;const h=((f=e.getLayers)==null?void 0:f.call(e))??[];for(const p of h)o.has(p)||(o.add(p),p.inited&&s(),typeof p.on=="function"&&p.on("inited",s));!t&&l<c&&(r=setTimeout(d,100))};return r=setTimeout(d,100),()=>{n&&clearTimeout(n),r&&clearTimeout(r)}},[e]),null}function Ir(e){return{basemap:e.basemap??(e.engine?void 0:"gaode"),engine:e.engine,token:e.token,style:e.style,center:e.center??[105,35],zoom:e.zoom??4,pitch:e.pitch??0,rotation:e.rotation??0,minZoom:e.minZoom,maxZoom:e.maxZoom,bounds:e.bounds,gestureConfig:e.gestureConfig}}function Pr({schema:e,isComposableMode:t,autoFit:n,onSceneReady:r,layerEventHandlers:o,mapEventHandlers:a,containerRef:s,className:l,style:c,children:d}){var v,L;const{isMobile:h}=u0(),[f,p]=u.useState(e.layers??[]),g=u.useMemo(()=>{var b,z;if(t||!h||!((z=(b=e.responsive)==null?void 0:b.mobile)!=null&&z.layers))return e.layers;const k=e.responsive.mobile.layers;if("*"in k){const V=k["*"];return e.layers.map(F=>({...F,...V,id:F.id}))}return e.layers.map(V=>V.id&&k[V.id]?{...V,...k[V.id],id:V.id}:V)},[e.layers,e.responsive,h,t]),m=u.useMemo(()=>{var z,V;const k=e.controls??[];if(!h||!((V=(z=e.responsive)==null?void 0:z.mobile)!=null&&V.controls))return k;const b=e.responsive.mobile.controls;return b.hide?k.filter(F=>!b.hide.includes(F.type)):k},[e.controls,e.responsive,h]),x=u.useCallback((k,b)=>{p(z=>z.map(V=>V.id===k?{...V,visible:b}:V))},[]);return i.jsx("div",{ref:s,className:l??"aimapui-container",style:c??{width:"100%",height:"100%"},children:i.jsxs(T1,{mapSchema:e.map,onSceneReady:r,mapEventHandlers:a,events:e.events,style:{width:"100%",height:"100%"},children:[n&&i.jsx(Nr,{}),!t&&g.length>0&&i.jsx(B1,{layers:g,eventHandlers:o}),!t&&i.jsx(r0,{controls:m,layers:g,onLayerToggle:x,containerRef:s}),!t&&e.interactions&&e.interactions.length>0&&i.jsx(a0,{interactions:e.interactions}),!t&&(h?e.legends&&e.legends.length>0&&i.jsx(h0,{legends:e.legends}):i.jsx(l0,{legends:e.legends??[]})),!t&&h&&((L=(v=e.responsive)==null?void 0:v.mobile)==null?void 0:L.toolbar)&&i.jsx(d0,{config:e.responsive.mobile.toolbar}),t?i.jsx(Rr,{children:d}):null]})})}function Rr({children:e}){const{controls:t,others:n}=u.useMemo(()=>{const r=[],o=[];return u.Children.forEach(e,(a,s)=>{u.isValidElement(a)&&Le.check(a)?r.push(a):o.push(a)}),{controls:r,others:o}},[e]);return i.jsxs(i.Fragment,{children:[t.length>0&&i.jsx(Mt,{children:t}),n]})}function We(e,t){if(e===t)return!1;if(e==null||t==null||typeof e!=typeof t||typeof e!="object")return!0;try{return JSON.stringify(e)!==JSON.stringify(t)}catch{return!0}}function Dr(e,t){const n=We(e.map,t.map),r=new Map;(e.layers??[]).forEach(v=>{v.id&&r.set(v.id,v)});const o=new Map;(t.layers??[]).forEach(v=>{v.id&&o.set(v.id,v)});const a=[],s=[],l=[];(t.layers??[]).forEach((v,L)=>{const k=v.id??`__index_${L}`;if(!r.has(k))a.push(v);else{const b=r.get(k);We(b,v)&&l.push({id:k,prev:b,next:v})}}),(e.layers??[]).forEach((v,L)=>{const k=v.id??`__index_${L}`;o.has(k)||s.push(k)});const c=e.controls??[],d=t.controls??[],h=[],f=[],p=[],g=Math.max(c.length,d.length);for(let v=0;v<g;v++)v>=c.length?h.push(d[v]):v>=d.length?f.push(c[v]):We(c[v],d[v])&&p.push({index:v,prev:c[v],next:d[v]});const m=We(e.interactions,t.interactions),x=We(e.legends,t.legends);return{mapChanged:n,layersAdded:a,layersRemoved:s,layersUpdated:l,controlsAdded:h,controlsRemoved:f,controlsUpdated:p,interactionsChanged:m,legendsChanged:x}}function $r(e){const t=[];return e.map?t.push(..._r(e.map)):t.push({path:"map",message:"map is required",severity:"error"}),!e.layers||!Array.isArray(e.layers)?t.push({path:"layers",message:"layers must be an array",severity:"error"}):e.layers.forEach((n,r)=>{t.push(...Or(n,r))}),e.controls&&(Array.isArray(e.controls)?e.controls.forEach((n,r)=>{n.type||t.push({path:`controls[${r}].type`,message:"control type is required",severity:"error"})}):t.push({path:"controls",message:"controls must be an array",severity:"error"})),e.interactions&&(Array.isArray(e.interactions)?e.interactions.forEach((n,r)=>{(n.type==="marker"||n.type==="popup")&&(typeof n.longitude!="number"||typeof n.latitude!="number")&&t.push({path:`interactions[${r}]`,message:"marker/popup requires longitude and latitude as numbers",severity:"error"})}):t.push({path:"interactions",message:"interactions must be an array",severity:"error"})),e.legends&&(Array.isArray(e.legends)?e.legends.forEach((n,r)=>{n.type||t.push({path:`legends[${r}].type`,message:"legend type is required",severity:"error"})}):t.push({path:"legends",message:"legends must be an array",severity:"error"})),t}function _r(e){const t=[],n=["gaode","mapbox","maplibre","tianditu","tencent","baidu","google","map"];if(e.basemap&&!n.includes(e.basemap)&&t.push({path:"map.basemap",message:`Invalid basemap "${e.basemap}". Valid values: ${n.join(", ")}`,severity:"error"}),e.center){const[r,o]=e.center;(r<-180||r>180)&&t.push({path:"map.center[0]",message:"Longitude must be between -180 and 180",severity:"error"}),(o<-90||o>90)&&t.push({path:"map.center[1]",message:"Latitude must be between -90 and 90",severity:"error"})}return e.zoom!==void 0&&(e.zoom<0||e.zoom>22)&&t.push({path:"map.zoom",message:"Zoom must be between 0 and 22",severity:"warning"}),e.basemap&&["gaode","mapbox","tianditu","tencent","baidu","google"].includes(e.basemap)&&!e.token&&t.push({path:"map.token",message:`basemap "${e.basemap}" requires a token`,severity:"warning"}),t}function Or(e,t){const n=[],r=`layers[${t}]`,o=["point","line","polygon","heatmap","raster","image"];return e.type?o.includes(e.type)||n.push({path:`${r}.type`,message:`Invalid layer type "${e.type}". Valid values: ${o.join(", ")}`,severity:"error"}):n.push({path:`${r}.type`,message:"layer type is required",severity:"error"}),e.source===void 0&&e.source,e.colorField&&!e.colorValues&&!e.color&&n.push({path:`${r}.colorValues`,message:"colorField is set but colorValues is not. L7 will use default scale.",severity:"warning"}),e.sizeField&&!e.sizeValues&&e.size===void 0&&n.push({path:`${r}.sizeValues`,message:"sizeField is set but sizeValues is not. L7 will use default scale.",severity:"warning"}),n}const Br={$schema:"http://json-schema.org/draft-07/schema#",title:"AiMapSchema",description:"Schema-driven React map visualization component configuration",type:"object",required:["map","layers"],properties:{map:{type:"object",required:["basemap"],properties:{basemap:{type:"string",enum:["gaode","mapbox","maplibre","tianditu","tencent","baidu","google","map"],description:"Map base tile provider"},token:{type:"string",description:"API token for the map service"},style:{type:"string",description:"Map style preset (light/dark/normal/darkblue/satellite) or custom URL"},center:{type:"array",items:{type:"number"},minItems:2,maxItems:2,description:"Map center [longitude, latitude], default [105, 35]"},zoom:{type:"number",description:"Map zoom level, default 4"},pitch:{type:"number",description:"Map pitch in degrees, default 0"},rotation:{type:"number",description:"Map rotation in degrees, default 0"},minZoom:{type:"number",description:"Minimum zoom level"},maxZoom:{type:"number",description:"Maximum zoom level"},bounds:{type:"array",items:{type:"array",items:{type:"number"},minItems:2,maxItems:2},minItems:2,maxItems:2,description:"Initial bounds [[swLng, swLat], [neLng, neLat]]"},gestureConfig:{type:"object",properties:{dragPan:{type:"boolean"},pinchZoom:{type:"boolean"},dragRotate:{type:"boolean"}}}}},layers:{type:"array",description:"Array of map layers",items:{type:"object",required:["type","source"],properties:{id:{type:"string",description:"Unique layer ID (auto-generated if omitted)"},type:{type:"string",enum:["point","line","polygon","heatmap","raster","image"],description:"Layer visualization type"},name:{type:"string",description:"Human-readable layer name"},visible:{type:"boolean",default:!0},zIndex:{type:"number",default:0},minZoom:{type:"number"},maxZoom:{type:"number"},autoFit:{type:"boolean",default:!1},source:{description:"GeoJSON, JSON array, or URL string"},sourceType:{type:"string",enum:["geojson","json","csv"]},sourceConfig:{type:"object",properties:{x:{type:"string",description:"Longitude field name"},y:{type:"string",description:"Latitude field name"},x1:{type:"string",description:"End longitude field (for arc lines)"},y1:{type:"string",description:"End latitude field (for arc lines)"},coordinates:{type:"string",description:"Coordinates field"}}},color:{type:"string",description:"Fixed color"},colorField:{type:"string",description:"Field to map color to"},colorValues:{oneOf:[{type:"string",description:"Color palette name"},{type:"array",items:{type:"string"},description:"Array of color values"}]},size:{type:"number",description:"Fixed size"},sizeField:{type:"string",description:"Field to map size to"},sizeValues:{type:"array",items:{type:"number"},description:"Size range [min, max]"},shape:{type:"string",description:"Fixed shape"},shapeField:{type:"string",description:"Field to map shape to"},shapeValues:{type:"array",items:{type:"string"}},style:{type:"object",description:"Additional style properties"},filterField:{type:"string"},filterValues:{type:"array"},animate:{type:"object",properties:{enable:{type:"boolean"},speed:{type:"number"},duration:{type:"number"},trailLength:{type:"number"},repeat:{type:"number"}}},active:{oneOf:[{type:"boolean"},{type:"object",properties:{color:{type:"string"}}}]},select:{oneOf:[{type:"boolean"},{type:"object",properties:{color:{type:"string"}}}]},events:{type:"object",description:"Layer event configuration",properties:{click:{type:"string",description:"Event identifier emitted on click (via EventBus)"},mousemove:{type:"string",description:"Event identifier emitted on mousemove"},mouseenter:{type:"string",description:"Event identifier emitted on mouseenter"},mouseleave:{type:"string",description:"Event identifier emitted on mouseleave"},enablePopup:{type:"boolean",description:"Auto-show popup on click"},popupFields:{type:"array",items:{type:"string"},description:"Fields to show in popup"},popupTemplate:{type:"string",description:"HTML template with {{field}} interpolation"}}}}}},controls:{type:"array",description:"Map control widgets",items:{type:"object",required:["type"],properties:{type:{type:"string",enum:["zoom","scale","fullscreen","geoLocate","mapTheme","mouseLocation","exportImage","layerSwitch"]},position:{type:"string",enum:["topleft","topright","bottomleft","bottomright","topcenter","bottomcenter"]},options:{type:"object"}}}},interactions:{type:"array",description:"Interactive elements (markers, popups, tooltips)",items:{oneOf:[{type:"object",required:["type","longitude","latitude"],properties:{type:{type:"string",const:"marker"},longitude:{type:"number"},latitude:{type:"number"},content:{type:"string"},draggable:{type:"boolean"}}},{type:"object",required:["type","longitude","latitude","content"],properties:{type:{type:"string",const:"popup"},longitude:{type:"number"},latitude:{type:"number"},content:{type:"string"},closeButton:{type:"boolean"}}},{type:"object",required:["type","content"],properties:{type:{type:"string",const:"tooltip"},content:{type:"string"},trigger:{type:"string",enum:["hover","click"]}}}]}},legends:{type:"array",description:"Legend configurations",items:{oneOf:[{type:"object",required:["type","labels","colors"],properties:{type:{type:"string",const:"categories"},title:{type:"string"},labels:{type:"array",items:{type:"string"}},colors:{type:"array",items:{type:"string"}}}},{type:"object",required:["type","labels","colors"],properties:{type:{type:"string",const:"ramp"},title:{type:"string"},labels:{type:"array",items:{type:"string"}},colors:{type:"array",items:{type:"string"}},isContinuous:{type:"boolean"}}},{type:"object",required:["type","labels"],properties:{type:{type:"string",const:"proportion"},title:{type:"string"},labels:{type:"array",items:{type:"array",items:{type:"number"}}},fillColor:{type:"string"}}},{type:"object",required:["type","items"],properties:{type:{type:"string",const:"icon"},title:{type:"string"},items:{type:"array",items:{type:"object",properties:{icon:{type:"string"},label:{type:"string"}}}}}}]}},responsive:{type:"object",properties:{breakpoint:{type:"number",default:768},mobile:{type:"object",properties:{controls:{type:"object",properties:{position:{type:"string"},scale:{type:"number"},hide:{type:"array",items:{type:"string"}}}},legends:{type:"object",properties:{compact:{type:"boolean"},position:{type:"string"}}},toolbar:{type:"object",required:["items","position"],properties:{items:{type:"array",items:{type:"string"}},position:{type:"string",enum:["bottom","top"]}}}}}}},events:{type:"object",description:"Global event identifier mappings for map and interactions",properties:{mapMove:{type:"string",description:"Event identifier for map move"},mapZoom:{type:"string",description:"Event identifier for map zoom"},markerDragEnd:{type:"string",description:"Event identifier for marker drag end"}}}}};function we({source:e,sourceType:t,sourceConfig:n,onClick:r,onMouseMove:o,onMouseEnter:a,onMouseLeave:s,onLayerCreated:l,...c}){const d=ye();if(!d)return null;const h={...c,type:"point",source:e,sourceType:t??"json",sourceConfig:n},f=r||o||a||s?{onClick:r,onMouseMove:o,onMouseEnter:a,onMouseLeave:s}:void 0;return i.jsx($e,{schema:h,scene:d,eventHandlers:f,onLayerCreated:l})}function He({source:e,sourceType:t,sourceConfig:n,onClick:r,onMouseMove:o,onMouseEnter:a,onMouseLeave:s,onLayerCreated:l,...c}){const d=ye();if(!d)return null;const h={...c,type:"line",source:e,sourceType:t??"json",sourceConfig:n},f=r||o||a||s?{onClick:r,onMouseMove:o,onMouseEnter:a,onMouseLeave:s}:void 0;return i.jsx($e,{schema:h,scene:d,eventHandlers:f,onLayerCreated:l})}function ot({source:e,sourceType:t,sourceConfig:n,onClick:r,onMouseMove:o,onMouseEnter:a,onMouseLeave:s,onLayerCreated:l,...c}){const d=ye();if(!d)return null;const h={...c,type:"polygon",source:e,sourceType:t??"geojson",sourceConfig:n},f=r||o||a||s?{onClick:r,onMouseMove:o,onMouseEnter:a,onMouseLeave:s}:void 0;return i.jsx($e,{schema:h,scene:d,eventHandlers:f,onLayerCreated:l})}function p0({source:e,sourceType:t,sourceConfig:n,onClick:r,onMouseMove:o,onMouseEnter:a,onMouseLeave:s,onLayerCreated:l,...c}){const d=ye();if(!d)return null;const h={...c,type:"heatmap",source:e,sourceType:t??"json",sourceConfig:n},f=r||o||a||s?{onClick:r,onMouseMove:o,onMouseEnter:a,onMouseLeave:s}:void 0;return i.jsx($e,{schema:h,scene:d,eventHandlers:f,onLayerCreated:l})}function f0({source:e,sourceType:t="json",sourceConfig:n,hexSize:r=100,weightField:o="h12",weightMethod:a="sum",onClick:s,onMouseMove:l,style:c,...d}){const h=[{type:"hexagon",size:r,field:o,method:a}];return i.jsx(p0,{...d,source:e,sourceType:t,sourceConfig:{...n,transforms:h},shape:"hexagonColumn",style:{coverage:.8,angle:0,...c??{}},onClick:s,onMouseMove:l})}function g0({source:e,sourceType:t,sourceConfig:n,onClick:r,...o}){const a=ye();if(!a)return null;const s={...o,type:"raster",source:e,sourceType:t??"raster",sourceConfig:n},l=r?{onClick:r}:void 0;return i.jsx($e,{schema:s,scene:a,eventHandlers:l})}function Wr({source:e,sourceType:t,sourceConfig:n,onClick:r,...o}){const a=ye();if(!a)return null;const s={...o,type:"image",source:e,sourceType:t??"image",sourceConfig:n},l=r?{onClick:r}:void 0;return i.jsx($e,{schema:s,scene:a,eventHandlers:l})}const Ur=[8,16,32,48,64],Qe={primary:"#2563eb",warning:"#f59e0b",error:"#ef4444",success:"#10b981"};function qr({source:e,sourceType:t="geojson",sourceConfig:n,labelField:r="name",labelColor:o="#0b3b8c",labelSize:a=12,showLabel:s=!0,labelOffset:l,sizeDomain:c,bubbleAnchor:d="bottom",labelAnchor:h="top",hoverEffect:f=!0,clickEffect:p=!0,tooltipEffect:g=!0,tooltipFields:m,tooltipTemplate:x,semanticColorField:v,color:L="#2563eb",size:k=16,sizeField:b,sizeValues:z,style:V,active:F,select:M,onClick:j,onMouseMove:T,onMouseEnter:H,onMouseLeave:Z,...E}){const N=v??E.colorField,y=E.colorValues??(v?[Qe.primary,Qe.warning,Qe.error,Qe.success]:void 0),w=b?z??[...Ur]:z,I={color:"#60a5fa"},R={color:"#1d4ed8"},_=(()=>{const q=E.events;return g?{...q,enablePopup:(q==null?void 0:q.enablePopup)??!0,popupFields:(q==null?void 0:q.popupFields)??m,popupTemplate:(q==null?void 0:q.popupTemplate)??x}:q})(),[$,G]=u.useState(!1);u.useEffect(()=>{const q=requestAnimationFrame(()=>G(!0));return()=>cancelAnimationFrame(q)},[]);const Q=s&&$,U=b?{sizeField:b,sizeValues:w}:{size:k};return i.jsxs(i.Fragment,{children:[i.jsx(we,{source:e,sourceType:t,sourceConfig:n,shape:"circle",color:L,colorField:N,colorValues:y,...U,opacity:.75,active:f?F??I:F,select:p?M??R:M,events:_,zIndex:E.zIndex??0,autoFit:E.autoFit,visible:E.visible,name:E.name??"bubble-circle",onClick:j,onMouseMove:T,onMouseEnter:H,onMouseLeave:Z,style:{stroke:L??"#004ac6",strokeWidth:2,strokeOpacity:1,...V??{}}}),Q&&i.jsx(we,{source:e,sourceType:t,sourceConfig:n,shapeField:r,shapeValues:"text",color:o,size:a,zIndex:(E.zIndex??0)+1,style:{textAnchor:h,textOffset:l??[0,0],stroke:"#fff",strokeWidth:2,textAllowOverlap:!0}})]})}function Yr({source:e,sourceType:t="geojson",sourceConfig:n,gridSize:r=60,minClusterSize:o=2,animationDuration:a=300,easing:s="cubic-bezier(0.4, 0, 0.2, 1)",onPointClick:l,onClusterClick:c}){const d=ye(),[h,f]=u.useState([]),[p,g]=u.useState(null),[m,x]=u.useState(null),v=u.useRef(null),L=u.useRef(-1),k=u.useMemo(()=>Jr(e,t,n),[e,t,n]);u.useEffect(()=>{if(k.length===0){v.current=null,f([]),L.current=-1;return}const M=new F0({radius:r,minPoints:o,maxZoom:20,minZoom:0}),j=k.map(T=>({type:"Feature",properties:{id:T.id,...T.properties},geometry:{type:"Point",coordinates:[T.lng,T.lat]}}));M.load(j),v.current=M,L.current=-1},[k,r,o]);const b=u.useCallback((M,j)=>{try{const T=Math.floor(j.getZoom());if(T===L.current)return;L.current=T;let H=[-180,-90,180,90];try{const N=j.getBounds();N&&(H=[N[0][0],N[0][1],N[1][0],N[1][1]])}catch{}const E=M.getClusters(H,T).map(N=>{const y=N.geometry.coordinates,w=y[0],I=y[1];return N.properties.cluster?{id:`cluster-${N.properties.cluster_id}`,clusterId:N.properties.cluster_id,lng:w,lat:I,pointCount:N.properties.point_count,isCluster:!0,properties:{}}:{id:`point-${N.properties.id}`,clusterId:-1,lng:w,lat:I,pointCount:1,isCluster:!1,properties:N.properties}});f(E),g(null)}catch{}},[]);u.useEffect(()=>{var H,Z;if(!d)return;const M=d.mapService,j=()=>{requestAnimationFrame(()=>{const E=v.current;E&&d.loaded&&b(E,d)})};d.loaded?j():d.once("loaded",j);const T=()=>{const E=v.current;E&&b(E,d)};return(H=M==null?void 0:M.on)==null||H.call(M,"camerachange",T),(Z=M==null?void 0:M.on)==null||Z.call(M,"viewchange",T),()=>{var E,N;d.off("loaded",j),(E=M==null?void 0:M.off)==null||E.call(M,"camerachange",T),(N=M==null?void 0:M.off)==null||N.call(M,"viewchange",T)}},[d,b]);const z=u.useCallback(M=>{if(!d||!M.isCluster)return;let j=[];const T=v.current;T&&(j=T.getLeaves(M.clusterId,1/0)),c==null||c(M,j);try{if(d.getZoom()>=20-.5){g(E=>E===M.id?null:M.id);return}if(j.length>0){const E=j.map(R=>R.geometry.coordinates),N=E.map(R=>R[0]),y=E.map(R=>R[1]),w=[Math.min(...N),Math.min(...y)],I=[Math.max(...N),Math.max(...y)];d.fitBounds([w,I],{padding:[40,40,40,40],duration:a})}}catch{}},[d,c,a]),V=u.useMemo(()=>{if(!d||!p||!v.current)return[];const M=h.find(j=>j.id===p&&j.isCluster);if(!M)return[];try{const j=v.current.getLeaves(M.clusterId,1/0),T=d.mapService;if(!T)return[];const H=T.lngLatToContainer([M.lng,M.lat]);if(!H)return[];const Z=j.length,E=Math.max(24,Math.min(72,18+Z*2));return j.map((N,y)=>{var $,G;const w=Math.PI*2*y/Z-Math.PI/2,I=H.x+Math.cos(w)*E,R=H.y+Math.sin(w)*E,_=T.containerToLngLat([I,R]);return{id:`spider-${M.id}-${(($=N.properties)==null?void 0:$.id)??y}`,lng:_.lng,lat:_.lat,point:{id:String(((G=N.properties)==null?void 0:G.id)??y),lng:N.geometry.coordinates[0],lat:N.geometry.coordinates[1],properties:N.properties??{}}}})}catch{return[]}},[d,p,h]),F=u.useMemo(()=>p?h.find(M=>M.id===p&&M.isCluster)??null:null,[p,h]);return i.jsxs(i.Fragment,{children:[p&&F&&V.map(M=>i.jsx(Pe,{longitude:M.lng,latitude:M.lat,anchor:"center",content:i.jsx(Xr,{centerLng:F.lng,centerLat:F.lat,lineLng:M.lng,lineLat:M.lat})},`line-${M.id}`)),h.map(M=>{var Z;if(!M.isCluster)return i.jsx(Pe,{longitude:M.lng,latitude:M.lat,anchor:"center",content:i.jsx("div",{title:String(((Z=M.properties)==null?void 0:Z.name)??"单点"),onClick:()=>{var E;return l==null?void 0:l({id:String(((E=M.properties)==null?void 0:E.id)??""),lng:M.lng,lat:M.lat,properties:M.properties})},style:{width:14,height:14,borderRadius:9999,background:"#2563eb",border:"2px solid #fff",boxShadow:"0 2px 10px rgba(37,99,235,.5), 0 0 0 3px rgba(37,99,235,.15)",transition:"transform 0.15s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.15s cubic-bezier(0.4, 0, 0.2, 1)",cursor:"pointer"}})},M.id);const j=M.pointCount,T=Gr(j),H=m===M.id;return i.jsx(Pe,{longitude:M.lng,latitude:M.lat,anchor:"center",content:i.jsxs("div",{title:`包含 ${j} 个要素`,onClick:()=>z(M),onMouseEnter:()=>x(M.id),onMouseLeave:()=>x(E=>E===M.id?null:E),style:{width:T.size,height:T.size,borderRadius:9999,display:"flex",alignItems:"center",justifyContent:"center",color:"#fff",fontWeight:T.fontWeight,fontSize:T.fontSize,background:T.background,border:T.border,boxShadow:T.shadow,position:"relative",cursor:"pointer",transition:"transform 0.15s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.15s cubic-bezier(0.4, 0, 0.2, 1)",transform:H?"scale(1.1)":"scale(1)"},children:[T.pulse&&i.jsx("span",{style:{position:"absolute",inset:-6,borderRadius:9999,background:"rgba(37,99,235,0.25)",animation:"aimapui-cluster-pulse 1.6s ease-out infinite"}}),i.jsx("span",{style:{position:"relative",zIndex:1},children:j})]})},M.id)}),V.map(M=>{var j;return i.jsx(Pe,{longitude:M.lng,latitude:M.lat,anchor:"center",content:i.jsx("div",{title:String(((j=M.point.properties)==null?void 0:j.name)??M.point.id),onClick:()=>l==null?void 0:l(M.point),style:{width:10,height:10,borderRadius:9999,background:"#fff",border:"2px solid #2563eb",boxShadow:"0 2px 8px rgba(0,0,0,.2)",cursor:"pointer"}})},M.id)})]})}function Xr({centerLng:e,centerLat:t,lineLng:n,lineLat:r}){const o=ye(),a=u.useRef(null);return u.useEffect(()=>{if(!o)return;const s=o.mapService;if(!s)return;const l=()=>{const h=a.current;if(h)try{const f=s.lngLatToContainer([e,t]),p=s.lngLatToContainer([n,r]);if(!f||!p)return;const g=p.x-f.x,m=p.y-f.y,x=Math.sqrt(g*g+m*m),v=Math.atan2(m,g)*180/Math.PI;h.style.width=`${x}px`,h.style.transform=`rotate(${v}deg)`}catch{}};l();const c=(h,f,p)=>{var g;try{(g=h==null?void 0:h.on)==null||g.call(h,f,p)}catch{}},d=(h,f,p)=>{var g;try{(g=h==null?void 0:h.off)==null||g.call(h,f,p)}catch{}};return c(s,"camerachange",l),c(s,"viewchange",l),()=>{d(s,"camerachange",l),d(s,"viewchange",l)}},[o,e,t,n,r]),i.jsx("div",{ref:a,style:{position:"absolute",left:0,top:0,height:1,background:"rgba(195, 198, 215, 0.5)",transformOrigin:"0 50%",pointerEvents:"none"}})}function Gr(e){return e>=1e3?{size:48,fontSize:14,fontWeight:700,background:"linear-gradient(135deg, #2563eb 0%, #1e3a8a 100%)",border:"2px solid rgba(255,255,255,0.55)",shadow:"0 10px 24px rgba(37,99,235,.45)",pulse:!0}:e>=100?{size:40,fontSize:13,fontWeight:700,background:"rgba(37,99,235,0.30)",border:"2px solid rgba(255,255,255,0.5)",shadow:"0 6px 16px rgba(37,99,235,.25)",pulse:!1}:{size:32,fontSize:12,fontWeight:600,background:"radial-gradient(circle, #2563eb 60%, rgba(37,99,235,0.20) 61%)",border:"1px solid rgba(255,255,255,0.55)",shadow:"0 4px 12px rgba(37,99,235,.2)",pulse:!1}}function Jr(e,t,n){if(!e)return[];if(t==="geojson"&&typeof e=="object"&&e!==null){const r=e;return(Array.isArray(r.features)?r.features:[]).map((a,s)=>{var d,h,f;const l=a,c=(d=l==null?void 0:l.geometry)==null?void 0:d.coordinates;return!Array.isArray(c)||c.length<2?null:{id:String(((h=l==null?void 0:l.properties)==null?void 0:h.id)??((f=l==null?void 0:l.properties)==null?void 0:f.Id)??s),lng:Number(c[0]),lat:Number(c[1]),properties:(l==null?void 0:l.properties)??{}}}).filter(Boolean)}if(Array.isArray(e)){const r=(n==null?void 0:n.x)??"lng",o=(n==null?void 0:n.y)??"lat";return e.map((a,s)=>{const l=a,c=Number(l[r]),d=Number(l[o]);return Number.isNaN(c)||Number.isNaN(d)?null:{id:String(l.id??s),lng:c,lat:d,properties:l}}).filter(Boolean)}return[]}const Kr=["#dbeafe","#93c5fd","#60a5fa","#3b82f6","#2563eb"],Qr=["#dc2626","#fca5a5","#e5e7eb","#86efac","#16a34a"],eo=["#2563eb","#f59e0b","#ef4444","#10b981","#8b5cf6","#14b8a6","#f97316","#64748b"];function to({source:e,sourceType:t="geojson",colorMapping:n="sequential",showStroke:r=!0,strokeColor:o="rgba(255,255,255,0.30)",strokeWidth:a=.5,hoverEffect:s=!0,clickEffect:l=!0,stickySelection:c=!0,tooltipEffect:d=!0,tooltipFields:h,tooltipTemplate:f,regionIdField:p="name",highlightStrokeColor:g="#2563eb",highlightStrokeWidth:m=2,zoomToRegionOnClick:x=!0,clickZoomPadding:v=40,clickZoomDelta:L=1.2,onRegionClick:k,onDrilldown:b,onLayerCreated:z,showLabel:V=!1,labelField:F="name",labelColor:M="#0f172a",labelSize:j=11,labelAreaThreshold:T=5e-5,labelHaloWidth:H=2,minLabelZoom:Z,valueField:E,percentageField:N,nameField:y,color:w,colorField:I,colorValues:R,active:_,select:$,events:G,style:Q,...U}){const q=ye(),[ee,D]=u.useState(null),[B,le]=u.useState(null),[se,J]=u.useState(()=>{if(!q)return 0;try{return q.getZoom()}catch{return 0}});u.useEffect(()=>{if(!q)return;const W=()=>{try{J(q.getZoom())}catch{}};return W(),q.on("zoomchange",W),()=>{q.off("zoomchange",W)}},[q]);const ie=Z===void 0||se>=Z,A=u.useMemo(()=>{if(R)return R;switch(n){case"diverging":return[...Qr];case"categorical":return[...eo];case"sequential":default:return[...Kr]}},[R,n]),C=E??I??"value",P=y??F,S=u.useMemo(()=>f??no(P,C,N),[f,P,C,N]),K={color:"#ffffff"},O={color:"#0f172a"},Y=u.useMemo(()=>ro(e,t,F,p,T),[e,t,F,p,T]),te=u.useCallback(W=>{k==null||k(W);const ae=l1(W.feature,p);if(ae!==null&&l&&le(ue=>!c&&ue===ae?null:ae),W.feature&&(b==null||b(W.feature)),!q||!x)return;const de=Number.isFinite(W.lng)&&Number.isFinite(W.lat)?[W.lng,W.lat]:so(W.originalEvent);if(de)try{const ue=q.getZoom(),me=Math.abs(L);q.setCenter(de),q.setZoom(ue+me)}catch{}},[k,p,l,c,b,q,x,L]),oe=u.useCallback(W=>{if(!s)return;const ae=l1(W.feature,p);D(ae)},[s,p]),X=u.useCallback(()=>{s&&D(null)},[s]),ne=u.useMemo(()=>{const W=G;return d?{...W,enablePopup:(W==null?void 0:W.enablePopup)??!0,popupTrigger:(W==null?void 0:W.popupTrigger)??"hover",popupFields:(W==null?void 0:W.popupFields)??h,popupTemplate:(W==null?void 0:W.popupTemplate)??S}:W},[G,d,h,S]);return i.jsxs(i.Fragment,{children:[i.jsx(ot,{...U,source:e,sourceType:t,shape:U.shape??"fill",color:w??"#2563eb",colorField:I,colorValues:A,active:s?_??K:_,select:l?$??O:$,events:ne,onClick:te,onMouseEnter:oe,onMouseLeave:X,onLayerCreated:z,style:{opacity:.8,...Q??{}}}),r&&i.jsx(He,{source:e,sourceType:t,color:o,size:a,zIndex:2}),s&&ee!==null&&i.jsxs(i.Fragment,{children:[i.jsx(He,{source:e,sourceType:t,color:a1(g,.35),size:m+2,filterField:p,filterValues:[ee],zIndex:3}),i.jsx(He,{source:e,sourceType:t,color:g,size:m,filterField:p,filterValues:[ee],zIndex:4})]}),l&&B!==null&&i.jsx(He,{source:e,sourceType:t,color:a1(g,.9),size:Math.max(1.5,m),filterField:p,filterValues:[B],zIndex:5}),V&&ie&&i.jsx(we,{source:Y.data,sourceType:Y.sourceType,sourceConfig:Y.sourceConfig,shapeField:F,shapeValues:"text",color:M,size:j,style:{textAllowOverlap:!1,stroke:"#ffffff",strokeWidth:H,fontFamily:"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, Liberation Mono, Courier New, monospace"}})]})}function no(e,t,n){const r=n?`<tr><td style="padding-right:8px;color:#64748b">占比</td><td style="font-weight:600">{{${n}}}%</td></tr>`:"";return['<div style="min-width:160px">',`<div style="font-weight:700;margin-bottom:6px">{{${e}}}</div>`,'<table style="font-size:12px;line-height:1.4">',`<tr><td style="padding-right:8px;color:#64748b">指标</td><td style="font-weight:600">{{${t}}}</td></tr>`,r,"</table>","</div>"].join("")}function a1(e,t){if(e.startsWith("#")){const n=e.replace("#",""),r=n.length===3?`${n[0]}${n[0]}${n[1]}${n[1]}${n[2]}${n[2]}`:n;if(r.length===6){const o=parseInt(r.slice(0,2),16),a=parseInt(r.slice(2,4),16),s=parseInt(r.slice(4,6),16);return`rgba(${o},${a},${s},${t})`}}return e}function l1(e,t){if(!e)return null;const n=e[t]??e.id??e.name;return typeof n=="string"||typeof n=="number"?n:null}function ro(e,t,n,r,o){return t!=="geojson"||!oo(e)?{data:e,sourceType:t}:{data:e.features.map(s=>{if(!s||!s.geometry||!s.properties)return null;const l=m0(s.geometry),c=ao(s.geometry);if(!l||c<o)return null;const d=s.properties;return{lng:l[0],lat:l[1],[n]:d[n],[r]:d[r]}}).filter(s=>s!==null),sourceType:"json",sourceConfig:{x:"lng",y:"lat"}}}function oo(e){if(!e||typeof e!="object")return!1;const t=e;return t.type==="FeatureCollection"&&Array.isArray(t.features)}function so(e){const t=io(e);return t?m0(t):null}function io(e){var n,r;const t=e;return((n=t==null?void 0:t.feature)==null?void 0:n.geometry)??((r=t==null?void 0:t.data)==null?void 0:r.geometry)??null}function m0(e){if(e.type==="Polygon")return c1(e.coordinates[0]);if(e.type==="MultiPolygon"){let t=0,n=null;return e.coordinates.forEach(r=>{const o=r[0],a=Math.abs(mt(o));a>t&&(t=a,n=c1(o))}),n}return null}function ao(e){return e.type==="Polygon"?Math.abs(mt(e.coordinates[0])):e.type==="MultiPolygon"?e.coordinates.reduce((t,n)=>t+Math.abs(mt(n[0])),0):0}function c1(e){if(!e||e.length<3)return null;let t=0,n=0,r=0;for(let a=0;a<e.length-1;a+=1){const[s,l]=e[a],[c,d]=e[a+1],h=s*d-c*l;t+=h,n+=(s+c)*h,r+=(l+d)*h}const o=t/2;if(Math.abs(o)<1e-12){const a=e[0];return a?[a[0],a[1]]:null}return[n/(6*o),r/(6*o)]}function mt(e){if(!e||e.length<3)return 0;let t=0;for(let n=0;n<e.length-1;n+=1){const[r,o]=e[n],[a,s]=e[n+1];t+=r*s-a*o}return t/2}const y0=["#eff6ff","#bfdbfe","#60a5fa","#2563eb","#1d4ed8","#1e3a8a"],x0="https://mdn.alipayobjects.com/antforest/afts/file/A*T2OJQ7XZzeEAAAAAgCAAAAgAerd2AQ/original_中国_省.json",C0="https://mdn.alipayobjects.com/antforest/afts/file/A*Xd8TQoduwj8AAAAAgEAAAAgAerd2AQ/original_中国_市.json",v0="https://mdn.alipayobjects.com/portal_moelhz/afts/file/A*Rb96Tac1p8EAAAAAgKAAAAgAegAAAQ",lo=u.forwardRef(function(t,n){const{provinceSource:r=x0,citySource:o=C0,districtSource:a=v0,level:s="province",drillEnabled:l=!0,drillPath:c,onDrill:d,onDrillUp:h,autoFitOnDrill:f=!0,data:p,joinField:g="name",dataJoinField:m="name",valueField:x="value",colors:v=[...y0],fillOpacity:L=.8,strokeColor:k="rgba(255,255,255,0.5)",strokeWidth:b=1.5,dimOpacity:z=.12,showLabel:V=!0,labelField:F="name",labelSize:M=12,hoverHighlight:j=!0,clickSelect:T=!0,showTooltip:H=!0,tooltipFields:Z,onRegionClick:E,zIndex:N=0}=t,y=ye(),[w,I]=u.useState(null),[R,_]=u.useState(null),[$,G]=u.useState(null),[Q,U]=u.useState(null),[q,ee]=u.useState([{level:"province",name:"中国"}]),D=c??q,B=l?uo(D):s,le=u.useCallback(()=>{if(D.length<=1)return;const X=D.slice(0,-1);c?h==null||h(X):(ee(X),h==null||h(X),d==null||d(X)),ie(null)},[D,c,h,d]),se=u.useCallback(X=>{if(X<0||X>=D.length-1)return;const ne=D.slice(0,X+1);c?h==null||h(ne):(ee(ne),h==null||h(ne),d==null||d(ne)),ie(null)},[D,c,h,d]),[J,ie]=u.useState(null);u.useImperativeHandle(n,()=>({drillUp:le,drillUpTo:se,getDrillPath:()=>D}),[le,se,D]);const A=u.useRef(D.length);u.useEffect(()=>{ct(r,I,U)},[r]),u.useEffect(()=>{o&&ct(o,_)},[o]),u.useEffect(()=>{a&&ct(a,G)},[a]);const C=u.useMemo(()=>{switch(B){case"city":return R;case"district":return $;default:return w}},[B,w,R,$]),P=u.useMemo(()=>!C||!p||p.length===0?C:mo(C,p,g,m,x),[C,p,g,m,x]),S=u.useMemo(()=>{if(!l||D.length<=1)return P;if(!P)return null;const X=D[D.length-1];return!X.adcode&&!X.name?P:xo(P,X)},[l,D,P,g]),K=u.useMemo(()=>!l||D.length<=1?null:(D.length===2?w:R)??null,[l,D,w,R]);u.useMemo(()=>`<div style="min-width:140px"><table style="font-size:12px;line-height:1.6">${(Z??[F,x]).map(W=>`<tr><td style="padding-right:8px;color:#64748b">${W}</td><td style="font-weight:600">{{${W}}}</td></tr>`).join("")}</table></div>`,[Z,F,x]);const O=!!(p&&p.length>0),Y=u.useMemo(()=>P?S??P:null,[S,P]),te=B==="province"?b:b*.6;u.useEffect(()=>{if(!(!f||!y||!Y||A.current===D.length)){A.current=D.length;try{const ne=Lo(Y);ne&&y.fitBounds(ne,{padding:[40,40,40,40]})}catch{}}},[f,y,Y,D.length]);const oe=u.useCallback(X=>{const ne=X.feature;if(!ne)return;const W=String(ne[F]??ne.name??""),ae=ne.adcode??ne.gb;if(E==null||E(ne,B),T&&ie(de=>de===W?null:W),l&&ho(B)){const de=[...D,{level:B,name:W,adcode:ae}];c||ee(de),d==null||d(de),ie(null)}},[F,B,T,l,D,c,d,E]);return!y||!Y?null:i.jsxs(i.Fragment,{children:[l&&K&&D.length>1&&i.jsxs(i.Fragment,{children:[i.jsx(ot,{source:K,sourceType:"geojson",shape:"fill",color:"#94a3b8",style:{opacity:z},zIndex:N}),i.jsx(He,{source:K,sourceType:"geojson",color:"rgba(148,163,184,0.2)",size:.5,zIndex:N+1})]}),i.jsx(ot,{source:Y,sourceType:"geojson",shape:"fill",...O?{colorField:x,colorValues:v}:{color:v[2]??"#3b82f6"},active:j?{color:"#ffffff"}:void 0,select:T?{color:"#0f172a"}:void 0,style:{opacity:L},onClick:oe,zIndex:N+2}),i.jsx(He,{source:Y,sourceType:"geojson",color:k,size:te,zIndex:N+3}),Q&&B==="province"&&D.length<=1&&i.jsx(He,{source:Q,sourceType:"geojson",color:"#94a3b8",size:1,zIndex:N+3}),V&&Y&&i.jsx(co,{geoData:Y,labelField:F,labelSize:M,zIndex:N+4})]})});function co({geoData:e,labelField:t,labelSize:n,zIndex:r}){const o=u.useMemo(()=>Co(e,t),[e,t]);return!o||o.data.length===0?null:i.jsx(we,{source:o.data,sourceType:o.sourceType,sourceConfig:o.sourceConfig,shapeField:t,shapeValues:"text",color:"#0f172a",size:n,style:{textAllowOverlap:!1,stroke:"#ffffff",strokeWidth:2,fontFamily:"PingFang SC, Microsoft YaHei, sans-serif"},zIndex:r})}function uo(e){return e.length<=1?"province":e.length===2?"city":"district"}function ho(e){return e!=="district"}const po=new Set(["境界线","边界线","九段线","十段线"]);function fo(e){var n,r,o;const t=(n=e.properties)==null?void 0:n.name;if(typeof t!="string")return!1;if(t==="九段线"||t==="十段线")return!0;if(t==="境界线"){const a=(r=e.geometry)==null?void 0:r.type;if(a!=="MultiLineString"&&a!=="LineString")return!1;const s=(o=e.geometry)==null?void 0:o.coordinates;if(!s)return!1;const l=a==="MultiLineString"?s.flat():s;if(Math.min(...l.map(d=>d[1]))<10)return!0}return!1}function go(e){var r,o;const t=(r=e.properties)==null?void 0:r.name;if(!t||typeof t!="string"||po.has(t))return!1;const n=(o=e.geometry)==null?void 0:o.type;return!(n==="LineString"||n==="MultiLineString")}function u1(e){const t=[],n=[];for(const r of e.features)fo(r)?n.push(r):go(r)&&t.push(r);return{admin:{type:"FeatureCollection",features:t},dashLine:n.length>0?{type:"FeatureCollection",features:n}:null}}function ct(e,t,n){if(typeof e=="string")fetch(e).then(r=>r.json()).then(r=>{if(r&&r.type==="FeatureCollection"){const o=u1(r);t(o.admin),n==null||n(o.dashLine)}}).catch(()=>{});else if(e&&e.type==="FeatureCollection"){const r=u1(e);t(r.admin),n==null||n(r.dashLine)}}function mo(e,t,n,r,o){const a=new Map;for(const l of t){const c=String(l[r]??"");c&&a.set(c,l)}return{type:"FeatureCollection",features:e.features.map(l=>{const c=String(l.properties[n]??""),d=a.get(c),h=d?d[o]??d.value??0:0;return{...l,properties:{...l.properties,...d??{},[o]:h}}})}}function d1(e){const t=String(e);return t.startsWith("156")&&t.length>=9?t.slice(3):t}const yo=["省","市","自治区","特别行政区","壮族","回族","维吾尔","藏族","彝族","苗","侗","瑶","白","哈尼","傣","傈僳","佤","畲","拉祜","水","景颇","土家","羌","毛南","仫佬","布朗","撒拉","裕固","塔吉克","柯尔克孜","锡伯","达斡尔","鄂温克","鄂伦春","赫哲","德昂","门巴","珞巴","基诺","怒","保安","京","独龙","仡佬","阿昌","普米"];function ut(e){let t=e;for(const n of yo)if(t.endsWith(n)){t=t.slice(0,-n.length);break}return t}function xo(e,t,n){const r=t.name,o=t.adcode,s=t.level==="province"?2:4;return{type:"FeatureCollection",features:e.features.filter(c=>{const d=c.properties;if(d.parent&&String(d.parent)===r||d.parentName&&String(d.parentName)===r)return!0;const h=d.adcode??d.gb;if(o&&h){const p=d1(String(o)),g=d1(String(h));if(g.length>=s&&g.slice(0,s)===p.slice(0,s)&&g!==p)return!0}const f=ut(r);return!!(d.province&&(String(d.province)===r||ut(String(d.province))===f)||d.city&&(String(d.city)===r||ut(String(d.city))===f))})}}function Co(e,t){const n=[];for(const r of e.features){if(!r.geometry||!r.properties)continue;const o=vo(r.geometry);o&&n.push({lng:o[0],lat:o[1],[t]:r.properties[t]??r.properties.name??""})}return n.length===0?null:{data:n,sourceType:"json",sourceConfig:{x:"lng",y:"lat"}}}function vo(e){const t=e.type,n=e.coordinates;if(!n)return null;if(t==="Point")return n;if(t==="Polygon")return h1(n);if(t==="MultiPolygon"){const r=n;let o=0,a=null;for(const s of r){const l=Math.abs(bo(s[0]));l>o&&(o=l,a=h1(s))}return a}return null}function h1(e){const t=e[0];if(!t||t.length===0)return null;let n=0,r=0;const o=t.length;for(const a of t)n+=a[0],r+=a[1];return[n/o,r/o]}function bo(e){let t=0;const n=e.length;for(let r=0;r<n;r++){const o=(r+1)%n;t+=e[r][0]*e[o][1],t-=e[o][0]*e[r][1]}return t/2}function Lo(e){let t=1/0,n=1/0,r=-1/0,o=-1/0;for(const a of e.features)wo(a.geometry,(s,l)=>{s<t&&(t=s),l<n&&(n=l),s>r&&(r=s),l>o&&(o=l)});return!isFinite(t)||!isFinite(n)?null:[[t,n],[r,o]]}function wo(e,t){const n=e.type,r=e.coordinates;if(r){if(n==="Point"){const[o,a]=r;t(o,a)}else if(n==="LineString"||n==="MultiPoint")for(const[o,a]of r)t(o,a);else if(n==="Polygon"||n==="MultiLineString")for(const o of r)for(const[a,s]of o)t(a,s);else if(n==="MultiPolygon")for(const o of r)for(const a of o)for(const[s,l]of a)t(s,l)}}const Mo=[["sunny",""],["cloud",""],["cloudy",""],["partly_cloudy_day",""],["partly_cloudy_night",""],["rainy",""],["rainy_heavy",""],["rainy_light",""],["rainy_snow",""],["thunderstorm",""],["foggy",""],["air",""],["water_drop",""],["ac_unit",""],["filter_drama",""],["cloudy_snowing",""],["snowing",""],["snowflake",""],["severe_cold",""],["umbrella",""],["storm",""],["tornado",""],["thermostat",""],["heat",""],["hot",""],["flight",""],["flight_takeoff",""],["flight_land",""],["train",""],["directions_transit",""],["directions_railway",""],["directions_bus",""],["directions_car",""],["directions_boat",""],["directions_bike",""],["directions_walk",""],["directions_run",""],["taxi",""],["local_taxi",""],["local_airport",""],["connecting_airports",""],["two_wheeler",""],["tram",""],["subway",""],["ferry",""],["cable_car",""],["ev_station",""],["local_gas_station",""],["location_on",""],["place",""],["room",""],["pin",""],["pin_drop",""],["near_me",""],["my_location",""],["gps_fixed",""],["navigation",""],["explore",""],["map",""],["restaurant",""],["local_cafe",""],["coffee",""],["local_bar",""],["hotel",""],["local_hospital",""],["local_pharmacy",""],["local_atm",""],["local_police",""],["local_fire_department",""],["local_post_office",""],["local_library",""],["local_mall",""],["local_grocery_store",""],["store",""],["school",""],["church",""],["mosque",""],["synagogue",""],["temple_buddhist",""],["temple_hindu",""],["museum",""],["castle",""],["stadium",""],["theater_comedy",""],["pool",""],["fitness_center",""],["spa",""],["park",""],["forest",""],["attractions",""],["celebration",""],["festival",""],["nightlife",""],["sports",""],["sports_soccer",""],["sports_basketball",""],["sports_football",""],["sports_tennis",""],["sports_golf",""],["layers",""],["layers_clear",""],["terrain",""],["landscape",""],["share",""],["favorite",""],["star",""],["home",""],["work",""],["person",""],["people",""],["trip",""],["warning",""],["emergency",""],["photo_camera",""],["shopping_bag",""],["search",""],["settings",""],["info",""],["help",""],["close",""],["check",""],["add",""],["remove",""],["edit",""],["delete",""],["refresh",""],["download",""],["upload",""],["visibility",""],["visibility_off",""]],p1="Material Symbols Outlined",ko="https://fonts.gstatic.com/s/materialsymbolsoutlined/v261/kJEhBvYX7BgnkSrUwT8OhrdQw4oELdPIeeII9v6oFsI.woff2",So="M16 0C7.16344 0 0 7.16344 0 16C0 24.8366 16 40 16 40C16 40 32 24.8366 32 16C32 7.16344 24.8366 0 16 0Z";function zo(e){const t=`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 40"><path d="${So}" fill="${e}" stroke="white" stroke-width="1.5"/></svg>`;return`data:image/svg+xml,${encodeURIComponent(t)}`}function jo({source:e,sourceType:t="json",sourceConfig:n,iconField:r,iconFontFamily:o="material-symbols",iconFontPath:a,iconFontMap:s,iconColor:l="#3b82f6",iconSize:c=20,iconHaloColor:d="#fff",iconHaloWidth:h=1,iconStyle:f,iconAnchor:p="center",iconBgShape:g="pin",iconBgShapeColor:m,iconBgShapeSize:x=24,iconBgStrokeColor:v,iconBgStrokeWidth:L=0,iconBgPadding:k=0,iconBgCornerRadius:b=0,showLabel:z=!0,labelField:V,labelColor:F="#333",labelSize:M=11,labelAnchor:j="top",labelOffset:T=[0,0],labelHaloColor:H="#fff",labelHaloWidth:Z=2,labelStyle:E,textAllowOverlap:N=!1,iconAllowOverlap:y=!0,zoomAdaption:w=!0,zoomShowLabel:I=14,zoomDegradeToPoint:R=10,onClick:_,onMouseEnter:$,onMouseLeave:G,...Q}){const U=ye(),[q,ee]=u.useState(!1),[D,B]=u.useState(!1),[le,se]=u.useState(!1),[J,ie]=u.useState(14),A=u.useRef(!1);u.useEffect(()=>{if(!U||g!=="pin"||!m)return;const te=zo(m);U.addImage("glyph-pin-bg",te),se(!0)},[U,g,m]);const{fontFamily:C,fontPath:P,iconMappings:S}=u.useMemo(()=>{switch(o){case"material-symbols":return{fontFamily:p1,fontPath:ko,iconMappings:Mo};default:return{fontFamily:o,fontPath:a??null,iconMappings:s??[]}}},[o,a,s]);if(u.useEffect(()=>{if(!U||A.current)return;A.current=!0;let te=!1;return(async()=>{P&&U.addFontFace(C,P),S.length>0&&U.addIconFonts(S);try{if(C===p1){const X=S.slice(0,10).map(([,ne])=>String.fromCharCode(parseInt(ne.replace("&#x","").replace(";",""),16))).join("");await document.fonts.load(`${c}px "${C}"`,X)}else P&&await new Promise(X=>{const ne=setTimeout(()=>{X()},3e3),W=()=>{clearTimeout(ne),U.off("fontloaded",W),X()};U.on("fontloaded",W),document.fonts.load(`${c}px "${C}"`).then(()=>{clearTimeout(ne),U.off("fontloaded",W),X()}).catch(()=>{clearTimeout(ne),U.off("fontloaded",W),X()})})}catch{console.warn(`[GlyphLayer] 字体 "${C}" 加载超时,尝试继续渲染`)}try{const ne=`${c}px "${C}"`;document.fonts.check(ne,"X")||await document.fonts.ready}catch{}te||ee(!0)})(),()=>{te=!0}},[U,C,P,S,c]),u.useEffect(()=>{if(!U)return;const te=()=>B(!0);return U.loaded?te():U.on("loaded",te),()=>{U.off("loaded",te)}},[U]),u.useEffect(()=>{if(!U||!w)return;const te=()=>{ie(U.getZoom())};return te(),U.on("zoomchange",te),()=>{U.off("zoomchange",te)}},[U,w]),!q||!D||g==="pin"&&m&&!le)return null;const K=V??r,O=!w||J>=I;return w&&J<R?i.jsx(we,{source:e,sourceType:t,sourceConfig:n,shape:"circle",color:typeof l=="string"?l:"#3b82f6",size:4,style:{opacity:.7}}):i.jsxs(i.Fragment,{children:[i.jsx(we,{...Q,source:e,sourceType:t,sourceConfig:n,shapeField:r,shapeValues:"text",color:l,size:c,style:{fontFamily:C,iconfont:!0,textAllowOverlap:y,textAnchor:p,backgroundColor:m,backgroundPadding:k,backgroundRadius:b,backgroundShape:g==="pin"?void 0:"circle",stroke:v,strokeWidth:L,...f??{}},onClick:_,onMouseEnter:$,onMouseLeave:G}),z&&O&&i.jsx(we,{source:e,sourceType:t,sourceConfig:n,shapeField:K,shapeValues:"text",color:F,size:M,style:{textAnchor:j,textOffset:T,stroke:H,strokeWidth:Z,fontWeight:"500",textAllowOverlap:N,...E??{}}})]})}function b0({source:e,sourceType:t="json",sourceConfig:n,iconField:r,iconMap:o,iconSize:a=24,iconAnchor:s="bottom",size:l,showLabel:c=!0,labelField:d,labelColor:h="#333",labelSize:f=12,labelAnchor:p="top",labelOffset:g=[0,0],labelHaloColor:m="#fff",labelHaloWidth:x=2,labelStyle:v,textAllowOverlap:L=!1,iconAllowOverlap:k=!0,zoomAdaption:b=!0,zoomShowLabel:z=15,zoomDegradeToPoint:V=10,onClick:F,onMouseEnter:M,onMouseLeave:j,...T}){const H=ye(),[Z,E]=u.useState(!1),[N,y]=u.useState(15),w=u.useMemo(()=>Object.keys(o),[o]),I=l??a,R=d??r;if(u.useEffect(()=>{H&&(w.forEach(G=>{H.addImage(G,o[G])}),E(!0))},[H,w,o]),u.useEffect(()=>{if(!H||!b)return;const G=()=>{y(H.getZoom())};return G(),H.on("zoomchange",G),()=>{H.off("zoomchange",G)}},[H,b]),!Z)return null;const _=!b||N>=z;return b&&N<V?i.jsx(we,{source:e,sourceType:t,sourceConfig:n,shape:"circle",color:T.color??"#3b82f6",size:6,style:{opacity:.8}}):i.jsxs(i.Fragment,{children:[i.jsx(we,{source:e,sourceType:t,sourceConfig:n,shapeField:r,shapeValues:w,size:I,style:{...T.style??{},anchor:s,allowOverlap:k},onClick:F,onMouseEnter:M,onMouseLeave:j}),c&&_&&i.jsx(we,{source:e,sourceType:t,sourceConfig:n,shapeField:R,shapeValues:"text",color:h,size:f,style:{textAnchor:p,textOffset:g,stroke:m,strokeWidth:x,fontWeight:"500",textAllowOverlap:L,...v??{}}})]})}const Ho={gaode:()=>"https://webst0{1-4}.is.autonavi.com/appmaptile?style=6&x={x}&y={y}&z={z}",google:()=>"https://gwxc.shipxy.com/tile.g?z={z}&x={x}&y={y}",tianditu:(e="4043dde46add842282bacc412299311d")=>`https://t{0-7}.tianditu.gov.cn/DataServer?T=img_w&X={x}&Y={y}&L={z}&tk=${e}`},Vo={gaode:"高德卫星",tianditu:"天地图卫星",google:"谷歌卫星"};function Eo({provider:e="gaode",zIndex:t=0,opacity:n=1,tiandituToken:r,visible:o=!0}){if(!o)return null;const a=Ho[e](r);return i.jsx(g0,{source:a,sourceType:"rasterTile",sourceConfig:{parser:{type:"rasterTile",tileSize:256,zoomOffset:1}},zIndex:t,opacity:n})}function Ao({source:e,sourceType:t="json",sourceConfig:n,shape:r="arc",color:o="#2563EB",gradientColors:a,colorMode:s="single",colorField:l,colorValues:c,lineWidth:d=1.5,lineWidthRange:h,weightField:f="weight",opacity:p=.8,blur:g=.6,animate:m=!1,animateSpeed:x=1,animateTrailLength:v=.3,animateDuration:L=2e3,showNodes:k=!0,nodeColor:b,nodeSize:z=4,nodeSizeRange:V,nodePulse:F=!1,showTooltip:M=!0,showNodePopup:j=!0,activeColor:T="#FFD93D",onArcHover:H,onArcClick:Z,onNodeClick:E,style:N}){const y=u.useMemo(()=>n??{x:"fromLng",y:"fromLat",x1:"toLng",y1:"toLat"},[n]),w=u.useMemo(()=>s==="gradient"&&a?a:o,[s,a,o]),I=u.useMemo(()=>d,[d,h]),R=u.useMemo(()=>{if(m)return{enable:!0,speed:x,duration:L,trailLength:v}},[m,x,L,v]),_=u.useMemo(()=>({opacity:p,blur:g,...N}),[p,g,N]),$=u.useMemo(()=>{if(!k||typeof e=="string")return[];const se=new Map,J=y.x??"fromLng",ie=y.y??"fromLat",A=y.x1??"toLng",C=y.y1??"toLat";return e.forEach(P=>{const S=`${P[J]}_${P[ie]}`,K=`${P[A]}_${P[C]}`;se.has(S)||se.set(S,{lng:Number(P[J]),lat:Number(P[ie]),degree:0,name:P.fromName}),se.has(K)||se.set(K,{lng:Number(P[A]),lat:Number(P[C]),degree:0,name:P.toName}),se.get(S).degree++,se.get(K).degree++}),Array.from(se.values())},[e,k,y]),G=b??o,[Q,U]=u.useState({visible:!1,lng:0,lat:0,from:"",to:"",weight:0}),q=u.useCallback(se=>{if(H==null||H(se),!M)return;const J=se.feature;J&&U({visible:!0,lng:se.lng,lat:se.lat,from:String(J.fromName??""),to:String(J.toName??""),weight:Number(J[f]??0)})},[H,M,f]),ee=u.useCallback(()=>{U(se=>({...se,visible:!1}))},[]),[D,B]=u.useState({visible:!1,lng:0,lat:0,name:"",degree:0}),le=u.useCallback(se=>{if(E==null||E(se),!j)return;const J=se.feature;J&&B({visible:!0,lng:se.lng,lat:se.lat,name:String(J.name??""),degree:Number(J.degree??0)})},[E,j]);return i.jsxs(i.Fragment,{children:[i.jsx(He,{source:e,sourceType:t,sourceConfig:y,shape:r,color:w,colorField:s==="field"?l:void 0,colorValues:s==="field"?c:void 0,size:I,sizeField:h?f:void 0,sizeValues:h||void 0,animate:R,active:T?{color:T}:!1,style:_,onMouseMove:q,onMouseLeave:ee,onClick:Z}),k&&$.length>0&&i.jsx(we,{source:$,sourceConfig:{x:"lng",y:"lat"},color:G,size:z,sizeField:V?"degree":void 0,sizeValues:V,shape:"circle",style:{opacity:.9,strokeWidth:1,stroke:"#fff"},animate:F?{enable:!0,speed:.6}:void 0,active:T?{color:T}:!1,onClick:le}),M&&Q.visible&&i.jsx(wt,{longitude:Q.lng,latitude:Q.lat,visible:!0,variant:"dark",items:[{label:"起点",value:Q.from},{label:"终点",value:Q.to},{label:"流量",value:Q.weight}]}),j&&D.visible&&i.jsx(qe,{longitude:D.lng,latitude:D.lat,content:`<div style="min-width:80px"><div style="font-weight:700;font-size:13px;margin-bottom:4px">${D.name||"节点"}</div><div style="font-size:12px;color:#64748b">连接数: ${D.degree}</div></div>`,closeButton:!0,size:"compact",onClose:()=>B(se=>({...se,visible:!1}))})]})}function Zo({path:e,segments:t,stops:n=[],routeType:r="straight",onRouteQuery:o,onRouteResult:a,color:s="#2563eb",lineWidth:l=4,opacity:c=.9,glow:d=!0,animate:h=!1,animateSpeed:f=1,stopSize:p=14,stopColor:g,endColor:m="#10b981",showStopIndex:x=!0,stopRenderer:v="point",stopMarkerVariant:L="circle",stopIconMap:k,stopIconField:b="iconValue",stopIconSize:z=16,stopIconAnchor:V="bottom",showStopPopup:F=!0,activeColor:M="#fbbf24",onPathClick:j,onStopClick:T}){const[H,Z]=u.useState(null),E=u.useRef(0),N=r==="walking"||r==="cycling"||r==="driving"||r==="transit";u.useEffect(()=>{if(!N||!o||n.length<2){Z(null);return}const D=[n[0].lng,n[0].lat],B=[n[n.length-1].lng,n[n.length-1].lat],le=n.length>2?n.slice(1,-1).map(J=>[J.lng,J.lat]):[],se=++E.current;o({origin:D,destination:B,waypoints:le.length>0?le:void 0,routeType:r}).then(J=>{E.current===se&&(Z(J),a==null||a(J))}).catch(()=>{E.current===se&&Z(null)})},[N,o,n,r]);const y=N&&H?H.path:e,w=N&&(H!=null&&H.segments)?H.segments:t,I=N&&(H!=null&&H.stops)?H.stops:[],R=r==="arc"?"arc":"line",_=u.useMemo(()=>w&&w.length>0?{type:"FeatureCollection",features:w.map((D,B)=>({type:"Feature",properties:{color:D.color||s,width:D.width||l,index:B},geometry:{type:"LineString",coordinates:D.coordinates}}))}:y&&y.length>1?{type:"FeatureCollection",features:[{type:"Feature",properties:{color:s,width:l},geometry:{type:"LineString",coordinates:y}}]}:null,[y,w,s,l]),$=w&&w.some(D=>D.color),G=u.useMemo(()=>{const D=y??(w&&w.length>0?[...w[0].coordinates.slice(0,1),...w[w.length-1].coordinates.slice(-1)]:null);let B=[...n,...I];if(D&&D.length>=2){const[le,se]=D[0],[J,ie]=D[D.length-1],A=n.some(P=>Math.abs(P.lng-le)<1e-6&&Math.abs(P.lat-se)<1e-6),C=n.some(P=>Math.abs(P.lng-J)<1e-6&&Math.abs(P.lat-ie)<1e-6);A||(B=[{lng:le,lat:se,name:"起点",type:"start"},...B]),C||(B=[...B,{lng:J,lat:ie,name:"终点",type:"end"}])}return B.map((le,se)=>({...le,index:le.index??se+1,type:le.type??(se===0?"start":se===B.length-1?"end":"waypoint"),stopColor:le.type==="end"||!le.type&&se===B.length-1?m:g??s,iconValue:le.icon??"marker",indexLabel:String(le.index??se+1),markerColorValue:le.markerColor??Fo(le.type??(se===0?"start":se===B.length-1?"end":"waypoint"))}))},[n,I,y,w,s,g,m]),Q=u.useMemo(()=>{if(v!=="icon")return;if(k)return k;const D=[...new Set(G.map(B=>B.iconValue).filter(Boolean))];if(D.length)return i0(D,{fill:g??s,size:Math.max(24,z+8)})},[v,k,G,g,s,z]),[U,q]=u.useState({visible:!1,lng:0,lat:0,name:"",index:""}),ee=u.useCallback(D=>{if(T==null||T(D),!F)return;const B=D.feature;B&&q({visible:!0,lng:D.lng,lat:D.lat,name:String(B.name??""),index:String(B.indexLabel??B.index??"")})},[T,F]);return _?i.jsxs(i.Fragment,{children:[d&&i.jsx(He,{source:_,sourceType:"geojson",shape:R,color:$?void 0:s,colorField:$?"color":void 0,colorValues:$?w.map(D=>D.color||s):void 0,size:l*2.5,style:{opacity:.15}}),i.jsx(He,{source:_,sourceType:"geojson",shape:R,color:$?void 0:s,colorField:$?"color":void 0,colorValues:$?w.map(D=>D.color||s):void 0,size:$?void 0:l,sizeField:$?"width":void 0,sizeValues:$?w.map(D=>D.width||l):void 0,style:{opacity:c},active:M?{color:M}:!1,onClick:j}),h&&i.jsx(He,{source:_,sourceType:"geojson",shape:"line",color:"#ffffff",size:Math.max(1.5,l*.5),style:{opacity:.6,lineType:"dash",lineDash:[8,16]},animate:{enable:!0,speed:f,duration:1500},zIndex:10}),G.length>0&&v==="point"&&i.jsx(we,{source:G,sourceConfig:{x:"lng",y:"lat"},colorField:"stopColor",colorValues:[...new Set(G.map(D=>D.stopColor))],size:p,shape:"circle",style:{opacity:1,strokeWidth:2,stroke:"#ffffff"},active:M?{color:M}:!1,onClick:ee}),G.length>0&&v==="point"&&x&&i.jsx(we,{source:G,sourceConfig:{x:"lng",y:"lat"},shapeField:"indexLabel",shapeValues:"text",color:"#ffffff",size:Math.max(10,Math.round(p*.75)),style:{textAnchor:"center",stroke:"rgba(18, 28, 42, 0.28)",strokeWidth:1.5,fontWeight:"700",textAllowOverlap:!0}}),G.length>0&&v==="icon"&&Q&&i.jsx(b0,{source:G,sourceType:"json",sourceConfig:{x:"lng",y:"lat"},iconField:b,iconMap:Q,iconSize:z,iconAnchor:V,showLabel:x,labelField:"indexLabel",labelColor:"#ffffff",labelSize:11,labelAnchor:"top",labelOffset:[0,V==="bottom"?Math.max(10,Math.round(z*.6)):0],labelHaloColor:"rgba(18, 28, 42, 0.35)",labelHaloWidth:2,onClick:ee}),G.length>0&&v==="marker"&&G.map((D,B)=>{const le=D.markerVariant??L,se=D.markerColorValue,J=To(D.indexLabel,D.stopColor,x,le);return i.jsx(Pe,{longitude:D.lng,latitude:D.lat,variant:le,color:se,icon:D.icon,content:J,label:J?void 0:x?D.indexLabel:void 0,onClick:ie=>{ee({layerId:"route-stop-marker",layerType:"point",originalEvent:ie,lng:D.lng,lat:D.lat,feature:D})}},`route-stop-marker-${B}`)}),F&&U.visible&&i.jsx(qe,{longitude:U.lng,latitude:U.lat,content:`<div style="min-width:100px"><div style="font-weight:700;font-size:13px;margin-bottom:4px">${U.name}</div><div style="font-size:12px;color:#64748b">第 ${U.index} 站</div></div>`,closeButton:!0,size:"compact",onClose:()=>q(D=>({...D,visible:!1}))})]}):null}function Fo(e){switch(e){case"start":return"success";case"end":return"error";default:return"primary"}}function To(e,t,n,r){if(!n||r!=="circle"&&r!=="dot")return;const o=r==="circle"?24:18,a=r==="circle"?11:10;return i.jsx("div",{style:{width:o,height:o,borderRadius:"9999px",border:"2px solid #ffffff",background:t,color:"#ffffff",display:"flex",alignItems:"center",justifyContent:"center",fontSize:a,lineHeight:1,fontWeight:700,boxShadow:"0 6px 12px rgba(0,0,0,0.14)"},children:e})}const f1=[73.482190241,3.8150178409999995,135.106618732,57.630045996],No={type:"linear",colors:["rgba(92,58,16,0)","rgba(92,58,16,0)","#fabd08","#f1e93f","#f1ff8f","#fcfff7"],positions:[0,3,9,22.5,45,90]};function g1(e){const t=e[0]/2003750834e-2*180;let n=e[1]/2003750834e-2*180;return n=180/Math.PI*(2*Math.atan(Math.exp(n*Math.PI/180))-Math.PI/2),[t,n]}function Io({url:e,extent:t=f1,renderMode:n="raster",bandIndex:r=0,domain:o=[0,90],noDataValue:a=0,rampColors:s=No,clampLow:l=!1,clampHigh:c=!1,bands:d=[0,1,2],countCut:h,rMinMax:f,gMinMax:p,bMinMax:g,opacity:m=.8,mask:x=!1,maskData:v}){const[L,k]=u.useState(null),[b,z]=u.useState(null),[V,F]=u.useState(null);u.useEffect(()=>{let y=!1;async function w(){try{const I=await import("geotiff"),R=await fetch(e);if(!R.ok)throw new Error(`Fetch failed: ${R.status}`);const _=await R.arrayBuffer(),G=await(await I.fromArrayBuffer(_)).getImage(),Q=G.getWidth(),U=G.getHeight(),q=await G.readRasters();let ee;try{const D=G.getBoundingBox();D&&D.length===4&&(ee=D)}catch{}y||(k({rasters:q,width:Q,height:U,tiffExtent:ee}),F(null))}catch(I){y||(F(I instanceof Error?I.message:"Failed to load TIFF"),console.error("[TiffRasterLayer] Load error:",I))}}return w(),()=>{y=!0}},[e]),u.useEffect(()=>{if(!x||!v)return;let y=!1;return typeof v=="string"?fetch(v).then(w=>w.json()).then(w=>{y||z(w)}).catch(w=>console.error("[TiffRasterLayer] Mask load error:",w)):z(v),()=>{y=!0}},[x,v]);const M=u.useMemo(()=>{if(t!==f1)return t;if(L!=null&&L.tiffExtent){const[y,w,I,R]=L.tiffExtent;if(Math.abs(y)>180||Math.abs(I)>180){const _=g1([y,w]),$=g1([I,R]);return[_[0],_[1],$[0],$[1]]}return L.tiffExtent}return t},[t,L==null?void 0:L.tiffExtent]),j=u.useMemo(()=>{if(!L)return null;if(n==="rgb"){const y={type:"rgb",width:L.width,height:L.height,bands:d,extent:M};return f&&(y.RMinMax=f),p&&(y.GMinMax=p),g&&(y.BMinMax=g),h&&(y.countCut=h),{parser:y}}return n==="ndi"?{parser:{type:"ndi",width:L.width,height:L.height,bands:d,extent:M}}:{parser:{type:"raster",width:L.width,height:L.height,extent:M}}},[L,n,d,M]),T=u.useMemo(()=>n==="rgb"?{opacity:m}:n==="ndi"?{domain:o,rampColors:s,opacity:m}:{clampLow:l,clampHigh:c,domain:o,noDataValue:a,rampColors:s,opacity:m},[n,l,c,o,a,s,m]),H=u.useMemo(()=>L?n==="rgb"||n==="ndi"?L.rasters:L.rasters[r]:null,[L,n,r]),Z=ye(),E=u.useRef(null);u.useRef(!1);const N=!x||!!b;return u.useEffect(()=>{if(!Z||!j||!H||!N)return;E.current&&(Z.removeLayer(E.current),E.current=null);const y={zIndex:10};x&&b&&(y.mask=!0,y.maskfence=b);const w=new ge.RasterLayer(y);return w.source(H,{parser:j.parser}),w.style(T),Z.addLayer(w),E.current=w,()=>{E.current&&Z&&(Z.removeLayer(E.current),E.current=null)}},[Z,j,H,N,b]),null}function L0({position:e="bottomleft",className:t,style:n,children:r}){const{positionClassName:o}=ke(e),a=Me();if(!r)return null;const s=i.jsx("div",{className:`l7-control l7-control-legend l7-control--glass${t?` ${t}`:""}`,style:{padding:"12px 14px",borderRadius:8,maxHeight:"40%",overflowY:"auto",...n},children:r});return a?s:i.jsx("div",{className:`l7-control-anchor ${o}`,children:s})}Le.mark(L0);function Po(e){return{mode:"select",features:e?[...e]:[],selectedFeatureId:null,isDrawing:!1,currentStrokeVertices:[],editingFeatureId:null}}let Ro=0;function m1(){return`annotation-${Date.now()}-${++Ro}`}function yt(e,t){if(e.length<=2)return e;let n=0,r=0;const o=e[0],a=e[e.length-1];for(let s=1;s<e.length-1;s++){const l=Do(e[s],o,a);l>n&&(n=l,r=s)}if(n>t){const s=yt(e.slice(0,r+1),t),l=yt(e.slice(r),t);return s.slice(0,-1).concat(l)}return[o,a]}function Do(e,t,n){const r=n[0]-t[0],o=n[1]-t[1],a=r*r+o*o;if(a===0){const f=e[0]-t[0],p=e[1]-t[1];return Math.sqrt(f*f+p*p)}const s=((e[0]-t[0])*r+(e[1]-t[1])*o)/a,l=t[0]+s*r,c=t[1]+s*o,d=e[0]-l,h=e[1]-c;return Math.sqrt(d*d+h*h)}function $o(e){const{scene:t,mapsService:n,defaultFeatures:r,features:o,onAnnotationCreate:a,onAnnotationUpdate:s,onAnnotationDelete:l,onAnnotationSelect:c,onModeChange:d,onChange:h,activeColor:f,activeOpacity:p,activeStrokeWidth:g,activeFontSize:m}=e,x=u.useRef(Po(r)),[,v]=u.useState(0),L=u.useCallback(()=>v(y=>y+1),[]);u.useEffect(()=>{o!==void 0&&(x.current.features=o,L())},[o,L]);const k=u.useCallback(()=>o??x.current.features,[o]),b=u.useCallback(y=>{o===void 0&&(x.current.features=y),h==null||h(y),L()},[o,h,L]),z=u.useCallback(y=>{var I;const w=x.current.mode;w!==y&&(w==="highlighter"&&x.current.isDrawing&&(x.current.isDrawing=!1,x.current.currentStrokeVertices=[],(I=n==null?void 0:n.setMapStatus)==null||I.call(n,{dragEnable:!0})),x.current.mode=y,x.current.editingFeatureId=null,y!=="select"&&(x.current.selectedFeatureId=null,c==null||c(null)),d==null||d(y),L())},[n,d,c,L]),V=u.useCallback(y=>{const w=[...k(),y];b(w),a==null||a(y)},[k,b,a]),F=u.useCallback((y,w)=>{const I=k().map(R=>{if(R.id!==y)return R;const _={...R,properties:{...R.properties,...w,updatedAt:new Date().toISOString()}};return s==null||s(_),_});b(I)},[k,b,s]),M=u.useCallback(y=>{const w=k().find(R=>R.id===y);if(!w)return;const I=k().filter(R=>R.id!==y);x.current.selectedFeatureId===y&&(x.current.selectedFeatureId=null,c==null||c(null)),x.current.editingFeatureId===y&&(x.current.editingFeatureId=null),b(I),l==null||l(w)},[k,b,l,c]),j=u.useCallback(y=>{x.current.selectedFeatureId=y;const w=y?k().find(I=>I.id===y)??null:null;c==null||c(w),L()},[k,c,L]),T=u.useCallback(()=>{x.current.selectedFeatureId=null,x.current.editingFeatureId=null,b([]),c==null||c(null)},[b,c]),H=u.useCallback((y,w,I)=>{const R=k().map(_=>{if(_.id!==y)return _;const $={..._,geometry:{type:"Point",coordinates:[w,I]},properties:{..._.properties,updatedAt:new Date().toISOString()}};return s==null||s($),$});b(R)},[k,b,s]),Z=u.useCallback(y=>{x.current.editingFeatureId=y,L()},[L]),E=u.useCallback(()=>{x.current.editingFeatureId=null,L()},[L]),N=u.useCallback((y,w,I)=>{const R=new Date().toISOString(),_={type:"Feature",id:m1(),geometry:{type:"Point",coordinates:[y,w]}};switch(I){case"marker":return{..._,properties:{annotationType:"marker",color:f,createdAt:R}};case"text":return{..._,properties:{annotationType:"text",text:"",color:f,fontSize:m,createdAt:R}};case"note":return{..._,properties:{annotationType:"note",title:"",body:"",color:f,createdAt:R}};case"link":return{..._,properties:{annotationType:"link",url:"",title:"",color:f,createdAt:R}};case"image":return{..._,properties:{annotationType:"image",src:"",createdAt:R}};case"video":return{..._,properties:{annotationType:"video",url:"",createdAt:R}};default:return{..._,properties:{annotationType:"marker",color:f,createdAt:R}}}},[f,m]);return u.useEffect(()=>{if(!t||!n)return;const y=_=>{const $=x.current,G=De(_);if(!G)return;const[Q,U]=G,q=$.mode;if(!(q==="select"||q==="none")&&q!=="highlighter"&&(q==="marker"||q==="text"||q==="note"||q==="link"||q==="image"||q==="video")){const ee=N(Q,U,q);V(ee),x.current.mode=q,x.current.selectedFeatureId=ee.id,c==null||c(ee),q!=="marker"&&(x.current.editingFeatureId=ee.id),q!=="marker"&&(x.current.mode="select",d==null||d("select")),L()}},w=_=>{var Q;const $=x.current;if($.mode!=="highlighter")return;const G=De(_);G&&($.isDrawing=!0,$.currentStrokeVertices=[G],(Q=n.setMapStatus)==null||Q.call(n,{dragEnable:!1}),L())},I=_=>{var U,q;const $=x.current;if(!$.isDrawing||$.mode!=="highlighter")return;const G=De(_);if(!G)return;const Q=$.currentStrokeVertices;if(Q.length>0){const ee=Q[Q.length-1],D=((U=n.lngLatToContainer)==null?void 0:U.call(n,ee))??{x:0,y:0},B=((q=n.lngLatToContainer)==null?void 0:q.call(n,G))??{x:0,y:0};if(G1(D,B)<4)return}$.currentStrokeVertices=[...Q,G],L()},R=()=>{var U;const _=x.current;if(!_.isDrawing||_.mode!=="highlighter")return;_.isDrawing=!1,(U=n.setMapStatus)==null||U.call(n,{dragEnable:!0});const $=_.currentStrokeVertices;if($.length<2){_.currentStrokeVertices=[],L();return}const G=yt($,5e-5);_.currentStrokeVertices=[];const Q={type:"Feature",id:m1(),geometry:{type:"LineString",coordinates:G},properties:{annotationType:"highlighter",color:f,strokeWidth:g,strokeOpacity:p,createdAt:new Date().toISOString()}};V(Q),L()};return t.on("click",y),t.on("mousedown",w),t.on("mousemove",I),t.on("mouseup",R),()=>{t.off("click",y),t.off("mousedown",w),t.off("mousemove",I),t.off("mouseup",R)}},[t,n,V,N,c,d,L]),u.useEffect(()=>{const y=w=>{var $,G;const I=($=w.target)==null?void 0:$.tagName;if(I==="INPUT"||I==="TEXTAREA"||(G=w.target)!=null&&G.isContentEditable)return;if(w.key==="Escape"){z("select");return}if(w.key==="Delete"||w.key==="Backspace"){const Q=x.current.selectedFeatureId;Q&&M(Q);return}const _={m:"marker",h:"highlighter",t:"text",n:"note",k:"link",i:"image",v:"video"}[w.key.toLowerCase()];_&&z(_)};return document.addEventListener("keydown",y),()=>document.removeEventListener("keydown",y)},[z,M]),{mode:x.current.mode,features:k(),selectedFeatureId:x.current.selectedFeatureId,editingFeatureId:x.current.editingFeatureId,isDrawing:x.current.isDrawing,currentStrokeVertices:x.current.currentStrokeVertices,setMode:z,addFeature:V,updateFeature:F,deleteFeature:M,selectFeature:j,clearAll:T,getFeatures:k,openEditor:Z,closeEditor:E,moveFeature:H}}const y1=[{mode:"select",icon:"pan_tool",title:"选择 — 点击标注选中/拖拽移动",shortcut:"Esc"},{mode:"marker",icon:"location_on",title:"标记 — 单击放置地图钉",shortcut:"M"},{mode:"highlighter",icon:"ink_highlighter",title:"高亮 — 按住拖拽手绘",shortcut:"H"},{mode:"text",icon:"title",title:"文字 — 单击放置文字标签",shortcut:"T"},{mode:"note",icon:"sticky_note_2",title:"笔记 — 单击放置富文本笔记",shortcut:"N"},{mode:"link",icon:"link",title:"链接 — 单击放置链接",shortcut:"K"},{mode:"image",icon:"image",title:"图片 — 单击放置图片",shortcut:"I"},{mode:"video",icon:"videocam",title:"视频 — 单击放置视频",shortcut:"V"}];function _o(){const e=u.useRef(null),t=u.useCallback((r,o,a)=>{var L;if(!e.current){const k=document.createElement("div");k.style.cssText=["position:fixed","pointer-events:none","z-index:9999","padding:5px 10px","border-radius:4px","background:rgba(26,27,34,0.92)","color:#f2eff9",'font:500 11px/16px "JetBrains Mono",monospace',"white-space:nowrap","box-shadow:0 2px 8px rgba(0,0,0,0.3)"].join(";"),document.body.appendChild(k),e.current=k}const s=e.current;s.textContent=`${o} ${a}`,s.style.display="block";const l=s.getBoundingClientRect(),c=r.currentTarget.getBoundingClientRect(),h=((L=r.currentTarget.closest('.l7-map-container, [id*="map"]'))==null?void 0:L.getBoundingClientRect())??{left:0,top:0,right:window.innerWidth,bottom:window.innerHeight},f="right"in h?h.right:window.innerWidth,p="bottom"in h?h.bottom:window.innerHeight,g=h.left,m=h.top;let x=c.left-l.width-8,v=c.top+c.height/2-l.height/2;x<g+4&&(x=c.right+8),x+l.width>f-4&&(x=c.left+c.width/2-l.width/2,v=c.top-l.height-8),v<m+4&&(v=c.bottom+8),v+l.height>p-4&&(v=c.top-l.height-8),s.style.left=`${Math.max(g+4,Math.min(x,f-l.width-4))}px`,s.style.top=`${Math.max(m+4,Math.min(v,p-l.height-4))}px`},[]),n=u.useCallback(()=>{e.current&&(e.current.style.display="none")},[]);return u.useEffect(()=>()=>{var r;e.current&&((r=e.current.parentElement)==null||r.removeChild(e.current),e.current=null)},[]),{showTooltip:t,hideTooltip:n}}const Oo=({activeMode:e,onModeChange:t,tools:n,hasSelection:r=!1,hasFeatures:o=!1,onDeleteSelected:a,onClearAll:s,className:l,style:c})=>{const{showTooltip:d,hideTooltip:h}=_o(),f=u.useMemo(()=>n?y1.filter(g=>n.includes(g.mode)):y1,[n]),p=u.useCallback(g=>{t(g==="select"||e===g?"select":g)},[e,t]);return i.jsxs("div",{className:`l7-control l7-control-annotation l7-control--glass${l?` ${l}`:""}`,style:c,role:"toolbar","aria-label":"标注工具",children:[f.map(g=>i.jsx("button",{className:`l7-button-control l7-annotation-tool-btn${e===g.mode?" l7-button-control--active":""}`,onClick:()=>p(g.mode),onMouseEnter:m=>d(m,g.title,g.shortcut),onMouseLeave:h,"aria-label":g.title,"aria-pressed":e===g.mode,children:i.jsx("span",{className:"material-symbols-outlined",children:g.icon})},g.mode)),r&&a&&i.jsxs(i.Fragment,{children:[i.jsx("div",{className:"l7-draw-separator"}),i.jsx("button",{className:"l7-button-control l7-annotation-action-btn",onClick:a,onMouseEnter:g=>d(g,"删除选中标注","Del"),onMouseLeave:h,"aria-label":"删除选中标注",children:i.jsx("span",{className:"material-symbols-outlined",children:"delete"})})]}),o&&s&&i.jsx("button",{className:"l7-button-control l7-annotation-action-btn",onClick:s,onMouseEnter:g=>d(g,"清除所有标注",""),onMouseLeave:h,"aria-label":"清除所有标注",children:i.jsx("span",{className:"material-symbols-outlined",children:"delete_sweep"})})]})},Ze={marker:{color:"#3f51b5",size:32},highlighter:{color:"#ffeb3b",width:8,opacity:.5},text:{color:"#1a1a2e",fontSize:14,fontFamily:"inherit"},note:{color:"#3f51b5",maxWidth:240},link:{color:"#3f51b5"},image:{maxWidth:200,borderRadius:8},video:{maxWidth:200}},Bo=["#3f51b5","#e53935","#43a047","#fb8c00","#8e24aa","#00897b","#5c6bc0","#d81b60"];function Wo(e){return e?{marker:{...Ze.marker,...e.marker},highlighter:{...Ze.highlighter,...e.highlighter},text:{...Ze.text,...e.text},note:{...Ze.note,...e.note},link:{...Ze.link,...e.link},image:{...Ze.image,...e.image},video:{...Ze.video,...e.video}}:Ze}const Uo={marker:"translate(-50%, -100%)",text:"translate(-50%, -50%)",note:"translate(-50%, -100%)",link:"translate(-50%, -100%)",image:"translate(-50%, -100%)",video:"translate(-50%, -100%)"};function qo(e,t){const{annotationType:n}=e.properties;switch(n){case"marker":{const r=e.properties,o=r.color||t.marker.color;return`
|
|
2
|
-
<div class="aimapui-annotation-marker" style="color:${
|
|
3
|
-
<span class="material-symbols-outlined" style="font-size:${
|
|
4
|
-
${
|
|
1
|
+
"use strict";var zo=Object.create;var or=Object.defineProperty;var jo=Object.getOwnPropertyDescriptor;var So=Object.getOwnPropertyNames;var Do=Object.getPrototypeOf,Ho=Object.prototype.hasOwnProperty;var Bo=(s,l,u,f)=>{if(l&&typeof l=="object"||typeof l=="function")for(let h of So(l))!Ho.call(s,h)&&h!==u&&or(s,h,{get:()=>l[h],enumerable:!(f=jo(l,h))||f.enumerable});return s};var be=(s,l,u)=>(u=s!=null?zo(Do(s)):{},Bo(l||!s||!s.__esModule?or(u,"default",{value:s,enumerable:!0}):u,s));Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const g=require("react/jsx-runtime"),b=require("react"),Pr=require("@antv/l7"),$e=require("react-dom"),Vo=require("clsx"),_o=require("react-dom/client"),Io=require("supercluster");function Po(s){const l=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(s){for(const u in s)if(u!=="default"){const f=Object.getOwnPropertyDescriptor(s,u);Object.defineProperty(l,u,f.get?f:{enumerable:!0,get:()=>s[u]})}}return l.default=s,Object.freeze(l)}const zA=Po(Pr),ce={basemap:"map",center:[105,35],zoom:4,pitch:0,rotation:0};function Ut(s){return{basemap:s.basemap??ce.basemap,engine:s.engine,token:s.token,style:s.style,center:s.center??[...ce.center],zoom:s.zoom??ce.zoom,pitch:s.pitch??ce.pitch,rotation:s.rotation??ce.rotation,minZoom:s.minZoom,maxZoom:s.maxZoom,bounds:s.bounds,gestureConfig:s.gestureConfig}}let To=0;function Fo(){return`aimap-layer-${++To}`}function Tr(s){return{id:s.id??Fo(),type:s.type,name:s.name??s.type,visible:s.visible??!0,zIndex:s.zIndex??0,minZoom:s.minZoom,maxZoom:s.maxZoom,autoFit:s.autoFit??!1,source:s.source,sourceType:s.sourceType,sourceConfig:s.sourceConfig,color:s.color,colorField:s.colorField,colorValues:s.colorValues,size:s.size,sizeField:s.sizeField,sizeValues:s.sizeValues,shape:s.shape,shapeField:s.shapeField,shapeValues:s.shapeValues,style:s.style,filterField:s.filterField,filterValues:s.filterValues,animate:s.animate,active:s.active,select:s.select,events:s.events}}const Ro={zoom:"topright",scale:"bottomleft",fullscreen:"topright",geoLocate:"topright",mapTheme:"topright",mouseLocation:"bottomright",exportImage:"topright",layerSwitch:"topright",draw:"topright"};function Fr(s){return{type:s.type,position:s.position??Ro[s.type]??"topright",options:s.options}}const No={breakpoint:768};function Zo(s){return{breakpoint:(s==null?void 0:s.breakpoint)??No.breakpoint,mobile:s==null?void 0:s.mobile}}function N1(s){return{map:Ut(s.map),layers:(s.layers??[]).map(Tr),controls:(s.controls??[]).map(Fr),interactions:s.interactions??[],legends:s.legends??[],responsive:s.responsive?Zo(s.responsive):void 0,events:s.events}}function Rr(s){return N1(s)}function Qo(s){const l=[];if(s.basemap||l.push("map.basemap is required"),s.center){const[u,f]=s.center;(u<-180||u>180)&&l.push("map.center[0] (longitude) must be between -180 and 180"),(f<-90||f>90)&&l.push("map.center[1] (latitude) must be between -90 and 90")}return l}function Oo(s,l){const u=[];return s.type||u.push(`layers[${l}].type is required`),s.source===void 0&&s.source,s.colorField&&!s.colorValues&&s.color,u}function Uo(s){const l=[];return l.push(...Qo(s.map)),(s.layers??[]).forEach((u,f)=>{l.push(...Oo(u,f))}),{valid:l.length===0,errors:l}}const Nr=b.createContext(null);function Zr({schema:s,children:l}){return g.jsx(Nr.Provider,{value:s,children:l})}function $o(){return b.useContext(Nr)}class Qr{constructor(){this.listeners=new Map}on(l,u){return this.listeners.has(l)||this.listeners.set(l,new Set),this.listeners.get(l).add(u),()=>{var f;(f=this.listeners.get(l))==null||f.delete(u)}}once(l,u){const f=(...y)=>{u(...y),h()},h=this.on(l,f);return h}emit(l,...u){const f=this.listeners.get(l);f&&f.forEach(h=>{try{h(...u)}catch(y){console.error(`[aimapui EventBus] Error in event "${l}":`,y)}})}off(l){this.listeners.delete(l)}clear(){this.listeners.clear()}}function Or(){return new Qr}const Ur=b.createContext(null);function $r({events:s,children:l}){const u=b.useRef(null);return u.current||(u.current=Or()),b.useEffect(()=>{if(!s||!u.current)return;const f=u.current,h=[];for(const[y,m]of Object.entries(s))m&&h.push(f.on(y,m));return()=>{h.forEach(y=>y())}},[s]),g.jsx(Ur.Provider,{value:u.current,children:l})}function Z1(){const s=b.useContext(Ur);if(!s)throw new Error("[aimapui] useEventBus must be used within an EventBusProvider");return s}const Wr=b.createContext({resolvedTheme:"light",theme:"light",setTheme:()=>{},toggleTheme:()=>{}});function Gr({defaultTheme:s="light",target:l="container",children:u}){const[f,h]=b.useState(s),[y,m]=b.useState("light");b.useEffect(()=>{const M=window.matchMedia("(prefers-color-scheme: dark)");m(M.matches?"dark":"light");const S=z=>{m(z.matches?"dark":"light")};return M.addEventListener("change",S),()=>M.removeEventListener("change",S)},[]);const C=f==="system"?y:f,x=b.useCallback(()=>{h(M=>M==="system"?y==="light"?"dark":"light":M==="light"?"dark":"light")},[y]);b.useEffect(()=>{l==="root"&&document.documentElement.setAttribute("data-theme",C)},[C,l]);const L=b.useMemo(()=>({resolvedTheme:C,theme:f,setTheme:h,toggleTheme:x}),[C,f,x]);return g.jsx(Wr.Provider,{value:L,children:l==="container"?g.jsx("div",{"data-theme":C,style:{display:"contents"},children:u}):u})}function Yr(){return b.useContext(Wr)}const Wo=b.createContext({isMobile:!1,breakpoint:768,width:typeof window<"u"?window.innerWidth:1024,schema:void 0});function Go({responsive:s,children:l}){const[u,f]=b.useState(typeof window<"u"?window.innerWidth:1024);b.useEffect(()=>{let C;const x=()=>{cancelAnimationFrame(C),C=requestAnimationFrame(()=>f(window.innerWidth))};return window.addEventListener("resize",x),()=>{window.removeEventListener("resize",x),cancelAnimationFrame(C)}},[]);const h=(s==null?void 0:s.breakpoint)??768,y=u<h,m=b.useMemo(()=>({isMobile:y,breakpoint:h,width:u,schema:s}),[y,h,u,s]);return g.jsx(Wo.Provider,{value:m,children:l})}const qr=b.createContext(null);function Xr({scene:s,children:l}){const u=b.useRef(s);return u.current=s,g.jsx(qr.Provider,{value:u.current,children:l})}function jA(){return b.useContext(qr)}async function Jr(s){var y,m,C;const l=s.basemap??ce.basemap,u=s.token??"",f=s.style??"normal",h={center:s.center??ce.center,zoom:s.zoom??ce.zoom,pitch:s.pitch??ce.pitch,rotation:s.rotation??ce.rotation,minZoom:s.minZoom,maxZoom:s.maxZoom,dragEnable:((y=s.gestureConfig)==null?void 0:y.dragPan)??!0,zoomEnable:((m=s.gestureConfig)==null?void 0:m.pinchZoom)??!0,rotateEnable:((C=s.gestureConfig)==null?void 0:C.dragRotate)??!0};if(s.engine)return new s.engine({...h,style:f,token:u});switch(l){case"gaode":{const{GaodeMap:x}=await import("@antv/l7-maps/gaode");return new x({...h,style:Yo(f),token:u})}case"mapbox":{const{Mapbox:x}=await import("@antv/l7-maps/mapbox");return new x({...h,style:qo(f),token:u})}case"tianditu":{const{TMap:x}=await import("@antv/l7-maps/tianditu");return new x({...h,token:u})}case"tencent":{const{TencentMap:x}=await import("@antv/l7-maps/tencent");return new x({...h,token:u})}case"baidu":{const{BaiduMap:x}=await import("@antv/l7-maps/baidu");return new x({...h,style:Xo(f),token:u})}case"maplibre":{const{MapLibre:x}=await import("@antv/l7-maps/maplibre");return new x({...h,style:Ko(f),token:u})}case"google":{const{GoogleMap:x}=await import("@antv/l7-maps/google"),L=new x({...h,style:Jo(f),token:u});return As(L),L}case"map":default:{const{Map:x}=await import("@antv/l7-maps/simple");return new x({center:s.center??ce.center,zoom:s.zoom??ce.zoom})}}}function Yo(s){return{light:"light",dark:"dark",normal:"normal",darkblue:"dark",satellite:"satellite"}[s]??s}function qo(s){return{light:"https://tiles.openfreemap.org/styles/positron",dark:"https://tiles.openfreemap.org/styles/dark",normal:"https://tiles.openfreemap.org/styles/bright",liberty:"https://tiles.openfreemap.org/styles/liberty",fiord:"https://tiles.openfreemap.org/styles/fiord"}[s]??s}function Xo(s){return{light:"light",dark:"dark",normal:"normal",darkblue:"dark",satellite:"satellite"}[s]??s}function Jo(s){return{light:"roadmap",dark:"roadmap",normal:"roadmap",darkblue:"roadmap",satellite:"satellite",hybrid:"hybrid",terrain:"terrain"}[s]??"roadmap"}function Ko(s){return{light:"https://tiles.openfreemap.org/styles/positron",dark:"https://tiles.openfreemap.org/styles/dark",normal:"https://tiles.openfreemap.org/styles/bright",liberty:"https://tiles.openfreemap.org/styles/liberty",fiord:"https://tiles.openfreemap.org/styles/fiord"}[s]??s}function As(s){const l=["zoomControl","mapTypeControl","streetViewControl","fullscreenControl","scaleControl","rotateControl","panControl"],u={};for(const m of l)u[m]=!1;const f=()=>{const m=s.map;if(!m||typeof m.setOptions!="function")return!1;m.setOptions(u);const C=m.setOptions.bind(m);return m.setOptions=x=>{const L={...x};for(const M of l)M in L&&delete L[M];C(L)},!0};if(f())return;let h=0;const y=setInterval(()=>{h+=1,(f()||h>100)&&clearInterval(y)},50)}function Kr({mapSchema:s,children:l,onSceneReady:u,mapEventHandlers:f,events:h,className:y,style:m}){const C=b.useRef(null),x=b.useRef(null),[L,M]=b.useState(null),S=b.useRef(u);S.current=u;const z=b.useRef(f);z.current=f;const H=Z1(),D=b.useCallback((N,F)=>{var Z,G,r0;if(F.basemap==="map")return;const Y=((Z=F.gestureConfig)==null?void 0:Z.dragPan)??!0,X=((G=F.gestureConfig)==null?void 0:G.pinchZoom)??!0,n0=((r0=F.gestureConfig)==null?void 0:r0.dragRotate)??!0;try{const A0=N.mapService;if(A0&&typeof A0.setMapStatus=="function"&&A0.setMapStatus({dragEnable:Y,zoomEnable:X,rotateEnable:n0,doubleClickZoom:X}),F.basemap==="google"&&(A0!=null&&A0.map)){const o0=A0.map;typeof o0.setOptions=="function"&&o0.setOptions({zoomControl:!1,mapTypeControl:!1,streetViewControl:!1,fullscreenControl:!1,scaleControl:!1,rotateControl:!1,panControl:!1})}}catch{}},[]);b.useEffect(()=>{if(!C.current)return;let N=!1;const F=Ut(s),Y=n0=>{if(N||!C.current)return;const Z=new Pr.Scene({id:C.current,map:n0,logoVisible:!1});x.current=Z,Z.on("loaded",()=>{var G;N||(D(Z,F),M(Z),(G=S.current)==null||G.call(S,Z),X(Z))}),F.bounds&&Z.on("loaded",()=>{try{const[G,r0]=F.bounds;Z.fitBounds([G[0],G[1],r0[0],r0[1]])}catch{}})};if(F.engine){const n0={center:F.center,zoom:F.zoom,pitch:F.pitch,rotation:F.rotation,minZoom:F.minZoom,maxZoom:F.maxZoom,style:F.style??"normal",token:F.token??""},Z=new F.engine(n0);Y(Z)}else Jr(F).then(Y);function X(n0){n0.on("mapmove",()=>{var G,r0;const Z={originalEvent:null,center:[n0.getCenter().lng,n0.getCenter().lat],zoom:n0.getZoom(),pitch:n0.getPitch(),rotation:n0.getRotation()};(r0=(G=z.current)==null?void 0:G.onMove)==null||r0.call(G,Z),h!=null&&h.mapMove&&H.emit(h.mapMove,Z)}),n0.on("zoomchange",()=>{var G,r0;const Z={originalEvent:null,center:[n0.getCenter().lng,n0.getCenter().lat],zoom:n0.getZoom(),pitch:n0.getPitch(),rotation:n0.getRotation()};(r0=(G=z.current)==null?void 0:G.onZoom)==null||r0.call(G,Z),h!=null&&h.mapZoom&&H.emit(h.mapZoom,Z)})}return()=>{if(N=!0,x.current){try{x.current.destroy()}catch{}x.current=null}M(null)}},[s.basemap,s.engine,D]);const V=JSON.stringify(s.center),O=JSON.stringify(s.gestureConfig);b.useEffect(()=>{if(!L)return;const N=Ut(s);try{L.setCenter(N.center)}catch{}try{L.setZoom(N.zoom)}catch{}try{L.setPitch(N.pitch)}catch{}try{L.setRotation(N.rotation)}catch{}D(L,N)},[L,V,s.zoom,s.pitch,s.rotation,O,D]);const R=b.useCallback(()=>{if(x.current)try{const N=x.current.map;N&&typeof N.resize=="function"&&N.resize()}catch{}},[]);return b.useEffect(()=>(window.addEventListener("resize",R),()=>window.removeEventListener("resize",R)),[R]),g.jsx("div",{ref:C,className:y??"aimapui-container",style:m??{width:"100%",height:"100%"},children:L&&g.jsx(Xr,{scene:L,children:l})})}function A2(s){if(s.colorField)return{field:s.colorField,values:s.colorValues};if(s.color)return{values:s.color}}function es(s){if(s.sizeField)return{field:s.sizeField,values:s.sizeValues};if(s.size!==void 0)return{values:s.size}}function e2(s){if(s.shapeField)return{field:s.shapeField,values:s.shapeValues};if(s.shape)return{values:s.shape}}function Q1(s){return{color:A2(s),size:es(s),shape:e2(s),style:s.style?{...s.style}:void 0}}function ts(s){var l,u;return{data:s.source,options:{parser:{type:"json",x:((l=s.sourceConfig)==null?void 0:l.x)??"lng",y:((u=s.sourceConfig)==null?void 0:u.y)??"lat"}}}}function ns(s){var l,u;return{data:s.source,options:{parser:{type:"csv",x:(l=s.sourceConfig)==null?void 0:l.x,y:(u=s.sourceConfig)==null?void 0:u.y}}}}function O1(s){return{data:s.source,options:void 0}}function rs(s){var l;return(l=s.sourceConfig)!=null&&l.parser?{data:s.source,options:{parser:s.sourceConfig.parser}}:s.sourceType==="geojson"?O1(s):s.sourceType==="csv"?ns(s):ts(s)}function t2(s){return{type:"PointLayer",sourceConfig:rs(s),visual:Q1(s),schema:s}}function n2(s){return{type:"LineLayer",sourceConfig:is(s),visual:Q1(s),schema:s}}function is(s){var l,u,f,h,y,m,C,x,L,M;return(l=s.sourceConfig)!=null&&l.parser?{data:s.source,options:{parser:s.sourceConfig.parser}}:s.sourceType==="geojson"?O1(s):s.sourceType==="csv"?{data:s.source,options:{parser:{type:"csv",x:(u=s.sourceConfig)==null?void 0:u.x,y:(f=s.sourceConfig)==null?void 0:f.y,x1:(h=s.sourceConfig)==null?void 0:h.x1,y1:(y=s.sourceConfig)==null?void 0:y.y1}}}:{data:s.source,options:{parser:{type:"json",x:((m=s.sourceConfig)==null?void 0:m.x)??"lng",y:((C=s.sourceConfig)==null?void 0:C.y)??"lat",x1:(x=s.sourceConfig)==null?void 0:x.x1,y1:(L=s.sourceConfig)==null?void 0:L.y1,coordinates:(M=s.sourceConfig)==null?void 0:M.coordinates}}}}function r2(s){return{type:"PolygonLayer",sourceConfig:os(s),visual:Q1(s),schema:s}}function os(s){var l;return s.sourceType==="geojson"?O1(s):{data:s.source,options:{parser:{type:"json",coordinates:((l=s.sourceConfig)==null?void 0:l.coordinates)??"coordinates"}}}}function i2(s){return{type:"HeatmapLayer",sourceConfig:ss(s),visual:ls(s),schema:s}}function ss(s){var l,u,f,h,y,m,C,x;return(l=s.sourceConfig)!=null&&l.parser?{data:s.source,options:{parser:s.sourceConfig.parser,...s.sourceConfig.transforms?{transforms:s.sourceConfig.transforms}:{}}}:s.sourceType==="geojson"?{data:s.source,options:(u=s.sourceConfig)!=null&&u.transforms?{transforms:s.sourceConfig.transforms}:void 0}:s.sourceType==="csv"?{data:s.source,options:{parser:{type:"csv",x:(f=s.sourceConfig)==null?void 0:f.x,y:(h=s.sourceConfig)==null?void 0:h.y},...(y=s.sourceConfig)!=null&&y.transforms?{transforms:s.sourceConfig.transforms}:{}}}:{data:s.source,options:{parser:{type:"json",x:((m=s.sourceConfig)==null?void 0:m.x)??"lng",y:((C=s.sourceConfig)==null?void 0:C.y)??"lat"},...(x=s.sourceConfig)!=null&&x.transforms?{transforms:s.sourceConfig.transforms}:{}}}}function ls(s){const l=s.sizeField?{field:s.sizeField,values:s.sizeValues}:void 0,u=A2(s),f=e2(s),h=s.style?{...s.style}:void 0;return{color:u,size:l,shape:f,style:h}}function o2(s){return{type:"RasterLayer",sourceConfig:as(s),visual:cs(s),schema:s}}function as(s){var l;return(l=s.sourceConfig)!=null&&l.parser?{data:s.source,options:{parser:s.sourceConfig.parser}}:{data:s.source,options:s.sourceType==="raster"?{parser:{type:"raster",extent:[73.482190241,3.82501784112,135.106618732,53.557926206]}}:s.sourceType==="rasterTile"?{parser:{type:"rasterTile",tileSize:256,zoomOffset:1}}:void 0}}function cs(s){return{color:void 0,size:void 0,shape:void 0,style:s.style?{...s.style}:void 0}}function s2(s){var l;return{type:"ImageLayer",sourceConfig:{data:s.source,options:{parser:((l=s.sourceConfig)==null?void 0:l.parser)??(s.sourceType==="image"?{type:"image"}:void 0)}},visual:{color:void 0,size:void 0,shape:void 0,style:s.style?{...s.style}:void 0},schema:s}}function U1(s,l,u,f){const h=b.useRef(l),y=b.useRef(u);h.current=l,y.current=u;const m=b.useRef(f);m.current=f;const C=b.useRef(null),x=b.useRef(s);x.current=s;const L=b.useCallback(()=>{const S=x.current;if(S)try{const z=S.mapService;if(z){const H=z.lngLatToContainer([h.current,y.current]);H&&m.current(H.x,H.y)}else{const H=S.lngLatToContainer([h.current,y.current]);H&&m.current(H.x,H.y)}}catch{}},[]),M=b.useCallback(()=>{L()},[L]);b.useEffect(()=>{if(!s)return;const S=()=>{setTimeout(()=>L(),0)};return s.loaded?S():s.on("loaded",S),()=>{s.off("loaded",S)}},[s,L]),b.useEffect(()=>{L()},[l,u,L]),b.useEffect(()=>{if(s){try{const S=s.mapService;if(S)return S.on("camerachange",M),S.on("viewchange",M),()=>{S.off("camerachange",M),S.off("viewchange",M)}}catch{}return s.on("camerachange",M),s.on("resize",M),()=>{s.off("camerachange",M),s.off("resize",M)}}},[s,M]),b.useEffect(()=>()=>{C.current!==null&&(cancelAnimationFrame(C.current),C.current=null)},[])}function vA(...s){return Vo(s)}function us(s,l=1){const u=s.replace("#","").match(/.{2}/g);if(!u||u.length<3)return s;const[f,h,y]=u.map(m=>parseInt(m,16));return`rgba(${f}, ${h}, ${y}, ${l})`}function Pt(s){return typeof s=="string"&&/<[a-zA-Z][^>]*>/.test(s)}let wt=null;const V1=new Set;function fs(s,l){wt&&wt!==s&&V1.forEach(u=>u(s)),wt=s}function ds(s){wt===s&&(wt=null)}function hs(s,l,u,f,h,y,m,C){if(m!=="auto")return it(m,C);const x=l,L=y-l,M=s,S=h-s,z=8;if(x>=f+C+z)return it("top",C);if(L>=f+C+z)return it("bottom",C);if(S>=u+C+z)return it("right",C);if(M>=u+C+z)return it("left",C);const D=Object.entries({top:x,bottom:L,right:S,left:M}).sort((V,O)=>O[1]-V[1])[0][0];return it(D,C)}function it(s,l){switch(s){case"top":return{placement:"top",transform:`translate(-50%, -100%) translateY(-${l}px)`};case"bottom":return{placement:"bottom",transform:`translate(-50%, 0) translateY(${l}px)`};case"left":return{placement:"left",transform:`translate(-100%, -50%) translateX(-${l}px)`};case"right":return{placement:"right",transform:`translate(0, -50%) translateX(${l}px)`}}}function Qt({onClick:s}){return g.jsx("button",{onClick:l=>{l.stopPropagation(),s()},className:"aimapui-popup-close-btn absolute top-2 right-2 size-8 flex items-center justify-center text-on-surface-variant rounded-lg transition-[color,background] duration-200 cursor-pointer bg-transparent border-none p-0 hover:text-on-surface hover:bg-surface-container-high [&_.material-symbols-outlined]:text-xl","aria-label":"关闭",children:g.jsx("span",{className:"material-symbols-outlined",children:"close"})})}const ps={top:"M0 0L8 8L16 0",bottom:"M0 8L8 0L16 8",left:"M0 0L8 8L0 16",right:"M8 0L0 8L8 16"};function Tt({placement:s}){const l=s==="top"||s==="bottom",u=l?16:8,f=l?8:16,h=l?"0 0 16 8":"0 0 8 16",y=ps[s];return g.jsx("div",{className:`aimapui-popup-tip-arrow aimapui-popup-tip-arrow--${s==="top"?"bottom":s==="bottom"?"top":s}`,children:g.jsxs("svg",{width:u,height:f,viewBox:h,fill:"none",children:[g.jsx("path",{d:y,fill:"rgba(248, 249, 255, 0.95)"}),g.jsx("path",{d:y,stroke:"rgba(195, 198, 215, 0.3)",strokeWidth:"0.5",fill:"none"})]})})}function gs({header:s,onClose:l}){return s.coverUrl?g.jsxs("div",{className:"aimapui-popup-cover relative aspect-video overflow-hidden",children:[g.jsx("img",{src:s.coverUrl,alt:s.title,className:"aimapui-popup-cover-img w-full h-full object-cover"}),g.jsx("button",{className:"aimapui-popup-close-btn aimapui-popup-close-btn--cover absolute top-2 right-2 size-8 bg-black/30 backdrop-blur-sm text-white flex items-center justify-center rounded-full border-none cursor-pointer transition-colors duration-200 z-10 hover:bg-black/50 [&_.material-symbols-outlined]:text-lg","aria-label":"关闭",onClick:u=>{u.stopPropagation(),l()},children:g.jsx("span",{className:"material-symbols-outlined",children:"close"})}),s.statusLabel&&g.jsxs("div",{className:"aimapui-popup-status-badge absolute bottom-2 left-2 flex items-center gap-1.5 px-2 py-0.5 bg-surface/90 backdrop-blur-sm rounded-md shadow-sm text-[10px] font-semibold uppercase tracking-wide text-on-surface",children:[g.jsx("div",{className:"size-2 rounded-full",style:{background:s.statusColor||"#10b981"}}),g.jsx("span",{children:s.statusLabel})]})]}):null}function ms({header:s,onClose:l,hasCover:u,showStatusDot:f}){return g.jsxs("div",{className:vA("aimapui-popup-header relative flex items-center p-4",!u&&"pr-10"),children:[f&&s.statusDot&&g.jsx("div",{className:"size-2 rounded-full shrink-0 mr-2 animate-pulse",style:{background:s.statusDot}}),g.jsx("h3",{className:"aimapui-popup-title text-xl leading-7 font-semibold text-on-surface m-0 flex-1 min-w-0 truncate",children:s.title}),!u&&g.jsx(Qt,{onClick:l})]})}function ys({attributes:s,size:l}){const u=l==="compact",f=l==="detailed",h=u?1:2;return g.jsx("div",{className:vA("aimapui-popup-attrs",u?"flex flex-col":"grid gap-2"),style:u?void 0:{gridTemplateColumns:`repeat(${h}, 1fr)`},children:s.map((y,m)=>f&&y.icon?g.jsxs("div",{className:"aimapui-popup-attr flex items-center gap-2",children:[g.jsx("div",{className:"aimapui-popup-attr-icon size-12 rounded-lg bg-surface-container-highest flex items-center justify-center text-primary shrink-0 [&_.material-symbols-outlined]:text-[28px]",children:g.jsx("span",{className:"material-symbols-outlined",children:y.icon})}),g.jsxs("div",{children:[g.jsx("p",{className:"aimapui-popup-attr-label text-sm leading-5 text-on-surface-variant m-0",children:y.label}),g.jsx("p",{className:"aimapui-popup-attr-value text-sm leading-5 font-medium text-on-surface m-0",style:y.valueColor?{color:y.valueColor}:void 0,children:y.value})]})]},m):g.jsxs("div",{className:vA("aimapui-popup-attr","flex justify-between items-baseline gap-2",u&&"py-2 border-b border-outline-variant/30 last:border-b-0 last:pb-0 first:pt-0"),children:[g.jsx("p",{className:"aimapui-popup-attr-label text-sm leading-5 text-on-surface-variant m-0",children:y.label}),g.jsx("p",{className:"aimapui-popup-attr-value text-sm leading-5 font-medium text-on-surface m-0 text-right",style:y.valueColor?{color:y.valueColor}:void 0,children:y.value})]},m))})}function Cs({actions:s}){return g.jsx("div",{className:"aimapui-popup-actions flex gap-3 px-4 pb-4",children:s.map((l,u)=>g.jsx("button",{className:vA("aimapui-popup-action-btn","flex-1 py-2.5 text-sm leading-5 font-semibold rounded-lg border-none cursor-pointer transition-all duration-150 active:scale-[0.98]",l.variant==="secondary"?"aimapui-popup-action-btn--secondary bg-transparent text-on-surface border-2 border-solid border-outline-variant hover:bg-surface-container-low":"aimapui-popup-action-btn--primary bg-primary text-on-primary shadow-sm hover:shadow-[0_4px_12px_rgba(0,74,198,0.3)]"),onClick:l.onClick,children:l.label},u))})}function kt({longitude:s,latitude:l,content:u,closeButton:f=!0,size:h="standard",placement:y="auto",offset:m=8,header:C,attributes:x,actions:L,visible:M,singleton:S=!1,overlayContainer:z,onClose:H,className:D}){const V=jA(),O=M!==void 0,[R,N]=b.useState(!0),F=O?M:R,[Y,X]=b.useState(!1),[n0,Z]=b.useState("top"),G=b.useRef(null),r0=b.useRef(!0);b.useRef(!1);const A0=b.useRef(Symbol("popup")),[o0,q]=b.useState(null);b.useEffect(()=>{if(z||!V)return;const x0=()=>{try{const T0=V.mapService;if(T0&&typeof T0.getMarkerContainer=="function"){const j0=T0.getMarkerContainer();if(j0)return q(j0),!0}}catch{}return!1};if(x0())return;const g0=()=>{x0()};return V.loaded?g0():V.on("loaded",g0),()=>{V.off("loaded",g0)}},[V,z]);const t0=z??o0,B=b.useCallback(()=>{Y||(X(!0),setTimeout(()=>{O||N(!1),H==null||H(),X(!1)},150))},[O,H,Y]);b.useEffect(()=>{if(!S||!F)return;const x0=A0.current;return fs(x0),()=>ds(x0)},[S,F,B]),b.useEffect(()=>{if(!S)return;const x0=A0.current,g0=T0=>{T0!==x0&&F&&B()};return V1.add(g0),()=>{V1.delete(g0)}},[S,F,B]);const U=b.useRef(()=>{});U.current=(x0,g0)=>{var H0;const T0=G.current;if(!T0)return;const j0=Math.round(x0),B0=Math.round(g0);let pA=0,E0=0;try{const d0=V==null?void 0:V.mapService,b0=(H0=d0==null?void 0:d0.getContainer)==null?void 0:H0.call(d0);if(b0){const I0=b0.getBoundingClientRect();pA=I0.width||b0.clientWidth||b0.scrollWidth,E0=I0.height||b0.clientHeight||b0.scrollHeight}}catch{}const D0=T0.querySelector(".aimapui-popup-content"),Q0=(D0==null?void 0:D0.offsetWidth)||320,l0=(D0==null?void 0:D0.offsetHeight)||200,{placement:T,transform:a0}=hs(j0,B0,Q0,l0,pA,E0,y,m);Z(T),T0.style.left="0",T0.style.top="0",T0.style.transform=`translate3d(${j0}px, ${B0}px, 0) ${a0}`;let Q;if(pA>0&&E0>0)Q=j0>=-2&&j0<=pA+2&&B0>=-2&&B0<=E0+2;else{const d0=T0.parentElement;d0&&d0.clientWidth>0&&d0.clientHeight>0?Q=j0>=0&&j0<=d0.clientWidth&&B0>=0&&B0<=d0.clientHeight:Q=r0.current}r0.current=Q,T0.style.display=Q?"":"none"};const e0=b.useCallback(()=>{if(V)try{const x0=V.mapService,g0=x0?x0.lngLatToContainer([s,l]):V.lngLatToContainer([s,l]);g0&&U.current(g0.x,g0.y)}catch{}},[V,s,l]);if(b.useEffect(()=>{if(!t0||!F)return;const x0=requestAnimationFrame(()=>{e0()});return()=>cancelAnimationFrame(x0)},[t0,F,e0]),b.useEffect(()=>{if(!F)return;const x0=g0=>{g0.key==="Escape"&&B()};return document.addEventListener("keydown",x0),()=>document.removeEventListener("keydown",x0)},[F,B]),b.useEffect(()=>{var j0;if(!F||!t0)return;const x0=B0=>{const pA=G.current;if(!pA||pA.contains(B0.target))return;const E0=B0.target;E0.closest(".aimapui-marker")||E0.closest("[data-marker]")||B()};let g0=null;try{const B0=V==null?void 0:V.mapService;B0&&(g0=(j0=B0.getContainer)==null?void 0:j0.call(B0))}catch{}const T0=g0||t0.parentElement||t0;return T0.addEventListener("click",x0,!0),()=>T0.removeEventListener("click",x0,!0)},[F,t0,V,B]),U1(V,s,l,(x0,g0)=>{U.current(x0,g0)}),!F||!t0)return null;const c0=C||x||L,h0=!!(C!=null&&C.coverUrl),p0=n0==="left"||n0==="right",S0=()=>c0?g.jsxs(g.Fragment,{children:[C&&h0&&g.jsx(gs,{header:C,onClose:B}),C&&g.jsx(ms,{header:C,onClose:B,hasCover:h0,showStatusDot:h==="compact"}),g.jsxs("div",{className:vA("aimapui-popup-body relative p-4 text-sm leading-5 text-on-surface break-words whitespace-normal",!C&&f&&"pr-10"),children:[!C&&f&&g.jsx(Qt,{onClick:B}),u&&!Pt(u)&&typeof u!="string"&&g.jsx("div",{children:u}),u&&Pt(u)&&g.jsx("div",{dangerouslySetInnerHTML:{__html:u}}),u&&!Pt(u)&&typeof u=="string"&&g.jsx("div",{children:u}),!u&&!(x!=null&&x.length)&&!(L!=null&&L.length)&&!C&&g.jsx("div",{style:{color:"var(--color-on-surface-variant)"},children:"无内容"}),x&&x.length>0&&g.jsx(ys,{attributes:x,size:h})]}),L&&L.length>0&&g.jsx(Cs,{actions:L})]}):Pt(u)?g.jsxs("div",{className:"aimapui-popup-body relative p-4 pt-2 pr-10 text-sm leading-5 text-on-surface break-words whitespace-normal",children:[f&&g.jsx(Qt,{onClick:B}),g.jsx("div",{dangerouslySetInnerHTML:{__html:u}})]}):g.jsxs("div",{className:"aimapui-popup-body relative p-4 pt-2 pr-10 text-sm leading-5 text-on-surface break-words whitespace-normal",children:[f&&g.jsx(Qt,{onClick:B}),g.jsx("div",{children:u??""})]}),Z0=p0?{display:"flex",alignItems:"center"}:{display:"flex",flexDirection:"column",alignItems:"center"};return $e.createPortal(g.jsxs("div",{ref:G,className:vA("aimapui-popup",`aimapui-popup--${h}`),style:{position:"absolute",left:0,top:0,transform:"translate(-9999px, -9999px)",display:"none",zIndex:30,pointerEvents:"auto",...Z0},children:[n0==="bottom"&&g.jsx(Tt,{placement:n0}),n0==="right"&&g.jsx(Tt,{placement:n0}),g.jsx("div",{className:vA("aimapui-popup-content overflow-hidden rounded-xl",Y&&"aimapui-popup-content--exit",D),children:S0()}),n0==="top"&&g.jsx(Tt,{placement:n0}),n0==="left"&&g.jsx(Tt,{placement:n0})]}),t0)}const vs={top:"bottom",bottom:"top",left:"right",right:"left"},xs={top:"translate(-50%, -100%)",bottom:"translate(-50%, 0)",left:"translate(-100%, -50%)",right:"translate(0, -50%)"};function $1({content:s,variant:l="dark",longitude:u,latitude:f,targetElement:h,placement:y="top",offset:m=8,trigger:C="hover",visible:x,title:L,items:M,overlayContainer:S,className:z}){const{resolvedTheme:H}=Yr(),D=jA(),V=x!==void 0,[O,R]=b.useState(!1),N=V?x:O,F=b.useRef(null),Y=b.useRef(null),X=u!==void 0&&f!==void 0;b.useEffect(()=>{if(X||!h||V)return;const B=()=>{Y.current=setTimeout(()=>R(!0),100)},U=()=>{Y.current&&(clearTimeout(Y.current),Y.current=null),R(!1)},e0=()=>{Y.current&&clearTimeout(Y.current),R(c0=>!c0)};return C==="hover"?(h.addEventListener("mouseenter",B),h.addEventListener("mouseleave",U)):h.addEventListener("click",e0),()=>{Y.current&&clearTimeout(Y.current),h.removeEventListener("mouseenter",B),h.removeEventListener("mouseleave",U),h.removeEventListener("click",e0)}},[h,C,X,V]);const n0=b.useCallback(()=>{if(!h||!F.current)return;const B=h.getBoundingClientRect(),U=F.current.getBoundingClientRect();let e0=0,c0=0;switch(y){case"right":e0=B.right+m,c0=B.top+B.height/2-U.height/2;break;case"bottom":e0=B.left+B.width/2-U.width/2,c0=B.bottom+m;break;case"left":e0=B.left-U.width-m,c0=B.top+B.height/2-U.height/2;break;case"top":default:e0=B.left+B.width/2-U.width/2,c0=B.top-U.height-m;break}const h0=8;e0=Math.max(h0,Math.min(e0,window.innerWidth-U.width-h0)),c0=Math.max(h0,Math.min(c0,window.innerHeight-U.height-h0)),F.current.style.display="",F.current.style.left=`${e0}px`,F.current.style.top=`${c0}px`},[h,y,m]);b.useEffect(()=>{if(X||!N||!h)return;n0();const B=()=>n0();return window.addEventListener("resize",B),window.addEventListener("scroll",B,!0),()=>{window.removeEventListener("resize",B),window.removeEventListener("scroll",B,!0)}},[N,h,X,n0]);const Z=b.useCallback(()=>{var B,U;if(!D)return null;try{const e0=D.mapService,c0=((B=e0==null?void 0:e0.getContainer)==null?void 0:B.call(e0))??((U=D.getMapContainer)==null?void 0:U.call(D))??D.container;if(c0 instanceof HTMLElement)return c0.getBoundingClientRect()}catch{}return null},[D]),G=b.useRef(()=>{});G.current=(B,U)=>{const e0=F.current;if(!e0||!X)return;let c0=0,h0=0;switch(y){case"top":h0=-m;break;case"bottom":h0=m;break;case"left":c0=-m;break;case"right":c0=m;break}const p0=Z();let S0=!0;if(p0&&p0.width>0&&p0.height>0&&(S0=B>=-2&&B<=p0.width+2&&U>=-2&&U<=p0.height+2),!S0){e0.style.display="none";return}const Z0=p0?p0.left:0,x0=p0?p0.top:0,g0=Math.round(B+c0+Z0),T0=Math.round(U+h0+x0),j0=xs[y];e0.style.display="",e0.style.transform=`translate3d(${g0}px, ${T0}px, 0) ${j0}`};const r0=b.useCallback(()=>{if(!(!D||!X))try{const B=D.mapService,U=B?B.lngLatToContainer([u,f]):D.lngLatToContainer([u,f]);if(!U||isNaN(U.x)||isNaN(U.y))return;G.current(U.x,U.y)}catch{}},[D,u,f,X]);if(b.useEffect(()=>{if(!X||!N)return;const B=requestAnimationFrame(()=>r0());return()=>cancelAnimationFrame(B)},[N,X,r0]),U1(X?D:null,u??0,f??0,(B,U)=>{G.current(B,U)}),!N)return null;const A0=vs[y],o0=L||M&&M.length>0,q=()=>s?typeof s=="string"?g.jsx("span",{dangerouslySetInnerHTML:{__html:s}}):s:o0?g.jsxs(g.Fragment,{children:[L&&g.jsx("p",{className:"font-sans text-xs leading-4 font-semibold m-0 mb-0.5",children:L}),M&&M.length>0&&g.jsx("div",{className:"flex flex-col gap-0.5",children:M.map((B,U)=>g.jsxs("div",{className:"flex justify-between items-center gap-3",children:[g.jsx("span",{className:"text-xs leading-4 font-normal opacity-70 m-0",children:B.label}),g.jsx("span",{className:"font-mono text-xs leading-4 font-[450] text-right m-0",children:B.value})]},U))})]}):null,t0=g.jsxs("div",{ref:F,"data-theme":H,className:vA("aimapui-tooltip",l!=="dark"&&`aimapui-tooltip--${l}`),style:{position:"fixed",left:0,top:0,transform:"translate(-9999px, -9999px)",display:"none",zIndex:9999,pointerEvents:"none"},children:[g.jsx("div",{className:vA("aimapui-tooltip-content",z),children:q()}),g.jsx("div",{className:`aimapui-tooltip-arrow aimapui-tooltip-arrow--${A0}`})]});return $e.createPortal(t0,document.body)}function bs(s,l){let u;switch(s.type){case"point":u=t2(s);break;case"line":u=n2(s);break;case"polygon":u=r2(s);break;case"heatmap":u=i2(s);break;case"raster":u=o2(s);break;case"image":u=s2(s);break;default:return console.warn(`[aimapui] Unknown layer type: ${s.type}`),null}return ws(u)}function ws(s,l){var M;const u=zA[s.type];if(!u)throw new Error(`[aimapui] L7 layer class "${s.type}" not found`);const f=new u({...s.schema.zIndex!==void 0?{zIndex:s.schema.zIndex}:{},...s.schema.name?{name:s.schema.name}:{}}),{data:h,options:y}=s.sourceConfig;y?f.source(h,y):f.source(h);const{color:m,size:C,shape:x,style:L}=s.visual;if(m&&(m.field&&m.values?f.color(m.field,m.values):m.values&&f.color(m.values)),C&&(C.field&&C.values?f.size(C.field,C.values):C.values!==void 0&&f.size(C.values)),x&&(x.field&&x.values?f.shape(x.field,x.values):x.values&&f.shape(x.values)),L&&Object.keys(L).length>0&&f.style(L),s.type==="PointLayer"&&!x&&f.shape("circle"),s.type==="LineLayer"&&!x&&f.shape("line"),s.schema.filterField&&s.schema.filterValues){const S=s.schema.filterField,z=s.schema.filterValues;f.filter(S,H=>z.includes(H))}return(M=s.schema.animate)!=null&&M.enable&&f.animate(!0,s.schema.animate),s.schema.active&&f.active(s.schema.active),s.schema.select&&f.select(s.schema.select),s.schema.opacity!==void 0&&f.style({opacity:s.schema.opacity}),s.schema.blend&&f.blend(s.schema.blend),s.schema.visible===!1&&f.hide(),s.schema.minZoom!==void 0&&f.minZoom(s.schema.minZoom),s.schema.maxZoom!==void 0&&f.maxZoom(s.schema.maxZoom),f}function Ft(s,l,u){var C,x,L,M,S,z,H,D;const f=u,h=Number.isFinite((C=f==null?void 0:f.lnglat)==null?void 0:C.lng)?f.lnglat.lng:Number.isFinite((x=f==null?void 0:f.lngLat)==null?void 0:x.lng)?f.lngLat.lng:Number.isFinite((L=f==null?void 0:f.coordinate)==null?void 0:L.lng)?f.coordinate.lng:0,y=Number.isFinite((M=f==null?void 0:f.lnglat)==null?void 0:M.lat)?f.lnglat.lat:Number.isFinite((S=f==null?void 0:f.lngLat)==null?void 0:S.lat)?f.lngLat.lat:Number.isFinite((z=f==null?void 0:f.coordinate)==null?void 0:z.lat)?f.coordinate.lat:0,m=((H=f==null?void 0:f.feature)==null?void 0:H.properties)??(f==null?void 0:f.feature)??((D=f==null?void 0:f.data)==null?void 0:D.properties)??(f==null?void 0:f.data)??void 0;return{layerId:s,layerType:l,originalEvent:u,lng:h,lat:y,feature:m}}function Ge({schema:s,scene:l,eventHandlers:u,onLayerCreated:f}){const h=b.useRef(null),y=Z1(),m=b.useRef(u);m.current=u;const C=b.useMemo(()=>{const{source:M,...S}=s;let z;if(ArrayBuffer.isView(M))z=`TypedArray:${M.length}`;else if(M&&typeof M=="object"&&"width"in M){const H=M;z=`Rasters:${H.width}x${H.height}:${H.length}`}else if(typeof M=="string")z=M;else try{z=JSON.stringify(M)}catch{z=String(M)}return z+"|"+Ls(S)},[s]),[x,L]=b.useState({visible:!1,lng:0,lat:0,content:"",trigger:"click"});return b.useEffect(()=>{var n0,Z,G,r0;const M=bs(s);if(!M)return;let S=!1;h.current=M;const z=s.id??s.name??`layer-${s.type}`,H=s.events,D=!!(H!=null&&H.enablePopup),V=(H==null?void 0:H.popupTrigger)??"click",O=A0=>{if(!D)return;const o0=A0.feature;if(!o0)return;const q=ks(o0,H==null?void 0:H.popupFields,H==null?void 0:H.popupTemplate);L({visible:!0,lng:A0.lng,lat:A0.lat,content:q,trigger:V})},R=()=>{L(A0=>({...A0,visible:!1}))},N=!!((n0=m.current)!=null&&n0.onClick||H!=null&&H.click||D&&V==="click"),F=!!((Z=m.current)!=null&&Z.onMouseMove||H!=null&&H.mousemove||D&&V==="hover"),Y=!!((G=m.current)!=null&&G.onMouseEnter||H!=null&&H.mouseenter),X=!!((r0=m.current)!=null&&r0.onMouseLeave||H!=null&&H.mouseleave||D&&V==="hover");return N&&M.on("click",A0=>{var q,t0;const o0=Ft(z,s.type,A0);(t0=(q=m.current)==null?void 0:q.onClick)==null||t0.call(q,o0),H!=null&&H.click&&y.emit(H.click,o0),V==="click"&&O(o0)}),F&&M.on("mousemove",A0=>{var q,t0;const o0=Ft(z,s.type,A0);(t0=(q=m.current)==null?void 0:q.onMouseMove)==null||t0.call(q,o0),V==="hover"&&O(o0),H!=null&&H.mousemove&&y.emit(H.mousemove,o0)}),Y&&M.on("mouseenter",A0=>{var q,t0;const o0=Ft(z,s.type,A0);(t0=(q=m.current)==null?void 0:q.onMouseEnter)==null||t0.call(q,o0),H!=null&&H.mouseenter&&y.emit(H.mouseenter,o0)}),X&&M.on("mouseleave",A0=>{var q,t0;const o0=Ft(z,s.type,A0);(t0=(q=m.current)==null?void 0:q.onMouseLeave)==null||t0.call(q,o0),V==="hover"&&R(),H!=null&&H.mouseleave&&y.emit(H.mouseleave,o0)}),l.addLayer(M),f==null||f(M),M.on("inited",()=>{var A0,o0;if(!S){if(s.autoFit){const q=(o0=(A0=M.getSource)==null?void 0:A0.call(M))==null?void 0:o0.extent;if(q&&Array.isArray(q)&&q.length>=4){const[t0,B,U,e0]=q;isFinite(t0)&&isFinite(B)&&isFinite(U)&&isFinite(e0)&&t0<U&&B<e0&&l.fitBounds([[t0,B],[U,e0]])}}l.render()}}),()=>{if(S=!0,h.current){try{l.removeLayer(h.current)}catch{}h.current=null}L(A0=>({...A0,visible:!1}))}},[C,l,y]),b.useEffect(()=>{h.current&&(s.visible===!1?h.current.hide():h.current.show(),s.zIndex!==void 0&&(h.current.zIndex=s.zIndex))},[s.visible,s.zIndex]),x.visible?x.trigger==="hover"?g.jsx($1,{longitude:x.lng,latitude:x.lat,content:x.content,variant:"dark",placement:"top",visible:!0}):g.jsx(kt,{longitude:x.lng,latitude:x.lat,content:x.content,closeButton:!0,size:"compact",onClose:()=>L(M=>({...M,visible:!1}))}):null}function Ls(s){return JSON.stringify(_1(s))}function _1(s){if(ArrayBuffer.isView(s))return`[TypedArray:${s.length}]`;if(s instanceof ArrayBuffer)return`[ArrayBuffer:${s.byteLength}]`;if(Array.isArray(s))return s.length>1e3?`[Array:${s.length}]`:s.map(_1);if(s&&typeof s=="object"){const l=s,u=Object.keys(l).sort(),f={};return u.forEach(h=>{f[h]=_1(l[h])}),f}return s}function ks(s,l,u){return u?u.replace(/\{\{(\w+)\}\}/g,(y,m)=>String(s[m]??"")):`<table style="font-size:12px">${(l??Object.keys(s).filter(y=>!["_id","id","geometry","coordinates"].includes(y))).map(y=>`<tr><td style="font-weight:600;padding-right:8px">${y}</td><td>${s[y]??""}</td></tr>`).join("")}</table>`}function l2({layers:s,eventHandlers:l}){const u=jA();return u?g.jsx(g.Fragment,{children:s.map((f,h)=>g.jsx(Ge,{schema:f,scene:u,eventHandlers:l},f.id??`layer-${h}`))}):null}const a2=b.createContext(!1);function XA(){return b.useContext(a2)}const E1=new Set,OA={mark(s){s&&typeof s=="object"&&"$$typeof"in s&&E1.add(s),s&&typeof s=="function"&&E1.add(s)},check(s){if("position"in s.props)return!0;const l=s.type;if(E1.has(l))return!0;const u=l==null?void 0:l.displayName;return!!(typeof u=="string"&&u.endsWith("Control"))}};function W1({children:s,className:l,style:u}){const{controlGroups:f,otherChildren:h}=Ms(s);return g.jsx(a2.Provider,{value:!0,children:g.jsxs("div",{className:`l7-control-container${l?` ${l}`:""}`,style:u,children:[Object.entries(f).map(([y,m])=>{const C=zs(y);return g.jsx("div",{className:`l7-control-anchor ${C}`,children:m},y)}),h]})})}function Ms(s){const l={},u=[];return b.Children.forEach(s,(f,h)=>{var y;if(!b.isValidElement(f)){u.push(f);return}if(OA.check(f)){const m=((y=f.props)==null?void 0:y.position)??"topright";l[m]||(l[m]=[]),l[m].push(f)}else u.push(b.isValidElement(f)?b.cloneElement(f,{key:f.key??`non-ctrl-${h}`}):f)}),{controlGroups:l,otherChildren:u}}function Es(s){switch(s){case"topleft":return{vSide:"top",hSide:"left",direction:"column"};case"topright":return{vSide:"top",hSide:"right",direction:"column"};case"bottomleft":return{vSide:"bottom",hSide:"left",direction:"column"};case"bottomright":return{vSide:"bottom",hSide:"right",direction:"column"};case"topcenter":return{vSide:"top",hSide:"left",direction:"row"};case"bottomcenter":return{vSide:"bottom",hSide:"left",direction:"row"};case"lefttop":return{vSide:"top",hSide:"left",direction:"row"};case"leftbottom":return{vSide:"bottom",hSide:"left",direction:"row"};case"righttop":return{vSide:"top",hSide:"right",direction:"row"};case"rightbottom":return{vSide:"bottom",hSide:"right",direction:"row"};default:return{vSide:"top",hSide:"right",direction:"column"}}}function zs(s){if(s==="rightcenter")return"l7-rightcenter l7-column";if(s==="leftcenter")return"l7-leftcenter l7-column";const{vSide:l,hSide:u,direction:f}=Es(s);return`l7-${l} l7-${u} l7-${f}`}function JA(s){const l=jA(),u=b.useMemo(()=>{if(!l)return null;try{return l.mapService??null}catch{return null}},[l]),f=b.useCallback(()=>{var y;if(!l)return null;try{return u&&typeof u.getContainer=="function"?u.getContainer():((y=l.getContainer)==null?void 0:y.call(l))??null}catch{return null}},[l,u]),h=b.useMemo(()=>{if(s==="rightcenter")return"l7-rightcenter l7-column";if(s==="leftcenter")return"l7-leftcenter l7-column";const{vSide:y,hSide:m,direction:C}=js(s??"topright");return`l7-${y} l7-${m} l7-${C}`},[s]);return{scene:l,mapsService:u,getMapContainer:f,positionClassName:h}}function js(s){switch(s){case"topleft":return{vSide:"top",hSide:"left",direction:"column"};case"topright":return{vSide:"top",hSide:"right",direction:"column"};case"bottomleft":return{vSide:"bottom",hSide:"left",direction:"column"};case"bottomright":return{vSide:"bottom",hSide:"right",direction:"column"};case"topcenter":return{vSide:"top",hSide:"left",direction:"row"};case"bottomcenter":return{vSide:"bottom",hSide:"left",direction:"row"};case"lefttop":return{vSide:"top",hSide:"left",direction:"row"};case"leftbottom":return{vSide:"bottom",hSide:"left",direction:"row"};case"righttop":return{vSide:"top",hSide:"right",direction:"row"};case"rightbottom":return{vSide:"bottom",hSide:"right",direction:"row"};case"rightcenter":return{vSide:"top",hSide:"right",direction:"column"};case"leftcenter":return{vSide:"top",hSide:"left",direction:"column"};default:return{vSide:"top",hSide:"right",direction:"column"}}}function G1({position:s="bottomright",zoomInText:l,zoomInTitle:u="Zoom in",zoomOutText:f,zoomOutTitle:h="Zoom out",showZoom:y=!1,className:m,style:C}){const{scene:x,mapsService:L,positionClassName:M}=JA(s),S=XA(),[z,H]=b.useState(0),[D,V]=b.useState(!0),[O,R]=b.useState(!0),N=b.useRef(()=>{if(!L)return;const n0=Math.floor(L.getZoom());H(n0),V(L.getZoom()<L.getMaxZoom()),R(L.getZoom()>L.getMinZoom())});b.useEffect(()=>{if(!L)return;N.current();const n0=()=>N.current();return L.on("zoomend",n0),L.on("zoomchange",n0),()=>{L.off("zoomend",n0),L.off("zoomchange",n0)}},[L]);const F=()=>{if(!L||!x)return;const n0=L.getZoom(),Z=L.getMaxZoom();if(n0<Z){const G=Math.min(n0+1,Z);x.setZoom(G)}},Y=()=>{if(!L||!x)return;const n0=L.getZoom(),Z=L.getMinZoom();if(n0>Z){const G=Math.max(n0-1,Z);x.setZoom(G)}},X=g.jsxs("div",{className:`l7-control l7-control-zoom l7-control--glass${m?` ${m}`:""}`,style:C,children:[g.jsx("button",{className:"l7-button-control",onClick:F,disabled:!D,title:u,"aria-label":u,children:l??g.jsx("span",{className:"material-symbols-outlined",children:"add"})}),y&&g.jsx("button",{className:"l7-button-control l7-control-zoom__number",disabled:!0,children:z}),g.jsx("button",{className:"l7-button-control",onClick:Y,disabled:!O,title:h,"aria-label":h,children:f??g.jsx("span",{className:"material-symbols-outlined",children:"remove"})})]});return S?X:g.jsx("div",{className:`l7-control-anchor ${M}`,children:X})}OA.mark(G1);function Ss(s,l){const[u,f]=s,[h,y]=l,m=63710088e-1,C=(y-f)*Math.PI/180,x=(h-u)*Math.PI/180,L=Math.sin(C/2)*Math.sin(C/2)+Math.cos(f*Math.PI/180)*Math.cos(y*Math.PI/180)*Math.sin(x/2)*Math.sin(x/2),M=2*Math.atan2(Math.sqrt(L),Math.sqrt(1-L));return m*M}function z1(s){const l=Math.pow(10,Math.floor(Math.abs(s)).toString().length-1);let u=s/l;return u=u>=10?10:u>=5?5:u>=3?3:u>=2?2:1,l*u}function Y1({position:s="bottomleft",maxWidth:l=100,metric:u=!0,imperial:f=!1,updateWhenIdle:h=!1,className:y,style:m}){const{mapsService:C,positionClassName:x}=JA(s),L=XA(),[M,S]=b.useState([]),z=b.useRef(()=>{if(C)try{const V=C.getSize()[1]/2,O=C.containerToLngLat([0,V]),R=C.containerToLngLat([l,V]);if(!O||!R)return;const N=Ss([O.lng,O.lat],[R.lng,R.lat]),F=[];if(u&&N){const Y=z1(N),X=Y<1e3?`${Y} m`:`${Y/1e3} km`;F.push({text:X,width:Math.round(l*(Y/N))})}if(f&&N){const Y=N*3.2808399;if(Y>5280){const X=Y/5280,n0=z1(X);F.push({text:`${n0} mi`,width:Math.round(l*(n0/X))})}else{const X=z1(Y);F.push({text:`${X} ft`,width:Math.round(l*(X/Y))})}}S(F)}catch{}});b.useEffect(()=>{if(!C)return;z.current();const D=()=>z.current(),V=h?"moveend":"mapmove",O=h?"zoomend":"zoomchange";return C.on(V,D),C.on(O,D),()=>{C.off(V,D),C.off(O,D)}},[C,l,u,f,h]);const H=g.jsx("div",{className:`l7-control l7-control-scale l7-control--glass${y?` ${y}`:""}`,style:m,children:M.map((D,V)=>g.jsx("div",{className:"l7-control-scale-line",style:{width:D.width},children:D.text},V))});return L?H:g.jsx("div",{className:`l7-control-anchor ${x}`,children:H})}OA.mark(Y1);function q1({position:s="topright",container:l,className:u,style:f}){const{getMapContainer:h,positionClassName:y}=JA(s),m=XA(),[C,x]=b.useState(!1),L=b.useCallback(()=>l??h()??document.documentElement,[l,h]),M=b.useCallback(()=>{const z=L();C?document.exitFullscreen?document.exitFullscreen():document.webkitExitFullscreen&&document.webkitExitFullscreen():z.requestFullscreen?z.requestFullscreen():z.webkitRequestFullscreen&&z.webkitRequestFullscreen()},[C,L]);b.useEffect(()=>{const z=()=>{x(!!document.fullscreenElement)};return document.addEventListener("fullscreenchange",z),()=>document.removeEventListener("fullscreenchange",z)},[]);const S=g.jsx("div",{className:`l7-control l7-control--glass${u?` ${u}`:""}`,style:f,children:g.jsx("button",{className:"l7-button-control",onClick:M,title:C?"退出全屏":"全屏","aria-label":C?"退出全屏":"全屏",children:g.jsx("span",{className:"material-symbols-outlined",children:C?"fullscreen_exit":"fullscreen"})})});return m?S:g.jsx("div",{className:`l7-control-anchor ${y}`,children:S})}OA.mark(q1);function X1({position:s="topright",transform:l,className:u,style:f}){const{mapsService:h,positionClassName:y}=JA(s),m=XA(),C=b.useCallback(async()=>{if(!window.navigator.geolocation){console.warn("[aimapui] Geolocation is not supported by this browser");return}if(h)try{const L=await new Promise((V,O)=>{window.navigator.geolocation.getCurrentPosition(({coords:R})=>V(R),R=>O(R))}),{longitude:M,latitude:S}=L;if(isNaN(M)||isNaN(S))return;const z=[M,S],H=l?await l(z):z,D=h.getZoom();h.setZoomAndCenter(D>15?D:15,H)}catch(L){console.warn("[aimapui] Geolocation error:",L)}},[h,l]),x=g.jsx("div",{className:`l7-control l7-control--glass${u?` ${u}`:""}`,style:f,children:g.jsx("button",{className:"l7-button-control",onClick:C,title:"定位","aria-label":"定位",children:g.jsx("span",{className:"material-symbols-outlined",children:"my_location"})})});return m?x:g.jsx("div",{className:`l7-control-anchor ${y}`,children:x})}OA.mark(X1);const Ds=["l7-popper-left","l7-popper-right","l7-popper-top","l7-popper-bottom"],Hs=["l7-popper-start","l7-popper-end"];function I1(s){switch(s){case"topleft":return"l7-popper-bottom l7-popper-start";case"topright":return"l7-popper-bottom l7-popper-end";case"bottomleft":return"l7-popper-top l7-popper-start";case"bottomright":return"l7-popper-top l7-popper-end";case"lefttop":return"l7-popper-right l7-popper-start";case"leftbottom":return"l7-popper-right l7-popper-end";case"righttop":return"l7-popper-left l7-popper-start";case"rightbottom":return"l7-popper-left l7-popper-end";default:return"l7-popper-bottom"}}function J1(s,l,u){const f=b.useRef(null),[h,y]=b.useState(()=>I1(s));return b.useEffect(()=>{if(!l)return;const m=I1(s);y(m);const C=()=>{const L=f.current;if(!L)return;const M=L.getBoundingClientRect(),S=window.innerWidth,z=window.innerHeight;let H="",D="";if(M.bottom>z-8?H="l7-popper-top":M.top<8&&(H="l7-popper-bottom"),M.right>S-8?D="l7-popper-end":M.left<8&&(D="l7-popper-start"),!H&&!D)return;const V=m.split(" "),O=V.find(N=>Ds.includes(N))??"",R=V.find(N=>Hs.includes(N))??"";y(`${H||O} ${D||R}`.trim())};requestAnimationFrame(C);const x=setTimeout(()=>requestAnimationFrame(C),50);return()=>clearTimeout(x)},[l,s]),{popperRef:f,popperClass:h}}const P1=[{text:"Standard",value:"normal",preview:"linear-gradient(135deg, #e8e8e8 0%, #c8d8e8 40%, #a8c8d8 100%)"},{text:"Light",value:"light",preview:"linear-gradient(135deg, #f0f4f8 0%, #d6e4f0 40%, #e8eff5 100%)"},{text:"Dark",value:"dark",preview:"linear-gradient(135deg, #0d1b2a 0%, #1b2838 40%, #162032 100%)"},{text:"Dark Blue",value:"darkblue",preview:"linear-gradient(135deg, #0a1628 0%, #0f2040 40%, #091a30 100%)"},{text:"Satellite",value:"satellite",preview:"linear-gradient(135deg, #1a3a1a 0%, #2d5a2d 40%, #1d4a2d 100%)"},{text:"Fresh",value:"fresh",preview:"linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 40%, #d4edda 100%)"}],Bs=[{text:"Positron",value:"https://tiles.openfreemap.org/styles/positron",preview:"linear-gradient(135deg, #f2f3f0 0%, #d8dcd6 40%, #e8ebe5 100%)"},{text:"Bright",value:"https://tiles.openfreemap.org/styles/bright",preview:"linear-gradient(135deg, #e8e8e8 0%, #c8d8e8 40%, #a8c8d8 100%)"},{text:"Dark",value:"https://tiles.openfreemap.org/styles/dark",preview:"linear-gradient(135deg, #1a1a2e 0%, #16213e 40%, #0f3460 100%)"},{text:"Liberty",value:"https://tiles.openfreemap.org/styles/liberty",preview:"linear-gradient(135deg, #f0ece2 0%, #dfd7c8 40%, #c8bfad 100%)"},{text:"Fiord",value:"https://tiles.openfreemap.org/styles/fiord",preview:"linear-gradient(135deg, #2c3e50 0%, #34495e 40%, #415b76 100%)"}],Vs=[{text:"Light",value:"light",preview:"linear-gradient(135deg, #f0f4f8 0%, #d6e4f0 40%, #e8eff5 100%)"},{text:"Dark",value:"dark",preview:"linear-gradient(135deg, #0d1b2a 0%, #1b2838 40%, #162032 100%)"},{text:"Normal",value:"normal",preview:"linear-gradient(135deg, #e8e8e8 0%, #c8d8e8 40%, #a8c8d8 100%)"}];function K1({position:s="topright",options:l,defaultValue:u,onThemeChange:f,className:h,style:y}){const{mapsService:m,positionClassName:C}=JA(s),x=XA(),[L,M]=b.useState(!1),[S,z]=b.useState(u??""),[H,D]=b.useState(l??[]),V=b.useRef(null),{popperRef:O,popperClass:R}=J1(s,L);b.useEffect(()=>{var Y;if(l&&l.length>0){D(l);return}if(m){try{const X=(Y=m.getMapStyleConfig)==null?void 0:Y.call(m);if(X&&typeof X=="object"){const n0=Object.entries(X).filter(([,Z])=>typeof Z=="string").map(([Z,G])=>{const r0=P1.find(A0=>A0.value===G);return{text:Z,value:G,preview:r0==null?void 0:r0.preview}});if(n0.length>0){D(n0);return}}}catch{}D(P1)}},[m,l]),b.useEffect(()=>{var Y;if(u){z(u);return}if(m)try{const X=(Y=m.getMapStyle)==null?void 0:Y.call(m);X&&z(X)}catch{}},[m,u]),b.useEffect(()=>{if(!L)return;const Y=X=>{V.current&&!V.current.contains(X.target)&&M(!1)};return document.addEventListener("mousedown",Y),()=>document.removeEventListener("mousedown",Y)},[L]);const N=b.useCallback(Y=>{if(z(Y),m)try{m.setMapStyle(Y)}catch{}f==null||f(Y)},[m,f]),F=g.jsxs("div",{ref:V,className:`l7-control l7-control--glass${L?" l7-control--popper-open":""}${h?` ${h}`:""}`,style:y,children:[g.jsx("button",{className:"l7-button-control",onClick:()=>M(!L),title:"地图样式","aria-label":"地图样式",children:g.jsx("span",{className:"material-symbols-outlined",children:"palette"})}),L&&H.length>0&&g.jsx("div",{ref:O,className:`l7-popper ${R}`,children:g.jsx("div",{className:"l7-popper-content l7-theme-panel",children:g.jsx("div",{className:"l7-theme-chips",children:H.map(Y=>{const X=S===Y.value,n0=Y.preview??"linear-gradient(135deg, #e0e0e0 0%, #bdbdbd 100%)";return g.jsxs("button",{className:`l7-theme-chip${X?" l7-theme-chip--active":""}`,onClick:()=>N(Y.value),title:Y.text,children:[g.jsx("span",{className:"l7-theme-chip__dot",style:{background:n0}}),g.jsx("span",{className:"l7-theme-chip__label",children:Y.text})]},Y.value)})})})})]});return x?F:g.jsx("div",{className:`l7-control-anchor ${C}`,children:F})}OA.mark(K1);function An({position:s="bottomleft",precision:l=6,transform:u,className:f,style:h}){const m=u??(([z,H])=>[+z.toFixed(l),+H.toFixed(l)]),{mapsService:C,positionClassName:x}=JA(s),L=XA(),M=b.useRef(null);b.useEffect(()=>{if(!C)return;const z=H=>{const D=H.lngLat??H.lnglat;if(!D)return;const V=[D.lng,D.lat],O=m(V);M.current&&(M.current.innerText=O.join(", "))};return C.on("mousemove",z),()=>{C.off("mousemove",z)}},[C,m]);const S=g.jsx("div",{ref:M,className:`l7-control l7-control-mouse-location l7-control--glass${f?` ${f}`:""}`,style:h,children:" "});return L?S:g.jsx("div",{className:`l7-control-anchor ${x}`,children:S})}OA.mark(An);const en=b.forwardRef(function({position:l="topright",format:u="png",onExport:f,className:h,style:y},m){const{scene:C,mapsService:x,positionClassName:L}=JA(l),M=XA(),S=b.useCallback(async D=>{var O,R,N,F;const V=D==="jpg"?"jpeg":"png";try{const Y=x?await((O=x.exportMap)==null?void 0:O.call(x,V)):void 0,X=C?await((R=C.exportPng)==null?void 0:R.call(C,V)):void 0,n0=[Y,X].filter(Z=>!!Z);if(n0.length===2)return _s(n0,V);if(n0.length===1)return n0[0]}catch{}try{const Y=((N=x==null?void 0:x.getContainer)==null?void 0:N.call(x))??((F=C==null?void 0:C.getContainer)==null?void 0:F.call(C));if(!Y)return;const X=Y.querySelectorAll("canvas");return X.length===0?void 0:X.length===1?X[0].toDataURL(`image/${V}`):Is(Array.from(X),V)}catch{return}},[C,x]);b.useImperativeHandle(m,()=>({exportImage:S}));const z=b.useCallback(async()=>{const D=await S(u);if(f&&D){f(D);return}if(D){const V=document.createElement("a");V.download=`aimap-export.${u==="jpg"?"jpg":"png"}`,V.href=D,V.click()}},[S,u,f]),H=g.jsx("div",{className:`l7-control l7-control--glass${h?` ${h}`:""}`,style:y,children:g.jsx("button",{className:"l7-button-control",onClick:z,title:"导出图片","aria-label":"导出图片",children:g.jsx("span",{className:"material-symbols-outlined",children:"photo_camera"})})});return M?H:g.jsx("div",{className:`l7-control-anchor ${L}`,children:H})});async function _s(s,l){const u=document.querySelector(".l7-map")||document.documentElement,{width:f,height:h}=u.getBoundingClientRect();if(!f||!h)return s[0];const y=document.createElement("canvas");y.width=f,y.height=h;const m=y.getContext("2d");return(await Promise.all(s.map(Ps))).forEach(x=>m==null?void 0:m.drawImage(x,0,0,f,h)),y.toDataURL(`image/${l}`)}function Is(s,l){const{width:u,height:f}=s[0],h=document.createElement("canvas");h.width=u,h.height=f;const y=h.getContext("2d");return s.forEach(m=>y==null?void 0:y.drawImage(m,0,0)),h.toDataURL(`image/${l}`)}function Ps(s){return new Promise(l=>{const u=new Image;u.onload=()=>l(u),u.src=s})}OA.mark(en);function tn({position:s="topright",layers:l,onToggle:u,onOpacityChange:f,className:h,style:y}){const[m,C]=b.useState(!1),x=b.useRef(null),[L,M]=b.useState(()=>{const R={};return l.forEach(N=>{R[N.id]=N.opacity??1}),R});b.useEffect(()=>{M(R=>{const N={...R};return l.forEach(F=>{F.opacity!==void 0&&(N[F.id]=F.opacity)}),N})},[l]);const{positionClassName:S}=JA(s),z=XA(),{popperRef:H,popperClass:D}=J1(s,m);if(b.useEffect(()=>{if(!m)return;const R=N=>{x.current&&!x.current.contains(N.target)&&C(!1)};return document.addEventListener("mousedown",R),()=>document.removeEventListener("mousedown",R)},[m]),!l.length)return null;const V=(R,N)=>{M(F=>({...F,[R]:N})),f==null||f(R,N)},O=g.jsxs("div",{ref:x,className:`l7-control l7-control--glass${m?" l7-control--popper-open":""}${h?` ${h}`:""}`,style:y,children:[g.jsx("button",{className:"l7-button-control",onClick:()=>C(!m),title:"图层控制","aria-label":"图层控制",children:g.jsx("span",{className:"material-symbols-outlined",children:"layers"})}),m&&g.jsx("div",{ref:H,className:`l7-popper ${D}`,children:g.jsxs("div",{className:"l7-popper-content l7-layer-panel",children:[g.jsxs("div",{className:"l7-layer-panel__title",children:[g.jsx("span",{className:"material-symbols-outlined",style:{fontSize:16},children:"layers"}),"Layers"]}),g.jsx("div",{className:"l7-layer-panel__list",children:l.map(R=>{const N=R.visible!==!1,F=L[R.id]??R.opacity??1,Y=R.icon??"layers";return g.jsxs("div",{className:`l7-layer-item${N?"":" l7-layer-item--disabled"}`,children:[g.jsxs("div",{className:"l7-layer-item__header",children:[g.jsx("span",{className:"material-symbols-outlined l7-layer-item__icon",children:Y}),g.jsx("span",{className:"l7-layer-item__name",children:R.name??R.id}),g.jsxs("label",{className:"l7-layer-toggle",children:[g.jsx("input",{type:"checkbox",checked:N,onChange:()=>u(R.id,!N)}),g.jsx("span",{className:"l7-layer-toggle__track"})]})]}),f&&g.jsxs("div",{className:"l7-layer-item__slider",children:[g.jsx("span",{className:"material-symbols-outlined",style:{fontSize:14},children:"opacity"}),g.jsx("input",{type:"range",min:0,max:100,value:Math.round(F*100),onChange:X=>V(R.id,+X.target.value/100),className:"l7-layer-slider"})]})]},R.id)})})]})})]});return z?O:g.jsx("div",{className:`l7-control-anchor ${S}`,children:O})}OA.mark(tn);function Ts(s){return{mode:"none",features:s?[...s]:[],selectedFeatureId:null,isDrawing:!1,currentVertices:[],startPoint:null,mousePoint:null,dragVertexIndex:null,isDragging:!1,mergeSelectedIds:[],splitTargetId:null}}const ne={point:{color:"#3f51b5",size:6,strokeColor:"#ffffff",strokeWidth:2},line:{color:"#3f51b5",size:2,opacity:1},polygon:{fill:"#3f51b5",fillOpacity:.2,stroke:"#3f51b5",strokeWidth:2},drawing:{fill:"#3f51b5",fillOpacity:.2,stroke:"#3f51b5",strokeWidth:2,dashStroke:"#3f51b5",dashWidth:1.5,dashArray:[4,4]},selected:{stroke:"#3f51b5",strokeWidth:3,fill:"#ffb95f",fillOpacity:.12,dashArray:[6,3]},vertex:{color:"#3f51b5",size:6,strokeColor:"#ffffff",strokeWidth:2,activeColor:"#ffb95f",activeSize:6}};function Fs(s){return s?{point:{...ne.point,...s.point},line:{...ne.line,...s.line},polygon:{...ne.polygon,...s.polygon},drawing:{...ne.drawing,...s.drawing},selected:{...ne.selected,...s.selected},vertex:{...ne.vertex,...s.vertex}}:{...ne}}let Rs=0;function Ns(){return`draw-${++Rs}`}function c2(s){return{type:"LineString",coordinates:s.map(([l,u])=>[l,u])}}function u2(s){const l=s.map(([u,f])=>[u,f]);if(l.length>0){const u=l[0],f=l[l.length-1];(u[0]!==f[0]||u[1]!==f[1])&&l.push([u[0],u[1]])}return{type:"Polygon",coordinates:[l]}}function f2(s,l){const[u,f]=s,[h,y]=l;return{type:"Polygon",coordinates:[[[u,f],[h,f],[h,y],[u,y],[u,f]]]}}function d2(s,l,u=64){const[f,h]=s,y=[];for(let m=0;m<u;m++){const C=m/u*2*Math.PI,x=l/(111320*Math.cos(h*Math.PI/180))*Math.cos(C),L=l/110540*Math.sin(C);y.push([f+x,h+L])}return y.push(y[0]),{type:"Polygon",coordinates:[y]}}function Zs(s){return{type:"Point",coordinates:[s[0],s[1]]}}function sr(s,l){const f=x=>x*Math.PI/180,h=f(l[1]-s[1]),y=f(l[0]-s[0]),m=Math.sin(h/2)*Math.sin(h/2)+Math.cos(f(s[1]))*Math.cos(f(l[1]))*Math.sin(y/2)*Math.sin(y/2);return 6371e3*(2*Math.atan2(Math.sqrt(m),Math.sqrt(1-m)))}function h2(s,l){const u=l.x-s.x,f=l.y-s.y;return Math.sqrt(u*u+f*f)}function Ve(s,l,u){return{type:"Feature",id:Ns(),geometry:s,properties:{drawType:l}}}function Qs(s,l,u){const f=s.geometry,h=Os(f,l,u);return{...s,geometry:h,properties:{...s.properties}}}function Os(s,l,u){switch(s.type){case"Point":return{type:"Point",coordinates:[s.coordinates[0]+l,s.coordinates[1]+u]};case"LineString":return{type:"LineString",coordinates:s.coordinates.map(([f,h])=>[f+l,h+u])};case"Polygon":return{type:"Polygon",coordinates:s.coordinates.map(f=>f.map(([h,y])=>[h+l,y+u]))};default:return s}}function Us(s,l,u,f){const h=s.geometry;let y;if(h.type==="Point")y={type:"Point",coordinates:[u,f]};else if(h.type==="LineString"){const m=h.coordinates.map(C=>[...C]);l>=0&&l<m.length&&(m[l]=[u,f]),y={type:"LineString",coordinates:m}}else if(h.type==="Polygon"){const m=h.coordinates.map(L=>L.map(M=>[...M])),C=m[0],x=C.length>1&&C[0][0]===C[C.length-1][0]&&C[0][1]===C[C.length-1][1]?C.length-1:C.length;l>=0&&l<x&&(C[l]=[u,f],l===0&&(C[C.length-1]=[u,f])),y={type:"Polygon",coordinates:m}}else y=h;return{...s,geometry:y,properties:{...s.properties}}}function $t(s){const l=s.geometry,u=[];if(l.type==="Point")u.push([l.coordinates[0],l.coordinates[1]]);else if(l.type==="LineString")l.coordinates.forEach(([f,h])=>{u.push([f,h])});else if(l.type==="Polygon"){const f=l.coordinates[0];if(f&&f.length>1){const h=f[0][0]===f[f.length-1][0]&&f[0][1]===f[f.length-1][1]?f.length-1:f.length;for(let y=0;y<h;y++)u.push([f[y][0],f[y][1]])}}return u}function We(s){const l=s.lnglat,u=s.lngLat;if(l&&typeof l.lng=="number"&&typeof l.lat=="number")return[l.lng,l.lat];if(u&&typeof u.lng=="number"&&typeof u.lat=="number")return[u.lng,u.lat];const f=s.coordinate;return f&&typeof f[0]=="number"&&typeof f[1]=="number"?[f[0],f[1]]:null}function $s(s){return{type:"FeatureCollection",features:s.filter(l=>l.geometry.type==="LineString")}}function Ws(s){return{type:"FeatureCollection",features:s.filter(l=>l.geometry.type==="Polygon")}}function Gs(s,l){const u=lr(s.coordinates[0]),f=lr(l.coordinates[0]);let h=0;const y=new Set(u.map(m=>`${m[0].toFixed(7)},${m[1].toFixed(7)}`));for(const m of f)y.has(`${m[0].toFixed(7)},${m[1].toFixed(7)}`)&&h++;if(h>=2)return!0;for(let m=0;m<u.length;m++){const C=(m+1)%u.length;for(let x=0;x<f.length;x++){const L=(x+1)%f.length;if(p2(u[m],u[C],f[x],f[L],!0))return!0}}for(const m of u)if(ar(m,f))return!0;for(const m of f)if(ar(m,u))return!0;return!1}function lr(s){const l=[],u=s.length>1&&s[0][0]===s[s.length-1][0]&&s[0][1]===s[s.length-1][1]?s.length-1:s.length;for(let f=0;f<u;f++)l.push([s[f][0],s[f][1]]);return l}function ar(s,l){let u=!1;for(let f=0,h=l.length-1;f<l.length;h=f++){const y=l[f][0],m=l[f][1],C=l[h][0],x=l[h][1];m>s[1]!=x>s[1]&&s[0]<(C-y)*(s[1]-m)/(x-m)+y&&(u=!u)}return u}function Ys(s){if(s.length<2)return null;const l=s.filter(C=>C.geometry.type==="Polygon");if(l.length<2)return null;for(let C=0;C<l.length;C++){const x=l[C].geometry;let L=!1;for(let M=0;M<l.length;M++)if(C!==M&&Gs(x,l[M].geometry)){L=!0;break}if(!L)return null}const u=[];for(const C of l){const x=C.geometry.coordinates[0];if(!x)continue;const L=x.length>1&&x[0][0]===x[x.length-1][0]&&x[0][1]===x[x.length-1][1]?x.length-1:x.length;for(let M=0;M<L;M++)u.push([x[M][0],x[M][1]])}if(u.length<3)return null;const f=[],h=new Set;for(const C of u){const x=`${C[0].toFixed(6)},${C[1].toFixed(6)}`;h.has(x)||(h.add(x),f.push(C))}if(f.length<3)return null;const y=qs(f);return y.length<3?null:(y.push(y[0]),Ve({type:"Polygon",coordinates:[y]},"polygon"))}function qs(s){if(s.length<3)return[...s];let l=0;for(let y=1;y<s.length;y++)(s[y][1]<s[l][1]||s[y][1]===s[l][1]&&s[y][0]<s[l][0])&&(l=y);const u=s[l],f=s.filter(y=>y[0]!==u[0]||y[1]!==u[1]).sort((y,m)=>{const C=Math.atan2(y[1]-u[1],y[0]-u[0]),x=Math.atan2(m[1]-u[1],m[0]-u[0]);if(C!==x)return C-x;const L=(y[0]-u[0])**2+(y[1]-u[1])**2,M=(m[0]-u[0])**2+(m[1]-u[1])**2;return L-M}),h=[u];for(const y of f){for(;h.length>1;){const m=h[h.length-2],C=h[h.length-1];if((C[0]-m[0])*(y[1]-m[1])-(C[1]-m[1])*(y[0]-m[0])<=0)h.pop();else break}h.push(y)}return h}function Xs(s,l){if(s.geometry.type!=="Polygon"||l.length<2)return null;const u=s.geometry.coordinates[0];if(!u||u.length<4)return null;const f=[],h=u.length>1&&u[0][0]===u[u.length-1][0]&&u[0][1]===u[u.length-1][1]?u.length-1:u.length;for(let z=0;z<h;z++)f.push([u[z][0],u[z][1]]);const y=[];for(let z=0;z<l.length-1;z++){const H=l[z],D=l[z+1];for(let V=0;V<f.length;V++){const O=(V+1)%f.length,R=f[V],N=f[O],F=p2(H,D,R,N);F&&y.push({edgeIndex:V,point:F,t:z})}}if(y.length<2)return null;y.sort((z,H)=>z.edgeIndex-H.edgeIndex);const m=y[0],C=y[y.length-1],x=[],L=[];x.push(m.point);for(let z=m.edgeIndex+1;z<=C.edgeIndex;z++)x.push(f[z%f.length]);x.push(C.point),x.push(m.point),L.push(C.point);for(let z=C.edgeIndex+1;z<f.length;z++)L.push(f[z]);for(let z=0;z<=m.edgeIndex;z++)L.push(f[z]);if(L.push(m.point),L.push(C.point),x.length<4||L.length<4)return null;const M={type:"Polygon",coordinates:[x]},S={type:"Polygon",coordinates:[L]};return[Ve(M,"polygon"),Ve(S,"polygon")]}function p2(s,l,u,f,h=!1){const y=l[0]-s[0],m=l[1]-s[1],C=f[0]-u[0],x=f[1]-u[1],L=y*x-m*C;if(Math.abs(L)<1e-12)return null;const M=((u[0]-s[0])*x-(u[1]-s[1])*C)/L,S=((u[0]-s[0])*m-(u[1]-s[1])*y)/L;if(h){if(M<=1e-6||M>=1-1e-6||S<=1e-6||S>=1-1e-6)return null}else if(M<0||M>1||S<0||S>1)return null;return[s[0]+M*y,s[1]+M*m]}const Rt={type:"FeatureCollection",features:[]},VA="aimap-draw-";class Js{constructor(l,u,f){this.featurePointLayer=null,this.featureLineLayer=null,this.featurePolygonLayer=null,this.featurePolygonOutlineLayer=null,this.drawingLineLayer=null,this.drawingDashLineLayer=null,this.drawingPolygonLayer=null,this.drawingPointLayer=null,this.selectionPolygonLayer=null,this.selectionLineLayer=null,this.selectionPointLayer=null,this.vertexLayer=null,this.midpointLayer=null,this.snapIndicatorLayer=null,this.mergeHighlightLayer=null,this.mergeHighlightOutlineLayer=null,this.splitHighlightLayer=null,this.splitHighlightOutlineLayer=null,this.tooltipEl=null,this.containerEl=null,this.hiddenFeatureId=null,this.allFeatures=[],this.onFeatureClick=null,this.onFeatureMouseDown=null,this.onVertexClick=null,this.onVertexRightClick=null,this.onEmptyClick=null,this.onMidpointClick=null,this.editClickHandlersBound=!1,this.scene=l,this.mapsService=f,this.styles={point:{...ne.point,...u==null?void 0:u.point},line:{...ne.line,...u==null?void 0:u.line},polygon:{...ne.polygon,...u==null?void 0:u.polygon},drawing:{...ne.drawing,...u==null?void 0:u.drawing},selected:{...ne.selected,...u==null?void 0:u.selected},vertex:{...ne.vertex,...u==null?void 0:u.vertex}};try{this.initTooltip()}catch{}}removeAndDestroy(l){var u;if(l){try{this.scene.removeLayer(l)}catch{}try{(u=l.destroy)==null||u.call(l)}catch{}}}addLayerWithRender(l){l.once("inited",()=>{try{this.scene.render()}catch{}}),this.scene.addLayer(l)}initTooltip(){const l=document.createElement("div");l.style.cssText=["position:fixed","pointer-events:none","z-index:9999","padding:6px 10px","border-radius:4px","background:rgba(26,27,34,0.92)","color:#f2eff9",'font:500 11px/16px "JetBrains Mono",monospace',"letter-spacing:0.02em","white-space:nowrap","display:none","flex-direction:column","gap:2px","box-shadow:0 2px 8px rgba(0,0,0,0.3)"].join(";"),document.body.appendChild(l),this.tooltipEl=l,this.containerEl=null}showTooltip(l,u,f,h){if(!this.tooltipEl)return;this.tooltipEl.innerHTML="";const y=document.createElement("div");if(y.textContent=l,y.style.cssText="color:#f2eff9;font-size:11px;line-height:16px;",this.tooltipEl.appendChild(y),h&&h.length>0){const m=document.createElement("div");m.style.cssText="display:flex;gap:8px;";for(const C of h){const x=document.createElement("span");x.textContent=C,x.style.cssText="font-size:9px;line-height:12px;color:#ffc107;font-weight:600;",m.appendChild(x)}this.tooltipEl.appendChild(m)}this.tooltipEl.style.display="flex",this.tooltipEl.style.left=`${u+16}px`,this.tooltipEl.style.top=`${f-8}px`}showSnapTooltip(l,u,f,h,y){if(!this.tooltipEl)return;this.tooltipEl.innerHTML="";const m=document.createElement("div");m.style.cssText="display:flex;gap:6px;align-items:center;";const C=document.createElement("span");C.textContent=l==="vertex"?"Vertex":"Edge",C.style.cssText="color:#ffc107;font-weight:700;font-size:10px;",m.appendChild(C);const x=document.createElement("span");x.textContent=`${f.toFixed(4)}, ${u.toFixed(4)}`,x.style.cssText="color:rgba(242,239,249,0.6);font-size:10px;",m.appendChild(x),this.tooltipEl.appendChild(m),this.tooltipEl.style.display="flex",this.tooltipEl.style.left=`${h+16}px`,this.tooltipEl.style.top=`${y-8}px`}hideTooltip(){this.tooltipEl&&(this.tooltipEl.style.display="none")}destroyTooltip(){var l;this.tooltipEl&&((l=this.tooltipEl.parentElement)==null||l.removeChild(this.tooltipEl),this.tooltipEl=null)}updateFeatures(l){this.scene&&(this.allFeatures=l,this.renderFeatures())}hideFeatureFromStatic(l){this.hiddenFeatureId=l,this.renderFeatures()}showAllFeatures(){this.hiddenFeatureId=null,this.renderFeatures()}renderFeatures(){const l=this.hiddenFeatureId?this.allFeatures.filter(m=>m.id!==this.hiddenFeatureId):this.allFeatures,u=this.styles;this.removeAndDestroy(this.featurePointLayer);const f=l.filter(m=>m.geometry.type==="Point").map(m=>{const C=m.geometry.coordinates;return{lng:C[0],lat:C[1],id:m.id,drawType:m.properties.drawType}});this.featurePointLayer=new zA.PointLayer({name:`${VA}feature-point`,zIndex:12}).source(f,{parser:{type:"json",x:"lng",y:"lat"}}).shape("circle").color(u.point.color).size(u.point.size).style({stroke:u.point.strokeColor,strokeWidth:u.point.strokeWidth}),this.addLayerWithRender(this.featurePointLayer),this.removeAndDestroy(this.featureLineLayer),this.featureLineLayer=new zA.LineLayer({name:`${VA}feature-line`,zIndex:11}).source($s(l)).shape("line").color(u.line.color).size(u.line.size).style({opacity:u.line.opacity}),this.addLayerWithRender(this.featureLineLayer),this.removeAndDestroy(this.featurePolygonLayer),this.featurePolygonLayer=new zA.PolygonLayer({name:`${VA}feature-polygon`,zIndex:10}).source(Ws(l)).shape("fill").color(u.polygon.fill).style({opacity:u.polygon.fillOpacity}),this.addLayerWithRender(this.featurePolygonLayer),this.removeAndDestroy(this.featurePolygonOutlineLayer);const h=l.filter(m=>m.geometry.type==="Polygon"),y=h.length>0?{type:"FeatureCollection",features:h.map(m=>({type:"Feature",geometry:{type:"LineString",coordinates:m.geometry.coordinates[0]},properties:m.properties}))}:Rt;this.featurePolygonOutlineLayer=new zA.LineLayer({name:`${VA}feature-polygon-outline`,zIndex:10}).source(y).shape("line").color(u.polygon.stroke).size(u.polygon.strokeWidth).style({opacity:1}),this.addLayerWithRender(this.featurePolygonOutlineLayer),this.editClickHandlersBound&&this.rebindEditClickHandlers()}showDrawingFeedback(l,u,f,h){if(!this.scene||f==="point")return;const y=this.styles;let m=Rt,C=Rt,x=Rt,L=[];if(f==="rectangle"&&h&&u){const H=f2(h,u);x={type:"FeatureCollection",features:[{type:"Feature",geometry:H,properties:{}}]},m={type:"FeatureCollection",features:[{type:"Feature",geometry:{type:"LineString",coordinates:H.coordinates[0]},properties:{}}]}}else if(f==="circle"&&h&&u){const D=X=>X*Math.PI/180,V=D(u[1]-h[1]),O=D(u[0]-h[0]),R=Math.sin(V/2)**2+Math.cos(D(h[1]))*Math.cos(D(u[1]))*Math.sin(O/2)**2,F=6371e3*(2*Math.atan2(Math.sqrt(R),Math.sqrt(1-R))),Y=d2(h,Math.max(F,1));x={type:"FeatureCollection",features:[{type:"Feature",geometry:Y,properties:{}}]},m={type:"FeatureCollection",features:[{type:"Feature",geometry:{type:"LineString",coordinates:Y.coordinates[0]},properties:{}}]},L=[{lng:h[0],lat:h[1],vertexIndex:0}]}else if((f==="polyline"||f==="polygon")&&l.length>0){if(l.length>=2&&(m={type:"FeatureCollection",features:[{type:"Feature",geometry:c2(l),properties:{}}]}),u&&l.length>=1){const H=l[l.length-1],D=[{type:"Feature",geometry:{type:"LineString",coordinates:[[H[0],H[1]],[u[0],u[1]]]},properties:{}}];f==="polygon"&&l.length>=2&&D.push({type:"Feature",geometry:{type:"LineString",coordinates:[[u[0],u[1]],[l[0][0],l[0][1]]]},properties:{}}),C={type:"FeatureCollection",features:D}}if(f==="polygon"&&l.length>=2&&u){const H=[...l,u];H.length>=3&&(x={type:"FeatureCollection",features:[{type:"Feature",geometry:u2(H),properties:{}}]})}L=l.map(([H,D],V)=>({lng:H,lat:D,vertexIndex:V,isFirst:V===0}))}this.drawingLineLayer?this.drawingLineLayer.setData(m):(this.drawingLineLayer=new zA.LineLayer({name:`${VA}drawing-line`,zIndex:13}).source(m).shape("line").color(y.drawing.stroke).size(y.drawing.strokeWidth).style({opacity:1}),this.addLayerWithRender(this.drawingLineLayer));const M=y.drawing.dashArray??[4,4],S=y.drawing.dashStroke??y.drawing.stroke,z=y.drawing.dashWidth??1.5;this.drawingDashLineLayer?this.drawingDashLineLayer.setData(C):(this.drawingDashLineLayer=new zA.LineLayer({name:`${VA}drawing-dash-line`,zIndex:14}).source(C).shape("line").color(S).size(z).style({opacity:1,lineType:"dash",dashArray:M}),this.addLayerWithRender(this.drawingDashLineLayer)),this.drawingPolygonLayer?this.drawingPolygonLayer.setData(x):(this.drawingPolygonLayer=new zA.PolygonLayer({name:`${VA}drawing-polygon`,zIndex:13}).source(x).shape("fill").color(y.drawing.fill).style({opacity:y.drawing.fillOpacity}),this.addLayerWithRender(this.drawingPolygonLayer)),this.drawingPointLayer?this.drawingPointLayer.setData(L):(this.drawingPointLayer=new zA.PointLayer({name:`${VA}drawing-point`,zIndex:15}).source(L,{parser:{type:"json",x:"lng",y:"lat"}}).shape("circle").color(y.vertex.color).size(y.vertex.size).style({stroke:y.vertex.strokeColor,strokeWidth:y.vertex.strokeWidth}),this.addLayerWithRender(this.drawingPointLayer))}clearDrawingFeedback(){this.removeAndDestroy(this.drawingLineLayer),this.removeAndDestroy(this.drawingDashLineLayer),this.removeAndDestroy(this.drawingPolygonLayer),this.removeAndDestroy(this.drawingPointLayer),this.drawingLineLayer=null,this.drawingDashLineLayer=null,this.drawingPolygonLayer=null,this.drawingPointLayer=null}removeDrawingLayers(){this.clearDrawingFeedback()}updateSelectionHighlight(l){var y,m,C;if(!this.scene)return;const u=this.styles;if(this.removeAndDestroy(this.selectionPolygonLayer),this.removeAndDestroy(this.selectionLineLayer),this.removeAndDestroy(this.selectionPointLayer),!l){this.selectionPolygonLayer=null,this.selectionLineLayer=null,this.selectionPointLayer=null;return}const f={type:"FeatureCollection",features:[l]},h=u.selected.dashArray??[6,3];if(l.geometry.type==="Point")this.selectionPointLayer=new zA.PointLayer({name:`${VA}selection-point`,zIndex:15}).source([{lng:l.geometry.coordinates[0],lat:l.geometry.coordinates[1],id:l.id}],{parser:{type:"json",x:"lng",y:"lat"}}).shape("circle").color(u.selected.stroke).size((u.point.size??6)+4).style({stroke:u.selected.stroke,strokeWidth:u.selected.strokeWidth}),this.addLayerWithRender(this.selectionPointLayer);else if(l.geometry.type==="LineString")this.selectionLineLayer=new zA.LineLayer({name:`${VA}selection-line`,zIndex:15}).source(f).shape("line").color(u.selected.stroke).size(u.selected.strokeWidth).style({opacity:1,lineType:"dash",dashArray:h}),this.addLayerWithRender(this.selectionLineLayer);else if(l.geometry.type==="Polygon"){this.selectionPolygonLayer=new zA.PolygonLayer({name:`${VA}selection-polygon`,zIndex:15}).source(f).shape("fill").color(u.selected.fill).style({opacity:u.selected.fillOpacity}),this.addLayerWithRender(this.selectionPolygonLayer);const x={type:"FeatureCollection",features:[{type:"Feature",geometry:{type:"LineString",coordinates:l.geometry.coordinates[0]},properties:{}}]};this.selectionLineLayer=new zA.LineLayer({name:`${VA}selection-line`,zIndex:15}).source(x).shape("line").color(u.selected.stroke).size(u.selected.strokeWidth).style({opacity:1,lineType:"dash",dashArray:h}),this.addLayerWithRender(this.selectionLineLayer)}if(this.editClickHandlersBound&&this.onFeatureMouseDown){const x=L=>{var S;const M=L.feature;if(M&&this.onFeatureMouseDown){const z=((S=M.properties)==null?void 0:S.id)??M.id;if(z){const H=L.lngLat??L.lnglat;let D=[0,0];if(H&&typeof H=="object"){const V=H;D=[V.lng??V.x??0,V.lat??V.y??0]}this.onFeatureMouseDown(String(z),D)}}};(y=this.selectionPolygonLayer)==null||y.on("mousedown",x),(m=this.selectionLineLayer)==null||m.on("mousedown",x),(C=this.selectionPointLayer)==null||C.on("mousedown",x)}}clearSelectionHighlight(){this.removeAndDestroy(this.selectionPolygonLayer),this.removeAndDestroy(this.selectionLineLayer),this.removeAndDestroy(this.selectionPointLayer),this.selectionPolygonLayer=null,this.selectionLineLayer=null,this.selectionPointLayer=null}removeSelectionLayers(){this.clearSelectionHighlight()}highlightMergeSelected(l,u){if(!this.scene)return;const f=this.styles;if(this.removeAndDestroy(this.mergeHighlightLayer),this.removeAndDestroy(this.mergeHighlightOutlineLayer),this.mergeHighlightLayer=null,this.mergeHighlightOutlineLayer=null,l.length===0)return;const h=u.filter(C=>l.includes(C.id));if(h.length===0)return;const y={type:"FeatureCollection",features:h};this.mergeHighlightLayer=new zA.PolygonLayer({name:`${VA}merge-highlight`,zIndex:15}).source(y).shape("fill").color(f.selected.fill).style({opacity:f.selected.fillOpacity}),this.addLayerWithRender(this.mergeHighlightLayer);const m=h.filter(C=>C.geometry.type==="Polygon").map(C=>({type:"Feature",geometry:{type:"LineString",coordinates:C.geometry.coordinates[0]},properties:{}}));if(m.length>0){const C={type:"FeatureCollection",features:m};this.mergeHighlightOutlineLayer=new zA.LineLayer({name:`${VA}merge-highlight-outline`,zIndex:15}).source(C).shape("line").color(f.selected.stroke).size(f.selected.strokeWidth).style({opacity:1,lineType:"dash",dashArray:f.selected.dashArray??[6,3]}),this.addLayerWithRender(this.mergeHighlightOutlineLayer)}}clearMergeHighlight(){this.removeAndDestroy(this.mergeHighlightLayer),this.removeAndDestroy(this.mergeHighlightOutlineLayer),this.mergeHighlightLayer=null,this.mergeHighlightOutlineLayer=null}highlightSplitTarget(l,u){if(!this.scene)return;const f=this.styles;this.removeAndDestroy(this.splitHighlightLayer),this.removeAndDestroy(this.splitHighlightOutlineLayer),this.splitHighlightLayer=null,this.splitHighlightOutlineLayer=null;const h=u.find(C=>C.id===l);if(!h)return;const y={type:"FeatureCollection",features:[h]};this.splitHighlightLayer=new zA.PolygonLayer({name:`${VA}split-highlight`,zIndex:15}).source(y).shape("fill").color(f.selected.fill).style({opacity:f.selected.fillOpacity}),this.addLayerWithRender(this.splitHighlightLayer);const m={type:"FeatureCollection",features:[{type:"Feature",geometry:{type:"LineString",coordinates:h.geometry.coordinates[0]},properties:{}}]};this.splitHighlightOutlineLayer=new zA.LineLayer({name:`${VA}split-highlight-outline`,zIndex:15}).source(m).shape("line").color(f.selected.stroke).size(f.selected.strokeWidth).style({opacity:1,lineType:"dash",dashArray:f.selected.dashArray??[6,3]}),this.addLayerWithRender(this.splitHighlightOutlineLayer)}clearSplitHighlight(){this.removeAndDestroy(this.splitHighlightLayer),this.removeAndDestroy(this.splitHighlightOutlineLayer),this.splitHighlightLayer=null,this.splitHighlightOutlineLayer=null}updateVertexHandles(l){if(!this.scene)return;const u=this.styles;if(this.removeAndDestroy(this.vertexLayer),this.removeAndDestroy(this.midpointLayer),!l){this.vertexLayer=null,this.midpointLayer=null;return}const f=$t(l);if(f.length===0){this.vertexLayer=null,this.midpointLayer=null;return}const h=f.map(([y,m],C)=>({lng:y,lat:m,vertexIndex:C,featureId:l.id}));if(this.vertexLayer=new zA.PointLayer({name:`${VA}vertex-handles`,zIndex:16}).source(h,{parser:{type:"json",x:"lng",y:"lat"}}).shape("circle").color(u.vertex.color).size(u.vertex.size).style({stroke:u.vertex.strokeColor,strokeWidth:u.vertex.strokeWidth}),this.addLayerWithRender(this.vertexLayer),l.geometry.type==="LineString"||l.geometry.type==="Polygon"){const y=[],m=l.geometry.type==="Polygon"?f.length:f.length-1;for(let C=0;C<m;C++){const x=(C+1)%f.length;y.push({lng:(f[C][0]+f[x][0])/2,lat:(f[C][1]+f[x][1])/2,edgeIndex:C})}this.midpointLayer=new zA.PointLayer({name:`${VA}midpoint-handles`,zIndex:16}).source(y,{parser:{type:"json",x:"lng",y:"lat"}}).shape("circle").color(u.vertex.strokeColor).size(u.vertex.size-1).style({stroke:u.vertex.strokeColor,strokeWidth:.5,opacity:.5}),this.addLayerWithRender(this.midpointLayer)}else this.midpointLayer=null;this.editClickHandlersBound&&this.rebindVertexAndMidpointEvents()}clearVertexHandles(){this.removeAndDestroy(this.vertexLayer),this.removeAndDestroy(this.midpointLayer),this.vertexLayer=null,this.midpointLayer=null}removeVertexLayer(){this.clearVertexHandles()}setupEditClickHandlers(l,u,f,h,y,m){this.onFeatureClick=l,this.onVertexClick=u,this.onEmptyClick=f,this.onVertexRightClick=h??null,this.onMidpointClick=y??null,this.onFeatureMouseDown=m??null,this.editClickHandlersBound=!0,this.rebindEditClickHandlers()}rebindEditClickHandlers(){var y,m,C,x,L,M,S,z,H,D,V,O,R,N,F,Y,X,n0,Z,G,r0,A0,o0,q,t0;const l=B=>{var e0;const U=B.feature;if(U){const c0=((e0=U.properties)==null?void 0:e0.id)??U.id;c0&&this.onFeatureClick&&this.onFeatureClick(String(c0))}},u=B=>{var e0;const U=B.feature;if(U){const c0=((e0=U.properties)==null?void 0:e0.id)??U.id;if(c0&&this.onFeatureMouseDown){const h0=B.lngLat??B.lnglat;let p0=[0,0];if(h0&&typeof h0=="object"){const S0=h0;p0=[S0.lng??S0.x??0,S0.lat??S0.y??0]}this.onFeatureMouseDown(String(c0),p0)}}};(y=this.featurePointLayer)==null||y.on("click",l),(m=this.featureLineLayer)==null||m.on("click",l),(C=this.featurePolygonLayer)==null||C.on("click",l),(x=this.featurePolygonOutlineLayer)==null||x.on("click",l),(L=this.featurePointLayer)==null||L.on("mousedown",u),(M=this.featureLineLayer)==null||M.on("mousedown",u),(S=this.featurePolygonLayer)==null||S.on("mousedown",u),(z=this.featurePolygonOutlineLayer)==null||z.on("mousedown",u);const f=()=>{this.setCursorClass("l7-draw-cursor-grab")},h=()=>{this.clearEditCursors(),this.hideTooltip()};(H=this.featurePointLayer)==null||H.on("mouseenter",f),(D=this.featurePointLayer)==null||D.on("mouseleave",h),(V=this.featureLineLayer)==null||V.on("mouseenter",f),(O=this.featureLineLayer)==null||O.on("mouseleave",h),(R=this.featurePolygonLayer)==null||R.on("mouseenter",f),(N=this.featurePolygonLayer)==null||N.on("mouseleave",h),(F=this.featurePolygonOutlineLayer)==null||F.on("mouseenter",f),(Y=this.featurePolygonOutlineLayer)==null||Y.on("mouseleave",h),(X=this.selectionPolygonLayer)==null||X.on("mousedown",u),(n0=this.selectionLineLayer)==null||n0.on("mousedown",u),(Z=this.selectionPointLayer)==null||Z.on("mousedown",u),(G=this.selectionPolygonLayer)==null||G.on("mouseenter",f),(r0=this.selectionPolygonLayer)==null||r0.on("mouseleave",h),(A0=this.selectionLineLayer)==null||A0.on("mouseenter",f),(o0=this.selectionLineLayer)==null||o0.on("mouseleave",h),(q=this.selectionPointLayer)==null||q.on("mouseenter",f),(t0=this.selectionPointLayer)==null||t0.on("mouseleave",h),this.rebindVertexAndMidpointEvents()}extractClientXY(l){var m,C,x,L;const u=l.originalEvent??l.originEvent??l.e;if(u&&typeof u.clientX=="number"&&typeof u.clientY=="number")return[u.clientX,u.clientY];const f=l.x,h=l.y;if(f!==void 0&&h!==void 0){const M=(C=(m=this.mapsService)==null?void 0:m.getContainer)==null?void 0:C.call(m);if(M){const S=M.getBoundingClientRect();return[f+S.left,h+S.top]}}const y=l.pixel;if(y){const M=(L=(x=this.mapsService)==null?void 0:x.getContainer)==null?void 0:L.call(x);if(M){const S=M.getBoundingClientRect();return[(y.x??0)+S.left,(y.y??0)+S.top]}}return[0,0]}extractFeatureProp(l,u){const f=l.properties;return f&&f[u]!==void 0?f[u]:l[u]}setCursorClass(l){var f,h;const u=(h=(f=this.mapsService)==null?void 0:f.getContainer)==null?void 0:h.call(f);u&&(u.classList.remove("l7-draw-cursor-pointer","l7-draw-cursor-grab","l7-draw-cursor-move"),l&&u.classList.add(l))}clearEditCursors(){var u,f;const l=(f=(u=this.mapsService)==null?void 0:u.getContainer)==null?void 0:f.call(u);l&&l.classList.remove("l7-draw-cursor-pointer","l7-draw-cursor-grab","l7-draw-cursor-move")}rebindVertexAndMidpointEvents(){var l,u,f,h,y,m,C,x,L;(l=this.vertexLayer)==null||l.on("mouseenter",()=>{this.setCursorClass("l7-draw-cursor-pointer")}),(u=this.vertexLayer)==null||u.on("mousemove",M=>{const[S,z]=this.extractClientXY(M);(S||z)&&this.showTooltip("拖拽移动顶点,右键删除",S,z)}),(f=this.vertexLayer)==null||f.on("mouseleave",()=>{this.clearEditCursors(),this.hideTooltip()}),(h=this.midpointLayer)==null||h.on("mouseenter",()=>{this.setCursorClass("l7-draw-cursor-pointer")}),(y=this.midpointLayer)==null||y.on("mousemove",M=>{const[S,z]=this.extractClientXY(M);(S||z)&&this.showTooltip("单击添加新顶点",S,z)}),(m=this.midpointLayer)==null||m.on("mouseleave",()=>{this.clearEditCursors(),this.hideTooltip()}),(C=this.vertexLayer)==null||C.on("mousedown",M=>{var z,H,D,V;const S=M.feature;if(S&&this.onVertexClick){const O=this.extractFeatureProp(S,"vertexIndex");O!==void 0&&((H=(z=this.mapsService)==null?void 0:z.setMapStatus)==null||H.call(z,{dragEnable:!1,zoomEnable:!1}),(V=(D=M.originalEvent)==null?void 0:D.stopPropagation)==null||V.call(D),this.onVertexClick(O))}}),(x=this.vertexLayer)==null||x.on("contextmenu",M=>{var z,H;const S=M.feature;if(S&&this.onVertexRightClick){const D=this.extractFeatureProp(S,"vertexIndex");D!==void 0&&((H=(z=M.originalEvent)==null?void 0:z.preventDefault)==null||H.call(z),this.onVertexRightClick(D))}}),(L=this.midpointLayer)==null||L.on("click",M=>{const S=M.feature;if(S&&this.onMidpointClick){const z=this.extractFeatureProp(S,"edgeIndex"),H=this.extractFeatureProp(S,"lng"),D=this.extractFeatureProp(S,"lat");z!==void 0&&H!==void 0&&D!==void 0&&this.onMidpointClick(z,[H,D])}})}removeEditClickHandlers(){this.onFeatureClick=null,this.onVertexClick=null,this.onVertexRightClick=null,this.onEmptyClick=null,this.onMidpointClick=null,this.editClickHandlersBound=!1}showSnapIndicator(l,u,f){if(!this.scene)return;const h="#ffc107",y=f==="vertex"?8:6;this.removeAndDestroy(this.snapIndicatorLayer),this.snapIndicatorLayer=new zA.PointLayer({name:`${VA}snap-indicator`,zIndex:20}).source([{lng:l,lat:u}],{parser:{type:"json",x:"lng",y:"lat"}}).shape("square").color(h).size(y).style({stroke:h,strokeWidth:1.5,opacity:.9}),this.addLayerWithRender(this.snapIndicatorLayer)}hideSnapIndicator(){this.removeAndDestroy(this.snapIndicatorLayer),this.snapIndicatorLayer=null}destroy(){this.removeEditClickHandlers(),this.destroyTooltip();const l=[this.featurePointLayer,this.featureLineLayer,this.featurePolygonLayer,this.featurePolygonOutlineLayer,this.drawingLineLayer,this.drawingDashLineLayer,this.drawingPolygonLayer,this.drawingPointLayer,this.selectionPolygonLayer,this.selectionLineLayer,this.selectionPointLayer,this.vertexLayer,this.midpointLayer,this.snapIndicatorLayer];for(const u of l)this.removeAndDestroy(u);this.featurePointLayer=null,this.featureLineLayer=null,this.featurePolygonLayer=null,this.featurePolygonOutlineLayer=null,this.drawingLineLayer=null,this.drawingDashLineLayer=null,this.drawingPolygonLayer=null,this.drawingPointLayer=null,this.selectionPolygonLayer=null,this.selectionLineLayer=null,this.selectionPointLayer=null,this.vertexLayer=null,this.midpointLayer=null,this.snapIndicatorLayer=null}}const j1={enabled:!0,threshold:8,vertex:!0,edge:!0};function Ks(s){return s===!1?{...j1,enabled:!1}:s===!0||s===void 0?{...j1}:{...j1,...s}}function A5(s,l,u,f,h){if(!u.enabled||l.length===0)return{snapped:!1,lng:s[0],lat:s[1],type:"none"};const y=f(s);if(!y)return{snapped:!1,lng:s[0],lat:s[1],type:"none"};const m=u.threshold;let C=1/0,x={snapped:!1,lng:s[0],lat:s[1],type:"none"};for(const L of l){if(L.id===h)continue;const M=$t(L);if(M.length!==0){if(u.vertex)for(let S=0;S<M.length;S++){const z=f(M[S]);if(!z)continue;const H=y.x-z.x,D=y.y-z.y,V=Math.sqrt(H*H+D*D);V<m&&V<C&&(C=V,x={snapped:!0,lng:M[S][0],lat:M[S][1],type:"vertex",featureId:L.id,vertexIndex:S})}if(u.edge&&x.type!=="vertex"){const S=L.geometry.type==="Polygon"?M.length:Math.max(0,M.length-1);for(let z=0;z<S;z++){const H=(z+1)%M.length,D=f(M[z]),V=f(M[H]);if(!D||!V)continue;const O=e5(y,D,V);if(O.t>=0&&O.t<=1&&O.dist<m&&O.dist<C){const R=O.t,N=M[z][0]+R*(M[H][0]-M[z][0]),F=M[z][1]+R*(M[H][1]-M[z][1]);C=O.dist,x={snapped:!0,lng:N,lat:F,type:"edge",featureId:L.id,edgeIndex:z}}}}}}return x}function e5(s,l,u){const f=u.x-l.x,h=u.y-l.y,y=f*f+h*h;if(y===0)return{t:0,dist:Math.sqrt((s.x-l.x)**2+(s.y-l.y)**2)};let m=((s.x-l.x)*f+(s.y-l.y)*h)/y;m=Math.max(0,Math.min(1,m));const C=l.x+m*f,x=l.y+m*h,L=Math.sqrt((s.x-C)**2+(s.y-x)**2);return{t:m,dist:L}}const t5=5;function Qe(s){const l=s.originalEvent??s.originEvent??s.e;return(l==null?void 0:l.clientX)??s.x??0}function Oe(s){const l=s.originalEvent??s.originEvent??s.e;return(l==null?void 0:l.clientY)??s.y??0}function cr(s,l,u){const f=We(s);if(!f)return null;const h=u(f);if(!h){for(const m of l)if(m.geometry.type==="Polygon"&&fr(f,m.geometry.coordinates[0]))return m;return null}const y=8;for(const m of l)if(m.geometry.type==="Polygon"){if(fr(f,m.geometry.coordinates[0]))return m;const C=m.geometry.coordinates[0];for(let x=0;x<C.length-1;x++)if(ur(h,C[x],C[x+1],u)<=y)return m}else if(m.geometry.type==="Point"){const C=m.geometry.coordinates,x=u(C);if(x){const L=x.x-h.x,M=x.y-h.y;if(Math.sqrt(L*L+M*M)<=y)return m}}else if(m.geometry.type==="LineString"){const C=m.geometry.coordinates;for(let x=0;x<C.length-1;x++)if(ur(h,C[x],C[x+1],u)<=y)return m}return null}function ur(s,l,u,f){const h=f(l),y=f(u);if(!h||!y)return 1/0;const m=y.x-h.x,C=y.y-h.y,x=m*m+C*C;if(x===0){const D=s.x-h.x,V=s.y-h.y;return Math.sqrt(D*D+V*V)}const L=Math.max(0,Math.min(1,((s.x-h.x)*m+(s.y-h.y)*C)/x)),M=h.x+L*m,S=h.y+L*C,z=s.x-M,H=s.y-S;return Math.sqrt(z*z+H*H)}function fr(s,l){let u=!1;for(let f=0,h=l.length-1;f<l.length;h=f++){const y=l[f][0],m=l[f][1],C=l[h][0],x=l[h][1];m>s[1]!=x>s[1]&&s[0]<(C-y)*(s[1]-m)/(x-m)+y&&(u=!u)}return u}function dr(s,l,u){const f=u[0]-l[0],h=u[1]-l[1],y=f*f+h*h;if(y===0){const L=Math.sqrt((s[0]-l[0])**2+(s[1]-l[1])**2);return{point:l,t:0,dist:L}}let m=((s[0]-l[0])*f+(s[1]-l[1])*h)/y;m=Math.max(0,Math.min(1,m));const C=[l[0]+m*f,l[1]+m*h],x=Math.sqrt((s[0]-C[0])**2+(s[1]-C[1])**2);return{point:C,t:m,dist:x}}function hr(s,l,u){if(s.geometry.type!=="LineString")return null;const f=[...s.geometry.coordinates.map(h=>[...h])];return l<0||l>=f.length-1?null:(f.splice(l+1,0,u),{...s,geometry:{type:"LineString",coordinates:f},properties:{...s.properties}})}function pr(s,l,u){if(s.geometry.type!=="Polygon")return null;const f=s.geometry.coordinates.map(C=>C.map(x=>[...x])),h=f[0],y=h.length>1&&h[0][0]===h[h.length-1][0]&&h[0][1]===h[h.length-1][1]?h.length-1:h.length;if(l<0||l>=y)return null;const m=l+1;return h.splice(m,0,u),h[0][0]===h[h.length-2][0]&&(h[0][1],h[h.length-2][1]),h[h.length-1]=[h[0][0],h[0][1]],{...s,geometry:{type:"Polygon",coordinates:f},properties:{...s.properties}}}function n5(s,l){if(s.geometry.type!=="LineString")return null;const u=s.geometry.coordinates.map(f=>[...f]);return u.length<=2||l<0||l>=u.length?null:(u.splice(l,1),{...s,geometry:{type:"LineString",coordinates:u},properties:{...s.properties}})}function r5(s,l){if(s.geometry.type!=="Polygon")return null;const u=s.geometry.coordinates.map(y=>y.map(m=>[...m])),f=u[0],h=f.length>1&&f[0][0]===f[f.length-1][0]&&f[0][1]===f[f.length-1][1]?f.length-1:f.length;return h<=3||l<0||l>=h?null:(f.splice(l,1),f[f.length-1]=[f[0][0],f[0][1]],{...s,geometry:{type:"Polygon",coordinates:u},properties:{...s.properties}})}function i5(s){const{scene:l,mapsService:u,styles:f,snap:h,defaultFeatures:y,features:m,onDrawCreate:C,onDrawUpdate:x,onDrawDelete:L,onDrawSelect:M,onModeChange:S,onChange:z}=s,H=b.useRef(Ts(y)),D=b.useRef(null),V=b.useMemo(()=>Fs(f),[f]),O=b.useMemo(()=>Ks(h),[h]),R=b.useRef({onDrawCreate:C,onDrawUpdate:x,onDrawDelete:L,onDrawSelect:M,onModeChange:S,onChange:z});R.current={onDrawCreate:C,onDrawUpdate:x,onDrawDelete:L,onDrawSelect:M,onModeChange:S,onChange:z};const N=b.useRef("none"),F=b.useRef(y?[...y]:[]),Y=b.useRef(null),X=m!==void 0,n0=b.useRef(null),Z=b.useRef(null),G=b.useRef(null),r0=b.useCallback(l0=>{var T;if(!u)return null;try{const a0=(T=u.lngLatToContainer)==null?void 0:T.call(u,[l0[0],l0[1]]);if(a0)return{x:a0.x??a0[0],y:a0.y??a0[1]}}catch{}return null},[u]),A0=b.useCallback(l0=>{var T,a0,Q;F.current=l0,H.current.features=l0,(T=D.current)==null||T.updateFeatures(l0),(Q=(a0=R.current).onChange)==null||Q.call(a0,l0)},[]),o0=b.useCallback(l0=>{var a0,Q;Y.current=l0,H.current.selectedFeatureId=l0;const T=l0?F.current.find(H0=>H0.id===l0)??null:null;(Q=(a0=R.current).onDrawSelect)==null||Q.call(a0,T)},[]);b.useEffect(()=>{if(!l)return;const l0=new Js(l,V,u);return D.current=l0,F.current.length>0&&l0.updateFeatures(F.current),()=>{l0.destroy(),D.current=null}},[l]);const q=b.useCallback(l0=>{var F0,L0,_0,v0;const T=H.current,a0=We(l0);if(!a0)return;const Q=D.current;if(!Q)return;const H0=G.current,d0=H0!=null&&H0.snapped?H0.lng:a0[0],b0=H0!=null&&H0.snapped?H0.lat:a0[1],I0=N.current;if(I0==="point"){const G0=Ve(Zs([d0,b0]),"point"),sA=[...F.current,G0];A0(sA),(L0=(F0=R.current).onDrawCreate)==null||L0.call(F0,[G0]);return}if(I0==="polyline"){T.currentVertices.push([d0,b0]),T.isDrawing=!0,Q.showDrawingFeedback(T.currentVertices,T.mousePoint,I0,T.startPoint);return}if(I0==="polygon"){T.currentVertices.push([d0,b0]),T.isDrawing=!0,Q.showDrawingFeedback(T.currentVertices,T.mousePoint,I0,T.startPoint);return}if(I0==="circle"){if(!T.startPoint)T.startPoint=[d0,b0],T.isDrawing=!0;else{const G0=sr(T.startPoint,[d0,b0]);if(G0>.5){const sA=d2(T.startPoint,G0),fA=Ve(sA,"circle"),kA=[...F.current,fA];A0(kA),(v0=(_0=R.current).onDrawCreate)==null||v0.call(_0,[fA])}T.startPoint=null,T.isDrawing=!1,Q.clearDrawingFeedback()}return}if(I0==="merge"){const G0=cr(l0,F.current,r0);if(G0&&(G0.geometry.type==="Polygon"||G0.properties.drawType==="circle")){const sA=G0.id,fA=[...T.mergeSelectedIds],kA=fA.indexOf(sA);kA>=0?fA.splice(kA,1):fA.push(sA),T.mergeSelectedIds=fA,Q.highlightMergeSelected(fA,F.current),fA.length>=2?Q.showTooltip(`已选中 ${fA.length} 个面,双击合并`,Qe(l0),Oe(l0),["[ESC] 取消"]):fA.length===1&&Q.showTooltip("继续点击选中更多面",Qe(l0),Oe(l0),["[ESC] 取消"])}else T.mergeSelectedIds=[],Q.highlightMergeSelected([],F.current),Q.showTooltip("点击面要素选中",Qe(l0),Oe(l0),["[ESC] 取消"]);return}if(I0==="split"){if(!T.splitTargetId){const G0=cr(l0,F.current,r0);G0&&(G0.geometry.type==="Polygon"||G0.properties.drawType==="circle")?(T.splitTargetId=G0.id,Q.highlightSplitTarget(G0.id,F.current),Q.showTooltip("已选目标面,单击绘制切线起点",Qe(l0),Oe(l0),["[ESC] 取消"])):Q.showTooltip("先点击选择要切分的面",Qe(l0),Oe(l0),["[ESC] 取消"]);return}T.currentVertices.push([d0,b0]),T.isDrawing=!0,Q.showDrawingFeedback(T.currentVertices,T.mousePoint,"polyline",T.startPoint),T.currentVertices.length===1?Q.showTooltip("单击继续绘制切线,双击完成切分",Qe(l0),Oe(l0),["[ESC] 取消"]):Q.showTooltip(`切线 ${T.currentVertices.length} 个顶点,双击完成切分`,Qe(l0),Oe(l0),["[ESC] 取消"]);return}},[A0,r0]),t0=b.useCallback(l0=>{var H0,d0,b0,I0,F0,L0,_0,v0,G0,sA,fA,kA,_A,ie,KA,Ae;const T=H.current,a0=N.current,Q=D.current;if(Q){if(a0==="edit"&&Y.current){We(l0);return}if(l0.originalEvent&&((d0=(H0=l0.originalEvent).preventDefault)==null||d0.call(H0),(I0=(b0=l0.originalEvent).stopPropagation)==null||I0.call(b0)),a0==="merge"){if(T.mergeSelectedIds.length>=2){const NA=F.current.filter(oe=>T.mergeSelectedIds.includes(oe.id)),HA=Ys(NA);if(HA){const pe=[...F.current.filter(we=>!T.mergeSelectedIds.includes(we.id)),HA];A0(pe),(L0=(F0=R.current).onDrawCreate)==null||L0.call(F0,[HA]),(v0=(_0=R.current).onDrawDelete)==null||v0.call(_0,NA[0])}T.mergeSelectedIds=[],Q.highlightMergeSelected([],F.current),Q.hideTooltip()}return}if(a0==="split"&&T.splitTargetId&&T.currentVertices.length>=2){const NA=F.current.find(HA=>HA.id===T.splitTargetId);if(NA){const HA=Xs(NA,T.currentVertices);if(HA){const pe=[...F.current.filter(we=>we.id!==T.splitTargetId),...HA];A0(pe),(sA=(G0=R.current).onDrawCreate)==null||sA.call(G0,HA),(kA=(fA=R.current).onDrawDelete)==null||kA.call(fA,NA)}}T.currentVertices=[],T.isDrawing=!1,T.mousePoint=null,T.splitTargetId=null,Q.clearDrawingFeedback(),Q.clearSplitHighlight(),Q.hideTooltip();return}if(a0==="polyline"&&T.currentVertices.length>=2){const NA=c2(T.currentVertices),HA=Ve(NA,"polyline"),oe=[...F.current,HA];A0(oe),(ie=(_A=R.current).onDrawCreate)==null||ie.call(_A,[HA]),T.currentVertices=[],T.isDrawing=!1,T.mousePoint=null,Q.clearDrawingFeedback();return}if(a0==="polygon"&&T.currentVertices.length>=3){const NA=u2(T.currentVertices),HA=Ve(NA,"polygon"),oe=[...F.current,HA];A0(oe),(Ae=(KA=R.current).onDrawCreate)==null||Ae.call(KA,[HA]),T.currentVertices=[],T.isDrawing=!1,T.mousePoint=null,Q.clearDrawingFeedback();return}(a0==="polyline"||a0==="polygon")&&(T.currentVertices=[],T.isDrawing=!1,T.mousePoint=null,Q.clearDrawingFeedback())}},[A0]),B=b.useCallback(l0=>{const T=H.current,a0=We(l0);if(!a0)return;const[Q,H0]=a0,d0=D.current,b0=N.current,I0=l0.originalEvent??l0.originEvent??l0.e,F0=(I0==null?void 0:I0.clientX)??l0.x??0,L0=(I0==null?void 0:I0.clientY)??l0.y??0;if(T.mousePoint=[Q,H0],d0&&(F0||L0)){const v0=G.current;if((b0==="point"||b0==="polyline"||b0==="polygon"||b0==="circle"||b0==="rectangle")&&(v0!=null&&v0.snapped)&&v0.type!=="none")d0.showSnapTooltip(v0.type,v0.lng,v0.lat,F0,L0);else if(b0==="point")d0.showTooltip("单击放置点",F0,L0,["[ESC] 取消"]);else if(b0==="polyline")T.isDrawing?d0.showTooltip("单击添加顶点,双击结束",F0,L0,["[ESC] 取消"]):d0.showTooltip("单击开始绘制线",F0,L0,["[ESC] 取消"]);else if(b0==="polygon")T.isDrawing?T.currentVertices.length<3?d0.showTooltip("单击添加顶点",F0,L0,["[ESC] 取消"]):d0.showTooltip("单击继续,双击闭合",F0,L0,["[ESC] 取消"]):d0.showTooltip("单击开始绘制面",F0,L0,["[ESC] 取消"]);else if(b0==="rectangle")T.isDragging||d0.showTooltip("按住拖拽绘制矩形",F0,L0,["[SHIFT] 正方形","[ESC] 取消"]);else if(b0==="circle")if(!T.startPoint)d0.showTooltip("单击设定圆心",F0,L0,["[ESC] 取消"]);else{const sA=sr(T.startPoint,[Q,H0]),fA=sA>1e3?`${(sA/1e3).toFixed(1)} km`:`${Math.round(sA)} m`;d0.showTooltip(`半径 ${fA},单击完成`,F0,L0,["[ESC] 取消"])}else b0==="merge"?T.mergeSelectedIds.length>=2?d0.showTooltip(`已选中 ${T.mergeSelectedIds.length} 个面,双击合并`,F0,L0,["[ESC] 取消"]):T.mergeSelectedIds.length===1?d0.showTooltip("继续点击选中更多面",F0,L0,["[ESC] 取消"]):d0.showTooltip("点击面要素选中",F0,L0,["[ESC] 取消"]):b0==="split"?T.splitTargetId?T.isDrawing?d0.showTooltip(`切线 ${T.currentVertices.length} 个顶点,双击完成切分`,F0,L0,["[ESC] 取消"]):d0.showTooltip("单击绘制切线起点",F0,L0,["[ESC] 取消"]):d0.showTooltip("先点击选择要切分的面",F0,L0,["[ESC] 取消"]):b0==="edit"||d0.hideTooltip()}if((b0==="point"||b0==="polyline"||b0==="polygon"||b0==="circle")&&O.enabled&&d0){const v0=A5([Q,H0],F.current,O,r0);G.current=v0,v0.snapped&&v0.type!=="none"?(d0.showSnapIndicator(v0.lng,v0.lat,v0.type),T.mousePoint=[v0.lng,v0.lat]):d0.hideSnapIndicator()}else G.current=null,d0==null||d0.hideSnapIndicator();if((b0==="polyline"||b0==="polygon")&&T.isDrawing){d0==null||d0.showDrawingFeedback(T.currentVertices,T.mousePoint,b0,T.startPoint);return}if(b0==="circle"&&T.startPoint&&T.isDrawing){d0==null||d0.showDrawingFeedback(T.currentVertices,T.mousePoint,b0,T.startPoint);return}if(b0==="rectangle"&&T.isDragging&&T.startPoint){d0==null||d0.showDrawingFeedback(T.currentVertices,T.mousePoint,b0,T.startPoint);return}if(b0==="edit"&&T.isDragging&&T.selectedFeatureId&&T.dragVertexIndex!==null&&n0.current){const v0=F.current.find(G0=>G0.id===T.selectedFeatureId);if(v0){const G0=Us(v0,T.dragVertexIndex,Q,H0),sA=F.current.map(fA=>fA.id===G0.id?G0:fA);A0(sA),d0==null||d0.updateVertexHandles(G0),d0==null||d0.updateSelectionHighlight(G0),n0.current=[Q,H0]}return}if(b0==="edit"&&T.isDragging&&T.selectedFeatureId&&T.dragVertexIndex===null&&n0.current){const[v0,G0]=n0.current,sA=Q-v0,fA=H0-G0;if(Math.abs(sA)>1e-10||Math.abs(fA)>1e-10){const kA=F.current.find(_A=>_A.id===T.selectedFeatureId);if(kA){const _A=Qs(kA,sA,fA),ie=F.current.map(KA=>KA.id===_A.id?_A:KA);A0(ie),d0==null||d0.updateVertexHandles(_A),d0==null||d0.updateSelectionHighlight(_A),n0.current=[Q,H0]}}return}},[A0]),U=b.useCallback(l0=>{var Q,H0;const T=H.current,a0=N.current;if(u&&a0==="rectangle"){const d0=(Q=u.getContainer)==null?void 0:Q.call(u);if(!d0)return;const b0=d0.getBoundingClientRect(),I0=l0.clientX-b0.left,F0=l0.clientY-b0.top,L0=(H0=u.containerToLngLat)==null?void 0:H0.call(u,[I0,F0]);if(!L0)return;T.startPoint=[L0.lng,L0.lat],T.isDragging=!0,Z.current={x:l0.clientX,y:l0.clientY},u.setMapStatus({dragEnable:!1,zoomEnable:!1});return}},[u]),e0=b.useCallback(l0=>{var H0,d0,b0,I0,F0,L0;const T=H.current,a0=N.current,Q=D.current;if(u){if(a0==="rectangle"&&T.isDragging&&T.startPoint){const _0=(H0=u.getContainer)==null?void 0:H0.call(u);if(_0){const v0=_0.getBoundingClientRect(),G0=l0.clientX-v0.left,sA=l0.clientY-v0.top,fA=(d0=u.containerToLngLat)==null?void 0:d0.call(u,[G0,sA]),kA=Z.current,_A=kA?h2(kA,{x:l0.clientX,y:l0.clientY}):1/0;if(fA&&_A>t5){const ie=[fA.lng,fA.lat],KA=f2(T.startPoint,ie),Ae=Ve(KA,"rectangle"),NA=[...F.current,Ae];A0(NA),(I0=(b0=R.current).onDrawCreate)==null||I0.call(b0,[Ae])}}T.startPoint=null,T.isDragging=!1,T.mousePoint=null,Z.current=null,Q==null||Q.clearDrawingFeedback(),u.setMapStatus({dragEnable:!0,zoomEnable:!0});return}if(a0==="edit"&&T.isDragging&&T.selectedFeatureId){u.setMapStatus({dragEnable:!0,zoomEnable:!0});const _0=F.current.find(v0=>v0.id===T.selectedFeatureId);_0&&((L0=(F0=R.current).onDrawUpdate)==null||L0.call(F0,_0)),T.isDragging=!1,T.dragVertexIndex=null,n0.current=null;return}}},[u,A0]),c0=b.useCallback(l0=>{var a0,Q,H0;if(N.current!=="edit")return;const T=F.current.find(d0=>d0.id===l0)??null;T&&(o0(l0),(a0=D.current)==null||a0.hideFeatureFromStatic(l0),(Q=D.current)==null||Q.updateSelectionHighlight(T),(H0=D.current)==null||H0.updateVertexHandles(T))},[o0]),h0=b.useCallback(l0=>{if(N.current!=="edit"||!u||!Y.current)return;const T=H.current,a0=F.current.find(H0=>H0.id===Y.current);if(!a0)return;const Q=$t(a0);l0>=0&&l0<Q.length&&(n0.current=Q[l0]),T.isDragging=!0,T.dragVertexIndex=l0,u.setMapStatus({dragEnable:!1,zoomEnable:!1})},[u]),p0=b.useCallback((l0,T)=>{if(N.current!=="edit")return;const a0=H.current;a0.isDragging||!F.current.find(H0=>H0.id===l0)||a0.selectedFeatureId===l0&&(a0.isDragging=!0,a0.dragVertexIndex=null,n0.current=T,u.setMapStatus({dragEnable:!1,zoomEnable:!1}))},[u]),S0=b.useCallback(l0=>{var Q,H0,d0,b0;if(N.current!=="edit"||!Y.current)return;const T=F.current.find(I0=>I0.id===Y.current);if(!T)return;let a0=null;if(T.geometry.type==="LineString"?a0=n5(T,l0):T.geometry.type==="Polygon"&&(a0=r5(T,l0)),a0){const I0=F.current.map(F0=>F0.id===a0.id?a0:F0);A0(I0),(H0=(Q=R.current).onDrawUpdate)==null||H0.call(Q,a0),(d0=D.current)==null||d0.updateVertexHandles(a0),(b0=D.current)==null||b0.updateSelectionHighlight(a0)}},[A0]);b.useCallback(l0=>{var H0,d0,b0,I0;if(N.current!=="edit"||!Y.current)return;const T=F.current.find(F0=>F0.id===Y.current);if(!T)return;const a0=$t(T);let Q=null;if(T.geometry.type==="LineString"&&a0.length>=2){let F0=-1,L0=1/0;for(let _0=0;_0<a0.length-1;_0++){const{dist:v0}=dr(l0,a0[_0],a0[_0+1]);v0<L0&&(L0=v0,F0=_0)}F0>=0&&L0<.001&&(Q=hr(T,F0,l0))}else if(T.geometry.type==="Polygon"&&a0.length>=3){let F0=-1,L0=1/0;for(let _0=0;_0<a0.length;_0++){const v0=(_0+1)%a0.length,{dist:G0}=dr(l0,a0[_0],a0[v0]);G0<L0&&(L0=G0,F0=_0)}F0>=0&&L0<.001&&(Q=pr(T,F0,l0))}if(Q){const F0=F.current.map(L0=>L0.id===Q.id?Q:L0);A0(F0),(d0=(H0=R.current).onDrawUpdate)==null||d0.call(H0,Q),(b0=D.current)==null||b0.updateVertexHandles(Q),(I0=D.current)==null||I0.updateSelectionHighlight(Q)}},[A0]);const Z0=b.useCallback((l0,T)=>{var H0,d0,b0,I0;if(N.current!=="edit"||!Y.current)return;const a0=F.current.find(F0=>F0.id===Y.current);if(!a0)return;let Q=null;if(a0.geometry.type==="LineString"?Q=hr(a0,l0,T):a0.geometry.type==="Polygon"&&(Q=pr(a0,l0,T)),Q){const F0=F.current.map(L0=>L0.id===Q.id?Q:L0);A0(F0),(d0=(H0=R.current).onDrawUpdate)==null||d0.call(H0,Q),(b0=D.current)==null||b0.updateVertexHandles(Q),(I0=D.current)==null||I0.updateSelectionHighlight(Q)}},[A0]),x0=b.useCallback(()=>{var l0,T,a0;N.current==="edit"&&Y.current&&(o0(null),(l0=D.current)==null||l0.showAllFeatures(),(T=D.current)==null||T.clearSelectionHighlight(),(a0=D.current)==null||a0.clearVertexHandles())},[o0]),g0=b.useCallback(l0=>{var H0,d0,b0,I0,F0,L0,_0;const T=N.current;if(T===l0)return;const a0=H.current,Q=D.current;if(a0.isDrawing&&(a0.currentVertices=[],a0.startPoint=null,a0.mousePoint=null,a0.isDrawing=!1,Q==null||Q.clearDrawingFeedback(),Q==null||Q.removeDrawingLayers()),T==="merge"&&(a0.mergeSelectedIds=[],Q==null||Q.clearMergeHighlight(),Q==null||Q.hideTooltip()),T==="split"&&(a0.splitTargetId=null,a0.currentVertices=[],a0.isDrawing=!1,Q==null||Q.clearDrawingFeedback(),Q==null||Q.clearSplitHighlight(),Q==null||Q.hideTooltip()),T==="edit"&&(o0(null),Q==null||Q.showAllFeatures(),Q==null||Q.clearSelectionHighlight(),Q==null||Q.clearVertexHandles(),Q==null||Q.removeSelectionLayers(),Q==null||Q.removeVertexLayer(),Q==null||Q.removeEditClickHandlers(),Q==null||Q.clearEditCursors(),Q==null||Q.hideTooltip(),u&&u.setMapStatus({doubleClickZoom:!0})),T!=="edit"&&T!=="none"&&T!=="merge"&&T!=="split"){Q==null||Q.removeDrawingLayers(),Q==null||Q.hideTooltip(),u&&u.setMapStatus({doubleClickZoom:!0});const v0=(H0=u==null?void 0:u.getContainer)==null?void 0:H0.call(u);v0&&v0.classList.remove("l7-draw-cursor-crosshair")}if(N.current=l0,a0.mode=l0,l0==="merge"){a0.mergeSelectedIds=[];const v0=(d0=u==null?void 0:u.getContainer)==null?void 0:d0.call(u);v0&&v0.classList.add("l7-draw-cursor-crosshair")}else if(l0==="split"){a0.splitTargetId=null,a0.currentVertices=[],a0.isDrawing=!1,u&&u.setMapStatus({doubleClickZoom:!1});const v0=(b0=u==null?void 0:u.getContainer)==null?void 0:b0.call(u);v0&&v0.classList.add("l7-draw-cursor-crosshair")}else if(l0==="edit")Q==null||Q.setupEditClickHandlers(c0,h0,x0,S0,Z0,p0),u&&u.setMapStatus({doubleClickZoom:!1});else if(l0!=="none"){u&&(l0==="polyline"||l0==="polygon")&&u.setMapStatus({doubleClickZoom:!1});const v0=(I0=u==null?void 0:u.getContainer)==null?void 0:I0.call(u);v0&&v0.classList.add("l7-draw-cursor-crosshair")}else{const v0=(F0=u==null?void 0:u.getContainer)==null?void 0:F0.call(u);v0&&v0.classList.remove("l7-draw-cursor-crosshair")}(_0=(L0=R.current).onModeChange)==null||_0.call(L0,l0)},[u,c0,h0,x0,o0]),T0=b.useCallback(l0=>{var H0,d0;const T=H.current,a0=N.current,Q=D.current;if(l0.key==="Escape"){T.isDrawing&&(T.currentVertices=[],T.startPoint=null,T.mousePoint=null,T.isDrawing=!1,Q==null||Q.clearDrawingFeedback()),Y.current&&(o0(null),Q==null||Q.showAllFeatures(),Q==null||Q.clearSelectionHighlight(),Q==null||Q.clearVertexHandles()),Q==null||Q.hideTooltip();return}if((l0.key==="Delete"||l0.key==="Backspace")&&a0==="edit"&&Y.current){l0.preventDefault();const b0=Y.current,I0=F.current.find(F0=>F0.id===b0);if(I0){const F0=F.current.filter(L0=>L0.id!==b0);A0(F0),(d0=(H0=R.current).onDrawDelete)==null||d0.call(H0,I0),o0(null),Q==null||Q.showAllFeatures(),Q==null||Q.clearSelectionHighlight(),Q==null||Q.clearVertexHandles()}return}},[A0,o0]);b.useEffect(()=>{var d0;if(!l||!u)return;const l0=b0=>q(b0),T=b0=>t0(b0),a0=b0=>B(b0),Q=(d0=u.getContainer)==null?void 0:d0.call(u);u.on("click",l0),u.on("dblclick",T),u.on("mousemove",a0),Q&&Q.addEventListener("mousedown",U),document.addEventListener("mouseup",e0),document.addEventListener("keydown",T0);const H0=b0=>{N.current==="edit"&&b0.preventDefault()};return Q&&Q.addEventListener("contextmenu",H0),()=>{u.off("click",l0),u.off("dblclick",T),u.off("mousemove",a0),Q&&(Q.removeEventListener("mousedown",U),Q.removeEventListener("contextmenu",H0)),document.removeEventListener("mouseup",e0),document.removeEventListener("keydown",T0);try{u.setMapStatus({dragEnable:!0,zoomEnable:!0,doubleClickZoom:!0})}catch{}Q&&Q.classList.remove("l7-draw-cursor-crosshair")}},[l,u,q,t0,B,U,e0,T0]),b.useEffect(()=>{var l0;X&&m&&(F.current=[...m],H.current.features=[...m],(l0=D.current)==null||l0.updateFeatures(m))},[X,m]);const j0=b.useCallback(l0=>{var a0,Q;if(X)return;const T=[...F.current,...l0];A0(T),(Q=(a0=R.current).onDrawCreate)==null||Q.call(a0,l0)},[X,A0]),B0=b.useCallback(l0=>{var Q,H0,d0,b0,I0;if(X)return;const T=F.current.find(F0=>F0.id===l0);if(!T)return;const a0=F.current.filter(F0=>F0.id!==l0);A0(a0),(H0=(Q=R.current).onDrawDelete)==null||H0.call(Q,T),Y.current===l0&&(o0(null),(d0=D.current)==null||d0.showAllFeatures(),(b0=D.current)==null||b0.clearSelectionHighlight(),(I0=D.current)==null||I0.clearVertexHandles())},[X,A0,o0]),pA=b.useCallback(()=>{Y.current&&B0(Y.current)},[B0]),E0=b.useCallback(()=>{var l0,T,a0;X||(A0([]),o0(null),(l0=D.current)==null||l0.showAllFeatures(),(T=D.current)==null||T.clearSelectionHighlight(),(a0=D.current)==null||a0.clearVertexHandles())},[X,A0,o0]),D0=b.useCallback(()=>[...F.current],[]),Q0=b.useCallback(l0=>{var T,a0,Q,H0,d0,b0;if(N.current==="edit")if(l0){const I0=F.current.find(F0=>F0.id===l0)??null;o0(l0),I0&&((T=D.current)==null||T.hideFeatureFromStatic(l0),(a0=D.current)==null||a0.updateSelectionHighlight(I0),(Q=D.current)==null||Q.updateVertexHandles(I0))}else o0(null),(H0=D.current)==null||H0.showAllFeatures(),(d0=D.current)==null||d0.clearSelectionHighlight(),(b0=D.current)==null||b0.clearVertexHandles()},[o0]);return{mode:N.current,features:F.current,selectedFeatureId:Y.current,setMode:g0,addFeatures:j0,deleteFeature:B0,deleteSelectedFeature:pA,clearAll:E0,getFeatures:D0,selectFeature:Q0,layerManager:D.current}}const gr=[{mode:"none",icon:"pan_tool",title:"手型 — 关闭绘制态,恢复地图交互",label:"手型"},{mode:"point",icon:"location_on",title:"点 — 单击放置",label:"点"},{mode:"polyline",icon:"timeline",title:"线 — 单击添加顶点,双击结束",label:"线"},{mode:"polygon",icon:"pentagon",title:"面 — 单击添加顶点,双击闭合",label:"面"},{mode:"circle",icon:"radio_button_unchecked",title:"圆 — 单击圆心,再单击确定半径",label:"圆形"},{mode:"rectangle",icon:"crop_square",title:"矩形 — 按住拖拽绘制",label:"矩形"},{mode:"edit",icon:"edit_square",title:"编辑 — 选中要素后拖拽移动或编辑顶点",label:"编辑"}],mr=[{mode:"merge",icon:"call_merge",title:"合并 — 选中2+要素合并为一个",label:"合并"},{mode:"split",icon:"content_cut",title:"切分 — 绘制切线将要素分割",label:"切分"}];function g2(){const s=b.useRef(null),l=b.useCallback((f,h)=>{if(!s.current){const z=document.createElement("div");z.style.cssText=["position:fixed","pointer-events:none","z-index:9999","padding:5px 10px","border-radius:4px","background:rgba(26,27,34,0.92)","color:#f2eff9",'font:500 11px/16px "JetBrains Mono",monospace',"white-space:nowrap","box-shadow:0 2px 8px rgba(0,0,0,0.3)"].join(";"),document.body.appendChild(z),s.current=z}const y=s.current;y.textContent=h,y.style.display="block";const m=y.getBoundingClientRect(),C=f.currentTarget.getBoundingClientRect();let x=C.right+8,L=C.top+C.height/2-m.height/2;const M=window.innerWidth,S=window.innerHeight;x+m.width>M-4&&(x=C.left-m.width-8),x<4&&(x=C.left+C.width/2-m.width/2,L=C.top-m.height-8),L<4&&(L=C.bottom+8),L+m.height>S-4&&(L=C.top-m.height-8),y.style.left=`${Math.max(4,x)}px`,y.style.top=`${Math.max(4,L)}px`},[]),u=b.useCallback(()=>{s.current&&(s.current.style.display="none")},[]);return b.useEffect(()=>()=>{var f;s.current&&((f=s.current.parentElement)==null||f.removeChild(s.current),s.current=null)},[]),{showTooltip:l,hideTooltip:u}}function m2(s,l,u,f,h,y){return s.map(m=>g.jsx("button",{className:`l7-button-control ${y}${l===m.mode?" l7-button-control--active":""}`,onClick:()=>u(m.mode),onMouseEnter:C=>f(C,m.title),onMouseLeave:h,"aria-label":m.title,"aria-pressed":l===m.mode,children:g.jsx("span",{className:"material-symbols-outlined",children:m.icon})},m.mode))}const o5=({activeMode:s,onModeChange:l,modes:u,showDelete:f=!0,hasSelection:h=!1,hasFeatures:y=!1,onDeleteSelected:m,onClearAll:C,className:x,style:L})=>{const{showTooltip:M,hideTooltip:S}=g2(),z=b.useMemo(()=>u?gr.filter(D=>D.mode==="none"||u.includes(D.mode)):gr,[u]),H=b.useCallback(D=>{l(D==="none"||s===D?"none":D)},[s,l]);return g.jsxs("div",{className:`l7-control l7-control-draw l7-control--glass${x?` ${x}`:""}`,style:L,role:"toolbar","aria-label":"基础绘制工具",children:[m2(z,s,H,M,S,"l7-draw-tool-btn"),f&&s==="edit"&&h&&m&&g.jsxs(g.Fragment,{children:[g.jsx("div",{className:"l7-draw-separator"}),g.jsx("button",{className:"l7-button-control l7-draw-action-btn",onClick:m,onMouseEnter:D=>M(D,"删除选中要素"),onMouseLeave:S,"aria-label":"删除选中要素",children:g.jsx("span",{className:"material-symbols-outlined",children:"delete"})})]}),f&&y&&C&&g.jsx("button",{className:"l7-button-control l7-draw-action-btn",onClick:C,onMouseEnter:D=>M(D,"清除所有要素"),onMouseLeave:S,"aria-label":"清除所有要素",children:g.jsx("span",{className:"material-symbols-outlined",children:"delete_sweep"})})]})},s5=({activeMode:s,onModeChange:l,modes:u,className:f,style:h})=>{const{showTooltip:y,hideTooltip:m}=g2(),C=b.useMemo(()=>u?mr.filter(L=>L.mode==="none"||u.includes(L.mode)):mr,[u]),x=b.useCallback(L=>{l(L==="none"||s===L?"none":L)},[s,l]);return g.jsx("div",{className:`l7-control l7-control-draw l7-control--glass${f?` ${f}`:""}`,style:h,role:"toolbar","aria-label":"高级操作工具",children:m2(C,s,x,y,m,"l7-draw-advanced-btn")})},nn=b.forwardRef(function({position:l="topright",defaultFeatures:u,features:f,modes:h,showDelete:y=!0,styles:m,snap:C,className:x,style:L,onDrawCreate:M,onDrawUpdate:S,onDrawDelete:z,onDrawSelect:H,onModeChange:D,onChange:V},O){const{scene:R,mapsService:N,positionClassName:F}=JA(l),Y=XA(),X=i5({scene:R,mapsService:N,styles:m,snap:C,defaultFeatures:u,features:f,onDrawCreate:M,onDrawUpdate:S,onDrawDelete:z,onDrawSelect:H,onModeChange:D,onChange:V}),[n0,Z]=b.useState("none");b.useImperativeHandle(O,()=>({setMode:X.setMode,addFeatures:X.addFeatures,deleteFeature:X.deleteFeature,clearAll:X.clearAll,getFeatures:X.getFeatures,selectFeature:X.selectFeature}),[X]);const G=b.useCallback(B=>{Z(B),X.setMode(B)},[X]),r0=b.useCallback(()=>{X.deleteSelectedFeature()},[X]),A0=b.useCallback(()=>{X.clearAll()},[X]),o0=X.selectedFeatureId!==null,q=X.features.length>0,t0=g.jsxs(g.Fragment,{children:[g.jsx(o5,{activeMode:n0,onModeChange:G,modes:h,showDelete:y,hasSelection:o0,hasFeatures:q,onDeleteSelected:r0,onClearAll:A0}),g.jsx(s5,{activeMode:n0,onModeChange:G,modes:h})]});return Y?g.jsx("div",{className:x,style:L,children:t0}):g.jsx("div",{className:`l7-control-anchor ${F}`,children:t0})});OA.mark(nn);async function T1(s){let l,u;s instanceof File?(l=URL.createObjectURL(s),u=()=>URL.revokeObjectURL(l)):l=s;const{width:f,height:h}=await l5(l);return{url:l,width:f,height:h,revokeUrl:u}}function l5(s){return new Promise((l,u)=>{const f=new Image;f.onload=()=>l({width:f.naturalWidth,height:f.naturalHeight}),f.onerror=()=>u(new Error("Failed to load image")),f.crossOrigin="anonymous",f.src=s})}function y2(s){return new Promise((l,u)=>{const f=new Image;f.onload=()=>l(f),f.onerror=()=>u(new Error("Failed to load image")),f.crossOrigin="anonymous",f.src=s})}async function a5(s,l,u="image/png",f=.92){const h=await y2(s),y=document.createElement("canvas");y.width=Math.round(l.width),y.height=Math.round(l.height);const m=y.getContext("2d");if(!m)throw new Error("Canvas 2D context unavailable");m.drawImage(h,Math.round(l.x),Math.round(l.y),Math.round(l.width),Math.round(l.height),0,0,y.width,y.height);const C=await new Promise((M,S)=>{y.toBlob(z=>z?M(z):S(new Error("Canvas toBlob failed")),u,f)}),x=URL.createObjectURL(C);return{blob:C,url:x,revokeUrl:()=>URL.revokeObjectURL(x),width:y.width,height:y.height}}function c5(s,l,u){const f=Math.max(0,Math.min(s.x,l-s.width)),h=Math.max(0,Math.min(s.y,u-s.height)),y=Math.max(1,Math.min(s.width,l-f)),m=Math.max(1,Math.min(s.height,u-h));return{x:f,y:h,width:y,height:m}}function u5(s,l,u){const f=360/Math.pow(2,l)*.3,h=f*u/2,y=f/2,[m,C]=s;return[[m-h,C+y],[m+h,C+y],[m+h,C-y],[m-h,C-y]]}function yr(s){const l=s.map(f=>f[0]),u=s.map(f=>f[1]);return[Math.min(...l),Math.min(...u),Math.max(...l),Math.max(...u)]}function f5(s,l){const u=[],f=[];for(let y=0;y<4;y++){const[m,C]=s[y],[x,L]=l[y];u.push([-m,-C,-1,0,0,0,x*m,x*C]),f.push(-x),u.push([0,0,0,-m,-C,-1,L*m,L*C]),f.push(-L)}const h=g5(u,f);return[h[0],h[1],h[2],h[3],h[4],h[5],h[6],h[7],1]}function d5(s,l,u,f){const h="naturalWidth"in s?s.naturalWidth:s.width,y="naturalHeight"in s?s.naturalHeight:s.height,m=l.map(G=>G[0]),C=l.map(G=>G[1]),x=Math.min(...m),L=Math.max(...m),M=Math.min(...C),S=Math.max(...C),z=G=>[(G[0]-x)/(L-x)*u,(S-G[1])/(S-M)*f],H=l.map(z),V=f5(H,[[0,0],[h,0],[h,y],[0,y]]),O=document.createElement("canvas");O.width=u,O.height=f;const R=O.getContext("2d"),N=document.createElement("canvas");N.width=h,N.height=y;const F=N.getContext("2d");F.drawImage(s,0,0);const Y=F.getImageData(0,0,h,y),X=R.createImageData(u,f),n0=Y.data,Z=X.data;for(let G=0;G<f;G++)for(let r0=0;r0<u;r0++){const A0=V[6]*r0+V[7]*G+V[8];if(Math.abs(A0)<1e-10)continue;const o0=(V[0]*r0+V[1]*G+V[2])/A0,q=(V[3]*r0+V[4]*G+V[5])/A0;if(o0>=0&&o0<h-1&&q>=0&&q<y-1){const t0=Math.floor(o0),B=Math.floor(q),U=o0-t0,e0=q-B,c0=(B*h+t0)*4,h0=(G*u+r0)*4;for(let p0=0;p0<4;p0++)Z[h0+p0]=Math.round(n0[c0+p0]*(1-U)*(1-e0)+n0[c0+4+p0]*U*(1-e0)+n0[c0+h*4+p0]*(1-U)*e0+n0[c0+h*4+4+p0]*U*e0)}}return R.putImageData(X,0,0),O}function h5(s,l,u,f,h,y,m){const C=document.createElement("canvas");return C.width=f,C.height=h,C.getContext("2d").drawImage(s,l,u,f,h,0,0,f,h),new Promise((L,M)=>{C.toBlob(S=>S?L(S):M(new Error("tile export failed")),y,m)})}async function p5(s,l,u){const{outputWidth:f,outputHeight:h,cols:y,rows:m,format:C="image/png",quality:x=.92}=u,L=d5(s,l,f,h),M=l.map(Z=>Z[0]),S=l.map(Z=>Z[1]),z=Math.min(...M),H=Math.max(...M),D=Math.min(...S),V=Math.max(...S),O=[z,D,H,V],R=await new Promise((Z,G)=>{L.toBlob(r0=>r0?Z(r0):G(new Error("export failed")),C,x)}),N=Math.floor(f/y),F=Math.floor(h/m),Y=(H-z)/y,X=(V-D)/m,n0=[];for(let Z=0;Z<m;Z++)for(let G=0;G<y;G++){const r0=G*N,A0=Z*F,o0=G===y-1?f-r0:N,q=Z===m-1?h-A0:F,t0=z+G*Y,B=G===y-1?H:t0+Y,U=V-Z*X,e0=Z===m-1?D:U-X,c0=[t0,e0,B,U],h0=[[t0,U],[B,U],[B,e0],[t0,e0]],p0=await h5(L,r0,A0,o0,q,C,x);n0.push({blob:p0,row:Z,col:G,extent:c0,corners:h0,width:o0,height:q})}return{canvas:L,fullBlob:R,tiles:n0,extent:O}}function g5(s,l){const f=[];for(let h=0;h<8;h++)f.push([...s[h],l[h]]);for(let h=0;h<8;h++){let y=h,m=Math.abs(f[h][h]);for(let x=h+1;x<8;x++)Math.abs(f[x][h])>m&&(m=Math.abs(f[x][h]),y=x);[f[h],f[y]]=[f[y],f[h]];const C=f[h][h];if(Math.abs(C)<1e-12)throw new Error("Singular matrix in homography computation");for(let x=h;x<=8;x++)f[h][x]/=C;for(let x=0;x<8;x++){if(x===h)continue;const L=f[x][h];for(let M=h;M<=8;M++)f[x][M]-=L*f[h][M]}}return f.map(h=>h[8])}function m5({scene:s,mapsService:l,corners:u,defaultCorners:f,imageSource:h,opacity:y=.7,onCornersChange:m,onImageLoad:C}){const[x,L]=b.useState({phase:"idle",imageUrl:null,imageDimensions:null,corners:f??null,draggingCorner:null,opacity:y}),[M,S]=b.useState(null),z=b.useRef(x.corners),H=b.useRef(null),D=b.useRef(null),V=b.useRef(m);V.current=m;const O=b.useRef(null),R=u!==void 0,N=R?u:x.corners;b.useEffect(()=>{z.current=N??null},[N]),b.useEffect(()=>{R&&u&&L(B=>({...B,corners:u}))},[R,u]),b.useEffect(()=>{h&&Z(h)},[h]);const[F,Y]=b.useState(N??null);b.useEffect(()=>{x.draggingCorner||Y(N??null)},[N,x.draggingCorner]),b.useEffect(()=>{if(!s||!x.imageUrl||!F){if(O.current){try{s==null||s.removeLayer(O.current)}catch{}O.current=null}return}const B=[F[0],F[1],F[2],F[3]];if(O.current){try{s.removeLayer(O.current)}catch{}O.current=null}const U=new zA.ImageLayer({zIndex:10,name:"__calibration_image__"});return U.source(x.imageUrl,{parser:{type:"image",coordinates:B}}),U.style({opacity:x.opacity}),s.addLayer(U),O.current=U,()=>{if(O.current){try{s.removeLayer(O.current)}catch{}O.current=null}}},[s,x.imageUrl,F,x.opacity]);const X=b.useCallback(()=>{if(!l||!z.current){S(null);return}try{const B=z.current.map(U=>{const e0=l.lngLatToContainer([U[0],U[1]]);return[e0.x,e0.y]});S(B)}catch{}},[l]);b.useEffect(()=>{if(!l||!N)return;X();const B=()=>X();return l.on("camerachange",B),l.on("viewchange",B),()=>{l.off("camerachange",B),l.off("viewchange",B)}},[l,N,X]);const n0=b.useCallback(B=>{var h0;if(!l)return;H.current=B,L(p0=>({...p0,draggingCorner:B})),l.setMapStatus({dragEnable:!1,zoomEnable:!1});const U=(h0=l.getContainer)==null?void 0:h0.call(l),e0=p0=>{var j0;if(H.current===null||!z.current||!U)return;const S0=U.getBoundingClientRect(),Z0=p0.clientX-S0.left,x0=p0.clientY-S0.top,g0=l.containerToLngLat([Z0,x0]);if(!g0)return;const T0=[...z.current];T0[H.current]=[g0.lng,g0.lat],z.current=T0,R||L(B0=>({...B0,corners:T0})),(j0=V.current)==null||j0.call(V,T0),X()},c0=()=>{H.current=null,L(p0=>({...p0,draggingCorner:null})),l.setMapStatus({dragEnable:!0,zoomEnable:!0}),document.removeEventListener("mousemove",e0),document.removeEventListener("mouseup",c0)};document.addEventListener("mousemove",e0),document.addEventListener("mouseup",c0)},[l,R,X]),Z=b.useCallback(async(B,U)=>{var e0,c0;(e0=D.current)==null||e0.call(D),D.current=null;try{const h0=await T1(B);D.current=h0.revokeUrl??null;let p0=U??z.current;if(!p0&&l){const S0=l.getCenter(),Z0=l.getZoom(),x0=h0.width/h0.height;p0=u5([S0.lng,S0.lat],Z0,x0)}L(S0=>({...S0,phase:"calibrating",imageUrl:h0.url,imageDimensions:{width:h0.width,height:h0.height},corners:R?S0.corners:p0})),!R&&p0&&(z.current=p0,(c0=V.current)==null||c0.call(V,p0)),C==null||C({width:h0.width,height:h0.height}),requestAnimationFrame(X)}catch(h0){console.error("Failed to load image:",h0)}},[l,R,C,X]),G=b.useCallback(B=>{L(U=>({...U,phase:B}))},[]),r0=b.useCallback(B=>{L(U=>({...U,opacity:B}))},[]),A0=b.useCallback(()=>{var B;if((B=D.current)==null||B.call(D),D.current=null,z.current=null,O.current&&s){try{s.removeLayer(O.current)}catch{}O.current=null}L({phase:"idle",imageUrl:null,imageDimensions:null,corners:null,draggingCorner:null,opacity:y}),S(null)},[y,s]),o0=b.useCallback(()=>z.current,[]),q=b.useCallback(B=>{var U;z.current=B,R||L(e0=>({...e0,corners:B})),(U=V.current)==null||U.call(V,B),X()},[R,X]),t0=b.useCallback(async B=>{if(!x.imageUrl||!z.current||!x.imageDimensions)throw new Error("No image or corners to export");const U=await y2(x.imageUrl),e0=z.current,c0=(B==null?void 0:B.outputWidth)||x.imageDimensions.width,h0=(B==null?void 0:B.outputHeight)||x.imageDimensions.height,p0=(B==null?void 0:B.cols)||1,S0=(B==null?void 0:B.rows)||1,{fullBlob:Z0,tiles:x0,extent:g0}=await p5(U,e0,{outputWidth:c0,outputHeight:h0,cols:p0,rows:S0,format:B==null?void 0:B.format,quality:B==null?void 0:B.quality}),T0=URL.createObjectURL(Z0);return{tiles:x0.map(B0=>({blob:B0.blob,previewUrl:URL.createObjectURL(B0.blob),row:B0.row,col:B0.col,extent:B0.extent,corners:B0.corners,width:B0.width,height:B0.height})),extent:g0,previewUrl:T0,blob:Z0,outputWidth:c0,outputHeight:h0}},[x.imageUrl,x.imageDimensions]);return b.useEffect(()=>()=>{var B;if((B=D.current)==null||B.call(D),O.current&&s)try{s.removeLayer(O.current)}catch{}},[s]),{state:x,screenPositions:M,setImage:Z,setPhase:G,setOpacity:r0,startDrag:n0,clear:A0,getCorners:o0,setCorners:q,exportImage:t0}}const y5=["TL","TR","BR","BL"],Nt=14;function C5({screenPositions:s,draggingCorner:l,phase:u,onStartDrag:f}){const h=b.useCallback(C=>x=>{x.preventDefault(),x.stopPropagation(),f(C)},[f]),y=u==="calibrating",m=`M ${s[0][0]},${s[0][1]} L ${s[1][0]},${s[1][1]} L ${s[2][0]},${s[2][1]} L ${s[3][0]},${s[3][1]} Z`;return g.jsxs(g.Fragment,{children:[g.jsx("svg",{style:{position:"absolute",left:0,top:0,width:"100%",height:"100%",pointerEvents:"none",overflow:"visible"},children:g.jsx("path",{d:m,fill:"none",stroke:"#f59e0b",strokeWidth:"2",strokeDasharray:"6 3"})}),y&&s.map((C,x)=>g.jsx("div",{onMouseDown:h(x),style:{position:"absolute",left:C[0]-Nt/2,top:C[1]-Nt/2,width:Nt,height:Nt,borderRadius:"50%",backgroundColor:"#fff",border:"2px solid #f59e0b",boxShadow:"0 2px 4px rgba(0,0,0,0.3)",cursor:l===x?"grabbing":"grab",transform:l===x?"scale(1.3)":"scale(1)",transition:l===null?"transform 0.15s ease":"none",zIndex:l===x?10:1,pointerEvents:"auto"},title:`${y5[x]} 角点`},x))]})}const Cr=["左上 (TL)","右上 (TR)","右下 (BR)","左下 (BL)"],ye=10;function v5({imageUrl:s,imageDimensions:l,mapCenter:u,mapZoom:f,showInitialCoords:h=!0,onConfirm:y,onCancel:m}){const[C,x]=b.useState({x:0,y:0,width:l.width,height:l.height}),[L,M]=b.useState(null),[S,z]=b.useState(!0),[H,D]=b.useState([[0,0],[0,0],[0,0],[0,0]]),V=b.useRef(null),[O,R]=b.useState(1);b.useEffect(()=>{const o0=()=>{if(!V.current)return;const q=V.current.clientWidth,t0=V.current.clientHeight,B=q/l.width,U=t0/l.height;R(Math.min(B,U,1))};return o0(),window.addEventListener("resize",o0),()=>window.removeEventListener("resize",o0)},[l]);const N=b.useRef(null);b.useCallback((o0,q)=>{if(!N.current)return{imgX:0,imgY:0};const t0=N.current.getBoundingClientRect(),B=(o0-t0.left)/O,U=(q-t0.top)/O;return{imgX:B,imgY:U}},[O]);const F=b.useCallback((o0,q)=>{o0.preventDefault(),o0.stopPropagation(),M({handle:q,startMouseX:o0.clientX,startMouseY:o0.clientY,startCrop:{...C}})},[C]);b.useEffect(()=>{if(!L)return;const o0=t0=>{const B=(t0.clientX-L.startMouseX)/O,U=(t0.clientY-L.startMouseY)/O,e0=L.startCrop;let c0;switch(L.handle){case"move":c0={...e0,x:e0.x+B,y:e0.y+U};break;case"tl":c0={x:e0.x+B,y:e0.y+U,width:e0.width-B,height:e0.height-U};break;case"tr":c0={x:e0.x,y:e0.y+U,width:e0.width+B,height:e0.height-U};break;case"br":c0={x:e0.x,y:e0.y,width:e0.width+B,height:e0.height+U};break;case"bl":c0={x:e0.x+B,y:e0.y,width:e0.width-B,height:e0.height+U};break;default:c0=e0}c0.width<20&&((L.handle==="tl"||L.handle==="bl")&&(c0.x=e0.x+e0.width-20),c0.width=20),c0.height<20&&((L.handle==="tl"||L.handle==="tr")&&(c0.y=e0.y+e0.height-20),c0.height=20),x(c5(c0,l.width,l.height))},q=()=>{M(null)};return document.addEventListener("mousemove",o0),document.addEventListener("mouseup",q),()=>{document.removeEventListener("mousemove",o0),document.removeEventListener("mouseup",q)}},[L,O,l]);const Y=b.useCallback((o0,q,t0)=>{const B=parseFloat(t0);if(isNaN(B))return;const U=[...H];U[o0]=[q==="lng"?B:U[o0][0],q==="lat"?B:U[o0][1]],D(U)},[H]);b.useEffect(()=>{if(S&&u&&f!==null){const o0=C.width/C.height,q=360/Math.pow(2,f)*.3,t0=q*o0/2,B=q/2,[U,e0]=u;D([[U-t0,e0+B],[U+t0,e0+B],[U+t0,e0-B],[U-t0,e0-B]])}},[S,u,f,C.width,C.height]);const X=b.useCallback(()=>{y(C,S?null:H)},[C,S,H,y]),n0=C.x*O,Z=C.y*O,G=C.width*O,r0=C.height*O,A0=o0=>({position:"absolute",left:0,top:0,width:l.width*O,height:l.height*O,background:"rgba(0, 0, 0, 0.45)",clipPath:o0,pointerEvents:"none"});return g.jsx("div",{style:{position:"fixed",inset:0,zIndex:1e4,display:"flex",alignItems:"center",justifyContent:"center",background:"rgba(0,0,0,0.6)"},onClick:m,children:g.jsxs("div",{style:{background:"#fff",borderRadius:10,padding:0,width:"90vw",maxWidth:900,maxHeight:"90vh",overflow:"hidden",boxShadow:"0 8px 32px rgba(0,0,0,0.3)",display:"flex",flexDirection:"column"},onClick:o0=>o0.stopPropagation(),children:[g.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"12px 20px",borderBottom:"1px solid #e5e7eb",fontSize:15,fontWeight:600},children:[g.jsx("span",{children:"图片裁剪 & 初始坐标"}),g.jsx("button",{onClick:m,style:{border:"none",background:"transparent",fontSize:20,cursor:"pointer",color:"#666",lineHeight:1},children:"✕"})]}),g.jsxs("div",{style:{display:"flex",flex:1,minHeight:0,overflow:"hidden"},children:[g.jsx("div",{ref:V,style:{flex:1,display:"flex",alignItems:"center",justifyContent:"center",padding:16,background:"#f9fafb",overflow:"auto",position:"relative"},children:g.jsxs("div",{style:{position:"relative",lineHeight:0},children:[g.jsx("img",{ref:N,src:s,style:{width:l.width*O,height:l.height*O,display:"block",userSelect:"none",pointerEvents:"none"},draggable:!1}),g.jsx("div",{style:A0(`polygon(0% 0%, 100% 0%, 100% ${Z}px, ${n0}px ${Z}px, ${n0}px ${Z+r0}px, 0% ${Z+r0}px)`)}),g.jsx("div",{style:A0(`polygon(100% 0%, 100% 100%, ${n0+G}px 100%, ${n0+G}px ${Z}px, 100% ${Z}px)`)}),g.jsx("div",{style:A0(`polygon(${n0+G}px ${Z}px, 100% ${Z}px, 100% 100%, ${n0+G}px 100%, ${n0+G}px ${Z+r0}px)`)}),g.jsx("div",{style:A0(`polygon(0% ${Z+r0}px, ${n0}px ${Z+r0}px, ${n0+G}px ${Z+r0}px, ${n0+G}px 100%, 0% 100%)`)}),g.jsxs("div",{onMouseDown:o0=>F(o0,"move"),style:{position:"absolute",left:n0,top:Z,width:G,height:r0,border:"2px solid #f59e0b",cursor:(L==null?void 0:L.handle)==="move"?"grabbing":"grab",pointerEvents:"auto",boxSizing:"border-box"},children:[g.jsxs("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:[g.jsx("div",{style:{position:"absolute",top:"33.3%",left:0,right:0,height:1,background:"rgba(245,158,7,0.3)"}}),g.jsx("div",{style:{position:"absolute",top:"66.6%",left:0,right:0,height:1,background:"rgba(245,158,7,0.3)"}}),g.jsx("div",{style:{position:"absolute",left:"33.3%",top:0,bottom:0,width:1,background:"rgba(245,158,7,0.3)"}}),g.jsx("div",{style:{position:"absolute",left:"66.6%",top:0,bottom:0,width:1,background:"rgba(245,158,7,0.3)"}})]}),["tl","tr","br","bl"].map(o0=>{const q={tl:{left:-ye/2,top:-ye/2,cursor:"nwse-resize"},tr:{right:-ye/2,top:-ye/2,cursor:"nesw-resize"},br:{right:-ye/2,bottom:-ye/2,cursor:"nwse-resize"},bl:{left:-ye/2,bottom:-ye/2,cursor:"nesw-resize"}};return g.jsx("div",{onMouseDown:t0=>F(t0,o0),style:{position:"absolute",width:ye,height:ye,background:"#fff",border:"2px solid #f59e0b",borderRadius:2,pointerEvents:"auto",...q[o0]}},o0)}),g.jsxs("div",{style:{position:"absolute",bottom:-22,left:"50%",transform:"translateX(-50%)",fontSize:10,color:"#f59e0b",whiteSpace:"nowrap",pointerEvents:"none",fontFamily:"monospace",background:"rgba(0,0,0,0.5)",padding:"1px 4px",borderRadius:2},children:[Math.round(C.width)," × ",Math.round(C.height)]})]})]})}),h&&g.jsxs("div",{style:{width:260,padding:"16px 20px",borderLeft:"1px solid #e5e7eb",display:"flex",flexDirection:"column",gap:12,overflowY:"auto",fontSize:12},children:[g.jsx("div",{style:{fontWeight:600,marginBottom:4,color:"#333"},children:"裁剪区域"}),g.jsxs("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:"6px 12px",color:"#666",fontFamily:"monospace",fontSize:11},children:[g.jsxs("span",{children:["X: ",Math.round(C.x),"px"]}),g.jsxs("span",{children:["Y: ",Math.round(C.y),"px"]}),g.jsxs("span",{children:["W: ",Math.round(C.width),"px"]}),g.jsxs("span",{children:["H: ",Math.round(C.height),"px"]})]}),g.jsx("button",{onClick:()=>x({x:0,y:0,width:l.width,height:l.height}),style:{padding:"4px 12px",fontSize:11,border:"1px solid #d1d5db",borderRadius:4,background:"#fff",cursor:"pointer",alignSelf:"flex-start"},children:"重置裁剪区域"}),g.jsx("div",{style:{fontWeight:600,color:"#333",marginTop:8},children:"初始坐标"}),g.jsxs("div",{style:{display:"flex",gap:8,alignItems:"center"},children:[g.jsxs("label",{style:{display:"flex",alignItems:"center",gap:4,cursor:"pointer"},children:[g.jsx("input",{type:"radio",name:"coordMode",checked:S,onChange:()=>z(!0)}),g.jsx("span",{children:"自动计算"})]}),g.jsxs("label",{style:{display:"flex",alignItems:"center",gap:4,cursor:"pointer"},children:[g.jsx("input",{type:"radio",name:"coordMode",checked:!S,onChange:()=>z(!1)}),g.jsx("span",{children:"手动输入"})]})]}),S&&g.jsx("div",{style:{color:"#888",fontSize:11,lineHeight:1.5},children:"基于当前地图视口中心自动计算4个角点坐标。确认后将图片放置到地图视口中。"}),!S&&g.jsx("div",{style:{display:"flex",flexDirection:"column",gap:8},children:H.map((o0,q)=>g.jsxs("div",{style:{display:"flex",alignItems:"center",gap:4},children:[g.jsx("span",{style:{width:64,color:"#666",fontSize:11},children:Cr[q]}),g.jsx("input",{type:"number",step:"any",value:o0[0],onChange:t0=>Y(q,"lng",t0.target.value),placeholder:"经度",style:{width:72,padding:"3px 6px",border:"1px solid #d1d5db",borderRadius:3,fontSize:11,fontFamily:"monospace"}}),g.jsx("input",{type:"number",step:"any",value:o0[1],onChange:t0=>Y(q,"lat",t0.target.value),placeholder:"纬度",style:{width:72,padding:"3px 6px",border:"1px solid #d1d5db",borderRadius:3,fontSize:11,fontFamily:"monospace"}})]},q))}),g.jsxs("div",{style:{fontSize:10,color:"#999",fontFamily:"monospace",lineHeight:1.6,marginTop:4},children:[S?"自动模式":"手动模式",":",H.map((o0,q)=>g.jsxs("div",{children:[Cr[q],": [",o0[0].toFixed(4),", ",o0[1].toFixed(4),"]"]},q))]})]})]}),g.jsxs("div",{style:{display:"flex",justifyContent:"flex-end",gap:8,padding:"12px 20px",borderTop:"1px solid #e5e7eb"},children:[g.jsx("button",{onClick:m,style:{padding:"6px 20px",fontSize:13,border:"1px solid #d1d5db",borderRadius:5,background:"#fff",cursor:"pointer"},children:"取消"}),g.jsx("button",{onClick:X,style:{padding:"6px 20px",fontSize:13,border:"none",borderRadius:5,background:"#2563eb",color:"#fff",cursor:"pointer",fontWeight:500},children:"确认裁剪 & 开始配准"})]})]})})}class x5{constructor(){this.entries=[]}addFile(l,u){typeof u=="string"?this.entries.push({name:l,data:new TextEncoder().encode(u)}):u instanceof Blob?this.entries.push({name:l,data:new Uint8Array(0)}):this.entries.push({name:l,data:u})}async addBlob(l,u){const f=await u.arrayBuffer();this.entries.push({name:l,data:new Uint8Array(f)})}generate(){const l=[],u=[];let f=0;for(const C of this.entries){const x=new TextEncoder().encode(C.name),L=b5(C.data),M=C.data.length,S=new Uint8Array(30+x.length),z=new DataView(S.buffer);z.setUint32(0,67324752,!0),z.setUint16(4,20,!0),z.setUint16(6,0,!0),z.setUint16(8,0,!0),z.setUint16(10,0,!0),z.setUint16(12,0,!0),z.setUint32(14,L,!0),z.setUint32(18,M,!0),z.setUint32(22,M,!0),z.setUint16(26,x.length,!0),z.setUint16(28,0,!0),S.set(x,30),l.push(S),l.push(C.data);const H=new Uint8Array(46+x.length),D=new DataView(H.buffer);D.setUint32(0,33639248,!0),D.setUint16(4,20,!0),D.setUint16(6,20,!0),D.setUint16(8,0,!0),D.setUint16(10,0,!0),D.setUint16(12,0,!0),D.setUint16(14,0,!0),D.setUint32(16,L,!0),D.setUint32(20,M,!0),D.setUint32(24,M,!0),D.setUint16(28,x.length,!0),D.setUint16(30,0,!0),D.setUint16(32,0,!0),D.setUint16(34,0,!0),D.setUint16(36,0,!0),D.setUint32(38,0,!0),D.setUint32(42,f,!0),H.set(x,46),u.push(H),f+=S.length+C.data.length}const h=u.reduce((C,x)=>C+x.length,0),y=new Uint8Array(22),m=new DataView(y.buffer);return m.setUint32(0,101010256,!0),m.setUint16(4,0,!0),m.setUint16(6,0,!0),m.setUint16(8,this.entries.length,!0),m.setUint16(10,this.entries.length,!0),m.setUint32(12,h,!0),m.setUint32(16,f,!0),m.setUint16(20,0,!0),new Blob([...l,...u,y],{type:"application/zip"})}}const C2=new Uint32Array(256);for(let s=0;s<256;s++){let l=s;for(let u=0;u<8;u++)l=l&1?3988292384^l>>>1:l>>>1;C2[s]=l}function b5(s){let l=4294967295;for(let u=0;u<s.length;u++)l=C2[(l^s[u])&255]^l>>>8;return(l^4294967295)>>>0}function vr({icon:s,tip:l,onClick:u,disabled:f,direction:h}){const[y,m]=b.useState(!1),x=h==="horizontal"?{left:"50%",top:"100%",transform:"translateX(-50%)",marginTop:6}:{left:"100%",top:"50%",transform:"translateY(-50%)",marginLeft:6};return g.jsxs("div",{style:{position:"relative",display:"flex"},onMouseEnter:()=>m(!0),onMouseLeave:()=>m(!1),children:[g.jsx("button",{className:"l7-button-control",onClick:u,disabled:f,"aria-label":l,children:g.jsx("span",{className:"material-symbols-outlined",children:s})}),y&&g.jsx("div",{style:{position:"absolute",...x,padding:"4px 8px",borderRadius:4,background:"rgba(0,0,0,0.75)",color:"#fff",fontSize:11,whiteSpace:"nowrap",pointerEvents:"none",lineHeight:1.4,zIndex:300},children:l})]})}const rn=b.forwardRef(function({position:l="topright",layout:u="vertical",corners:f,defaultCorners:h,imageSource:y,opacity:m=1,accept:C="image/*",enableCrop:x=!0,enableInitialCoords:L=!0,className:M,style:S,onCornersChange:z,onCalibrate:H,onExport:D,onImageLoad:V,onPreprocess:O,onClear:R,onImagesChange:N,onImageSwitch:F,onImageRename:Y,onImagesReorder:X,onImageAdd:n0,onImageRemove:Z},G){const{scene:r0,mapsService:A0,positionClassName:o0,getMapContainer:q}=JA(l),t0=XA(),B=b.useRef(null),U=b.useRef(null),[e0,c0]=b.useState(null),[h0,p0]=b.useState([]),[S0,Z0]=b.useState(null),[x0,g0]=b.useState(!1),[T0,j0]=b.useState(null),[B0,pA]=b.useState(null),[E0,D0]=b.useState(null),[Q0,l0]=b.useState(""),T=b.useRef(h0);T.current=h0;const a0=b.useRef(S0);a0.current=S0;const Q=b.useRef(new Map);b.useEffect(()=>{if(!r0)return;const J=a0.current,w=new Set;h0.forEach(P0=>{if(P0.id===J||!P0.corners||P0.phase==="idle")return;w.add(P0.id);const Y0=Q.current.get(P0.id);if(Y0){Y0.style({opacity:P0.opacity});return}try{const K0=[P0.corners[0],P0.corners[1],P0.corners[2],P0.corners[3]],cA=new zA.ImageLayer({zIndex:9,name:`__calibration_static_${P0.id}__`});cA.source(P0.thumbnailUrl,{parser:{type:"image",coordinates:K0}}),cA.style({opacity:P0.opacity}),r0.addLayer(cA),Q.current.set(P0.id,cA)}catch(K0){console.error("Failed to create static layer:",K0)}}),Q.current.forEach((P0,Y0)=>{if(!w.has(Y0)){try{r0.removeLayer(P0)}catch{}Q.current.delete(Y0)}})},[r0,h0,S0]),b.useEffect(()=>()=>{Q.current.forEach(J=>{try{r0==null||r0.removeLayer(J)}catch{}}),Q.current.clear()},[r0]);const H0=m5({scene:r0,mapsService:A0,corners:f,defaultCorners:h,imageSource:y,opacity:m,onCornersChange:J=>{const w=a0.current;w&&(z==null||z(w,J))},onImageLoad:J=>{const w=a0.current;w&&(V==null||V(w,J))}}),{state:d0,screenPositions:b0,setImage:I0,setPhase:F0,setOpacity:L0,startDrag:_0,clear:v0,getCorners:G0,setCorners:sA,exportImage:fA}=H0,kA=b.useRef(G0);kA.current=G0;const _A=b.useRef(d0.phase);_A.current=d0.phase;const ie=b.useRef(d0.opacity);ie.current=d0.opacity;const KA=b.useRef(d0);KA.current=d0;const Ae=b.useCallback((J,w)=>{p0(P0=>P0.map(Y0=>Y0.id===J?{...Y0,...w}:Y0))},[]),NA=b.useRef(d0.phase),HA=b.useRef(d0.opacity),oe=b.useRef(d0.corners);S0&&(NA.current!==d0.phase||HA.current!==d0.opacity||oe.current!==d0.corners)&&(NA.current=d0.phase,HA.current=d0.opacity,oe.current=d0.corners,setTimeout(()=>{Ae(S0,{phase:d0.phase,opacity:d0.opacity,corners:d0.corners})},0));const pe=b.useCallback(()=>{const J=a0.current;J&&p0(w=>w.map(P0=>P0.id!==J?P0:{...P0,corners:kA.current(),phase:_A.current,opacity:ie.current}))},[]),we=b.useCallback(()=>{const J=G0();if(J){F0("confirmed");const w=a0.current;H==null||H(w??"",{corners:J,extent:yr(J)})}},[G0,F0,H]),Ye=b.useCallback(()=>{F0("calibrating")},[F0]),qt=b.useCallback(J=>{const w=Number(J.target.value);L0(w);const P0=a0.current;P0&&Ae(P0,{opacity:w})},[L0,Ae]),Mt=b.useCallback(()=>{if(!A0||KA.current.phase==="idle")return;const J=A0.getBounds();if(!J)return;const[[w,P0],[Y0,K0]]=J,cA=(Y0-w)*.1,wA=(K0-P0)*.1,de=[[w+cA,K0-wA],[Y0-cA,K0-wA],[Y0-cA,P0+wA],[w+cA,P0+wA]];sA(de)},[A0,sA]),w0=b.useCallback(J=>{const w=T.current.find(Y0=>Y0.id===J);if(!(w!=null&&w.corners)||!A0)return;const P0=yr(w.corners);A0.fitBounds([[P0[0],P0[1]],[P0[2],P0[3]]])},[A0]),[Xt,lt]=b.useState(!1),[ZA,Ie]=b.useState({outputWidth:0,outputHeight:0,cols:1,rows:1}),[MA,qe]=b.useState(null),[at,ct]=b.useState(!1),Le=b.useCallback(()=>{const J=KA.current.imageDimensions;Ie({outputWidth:(J==null?void 0:J.width)||1024,outputHeight:(J==null?void 0:J.height)||1024,cols:1,rows:1}),qe(null),lt(!0)},[]),ut=b.useCallback(async()=>{ct(!0);try{const J=await fA(ZA);qe(J)}catch(J){console.error("Export failed:",J)}ct(!1)},[fA,ZA]),ke=b.useCallback(async()=>{if(!MA)return;const J=new x5;for(const cA of MA.tiles)await J.addBlob(`tile_${cA.row}_${cA.col}.png`,cA.blob);J.addFile("tiles.json",JSON.stringify({extent:MA.extent,outputWidth:MA.outputWidth,outputHeight:MA.outputHeight,tiles:MA.tiles.map(cA=>({file:`tile_${cA.row}_${cA.col}.png`,row:cA.row,col:cA.col,width:cA.width,height:cA.height,extent:cA.extent,corners:cA.corners}))},null,2));const w=J.generate(),P0=URL.createObjectURL(w),Y0=document.createElement("a");Y0.href=P0,Y0.download="calibrated-tiles.zip",Y0.click(),URL.revokeObjectURL(P0);const K0=a0.current;D==null||D(K0??"",MA)},[MA,D]),f0=b.useCallback(()=>{MA&&(URL.revokeObjectURL(MA.previewUrl),MA.tiles.forEach(J=>URL.revokeObjectURL(J.previewUrl))),qe(null),lt(!1)},[MA]),y0=b.useCallback(()=>{pe();const J=a0.current;v0(),J&&(Ae(J,{phase:"idle",corners:null}),R==null||R(J))},[pe,v0,Ae,R]),V0=b.useCallback((J,w=!1)=>{pe();const P0=Q.current.get(J.id);if(P0&&r0){try{r0.removeLayer(P0)}catch{}Q.current.delete(J.id)}p0(Y0=>Y0.find(cA=>cA.id===J.id)?Y0:(w&&(n0==null||n0(J)),[...Y0,J])),Z0(J.id),F==null||F(J.id),setTimeout(()=>{N==null||N(T.current)},0),v0(),setTimeout(()=>{J.corners?I0(J.source,J.corners):I0(J.source)},50)},[pe,v0,I0,F,N,n0,r0]),m0=b.useCallback(J=>{if(J===a0.current)return;const w=T.current.find(P0=>P0.id===J);w&&V0(w)},[V0]),t=b.useCallback(J=>{var K0,cA;const w=T.current.find(wA=>wA.id===J);w&&((K0=w.revokeUrl)==null||K0.call(w),(cA=w.croppedRevokeUrl)==null||cA.call(w));const P0=Q.current.get(J);if(P0&&r0){try{r0.removeLayer(P0)}catch{}Q.current.delete(J)}const Y0=T.current.filter(wA=>wA.id!==J);p0(Y0),N==null||N(Y0),Z==null||Z(J),J===a0.current&&(Y0.length>0?V0(Y0[0]):(Z0(null),v0(),R==null||R(J)))},[v0,V0,R,N,Z,r0]),k=b.useRef({opacity:J=>{j0(w=>w===J?null:J)},"place-to-view":()=>{Mt()},"scale-to":J=>{w0(J)},calibrate:()=>{we()},"re-edit":()=>{Ye()},export:()=>{Le()},delete:J=>{t(J)}});k.current={opacity:J=>{j0(w=>w===J?null:J)},"place-to-view":()=>{Mt()},"scale-to":J=>{w0(J)},calibrate:()=>{we()},"re-edit":()=>{Ye()},export:()=>{Le()},delete:J=>{t(J)}};const dA=b.useCallback((J,w)=>{if(J!==a0.current){m0(J),setTimeout(()=>{k.current[w](J)},150);return}k.current[w](J)},[m0]),yA=b.useCallback((J,w)=>{pA(J),l0(w)},[]),SA=b.useCallback(J=>{const w=T.current.find(K0=>K0.id===J),P0=Q0.trim();if(!P0||!w||P0===w.name){pA(null);return}const Y0=w.name;p0(K0=>K0.map(cA=>cA.id===J?{...cA,name:P0}:cA)),Y==null||Y(J,Y0,P0),pA(null)},[Q0,Y]),lA=b.useCallback(()=>{pA(null)},[]),gA=b.useCallback((J,w)=>{J.dataTransfer.effectAllowed="move",J.dataTransfer.setData("text/plain",w),J.currentTarget.style.opacity="0.4"},[]),ge=b.useCallback((J,w)=>{J.preventDefault(),J.dataTransfer.dropEffect="move",D0(w)},[]),mA=b.useCallback(()=>{D0(null)},[]),aA=b.useCallback((J,w)=>{J.preventDefault();const P0=J.dataTransfer.getData("text/plain");if(!P0||P0===w){D0(null);return}p0(Y0=>{const K0=Y0.findIndex(se=>se.id===P0),cA=Y0.findIndex(se=>se.id===w);if(K0===-1||cA===-1)return Y0;const wA=[...Y0],[de]=wA.splice(K0,1);return wA.splice(cA,0,de),wA}),D0(null),setTimeout(()=>{X==null||X(T.current)},0)},[X]),GA=b.useCallback(J=>{J.currentTarget.style.opacity="1",D0(null)},[]),Xe=b.useCallback(async J=>{var P0;const w=(P0=J.target.files)==null?void 0:P0[0];if(w)if(J.target.value="",x||L)try{const Y0=await T1(w);ue({url:Y0.url,dimensions:{width:Y0.width,height:Y0.height},revokeUrl:Y0.revokeUrl??null,file:w})}catch(Y0){console.error("Failed to load image for crop:",Y0)}else{const Y0=URL.createObjectURL(w),K0={id:`calib-${Date.now()}-${Math.random().toString(36).slice(2,7)}`,name:w.name,source:w,thumbnailUrl:Y0,dimensions:null,phase:"idle",corners:null,opacity:m,revokeUrl:null,croppedRevokeUrl:null};V0(K0,!0)}},[x,L,m,V0]),Jt=b.useCallback(async J=>{var Y0,K0,cA;const w=(Y0=J.target.files)==null?void 0:Y0[0];if(!w||!e0)return;J.target.value="";const P0=T.current.find(wA=>wA.id===e0);if(P0&&((K0=P0.revokeUrl)==null||K0.call(P0),(cA=P0.croppedRevokeUrl)==null||cA.call(P0)),x||L)try{const wA=await T1(w);ue({url:wA.url,dimensions:{width:wA.width,height:wA.height},revokeUrl:wA.revokeUrl??null,file:w}),Pe(!0)}catch(wA){console.error("Failed to load image for crop:",wA)}else{const wA=URL.createObjectURL(w),de={id:e0,name:w.name,source:w,thumbnailUrl:wA,dimensions:null,phase:"idle",corners:null,opacity:m,revokeUrl:null,croppedRevokeUrl:null};p0(se=>se.map(Me=>Me.id===e0?de:Me)),V0(de),c0(null)}},[e0,x,L,m,V0]),ft=b.useCallback(J=>{var w;c0(J),(w=U.current)==null||w.click()},[]),[CA,ue]=b.useState(null),[UA,Pe]=b.useState(!1),Kt=b.useCallback(async(J,w)=>{var K0;if(!CA)return;const P0=CA.file,Y0=URL.createObjectURL(P0);try{const cA=J.x!==0||J.y!==0||J.width!==CA.dimensions.width||J.height!==CA.dimensions.height;let wA=null,de=P0,se=CA.dimensions;if(cA){const ve=await a5(CA.url,J);(K0=CA.revokeUrl)==null||K0.call(CA),wA=ve.revokeUrl,de=ve.url,se={width:ve.width,height:ve.height},O==null||O(a0.current??"",{croppedDimensions:se,initialCorners:w})}const Me={id:UA&&e0?e0:`calib-${Date.now()}-${Math.random().toString(36).slice(2,7)}`,name:P0.name,source:de,thumbnailUrl:Y0,dimensions:se,phase:"calibrating",corners:w??null,opacity:m,revokeUrl:null,croppedRevokeUrl:wA};UA&&e0&&(p0(ve=>ve.map(ee=>ee.id===e0?Me:ee)),c0(null)),V0(Me,!UA)}catch(cA){console.error("Crop/setImage failed:",cA)}ue(null),Pe(!1)},[CA,UA,e0,m,V0,O]),fe=b.useCallback(()=>{var J;CA&&((J=CA.revokeUrl)==null||J.call(CA),ue(null)),Pe(!1),c0(null)},[CA]),nA=q(),j=d0.phase!=="idle"&&b0&&nA?$e.createPortal(g.jsx("div",{style:{position:"absolute",left:0,top:0,width:"100%",height:"100%",pointerEvents:"none",zIndex:100},children:g.jsx(C5,{screenPositions:b0,draggingCorner:d0.draggingCorner,phase:d0.phase,onStartDrag:_0})}),nA):null,X0=J=>J==="idle"?"未配准":J==="calibrating"?"配准中":J==="confirmed"?"已配准":J;b.useImperativeHandle(G,()=>({getCorners:G0,setCorners:sA,setImage:I0,exportImage:fA,clear:y0,getImages:()=>T.current,switchImage:J=>m0(J),deleteImage:J=>t(J),getActiveImageId:()=>a0.current}));const dt=u==="horizontal",ht=l==="topright"||l==="bottomright",A1=dt?{left:ht?"auto":0,right:ht?0:"auto",top:"100%",marginTop:6}:ht?{right:"100%",top:0,marginRight:6}:{left:"100%",top:0,marginLeft:6},Et=g.jsxs("div",{className:`l7-control l7-control--glass l7-control-image-calibration ${dt?"l7-control-image-calibration--horizontal":""} ${M??""}`,style:{position:"relative",...S},children:[g.jsx(vr,{icon:"upload",tip:"上传图片",onClick:()=>{var J;return(J=B.current)==null?void 0:J.click()},direction:u}),g.jsx(vr,{icon:"list",tip:"校准列表",onClick:()=>g0(!x0),direction:u}),x0&&g.jsxs("div",{className:"l7-control l7-control--glass",style:{position:"absolute",...A1,padding:0,borderRadius:8,width:400,maxHeight:360,display:"flex",flexDirection:"column",zIndex:200,overflow:"hidden"},children:[g.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"12px 16px",borderBottom:"1px solid #c2c6d8",flexShrink:0},children:[g.jsx("span",{style:{fontSize:14,fontWeight:700,color:"#191c1e"},children:"校准列表"}),g.jsxs("div",{style:{display:"flex",alignItems:"center",gap:4},children:[g.jsx("button",{title:"上传图片",onClick:()=>{var J;return(J=B.current)==null?void 0:J.click()},style:{width:28,height:28,display:"flex",alignItems:"center",justifyContent:"center",border:"none",borderRadius:4,background:"transparent",cursor:"pointer",color:"#0050cb",fontSize:16},children:g.jsx("span",{className:"material-symbols-outlined",children:"upload"})}),g.jsx("button",{title:"导出全部",disabled:h0.length===0,onClick:()=>{S0&&Le()},style:{width:28,height:28,display:"flex",alignItems:"center",justifyContent:"center",border:"none",borderRadius:4,background:"transparent",cursor:"pointer",color:"#0050cb",fontSize:16,opacity:h0.length===0?.35:1},children:g.jsx("span",{className:"material-symbols-outlined",children:"download"})})]})]}),g.jsxs("div",{style:{padding:"12px",overflowY:"auto",flex:1,display:"flex",flexDirection:"column",gap:8},children:[h0.length===0&&g.jsx("div",{style:{fontSize:12,color:"#999",textAlign:"center",padding:"20px 0"},children:"暂无校准图片,请先上传"}),h0.map(J=>{const w=J.id===S0,P0=J.phase==="idle",Y0=J.phase==="confirmed";return g.jsxs("div",{draggable:!0,className:`l7-calibration-list-item ${w?"l7-calibration-list-item--active":""} ${E0===J.id?"l7-calibration-list-item--drag-over":""}`,onClick:()=>m0(J.id),onDragStart:K0=>gA(K0,J.id),onDragOver:K0=>ge(K0,J.id),onDragLeave:mA,onDrop:K0=>aA(K0,J.id),onDragEnd:GA,style:{cursor:"ns-resize"},children:[g.jsxs("div",{className:"l7-calibration-list-item__thumbnail",children:[g.jsx("img",{src:J.thumbnailUrl,alt:J.name}),g.jsx("div",{className:"l7-calibration-list-item__thumbnail-overlay",onClick:K0=>{K0.stopPropagation(),ft(J.id)},children:g.jsx("span",{className:"material-symbols-outlined",style:{fontSize:18,color:"#fff"},children:"swap_horiz"})})]}),g.jsxs("div",{className:"l7-calibration-list-item__info",children:[B0===J.id?g.jsx("input",{value:Q0,onChange:K0=>l0(K0.target.value),onBlur:()=>SA(J.id),onKeyDown:K0=>{K0.key==="Enter"&&SA(J.id),K0.key==="Escape"&&lA()},onClick:K0=>K0.stopPropagation(),autoFocus:!0,style:{width:"100%",fontSize:13,fontWeight:600,padding:"2px 4px",border:"1px solid #0066ff",borderRadius:3,outline:"none"}}):g.jsxs("div",{className:"l7-calibration-list-item__name-row",children:[g.jsx("span",{className:"l7-calibration-list-item__name",title:J.name,children:J.name}),g.jsx("button",{className:"l7-calibration-list-item__rename-btn",title:"编辑名称",onClick:K0=>{K0.stopPropagation(),yA(J.id,J.name)},children:g.jsx("span",{className:"material-symbols-outlined",style:{fontSize:12},children:"edit"})})]}),g.jsx("div",{className:"l7-calibration-list-item__phase",children:X0(J.phase)}),T0===J.id&&w&&!P0&&g.jsxs("div",{style:{display:"flex",alignItems:"center",gap:4,marginTop:4,fontSize:10},onClick:K0=>K0.stopPropagation(),children:[g.jsx("input",{type:"range",min:"0",max:"1",step:"0.05",value:J.opacity,onChange:qt,style:{flex:1,height:3,maxWidth:80}}),g.jsxs("span",{style:{minWidth:24,textAlign:"right",color:"#666"},children:[Math.round(J.opacity*100),"%"]})]})]}),g.jsxs("div",{className:"l7-calibration-list-item__actions",onClick:K0=>K0.stopPropagation(),children:[g.jsx("button",{className:"l7-calibration-list-item__action-btn",title:"透明度",disabled:P0,onClick:()=>dA(J.id,"opacity"),children:g.jsx("span",{className:"material-symbols-outlined",children:"opacity"})}),g.jsx("button",{className:"l7-calibration-list-item__action-btn",title:"放置到当前位置",disabled:P0,onClick:()=>dA(J.id,"place-to-view"),children:g.jsx("span",{className:"material-symbols-outlined",children:"filter_center_focus"})}),g.jsx("button",{className:"l7-calibration-list-item__action-btn",title:"缩放到图片范围",disabled:P0||!J.corners,onClick:()=>dA(J.id,"scale-to"),children:g.jsx("span",{className:"material-symbols-outlined",children:"zoom_in"})}),g.jsx("button",{className:"l7-calibration-list-item__action-btn",title:Y0?"重新校准":"确认配准",disabled:P0,onClick:()=>dA(J.id,Y0?"re-edit":"calibrate"),children:g.jsx("span",{className:"material-symbols-outlined",children:Y0?"edit":"my_location"})}),g.jsx("button",{className:"l7-calibration-list-item__action-btn",title:"导出",disabled:P0,onClick:()=>dA(J.id,"export"),children:g.jsx("span",{className:"material-symbols-outlined",children:"download"})}),g.jsx("button",{className:"l7-calibration-list-item__action-btn l7-calibration-list-item__action-btn--danger",title:"删除",onClick:()=>dA(J.id,"delete"),children:g.jsx("span",{className:"material-symbols-outlined",children:"delete"})})]})]},J.id)})]})]}),g.jsx("input",{ref:B,type:"file",accept:C,onChange:Xe,style:{display:"none"}}),g.jsx("input",{ref:U,type:"file",accept:C,onChange:Jt,style:{display:"none"}}),j,CA&&(x||L)&&$e.createPortal(g.jsx(v5,{imageUrl:CA.url,imageDimensions:CA.dimensions,mapCenter:A0?[A0.getCenter().lng,A0.getCenter().lat]:null,mapZoom:A0?A0.getZoom():null,showInitialCoords:L,onConfirm:Kt,onCancel:fe}),document.body),Xt&&$e.createPortal(g.jsx("div",{style:{position:"fixed",inset:0,zIndex:1e4,display:"flex",alignItems:"center",justifyContent:"center",background:"rgba(0,0,0,0.5)"},onClick:f0,children:g.jsxs("div",{style:{background:"#fff",borderRadius:8,padding:20,width:520,maxHeight:"85vh",overflow:"auto",boxShadow:"0 8px 32px rgba(0,0,0,0.25)"},onClick:J=>J.stopPropagation(),children:[g.jsx("div",{style:{fontSize:15,fontWeight:600,marginBottom:16},children:"导出配准图片"}),g.jsxs("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:"8px 16px",marginBottom:12,fontSize:12},children:[g.jsxs("label",{style:{display:"flex",alignItems:"center",gap:6},children:["宽度(px)",g.jsx("input",{type:"number",value:ZA.outputWidth,min:64,max:8192,onChange:J=>Ie(w=>({...w,outputWidth:+J.target.value||1024})),style:{width:72,padding:"2px 6px",border:"1px solid #d1d5db",borderRadius:4}})]}),g.jsxs("label",{style:{display:"flex",alignItems:"center",gap:6},children:["高度(px)",g.jsx("input",{type:"number",value:ZA.outputHeight,min:64,max:8192,onChange:J=>Ie(w=>({...w,outputHeight:+J.target.value||1024})),style:{width:72,padding:"2px 6px",border:"1px solid #d1d5db",borderRadius:4}})]}),g.jsxs("label",{style:{display:"flex",alignItems:"center",gap:6},children:["切片列数",g.jsx("input",{type:"number",value:ZA.cols,min:1,max:20,onChange:J=>Ie(w=>({...w,cols:Math.max(1,+J.target.value||1)})),style:{width:48,padding:"2px 6px",border:"1px solid #d1d5db",borderRadius:4}})]}),g.jsxs("label",{style:{display:"flex",alignItems:"center",gap:6},children:["切片行数",g.jsx("input",{type:"number",value:ZA.rows,min:1,max:20,onChange:J=>Ie(w=>({...w,rows:Math.max(1,+J.target.value||1)})),style:{width:48,padding:"2px 6px",border:"1px solid #d1d5db",borderRadius:4}})]})]}),g.jsx("button",{onClick:ut,disabled:at,style:{padding:"6px 16px",fontSize:12,border:"none",borderRadius:4,background:"#2563eb",color:"#fff",cursor:"pointer",marginBottom:12},children:at?"生成中...":"生成预览"}),MA&&g.jsxs(g.Fragment,{children:[g.jsxs("div",{style:{position:"relative",marginBottom:12,border:"1px solid #e5e7eb",borderRadius:4,overflow:"hidden"},children:[g.jsx("img",{src:MA.previewUrl,style:{width:"100%",display:"block"}}),(ZA.cols>1||ZA.rows>1)&&g.jsxs("svg",{style:{position:"absolute",inset:0,width:"100%",height:"100%",pointerEvents:"none"},children:[Array.from({length:ZA.cols-1},(J,w)=>g.jsx("line",{x1:`${(w+1)/ZA.cols*100}%`,y1:"0",x2:`${(w+1)/ZA.cols*100}%`,y2:"100%",stroke:"#f59e0b",strokeWidth:"1",strokeDasharray:"4 2"},`c${w}`)),Array.from({length:ZA.rows-1},(J,w)=>g.jsx("line",{x1:"0",y1:`${(w+1)/ZA.rows*100}%`,x2:"100%",y2:`${(w+1)/ZA.rows*100}%`,stroke:"#f59e0b",strokeWidth:"1",strokeDasharray:"4 2"},`r${w}`))]})]}),g.jsxs("div",{style:{fontSize:11,color:"#666",fontFamily:"monospace",marginBottom:12,maxHeight:160,overflow:"auto"},children:[g.jsxs("div",{style:{marginBottom:4,fontWeight:600,color:"#333"},children:["总计 ",MA.tiles.length," 个切片 | ",MA.outputWidth,"×",MA.outputHeight,"px"]}),g.jsxs("div",{style:{marginBottom:4},children:["Extent: [",MA.extent.map(J=>J.toFixed(5)).join(", "),"]"]}),MA.tiles.map(J=>g.jsxs("div",{style:{padding:"2px 0",borderBottom:"1px solid #f3f4f6"},children:["tile_",J.row,"_",J.col,".png (",J.width,"×",J.height,") — [",J.extent.map(w=>w.toFixed(5)).join(", "),"]"]},`${J.row}_${J.col}`))]}),g.jsxs("div",{style:{display:"flex",gap:8,justifyContent:"flex-end"},children:[g.jsx("button",{onClick:f0,style:{padding:"6px 16px",fontSize:12,border:"1px solid #d1d5db",borderRadius:4,background:"#fff",cursor:"pointer"},children:"取消"}),g.jsxs("button",{onClick:ke,style:{padding:"6px 16px",fontSize:12,border:"none",borderRadius:4,background:"#2563eb",color:"#fff",cursor:"pointer"},children:["打包下载 ZIP(",MA.tiles.length," 张 + 坐标JSON)"]})]})]}),!MA&&g.jsx("div",{style:{display:"flex",justifyContent:"flex-end"},children:g.jsx("button",{onClick:f0,style:{padding:"6px 16px",fontSize:12,border:"1px solid #d1d5db",borderRadius:4,background:"#fff",cursor:"pointer"},children:"取消"})})]})}),document.body)]});return!r0||!A0?null:t0?Et:g.jsx("div",{className:`l7-control-anchor ${o0}`,children:Et})});OA.mark(rn);function v2({controls:s,layers:l,onLayerToggle:u,containerRef:f}){const h=jA();return g.jsx(W1,{children:s.map((y,m)=>g.jsx(w5,{control:y,layers:l,onLayerToggle:u,scene:h,containerRef:f},`${y.type}-${m}`))})}function w5({control:s,layers:l,onLayerToggle:u,scene:f,containerRef:h}){var m,C,x,L,M,S,z,H,D;const y=s.position??void 0;switch(s.type){case"zoom":return g.jsx(G1,{position:y??"bottomright"});case"scale":return g.jsx(Y1,{position:y??"bottomleft",maxWidth:(m=s.options)==null?void 0:m.maxWidth,metric:((C=s.options)==null?void 0:C.unit)!=="imperial",imperial:((x=s.options)==null?void 0:x.unit)==="imperial"});case"fullscreen":return g.jsx(q1,{position:y??"topright",container:h==null?void 0:h.current});case"geoLocate":return g.jsx(X1,{position:y??"topright"});case"mapTheme":return g.jsx(K1,{position:y??"topright"});case"mouseLocation":return g.jsx(An,{position:y??"bottomleft",precision:(L=s.options)==null?void 0:L.precision});case"exportImage":return g.jsx(en,{position:y??"topright",format:(M=s.options)==null?void 0:M.format});case"layerSwitch":return g.jsx(tn,{position:y??"topright",layers:l.map((V,O)=>({id:V.id??`layer-${O}`,name:V.name,visible:V.visible})),onToggle:u??(()=>{})});case"draw":return g.jsx(nn,{position:y??"topright",modes:(S=s.options)==null?void 0:S.modes,showDelete:(z=s.options)==null?void 0:z.showDelete});case"imageCalibration":return g.jsx(rn,{position:y??"topright",opacity:(H=s.options)==null?void 0:H.opacity,imageSource:(D=s.options)==null?void 0:D.imageSource});default:return null}}const _e={aerialway:"M13,5H8V2.6c0.1854-0.1047,0.3325-0.2659,0.42-0.46L13.5,1.5C13.7761,1.5,14,1.2761,14,1s-0.2239-0.5-0.5-0.5L8.28,1.15 C8.0954,0.9037,7.8077,0.7562,7.5,0.75C7.0963,0.752,6.7334,0.9966,6.58,1.37L1.5,2C1.2239,2,1,2.2239,1,2.5S1.2239,3,1.5,3 l5.22-0.65C6.7967,2.4503,6.8917,2.5351,7,2.6V5H2C1.4477,5,1,5.4477,1,6v7c0,0.5523,0.4477,1,1,1h11c0.5523,0,1-0.4477,1-1V6 C14,5.4477,13.5523,5,13,5z M7,11H3V7h4V11z M12,11H8V7h4V11z",airfield:"M6.8182,0.6818H4.7727 C4.0909,0.6818,4.0909,0,4.7727,0h5.4545c0.6818,0,0.6818,0.6818,0,0.6818H8.1818c0,0,0.8182,0.5909,0.8182,1.9545V4h6v2L9,8l-0.5,5 l2.5,1.3182V15H4v-0.6818L6.5,13L6,8L0,6V4h6V2.6364C6,1.2727,6.8182,0.6818,6.8182,0.6818z",airport:"M15,6.8182L15,8.5l-6.5-1 l-0.3182,4.7727L11,14v1l-3.5-0.6818L4,15v-1l2.8182-1.7273L6.5,7.5L0,8.5V6.8182L6.5,4.5v-3c0,0,0-1.5,1-1.5s1,1.5,1,1.5v2.8182 L15,6.8182z","alcohol-shop":"M14,4h-4v3.44l0,0c0,0,0,0,0,0.06c0.003,0.9096,0.6193,1.7026,1.5,1.93V13H11c-0.2761,0-0.5,0.2239-0.5,0.5 S10.7239,14,11,14h2c0.2761,0,0.5-0.2239,0.5-0.5S13.2761,13,13,13h-0.5V9.43c0.8807-0.2274,1.497-1.0204,1.5-1.93c0,0,0,0,0-0.06 l0,0V4z M13,7.5c0,0.5523-0.4477,1-1,1s-1-0.4477-1-1V5h2V7.5z M5.5,2.5V2C5.7761,2,6,1.7761,6,1.5S5.7761,1,5.5,1V0.5 C5.5,0.2239,5.2761,0,5,0H4C3.7239,0,3.5,0.2239,3.5,0.5V1C3.2239,1,3,1.2239,3,1.5S3.2239,2,3.5,2v0.5C3.5,3.93,1,5.57,1,7v6 c0,0.5523,0.4477,1,1,1h5c0.5318-0.0465,0.9535-0.4682,1-1V7C8,5.65,5.5,3.85,5.5,2.5z M4.5,12C3.1193,12,2,10.8807,2,9.5 S3.1193,7,4.5,7S7,8.1193,7,9.5S5.8807,12,4.5,12z","american-football":"M7.53,3C3.09,3,1,7.5,1,7.5S3.09,12,7.53,12S14,7.5,14,7.5S12,3,7.53,3z M11,7v1.5C11,8.7761,10.7761,9,10.5,9 S10,8.7761,10,8.5V8H8v0.5C8,8.7761,7.7761,9,7.5,9S7,8.7761,7,8.5V8H5v0.5C5,8.7761,4.7761,9,4.5,9S4,8.7761,4,8.5v-2 C4,6.2239,4.2239,6,4.5,6S5,6.2239,5,6.5V7h2V6.5C7,6.2239,7.2239,6,7.5,6S8,6.2239,8,6.5V7h2V6.5C10,6.2239,10.2239,6,10.5,6 S11,6.2239,11,6.5V7z","amusement-park":"M13.5 7C13.5 9.02798 12.4939 10.821 10.9535 11.907L12 13.9999H3L4.04645 11.907C2.50613 10.821 1.5 9.02798 1.5 7C1.5 3.68629 4.18629 1 7.5 1C10.8137 1 13.5 3.68629 13.5 7ZM12.2984 7.125H8.99487C8.96844 7.4453 8.84138 7.73706 8.64538 7.96861L10.9814 10.3046C11.7719 9.47202 12.2669 8.35614 12.2984 7.125ZM10.8046 10.4814L8.46861 8.14538C8.33136 8.26156 8.17296 8.35351 8 8.41465V11.7743C9.08206 11.6623 10.0574 11.1908 10.8046 10.4814ZM6.00513 7.125H2.7016C2.73307 8.35614 3.2281 9.47202 4.01864 10.3046L6.35462 7.96861C6.15862 7.73706 6.03156 7.4453 6.00513 7.125ZM4.19542 10.4814C4.94259 11.1908 5.91794 11.6623 7 11.7743V8.41465C6.82704 8.35351 6.66864 8.26156 6.53139 8.14538L4.19542 10.4814ZM12.2984 6.875C12.2669 5.64386 11.7719 4.52798 10.9814 3.69542L8.64538 6.03139C8.84138 6.26294 8.96844 6.5547 8.99487 6.875H12.2984ZM10.8046 3.51864C9.97202 2.7281 8.85614 2.23307 7.625 2.2016V5.50513C7.9453 5.53156 8.23706 5.65862 8.46861 5.85462L10.8046 3.51864ZM7.375 5.50513V2.2016C6.14386 2.23307 5.02798 2.7281 4.19542 3.51864L6.53139 5.85462C6.76294 5.65862 7.0547 5.53156 7.375 5.50513ZM6.35462 6.03139L4.01864 3.69542C3.2281 4.52798 2.73307 5.64386 2.7016 6.875H6.00513C6.03156 6.5547 6.15862 6.26294 6.35462 6.03139Z","animal-shelter":"M 7.528,0.895 9,2 h 1 L 11.473,0.896 C 11.689502,0.73373378 12,0.8884387 12,1.159 V 4.5 c 0,0.722 -0.522,1.184 -1,1.573 V 10 l 0.8,2.4 0.706,0.353 c 0.302922,0.151551 0.494181,0.461283 0.494,0.8 C 13,13.8 12.8,14 12.553,14 H 4.25 C 3.017,14 2,13 2,11.713 2,9.5424588 2.4530836,7.9300225 2.745,6.845 2.8910836,6.3020225 3.0352907,5.8946079 3.138,5.614 3.1956028,5.4566256 3.253276,5.3110749 3.33,5.165 3.7788405,4.3104525 5.0743666,4.9556117 4.672,5.833 4.6232251,5.9393571 4.5778358,6.0512046 4.539,6.15 4.4477518,6.3821288 4.325004,6.7430011 4.193,7.234 3.947004,8.1490011 3.674,9.521 3.558,11.367 3.926,9.307 5.98,7.239 7.635,5.758 7.29,5.432 7.001,5.038 7.001,4.5 l 0,-3.342 c 0,-0.2705613 0.3106215,-0.42543084 0.527,-0.263 z",aquarium:"M1.13505 8.57743C1.98919 6.14741 4.72075 2 10 2C12.6518 2 14 3 14 3C14 3 11.6865 3 10.6203 3.44512C10.54 3.47864 10.4747 3.53744 10.4329 3.61375C10.2432 3.95995 9.75252 5.04744 10.3231 6.19506C10.4172 6.38427 10.6364 6.46548 10.8383 6.40312C11.3474 6.24589 12.3301 5.89727 13.0761 5.35729C13.2973 5.1972 13.615 5.25773 13.6797 5.52298C13.9401 6.59045 13.9401 8.40955 13.6797 9.47702C13.615 9.74227 13.2973 9.8028 13.0761 9.64271C12.3301 9.10273 11.3474 8.75411 10.8383 8.59688C10.6364 8.53452 10.4172 8.61573 10.3231 8.80494C9.75252 9.95256 10.2432 11.04 10.4329 11.3863C10.4747 11.4626 10.54 11.5214 10.6203 11.5549C11.6865 12 14 12 14 12C13.5 12.3333 11.8 13 9.00001 13C4.51722 13 2.02736 10.3427 1.25972 9.35985C1.08546 9.13673 1.04117 8.84452 1.13505 8.57743ZM5.00001 9C5.69037 9 6.25001 8.44036 6.25001 7.75C6.25001 7.05964 5.69037 6.5 5.00001 6.5C4.30966 6.5 3.75001 7.05964 3.75001 7.75C3.75001 8.44036 4.30966 9 5.00001 9Z",arrow:"M8.29289 2.29289C8.68342 1.90237 9.31658 1.90237 9.70711 2.29289L14.2071 6.79289C14.5976 7.18342 14.5976 7.81658 14.2071 8.20711L9.70711 12.7071C9.31658 13.0976 8.68342 13.0976 8.29289 12.7071C7.90237 12.3166 7.90237 11.6834 8.29289 11.2929L11 8.5H1.5C0.947715 8.5 0.5 8.05228 0.5 7.5C0.5 6.94772 0.947715 6.5 1.5 6.5H11L8.29289 3.70711C7.90237 3.31658 7.90237 2.68342 8.29289 2.29289Z","art-gallery":"m10.71 3-2.86-2.849996c-.1945-.1960996-.511-.1973996-.7071-.0029-.001.001-.0019.0019-.0029.0029l-2.85 2.849996h-2.79c-.2761 0-.5.2239-.5.5v9c0 .2761.2239.5.5.5h12c.2761 0 .5-.2239.5-.5v-9c0-.2761-.2239-.5-.5-.5zm-3.21-1.79 1.79 1.79h-3.58zm5.5 10.79h-11v-8h11zm-8-5c-.5523 0-1-.4477-1-1s.4477-1 1-1 1 .4477 1 1-.4477 1-1 1zm7 4h-7.5l1.5-3 1.25 2.5 2.25-4.5z",attraction:"M6,2C5.446,2,5.2478,2.5045,5,3L4.5,4h-2C1.669,4,1,4.669,1,5.5v5C1,11.331,1.669,12,2.5,12h10 c0.831,0,1.5-0.669,1.5-1.5v-5C14,4.669,13.331,4,12.5,4h-2L10,3C9.75,2.5,9.554,2,9,2H6z M2.5,5C2.7761,5,3,5.2239,3,5.5 S2.7761,6,2.5,6S2,5.7761,2,5.5S2.2239,5,2.5,5z M7.5,5c1.6569,0,3,1.3431,3,3s-1.3431,3-3,3s-3-1.3431-3-3S5.8431,5,7.5,5z M7.5,6.5C6.6716,6.5,6,7.1716,6,8l0,0c0,0.8284,0.6716,1.5,1.5,1.5l0,0C8.3284,9.5,9,8.8284,9,8l0,0C9,7.1716,8.3284,6.5,7.5,6.5 L7.5,6.5z",bakery:"M5.294,4.382,6,9.5a.979.979,0,0,0,1,1H8a.979.979,0,0,0,1-1l.706-5.118C9.706,3,7.5,3,7.5,3S5.291,3,5.294,4.382ZM3.5,5C2,5,2,6,2,6l1,4H4.5a.793.793,0,0,0,.794-.765L4.5,5Zm-2,2.5a1.533,1.533,0,0,0-1.059.412A1.366,1.366,0,0,0,0,8.794V11H.882A1.02,1.02,0,0,0,2,10ZM11.5,5C13,5,13,6,13,6l-1,4H10.5a.793.793,0,0,1-.794-.765L10.5,5Zm2,2.5a1.533,1.533,0,0,1,1.059.412A1.366,1.366,0,0,1,15,8.794V11h-.882A1.02,1.02,0,0,1,13,10Z",bank:"M1,3C0.446,3,0,3.446,0,4v7c0,0.554,0.446,1,1,1h13c0.554,0,1-0.446,1-1V4c0-0.554-0.446-1-1-1H1z M1,4h1.5 C2.7761,4,3,4.2239,3,4.5S2.7761,5,2.5,5S2,4.7761,2,4.5L1.5,5C1.7761,5,2,5.2239,2,5.5S1.7761,6,1.5,6S1,5.7761,1,5.5V4z M7.5,4 C8.8807,4,10,5.567,10,7.5l0,0C10,9.433,8.8807,11,7.5,11S5,9.433,5,7.5S6.1193,4,7.5,4z M12.5,4H14v1.5C14,5.7761,13.7761,6,13.5,6 S13,5.7761,13,5.5S13.2239,5,13.5,5L13,4.5C13,4.7761,12.7761,5,12.5,5S12,4.7761,12,4.5S12.2239,4,12.5,4z M7.5,5.5 c-0.323,0-0.5336,0.1088-0.6816,0.25h1.3633C8.0336,5.6088,7.823,5.5,7.5,5.5z M6.625,6C6.5795,6.091,6.5633,6.1711,6.5449,6.25 h1.9102C8.4367,6.1711,8.4205,6.091,8.375,6H6.625z M6.5,6.5v0.25h2V6.5H6.5z M6.5,7v0.25h2V7H6.5z M6.5,7.5v0.25h2V7.5H6.5z M6.5,8 L6.25,8.25h2L8.5,8H6.5z M6,8.5c0,0,0.0353,0.1024,0.1016,0.25H8.375L8,8.5H6z M1.5,9C1.7761,9,2,9.2239,2,9.5S1.7761,10,1.5,10 L2,10.5C2,10.2239,2.2239,10,2.5,10S3,10.2239,3,10.5S2.7761,11,2.5,11H1V9.5C1,9.2239,1.2239,9,1.5,9z M6.2383,9 C6.2842,9.0856,6.3144,9.159,6.375,9.25h2.2676C8.7092,9.1121,8.75,9,8.75,9H6.2383z M13.5,9C13.7761,9,14,9.2239,14,9.5V11h-1.5 c-0.2761,0-0.5-0.2239-0.5-0.5s0.2239-0.5,0.5-0.5s0.5,0.2239,0.5,0.5l0.5-0.5C13.2239,10,13,9.7761,13,9.5S13.2239,9,13.5,9z M6.5664,9.5c0.0786,0.0912,0.1647,0.1763,0.2598,0.25h1.4199C8.3462,9.6727,8.4338,9.5883,8.5,9.5H6.5664z","bank-JP":"M12.2808,3.3763l-2.9,3.625H11.25a.75.75,0,0,1,0,1.5H8.5v1h2.75a.75.75,0,0,1,0,1.5H8.5v1.25a1,1,0,0,1-2,0v-1.25H3.75a.75.75,0,1,1,0-1.5H6.5v-1H3.75a.75.75,0,0,1,0-1.5H5.6193l-2.9-3.625A1,1,0,0,1,4.2771,2.1216l.0037.0047L7.5,6.15l3.2192-4.024a1,1,0,0,1,1.5653,1.2453Z",bar:"M7.5,1c-2,0-7,0.25-6.5,0.75L7,8v4 c0,1-3,0.5-3,2h7c0-1.5-3-1-3-2V8l6-6.25C14.5,1.25,9.5,1,7.5,1z M7.5,2c2.5,0,4.75,0.25,4.75,0.25L11.5,3h-8L2.75,2.25 C2.75,2.25,5,2,7.5,2z",barrier:"m13 2h-11c-.26522 0-.51957.10536-.70711.29289-.18753.18754-.29289.44189-.29289.70711v6c0 .26522.10536.51957.29289.70711.18754.18753.44189.29289.70711.29289h1v2.5c0 .1326.05268.2598.14645.3536.09376.0937.22094.1464.35355.1464s.25979-.0527.35355-.1464c.09377-.0938.14645-.221.14645-.3536v-.5h7v.5c0 .1326.0527.2598.1464.3536.0938.0937.221.1464.3536.1464s.2598-.0527.3536-.1464c.0937-.0938.1464-.221.1464-.3536v-2.5h1c.2652 0 .5196-.10536.7071-.29289.1875-.18754.2929-.44189.2929-.70711v-6c0-.26522-.1054-.51957-.2929-.70711-.1875-.18753-.4419-.29289-.7071-.29289zm0 1v2l-2-2zm-3.5 0 3.5 3.5v2.5l-6-6zm-4 6-3.5-3.5v-2.5l6 6zm-3.5 0v-2l2 2zm9 2h-7v-1h7zm-.207-2h-1.293l-6-6h2l6 6z",baseball:"m9.00003 3.5c0 .8284-.6716 1.5-1.5 1.5s-1.5-.6716-1.5-1.5.6716-1.5 1.5-1.5 1.5.6716 1.5 1.5zm-3-3.22c0-.1546-.1254-.28-.28-.28-.0979.0262-.1852.0821-.25.16l-2.47 4.43c-.0059.0431-.0059.0869 0 .13 0 .1546.1254.28.28.28.1015-.0243.1926-.0803.26-.16l2.46-4.43c.006-.0431.006-.0869 0-.13zm5.89997 13.92-2.89997-7.81c-.0474-.2273-.2478-.3901-.48-.39h-5c-.2761 0-.5.2239-.5.5s.2239.5.5.5h2.48l1.45 2.51-4.27 4.61c-.1141.0932-.1802.2327-.18.38 0 .2761.2239.5.5.5.1224-.0006.2401-.047.33-.13l4.45-4.15 2.75997 4c.0895.1592.2574.2584.44.26.2796.0002.5092-.2207.52-.5-.0042-.1013-.039-.199-.1-.28z",basketball:"M3.66001 7H2.03C2.11012 6.02077 2.45969 5.05281 3.04001 4.26C3.39039 5.12432 3.59972 6.0693 3.66001 7ZM4.73501 7H7V2C5.78985 2.1061 4.72468 2.61284 3.83501 3.44C4.36491 4.54578 4.67079 5.77549 4.73501 7ZM8 2V7H10.265C10.3292 5.77549 10.6351 4.54578 11.165 3.44C10.2753 2.61284 9.21014 2.1061 8 2ZM11.96 4.26C11.6096 5.12432 11.4003 6.0693 11.34 7H12.97C12.8899 6.02077 12.5403 5.05281 11.96 4.26ZM14 8.49919C14 8.77489 13.7765 8.99838 13.5008 8.99838H11.72L10.96 10.5184V12.8984C10.9578 12.9736 10.934 13.0466 10.8915 13.1087C10.8489 13.1707 10.7894 13.2192 10.72 13.2484C10.6743 13.2607 10.6273 13.2674 10.58 13.2684C10.5312 13.2706 10.4825 13.2619 10.4375 13.2428C10.3925 13.2238 10.3524 13.195 10.32 13.1584L9.3 12.1484L7.71 13.2084C7.64698 13.2476 7.57423 13.2684 7.5 13.2684C7.42577 13.2684 7.35303 13.2476 7.29 13.2084L5.7 12.1484L4.68 13.1584C4.62956 13.211 4.56471 13.2477 4.49357 13.2637C4.42243 13.2797 4.34814 13.2744 4.28 13.2484C4.21063 13.2192 4.1511 13.1707 4.10854 13.1087C4.06599 13.0466 4.04219 12.9736 4.04 12.8984V10.5184L3.28 8.99838H1.49919C1.2235 8.99838 1 8.77489 1 8.4992C0.999998 8.2235 1.22349 8 1.49919 8H13.5008C13.7765 8 14 8.2235 14 8.49919ZM6.86 8.99838H4.12L4.75 10.2684C4.7772 10.3173 4.791 10.3725 4.79 10.4284V11.9884L5.35 11.4384L6.86 8.99838ZM8.84 11.5484L7.5 9.38838L6.16 11.5484L7.5 12.4484L8.84 11.5484ZM10.89 8.99838H8.14L9.65 11.4384L10.21 11.9884V10.4284C10.209 10.3725 10.2228 10.3173 10.25 10.2684L10.89 8.99838Z",bbq:"M9.32,7.655C10.8782,7.108,11.9471,5.6506,12,4H3c0.053,1.6299,1.0978,3.0728,2.63,3.631L4.923,9.044 c-1.3571-0.2355-2.6482,0.6737-2.8837,2.0308s0.6737,2.6482,2.0308,2.8837C4.9927,14.1187,5.9273,13.7485,6.49,13h4.223l0.335,0.717 c0.0836,0.1735,0.2594,0.2836,0.452,0.283c0.0733,0.0003,0.1457-0.0158,0.212-0.047c0.2497-0.117,0.3575-0.4141,0.241-0.664 L9.32,7.655z M4.5,12.75c-0.6904,0-1.25-0.5596-1.25-1.25s0.5596-1.25,1.25-1.25s1.25,0.5596,1.25,1.25 C5.7484,12.1897,5.1897,12.7484,4.5,12.75z M6.95,12c0.2066-1.007-0.2268-2.0374-1.091-2.594L6.6,7.923 c0.577,0.1042,1.168,0.1042,1.745,0l1.9,4.07L6.95,12z M4.75,1C4.6119,1,4.5,1.1119,4.5,1.25c0,0.5-0.5,0.5-0.5,0.5c-1,0-1,1-1,1 C3,2.8881,3.1119,3,3.25,3S3.5,2.8881,3.5,2.75c0-0.5,0.5-0.5,0.5-0.5c1,0,1-1,1-1C5,1.1119,4.8881,1,4.75,1z M6.75,1 C6.6119,1,6.5,1.1119,6.5,1.25c0,0.5-0.5,0.5-0.5,0.5c-1,0-1,1-1,1C5,2.8881,5.1119,3,5.25,3S5.5,2.8881,5.5,2.75 c0-0.5,0.5-0.5,0.5-0.5c1,0,1-1,1-1C7,1.1119,6.8881,1,6.75,1z M8.75,1C8.6119,1,8.5,1.1119,8.5,1.25c0,0.5-0.5,0.5-0.5,0.5 c-1,0-1,1-1,1C7,2.8881,7.1119,3,7.25,3S7.5,2.8881,7.5,2.75c0-0.5,0.5-0.5,0.5-0.5c1,0,1-1,1-1C9,1.1119,8.8881,1,8.75,1z M10.75,1 c-0.1381,0-0.25,0.1119-0.25,0.25c0,0.5-0.5,0.5-0.5,0.5c-1,0-1,1-1,1C9,2.8881,9.1119,3,9.25,3S9.5,2.8881,9.5,2.75 c0-0.5,0.5-0.5,0.5-0.5c1,0,1-1,1-1C11,1.1119,10.8881,1,10.75,1z M12.75,1c-0.1381,0-0.25,0.1119-0.25,0.25c0,0.5-0.5,0.5-0.5,0.5 c-1,0-1,1-1,1C11,2.8881,11.1119,3,11.25,3s0.25-0.1119,0.25-0.25c0-0.5,0.5-0.5,0.5-0.5c1,0,1-1,1-1C13,1.1119,12.8881,1,12.75,1z",beach:"M5.3608,1.67l-.01,4.02a4.4523,4.4523,0,0,0-1.1-.11c-.37.1-.74.63-1.1.76A4.2019,4.2019,0,0,1,5.3608,1.67Zm2.41-.64,2.03,3.45a3.1832,3.1832,0,0,1,.84-.61c.36-.1.94.17,1.34.11A4.2018,4.2018,0,0,0,7.7708,1.03ZM1.0008,13h13c-.66-.66-2.64-1.11-4.34-1.33l-1.87-7c.52-.05,1.15.03,1.53,0l-2.11-3.6h-.01a6.1743,6.1743,0,0,0-.7.14,4.3792,4.3792,0,0,0-.64.22l-.01,4.15c.35-.17.84-.54,1.3-.74l1.8,6.74c-.58-.05-1.09-.08-1.45-.08C6.0308,11.5,2.0008,12,1.0008,13Z",beer:"M12,5V2c0,0-1-1-4.5-1S3,2,3,2v3c0.0288,1.3915,0.3706,2.7586,1,4c0.6255,1.4348,0.6255,3.0652,0,4.5c0,0,0,1,3.5,1 s3.5-1,3.5-1c-0.6255-1.4348-0.6255-3.0652,0-4.5C11.6294,7.7586,11.9712,6.3915,12,5z M7.5,13.5 c-0.7966,0.035-1.5937-0.0596-2.36-0.28c0.203-0.7224,0.304-1.4696,0.3-2.22h4.12c-0.004,0.7504,0.097,1.4976,0.3,2.22 C9.0937,13.4404,8.2966,13.535,7.5,13.5z M7.5,5C6.3136,5.0299,5.1306,4.8609,4,4.5v-2C5.131,2.1411,6.3137,1.9722,7.5,2 C8.6863,1.9722,9.869,2.1411,11,2.5v2C9.8694,4.8609,8.6864,5.0299,7.5,5z",bicycle:"M7.5,2c-0.6761-0.01-0.6761,1.0096,0,1H9v1.2656l-2.8027,2.334L5.2226,4H5.5c0.6761,0.01,0.6761-1.0096,0-1h-2 c-0.6761-0.01-0.6761,1.0096,0,1h0.6523L5.043,6.375C4.5752,6.1424,4.0559,6,3.5,6C1.5729,6,0,7.5729,0,9.5S1.5729,13,3.5,13 S7,11.4271,7,9.5c0-0.6699-0.2003-1.2911-0.5293-1.8242L9.291,5.3262l0.4629,1.1602C8.7114,7.0937,8,8.2112,8,9.5 c0,1.9271,1.5729,3.5,3.5,3.5S15,11.4271,15,9.5S13.4271,6,11.5,6c-0.2831,0-0.5544,0.0434-0.8184,0.1074L10,4.4023V2.5 c0-0.2761-0.2239-0.5-0.5-0.5H7.5z M3.5,7c0.5923,0,1.1276,0.2119,1.5547,0.5527l-1.875,1.5625 c-0.5109,0.4273,0.1278,1.1945,0.6406,0.7695l1.875-1.5625C5.8835,8.674,6,9.0711,6,9.5C6,10.8866,4.8866,12,3.5,12S1,10.8866,1,9.5 S2.1133,7,3.5,7L3.5,7z M11.5,7C12.8866,7,14,8.1134,14,9.5S12.8866,12,11.5,12S9,10.8866,9,9.5c0-0.877,0.4468-1.6421,1.125-2.0879 l0.9102,2.2734c0.246,0.6231,1.1804,0.2501,0.9297-0.3711l-0.9082-2.2695C11.2009,7.0193,11.3481,7,11.5,7L11.5,7z","bicycle-share":"M10,1C9.4477,1,9,1.4477,9,2c0,0.5523,0.4477,1,1,1s1-0.4477,1-1C11,1.4477,10.5523,1,10,1z M8.1445,2.9941 c-0.13,0.0005-0.2547,0.0517-0.3477,0.1426l-2.6406,2.5c-0.2256,0.2128-0.2051,0.5775,0.043,0.7637L7,7.75v2.75 c-0.01,0.6762,1.0096,0.6762,1,0v-3c0.0003-0.1574-0.0735-0.3057-0.1992-0.4004L7.0332,6.5234l1.818-1.7212l0.7484,0.9985 C9.6943,5.9265,9.8426,6.0003,10,6h1.5c0.6761,0.01,0.6761-1.0096,0-1h-1.25L9.5,4L8.9004,3.1992 C8.8103,3.0756,8.6685,3,8.5156,2.9941H8.1445z M3,7c-1.6569,0-3,1.3432-3,3s1.3431,3,3,3s3-1.3432,3-3S4.6569,7,3,7z M12,7 c-1.6569,0-3,1.3432-3,3s1.3431,3,3,3s3-1.3432,3-3S13.6569,7,12,7z M3,8c1.1046,0,2,0.8954,2,2s-0.8954,2-2,2s-2-0.8954-2-2 S1.8954,8,3,8z M12,8c1.1046,0,2,0.8954,2,2s-0.8954,2-2,2s-2-0.8954-2-2S10.8954,8,12,8z","blood-bank":"m11.2 6.1-3.7-5.1-3.7 5.1c-.5.7-.8 1.6-.8 2.5 0 2.4 2 4.4 4.5 4.4s4.5-2 4.5-4.4c0-.9-.3-1.8-.8-2.5zm-1.2 2.9h-2v2h-1v-2h-2v-1h2v-2h1v2h2z","bowling-alley":"M10.922 3.166c0 1.006-.335 1.857-.693 2.77-.414 1.052-.86 2.185-.86 3.73 0 2.166.687 4.333 1.409 4.333h1.444c.723 0 1.409-2.166 1.409-4.333 0-1.545-.446-2.678-.86-3.73-.358-.912-.693-1.764-.693-2.77 0-.722.144-.723.144-1.445A.743.743 0 0 0 11.5.999a.743.743 0 0 0-.722.722c0 .723.144.723.144 1.445Zm-2.552 6.5c0-1.234.254-2.236.55-3.091a4.5 4.5 0 1 0-.17 6.038c-.237-.865-.38-1.91-.38-2.947ZM5.24 7.12a.62.62 0 1 1-1.24 0 .62.62 0 0 1 1.24 0Zm-1 2a.62.62 0 1 1-1.24 0 .62.62 0 0 1 1.24 0Zm2 0a.62.62 0 1 1-1.24 0 .62.62 0 0 1 1.24 0Z",bridge:"m0 6.84201v4.15799h2v-1c.036-1.08899.911-1.96399 2-1.99999 1.089.036 1.964.911 2 1.99999v1h3v-1c.036-1.08899.911-1.96399 2-1.99999 1.089.036 1.964.911 2 1.99999v1h2v-4.15799c-4.4-5.76-11.929-4.442-15 0zm9.5-3.108c.514.121 1.016.289 1.5.5v2.766h-1.5zm-.5-.1v3.366h-1.5v-3.494c.503 0 1.005.043 1.5.128zm-5.5.843c.48-.248.982-.451 1.5-.606v3.129h-1.5zm2 2.523v-3.27c.493-.115.995-.187 1.5-.215v3.485zm-2.5-2.256v2.256h-2.5c.676-.906 1.532-1.672 2.5-2.256zm8.5 2.256v-2.5l-.053-.053c1.202.603 2.247 1.477 3.053 2.553z",building:"M3,2v11h5v-3h3v3h1V2H3z M7,12H4v-2h3V12z M7,9H4V7h3V9z M7,6H4V4h3V6z M11,9H8V7h3V9z M11,6H8V4h3V6z","building-alt1":"M11,13.5v-9C11,4.2,10.8,4,10.5,4H9V1L5,2.1v11.4H2V14h11v-0.5H11z M7,13.5V3h1v10.5H7z",bus:"M2 3C2 1.9 2.9 1 4 1H11C12.1 1 13 1.9 13 3V11C13 12 12 12 12 12V13C12 13.55 11.55 14 11 14C10.45 14 10 13.55 10 13V12H5V13C5 13.55 4.55 14 4 14C3.45 14 3 13.55 3 13V12C2 12 2 11 2 11V3ZM3.5 4C3.22 4 3 4.22 3 4.5V7.5C3 7.78 3.22 8 3.5 8H11.5C11.78 8 12 7.78 12 7.5V4.5C12 4.22 11.78 4 11.5 4H3.5ZM4 9C3.45 9 3 9.45 3 10C3 10.55 3.45 11 4 11C4.55 11 5 10.55 5 10C5 9.45 4.55 9 4 9ZM11 9C10.45 9 10 9.45 10 10C10 10.55 10.45 11 11 11C11.55 11 12 10.55 12 10C12 9.45 11.55 9 11 9ZM4 2.5C4 2.78 4.22 3 4.5 3H10.5C10.78 3 11 2.78 11 2.5C11 2.22 10.78 2 10.5 2H4.5C4.22 2 4 2.22 4 2.5Z",cafe:"M12,5h-2V3H2v4c0.0133,2.2091,1.8149,3.9891,4.024,3.9758C7.4345,10.9673,8.7362,10.2166,9.45,9H12c1.1046,0,2-0.8954,2-2 S13.1046,5,12,5z M12,8H9.86C9.9487,7.6739,9.9958,7.3379,10,7V6h2c0.5523,0,1,0.4477,1,1S12.5523,8,12,8z M10,12.5 c0,0.2761-0.2239,0.5-0.5,0.5h-7C2.2239,13,2,12.7761,2,12.5S2.2239,12,2.5,12h7C9.7761,12,10,12.2239,10,12.5z",campsite:"M14 10V11C14 11.5523 13.5523 12 13 12H2C1.44772 12 1 11.5523 1 11V10C1 9.44772 1.44772 9.00001 2 9.00001H2.25L7.03206 1.25762C7.24699 0.90965 7.75302 0.909651 7.96794 1.25762L12.75 9.00001H13C13.5523 9.00001 14 9.44772 14 10ZM10.5 9.00001L7.5 4.00001L4.5 9.00001H10.5Z",car:"M13.84,6.852,12.6,5.7,11.5,3.5a1.05,1.05,0,0,0-.9-.5H4.4a1.05,1.05,0,0,0-.9.5L2.4,5.7,1.16,6.852A.5.5,0,0,0,1,7.219V11.5a.5.5,0,0,0,.5.5h2c.2,0,.5-.2.5-.4V11h7v.5c0,.2.2.5.4.5h2.1a.5.5,0,0,0,.5-.5V7.219A.5.5,0,0,0,13.84,6.852ZM4.5,4h6l1,2h-8ZM5,8.6c0,.2-.3.4-.5.4H2.4C2.2,9,2,8.7,2,8.5V7.4c.1-.3.3-.5.6-.4l2,.4c.2,0,.4.3.4.5Zm8-.1c0,.2-.2.5-.4.5H10.5c-.2,0-.5-.2-.5-.4V7.9c0-.2.2-.5.4-.5l2-.4c.3-.1.5.1.6.4Z","car-rental":"M10.5 1C9.94772 1 9.5 1.44772 9.5 2H2V3L3 4 4 3 5 4 6 3 7 4H9.5C9.5 4.55228 9.94772 5 10.5 5H12.5C12.7761 5 13 4.77614 13 4.5V1.5C13 1.22386 12.7761 1 12.5 1H10.5ZM11 2.5C11 2.22386 11.2239 2 11.5 2 11.7761 2 12 2.22386 12 2.5V3.5C12 3.77614 11.7761 4 11.5 4 11.2239 4 11 3.77614 11 3.5V2.5ZM2.14645 9.35355C2.05268 9.44732 2 9.5745 2 9.70711V13.5C2 13.7761 2.22386 14 2.5 14H4C4.27614 14 4.5 13.7761 4.5 13.5V13H10.5V13.5C10.5 13.7761 10.7239 14 11 14H12.5C12.7761 14 13 13.7761 13 13.5V9.70711C13 9.5745 12.9473 9.44732 12.8536 9.35355L12 8.5 10.6457 6.24275C10.5553 6.09215 10.3925 6 10.2169 6H4.7831C4.60746 6 4.44471 6.09215 4.35435 6.24275L3 8.5 2.14645 9.35355ZM11.1338 9H3.86623L5.06619 7H9.93381L11.1338 9ZM5.5 10.8279V11.2C5.5 11.3657 5.36569 11.5 5.2 11.5H3.3C3.13431 11.5 3 11.3657 3 11.2V10.3659C3 10.1766 3.1732 10.0346 3.35884 10.0718L5.17845 10.4357C5.36542 10.4731 5.5 10.6372 5.5 10.8279ZM12 10.4879V11.2C12 11.3657 11.8657 11.5 11.7 11.5H9.8C9.63431 11.5 9.5 11.3657 9.5 11.2V10.7459C9.5 10.6029 9.60094 10.4798 9.74117 10.4518L11.5216 10.0957C11.7691 10.0462 12 10.2355 12 10.4879Z","car-repair":"M3 5C3.74028 5 4.38662 4.5978 4.73243 4H12C12.5523 4 13 3.55228 13 3 13 2.44772 12.5523 2 12 2H4.73243C4.38662 1.4022 3.74028 1 3 1 2.25972 1 1.61337 1.4022 1.26756 2H3V4H1.26756C1.61337 4.5978 2.25972 5 3 5ZM2.14645 9.35355C2.05268 9.44732 2 9.5745 2 9.70711V13.5C2 13.7761 2.22386 14 2.5 14H4C4.27614 14 4.5 13.7761 4.5 13.5V13H10.5V13.5C10.5 13.7761 10.7239 14 11 14H12.5C12.7761 14 13 13.7761 13 13.5V9.70711C13 9.5745 12.9473 9.44732 12.8536 9.35355L12 8.5 10.6456 6.24275C10.5553 6.09215 10.3925 6 10.2169 6H4.78309C4.60746 6 4.44471 6.09215 4.35435 6.24275L3 8.5 2.14645 9.35355ZM11.1338 9H3.86622L5.06619 7H9.93381L11.1338 9ZM5.5 10.8279V11.2C5.5 11.3657 5.36568 11.5 5.2 11.5H3.3C3.13431 11.5 3 11.3657 3 11.2V10.3659C3 10.1766 3.1732 10.0346 3.35883 10.0718L5.17844 10.4357C5.36541 10.4731 5.5 10.6372 5.5 10.8279ZM12 10.4879V11.2C12 11.3657 11.8657 11.5 11.7 11.5H9.8C9.63431 11.5 9.5 11.3657 9.5 11.2V10.7459C9.5 10.6029 9.60094 10.4798 9.74116 10.4518L11.5216 10.0957C11.7691 10.0462 12 10.2355 12 10.4879Z",casino:"M8.5,10c0.4561,0.6072,1.1821,1,2,1c1.3807,0,2.5-1.1193,2.5-2.5c0-0.5642-0.1938-1.0789-0.509-1.4973L12.5,7l-5-6l-5,6 l0.009,0.0027C2.1938,7.4211,2,7.9358,2,8.5C2,9.8807,3.1193,11,4.5,11c0.8179,0,1.5439-0.3928,2-1 C6.5997,9.8672,6.7902,9.6135,7,9.3337V11.5C7,13,4.5,13,4.5,13C4.2239,13,4,13.2238,4,13.5C4,13.7761,4.2239,14,4.5,14H7h1h2.5 c0.2761,0,0.5-0.2239,0.5-0.5c0-0.2762-0.2239-0.5-0.5-0.5c0,0-2.5,0-2.5-1.5V9.3337C8.2098,9.6135,8.4003,9.8672,8.5,10z",castle:"M11,4H4C3.4477,4,3,3.5523,3,3V0.5C3,0.2239,3.2239,0,3.5,0S4,0.2239,4,0.5V2h1V1c0-0.5523,0.4477-1,1-1s1,0.4477,1,1v1h1V1 c0-0.5523,0.4477-1,1-1s1,0.4477,1,1v1h1V0.5C11,0.2239,11.2239,0,11.5,0S12,0.2239,12,0.5V3C12,3.5523,11.5523,4,11,4z M14,14.5 c0,0.2761-0.2239,0.5-0.5,0.5h-12C1.2239,15,1,14.7761,1,14.5S1.2239,14,1.5,14H2c0.5523,0,1-0.4477,1-1c0,0,1-6,1-7 c0-0.5523,0.4477-1,1-1h5c0.5523,0,1,0.4477,1,1c0,1,1,7,1,7c0,0.5523,0.4477,1,1,1h0.5c0.2723-0.0001,0.4946,0.2178,0.5,0.49V14.5z M9,10.5C9,9.6716,8.3284,9,7.5,9S6,9.6716,6,10.5V14h3V10.5z","castle-JP":"M12.5,12.75a1,1,0,0,1-1-.9995V7.25H10a1,1,0,0,1-1-1v-2H6v2a1,1,0,0,1-1,1H3.5v4.5a1,1,0,0,1-2,0V6.25a1,1,0,0,1,1-1H4v-2a1,1,0,0,1,1-1h5a1,1,0,0,1,1,1v2h1.5a1,1,0,0,1,1,1v5.5a1,1,0,0,1-.9995,1Z",caution:"M1.09302 11.8924L6.84044 1.3905C7.12539 0.869834 7.87461 0.869834 8.15956 1.3905L13.907 11.8924C14.1805 12.3922 13.818 13.0019 13.2474 13.0019H1.75258C1.18195 13.0019 0.819505 12.3922 1.09302 11.8924ZM8.29999 8L8.70296 5.5822C8.75375 5.27743 8.51873 5 8.20976 5H6.79022C6.48125 5 6.24623 5.27743 6.29703 5.5822L6.69999 8H8.29999ZM8.59999 9.9C8.59999 9.29249 8.10751 8.8 7.49999 8.8C6.89248 8.8 6.39999 9.29249 6.39999 9.9C6.39999 10.5075 6.89248 11 7.49999 11C8.10751 11 8.59999 10.5075 8.59999 9.9Z",cemetery:"M11.46,12h-0.68L12,3.55c0.0175-0.2867-0.2008-0.5332-0.4874-0.5507C11.4884,2.9979,11.4641,2.9981,11.44,3h-1.18 c0-0.92-1.23-2-2.75-2S4.77,2.08,4.77,3H3.54C3.253,2.9885,3.0111,3.2117,2.9995,3.4987C2.9988,3.5158,2.999,3.5329,3,3.55L4.2,12 H3.55C3.2609,11.9886,3.0162,12.2112,3,12.5V14h9v-1.51C11.9839,12.2067,11.7435,11.9886,11.46,12z M4.5,5h6v1h-6V5z","cemetery-JP":"M11.5,11h-3V2.5a.9448.9448,0,0,0-1-1,.9448.9448,0,0,0-1,1V11h-3a1,1,0,0,0,0,2h8a.9448.9448,0,0,0,1-1A1.0022,1.0022,0,0,0,11.5,11Z","charging-station":"m14 4v-1.51c-.0054-.2722-.2277-.4901-.5-.49-.2816.0047-.5062.2367-.5015.5184.0002.0105.0007.0211.0015.0316v2.45c0 .5523.4477 1 1 1v5.5c0 .2761-.2239.5-.5.5s-.5-.2239-.5-.5v-2c0-.8284-.6716-1.5-1.5-1.5h-1.5v-6c0-.5523-.4477-1-1-1h-6c-.5523 0-1 .4477-1 1v11c0 .5523.4477 1 1 1h6c.5523 0 1-.4477 1-1v-4h1.5c.2761 0 .5.2239.5.5v2c0 .8284.6716 1.5 1.5 1.5s1.5-.6716 1.5-1.5v-6.5c0-.5523-.4477-1-1-1zm-5.7996 3.3995-2.6006 3.4674-.0164-.0072c-.0465.0787-.1167.1403-.2146.1403-.1476 0-.2672-.1196-.2672-.2672 0-.028.0217-.0463.0297-.0717l-.0177-.0078.7766-2.3245c.054-.1617-.0664-.3288-.2369-.3288h-1.6539c-.2058 0-.3232-.2349-.1998-.3995l2.6006-3.4674.0164.0072c.0465-.0787.1167-.1403.2146-.1403.1476 0 .2672.1196.2672.2672 0 .028-.0217.0463-.0297.0717l.0176.0078-.7764 2.3244c-.0541.1618.0663.3289.2368.3289h1.6539c.2058 0 .3232.2349.1998.3995z",cinema:"M14,7.5v2c0,0.2761-0.2239,0.5-0.5,0.5S13,9.7761,13,9.5c0,0,0.06-0.5-1-0.5h-1v2.5c0,0.2761-0.2239,0.5-0.5,0.5h-8 C2.2239,12,2,11.7761,2,11.5v-4C2,7.2239,2.2239,7,2.5,7h8C10.7761,7,11,7.2239,11,7.5V8h1c1.06,0,1-0.5,1-0.5 C13,7.2239,13.2239,7,13.5,7S14,7.2239,14,7.5z M4,3C2.8954,3,2,3.8954,2,5s0.8954,2,2,2s2-0.8954,2-2S5.1046,3,4,3z M4,6 C3.4477,6,3,5.5523,3,5s0.4477-1,1-1s1,0.4477,1,1S4.5523,6,4,6z M8.5,2C7.1193,2,6,3.1193,6,4.5S7.1193,7,8.5,7S11,5.8807,11,4.5 S9.8807,2,8.5,2z M8.5,6C7.6716,6,7,5.3284,7,4.5S7.6716,3,8.5,3S10,3.6716,10,4.5S9.3284,6,8.5,6z",circle:"M14,7.5c0,3.5899-2.9101,6.5-6.5,6.5S1,11.0899,1,7.5S3.9101,1,7.5,1S14,3.9101,14,7.5z","circle-stroked":"M7.5 12.3C4.84898 12.3 2.7 10.151 2.7 7.5C2.7 4.84898 4.84898 2.7 7.5 2.7C10.151 2.7 12.3 4.84898 12.3 7.5C12.3 10.151 10.151 12.3 7.5 12.3ZM7.5 14C11.0899 14 14 11.0899 14 7.5C14 3.9101 11.0899 1 7.5 1C3.9101 1 1 3.9101 1 7.5C1 11.0899 3.9101 14 7.5 14Z",city:"M12.6368 3.9994H10.9981V2.3608C10.998 2.16148 10.8364 1.99994 10.6371 2H10.3591C10.1598 2 9.9982 2.16158 9.9982 2.3609V3.9994H8.36C8.16068 3.9994 7.9991 4.16098 7.9991 4.3603V9.9984H4.3621C4.16168 9.9984 3.9992 10.1609 3.9992 10.3613V12.6358C3.99975 12.8358 4.16207 12.9977 4.3621 12.9977H12.6368C12.8361 12.9977 12.9977 12.8361 12.9977 12.6368V4.36C12.9977 4.16068 12.8361 3.9994 12.6368 3.9994ZM5.9989 11.9981H4.9989V10.9981H5.9989V11.9981ZM7.9989 11.9981H6.9989V10.9981H7.9989V11.9981ZM9.9989 11.9981H8.9989V10.9981H9.9989V11.9981ZM9.9989 9.9981H8.9989V8.9981H9.9989V9.9981ZM9.9989 7.9981H8.9989V6.9981H9.9989V7.9981ZM9.9989 5.9981H8.9989V4.9981H9.9989V5.9981ZM11.9989 11.9971H10.9989V10.9971H11.9989V11.9971ZM11.9989 9.9971H10.9989V8.9971H11.9989V9.9971ZM11.9989 7.9971H10.9989V6.9971H11.9989V7.9971ZM11.9989 5.9971H10.9989V4.9971H11.9989V5.9971ZM6.9987 2.3608C6.99864 2.16152 6.83708 2 6.6378 2H4.36C4.16068 2 3.9991 2.16158 3.9991 2.3609V4H2.36C2.16138 4.00049 2.00049 4.16138 2 4.36V12.6474C2 12.8407 2.1567 12.9974 2.35 12.9974H2.9994V8.9986H6.9987V2.3608ZM4 7.9981H3V6.9981H4V7.9981ZM4 5.9981H3V4.9981H4V5.9981ZM6 7.9981H5V6.9981H6V7.9981ZM6 5.9981H5V4.9981H6V5.9981ZM6 3.9981H5V3H6V4V3.9981Z","clothing-store":"M4 2L1 4.5L1 7H4V13H11V7H14V4.5L11 2H9.5L7.5 6L5.5 2L4 2Z",college:"M7.5,1L0,4.5l2,0.9v1.7C1.4,7.3,1,7.9,1,8.5s0.4,1.2,1,1.4V10l-0.9,2.1 C0.8,13,1,14,2.5,14s1.7-1,1.4-1.9L3,10c0.6-0.3,1-0.8,1-1.5S3.6,7.3,3,7.1V5.9L7.5,8L15,4.5L7.5,1z M11.9,7.5l-4.5,2L5,8.4v0.1 c0,0.7-0.3,1.3-0.8,1.8l0.6,1.4v0.1C4.9,12.2,5,12.6,4.9,13c0.7,0.3,1.5,0.5,2.5,0.5c3.3,0,4.5-2,4.5-3L11.9,7.5L11.9,7.5z","college-JP":"M12.5,2.9992h-4v-1a1,1,0,0,0-2,0v1h-4a1,1,0,0,0,0,2h.67A10.8169,10.8169,0,0,0,5.15,8.8105c.3331.4313.6594.8248.9785,1.1936a14.3825,14.3825,0,0,1-2.6074,2.117,1,1,0,1,0,.955,1.7581h0A15.65,15.65,0,0,0,7.5,11.4613a15.65,15.65,0,0,0,3.0239,2.4179,1,1,0,1,0,.9551-1.7578,14.3789,14.3789,0,0,1-2.6073-2.1171c.3191-.3688.6453-.7622.9784-1.1935a10.818,10.818,0,0,0,1.98-3.8116h.67a1,1,0,0,0,0-2ZM8.2671,7.5879c-.2614.3385-.5154.6413-.767.937-.2517-.2957-.5057-.5985-.7672-.937A9.5885,9.5885,0,0,1,5.2676,4.9992H9.7319A9.5789,9.5789,0,0,1,8.2671,7.5879Z",commercial:"m14 6h-13c.0881-1.3829.427-2.7383 1-4h11c.5731 1.2617.9119 2.6171 1 4zm-11 1h9v6h-1v-5h-3v5h-5zm1 3h3v-2h-3z","communications-tower":"M11.8545,6.4336l-.4131-.2813a4.7623,4.7623,0,0,0,.2813-4.8779l-.0835-.1533L12.0747.875l.0908.167a5.2619,5.2619,0,0,1-.311,5.3916Zm1.1521,7.1316V14h-11v-.4348H4.4952L6.0439,6.4a.5.5,0,0,1,.4888-.3945h.7255V4.6014A1.14,1.14,0,0,1,6.3756,3.5a1.1568,1.1568,0,1,1,2.3136,0,1.14,1.14,0,0,1-.931,1.1112V6.0059h.7223A.5.5,0,0,1,8.9692,6.4l1.5478,7.1648ZM8.4543,8.751H6.5588L6.236,10.2441H8.777ZM6.1279,10.7441l-.3233,1.4952H9.2082l-.3231-1.4952ZM6.936,7.0059,6.6669,8.251H8.3463L8.0771,7.0059ZM5.5179,13.5652H9.4948l-.1786-.8259h-3.62ZM5.21,5.0137a2.7523,2.7523,0,0,1,.0161-3.0518L4.812,1.6826a3.25,3.25,0,0,0-.019,3.6065ZM10.7568,3.5a3.2433,3.2433,0,0,0-.5341-1.7861l-.418.2754a2.7517,2.7517,0,0,1-.0176,3.0488l.4141.2793A3.2341,3.2341,0,0,0,10.7568,3.5ZM3.5342,6.1182A4.7637,4.7637,0,0,1,3.3813,1.13L2.9478.88a5.2643,5.2643,0,0,0,.1694,5.5137Z",confectionery:"M13,4a1,1,0,0,0-1-1,1,1,0,0,0-2,0V5.0673A3.4808,3.4808,0,0,0,4.3583,9H2a1,1,0,0,0,0,2,1,1,0,0,0,1,1,1,1,0,0,0,2,0V9.9326A3.4807,3.4807,0,0,0,10.6417,6H13a1,1,0,0,0,0-2ZM7.5,9.9925A2.484,2.484,0,0,1,6.3184,5.319a1.0809,1.0809,0,0,1,.5459.307A2.1243,2.1243,0,0,1,7.25,7.0117l.001.9561A2.5821,2.5821,0,0,0,7.76,9.7031a1.5462,1.5462,0,0,0,.2591.2333A2.4861,2.4861,0,0,1,7.5,9.9925ZM8.6815,9.681a1.0813,1.0813,0,0,1-.5458-.307A2.1243,2.1243,0,0,1,7.75,7.9883l-.001-.9561A2.5821,2.5821,0,0,0,7.24,5.2969a1.5557,1.5557,0,0,0-.2592-.2334A2.4843,2.4843,0,0,1,8.6815,9.681Z",construction:"M13.5 11h-1.8L8.2.5C8-.2 7-.2 6.8.5L3.3 11H1.5c-.3 0-.5.2-.5.5v1c0 .3.2.5.5.5h12c.3 0 .5-.2.5-.5v-1c0-.3-.2-.5-.5-.5ZM7 3h1l.7 2H6.4L7 3ZM5.7 7h3.6l.7 2H5l.7-2Z",convenience:"M2.9982,3.0687s.1875-1.062,1-1.062H5.0043V1.7276a.5.5,0,0,1,.5-.5H9.4882a.5.5,0,0,1,.5.5v.2791h1.01a.8324.8324,0,0,1,.6373.2937,1.7589,1.7589,0,0,1,.3627.7683s.3108,1.5719.5921,2.9181h-.938L11,3,3.982,2.9956,3.3336,5.9868H2.382Zm11,4.9144a1,1,0,0,1-.9992,1l-1.0008,3.973s-.1875,1.0417-1,1.0417h-7c-.8125,0-1-1.0417-1-1.0417L1.9822,8.98a.9985.9985,0,0,1,.016-1.9968h11A1,1,0,0,1,13.9982,7.9831ZM5.0327,12.13,5.03,11.0051,4.6392,9.4686a.5373.5373,0,1,0-1.0649.1445L3.78,11.0075l.1874,1.2672A.5373.5373,0,1,0,5.0327,12.13Zm2-2.5967A.5332.5332,0,0,0,6.4994,9l-.0039.0008L6.4886,9a.4992.4992,0,0,0-.3575.1509.529.529,0,0,0-.1648.3828v2.68a.5332.5332,0,1,0,1.0663,0Zm1.998,0A.5314.5314,0,0,0,8.694,9.04a.4992.4992,0,0,0-.393,0,.5312.5312,0,0,0-.3366.4934v2.68a.5331.5331,0,1,0,1.0662,0Zm2.3857.08a.5373.5373,0,1,0-1.0649-.1445L9.96,10.9938,9.9579,12.13a.5373.5373,0,1,0,1.0649.1446Z",cricket:"M8,1.5C8,2.3284,7.3284,3,6.5,3S5,2.3284,5,1.5S5.6716,0,6.5,0S8,0.6716,8,1.5z M10.88,7.18L10.88,7.18l-2-2l0,0l0,0 C8.7815,5.0616,8.6339,4.9952,8.48,5H3.75C3.3736,4.9915,3.0508,5.2669,3,5.64l0,0l-1,7.7l0,0c-0.0068,0.0464-0.0068,0.0936,0,0.14 c0,0.2761,0.2239,0.5,0.5,0.5c0.2251,0.0153,0.4315-0.1251,0.5-0.34l0,0l1.2-3.89l0,0l0.26-0.83l0.4,0.44l0,0L6,10.6v2.9 C6,13.7761,6.2239,14,6.5,14S7,13.7761,7,13.5v-3l0,0l0,0c-0.0081-0.0788-0.0356-0.1544-0.08-0.22l0,0L5.48,8.5l1-2.5h1.71l2,1.84 l0,0c0.0928,0.1077,0.2278,0.1697,0.37,0.17C10.8163,7.9791,11.007,7.7581,11,7.5C10.9997,7.3824,10.9571,7.2688,10.88,7.18z M14,11.27c-0.4142,0-0.75,0.3358-0.75,0.75s0.3358,0.75,0.75,0.75s0.75-0.3358,0.75-0.75S14.4142,11.27,14,11.27z M10.76,9.74V9 c0-0.1381-0.1119-0.25-0.25-0.25S10.26,8.8619,10.26,9v0.74c-0.1522,0.0855-0.2474,0.2455-0.25,0.42v3.34 c0,0.2761,0.2239,0.5,0.5,0.5s0.5-0.2239,0.5-0.5v-3.34C11.0074,9.9855,10.9122,9.8255,10.76,9.74z",cross:"M3.64 2.27L7.5 6.13L11.34 2.29C11.5114 2.1076 11.7497 2.0029 12 2C12.5523 2 13 2.4477 13 3C13.0047 3.2478 12.907 3.4866 12.73 3.66L8.84 7.5L12.73 11.39C12.8948 11.5512 12.9915 11.7696 13 12C13 12.5523 12.5523 13 12 13C11.7423 13.0107 11.492 12.9127 11.31 12.73L7.5 8.87L3.65 12.72C3.4793 12.8963 3.2453 12.9971 3 13C2.4477 13 2 12.5523 2 12C1.9953 11.7522 2.093 11.5134 2.27 11.34L6.16 7.5L2.27 3.61C2.1052 3.4488 2.0085 3.2304 2 3C2 2.4477 2.4477 2 3 2C3.2404 2.0029 3.4701 2.0998 3.64 2.27Z",dam:"M13.94,9.5c0,0.2761-0.2239,0.5-0.5,0.5l0,0c-0.259,0.0219-0.4994,0.1439-0.67,0.34c-0.2714,0.2887-0.6175,0.4964-1,0.6 c-0.6115,0.1816-1.2734,0.0424-1.76-0.37l-0.39-0.35c-0.2976-0.3038-0.7851-0.3087-1.0889-0.0111 C8.5274,10.2126,8.5237,10.2163,8.52,10.22c-0.14,0.12-0.27,0.25-0.42,0.37c-0.7278,0.5784-1.7663,0.5489-2.46-0.07L5.3,10.19 l-0.1-0.06l0.3,1.22l0.49,2c0.0829,0.2634-0.0634,0.5441-0.3267,0.6271C5.6105,13.9937,5.5553,14.0014,5.5,14h-4 C1.2239,14,1,13.7761,1,13.5v-12C1,1.2239,1.2239,1,1.5,1h1.1c0.2346-0.0011,0.4384,0.1611,0.49,0.39L4,5.06V5.2 c0.6569-0.314,1.4361-0.2205,2,0.24c0.16,0.13,0.31,0.28,0.47,0.41c0.2847,0.2546,0.7153,0.2546,1,0c0.16-0.13,0.31-0.28,0.47-0.41 c0.7076-0.5968,1.7424-0.5968,2.45,0c0.15,0.13,0.29,0.27,0.44,0.39c0.2847,0.2546,0.7153,0.2546,1,0l0.47-0.41 c0.3163-0.2672,0.7159-0.4157,1.13-0.42l0,0c0.2761,0,0.5,0.2239,0.5,0.5S13.7061,6,13.43,6l0,0 c-0.259,0.0219-0.4994,0.1439-0.67,0.34c-0.2714,0.2887-0.6175,0.4964-1,0.6C11.1485,7.1216,10.4866,6.9824,10,6.57L9.67,6.23 C9.3724,5.9262,8.8849,5.9213,8.5811,6.2189C8.5774,6.2226,8.5737,6.2263,8.57,6.23C8.43,6.35,8.3,6.48,8.15,6.6 C7.4222,7.1784,6.3837,7.1489,5.69,6.53L5.3,6.19c-0.2847-0.2546-0.7153-0.2546-1,0L4.24,6.24L4.93,9 C5.3226,9.029,5.6965,9.1793,6,9.43c0.16,0.13,0.31,0.28,0.47,0.41c0.2847,0.2546,0.7153,0.2546,1,0c0.16-0.13,0.31-0.28,0.47-0.41 c0.7076-0.5968,1.7424-0.5968,2.45,0c0.15,0.13,0.29,0.27,0.44,0.39c0.2847,0.2546,0.7153,0.2546,1,0l0.47-0.41 c0.3177-0.2636,0.7172-0.4085,1.13-0.41l0,0c0.2761-0.0055,0.5044,0.2138,0.5099,0.4899C13.94,9.4933,13.94,9.4966,13.94,9.5z",danger:"M13.94,14.68c-0.0749,0.194-0.262,0.3215-0.47,0.32c-0.0595,0.0107-0.1205,0.0107-0.18,0L7.5,12.56L1.7,15 c-0.2572,0.1005-0.5472-0.0266-0.6476-0.2838C1.0516,14.7141,1.0508,14.7121,1.05,14.71c-0.1291-0.2441-0.0358-0.5467,0.2084-0.6757 C1.2845,14.0205,1.3118,14.009,1.34,14l4.85-2l-4.85-2C1.0758,9.9197,0.9267,9.6404,1.007,9.3762s0.3596-0.4133,0.6238-0.333 C1.6545,9.0504,1.6776,9.0594,1.7,9.07l5.8,2.41l5.8-2.41c0.2494-0.1185,0.5477-0.0124,0.6662,0.237 c0.1185,0.2494,0.0124,0.5477-0.237,0.6662C13.7068,9.9839,13.6837,9.9928,13.66,10L8.8,12l4.85,2 c0.2607,0.091,0.3983,0.3761,0.3074,0.6368C13.9523,14.6515,13.9465,14.6659,13.94,14.68z M12,4.23v0.45 c-0.0021,0.2129-0.0722,0.4196-0.2,0.59C11.2414,5.8883,10.6399,6.4664,10,7v1.16c0.0015,0.208-0.126,0.3951-0.32,0.47L7.52,9.5 H7.45L5.28,8.63C5.1016,8.5428,4.9917,8.3584,5,8.16V7C4.3528,6.4675,3.7446,5.8893,3.18,5.27C3.0593,5.0972,2.9963,4.8907,3,4.68 V4.23C3.1669,2.0117,4.8974,0.2307,7.11,0h0.36l0,0h0.39C10.0862,0.2131,11.8348,1.9997,12,4.23z M6,4c0-0.5523-0.4477-1-1-1 S4,3.4477,4,4s0.4477,1,1,1S6,4.5523,6,4z M7,7c0-0.2761-0.2239-0.5-0.5-0.5S6,6.7239,6,7v0.5C6,7.7761,6.2239,8,6.5,8 S7,7.7761,7,7.5V7z M9,7c0-0.2761-0.2239-0.5-0.5-0.5S8,6.7239,8,7v0.5C8,7.7761,8.2239,8,8.5,8S9,7.7761,9,7.5V7z M11,4 c0-0.5523-0.4477-1-1-1S9,3.4477,9,4s0.4477,1,1,1S11,4.5523,11,4z",defibrillator:"m1.54995 7.33811c-2.386799-4.5965 3.63-7.660899 5.952-3.0644 2.3215-4.596499 8.33875-1.5322 5.95235 3.0644-.0869.1671-.2028.3456-.3114.5212h-1.8079l-1.81455-2.7216c-.06321-.09473-.1511-.1704-.25417-.21884-.10308-.04843-.21743-.06779-.3307-.05599-.11327.01181-.22117.05433-.31205.12298-.09087.06865-.16126.16082-.20358.26655l-1.6484 4.12-1.33-1.33c-.11716-.11707-.27597-.18288-.4416-.183h-3.1389c-.1086-.1757-.2245-.3542-.3111-.5213zm9.45005 1.7713c-.103-.00003-.2044-.02545-.2951-.07399-.0908-.04854-.1682-.11871-.2254-.20431l-1.34085-2.0111-1.5587 3.89679c-.03839.096-.10002.181-.17936.2474-.07935.0663-.17393.1119-.27524.1326-.04125.0086-.08327.0128-.1254.0126-.16568.0001-.32462-.0656-.4419-.1826l-1.8169-1.81739h-2.0054c1.36645 1.66819 2.85739 3.23039 4.46 4.67319.08531.077.19616.1197.3111.1197s.22579-.0427.3111-.1197c1.59778-1.4447 3.08545-3.0068 4.45055-4.67319z",dentist:"M4.36,14c-1,0-0.56-2.67-0.86-5c-0.1-0.76-1-1.49-1.12-2.06C2,5,1.39,1.44,3.66,1S6,3,7.54,3s1.57-2.36,3.85-2 s1.59,3.9,1.29,5.9c-0.1,0.45-1.1,1.48-1.18,2.06c-0.33,2.4,0.32,5-0.8,5c-0.93,0-1.32-2.72-2-4.5C8.43,8.63,8.06,8,7.54,8 C6,8,5.75,14,4.36,14z",diamond:"M7.03715 1.20147L2.12542 6.7C2.04962 6.78393 2.00568 6.89005 2.00051 7C1.99535 7.10994 2.02925 7.21013 2.09689 7.3L7.0065 13.7601C7.06233 13.8343 7.13629 13.8947 7.22216 13.9365C7.30803 13.9782 7.40331 14 7.5 14C7.59669 14 7.69197 13.9782 7.77784 13.9365C7.86371 13.8947 7.93766 13.8343 7.9935 13.7601L12.9031 7.3C12.9707 7.21013 13.0047 7.10994 12.9995 7C12.9943 6.89005 12.9504 6.78393 12.8746 6.7L7.96285 1.20147C7.90591 1.13833 7.83501 1.08761 7.75508 1.05282C7.67514 1.01802 7.5881 1 7.5 1C7.4119 1 7.32486 1.01802 7.24492 1.05282C7.16499 1.08761 7.09409 1.13833 7.03715 1.20147Z",doctor:"M5.5,7C4.1193,7,3,5.8807,3,4.5l0,0v-2C3,2.2239,3.2239,2,3.5,2H4c0.2761,0,0.5-0.2239,0.5-0.5S4.2761,1,4,1H3.5 C2.6716,1,2,1.6716,2,2.5v2c0.0013,1.1466,0.5658,2.2195,1.51,2.87l0,0C4.4131,8.1662,4.9514,9.297,5,10.5C5,12.433,6.567,14,8.5,14 s3.5-1.567,3.5-3.5V9.93c1.0695-0.2761,1.7126-1.367,1.4365-2.4365C13.1603,6.424,12.0695,5.7809,11,6.057 C9.9305,6.3332,9.2874,7.424,9.5635,8.4935C9.7454,9.198,10.2955,9.7481,11,9.93v0.57c0,1.3807-1.1193,2.5-2.5,2.5S6,11.8807,6,10.5 c0.0511-1.2045,0.5932-2.3356,1.5-3.13l0,0C8.4404,6.7172,9.001,5.6448,9,4.5v-2C9,1.6716,8.3284,1,7.5,1H7 C6.7239,1,6.5,1.2239,6.5,1.5S6.7239,2,7,2h0.5C7.7761,2,8,2.2239,8,2.5v2l0,0C8,5.8807,6.8807,7,5.5,7 M11.5,9 c-0.5523,0-1-0.4477-1-1s0.4477-1,1-1s1,0.4477,1,1S12.0523,9,11.5,9z","dog-park":"M 10.300781 1.2207031 C 9.9144812 1.2207031 9.6 1.2 9.5 2 L 9.0996094 4.5214844 L 11.5 6.5 L 13.5 6.5 C 14.9 6.5 15 5.5410156 15 5.5410156 L 13.099609 3.3222656 C 12.399609 2.6222656 11.7 2.5 11 2.5 L 11 2 C 11 2 11.067481 1.2206031 10.300781 1.2207031 z M 4.75 1.5 C 4.75 1.5 3.7992187 1.5206031 3.1992188 1.7207031 C 2.5992187 1.9207031 2 2.6210938 2 3.6210938 L 2 7.5214844 C 2 9.2214844 1.3 9.5 1 9.5 C 1 9.5 0 9.5214844 0 10.521484 L 0 12.720703 C 0 12.720703 0.00078125 13.521484 0.80078125 13.521484 L 1 13.521484 L 1.5 13.521484 L 2 13.521484 L 2 13.021484 L 2 12.822266 C 2 12.422266 1.8 12.221094 1.5 12.121094 L 1.5 11.021484 C 2.5 11.021484 2.6 10.820703 3 10.720703 L 3.5507812 12.917969 C 3.6507813 13.217969 3.7507813 13.417578 4.0507812 13.517578 L 5.0507812 13.517578 L 6 13.5 L 6 12.699219 C 6 12.022819 5 12 5 12 L 5 9.5 L 8.5 9.5 L 9.1992188 12.121094 C 9.5992188 13.521094 10.5 13.5 10.5 13.5 L 11 13.5 L 12 13.5 L 12 12.699219 C 12 11.987419 11 12 11 12 L 11.099609 7.921875 L 8 5.5 L 3.5 5.5 L 3.5 3.5 C 3.5 3.1 3.7765 3.0053 4 3 C 4.4941 2.9882 4.75 3 4.75 3 C 5.1642 3 5.5 2.6642 5.5 2.25 C 5.5 1.8358 5.1642 1.5 4.75 1.5 z M 11.75 4 C 11.8881 4 12 4.1119 12 4.25 C 12 4.3881 11.8881 4.5 11.75 4.5 C 11.6119 4.5 11.5 4.3881 11.5 4.25 C 11.5 4.1119 11.6119 4 11.75 4 z","drinking-water":"M6,1A2,2,0,0,0,4,3V6.5a.5.5,0,0,0,.5.5h2A.5.5,0,0,0,7,6.5v-2A.5.5,0,0,1,7.5,4H14V1ZM7,15H4a.5.5,0,0,1-.48-.38L2,8.62a.5.5,0,0,1,.365-.606A.558.558,0,0,1,2.5,8h6a.5.5,0,0,1,.514.485A.47.47,0,0,1,9,8.62l-1.5,6A.5.5,0,0,1,7,15ZM3.65,11H7.36l.5-2H3.14Z",elevator:"M11,1H4A1,1,0,0,0,3,2V13a1,1,0,0,0,1,1h7a1,1,0,0,0,1-1V2A1,1,0,0,0,11,1ZM7.5,12.5l-2-4h4Zm-2-6,2-4,2,4Z",embassy:"M6.65,2C5.43,2,4.48,3.38,4.11,3.82C4.0365,3.9102,3.9975,4.0237,4,4.14v4.4C3.9884,8.7827,4.1758,8.9889,4.4185,9.0005 C4.528,9.0057,4.6355,8.9699,4.72,8.9c0.4665-0.6264,1.1589-1.0461,1.93-1.17C8.06,7.73,8.6,9,10.07,9 c0.9948-0.0976,1.9415-0.4756,2.73-1.09c0.1272-0.0934,0.2016-0.2422,0.2-0.4V2.45c0.0275-0.2414-0.1459-0.4595-0.3874-0.487 C12.5332,1.954,12.4527,1.9668,12.38,2c-0.6813,0.5212-1.4706,0.8834-2.31,1.06C8.6,3.08,8.12,2,6.65,2z M2.5,3 c-0.5523,0-1-0.4477-1-1s0.4477-1,1-1s1,0.4477,1,1S3.0523,3,2.5,3z M3,4v9.48c0,0.2761-0.2239,0.5-0.5,0.5S2,13.7561,2,13.48V4 c0-0.2761,0.2239-0.5,0.5-0.5S3,3.7239,3,4z","emergency-phone":"M7.875,11.49a.51.51,0,0,0,.72,0l.72-.72,2.18,2.16-.37.37a2.24,2.24,0,0,1-1.44.7H8.24a2.24,2.24,0,0,1-1.45-.7L1.72,8.23A2.24,2.24,0,0,1,1,6.78V5.33a2.24,2.24,0,0,1,.72-1.45l.36-.36L4.26,5.69l-.73.73a.51.51,0,0,0,0,.72Zm4.72.38a1,1,0,0,0,.036-1.414h0l-.036-.036-.72-.72a1,1,0,0,0-1.414-.036h0l-.036.036ZM5.315,4.62a1,1,0,0,0,.036-1.414h0L4.595,2.45a1,1,0,0,0-1.414-.036h0L3.14,2.45ZM10,2V4H8V5h2V7h1V5h2V4H11V2Z",entrance:"m8 6.5v-1c0-.26522-.10536-.51957-.29289-.70711-.18754-.18753-.44189-.29289-.70711-.29289s-.51957.10536-.70711.29289c-.18753.18754-.29289.44189-.29289.70711v3zm-2-3.5c0-.19778.05865-.39112.16853-.55557s.26606-.29262.44879-.36831c.18272-.07569.38379-.09549.57777-.0569.19398.03858.37216.13382.51202.27367.13985.13986.23509.31804.27368.51202.03858.19398.01878.39505-.05691.57777-.07569.18273-.20386.33891-.36831.44879s-.35779.16853-.55557.16853c-.26522 0-.51957-.10536-.70711-.29289-.18753-.18754-.29289-.44189-.29289-.70711zm9 3c0 .26522-.1054.51957-.2929.70711-.1875.18753-.4419.29289-.7071.29289h-1.58c-.1316-.00076-.2621.02446-.3839.07423-.1218.04976-.2327.12309-.3261.21577l-5.42 5.42c-.18626.1847-.43766.2889-.7.29h-2.59c-.26522 0-.51957-.1054-.70711-.2929-.18753-.1875-.29289-.4419-.29289-.7071s.10536-.5196.29289-.7071c.18754-.1875.44189-.2929.70711-.2929h1.59c.26234-.0011.51374-.1053.7-.29l5.42-5.42c.0934-.09268.2043-.16601.3261-.21577.1218-.04977.2523-.07499.3839-.07423h2.58c.2652 0 .5196.10536.7071.29289.1875.18754.2929.44189.2929.70711z","entrance-alt1":"M6.554,9.639a.5.5,0,0,0,.707.707L9.928,7.669a.25.25,0,0,0,0-.354h0L7.261,4.639a.5.5,0,0,0-.707.707L8.2,7H1.5a.5.5,0,0,0,0,1H8.2ZM12,1H5.5a.5.5,0,0,0,0,1h6a.5.5,0,0,1,.5.5v10a.5.5,0,0,1-.5.5H5.25a.5.5,0,0,0,0,1H12a1,1,0,0,0,1-1V2A1,1,0,0,0,12,1Z",farm:"m8 6-3-2-3 2-1 2v4h2v-2h4v2h2v-4zm-2 2h-2v-2h2zm8 4h-3v-9.5c0-.39782.158-.77936.4393-1.06066s.6629-.43934 1.0607-.43934.7794.15804 1.0607.43934.4393.66284.4393 1.06066z","fast-food":"M14,8c0,0.5523-0.4477,1-1,1H2C1.4477,9,1,8.5523,1,8s0.4477-1,1-1h11C13.5523,7,14,7.4477,14,8z M3.5,10H2 c0,1.6569,1.3431,3,3,3h5c1.6569,0,3-1.3431,3-3H3.5z M3,6H2V4c0-1.1046,0.8954-2,2-2h7c1.1046,0,2,0.8954,2,2v2H3z M11,4.5 C11,4.7761,11.2239,5,11.5,5S12,4.7761,12,4.5S11.7761,4,11.5,4S11,4.2239,11,4.5z M9,3.5C9,3.7761,9.2239,4,9.5,4S10,3.7761,10,3.5 S9.7761,3,9.5,3S9,3.2239,9,3.5z M7,4.5C7,4.7761,7.2239,5,7.5,5S8,4.7761,8,4.5S7.7761,4,7.5,4S7,4.2239,7,4.5z M5,3.5 C5,3.7761,5.2239,4,5.5,4S6,3.7761,6,3.5S5.7761,3,5.5,3S5,3.2239,5,3.5z M3,4.5C3,4.7761,3.2239,5,3.5,5S4,4.7761,4,4.5 S3.7761,4,3.5,4S3,4.2239,3,4.5z",fence:"m13.5 9h-.5v-3h.5c.1326 0 .2598-.05268.3536-.14644.0937-.09377.1464-.22095.1464-.35356s-.0527-.25978-.1464-.35355c-.0938-.09377-.221-.14645-.3536-.14645h-.5v-2l-.286-.573c-.0218-.03651-.0525-.06683-.0894-.08809-.0368-.02125-.0784-.03273-.1209-.03333s-.0845.00969-.1219.0299c-.0374.0202-.069.04964-.0918.08552l-.29.579v2h-1v-2l-.286-.573c-.0218-.03651-.0525-.06683-.0894-.08809-.0368-.02125-.0784-.03273-.1209-.03333s-.0845.00969-.1219.0299c-.0374.0202-.069.04964-.0918.08552l-.29.579v2h-1v-2l-.286-.573c-.02178-.03651-.05254-.06683-.08936-.08809-.03681-.02125-.07846-.03273-.12096-.03333-.04251-.0006-.08446.00969-.12187.0299-.0374.0202-.06901.04964-.09181.08552l-.29.579v2h-1v-2l-.286-.573c-.02178-.03651-.05254-.06683-.08936-.08809-.03681-.02125-.07846-.03273-.12096-.03333-.04251-.0006-.08446.00969-.12187.0299-.0374.0202-.06901.04964-.09181.08552l-.29.579v2h-1v-2l-.286-.573c-.02178-.03651-.05254-.06683-.08936-.08809-.03681-.02125-.07846-.03273-.12096-.03333-.04251-.0006-.08446.00969-.12187.0299-.0374.0202-.06901.04964-.09181.08552l-.29.579v2h-1v-2l-.286-.573c-.02178-.03651-.05254-.06683-.08936-.08809-.03681-.02125-.07846-.03273-.12096-.03333-.04251-.0006-.08446.00969-.12187.0299-.0374.0202-.06901.04964-.09181.08552l-.29.579v2h-.5c-.13261 0-.25979.05268-.35355.14645-.09377.09377-.14645.22094-.14645.35355s.05268.25979.14645.35356c.09376.09376.22094.14644.35355.14644h.5v3h-.5c-.13261 0-.25979.05268-.35355.14645-.09377.09377-.14645.22094-.14645.35355s.05268.25979.14645.35356c.09376.09376.22094.14644.35355.14644h.5v1.5c0 .1326.05268.2598.14645.3536.09376.0937.22094.1464.35355.1464s.25979-.0527.35355-.1464c.09377-.0938.14645-.221.14645-.3536v-1.5h1v1.5c0 .1326.05268.2598.14645.3536.09376.0937.22094.1464.35355.1464s.25979-.0527.35355-.1464c.09377-.0938.14645-.221.14645-.3536v-1.5h1v1.5c0 .1326.05268.2598.14645.3536.09376.0937.22094.1464.35355.1464s.25979-.0527.35355-.1464c.09377-.0938.14645-.221.14645-.3536v-1.5h1v1.5c0 .1326.05268.2598.14645.3536.09376.0937.22094.1464.35355.1464s.25979-.0527.35355-.1464c.09377-.0938.14645-.221.14645-.3536v-1.5h1v1.5c0 .1326.0527.2598.1464.3536.0938.0937.221.1464.3536.1464s.2598-.0527.3536-.1464c.0937-.0938.1464-.221.1464-.3536v-1.5h1v1.5c0 .1326.0527.2598.1464.3536.0938.0937.221.1464.3536.1464s.2598-.0527.3536-.1464c.0937-.0938.1464-.221.1464-.3536v-1.5h.5c.1326 0 .2598-.05268.3536-.14644.0937-.09377.1464-.22095.1464-.35356s-.0527-.25978-.1464-.35355c-.0938-.09377-.221-.14645-.3536-.14645zm-10.5 0v-3h1v3zm2 0v-3h1v3zm2 0v-3h1v3zm2 0v-3h1v3zm2 0v-3h1v3z",ferry:"M5.33,11c0.6745,0.009,1.3262,0.245,1.85,0.67l0.26,0.23h0.05l0.31-0.28c0.9817-0.8115,2.379-0.8846,3.44-0.18L13.5,7L12,6 V2.45c-0.0466-0.8-0.6989-1.4305-1.5-1.45H10c0.0343-0.518-0.3579-0.9657-0.8759-1C9.0828-0.0027,9.0413-0.0027,9,0H6 C5.482-0.0343,5.0343,0.3579,5,0.8759C4.9973,0.9172,4.9973,0.9587,5,1H4.5C3.6989,1.0195,3.0466,1.65,3,2.45V6L1.5,7l2.25,4.53 C4.2143,11.2041,4.7631,11.02,5.33,11z M4,2.45c0.0105-0.2594,0.2293-0.4611,0.4886-0.4506C4.4924,1.9996,4.4962,1.9998,4.5,2h6 c0.259-0.0171,0.4829,0.1789,0.5,0.4379c0.0014,0.0207,0.0014,0.0414,0,0.0621v3l-3.5-2L4,5.45C4,5.45,4,2.45,4,2.45z M14,13v1 c-0.2626,0.0194-0.5069,0.1416-0.68,0.34c-0.2717,0.2883-0.6178,0.4959-1,0.6c-0.6147,0.1815-1.2795,0.0425-1.77-0.37l-0.39-0.35 c-0.3043-0.3026-0.7957-0.3026-1.1,0c-0.14,0.12-0.27,0.25-0.42,0.37c-0.7328,0.5856-1.7814,0.556-2.48-0.07l-0.39-0.35 c-0.2864-0.2502-0.7136-0.2502-1,0c-0.19,0.15-0.36,0.32-0.55,0.47c-0.7043,0.5215-1.6732,0.4968-2.35-0.06l-0.31-0.27 C1.4153,14.1443,1.2172,14.0346,1,14v-1c0.2585-0.032,0.5205,0.0169,0.75,0.14c0.2782,0.1722,0.5424,0.3661,0.79,0.58 c0.2051,0.2235,0.5147,0.319,0.81,0.25c0.1125-0.0333,0.2177-0.0876,0.31-0.16c0.16-0.12,0.29-0.26,0.45-0.39 c0.7106-0.5888,1.7394-0.5888,2.45,0c0.16,0.13,0.31,0.28,0.47,0.41c0.2864,0.2502,0.7136,0.2502,1,0c0.16-0.13,0.31-0.28,0.47-0.41 c0.7123-0.5943,1.7477-0.5943,2.46,0c0.15,0.13,0.29,0.27,0.44,0.39c0.2864,0.2502,0.7136,0.2502,1,0l0.47-0.41 C13.1895,13.1408,13.5886,12.9995,14,13z","ferry-JP":"M9.5 12.5H5.5L5.5 8C5.5 6.91153 6.07979 5.44812 6.85389 4.13809C7.07346 3.76652 7.29495 3.43049 7.5 3.1451C7.70505 3.43049 7.92654 3.76652 8.14611 4.13809C8.92021 5.44812 9.5 6.91153 9.5 8V12.5ZM7.5 1C7 1 4 5 4 8V12.5C4 13.3284 4.67157 14 5.5 14H9.5C10.3284 14 11 13.329 11 12.5006V8C11 5 8 1 7.5 1Z","fire-station":"M7.5 14C11.0899 14 14 11 14 7.50003C14 4.5 11.5 2 11.5 2L10.5 5.5L7.5 1L4.5 5.5L3.5 2C3.5 2 1 4.5 1 7.50003C1 11 3.91015 14 7.5 14ZM7.5 12.5C6.11929 12.5 5 11.3807 5 10C5 8.61929 7.5 5.5 7.5 5.5C7.5 5.5 10 8.61929 10 10C10 11.3807 8.88071 12.5 7.5 12.5Z","fire-station-JP":"M8.5,8.1489V11.75a1,1,0,0,1-2,0V8.1489A5.0084,5.0084,0,0,1,2.5,3.25a1,1,0,0,1,2,0,3,3,0,0,0,6,0,1,1,0,0,1,2,0A5.0082,5.0082,0,0,1,8.5,8.1489Z","fitness-centre":"M14.5,7V8h-1v2h-1v1H11V8H4v3H2.5V10h-1V8H.5V7h1V5h1V4H4V7h7V4h1.5V5h1V7Z",florist:"M1.5,1A2.7,2.7,0,0,1,4,3l.5-3L5,3A2.7,2.7,0,0,1,7.5,1c-.2.03-1,.26-1,2v.083A1.959,1.959,0,0,1,4.5,5H4.417A1.959,1.959,0,0,1,2.5,3C2.5,1.261,1.7,1.03,1.5,1ZM12.012,11l3-.5-3-.5A2.686,2.686,0,0,0,14,7.5c-.03.2-.248,1-1.988,1a2,2,0,0,0,0,4c1.739,0,1.958.8,1.988,1A2.686,2.686,0,0,0,12.012,11ZM9.688,5.548a1,1,0,0,1,0-2,1,1,0,0,1,0-2,.986.986,0,0,1,.852.507l.023-.012a.978.978,0,0,1-.116-.444,1,1,0,1,1,2,0,.978.978,0,0,1-.116.444l.019.01a.986.986,0,0,1,.85-.5,1,1,0,0,1,.025,2,1,1,0,0,1-.025,2,.986.986,0,0,1-.85-.5l-.016.009a.978.978,0,0,1,.113.44,1,1,0,0,1-2,0,.978.978,0,0,1,.113-.44l-.02-.011a.986.986,0,0,1-.852.507Zm.71-1.995A1.051,1.051,0,1,0,11.449,2.5,1.051,1.051,0,0,0,10.4,3.553v0ZM4.946,11.444l-.516-.515L8.892,6.475A1.746,1.746,0,0,1,8.44,6.22L4.076,10.575l-.519-.518A16.051,16.051,0,0,0,4.912,6a3.373,3.373,0,0,1-.412.035c-.041,0-.073-.008-.112-.01A16.953,16.953,0,0,1,3.131,9.631L2.76,9.26a.246.246,0,0,0-.4.079L.231,14.445a.287.287,0,0,0-.016.089.25.25,0,0,0,.25.25.289.289,0,0,0,.1-.019l5.1-2.124a.246.246,0,0,0,.079-.4l-.372-.372a16.874,16.874,0,0,1,3.612-1.256c0-.059-.015-.106-.015-.166A3.349,3.349,0,0,1,9,10.089,16.076,16.076,0,0,0,4.946,11.444Z",fuel:"m14 6v5.5c0 .2761-.2239.5-.5.5s-.5-.2239-.5-.5v-2c0-.8284-.6716-1.5-1.5-1.5h-1.5v-6c0-.5523-.4477-1-1-1h-6c-.5523 0-1 .4477-1 1v11c0 .5523.4477 1 1 1h6c.5523 0 1-.4477 1-1v-4h1.5c.2761 0 .5.2239.5.5v2c0 .8284.6716 1.5 1.5 1.5s1.5-.6716 1.5-1.5v-6.5c0-.5523-.4477-1-1-1v-1.51c-.0054-.2722-.2277-.4901-.5-.49-.2816.0047-.5062.2367-.5015.5184.0002.0105.0007.0211.0015.0316v2.45c0 .5523.4477 1 1 1s1-.4477 1-1-.4477-1-1-1zm-5 .5c0 .2761-.2239.5-.5.5h-5c-.2761 0-.5-.2239-.5-.5v-3c0-.2761.2239-.5.5-.5h5c.2761 0 .5.2239.5.5z",furniture:"m8.69099 10.142v-1.642c0-.13261-.05268-.25979-.14645-.35355-.09377-.09377-.22094-.14645-.35355-.14645h-1c-.13261 0-.25979.05268-.35356.14645-.09376.09376-.14644.22094-.14644.35355v1.641c-.75987.1945-1.4456.6085-1.9715 1.1905-.52591.5819-.86868 1.3059-.9855 2.0815-.01141.0723-.00702.1462.01285.2167.01987.0704.05476.1357.10227.1914s.10651.1004.17295.1311c.06643.0307.13873.0467.21193.0468h6.92201c.0732-.0001.1455-.0161.2119-.0468.0665-.0307.1255-.0754.173-.1311s.0824-.121.1022-.1914c.0199-.0705.0243-.1444.0129-.2167-.1176-.7765-.4616-1.501-.989-2.0828-.5275-.5819-1.2148-.9952-1.97601-1.1882zm4.63901-3.863-2.5-5c-.0412-.08351-.1048-.15387-.1838-.20316s-.1701-.07556-.2632-.07584h-5.38401c-.09261.00019-.18335.02609-.2621.07483-.07875.04873-.14241.11837-.1839.20117l-2.5 5c-.03809.076-.05617.16046-.05253.24539.00363.08494.02886.16754.07331.24001.04444.07247.10663.13241.18068.17416s.15753.06393.24254.06444h8.19401v1.5c0 .13261.0527.25979.1464.35355.0938.09377.221.14645.3536.14645s.2598-.05268.3535-.14645c.0938-.09376.1465-.22094.1465-.35355v-1.5h1.194c.0847-.00059.1678-.02269.2416-.06421s.1359-.1011.1804-.17317c.0444-.07207.0699-.15425.0739-.23884s-.0135-.16882-.0509-.24478z",gaming:"m13.1 11.5c-.6.3-1.4.1-1.8-.5l-1.1-1.4h-5.40002l-1.1 1.4c-.5.7-1.4.8-2.1.3-.5-.4-.700004-1-.600004-1.5l.700004-3.7c.2-1.2 1.3-2.1 2.5-2.1h2.8v-1.5c0-.8.6-1.5 1.4-1.5h3.10002c.3 0 .5.2.5.5s-.2.5-.5.5h-3.00002c-.3 0-.5.2-.5.4v.1 1.5h2.80002c1.2 0 2.3.9 2.5 2.1l.7 3.7c.1.7-.2 1.4-.9 1.7zm-7.10002-5c0-.8-.7-1.5-1.5-1.5s-1.5.7-1.5 1.5.7 1.5 1.5 1.5 1.5-.7 1.5-1.5zm6.00002 0c0-.3-.2-.5-.5-.5h-.5v-.5c0-.3-.2-.5-.5-.5s-.50002.2-.50002.5v.5h-.5c-.3 0-.5.2-.5.5s.2.5.5.5h.5v.5c0 .3.20002.5.50002.5s.5-.2.5-.5v-.5h.5c.3 0 .5-.2.5-.5z",garden:"M13,8c0,3.31-2.19,6-5.5,6S2,11.31,2,8c2.2643,0.0191,4.2694,1.4667,5,3.61V7H4.5C3.6716,7,3,6.3284,3,5.5v-3 C3,2.2239,3.2239,2,3.5,2c0.1574,0,0.3056,0.0741,0.4,0.2l1.53,2l1.65-3c0.1498-0.232,0.4593-0.2985,0.6913-0.1487 C7.8308,1.0898,7.8815,1.1404,7.92,1.2l1.65,3l1.53-2c0.1657-0.2209,0.4791-0.2657,0.7-0.1C11.9259,2.1944,12,2.3426,12,2.5v3 C12,6.3284,11.3284,7,10.5,7H8v4.61C8.7306,9.4667,10.7357,8.0191,13,8z","garden-centre":"M4,5L4,4.5C4,3.12 5.12,2 6.5,2C7.88,2 9,3.12 9,4.5L9,10.293L11.365,7.928L11.018,6.633C11.018,6.631 11.017,6.629 11.017,6.627L11.016,6.627L11.016,6.627C10.973,6.461 11.016,6.276 11.147,6.146C11.342,5.951 11.659,5.951 11.854,6.146L13.854,8.146C14.049,8.341 14.049,8.658 13.854,8.853C13.724,8.983 13.541,9.027 13.375,8.984C13.375,8.984 13.375,8.984 13.375,8.984C13.372,8.983 13.369,8.982 13.365,8.981L12.072,8.635L9,11.707L9,12C9,12.552 8.552,13 8,13L5,13C4.448,13 4,12.552 4,12L4,11.536L1.732,9.268C0.757,8.292 0.757,6.708 1.732,5.732C2.22,5.244 2.86,5 3.5,5L3.5,5L4,5ZM4,6L3.5,6L3.5,6C3.116,6 2.732,6.147 2.439,6.439C1.854,7.025 1.854,7.975 2.439,8.561L4,10.121L4,6ZM8,5L8,4.5C8,3.672 7.328,3 6.5,3C5.672,3 5,3.672 5,4.5L5,5L8,5Z",gate:"M1 2.75A.75.75 0 0 1 1.75 2h1.114c.09 0 .18.016.263.048l3.386 1.27A.75.75 0 0 1 7 4.02v5.96a.75.75 0 0 1-.487.702L3 12v.25a.75.75 0 0 1-.75.75h-.5a.75.75 0 0 1-.75-.75v-9.5Zm3 5.736v-4.87a.25.25 0 0 0-.162-.234l-.5-.187A.25.25 0 0 0 3 3.429v5.224c0 .17.167.291.33.237l.5-.166A.25.25 0 0 0 4 8.486ZM5 4.18v3.807a.25.25 0 0 0 .33.238l.5-.167A.25.25 0 0 0 6 7.82V4.366a.25.25 0 0 0-.162-.234l-.5-.187A.25.25 0 0 0 5 4.179Zm9-1.43a.75.75 0 0 0-.75-.75h-1.114a.75.75 0 0 0-.263.048l-3.386 1.27A.75.75 0 0 0 8 4.02v5.96a.75.75 0 0 0 .487.702L12 12v.25c0 .414.336.75.75.75h.5a.75.75 0 0 0 .75-.75v-9.5Zm-2.83 5.974a.25.25 0 0 1-.17-.238v-4.87a.25.25 0 0 1 .162-.234l.5-.187a.25.25 0 0 1 .338.234v5.224a.25.25 0 0 1-.33.237l-.5-.166ZM10 4.179v3.807a.25.25 0 0 1-.33.238l-.5-.167A.25.25 0 0 1 9 7.82V4.366a.25.25 0 0 1 .162-.234l.5-.187a.25.25 0 0 1 .338.234Z",gift:"M10.5 1.00152C9.0967.957116 7.8503 1.89192 7.5 3.25152 7.1497 1.89192 5.9033.957116 4.5 1.00152 2.7678.947006 2.23515 2.79746 2.81831 4H1.5C1.22386 4 1 4.22386 1 4.5V5.5C1 5.77614 1.22386 6 1.5 6H13.5C13.7761 6 14 5.77614 14 5.5V4.5C14 4.22386 13.7761 4 13.5 4H12.1938C12.8 2.81516 12.2922 1.00143 10.5404 1.00112 10.5269 1.00112 10.5135 1.00122 10.5 1.00152ZM10.6831 4H8.5C8.50082 2.8961 9.3959 2.00152 10.5 2.00152 11.675 2.00152 11.8827 3.87414 10.6831 4ZM6.5 4H4.29187C3.25675 3.88256 3.19576 2.10553 4.3323 2.00152 4.3881 1.99642 4.4442 1.99642 4.5 2.00152 5.60409 2.00152 6.49918 2.8961 6.5 4ZM2 7.00146V11.5015C2 12.3299 2.6716 13.0015 3.5 13.0015H6.5V7.00146H2ZM8.5 7.00146V13.0015H11.5C12.3284 13.0015 13 12.3299 13 11.5015V7.00146H8.5Z",globe:"M11.981,9.481,11.26,8.76A4.979,4.979,0,1,1,4.24,1.74l-.721-.721A5.991,5.991,0,0,0,7,11.475V13H6.5a.5.5,0,0,0,0,1h2a.5.5,0,0,0,0-1H8V11.473A5.983,5.983,0,0,0,11.981,9.481ZM7.5,9A3.5,3.5,0,1,0,4,5.5,3.5,3.5,0,0,0,7.5,9Zm1-5,.364-.592a2.5,2.5,0,0,1,.823.9L9.5,5h-1ZM6.656,3.156,7.5,4V5L8,6H9.94a2.494,2.494,0,0,1-1.5,1.814L8,7H6.5L5.05,5A2.5,2.5,0,0,1,6.656,3.156Z",golf:"M3.3999,1.1c0,0.1,0,0.2,0,0.2c0,0.4,0.3,0.7,0.7,0.7c0.3,0,0.5-0.2,0.6-0.5l0,0L4.9,1l5.6,2.3L6.6,6C6.2,6.3,6.2,6.7,6.3,7.1 l0.9,2.1l-1.3,3.9C5.7,13.6,6.1,14,6.5,14c0.3,0,0.5-0.1,0.6-0.5l1.4-4l0.1,0.3v3.5c0,0,0,0.7,0.7,0.7s0.7-0.7,0.7-0.7V10 c0-0.2,0-0.3-0.1-0.5L8.5,6.1l2.7-1.9c0.2-0.2,0.4-0.3,0.4-0.6s-0.2-0.5-0.4-0.6L4,0.1c-0.0878,0-0.118,0.0179-0.2001,0.1 L3.3999,1.1z M5.5,3C4.7,3,4,3.7,4,4.5S4.7,6,5.5,6S7,5.3,7,4.5S6.2999,3,5.5,3z",grocery:"M 13.199219 1.5 C 13.199219 1.5 11.808806 1.4588 11.253906 2 C 10.720406 2.5202 10.5 2.9177 10.5 4 L 1.1992188 4 L 2.59375 8.8144531 C 2.59725 8.8217531 2.6036219 8.8287375 2.6074219 8.8359375 C 2.8418219 9.4932375 3.4545469 9.9666406 4.1855469 9.9941406 C 4.1885469 9.9954406 4.1992187 10 4.1992188 10 L 10.699219 10 L 10.699219 10.199219 C 10.699219 10.199219 10.7 10.500391 10.5 10.900391 C 10.3 11.300391 10.200391 11.5 9.4003906 11.5 L 2.9003906 11.5 C 1.9003906 11.5 1.9003906 13 2.9003906 13 L 4.0996094 13 L 4.1992188 13 L 9.0996094 13 L 9.1992188 13 L 9.3007812 13 C 10.500781 13 11.399219 12.299609 11.699219 11.599609 C 11.999219 10.899609 12 10.300781 12 10.300781 L 12 10 L 12 4 C 12 3.4764 12.228619 3 12.699219 3 L 13.25 3 C 13.6642 3 14 2.6642 14 2.25 C 14 1.8358 13.6642 1.5 13.25 1.5 L 13.199219 1.5 z M 9.1992188 13 C 8.5992188 13 8.1992188 13.4 8.1992188 14 C 8.1992188 14.6 8.5992187 15 9.1992188 15 C 9.7992187 15 10.199219 14.6 10.199219 14 C 10.199219 13.4 9.7992188 13 9.1992188 13 z M 4.1992188 13 C 3.5992188 13 3.1992188 13.4 3.1992188 14 C 3.1992188 14.6 3.5992187 15 4.1992188 15 C 4.7992188 15 5.1992188 14.6 5.1992188 14 C 5.1992188 13.4 4.7992187 13 4.1992188 13 z",hairdresser:"M15,3c0,0-2-0.6-3.5,0.5l-4.3,3C6.4,5.9,5.2,5.2,4,4.8V4c0-1.1-0.9-2-2-2C0.9,2,0,2.9,0,4v1.5 C0,6,0.5,6,0.5,6H2h0.5C4.5,6,6,7.5,6,7.5S4.5,9,2.5,9H2H0.5C0.5,9,0,9,0,9.5V11c0,1.1,0.9,2,2,2c1.1,0,2-0.9,2-2v-0.8 c1.2-0.4,2.4-1.1,3.2-1.7l4.3,3C13,12.6,15,12,15,12L8.5,7.5L15,3z M3,5H2H1V4c0-0.6,0.4-1,1-1c0.6,0,1,0.4,1,1V5z M3,11 c0,0.6-0.4,1-1,1c-0.6,0-1-0.4-1-1v-1h1h1V11z M7.25,8c-0.2761,0-0.5-0.2239-0.5-0.5S6.9739,7,7.25,7s0.5,0.2239,0.5,0.5 S7.5261,8,7.25,8z",harbor:"M7.5,0C5.5,0,4,1.567,4,3.5c0.0024,1.5629,1.0397,2.902,2.5,3.3379v6.0391 c-0.9305-0.1647-1.8755-0.5496-2.6484-1.2695C2.7992,10.6273,2.002,9.0676,2.002,6.498c0.0077-0.5646-0.4531-1.0236-1.0176-1.0137 C0.4329,5.493-0.0076,5.9465,0,6.498c0,3.0029,1.0119,5.1955,2.4902,6.5723C3.9685,14.4471,5.8379,15,7.5,15 c1.6656,0,3.535-0.5596,5.0117-1.9395S14.998,9.4868,14.998,6.498c0.0648-1.3953-2.0628-1.3953-1.998,0 c0,2.553-0.7997,4.1149-1.8535,5.0996C10.3731,12.3203,9.4288,12.7084,8.5,12.875V6.8418C9.9607,6.4058,10.9986,5.0642,11,3.5 C11,1.567,9.5,0,7.5,0z M7.5,2C8.3284,2,9,2.6716,9,3.5S8.3284,5,7.5,5S6,4.3284,6,3.5S6.6716,2,7.5,2z",hardware:"M13.7919,3.2619c0,0-1.676,1.675-2.1163,2.1208c-0.085,0.0861-0.1688,0.1135-0.282,0.0961 c-0.1481-0.0226-0.2974-0.038-0.4462-0.0558c-0.4072-0.0485-0.8145-0.0966-1.2292-0.1458C9.649,4.6852,9.5787,4.1049,9.5177,3.5236 C9.512,3.4689,9.5509,3.3943,9.5925,3.3522c0.5071-0.5134,1.9261-1.9287,2.134-2.136c-0.4508-0.2129-1.2243-0.2968-1.8007-0.2031 c-2.1801,0.3543-3.5112,2.534-2.8206,4.625C7.1432,5.753,7.1194,5.8201,7.0374,5.902C5.1891,7.7454,3.3436,9.5914,1.498,11.4374 c-0.0616,0.0616-0.1231,0.124-0.1779,0.1913c-0.5264,0.6473-0.3873,1.6264,0.2974,2.102c0.6044,0.4197,1.3658,0.3442,1.9053-0.1948 c1.8534-1.8519,3.7059-3.7047,5.556-5.5598C9.1707,7.884,9.2437,7.8526,9.3779,7.8983c0.6189,0.2109,1.2524,0.2354,1.8884,0.0884 c1.9386-0.4478,3.1251-2.3732,2.6549-4.3034C13.8895,3.5532,13.843,3.4244,13.7919,3.2619z",heart:"m13.91 7.75001c-1.17 2.24999-4.30002 5.30999-6.07002 6.93999-.1903.1718-.4797.1718-.67 0-1.78-1.63-4.91-4.69-6.08-6.93999-2.57-4.95 3.91-8.250002 6.41-3.3 2.5-4.950002 8.98002-1.65 6.41002 3.3z",heliport:"M4,2C3,2,3,3,4,3h4v1C7.723,4,7.5,4.223,7.5,4.5V5H5H3.9707H3.9316 C3.7041,4.1201,2.9122,3.5011,2,3.5c-1.1046,0-2,0.8954-2,2s0.8954,2,2,2c0.3722-0.001,0.7368-0.1058,1.0527-0.3027L5.5,10.5 C6.5074,11.9505,8.3182,12,9,12h5c0,0,1,0,1-1v-0.9941C15,9.2734,14.874,8.874,14.5,8.5l-3-3c0,0-0.5916-0.5-1.2734-0.5H9.5V4.5 C9.5,4.223,9.277,4,9,4V3h4c1,0,1-1,0-1C13,2,4,2,4,2z M2,4.5c0.5523,0,1,0.4477,1,1s-0.4477,1-1,1s-1-0.4477-1-1 C1,4.9477,1.4477,4.5,2,4.5z M10,6c0.5,0,0.7896,0.3231,1,0.5L13.5,9H10c0,0-1,0-1-1V7C9,7,9,6,10,6z","highway-rest-area":"M13.5,13h-3V9h3a.5.5,0,0,0,.4092-.7871L11.66,5h.84a.5.5,0,0,0,.3838-.82l-2.5-3a.5155.5155,0,0,0-.7676,0l-2.5,3A.5.5,0,0,0,7.5,5h.84L6.0908,8.2129A.5.5,0,0,0,6.5,9h3v4H4V11H5.5a.5.5,0,0,0,0-1h-4a.5.5,0,0,0,0,1H3v2H1.5a.5.5,0,0,0,0,1h12a.5.5,0,0,0,0-1Z",historic:"m7.5 1c-1 0-1 1-2 1h-3.5c-.54467 0-1 .45533-1 1v7c0 .5447.45533 1 1 1h5v2.5s0 .5.5.5.5-.5.5-.5v-2.5h5c.5447 0 1-.4553 1-1v-7c0-.54467-.4553-1-1-1h-3.5c-1 0-1-1-2-1zm-4.5 4v-1h9v1zm0 1h4v1h-4zm0 2h7v1h-7z",home:"M2,13.7478c0,0.13807,0.11193,0.25,0.25,0.25h3.749v-3h3v3h3.749c0.13807,0,0.25-0.11193,0.25-0.25V7.9987H2 C2,7.9987,2,13.7478,2,13.7478z M13.93,6.5778l-0.9319-0.8189V2c0-0.55228-0.44771-1-1-1s-1,0.44772-1,1v2L7.6808,1.09 C7.5863,0.9897,7.42846,0.98478,7.3279,1.079L7.3169,1.09L1.0678,6.553C0.9734,6.65376,0.97856,6.81197,1.07932,6.90637 C1.12478,6.94896,1.18451,6.97304,1.2468,6.9739L3,6.9989h10.7468c0.13807,0.00046,0.25037-0.1111,0.25083-0.24917 C13.99784,6.68592,13.97365,6.62445,13.93,6.5779V6.5778z","horse-riding":"M6,1A1,1,0,1,1,7,2,1,1,0,0,1,6,1ZM8,3.5a.484.484,0,0,0,0-.058A.472.472,0,0,0,7.5,3h-1a.484.484,0,0,0-.058,0A.472.472,0,0,0,6,3.5V7H8Zm6.85,3.644L12.8,4.8l.085-.509a.478.478,0,0,0,.008-.063.25.25,0,0,0-.25-.25.346.346,0,0,0-.158.056L9,7H8L9,8V9.5a.5.5,0,0,1-1,0v-1L6,7H4a1.5,1.5,0,0,0-1.243.661A1.466,1.466,0,0,0,1.563,7H1.5A1.449,1.449,0,0,0,0,8.4v.086A3.781,3.781,0,0,0,.559,10.4a.278.278,0,0,0,.191.1A.25.25,0,0,0,1,10.25V9s-.02-.924.753-1c.5-.048.747.253.747.5V11L2,13v1.75a.25.25,0,0,0,.25.25.254.254,0,0,0,.25-.234V13L4,11v1l.5,2.8a.255.255,0,0,0,.246.2A.25.25,0,0,0,5,14.754H5L4.855,12.3,5.5,11H8v1l.508,2.813A.257.257,0,0,0,8.75,15,.25.25,0,0,0,9,14.75V12l.367-1a1.155,1.155,0,0,0,.543-.6l2.161-3.767a.863.863,0,0,0,1.023.4l1.066.818a.591.591,0,0,0,.35.135.487.487,0,0,0,.475-.4A.552.552,0,0,0,14.85,7.144Z",hospital:"M7,1C6.4,1,6,1.4,6,2v4H2C1.4,6,1,6.4,1,7v1 c0,0.6,0.4,1,1,1h4v4c0,0.6,0.4,1,1,1h1c0.6,0,1-0.4,1-1V9h4c0.6,0,1-0.4,1-1V7c0-0.6-0.4-1-1-1H9V2c0-0.6-0.4-1-1-1H7z","hospital-JP":"m12.5038 3h-10.00777c-.26639.00235-.52096.11039-.70772.30036-.18677.18998-.29046.44634-.28828.71274v5.5807c-.00063.18713.05047.37079.14765.5307.09718.1599.23667.2899.40305.3755l4.78 2.8394c.20725.1056.43653.1606.6691.1606.23258 0 .46186-.055.6691-.1606l4.78037-2.8394c.1664-.0856.3059-.2155.4031-.3755.0972-.15989.1483-.34357.1476-.5307v-5.5807c.0012-.13194-.0237-.2628-.0732-.38512-.0494-.12232-.1225-.2337-.215-.32777-.0925-.09408-.2027-.16901-.3241-.22052-.1215-.05151-.2519-.07859-.3839-.07969zm-2.0038 5.5h-1.99997v2h-2v-2h-2v-2h2v-2h2v2h1.99997z","hot-spring":"M6.682,5.759c-.505-.725-.781-1.121-.63-2.376,.139-1.156,.678-1.616,1.198-2.059,.404-.345,.797-.68,.981-1.324,.301,.722-.036,1.47-.349,2.164-.311,.691-.599,1.329-.211,1.836,.971,1.271,1.963,2.88,.971,4.586-.214,.393-.539,.681-.861,.968-.422,.375-.841,.747-1.004,1.348-.269-.677,.008-1.366,.285-2.052,.306-.759,.61-1.516,.172-2.251-.203-.34-.389-.607-.551-.84Zm3.371-1.174c-.098-.632,.034-1.281,.368-1.809,.367-.45,.701-.642,.991-.81,.345-.199,.627-.362,.83-.877,.289,.684,0,1.188-.304,1.718-.119,.207-.24,.418-.329,.645-.191,.61,.101,.893,.467,1.247,.358,.346,.786,.76,.899,1.617,.083,.635-.036,1.156-.372,1.684-.356,.436-.681,.655-.965,.846-.356,.24-.648,.437-.856,.965-.292-.688,.031-1.259,.353-1.828,.123-.217,.246-.434,.334-.658,.073-.558-.234-.867-.581-1.217-.357-.36-.757-.763-.834-1.523Zm-8.018,0c-.098-.632,.005-1.3,.368-1.809,.376-.528,.729-.717,1.035-.881,.323-.173,.594-.318,.786-.806,.289,.683-.014,1.208-.325,1.749-.122,.212-.246,.427-.336,.655-.152,.385,.131,1.014,.501,1.242,1.002,.801,1.227,2.286,.547,3.353-.366,.448-.704,.648-.999,.823-.353,.209-.645,.382-.849,.898-.278-.656,.008-1.18,.3-1.714,.131-.24,.263-.481,.345-.737,.179-.557-.134-.884-.51-1.277-.349-.365-.752-.785-.863-1.498Zm10.965,4.414c.7,2.616-3.474,3-5.5,3s-6.2-.484-5.5-3c-.633,.316-1,.961-1,1.5,0,1.519,2.91,2.9,6.5,2.9s6.5-1.381,6.5-2.9c0-.539-.367-1.184-1-1.5Z","ice-cream":"M5.44,8.17a3.473,3.473,0,0,0,2-.63A3.5,3.5,0,0,0,9,8.14h.44L8,13.7a.5.5,0,0,1-.92,0Zm6-3.473a2,2,0,0,1-4,0h0a2,2,0,1,1-2-2h.12a2,2,0,1,1,3.75,0h.13A2,2,0,0,1,11.439,4.7Z",industry:"M14,1v12H1V8.72c0.0016-0.1419,0.0634-0.2764,0.17-0.37l3-3.22c0.2074-0.1823,0.5234-0.1618,0.7056,0.0456 C4.9568,5.268,5.0011,5.387,5,5.51v3l3.16-3.37c0.2025-0.1878,0.5188-0.1759,0.7066,0.0266C8.9532,5.2599,9.0009,5.3827,9,5.51V11h3 V1H14z",information:"M7.5,1 C6.7,1,6,1.7,6,2.5S6.7,4,7.5,4S9,3.3,9,2.5S8.3,1,7.5,1z M4,5v1c0,0,2,0,2,2v2c0,2-2,2-2,2v1h7v-1c0,0-2,0-2-2V6c0-0.5-0.5-1-1-1H4 z","jewelry-store":"M12,8.5c0,2.4853-2.0147,4.5-4.5,4.5S3,10.9853,3,8.5c0-1.8483,1.1164-3.4329,2.7099-4.1255l0.1761,0.137l0.7739,0.6019 C5.1366,5.4922,4,6.8611,4,8.5C4,10.4299,5.5701,12,7.5,12S11,10.4299,11,8.5c0-1.6389-1.1366-3.0078-2.6599-3.3866l0.95-0.7388 C10.8836,5.0672,12,6.6517,12,8.5z M7.5,4.5L10,2.5555L9,1H6L5,2.5555l1.5,1.1667L7.5,4.5z",karaoke:"M12.1,2.952A2.988,2.988,0,0,0,6.99,4.917l3.142,3.142A2.988,2.988,0,0,0,12.1,2.952Zm-7.428,5.3L2.55,10.377a1,1,0,0,0,0,1.414l.707.707a1,1,0,0,0,1.414,0l2.121-2.121L8.914,8.255,6.793,6.134Zm.741,2.087-.707-.707L6.793,7.548l.707.707Z",landmark:"M12.5,12H12v-0.5c0-0.3-0.2-0.5-0.5-0.5H11V6h1l1-2c-1,0.1-2,0.1-3,0C9.2,3.4,8.6,2.8,8,2V1.5C8,1.2,7.8,1,7.5,1 S7,1.2,7,1.5V2C6.4,2.8,5.8,3.4,5,4C4,4.1,3,4.1,2,4l1,2h1v5c0,0-0.5,0-0.5,0C3.2,11,3,11.2,3,11.5V12H2.5C2.2,12,2,12.2,2,12.5V13 h11v-0.5C13,12.2,12.8,12,12.5,12z M7,11H5V6h2V11z M10,11H8V6h2V11z","landmark-JP":"m9.5 4c0 .39556-.1173.78224-.33706 1.11114s-.53212.58524-.89757.73662c-.36545.15137-.76759.19098-1.15555.11381s-.74433-.26765-1.02403-.54736c-.27971-.2797-.47019-.63607-.54736-1.02403s-.03756-.79009.11381-1.15555c.15138-.36545.40772-.67781.73662-.89757s.71558-.33706 1.11114-.33706c.53043 0 1.03914.21071 1.41421.58579.37508.37507.58579.88378.58579 1.41421zm-6 4c-.39556 0-.78224.1173-1.11114.33706s-.58524.53212-.73662.89757c-.15137.36546-.19098.76757-.11381 1.15557.07717.3879.26765.7443.54736 1.024.2797.2797.63607.4702 1.02403.5474.38796.0771.7901.0375 1.15555-.1138.36545-.1514.67781-.4078.89757-.7367s.33706-.7155.33706-1.1111c0-.53043-.21071-1.03914-.58579-1.41421-.37507-.37508-.88378-.58579-1.41421-.58579zm8 0c-.3956 0-.7822.1173-1.1111.33706s-.58528.53212-.73666.89757c-.15137.36546-.19098.76757-.11381 1.15557.07717.3879.26765.7443.54737 1.024.2797.2797.6361.4702 1.024.5474.388.0771.7901.0375 1.1556-.1138.3654-.1514.6778-.4078.8975-.7367.2198-.3289.3371-.7155.3371-1.1111 0-.53043-.2107-1.03914-.5858-1.41421-.3751-.37508-.8838-.58579-1.4142-.58579z",landuse:"m8.911 2.85401c.02782.02324.05021.0523.06558.08512.01538.03283.02337.06863.02342.10488v3.706c0 .0663-.02634.12989-.07322.17678-.04689.04688-.11048.07322-.17678.07322h-2.5c-.0663 0-.12989-.02634-.17678-.07322-.04688-.04689-.07322-.11048-.07322-.17678v-1.75h-1v1.75c0 .0663-.02634.12989-.07322.17678-.04689.04688-.11048.07322-.17678.07322h-2.5c-.0663 0-.12989-.02634-.17678-.07322-.04688-.04689-.07322-.11048-.07322-.17678v-3.7c.00005-.03625.00804-.07205.02342-.10488.01537-.03282.03776-.06188.06558-.08512l3.254-2.728c.04413-.0370337.09989-.0573335.1575-.0573335s.11337.0202998.1575.0573335zm-1.159 5.646c-.04915.00002-.09718.01464-.138.042l-2.614 1.95799h-1v-1.99999c0-.13261-.05268-.25979-.14645-.35355-.09376-.09377-.22094-.14645-.35355-.14645s-.25979.05268-.35355.14645c-.09377.09376-.14645.22094-.14645.35355v1.99999h-1v-1.99999c0-.13261-.05268-.25979-.14645-.35355-.09376-.09377-.22094-.14645-.35355-.14645s-.25979.05268-.35355.14645c-.09377.09376-.14645.22094-.14645.35355v4.24999c0 .0663.02634.1299.07322.1768.04689.0469.11048.0732.17678.0732h6.5c.0663 0 .12989-.0263.17678-.0732.04688-.0469.07322-.1105.07322-.1768v-3.99999c.00026-.03274-.00596-.0652-.0183-.09552-.01235-.03032-.03057-.0579-.05363-.08114-.02305-.02324-.05048-.04168-.0807-.05427s-.06263-.01907-.09537-.01907zm6.248-3.255v6.49999c0 .0671-.0267.1315-.0741.1789-.0474.0475-.1118.0741-.1789.0741h-3.494c-.0668 0-.1308-.0264-.1782-.0734s-.0743-.1108-.0748-.1776v-6.49699c-.00013-.03287.0062-.06544.0188-.09583.0125-.03039.0309-.058.0541-.08124.0233-.02324.0509-.04165.0813-.05417s.0629-.01889.0958-.01876h.75v-.751c0-.06604.0262-.12937.0729-.17607s.1101-.07293.1761-.07293h1.5c.0668.00053.1306.02742.1776.07481.047.04738.0734.11144.0734.17819v.747h.755c.065 0 .1273.02581.1732.07176.046.04595.0718.10826.0718.17324zm-1 4.75499h-2v1h2zm0-1.99999h-2v1h2zm0-2h-2v1h2z",laundry:"M8,1L6,3H3c0,0-1,0-1,1v9c0,1,1,1,1,1h9c0,0,1,0,1-1V2c0-1-1-1-1-1 S8,1,8,1z M8.5,2h2C10.777,2,11,2.223,11,2.5S10.777,3,10.5,3h-2C8.223,3,8,2.777,8,2.5S8.223,2,8.5,2z M7.5,6 c1.6569,0,3,1.3431,3,3s-1.3431,3-3,3s-3-1.3431-3-3S5.8431,6,7.5,6z",library:"M1.0819,9.9388C0.9871,9.867,1.0007,9.7479,1.0007,9.7479L1.5259,3.5c0,0,0.0082-0.0688,0.0388-0.104 C1.584,3.374,1.6084,3.342,1.6544,3.3232C2.1826,3.1072,5.0537,1.5519,6.5,3c0.2397,0.2777,0.4999,0.6876,0.4999,1v5.2879 c0,0,0.0062,0.1122-0.0953,0.1801c-0.0239,0.016-0.124,0.0616-0.242,0.0026c-2.2253-1.1134-4.711,0.1546-5.3381,0.4871 C1.1987,10.0244,1.1006,9.9531,1.0819,9.9388z M13.6754,9.9577c-0.6271-0.3325-3.1128-1.6005-5.3381-0.4871 c-0.118,0.059-0.2181,0.0134-0.242-0.0026C7.9939,9.4001,8.0001,9.2879,8.0001,9.2879V4c0-0.3124,0.2602-0.7223,0.4999-1 c1.4463-1.4481,4.2991,0.1071,4.8273,0.3232c0.046,0.0188,0.0704,0.0508,0.0897,0.0728C13.4476,3.4312,13.4558,3.5,13.4558,3.5 l0.5435,6.2479c0,0,0.0136,0.1191-0.0812,0.1909C13.8994,9.9531,13.8013,10.0244,13.6754,9.9577z M8.8647,12.6863 c0.0352-0.0085,0.0964-0.0443,0.1179-0.0775c0.0236-0.0364,0.0378-0.0617,0.0423-0.1088c0.0495-0.9379,1.6245-1.8119,4.6477-0.0298 c0.0775,0.0441,0.1666,0.0396,0.2425-0.0155C14.0014,12.392,14,12.2859,14,12.2859v-0.5542c0,0,0.0003-0.0764-0.0272-0.1184 c-0.0205-0.0312-0.0476-0.0643-0.0926-0.0858c-2.0254-1.3145-4.5858-1.8972-5.8854-0.1592 c-0.0181,0.0423-0.0353,0.0613-0.0728,0.0905C7.8654,11.5028,7.7964,11.5,7.7964,11.5H7.2109c0,0-0.069,0.0028-0.1256-0.0412 c-0.0375-0.0292-0.0547-0.0482-0.0728-0.0905c-1.2996-1.738-3.86-1.1828-5.8854,0.1317c-0.045,0.0215-0.0721,0.0546-0.0926,0.0858 c-0.0275,0.042-0.0272,0.1184-0.0272,0.1184v0.5542c0,0-0.0014,0.1061,0.0849,0.1688c0.0759,0.0551,0.165,0.0596,0.2425,0.0155 c3.0232-1.7821,4.5982-0.8806,4.6477,0.0573c0.0045,0.0471,0.0187,0.0724,0.0423,0.1088c0.0215,0.0332,0.0827,0.069,0.1179,0.0775 C6.8645,12.8656,7.9112,12.9363,8.8647,12.6863z","lift-gate":"M1 4a2 2 0 1 1 4 0v8a1 1 0 0 1-1 1H2a1 1 0 0 1-1-1V4Zm3 0a1 1 0 1 0-2 0 1 1 0 0 0 2 0Zm4.5 2L7 3H6v3h2.5ZM10 6h1.5L10 3H8.5L10 6Zm3.25 0H13l-1.5-3h1.75a.75.75 0 0 1 .75.75v1.5a.75.75 0 0 1-.75.75Z",lighthouse:"M4.5,6L0,7V6.5l4.5-1V6z M4.5,3.5L0,2.5V3l4.5,1V3.5z M10.5,3.5V4L15,3V2.5L10.5,3.5z M10.5,6L15,7V6.5l-4.5-1V6z M8,7V2 h2.5c0.2761,0.0552,0.5448-0.1239,0.6-0.4c0.0552-0.2761-0.1239-0.5448-0.4-0.6l-3-1C7.5696-0.0586,7.4204-0.0586,7.29,0l-3,1 c-0.2761,0.0552-0.4552,0.3239-0.4,0.6S4.2139,2.0552,4.49,2H7v5H5l-2,7h9l-2-7H8z","lighthouse-JP":"M9.5,7.4c0,1.1-0.9,2-2,2s-2-0.9-2-2s0.9-2,2-2C8.6,5.4,9.5,6.3,9.5,7.4z M14,7.5C14,7.8,13.8,8,13.5,8h-1.6 c-0.1,0.9-0.311,1.582-0.911,2.282l1.064,1.064c0.2,0.2,0.196,0.504-0.004,0.704c-0.209,0.209-0.5,0.207-0.704,0.004L10.3,11 c-0.6,0.5-1.4,0.8-2.3,0.9v1.6C8,13.8,7.8,14,7.5,14S7,13.8,7,13.5v-1.6c-0.9-0.1-1.7-0.4-2.3-0.9l-1.1,1.1 c-0.207,0.207-0.48,0.213-0.696-0.004c-0.2-0.2-0.207-0.5-0.007-0.7L4,10.3C3.5,9.7,3.1,8.9,3,8H1.5C1.2,8,1,7.8,1,7.5S1.2,7,1.5,7 H3c0.1-0.9,0.4-1.7,1-2.4l-1-1C2.8,3.4,2.8,3.1,3,2.9s0.5-0.2,0.7,0l1,1l0,0C5.3,3.4,6.1,3.1,7,3V1.5C7,1.2,7.2,1,7.5,1S8,1.2,8,1.5 V3c0.9,0.1,1.7,0.5,2.3,1l0,0l1.1-1.1c0.2-0.2,0.5-0.2,0.7,0s0.2,0.5,0,0.7L11,4.7l0,0c0.5,0.7,0.8,1.4,0.9,2.3h1.6 C13.8,7,14,7.2,14,7.5z M11.1,7.4c0-2-1.6-3.6-3.6-3.6S3.8,5.5,3.8,7.4S5.4,11,7.4,11S11.1,9.4,11.1,7.4z",lodging:"M0.5,2.5C0.2,2.5,0,2.7,0,3v7.5v2C0,12.8,0.2,13,0.5,13S1,12.8,1,12.5V11h13v1.5 c0,0.3,0.2,0.5,0.5,0.5s0.5-0.2,0.5-0.5v-2c0-0.3-0.2-0.5-0.5-0.5H1V3C1,2.7,0.8,2.5,0.5,2.5z M3.5,3C2.7,3,2,3.7,2,4.5l0,0 C2,5.3,2.7,6,3.5,6l0,0C4.3,6,5,5.3,5,4.5l0,0C5,3.7,4.3,3,3.5,3L3.5,3z M7,4C5.5,4,5.5,5.5,5.5,5.5V7h-3C2.2,7,2,7.2,2,7.5v1 C2,8.8,2.2,9,2.5,9H6h9V6.5C15,4,12.5,4,12.5,4H7z",logging:"M13.91,3.41,13.5,3l.2-.28c.02-.03.04-.05.06-.08A.969.969,0,0,0,14,1.99a1,1,0,0,0-1.62-.77c-.03.02-.06.05-.09.07L12,1.5l-.386-.386a.354.354,0,0,0-.525.475l.417.417-.5.5-.392-.392a.354.354,0,0,0-.525.475L10.5,3l-.5.5-.381-.381a.354.354,0,1,0-.528.472h0l.028.028L9.5,4,9,4.5l-.395-.395a.354.354,0,0,0-.517.483L8.5,5,8,5.5l-.365-.365a.354.354,0,0,0-.556.439h0C7.1,5.6,7.508,6,7.508,6L7,6.5l-.394-.392a.392.392,0,0,0-.5-.028.384.384,0,0,0-.028.5L6.1,6.6l.4.4L6,7.5l-.4-.4a.37.37,0,0,0-.5,0L6.248,8.244,12.09,2.41,12.5,2H13v.5l-.41.41L6.751,8.749,7.9,9.9a.355.355,0,0,0,0-.5l-.008-.009L7.5,9,8,8.5l.384.384a.354.354,0,0,0,.528-.472L8.5,8,9,7.5l.38.38a.354.354,0,0,0,.528-.472l-.02-.02L9.5,7l.5-.5.377.377A.35.35,0,0,0,10.64,7a.347.347,0,0,0,.252-.6L10.5,6l.5-.5.38.38a.354.354,0,0,0,.528-.472L11.88,5.38,11.5,5l.5-.5.381.381a.354.354,0,0,0,.528-.472l-.025-.025L12.5,4l.5-.5.382.382a.354.354,0,0,0,.528-.472ZM4.39,7.916C3.893,7.419,3.641,7,3,7H1.5a.5.5,0,0,0-.5.5v3A2.19,2.19,0,0,0,1.5,12l.815.811A2.251,2.251,0,0,0,5.493,13h0L7.5,11ZM3.5,10,2.262,11.238A1.3,1.3,0,0,1,2,10.5V8H3a.545.545,0,0,1,.335.194.455.455,0,0,1,.165.418Z",marker:"M7.5 1C5.42312 1 3 2.2883 3 5.56759C3 7.79276 6.46156 12.7117 7.5 14C8.42309 12.7117 12 7.90993 12 5.56759C12 2.2883 9.57688 1 7.5 1Z","marker-stroked":"M5.11697 2.81756C5.76952 2.26561 6.65195 2 7.5 2C8.34805 2 9.23048 2.26561 9.88303 2.81756C10.5075 3.34579 11 4.20017 11 5.56759C11 5.94031 10.8461 6.52407 10.5105 7.29145C10.1859 8.03354 9.73523 8.85087 9.24257 9.65811C8.64175 10.6426 7.999 11.5793 7.48195 12.3097C6.96023 11.5798 6.31599 10.6233 5.71947 9.62296C5.2343 8.80934 4.79303 7.98717 4.47608 7.24844C4.14708 6.48162 4 5.91216 4 5.56759C4 4.20017 4.49248 3.34579 5.11697 2.81756ZM8.10767 13.1554C9.45904 11.2632 12 7.54181 12 5.56759C12 2.2883 9.57688 1 7.5 1C5.42312 1 3 2.2883 3 5.56759C3 7.44926 5.47533 11.2572 6.86751 13.1671C7.12165 13.5157 7.3397 13.8011 7.5 14C7.55627 13.9215 7.62241 13.8299 7.697 13.7266C7.81469 13.5636 7.95343 13.3714 8.10767 13.1554Z","mobile-phone":"M10,2h0V1.5a.5.5,0,0,0-1,0V2H5A1,1,0,0,0,4,3V13a1,1,0,0,0,1,1h5a1,1,0,0,0,1-1V3A1,1,0,0,0,10,2ZM6,13H5V12H6Zm0-2H5V10H6ZM6,9H5V8H6Zm2,4H7V12H8Zm0-2H7V10H8ZM8,9H7V8H8Zm2,4H9V12h1Zm0-2H9V10h1Zm0-2H9V8h1Zm0-2.5a.5.5,0,0,1-.5.5h-4A.5.5,0,0,1,5,6.5v-3A.5.5,0,0,1,5.5,3h4a.5.5,0,0,1,.5.5Z",monument:"M7.5,0L6,2.5v7h3v-7L7.5,0z M3,11.5 L3,15h9v-3.5L10.5,10h-6L3,11.5z","monument-JP":"M12,13H4c-0.5,0-1-0.5-1-1V5c0-2,0.8-4,4-4c3.1,0,4,2,4,4v6h1c0.5,0,1,0.5,1,1S12.5,13,12,13z M5,11h4V5c0-1,0-2-2-2 S5,4,5,5V11z",mountain:"m7.5 1c-.3 0-.4.2-.6.4l-5.8 9.5c-.1.1-.1.3-.1.4 0 .5.4.7.7.7h11.6c.4 0 .7-.2.7-.7 0-.2 0-.2-.1-.4l-5.7-9.5c-.2-.2-.4-.4-.7-.4zm0 1.5 3.3 5.5h-.8l-1.5-1.5-1 1.5-1-1.5-1.5 1.5h-.9z",museum:"M7.5,0L1,3.5V4h13V3.5L7.5,0z M2,5v5l-1,1.6V13h13v-1.4L13,10V5H2z M4,6h1v5.5H4V6z M7,6h1v5.5H7V6z M10,6h1 v5.5h-1V6z",music:"m12.5 0c-.0804.0008-.1594.0213999-.23.0599999l-8.77 2.4400001c-.2761 0-.5.2239-.5.5v6.28c-.3029-.1798-.6478-.2763-1-.28-1.1046 0-2 .8954-2 2s.8954 2 2 2 2-.8954 2-2v-4.64l8-2.22v3.64c-.3029-.1798-.6478-.2763-1-.28-1.1046 0-2 .8954-2 2s.8954 2 2 2 2-.8954 2-2v-9c0-.2761-.2239-.5-.5-.5zm-.5 3.14-8 2.22v-2l8-2.22z",natural:"M8.753,6.278a.5.5,0,0,1-.51,0A4.109,4.109,0,0,1,6.5,3.5a2.779,2.779,0,0,0-.59-1.506l-.019-.027a.257.257,0,0,1-.056-.144.237.237,0,0,1,.25-.25.264.264,0,0,1,.057.011A3.523,3.523,0,0,1,7.5,2.5L8.28.94a.246.246,0,0,1,.44,0L9.5,2.5a3.4,3.4,0,0,1,1.339-.907.283.283,0,0,1,.1-.021c.175.009.212.119.221.249a.35.35,0,0,1-.043.141A5.2,5.2,0,0,0,10.5,3.5,4.113,4.113,0,0,1,8.753,6.278ZM5,8H6.289a.25.25,0,0,0,.25-.25.241.241,0,0,0-.061-.15L4.7,5.235a.255.255,0,0,0-.391,0L2.518,7.589a.274.274,0,0,0-.062.161.25.25,0,0,0,.25.25H4L1.335,10.6a.273.273,0,0,0-.058.152A.25.25,0,0,0,1.529,11H3L1.435,12.565a.255.255,0,0,0,.18.435H4v1H5V13H7.385a.255.255,0,0,0,.18-.435L6,11H7.471a.25.25,0,0,0,.25-.25.233.233,0,0,0-.058-.149Zm9.345,3.748a.252.252,0,0,1-.252.252H8.908a.252.252,0,0,1-.226-.365L11.27,6.451a.252.252,0,0,1,.451,0l2.6,5.184h0A.251.251,0,0,1,14.345,11.748ZM12.75,10,11.5,7.5,10.25,10Z","observation-tower":"M12 12.5H11.5L10 9V7C10.9951 7 10.9951 6.25 10.9951 6.25L11.5 3C11.5 3 11.5 2.5 11 2.5H10C10 2.5 10 2 9.5 2H8.5V1.5C8.5 1.5 8.5 0.5 7.5 0.5C6.5 0.5 6.5 1.5 6.5 1.5V2H5.5C5 2 5 2.5 5 2.5H4C3.5 2.5 3.5 3 3.5 3L4.0049 6.25C4.0049 6.25 4.0049 7 5 7V9L3.5 12.5H3C3 12.5 2 12.5 2 13.25C2 14 3 14 3 14H12C12 14 13 14 13 13.25C13 12.5 12 12.5 12 12.5ZM10.25 3.5L10 5H5L4.75 3.4971L10.25 3.5ZM8.5 7V8H6.5V7H8.5ZM6.5006 9.4971H8.4994L9.5 12.5H5.5L6.5006 9.4971Z",optician:"M1.78483 3.81169C2.03375 3.31421 2.54231 3 3.09859 3C3.48821 3 3.86186 3.15477 4.13736 3.43027L4.85354 4.14645C5.0488 4.34171 5.0488 4.65829 4.85354 4.85355C4.65827 5.04882 4.34169 5.04882 4.14643 4.85355L3.43017 4.1373C3.34226 4.04939 3.22303 4 3.09871 4C2.92116 4 2.75884 4.10032 2.67944 4.25912L1.309 7H5.2476C6.0654 7 6.7487 7.5656 6.941 8.3245C7.1146 8.2834 7.3009 8.25 7.5 8.25C7.6991 8.25 7.8854 8.2835 8.059 8.3246C8.2513 7.5656 8.9344 7 9.752 7H13.691L12.3206 4.25912C12.2412 4.10032 12.0788 4 11.9013 4C11.777 4 11.6577 4.04939 11.5698 4.1373L10.8536 4.85355C10.6583 5.04882 10.3417 5.04882 10.1465 4.85355C9.9512 4.65829 9.9512 4.34171 10.1465 4.14645L10.8626 3.43027C11.1381 3.15477 11.5118 3 11.9014 3C12.4577 3 12.9663 3.31421 13.2152 3.81169L14.9414 7.26172L14.9404 7.26308C14.9784 7.33359 15 7.41428 15 7.5V8.5C15 8.7761 14.7761 9 14.5 9H14V9.5C14 11.0889 12.998 12 11.25 12H10.75C9.002 12 8 11.0889 8 9.5V9.3413C7.8499 9.2933 7.6693 9.25 7.5 9.25C7.3307 9.25 7.1503 9.2933 7 9.3413V9.5C7 11.0889 5.9976 12 4.25 12H3.75C2.0024 12 1 11.0889 1 9.5V9H0.4992C0.2235 9 0 8.7765 0 8.5007V7.5C0 7.41428 0.0215731 7.33359 0.0595866 7.26308L0.0585938 7.26172L1.78483 3.81169ZM9.752 8C9.3369 8 9 8.3374 9 8.7524V9.5C9 10.1982 9.1992 11 10.75 11H11.25C12.8008 11 13 10.1982 13 9.5V8.7529C13 8.3379 12.6621 8 12.2471 8H9.752ZM2.7529 8C2.3379 8 2 8.3374 2 8.7524V9.5C2 10.1982 2.1987 11 3.75 11H4.25C5.8013 11 6 10.1982 6 9.5V8.7524C6 8.3374 5.6626 8 5.2475 8H2.7529Z",paint:"m13.5 3.5h-1v-.9973c0-.2777-.2251-.5027-.5027-.5027h-10.4946c-.2776 0-.5027.225-.5027.5027v2.9946c0 .2776.2251.5027.5027.5027h10.4946c.2776 0 .5027-.2251.5027-.5027v-.9973h.5v3.1021l-6.1123 1.4106c-.2271.0527-.3877.2549-.3877.4873v1.5074c-.2783.02-.5.246-.5.5295v2.9261c0 .2966.2404.537.5369.537h.9261c.2966 0 .537-.2404.537-.5369v-2.9261c0-.2834-.2217-.5095-.5-.5295v-1.11l6.1123-1.4102c.2266-.0522.3877-.2544.3877-.4873v-4c0-.2764-.2236-.5-.5-.5z",park:"M14,5.75c0.0113-0.6863-0.3798-1.3159-1-1.61C12.9475,3.4906,12.4014,2.9926,11.75,3 c-0.0988,0.0079-0.1962,0.0281-0.29,0.06c-0.0607-0.66-0.6449-1.1458-1.3048-1.0851C9.8965,1.9987,9.6526,2.1058,9.46,2.28l0,0 c0-0.6904-0.5596-1.25-1.25-1.25S6.96,1.5896,6.96,2.28C6.96,2.28,7,2.3,7,2.33C6.4886,1.8913,5.7184,1.9503,5.2797,2.4618 C5.1316,2.6345,5.0347,2.8451,5,3.07C4.8417,3.0195,4.6761,2.9959,4.51,3C3.6816,2.9931,3.0044,3.659,2.9975,4.4874 C2.9958,4.6872,3.0341,4.8852,3.11,5.07C2.3175,5.2915,1.8546,6.1136,2.0761,6.9061C2.2163,7.4078,2.6083,7.7998,3.11,7.94 c0.2533,0.7829,1.0934,1.2123,1.8763,0.959C5.5216,8.7258,5.9137,8.2659,6,7.71C6.183,7.8691,6.4093,7.9701,6.65,8v5L5,14h5l-1.6-1 v-2c0.7381-0.8915,1.6915-1.5799,2.77-2c0.8012,0.1879,1.603-0.3092,1.7909-1.1103C12.9893,7.7686,13.0025,7.6444,13,7.52 c0.0029-0.0533,0.0029-0.1067,0-0.16C13.6202,7.0659,14.0113,6.4363,14,5.75z M8.4,10.26V6.82C8.6703,7.3007,9.1785,7.5987,9.73,7.6 h0.28c0.0156,0.4391,0.2242,0.849,0.57,1.12C9.7643,9.094,9.0251,9.6162,8.4,10.26z","park-alt1":"M9.428,10.429a.269.269,0,0,1-.074-.18A.25.25,0,0,1,9.6,10h1.447a.25.25,0,0,0,.25-.25.258.258,0,0,0-.079-.179L9.07,7.419a.3.3,0,0,1-.063-.17A.249.249,0,0,1,9.257,7H10.4a.251.251,0,0,0,.25-.251.247.247,0,0,0-.077-.178L8.432,4.434,8.418,4.42a.262.262,0,0,1-.066-.17A.25.25,0,0,1,8.6,4h.866a.25.25,0,0,0,.25-.25.246.246,0,0,0-.068-.164h.006L7.7,1.238a.253.253,0,0,0-.042-.044A.249.249,0,0,0,7.5,1.139h0a.249.249,0,0,0-.158.055.253.253,0,0,0-.042.044L5.352,3.586a.246.246,0,0,0-.068.164.25.25,0,0,0,.25.25H6.4a.241.241,0,0,1,.184.42l-.014.014L4.431,6.571a.247.247,0,0,0-.077.178A.251.251,0,0,0,4.6,7H5.745a.249.249,0,0,1,.25.249.3.3,0,0,1-.063.17L3.782,9.571A.258.258,0,0,0,3.7,9.75a.25.25,0,0,0,.25.25H5.4a.25.25,0,0,1,.248.249.269.269,0,0,1-.074.18l-2.14,2.132-.009.009a.248.248,0,0,0,0,.351A.256.256,0,0,0,3.605,13H7v1l1-.008V13h3.391a.263.263,0,0,0,.26-.254.248.248,0,0,0-.071-.177Z",parking:"M4 2V13H6V9H8.5C10.433 9 12 7.433 12 5.5C12 3.567 10.433 2 8.5 2H4ZM6 7V4H8.5C9.32843 4 10 4.67157 10 5.5C10 6.32843 9.32843 7 8.5 7H6Z","parking-garage":"M10.5,10.14c-0.6637,0.4788-1.4732,0.7121-2.29,0.66h-1.9V14h-1.9V5h3.92 c0.7801-0.0414,1.5484,0.2041,2.16,0.69c0.5779,0.5595,0.875,1.3483,0.81,2.15C11.4042,8.6892,11.1088,9.5388,10.5,10.14z M9,6.9 C8.711,6.6881,8.3579,6.5822,8,6.6H6.31v2.65H8c0.3612,0.0191,0.717-0.0947,1-0.32c0.2559-0.2675,0.3867-0.6308,0.36-1 C9.4072,7.5493,9.274,7.1684,9,6.9z M14.41,4.21c0.114-0.2486,0.007-0.5427-0.24-0.66L7.5,0.45l-6.71,3.1 C0.5387,3.666,0.429,3.9637,0.545,4.215C0.661,4.4663,0.9587,4.576,1.21,4.46l0,0L7.5,1.55l6.29,2.9 c0.2486,0.114,0.5427,0.007,0.66-0.24H14.41z","parking-paid":"M1 13V2h4.5a3.5 3.5 0 0 1 3.21 2.103 3.36 3.36 0 0 0-.504.676c-.23.41-.232.837-.174 1.154l.3 1.625A3.495 3.495 0 0 1 5.5 9H3v4H1Zm4.5-6a1.5 1.5 0 1 0 0-3H3v3h2.5Zm3.516-1.248a.716.716 0 0 1 .062-.484C9.315 4.848 9.978 4 11.5 4c1.521 0 2.185.847 2.421 1.268a.716.716 0 0 1 .064.484L13.019 11H12v2h-1v-2H9.981l-.965-5.248ZM12.75 7 13 5.655C12.83 5.409 12.42 5 11.5 5s-1.33.41-1.5.655L10.25 7h2.5Z",pharmacy:"M9.5,4l1.07-1.54c0.0599,0.0046,0.1201,0.0046,0.18,0c0.6904-0.0004,1.2497-0.5603,1.2494-1.2506 C11.999,0.519,11.4391-0.0404,10.7487-0.04C10.0584-0.0396,9.499,0.5203,9.4994,1.2106c0,0.0131,0.0002,0.0262,0.0006,0.0394 c0,0,0,0.07,0,0.1L7,4H9.5z M12,6V5H3v1l1.5,3.5L3,13v1h9v-1l-1-3.5L12,6z M10,10H8v2H7v-2H5V9h2V7h1v2h2V10z","picnic-site":"M4,3C3.446,3,3,3.446,3,4s0.446,1,1,1h1.2969 L4.6523,7H2.5c-0.554,0-1,0.446-1,1s0.446,1,1,1h1.5098L3.041,12.0098c-0.1284,0.3939,0.0868,0.8173,0.4807,0.9457 s0.8173-0.0868,0.9457-0.4807c0.0005-0.0013,0.0009-0.0027,0.0013-0.004L5.5859,9h3.8281l1.1172,3.4707 c0.1273,0.3943,0.5501,0.6107,0.9443,0.4834s0.6107-0.5501,0.4834-0.9443l0,0L10.9902,9H12.5c0.554,0,1-0.446,1-1s-0.446-1-1-1 h-2.1523L9.7031,5H11c0.554,0,1-0.446,1-1s-0.446-1-1-1H4z M6.873,5H8.127l0.6445,2h-2.543L6.873,5z",pitch:"M5,3C4.4477,3,4,2.5523,4,2s0.4477-1,1-1s1,0.4477,1,1S5.5523,3,5,3z M12.5,10H10L9,7L8,5.25L9,5l2.3,1l0,0 c0.2761,0.1105,0.5895-0.0239,0.7-0.3S11.9761,5.1105,11.7,5l0,0L9,4H7L5,5L4,6H2.5C2.2239,6,2,6.2239,2,6.5S2.2239,7,2.5,7H5l1-1 l1,2l-2,2v3.5C5,13.7761,5.2239,14,5.5,14S6,13.7761,6,13.5v-3.11L8,9l1,2h3.5c0.2761,0,0.5-0.2239,0.5-0.5S12.7761,10,12.5,10z","place-of-worship":"M7.5,0l-2,2v2h4V2 L7.5,0z M5.5,4.5L4,6h7L9.5,4.5H5.5z M2,6.5c-0.5523,0-1,0.4477-1,1V13h2V7.5C3,6.9477,2.5523,6.5,2,6.5z M4,6.5V13h7V6.5H4z M13,6.5c-0.5523,0-1,0.4477-1,1V13h2V7.5C14,6.9477,13.5523,6.5,13,6.5z",playground:"m3.00002 1.15c.2091-.8016 1.0284-1.2819 1.83-1.0729s1.2819 1.0284 1.0729 1.83c-.2003.7681-.9643 1.2471-1.7429 1.0929-.8126-.161-1.3409-.9502-1.18-1.7629.0058-.0292.0125-.0583.02-.0871zm10.99998 11.17c.1032.5426-.2531 1.066-.7956 1.1692-.0015.0003-.0029.0006-.0044.0008-.4252.086-.8574-.1119-1.07-.49l-1.68-3.37-1.44998.29-.22.08h-.06v2.15l.62-.15h.14c.2871.0054.5155.2425.5101.5297-.0039.2064-.1295.391-.3201.4703l-5 1c-.0563.0095-.1137.0095-.17 0-.2872 0-.52-.2328-.52-.52 0-.2099.1262-.3993.32-.48l4.15-.83v-2.17l-3.22.58c-.164.0423-.336.0423-.5 0-.3394-.0867-.6088-.3446-.71-.68h-.02l-1-4.07c-.0312-.1416-.0312-.2884 0-.43.0936-.387.4078-.6815.8-.75l4.7-.52v-4.13h.22v4.1h.06l.22-.02.4-.08h.21c.2673.0643.43258.3323.37.6-.0439.235-.251.4041-.49.4l-.49.08h-.22-.06v2.86h.06l.22-.06 1.80998-.36c.4275-.0352.8299.2062 1 .6l2 3.94c.077.0758.1411.1636.19.26zm-5.49998-7.19-2.5.27.74 2.94 1.76-.34z",police:"M5.5,1L6,2h5l0.5-1H5.5z M6,2.5v1.25c0,0,0,2.75,2.5,2.75S11,3.75,11,3.75V2.5H6z M1.9844,3.9863 C1.4329,3.9949,0.9924,4.4485,1,5v4c-0.0001,0.6398,0.5922,1.1152,1.2168,0.9766L5,9.3574V14l5.8789-6.9297 C10.7391,7.0294,10.5947,7,10.4414,7H6.5L3,7.7539V5C3.0077,4.4362,2.5481,3.9775,1.9844,3.9863z M11.748,7.7109L6.4121,14H12 V8.5586C12,8.2451,11.9061,7.9548,11.748,7.7109z","police-JP":"M7.5,1A6.5,6.5,0,1,0,14,7.5,6.5,6.5,0,0,0,7.5,1Zm2.6,2.84L7.5,6.44,4.9,3.84A4.4428,4.4428,0,0,1,10.1,3.84ZM3.84,4.9007,6.4394,7.5l-2.6,2.5993A4.4429,4.4429,0,0,1,3.84,4.9007ZM4.9,11.16l2.6-2.6,2.6,2.6A4.4428,4.4428,0,0,1,4.9,11.16Zm6.26-1.0606L8.5606,7.5l2.6-2.5993a4.4429,4.4429,0,0,1-.0006,5.1986Z",post:"M13.5 3.65139C13.5 3.86918 13.3912 4.07257 13.2099 4.19338L7.5 8L1.79006 4.19338C1.60885 4.07257 1.5 3.86918 1.5 3.65139C1.5 3.29164 1.79164 3 2.15139 3L12.8486 3C13.2084 3 13.5 3.29164 13.5 3.65139Z M13.5 5.96713V11C13.5 11.5523 13.0523 12 12.5 12H2.5C1.94772 12 1.5 11.5523 1.5 11L1.5 5.96713C1.5 5.76746 1.72254 5.64836 1.88868 5.75912L7.5 9.5L13.1113 5.75912C13.2775 5.64836 13.5 5.76746 13.5 5.96713Z","post-JP":"m1.5 4c0-.26522.10536-.51957.29289-.70711.18754-.18753.44189-.29289.70711-.29289h10c.2652 0 .5196.10536.7071.29289.1875.18754.2929.44189.2929.70711s-.1054.51957-.2929.70711c-.1875.18753-.4419.29289-.7071.29289h-10c-.26513 0-.51941-.10529-.70693-.29272-.18752-.18742-.29294-.44165-.29307-.70678zm11 2.5h-10c-.26522 0-.51957.10536-.70711.29289-.18753.18754-.29289.44189-.29289.70711s.10536.51957.29289.70711c.18754.18753.44189.29289.70711.29289h4v4.5c0 .2652.10536.5196.29289.7071.18754.1875.44189.2929.70711.2929s.51957-.1054.70711-.2929c.18753-.1875.29289-.4419.29289-.7071v-4.5h4c.2652 0 .5196-.10536.7071-.29289.1875-.18754.2929-.44189.2929-.70711s-.1054-.51957-.2929-.70711c-.1875-.18753-.4419-.29289-.7071-.29289z",prison:"M3.5,1v13H12V1H3.5z M9.5,2H11v3.5H9.5V2z M4.5,2.0547H6V7H4.5V2.0547z M7,2.0547h1.5V7H7V2.0547z M10.25,6.5 C10.6642,6.5,11,6.8358,11,7.25S10.6642,8,10.25,8l0,0C9.8358,8,9.5,7.6642,9.5,7.25l0,0C9.5,6.8358,9.8358,6.5,10.25,6.5z M7,8 h1.4727L8.5,13H7.0273L7,8z M4.5,8.166H6V13H4.5V8.166z M9.5,9H11v4H9.5V9z",racetrack:"M4.99321 1.58228C5.03861 1.30989 4.8546 1.05228 4.58222 1.00688C4.30983 0.961484 4.05222 1.14549 4.00682 1.41788L2.00682 13.4179C1.96142 13.6903 2.14543 13.9479 2.41782 13.9933C2.6902 14.0387 2.94782 13.8547 2.99321 13.5823L3.6632 9.56238C4.46947 9.67976 5.3398 9.7187 6.026 10.2C6.45057 10.505 6.94151 10.7047 7.45839 10.7828C8.424 10.9286 9.28807 10.3976 10.242 10.549L11.531 10.743C11.7908 10.7822 12.0609 10.5828 12.1 10.323L12.984 4.38899L12.988 4.38499C13.0241 4.12469 12.8213 3.85686 12.561 3.82099L11.272 3.62699C10.3092 3.48421 9.44342 3.9997 8.48942 3.85618C8.06155 3.79181 7.65443 3.62915 7.3 3.38099C6.56128 2.86385 5.68119 2.77814 4.81426 2.656L4.99321 1.58228ZM4.40351 5.12049L4.73218 3.14849C5.33161 3.22962 5.96556 3.27693 6.521 3.51699L6.22626 5.48223C5.65576 5.24949 5.01279 5.2037 4.40351 5.12049ZM3.74549 9.0686L4.07436 7.09542C4.69451 7.18147 5.35159 7.22405 5.933 7.46299L6.23273 5.48673C6.89067 5.75614 7.3918 6.21952 8.126 6.32799L8.426 4.34799C9.16402 4.45947 9.77459 4.17131 10.484 4.11399L10.184 6.07999C9.47389 6.1406 8.85956 6.44062 8.124 6.32999L7.83802 8.30784C7.10186 8.19874 6.59996 7.73286 5.939 7.46399L5.639 9.43999C5.04421 9.20148 4.3764 9.15882 3.74549 9.0686ZM7.83898 8.30813C8.57282 8.41936 9.19002 8.11708 9.9 8.05799L10.184 6.07999C10.8385 6.01968 11.5087 6.19133 12.152 6.28899L11.872 8.26499C11.2277 8.16793 10.5563 7.99624 9.901 8.05799L9.601 10.034C8.89229 10.0817 8.26589 10.3943 7.539 10.284L7.83898 8.30813Z","racetrack-boat":"m10.0643 11.2159c.4691-.5125.9358-1.0224 1.5938-1.2417.9212-.3071 1.5902.0778 1.8665.2805.7241.531 1.3904-.2204.5914-.8064-.4269-.3131-1.4451-.86577-2.7741-.4228-.7202.2401-1.2127.7667-1.70487 1.2931-.40012.4279-.80009.8556-1.32212 1.1291-.61911.3243-1.06486-.0266-1.06486-.6352v-.0121c.00021-.7982-.40819-1.3004-1.25-1.3004-.49071 0-.99216.2582-1.50001.5-1.17511.5596-2.31799 1.2859-3.31714 2.1134-.210639.1751-.243189.4951-.06696.7066.2505.3006.58076.1621.82938-.0379.41361-.3329 1.78116-1.3913 2.93376-1.94.47652-.227.86169-.3421 1.12097-.3421.24997 0 .24997.1016.24997.3396-.00202 1.3264 1.29025 2.1428 2.52893 1.4939.50415-.2641.89557-.6917 1.28535-1.1176zm-7.56426-2.2159c1.5-1 3.25492-2 5-2 .75 0 .75.375.75.75s0 .75.75.75c2.52746 0 5.36316-3.21377 5.49996-5.5l-2.5 1-2.34195-.97445c-.61176-.20392-.92799.74476-.31623.94868l1.15818.52577-1.49996.5-4-1.25c-.23606-.07869-.38872.02744-.5.25l-1.5 3-2.00004 1zm2.5-7c0-.5523.4477-1 1-1s1 .4477 1 1-.4477 1-1 1-1-.4477-1-1z","racetrack-cycling":"M8 1L11 4H12C14 4 14 1 12 1H8ZM8.463 3C8.34323 3.00901 8.2307 3.06084 8.146 3.146L5.646 5.646C5.59615 5.69579 5.55739 5.75555 5.53225 5.82136C5.50711 5.88718 5.49617 5.95757 5.50014 6.02791C5.5041 6.09825 5.52289 6.16696 5.55526 6.22953C5.58764 6.2921 5.63287 6.34713 5.688 6.391L7.846 8.117L6.57 10.242C6.50157 10.356 6.48125 10.4926 6.51351 10.6216C6.54577 10.7506 6.62796 10.8616 6.742 10.93C6.85604 10.9984 6.9926 11.0187 7.12162 10.9865C7.25065 10.9542 7.36157 10.872 7.43 10.758L8.93 8.258C8.99256 8.15404 9.01519 8.03088 8.99366 7.91148C8.97214 7.79207 8.90793 7.68457 8.813 7.609L7.304 6.402L9 4.707L10.146 5.854C10.1925 5.9004 10.2477 5.93718 10.3085 5.96223C10.3692 5.98728 10.4343 6.00012 10.5 6H13C13.1326 6 13.2598 5.94732 13.3536 5.85355C13.4473 5.75979 13.5 5.63261 13.5 5.5C13.5 5.36739 13.4473 5.24021 13.3536 5.14645C13.2598 5.05268 13.1326 5 13 5H10.707L8.854 3.146C8.80319 3.09493 8.74195 3.05545 8.67446 3.03025C8.60698 3.00505 8.53484 2.99473 8.463 3ZM2.949 7C2.16222 7.01338 1.4122 7.33534 0.860573 7.89651C0.308947 8.45767 -0.000113683 9.21311 3.13683e-08 10C3.13683e-08 10.7956 0.316071 11.5587 0.87868 12.1213C1.44129 12.6839 2.20435 13 3 13C3.79565 13 4.55871 12.6839 5.12132 12.1213C5.68393 11.5587 6 10.7956 6 10C6.00006 9.60179 5.92083 9.20756 5.76695 8.84028C5.61307 8.47301 5.38761 8.14004 5.10372 7.8608C4.81982 7.58157 4.48318 7.36164 4.11341 7.21385C3.74364 7.06606 3.34815 6.99336 2.95 7H2.949ZM11.949 7C11.1622 7.01338 10.4122 7.33534 9.86057 7.89651C9.30895 8.45767 8.99989 9.21311 9 10C9 10.7956 9.31607 11.5587 9.87868 12.1213C10.4413 12.6839 11.2044 13 12 13C12.7956 13 13.5587 12.6839 14.1213 12.1213C14.6839 11.5587 15 10.7956 15 10C15.0001 9.60179 14.9208 9.20756 14.767 8.84028C14.6131 8.47301 14.3876 8.14004 14.1037 7.8608C13.8198 7.58157 13.4832 7.36164 13.1134 7.21385C12.7436 7.06606 12.3482 6.99336 11.95 7H11.949ZM12.049 8C12.5709 8.01279 13.0671 8.22914 13.4316 8.60283C13.7962 8.97653 14.0002 9.47795 14 10C14 10.5304 13.7893 11.0391 13.4142 11.4142C13.0391 11.7893 12.5304 12 12 12C11.4696 12 10.9609 11.7893 10.5858 11.4142C10.2107 11.0391 10 10.5304 10 10C9.99992 9.73318 10.0532 9.46904 10.1568 9.22314C10.2603 8.97724 10.4121 8.75455 10.603 8.56818C10.7939 8.3818 11.0202 8.23552 11.2686 8.13794C11.5169 8.04036 11.7823 7.99346 12.049 8V8Z","racetrack-horse":"M10 1C9.73478 1 9.48043 1.10536 9.29289 1.29289C9.10536 1.48043 9 1.73478 9 2C9 2.26522 9.10536 2.51957 9.29289 2.70711C9.48043 2.89464 9.73478 3 10 3C10.2652 3 10.5196 2.89464 10.7071 2.70711C10.8946 2.51957 11 2.26522 11 2C11 1.73478 10.8946 1.48043 10.7071 1.29289C10.5196 1.10536 10.2652 1 10 1ZM5.5 3C5.25 3 4.5 3 5 3.75L6.25 6H4.5C4.223 6.003 3.983 6.1 3.75 6.25C2.944 5.121 2.242 5.552 1.51 6C1.107 6.247 0.694 6.499 0.25 6.5C0.184332 6.50201 0.121902 6.52899 0.0754461 6.57545C0.0289898 6.6219 0.00200653 6.68433 0 6.75C0.00200653 6.81567 0.0289898 6.8781 0.0754461 6.92455C0.121902 6.97101 0.184332 6.99799 0.25 7C0.626 7.02 1.057 6.907 1.488 6.793C2.144 6.62 2.798 6.448 3.254 6.75C3.16 6.937 3 7.5 3 8L2.998 9.51C2.792 9.714 2.619 9.633 2.443 9.55C2.303 9.485 2.16 9.42 2 9.5L1 12.45C1 12.7 1.393 12.752 1.5 12.5L2.25 10.744C2.998 10.744 4.5 10 5 9L9 10L11.5 12.5C11.697 12.697 12.12 12.362 11.96 12.115L10 9L12 6.5C12.248 7 12.495 7 12.986 7H13L13.6 7.75C13.988 8.235 14.82 7.743 14.5 7.25L12.834 4.79L13 4.5C13.062 4.313 12.637 3.924 12.5 4L10.5 5.5L8.89 3.187C8.84314 3.12862 8.78377 3.08151 8.71627 3.04915C8.64877 3.01678 8.57486 2.99999 8.5 3H5.5ZM9 5.25L9.5 6L6.777 7.916C6.72243 7.95469 6.66065 7.98204 6.59532 7.99643C6.52999 8.01081 6.46244 8.01194 6.39666 7.99975C6.33089 7.98756 6.26823 7.96229 6.2124 7.92545C6.15656 7.8886 6.10869 7.84093 6.07162 7.78525C6.03454 7.72957 6.00901 7.66701 5.99655 7.60129C5.98409 7.53556 5.98494 7.46801 5.99905 7.40262C6.01317 7.33723 6.04026 7.27534 6.07873 7.22061C6.1172 7.16588 6.16626 7.11943 6.223 7.084L9 5.25Z",rail:"M 3 1 C 2.4477 1 2 1.4477 2 2 L 2 10 C 2 10.5523 2.4477 11 3 11 L 12 11 C 12.5523 11 13 10.5523 13 10 L 13 2 C 13 1.4477 12.5523 1 12 1 L 3 1 z M 5.75 1.5 L 5.7597656 1.5 L 9.2597656 1.5 C 9.3978656 1.5 9.5097656 1.6119 9.5097656 1.75 C 9.5097656 1.8881 9.3978656 2 9.2597656 2 L 5.75 2 C 5.6119 2 5.5 1.8881 5.5 1.75 C 5.5 1.6119 5.6119 1.5 5.75 1.5 z M 3.5 3 L 7 3 L 7 7 L 3.5 7 C 3.2239 7 3 6.7761 3 6.5 L 3 3.5 C 3 3.2239 3.2239 3 3.5 3 z M 8 3 L 11.5 3 C 11.7761 3 12 3.2239 12 3.5 L 12 6.5 C 12 6.7761 11.7761 7 11.5 7 L 8 7 L 8 3 z M 5 8 C 5.5523 8 6 8.4477 6 9 C 6 9.5523 5.5523 10 5 10 C 4.4477 10 4 9.5523 4 9 C 4 8.4477 4.4477 8 5 8 z M 10 8 C 10.5523 8 11 8.4477 11 9 C 11 9.5523 10.5523 10 10 10 C 9.4477 10 9 9.5523 9 9 C 9 8.4477 9.4477 8 10 8 z M 10.445312 11.994141 C 10.380597 11.999652 10.314981 12.018581 10.253906 12.050781 C 10.030606 12.168381 9.9302313 12.433922 10.019531 12.669922 L 10.189453 13 L 4.8105469 13 L 4.9394531 12.730469 C 5.0371531 12.472169 4.9067375 12.183637 4.6484375 12.085938 C 4.4124375 11.996738 4.1468969 12.097113 4.0292969 12.320312 L 3.0292969 14.320312 C 3.0080969 14.377912 2.9986 14.4387 3 14.5 C 3 14.7761 3.2239 15 3.5 15 C 3.6802 14.999 3.8450875 14.899434 3.9296875 14.740234 L 3.9296875 14.689453 L 4 14.689453 L 4.3105469 14 L 10.689453 14 L 11 14.689453 L 11 14.740234 C 11.0846 14.899434 11.249488 14.999 11.429688 15 C 11.705787 15 11.929688 14.7761 11.929688 14.5 C 11.949587 14.4212 11.949587 14.338566 11.929688 14.259766 L 10.929688 12.259766 C 10.833163 12.076541 10.639459 11.977608 10.445312 11.994141 z","rail-light":"M5.5,0C5,0,5,0.5,5,0.5v1C5,1.777,5.223,2,5.5,2S6,1.777,6,1.5V1h1v2H6c0,0-2,0-2,2v3c0,3,3,3,3,3h1 c0,0,3,0,3-3V5c0-2-2-2-2-2H8V1h1v0.5C9,1.777,9.223,2,9.5,2S10,1.777,10,1.5v-1C10,0,9.5,0,9.5,0H5.5z M7.5,4l2.0449,0.7734L10,6.5 C10.1316,7,9.5,7,9.5,7h-4c0,0-0.6316,0-0.5-0.5l0.4551-1.7266L7.5,4z M7.5,8C7.7761,8,8,8.2239,8,8.5S7.7761,9,7.5,9 S7,8.7761,7,8.5S7.2239,8,7.5,8z M4.125,12L3,15h1.5l0.375-1h5.25l0.375,1H12l-1.125-3h-1.5l0.375,1h-4.5l0.375-1H4.125z","rail-metro":"M5.5,0c0,0-0.75,0-1,1L3,6.5V10c0,1,1,1,1,1h7c0,0,1,0,1-1V6.5L10.5,1c-0.2727-1-1-1-1-1H5.5z M6.5,1.5h2 c0,0,0.5357,0,0.75,1L10,6c0.2146,1.0017-1,1-1,1H6c0,0-1.2146,0.0017-1-1l0.75-3.5C5.9643,1.5,6.5,1.5,6.5,1.5z M5,8 c0.5523,0,1,0.4477,1,1s-0.4477,1-1,1S4,9.5523,4,9S4.4477,8,5,8z M6.75,8h1.5C8.3885,8,8.5,8.1115,8.5,8.25S8.3885,8.5,8.25,8.5 h-1.5C6.6115,8.5,6.5,8.3885,6.5,8.25S6.6115,8,6.75,8z M10,8c0.5523,0,1,0.4477,1,1s-0.4477,1-1,1S9,9.5523,9,9S9.4477,8,10,8z M4.125,12L3,15h1.5l0.375-1h5.25l0.375,1H12l-1.125-3h-1.5l0.375,1h-4.5l0.375-1H4.125z","ranger-station":"M9,0.5l-2,1v3.7734L2,8v6h4v-4h3 v4h4V8L8,5.2734V4l1-0.5l2,1l2-1v-3l-2,1L9,0.5z",recycling:"M2.4556,8.6134C2.118,9.2112,1.501,10.3021,2.593,11.0312c0.3432,0.2268,0.7275,0.3836,1.131,0.4614 C4.0314,11.5382,4.0466,12.0111,3.6855,12c-0.3849-0.0193-2.2596-0.1934-2.5606-1.5995c-0.1556-0.8213,0.0204-1.5571,0.504-2.3556 L2.3263,6.812L1.0196,6.0688L4.5,4v4L3.1941,7.3057L2.4556,8.6134z M6.7,2.034c1.155-0.628,1.823,0.43,2.191,1.007l0.8059,1.2631 L8.431,5.112L12,6.986L11.803,2.96l-1.2639,0.8066L9.779,2.578C9.2572,1.8321,8.875,1.2812,7.944,1.033 C6.307,0.7203,5.3007,2.6194,5.311,2.607c-0.1639,0.2871,0.2156,0.5399,0.451,0.21C6.0202,2.4969,6.339,2.2309,6.7,2.034z M13.294,8.221c-0.0877-0.1897-0.5487-0.1413-0.419,0.267c0.1312,0.3892,0.1845,0.8003,0.157,1.21C12.939,11.01,11.684,11,11,11H9.5 V9.5l-3.5,2l3.488,2.025L9.4926,12H11c0.8906,0.0153,1.5999-0.1759,2.2-0.713C14.4,10.226,13.294,8.221,13.294,8.221z","religious-buddhist":"M13.4978,6.9989h-0.5329c-0.09997-1.10708-0.53528-2.15731-1.2478-3.0105l0.378-0.3784 c0.19605-0.19447,0.19733-0.51105,0.00286-0.7071C11.90698,2.71037,11.59733,2.70518,11.4,2.8912l0,0l-0.0123,0.0123L11.01,3.2815 c-0.85331-0.71298-1.90385-1.14864-3.0113-1.2488V1.5c0-0.27614-0.22386-0.5-0.5-0.5s-0.5,0.22386-0.5,0.5v0.5327 C5.8916,2.13306,4.84144,2.56871,3.9884,3.2815L3.61,2.9C3.41007,2.70952,3.09358,2.71717,2.9031,2.9171 c-0.184,0.19312-0.184,0.49668,0,0.6898l0.3784,0.3775C2.56787,4.83856,2.13216,5.89031,2.0327,6.9989H1.5 c-0.27614,0-0.5,0.22386-0.5,0.5s0.22386,0.5,0.5,0.5h0.5327c0.09987,1.10695,0.535,2.15711,1.2473,3.0103l-0.3779,0.3779 c-0.19538,0.19514-0.19557,0.51173-0.00043,0.70711c0.19053,0.19076,0.49798,0.19611,0.69503,0.01209L3.609,12.094l0.3779-0.3779 c0.8533,0.71312,1.90395,1.1488,3.0115,1.2488v0.5329c0,0.27614,0.22386,0.5,0.5,0.5s0.5-0.22386,0.5-0.5v-0.5329 c1.10719-0.10026,2.15744-0.53592,3.0105-1.2488l0.3779,0.3779c0.19514,0.19538,0.51173,0.19557,0.70711,0.00043 c0.19076-0.19053,0.19611-0.49798,0.01209-0.69503l-0.0123-0.0123l0,0l-0.3779-0.3779c0.71283-0.8531,1.14848-1.90333,1.2488-3.0105 h0.5329c0.27609-0.00544,0.49549-0.23366,0.49006-0.50975C13.98227,7.22064,13.76611,7.00435,13.4978,6.9989z M7.9987,3.0505 c0.83871,0.09248,1.63383,0.42154,2.2926,0.9488l-2.15,2.15c-0.04663-0.0218-0.09436-0.04116-0.143-0.058V3.0505H7.9987z M6.9987,3.0505V6.091c-0.04864,0.01684-0.09637,0.0362-0.143,0.058l-2.15-2.15c0.65897-0.52726,1.45431-0.85622,2.2932-0.9485 H6.9987z M3.9987,4.7062l2.15,2.15c-0.0218,0.04663-0.04116,0.09436-0.058,0.143H3.0505 c0.09243-0.83886,0.42154-1.63413,0.9489-2.293L3.9987,4.7062z M3.0505,7.9987H6.091c0.01687,0.04863,0.03623,0.09636,0.058,0.143 l-2.15,2.15C3.47173,9.63281,3.14276,8.83753,3.0505,7.9987z M6.9989,11.9471c-0.83871-0.09248-1.63383-0.42154-2.2926-0.9488 l2.15-2.15c0.04663,0.0218,0.09436,0.04116,0.143,0.058v3.0405L6.9989,11.9471z M7.9989,11.9471V8.9066 c0.04864-0.01683,0.09638-0.03619,0.143-0.058l2.15,2.15c-0.65895,0.5273-1.4543,0.85627-2.2932,0.9485H7.9989z M10.9989,10.2914 l-2.15-2.15c0.02177-0.04664,0.04113-0.09437,0.058-0.143h3.0415c-0.09276,0.83901-0.42232,1.6343-0.9502,2.293H10.9989z M8.9066,6.9989c-0.01684-0.04864-0.0362-0.09637-0.058-0.143l2.15-2.15c0.52726,0.65877,0.85632,1.45389,0.9488,2.2926H8.9066 V6.9989z","religious-christian":"M6,0.9552V4H3v3h3v8h3V7h3V4H9V1 c0-1-0.9776-1-0.9776-1H6.9887C6.9887,0,6,0,6,0.9552z","religious-jewish":"M7.50049 0.5L5.49949 4H1L3.49949 7.5L1 11H5.49949L7.50049 14.5L9.50049 11H14L11.5005 7.5L14 4H9.50049L7.50049 0.5Z","religious-muslim":"M12.0962 12.0962C9.55779 14.6346 5.44221 14.6346 2.90381 12.0962C0.365398 9.55779 0.365398 5.44221 2.90381 2.90381C5.44221 0.365398 9.55779 0.365398 12.0962 2.90381C12.2675 3.07512 12.4273 3.25362 12.5754 3.43832C10.5566 1.86336 7.63341 2.00437 5.77643 3.86135C3.76685 5.87092 3.76685 9.12908 5.77643 11.1387C7.63341 12.9956 10.5566 13.1366 12.5754 11.5617C12.4273 11.7464 12.2675 11.9249 12.0962 12.0962Z M10.1 6.5H8L9.7 8L9 10.5L11 9L13 10.5L12.3 8L14 6.5H11.9L11 4.5L10.1 6.5Z","religious-shinto":"M12.5,2.5H2.5a.9448.9448,0,0,0-1,1,.9448.9448,0,0,0,1,1H3V12a.9448.9448,0,0,0,1,1,.9448.9448,0,0,0,1-1V8h5v4a.9448.9448,0,0,0,1,1,.9448.9448,0,0,0,1-1V4.5h.5a.9448.9448,0,0,0,1-1,.9448.9448,0,0,0-1-1ZM10,6H8V4.5h2ZM7,6H5V4.5H7Z","residential-community":"m11.8 12.5v-2.5c.7-.1 1.2-.7 1.2-1.5s-.7-1.5-1.5-1.5-1.5.7-1.5 1.5c0 .7.5 1.4 1.2 1.5v2.5h-4.2v-11.5h-5v11.5h-1v.5h13v-.5zm-5.8-2.5h-3v-1h3zm0-2h-3v-1h3zm0-2h-3v-1h3zm0-2h-3v-1h3z",restaurant:"M3.5,0l-1,5.5c-0.1464,0.805,1.7815,1.181,1.75,2L4,14c-0.0384,0.9993,1,1,1,1s1.0384-0.0007,1-1L5.75,7.5 c-0.0314-0.8176,1.7334-1.1808,1.75-2L6.5,0H6l0.25,4L5.5,4.5L5.25,0h-0.5L4.5,4.5L3.75,4L4,0H3.5z M12,0 c-0.7364,0-1.9642,0.6549-2.4551,1.6367C9.1358,2.3731,9,4.0182,9,5v2.5c0,0.8182,1.0909,1,1.5,1L10,14c-0.0905,0.9959,1,1,1,1 s1,0,1-1V0z","restaurant-bbq":"M12.0166,12.5H14.5L12,15V12.5165a1.6189,1.6189,0,0,1-1.1367.4806,1.6,1.6,0,0,1-.9931-.3448A6.7838,6.7838,0,0,1,9.8783,2.3418,1.6179,1.6179,0,0,1,12,2.462V0l2.5,2.5H12.036a1.5927,1.5927,0,0,1,.1225.1289,1.6239,1.6239,0,0,1-.2871,2.2793A3.5148,3.5148,0,0,0,10.75,7.4951a3.5578,3.5578,0,0,0,1.1465,2.6162,1.6352,1.6352,0,0,1,.2325,2.2783C12.0949,12.4315,12.0535,12.4624,12.0166,12.5ZM2.504,0l-1,5.5c-.1464.805,1.7815,1.181,1.75,2L3.004,14a.9625.9625,0,0,0,1,1,.9625.9625,0,0,0,1-1l-.25-6.5c-.0314-.8176,1.7334-1.1808,1.75-2l-1-5.5h-.5l.25,4-.75.5L4.254,0h-.5l-.25,4.5L2.754,4l.25-4Z","restaurant-noodle":"M4.457,11.9892,1,8V7H14V8l-3.4961,3.9891ZM3.9882,2.5a.5.5,0,0,0-1,0v.5671l-1.7969.3675a.25.25,0,1,0,.094.4911l1.7029-.2776v.5662l-1.75.0357a.25.25,0,0,0,0,.5l1.75.0357V5.998h1Zm9.5,1.5-7.5.2625V2.9951l7.594-1.0737a.5.5,0,0,0-.1881-.9822L5.9792,2.4555a.4963.4963,0,0,0-.991.0445v.2276l-.493.1009V3.18l.493-.08V4.2974l-.493.01v.4608L13.4882,5a.5.5,0,0,0,0-1ZM10,13H5v.5757h5Z","restaurant-pizza":"M1.393 7.931.025 7.315A14.05 14.05 0 0 1 7.764-.001l.027.07.511 1.331-.003.001a12.613 12.613 0 0 0-6.906 6.53Zm10.963 4.96L2.42 8.414a11.604 11.604 0 0 1 6.354-6.009l.003-.001.817 2.122c-.028-.002-.052-.016-.081-.016a1.062 1.062 0 1 0 .764 1.793l2.413 6.273a.249.249 0 0 1-.334.316ZM7.426 7.52a.925.925 0 1 0-1.849 0 .925.925 0 0 0 1.849 0Zm3.017 2.03a.925.925 0 1 0-.07.353.924.924 0 0 0 .07-.354Z","restaurant-seafood":"M11.433,10.0889h2.49v.75H11.8525A4.81,4.81,0,0,1,13.4751,13.14l-.71.2422a4.01,4.01,0,0,0-1.74-2.1971,1.7775,1.7775,0,0,1-1.0352.4538L8.4374,12.9852H6.5188L4.9839,11.623a2.0222,2.0222,0,0,1-1.0929-.44,4.0093,4.0093,0,0,0-1.7426,2.1988l-.71-.2422a4.8146,4.8146,0,0,1,1.622-2.3007H.99v-.75H3.4839l.8633-.6764L3.3329,7.7567a2.2738,2.2738,0,0,1-.269.0293,2.0192,2.0192,0,0,1-2.0532-2.08c0-2.08,1.979-4.16,1.979-4.16L2.2531,5.9931l1.7255-.0012L4.9913,2.9852l0,2.9956a2.0936,2.0936,0,0,1-.6993,1.4121l.8536,1.3936L5.23,8.7208a3.8669,3.8669,0,0,1,4.4784,0l.0605.0474.869-1.4152a2.1177,2.1177,0,0,1-.6433-1.3722l0-2.9956.9836,3.0067,1.7547.0012-.7367-4.4466s1.982,2.08,1.982,4.16a2.0211,2.0211,0,0,1-2.0562,2.08,2.3125,2.3125,0,0,1-.3441-.0376L10.5676,9.3945l.8407.6593C11.4212,10.0638,11.4218,10.0782,11.433,10.0889Z","restaurant-sushi":"M5.5,3C5.2239,3,5,3.2239,5,3.5H2.75C1.2265,3.5,0,4.7265,0,6.25c0,0.8274,0.3687,1.5592,0.9434,2.0625 C0.3803,8.6675,0,9.2893,0,10c0,1.0994,0.9006,2,2,2h3.5h2H10c1.0994,0,2-0.9006,2-2c0-0.4883-0.1863-0.9294-0.4805-1.2773 l2.1777,0.9629c0.3716,0.1831,0.8213,0.0303,1.0044-0.3413c0.1831-0.3716,0.0303-0.8213-0.3413-1.0044 c-0.0188-0.0093-0.038-0.0178-0.0576-0.0254l-1.8105-0.8027l1.6309-0.2715c0.4099-0.0599,0.6936-0.4408,0.6337-0.8507 c-0.0544-0.3724-0.3765-0.6469-0.7528-0.6415c-0.0426,0.0003-0.085,0.0042-0.127,0.0117l-2.1309,0.3555 C11.2595,4.9521,10.0387,3.7837,8,3.5488V3.5C8,3.2239,7.7761,3,7.5,3H5.5z M6,4h1v5v2H6V9V4z M9.5,8 c0.259,0,0.4638,0.1974,0.4902,0.4492l0.0762-0.1328c0.1385-0.2399,0.4437-0.3201,0.6836-0.1816s0.3201,0.4418,0.1816,0.6816 l-0.2578,0.4473C10.8727,9.445,11,9.7021,11,10c0,0.5626-0.4374,1-1,1H8V9h1V8.5C9,8.223,9.223,8,9.5,8z M2.4395,8.0703 c0.1934-0.0242,0.3903,0.0662,0.4941,0.2461l0.2012,0.3477C3.226,8.5647,3.3538,8.5,3.5,8.5C3.777,8.5,4,8.723,4,9h1v2H2 c-0.5626,0-1-0.4374-1-1s0.4374-1,1-1h0.1738L2.0684,8.8164C1.9299,8.5765,2.0101,8.2733,2.25,8.1348 C2.31,8.1001,2.375,8.0784,2.4395,8.0703z","road-accident":"M12.6,8.7,11.5,6.5a1.05,1.05,0,0,0-.9-.5H4.4a1.05,1.05,0,0,0-.9.5L2.4,8.7,1.16,9.852a.5.5,0,0,0-.16.366V14.5a.5.5,0,0,0,.5.5h2c.2,0,.5-.2.5-.4V14h7v.5c0,.2.2.5.4.5h2.1a.5.5,0,0,0,.5-.5V10.218a.5.5,0,0,0-.16-.366ZM4.5,7h6l1,2h-8ZM5,11.6c0,.2-.3.4-.5.4H2.4c-.2,0-.4-.3-.4-.5V10.4c.1-.3.3-.5.6-.4l2,.4c.2,0,.4.3.4.5Zm8-.1c0,.2-.2.5-.4.5H10.5c-.2,0-.5-.2-.5-.4v-.7c0-.2.2-.5.4-.5l2-.4c.3-.1.5.1.6.4ZM8,4H7L6,0H9ZM1.1,1.8,3.7.3l1.1,4L4,4.7ZM11.3.3l2.6,1.5L11,4.8l-.9-.5Z",roadblock:"M7.5 14C11.0899 14 14 11.0899 14 7.5C14 3.91015 11.0899 1 7.5 1C3.91015 1 1 3.91015 1 7.5C1 11.0899 3.91015 14 7.5 14ZM12 6V9H3V6H12Z",rocket:"m11.5547 2c-2.14407 0-5.02107 1.471-6.95307 4h-1.6016c-1.1573 0-1.8206.8638-2.277302 1.7773l-.6114 1.2227h1.443402 1.4453l1.5 1.5 1.5 1.5v1.4453 1.4434l1.2227-.6113c.9135-.4568 1.7773-1.1201 1.7773-2.2774v-1.6016c2.52897-1.932 3.99997-4.809 3.99997-6.9531v-1.4453zm-2.55467 3c.5523 0 .99997.4477.99997 1s-.44767 1-.99997 1-1-.4477-1-1 .4477-1 1-1zm-6.5 6-.5.5c-.7222.7222-1 2.5-1 2.5s1.698-.198 2.5-1l.5-.5z",school:"M5.542 3.647 3.106 3l.443-1.63a.505.505 0 0 1 .618-.352l1.46.392a.5.5 0 0 1 .355.613l-.44 1.624Zm-4.52 7.356a.496.496 0 0 1-.005-.276l1.819-6.726 2.435.647-1.819 6.726a.499.499 0 0 1-.143.237l-1.457 1.347a.152.152 0 0 1-.247-.066l-.583-1.889ZM10 5c-2.25 0-3-.75-3-3 2.25 0 3 .75 3 3Zm-1.4 7.984c-1.37.21-3.126-1.706-3.52-3.8L5.969 5.9c.399-.35.903-.533 1.419-.533a2.71 2.71 0 0 1 1.564.489.964.964 0 0 0 1.089-.01 2.438 2.438 0 0 1 1.46-.479c.77 0 1.643.489 2.05 1.201 1.536 2.696-1.194 6.709-3.144 6.417a.867.867 0 0 1-.255-.093 1.427 1.427 0 0 0-1.302 0 .866.866 0 0 1-.25.092Z","school-JP":"M12.5,2.9992h-4v-1a1,1,0,0,0-2,0v1h-4a1,1,0,0,0,0,2h.67A10.8169,10.8169,0,0,0,5.15,8.8105c.3331.4313.6594.8248.9785,1.1936a14.3825,14.3825,0,0,1-2.6074,2.117,1,1,0,1,0,.955,1.7581h0A15.65,15.65,0,0,0,7.5,11.4613a15.65,15.65,0,0,0,3.0239,2.4179,1,1,0,1,0,.9551-1.7578,14.3789,14.3789,0,0,1-2.6073-2.1171c.3191-.3688.6453-.7622.9784-1.1935a10.818,10.818,0,0,0,1.98-3.8116h.67a1,1,0,0,0,0-2ZM8.2671,7.5879c-.2614.3385-.5154.6413-.767.937-.2517-.2957-.5057-.5985-.7672-.937A9.5885,9.5885,0,0,1,5.2676,4.9992H9.7319A9.5789,9.5789,0,0,1,8.2671,7.5879Z",scooter:"M4.908,12a1.5,1.5,0,1,1-2.816,0Zm8.65-6C13.539,6,13,6,13,6V3h.351a.282.282,0,0,0,.223-.148l.268-.536a.334.334,0,0,0,.009-.066A.25.25,0,0,0,13.6,2H13V1.7a.215.215,0,0,0-.2-.2H9.25a.25.25,0,0,0,0,.5H12V6.6L7.6,10H6V7.5A.5.5,0,0,0,5.5,7H5V5H6.75a.25.25,0,0,0,0-.5L2.266,4.034c-.006,0-.01-.007-.016-.007a.25.25,0,0,0-.25.25V4.75A.25.25,0,0,0,2.25,5H3V7H2.5A1.538,1.538,0,0,0,1,8.5v2a.472.472,0,0,0,.442.5C1.461,11,7.5,11,7.5,11L10,10h3.5a.472.472,0,0,0,.5-.442C14,9.539,14,6.5,14,6.5A.472.472,0,0,0,13.558,6ZM12.5,11A1.5,1.5,0,1,0,14,12.5,1.538,1.538,0,0,0,12.5,11Z",shelter:"M13 2L1 6V8L2 7.66667V13H12V11H4V7L13 4V2Z",shoe:"M9.5,7a9.97,9.97,0,0,1-1.315-.948L6.01,3.221a.558.558,0,0,0-1,.279H5V5H3.209a.5.5,0,0,1-.357-.148S2.5,4,2,4H1.5a.5.5,0,0,0-.5.5V9H6.5c1.5,0,2,1,3.5,1h4V9.5C14,8,10.547,7.594,9.5,7Zm0,4a3.131,3.131,0,0,1-1.526-.447A4.1,4.1,0,0,0,6,10H1v1.5a.5.5,0,0,0,.5.5h4a.5.5,0,0,0,.5-.5V11a3.134,3.134,0,0,1,1.526.447A4.1,4.1,0,0,0,9.5,12h4a.5.5,0,0,0,.5-.5V11Z",shop:"m13.33 5h-1.83l-.39-2.33c-.1601-.7182-.7017-1.2905-1.41-1.49-.3493-.1124-.7131-.173-1.08-.18h-2.24c-.3669.007-.7307.0676-1.08.18-.7083.1995-1.2499.7718-1.41 1.49l-.39 2.33h-1.83c-.2761-.0017-.5013.2208-.503.497-.0003.0519.0074.1035.023.153l1.88 6.3c.1964.6246.7753 1.0496 1.43 1.05h6c.651-.0047 1.2247-.4289 1.42-1.05l1.88-6.3c.0829-.2634-.0635-.5441-.3269-.627-.0463-.0146-.0945-.0223-.1431-.023zm-8.81 0 .36-2.17c.0807-.3625.3736-.6395.74-.7.2463-.0776.5019-.1213.76-.13h2.24c.2614.0078.5205.0515.77.13.3664.0605.6593.3375.74.7l.35 2.17h-6z",skateboard:"M1.25 5.25V5H2.75V5.25C2.75 5.94036 3.30964 6.5 4 6.5H11C11.6904 6.5 12.25 5.94036 12.25 5.25V5H13.75V5.25C13.75 6.76878 12.5188 8 11 8H4C2.48122 8 1.25 6.76878 1.25 5.25ZM5 10C5 10.5523 4.55228 11 4 11 3.44772 11 3 10.5523 3 10 3 9.44772 3.44772 9 4 9 4.55228 9 5 9.44772 5 10ZM12 10C12 10.5523 11.5523 11 11 11 10.4477 11 10 10.5523 10 10 10 9.44772 10.4477 9 11 9 11.5523 9 12 9.44772 12 10Z",skiing:"M15,4.5C15,5.3284,14.3284,6,13.5,6S12,5.3284,12,4.5S12.6716,3,13.5,3S15,3.6716,15,4.5z M13.72,11.89 c-0.0623-0.1197-0.2083-0.1684-0.33-0.11c-0.6846,0.4194-1.5208,0.5111-2.28,0.25L4.78,8.86L7.5,7.5v-3L9,5.25v3L10.5,9L12,8.25 L10.5,7.5V3l-3-1.5L6,2.25v4.5L3.28,8.11L0.61,6.78C0.4857,6.7192,0.3358,6.7707,0.275,6.895C0.2142,7.0193,0.2657,7.1692,0.39,7.23 l10.5,5.25c0.3156,0.135,0.6568,0.1998,1,0.19c0.5998-0.0103,1.1889-0.161,1.72-0.44c0.1236-0.0615,0.174-0.2116,0.1125-0.3352 C13.7217,11.8932,13.7208,11.8916,13.72,11.89z",slaughterhouse:"M15 6.1c0 1.376-1.363.694-1.363.694L12.5 7H11a5.31 5.31 0 0 1-1.5 2 3.272 3.272 0 0 1-.523 1.125c-.077.091-.06.2-.068.33l.091 2.3a.264.264 0 0 1-.266.25.242.242 0 0 1-.234-.205L8 9.5H4v3.253a.247.247 0 0 1-.247.247.25.25 0 0 1-.24-.2L3 10v-.5a8.2 8.2 0 0 1-1.426-.1A1.886 1.886 0 0 1 .9 10.826c-.128.083-.148.211-.133.386l.19 1.538a.25.25 0 0 1-.25.25.238.238 0 0 1-.23-.174l-.427-1.7a.35.35 0 0 1 .055-.3c.437-.68-.049-2.55-.049-2.55A1.354 1.354 0 0 1 0 7.922V5.5a2.027 2.027 0 0 1 2.736-1.914s.1.03.142.049a15.15 15.15 0 0 0 3.814.038l.18-.062a1.842 1.842 0 0 1 1.26 0c.078.02.154.05.226.089.1.049.196.106.287.171A1.8 1.8 0 0 0 9.5 4h1V3l.5.5c.5-1.5 2.5-1 2.5-1a1.687 1.687 0 0 0-1.5 1l2.5 2a.612.612 0 0 1 .186-.069.318.318 0 0 1 .314.321V6.1Z",slipway:"m2 10 12 1.495V12H2v-2Zm12-4-1 1v.583L5.196 4.332l.063-.125L6.61 2.845h.831a.35.35 0 0 0 0-.7h-.976a.352.352 0 0 0-.248.103L4.723 3.753a.371.371 0 0 0-.066.09l-.109.219L2 3c0 2-.03 3.958 2.86 4.5C6.28 7.765 13 9 13 9l2-2-1-1Z",snowmobile:"M15 10a1 1 0 0 1-1 1H9.414a1 1 0 0 1-.707-.293L7.146 9.146A.499.499 0 0 0 6.793 9H3.334a1 1 0 0 1-.601-.2L1.386 7.788A1.013 1.013 0 0 1 1 7a.995.995 0 0 1 .472-.844L5 4l1.038-1.692A.5.5 0 0 1 7 2.5V6l1 1h1l5.412-.992a.5.5 0 0 1 .355.915L13 8l1.631 1.224A.99.99 0 0 1 15 10Zm-9.5 0H3.225c-.504 0-.999-.127-1.44-.368L.74 9.062a.5.5 0 0 0-.48.877l1.269.693c.441.242.937.368 1.44.368H5.5a.5.5 0 0 0 0-1Z",soccer:"M11,1.5C11,2.3284,10.3284,3,9.5,3S8,2.3284,8,1.5S8.6716,0,9.5,0S11,0.6716,11,1.5z M11,11c-0.5523,0-1,0.4477-1,1 s0.4477,1,1,1s1-0.4477,1-1S11.5523,11,11,11z M12.84,6.09l-1.91-1.91l0,0C10.8399,4.0675,10.7041,4.0014,10.56,4H3.5 C3.2239,4,3,4.2239,3,4.5S3.2239,5,3.5,5h2.7L3,11.3l0,0c-0.0138,0.066-0.0138,0.134,0,0.2c-0.058,0.2761,0.1189,0.547,0.395,0.605 C3.6711,12.163,3.942,11.9861,4,11.71l0,0L5,10h2l-1.93,4.24l0,0C5.0228,14.3184,4.9986,14.4085,5,14.5 c-0.0552,0.2761,0.1239,0.5448,0.4,0.6c0.2761,0.0552,0.5448-0.1239,0.6-0.4l0,0l4.7-9.38l1.44,1.48 c0.211,0.1782,0.5264,0.1516,0.7046-0.0593C13.0037,6.5523,13.0018,6.2761,12.84,6.09z",square:"M12 13H3C2.4477 13 2 12.5523 2 12V3C2 2.4477 2.4477 2 3 2H12C12.5523 2 13 2.4477 13 3V12C13 12.5523 12.5523 13 12 13Z","square-stroked":"M11.7 3.3V11.7H3.3V3.3H11.7ZM12 2H3C2.4477 2 2 2.4477 2 3V12C2 12.5523 2.4477 13 3 13H12C12.5523 13 13 12.5523 13 12V3C13 2.4477 12.5523 2 12 2Z",stadium:"M7,1v2v1.5v0.5098C4.1695,5.1037,2.0021,5.9665,2,7v4.5c0,1.1046,2.4624,2,5.5,2s5.5-0.8954,5.5-2V7 c-0.0021-1.0335-2.1695-1.8963-5-1.9902V4.0625L11,2.75L7,1z M3,8.1465c0.5148,0.2671,1.2014,0.4843,2,0.6328v2.9668 C3.7948,11.477,3,11.0199,3,10.5V8.1465z M12,8.1484V10.5c0,0.5199-0.7948,0.977-2,1.2461V8.7812 C10.7986,8.6328,11.4852,8.4155,12,8.1484z M6,8.9219C6.4877,8.973,6.9925,8.9992,7.5,9C8.0073,8.9999,8.5121,8.9743,9,8.9238 v2.9844C8.5287,11.964,8.0288,12,7.5,12S6.4713,11.964,6,11.9082V8.9219z",star:"M7.5,0l-2,5h-5l4,3.5l-2,6l5-3.5 l5,3.5l-2-6l4-3.5h-5L7.5,0z","star-stroked":"m7.5 2.69 1.07 2.68.25.63h3l-2 1.75-.5.44.23.63 1 3.13-2.48-1.77-.57-.4-.57.4-2.52 1.77 1-3.13.21-.63-.5-.44-2-1.75h3l.25-.63zm0-2.69-2 5h-5l4 3.5-2 6 5-3.5 5 3.5-2-6 4-3.5h-5z",suitcase:"M4.5 4V2C4.5 1.44772 4.94772 1 5.5 1H9.5C10.0523 1 10.5 1.44772 10.5 2V4H12C12.5523 4 13 4.44772 13 5V11C13 11.5523 12.5523 12 12 12H3C2.44771 12 2 11.5523 2 11V5C2 4.44772 2.44772 4 3 4H4.5ZM5.5 2V4H9.5V2H5.5Z",swimming:"M10.1113,2C9.9989,2,9.6758,2.1465,9.6758,2.1465L6.3535,3.8262 C5.9111,4.0024,5.7358,4.7081,6.002,5.0605l0.9707,1.4082L3.002,8.498L5,9.998l2.502-1.5l2.5,1.5l1.002-1.002l-3-4l2.5566-1.5293 c0.5286-0.2662,0.4434-0.7045,0.4434-0.9707C10.9999,2.2861,10.6437,2,10.1113,2z M12.252,5C11.2847,5,10.5,5.7827,10.5,6.75 s0.7847,1.752,1.752,1.752s1.75-0.7847,1.75-1.752S13.2192,5,12.252,5z M2.5,10L0,11.5V13l2.5-1.5L5,13l2.502-1.5l2.5,1.5L12,11.5 l3,1.5v-1.5L12,10l-1.998,1.5l-2.5-1.5L5,11.5L2.5,10z","table-tennis":"M11.9676,10.2275a3.8116,3.8116,0,0,1-1.9122.9831L3.7678,4.9338A4.0283,4.0283,0,0,1,4.7725,3.0324C7.03.7745,9.98.2235,12.3781,2.6219S14.2255,7.97,11.9676,10.2275Zm-6.987,1.6093A3.8422,3.8422,0,0,1,6.149,11.278,4.5328,4.5328,0,0,1,8,11.4452L3.5456,7a4.4126,4.4126,0,0,1,.1572,1.9223,3.6639,3.6639,0,0,1-.5208,1.1159c-1.072,1.263-2.132,1.727-2.132,2.1879A1.8378,1.8378,0,0,0,2.7739,13.95C3.2348,13.95,3.6917,12.9368,4.9806,11.8368Z",teahouse:"M8.00002 5C8.00002 5 10 4.9 10 3.4 10 2.46598 9.17751 2.20864 8.47606 1.98917 7.95458 1.82601 7.5 1.68378 7.5 1.3 7.5.386843 8 0 8 0 8 0 7 .531581 7 1.5 7 2.21063 7.54045 2.46176 8.05947 2.70292 8.53888 2.92568 9 3.13994 9 3.7 9 4.7 8.00002 5 8.00002 5ZM11.8372 6.67447C11.3755 8.62063 10.7854 11.1073 9 12V14H6V12C4.21455 11.1073 3.62454 8.62063 3.16276 6.67447 3.10728 6.44061 3.05364 6.21455 3 6H12C11.9464 6.21453 11.8927 6.44063 11.8372 6.67447ZM6.99998 4C6.99998 5 5.49998 5 5.49998 5 5.49998 5 6.29295 4.9 6.29295 4.3 6.29295 4.02526 6.01604 3.85489 5.71852 3.67184 5.37315 3.45935 5 3.22977 5 2.8 5 1.9661 5.99998 1.5 5.99998 1.5 5.99998 1.5 5.49998 1.77344 5.49998 2.5 5.49998 2.88823 5.85322 3.04095 6.21687 3.19818 6.60257 3.36494 6.99998 3.53675 6.99998 4Z",telephone:"M4.51,8.88a0.51,0.51,0,0,0,0,.72l0.72,0.72L3.07,12.5,2.7,12.13A2.24,2.24,0,0,1,2,10.69V9.24a2.24,2.24,0,0,1,.7-1.45L7.77,2.72A2.24,2.24,0,0,1,9.22,2h1.45a2.24,2.24,0,0,1,1.45.72l0.36,0.36L10.31,5.26,9.58,4.53a0.51,0.51,0,0,0-.72,0ZM4.13,13.6a1,1,0,0,0,1.4137.0363Q5.5623,13.6186,5.58,13.6l0.72-.72a1,1,0,0,0,.0363-1.4137Q6.3186,11.4477,6.3,11.43Zm7.25-7.28a1,1,0,0,0,1.4137.0363C12.8061,6.3445,13.55,5.6,13.55,5.6a1,1,0,0,0,.0363-1.4137Q13.5686,4.1677,13.55,4.15Z",tennis:"M13.1284,1.87c-1.5418-1.5406-4.5535-.7759-6.28,1.05a6.8282,6.8282,0,0,0-1.88,4.4,5.7275,5.7275,0,0,1-.57,2.72.6814.6814,0,0,0-.67.17l-2.49,2.5a.6941.6941,0,0,0,0,.98l.07.07a.7051.7051,0,0,0,.98,0l2.5-2.49a.683.683,0,0,0,.18-.66,8.5694,8.5694,0,0,1,3.12-.58,6.5487,6.5487,0,0,0,3.99-1.87C14.1084,6.13,14.579,3.3194,13.1284,1.87Zm-2.2-.04a2.3071,2.3071,0,0,1,1.64.61,2.548,2.548,0,0,1,.5,2.44l-2.95-2.96A3.8648,3.8648,0,0,1,10.9284,1.83Zm-4.57,6.81a2.6485,2.6485,0,0,1-.48-2.55l3.04,3.04A2.8522,2.8522,0,0,1,6.3584,8.64Zm2.88.39-3.26-3.27a5.1623,5.1623,0,0,1,.49-1.08l3.85,3.85A5.5093,5.5093,0,0,1,9.2384,9.03Zm1.34-.66-3.94-3.95a5.2032,5.2032,0,0,1,.74-.9l4.1,4.1A5.6869,5.6869,0,0,1,10.5784,8.37Zm1.11-.96-4.1-4.1a5.5714,5.5714,0,0,1,.84-.65l3.92,3.92A5.7187,5.7187,0,0,1,11.6884,7.41Zm.82-1.09L8.6984,2.5a4.1707,4.1707,0,0,1,1.09-.48l3.2,3.2A5.5656,5.5656,0,0,1,12.5084,6.32Z",theatre:"M2,1c0,0-1,0-1,1v5.1582C1,8.8885,1.354,11,4.5,11H5V8L2.5,9c0,0,0-2.5,2.5-2.5V5 c0-0.7078,0.0868-1.3209,0.5-1.7754C5.8815,2.805,6.5046,1.9674,8.1562,2.7539L9,3.3027V2c0,0,0-1-1-1C7.2922,1,6.0224,2,5,2 S2.7865,1,2,1z M3,3c0.5523,0,1,0.4477,1,1S3.5523,5,3,5S2,4.5523,2,4S2.4477,3,3,3z M7,4c0,0-1,0-1,1v5c0,2,1,4,4,4s4-2,4-4V5 c0-1-1-1-1-1c-0.7078,0-1.9776,1-3,1S7.7865,4,7,4z M8,6c0.5523,0,1,0.4477,1,1S8.5523,8,8,8S7,7.5523,7,7S7.4477,6,8,6z M12,6 c0.5523,0,1,0.4477,1,1s-0.4477,1-1,1s-1-0.4477-1-1S11.4477,6,12,6z M7.5,10H10h2.5c0,0,0,2.5-2.5,2.5S7.5,10,7.5,10z",toilet:"M3 1.5a1.5 1.5 0 1 0 3 0 1.5 1.5 0 0 0-3 0ZM11.5 0a1.5 1.5 0 1 1 0 3 1.5 1.5 0 0 1 0-3ZM3.29 4a1 1 0 0 0-.868.504L.566 7.752a.5.5 0 1 0 .868.496l1.412-2.472A345.048 345.048 0 0 0 1 11h2v2.5a.5.5 0 0 0 1 0V11h1v2.5a.5.5 0 0 0 1 0V11h2L6.103 5.687l1.463 2.561a.5.5 0 1 0 .868-.496L6.578 4.504A1 1 0 0 0 5.71 4H3.29ZM9 4.5a.5.5 0 0 1 .5-.5h4a.5.5 0 0 1 .5.5v5a.5.5 0 0 1-1 0v4a.5.5 0 0 1-1 0v-4h-1v4a.5.5 0 0 1-1 0v-4a.5.5 0 0 1-1 0v-5Z",toll:"M2.5 1C2.22386 1 2 1.22386 2 1.5V2V13H1.5C1.22386 13 1 13.2239 1 13.5C1 13.7761 1.22386 14 1.5 14H8.5C8.77614 14 9 13.7761 9 13.5C9 13.2239 8.77614 13 8.5 13H7V10.0987L13.7761 5.54576C14.0053 5.39175 14.0663 5.08109 13.9123 4.85189L13.6334 4.43687C13.4794 4.20766 13.1688 4.1467 12.9396 4.3007L7 8.29152V2H7.5C7.77614 2 8 1.77614 8 1.5C8 1.22386 7.77614 1 7.5 1H2.5ZM3 3.5C3 3.22386 3.22386 3 3.5 3H5.5C5.77614 3 6 3.22386 6 3.5V7.5C6 7.77614 5.77614 8 5.5 8H3.5C3.22386 8 3 7.77614 3 7.5V3.5Z",town:"m10.651 6.121c-.0445-.0357-.0999-.05516-.157-.05516s-.1125.01946-.157.05516l-2.245 1.808c-.02881.02323-.05204.05263-.06796.08603-.01593.03341-.02414.06997-.02404.10697v4.625c0 .0671.02666.1315.0741.1789.04745.0474.1118.0741.1789.0741h1.494c.0671 0 .13145-.0267.1789-.0741s.0741-.1118.0741-.1789v-1.747h1v1.747c0 .0671.0267.1315.0741.1789.0475.0474.1118.0741.1789.0741h1.494c.0671 0 .1315-.0267.1789-.0741s.0741-.1118.0741-.1789v-4.627c.0007-.03831-.0074-.07627-.0237-.11095s-.0404-.06514-.0703-.08905zm-.651 3.879h-1v-1h1zm2 0h-1v-1h1zm-6.29-9.184997c-.02299-.034654-.05419-.063081-.09083-.082746s-.07758-.029956-.11917-.029956c-.04158 0-.08252.010291-.11916.029956-.03665.019665-.06785.048092-.09084.082746l-3.248 4.120997c-.02752.0415-.04214.09021-.042.14v7.671c-.00013.0331.00626.0659.0188.0965s.031.0585.0543.082c.02331.0235.05102.0422.08154.0549.03053.0128.06327.0195.09636.0196h2.5c.06632-.0008.12964-.0277.17626-.0749.04661-.0471.07275-.1108.07274-.1771v-1.748h1v1.748c0 .0668.02655.1309.07381.1782s.11136.0738.17819.0738h.748v-6c-.00004-.07511.01684-.14926.04938-.21695.03255-.06769.07993-.12718.13862-.17405l1.812-1.609c0-.05-3.29-4.184997-3.29-4.184997zm-1.71 8.184997h-1v-1h1zm0-3h-1v-1h1zm2 3h-1v-1h1zm0-3h-1v-1h1z","town-hall":"M13,4H9l0-3L7.5,0L6,1v3H2L1,5v1h13V5L13,4z M7.5,1.5c0.4,0,0.7,0.3,0.7,0.8S7.9,3,7.5,3S6.7,2.7,6.7,2.2 C6.7,1.8,7.1,1.5,7.5,1.5z M13,7H2v4l-1,1.5V14h13v-1.5L13,11V7z M5,12.5H4V8h1V12.5z M8,12.5H7V8h1V12.5z M11,12.5h-1V8h1V12.5z",triangle:"m7.5385 1c-.2948 0-.4883.1772-.6154.3846l-5.8462 9.5385c-.0769.0769-.0769.2307-.0769.3846 0 .5385.3846.6923.6923.6923h11.6154c.3846 0 .6923-.1538.6923-.6923 0-.1538 0-.2308-.0769-.3846l-5.7693-9.5385c-.1258-.2081-.3656-.3846-.6153-.3846z","triangle-stroked":"m7.52427.500405c-.2814-.0091-.5456.1419-.6907.3948l-5.5 9.869195c-.3118.5434.0614 1.2355.6664 1.2356h11.00003c.605-.0001.9782-.6922.6664-1.2355l-5.50003-9.869195c-.1362-.2374-.378-.3861-.6421-.3949zm-.0243 2.398895 4.12673 7.4704h-8.25343z",tunnel:"M4 2C2.34315 2 1 3.32706 1 4.96406V12.012C1 12.5576 1.44772 13 2 13H3V8.55391C3 6.09839 5.01472 4.10781 7.5 4.10781C9.98528 4.10781 12 6.09842 12 8.55393V13H13C13.5523 13 14 12.5576 14 12.012V4.96406C14 3.32706 12.6569 2 11 2H4ZM11 10V9.04794C11 6.86526 9.43299 5.09583 7.5 5.09583C5.56701 5.09583 4.00001 6.86526 4 9.04794V13L11 10Z",veterinary:"M7.5,6c-2.5,0-3,2.28-3,3.47h0a6.149,6.149,0,0,0-1.7.89,2,2,0,0,0-.4,2.78,2.06,2.06,0,0,0,2.8.4,4,4,0,0,1,2.3-.69,4,4,0,0,1,2.3.69,2,2,0,0,0,2.8-.3,1.929,1.929,0,0,0-.226-2.72c-.024-.021-.049-.041-.074-.06l-.1-.1a8.992,8.992,0,0,0-1.7-.89h0C10.5,8.29,10,6,7.5,6ZM2.08,4.3a1.58,1.58,0,0,0-.76,2A1.52,1.52,0,0,0,2.93,7.7a1.58,1.58,0,0,0,.76-2A1.52,1.52,0,0,0,2.08,4.3Zm10.85,0a1.58,1.58,0,0,1,.76,2,1.52,1.52,0,0,1-1.61,1.4,1.58,1.58,0,0,1-.76-2A1.52,1.52,0,0,1,12.93,4.3Zm-7.85-3c-.68.09-1,.94-.76,1.87A1.77,1.77,0,0,0,5.93,4.7c.68-.09,1-.94.76-1.87A1.77,1.77,0,0,0,5.08,1.3Zm4.85,0c.68.09,1,.94.76,1.87A1.77,1.77,0,0,1,9.07,4.7c-.68-.08-1-.94-.76-1.87A1.769,1.769,0,0,1,9.93,1.3Z",viewpoint:"M6.02,8.425a2.3859,2.3859,0,0,0-.46.44l-4.55-3.5a7.9976,7.9976,0,0,1,1.51-1.51Zm6.46-4.56-3.5,4.55a2.3971,2.3971,0,0,1,.45.45l4.56-3.5A7.945,7.945,0,0,0,12.48,3.865ZM7.3042,10.0129a1.5,1.5,0,1,0,1.6829,1.2914h0A1.5,1.5,0,0,0,7.3042,10.0129ZM6.43,2.235a7.9329,7.9329,0,0,0-2.06.55l2.2,5.32a2.0438,2.0438,0,0,1,.61-.17Zm2.14.01-.75,5.69a2.49,2.49,0,0,1,.61.16l2.2-5.3A7.2129,7.2129,0,0,0,8.57,2.245Z",village:"M6.176 1.176a.249.249 0 0 0-.352 0l-4.4 4.4A.25.25 0 0 0 1.6 6H3v6.751a.25.25 0 0 0 .249.249h3.5A.248.248 0 0 0 7 12.753v-7.43c0-.066.026-.13.073-.176L8.5 3.5 6.176 1.176ZM6 11H5v-1h1v1Zm0-2H5V8h1v1Zm0-3v1H5V6h1Z M12.75 3h-.5a.25.25 0 0 0-.25.25V5l-1.324-1.824a.249.249 0 0 0-.352 0L8.056 5.932A.246.246 0 0 0 8 6.088v6.66a.249.249 0 0 0 .246.252h1.5a.253.253 0 0 0 .254-.252V11h1v1.747a.253.253 0 0 0 .253.253h1.5a.25.25 0 0 0 .247-.249V3.25a.25.25 0 0 0-.25-.25ZM10 8H9V7h1v1Zm2 0h-1V7h1v1Zm-2 2H9V9h1v1Zm2 0h-1V9h1v1Z",volcano:"M8.4844,1.0002 c-0.1464,0.005-0.2835,0.0731-0.375,0.1875L6.4492,3.2619L4.8438,1.7385C4.4079,1.3374,3.7599,1.893,4.0899,2.385l1.666,2.4004 C5.9472,5.061,6.3503,5.0737,6.5586,4.8108C6.7249,4.6009,7,4.133,7.5,4.133s0.7929,0.4907,0.9414,0.6777 c0.175,0.2204,0.4973,0.2531,0.7129,0.0723l1.668-1.4004c0.4408-0.3741,0.0006-1.0735-0.5273-0.8379L9,3.2268V1.5002 C9.0002,1.2179,8.7666,0.9915,8.4844,1.0002L8.4844,1.0002z M5,6.0002L2.0762,11.924C1.9993,12.0009,2,12.155,2,12.3088 c0,0.5385,0.3837,0.6914,0.6914,0.6914h9.6172c0.3846,0,0.6914-0.153,0.6914-0.6914c0-0.1538,0.0008-0.2309-0.0762-0.3848L10,6.0002 c-0.5,0-1,0.5-1,1v0.5c0,0.277-0.223,0.5-0.5,0.5S8,7.7772,8,7.5002v-0.5c0-0.2761-0.2238-0.5-0.5-0.5S7,6.7241,7,7.0002v2 c0,0.277-0.223,0.5-0.5,0.5S6,9.2772,6,9.0002v-2C6,6.5002,5.5,6.0002,5,6.0002z",volleyball:"M13.91,7.94a5.9086,5.9086,0,0,1-.13.94,8.8218,8.8218,0,0,0-2.17-1.49,8.89,8.89,0,0,0-1.4-.56,8.6142,8.6142,0,0,0-1.82-.35.221.221,0,0,0-.08-.01A7.32,7.32,0,0,1,7.5,4.59c-.01-.01-.01-.01,0-.02a7.7573,7.7573,0,0,1,1.52.15,7.0987,7.0987,0,0,1,1.56.5,6.8585,6.8585,0,0,1,1.4.78A7.4165,7.4165,0,0,1,13.91,7.94Zm-1.87-5a6.2232,6.2232,0,0,0-1.85-1.27,4.2725,4.2725,0,0,0-.98-.36,5.6412,5.6412,0,0,0-1.55-.23,1.2882,1.2882,0,0,0-.32,0A7.4263,7.4263,0,0,0,7.21,2.5c0,.2.01.39.02.58a2.28,2.28,0,0,1,.26-.01,2.6438,2.6438,0,0,1,.28.01,8.2865,8.2865,0,0,1,1.49.16,8.9879,8.9879,0,0,1,1.35.37,8.7922,8.7922,0,0,1,1.53.7,10.18,10.18,0,0,1,1.39.97A6.4588,6.4588,0,0,0,12.04,2.94ZM4.01,8.76a9.4084,9.4084,0,0,1-.62-1.37,9.1038,9.1038,0,0,1-.37-1.41,9.1748,9.1748,0,0,1-.16-1.67V4.28a8.455,8.455,0,0,1,.1-1.34A6.28,6.28,0,0,0,1.47,5.3a6.2222,6.2222,0,0,0-.4,2.2c0,.15.01.3.02.44a5.9086,5.9086,0,0,0,.13.94,5.7343,5.7343,0,0,0,.41,1.23c.22-.05.44-.11.65-.17a8.0188,8.0188,0,0,0,1.9-.88C4.12,8.96,4.06,8.86,4.01,8.76Zm2.6-2.28a9,9,0,0,1-.63-1.76,9.135,9.135,0,0,1-.24-1.48c-.02-.25-.03-.49-.03-.74a9.3777,9.3777,0,0,1,.08-1.19,4.2725,4.2725,0,0,0-.98.36,7.7038,7.7038,0,0,0-.42,1.94c-.02.22-.03.44-.03.67a7.2659,7.2659,0,0,0,.06.93,7.4258,7.4258,0,0,0,.37,1.63,6.4705,6.4705,0,0,0,.59,1.28A8.0174,8.0174,0,0,0,6.65,6.55.2522.2522,0,0,1,6.61,6.48ZM12.7,9.93s0-.01-.01,0a7.0128,7.0128,0,0,0-1.7-1.16c-.06.1-.11.19-.17.29a8.783,8.783,0,0,1-.88,1.22,8.9125,8.9125,0,0,1-1.06,1.07,10.4181,10.4181,0,0,1-1.38.98,8.9933,8.9933,0,0,1-2.64,1.02,6.2985,6.2985,0,0,0,5.28,0,5.9674,5.9674,0,0,0,2.42-1.89,4.8258,4.8258,0,0,0,.65-1.03A6.0315,6.0315,0,0,0,12.7,9.93Zm-5.17-2c-.01.01-.02.03-.03.04a9.26,9.26,0,0,1-1.25,1.4,9.5925,9.5925,0,0,1-1.19.91,9.2683,9.2683,0,0,1-2.62,1.18,6.0989,6.0989,0,0,0,.53.61,7.7353,7.7353,0,0,0,3.15-.72,7.3839,7.3839,0,0,0,1.38-.82A7.6429,7.6429,0,0,0,8.75,9.37a7.7441,7.7441,0,0,0,.82-1.15A7.3414,7.3414,0,0,0,7.53,7.93Z",warehouse:"M13.5,5c-0.0762,0.0003-0.1514-0.0168-0.22-0.05L7.5,2L1.72,4.93C1.4632,5.0515,1.1565,4.9418,1.035,4.685 S1.0232,4.1215,1.28,4L7.5,0.92L13.72,4c0.2761,0.0608,0.4508,0.3339,0.39,0.61C14.0492,4.8861,13.7761,5.0608,13.5,5z M5,10H2v3h3 V10z M9,10H6v3h3V10z M13,10h-3v3h3V10z M11,6H8v3h3V6z M7,6H4v3h3V6z","waste-basket":"M12.41,5.58l-1.34,8c-0.0433,0.2368-0.2493,0.4091-0.49,0.41H4.42c-0.2407-0.0009-0.4467-0.1732-0.49-0.41l-1.34-8 C2.5458,5.3074,2.731,5.0506,3.0035,5.0064C3.0288,5.0023,3.0544,5.0002,3.08,5h8.83c0.2761-0.0036,0.5028,0.2174,0.5064,0.4935 C12.4168,5.5225,12.4146,5.5514,12.41,5.58z M13,3.5C13,3.7761,12.7761,4,12.5,4h-10C2.2239,4,2,3.7761,2,3.5S2.2239,3,2.5,3H5V1.5 C5,1.2239,5.2239,1,5.5,1h4C9.7761,1,10,1.2239,10,1.5V3h2.5C12.7761,3,13,3.2239,13,3.5z M9,3V2H6v1H9z",watch:"M12.5,7H12a.426.426,0,0,0-.049.01A4.484,4.484,0,0,0,10,3.76V1.5A.5.5,0,0,0,9.5,1h-4a.5.5,0,0,0-.5.5V3.76a4.5,4.5,0,0,0,0,7.48V13.5a.5.5,0,0,0,.5.5h4a.5.5,0,0,0,.5-.5V11.24a4.486,4.486,0,0,0,1.951-3.25A.426.426,0,0,0,12,8h.5a.5.5,0,0,0,0-1Zm-5,4A3.5,3.5,0,1,1,11,7.5,3.5,3.5,0,0,1,7.5,11ZM9,7H8V5.5a.5.5,0,0,0-1,0v2a.5.5,0,0,0,.5.5H9A.5.5,0,0,0,9,7Z",water:"M7.5 14C9.57688 14 12 12.7117 12 9.43241C12 7.20724 8.53844 2.2883 7.5 1C6.57691 2.2883 3 7.09007 3 9.43241C3 12.7117 5.42312 14 7.5 14Z",waterfall:"M14 1H5C3.34315 1 2 2.34314 2 4V8.87918C1.39704 9.28261 1 9.96937 1 10.75C1 11.9927 2.00736 13 3.25 13C3.7127 13 4.14279 12.8599 4.5 12.6209C4.85721 12.8599 5.2873 13 5.75 13C6.28601 13 6.77826 12.812 7.16413 12.5H7.51743C8.01909 12.8165 8.61403 13 9.25 13C11.0449 13 12.5 11.5449 12.5 9.75002C12.5 8.39777 11.6747 7.23919 10.5 6.74934V5C10.5 3.89543 11.3954 3 12.5 3H14V1ZM11.5 9.75C11.5 10.9926 10.4926 12 9.25 12C8.71418 12 8.2221 11.8127 7.83567 11.5H6.75009C6.52204 11.8036 6.15895 12 5.75 12C5.34105 12 4.97796 11.8036 4.74991 11.5H4.25009C4.02204 11.8036 3.65895 12 3.25 12C2.55964 12 2 11.4404 2 10.75C2 10.1453 2.42944 9.64082 3 9.525V5.75C3 5.33579 3.33579 5 3.75 5C4.16421 5 4.5 5.33579 4.5 5.75V9C4.5 9.27614 4.72386 9.5 5 9.5C5.27614 9.5 5.5 9.27614 5.5 9V6.75C5.5 6.33579 5.83579 6 6.25 6C6.66421 6 7 6.33579 7 6.75V9C7 9.27614 7.22386 9.5 7.5 9.5C7.77614 9.5 8 9.27614 8 9V5.75C8 5.33579 8.33579 5 8.75 5C9.16421 5 9.5 5.33579 9.5 5.75V7.51373C10.625 7.63809 11.5 8.59186 11.5 9.75Z",watermill:"M2,10.2L4,9l2.5,1.5l1.4659-0.8788C7.6592,9.4698,7.3716,9.285,7.1231,9.0536l1.4131-1.4131 C8.7672,7.836,9.0557,7.9606,9.375,7.9874V9.224l0.25,0.1501V7.9874c0.3193-0.0268,0.6078-0.1514,0.8388-0.3469l1.4131,1.4131 c-0.4059,0.3781-0.9044,0.6492-1.4528,0.8003L11.5,10.5l0.6984-0.4191C13.2863,9.2595,14,7.9682,14,6.5C14,4.0147,11.9853,2,9.5,2 C8.1917,2,7.0241,2.5674,6.2018,3.4587L4.5,2L1,5h1V10.2z M12.0536,8.8769l-1.4131-1.4131c0.1954-0.231,0.3201-0.5196,0.3469-0.8388 h1.9999C12.956,7.4946,12.6089,8.2806,12.0536,8.8769z M12.9874,6.375h-1.9999c-0.0268-0.3193-0.1514-0.6078-0.3469-0.8388 l1.4131-1.4131C12.6089,4.7193,12.956,5.5054,12.9874,6.375z M9.625,3.0126c0.8696,0.0314,1.6557,0.3784,2.2519,0.9337 l-1.4131,1.4131c-0.231-0.1954-0.5196-0.32-0.8388-0.3468C9.625,5.0126,9.625,3.0126,9.625,3.0126z M9.375,3.0126v1.9999 C9.0558,5.0394,8.7672,5.164,8.5362,5.3594L7.1231,3.9463C7.7193,3.3911,8.5054,3.044,9.375,3.0126z M6.9464,4.1231l1.4131,1.4131 C8.164,5.7672,8.0394,6.0557,8.0126,6.375h-2C6.044,5.5054,6.3911,4.7193,6.9464,4.1231z M8.0126,6.625 c0.0268,0.3192,0.1515,0.6078,0.3469,0.8388L6.9464,8.8769C6.3911,8.2807,6.044,7.4946,6.0126,6.625H8.0126z M9.002,10L6.5,11.5 L4,10l-2.5,1.5V13L4,11.5L6.5,13l2.502-1.5L11.5,13l2.5-1.5V10l-2.5,1.5L9.002,10z",wetland:"M1.48,4.5C1.905,4.1467,2.4483,3.968,3,4c1.2273-0.0869,2.3154,0.7836,2.5,2l0.78,4.68c-0.6394-0.2893-1.3759-0.2709-2,0.05 L3.48,6C3.1874,5.1347,2.3926,4.5387,1.48,4.5z M7.48,11.24c0.3816-0.3076,0.825-0.5293,1.3-0.65L10,3 c0.2926-0.8653,1.0874-1.4613,2-1.5c-0.4198-0.3485-0.955-0.5269-1.5-0.5C9.2727,0.9131,8.1846,1.7836,8,3l-1.3,7.79 C6.9786,10.9052,7.2408,11.0565,7.48,11.24z M11.8,10.74L11.8,10.74c0.1565-0.1277,0.3238-0.2414,0.5-0.34L13,6 c0.2926-0.8653,1.0874-1.4613,2-1.5c-0.4198-0.3485-0.955-0.5269-1.5-0.5c-1.2273-0.0869-2.3154,0.7836-2.5,2l-0.67,4 C10.8731,10.123,11.3778,10.377,11.8,10.74z M14,12L14,12c-0.4346-0.01-0.8579,0.1394-1.19,0.42l-0.47,0.41 c-0.2847,0.2546-0.7153,0.2546-1,0c-0.15-0.12-0.29-0.26-0.44-0.39c-0.7076-0.5968-1.7424-0.5968-2.45,0 c-0.16,0.13-0.31,0.28-0.47,0.41c-0.2847,0.2546-0.7153,0.2546-1,0c-0.16-0.13-0.31-0.28-0.47-0.41 c-0.7059-0.5912-1.7341-0.5912-2.44,0c-0.15,0.13-0.29,0.27-0.44,0.39c-0.0892,0.0715-0.1909,0.1258-0.3,0.16 c-0.2922,0.0652-0.5969-0.0301-0.8-0.25c-0.2475-0.214-0.5117-0.4079-0.79-0.58C1.5336,12.0421,1.2974,11.9865,1.06,12H1 c-0.2761,0-0.5,0.2239-0.5,0.5S0.7239,13,1,13l0,0c0.246,0.0145,0.4762,0.126,0.64,0.31L2,13.57 c0.6717,0.55,1.6308,0.5747,2.33,0.06c0.19-0.14,0.36-0.32,0.55-0.47c0.2847-0.2546,0.7153-0.2546,1,0l0.39,0.35 c0.6937,0.6189,1.7322,0.6484,2.46,0.07c0.15-0.11,0.27-0.25,0.42-0.37c0.2976-0.3038,0.7851-0.3087,1.0889-0.0111 c0.0037,0.0037,0.0074,0.0074,0.0111,0.0111l0.39,0.35c0.4866,0.4124,1.1485,0.5516,1.76,0.37c0.3825-0.1036,0.7286-0.3113,1-0.6 c0.1549-0.1772,0.3674-0.294,0.6-0.33l0,0c0.2761,0,0.5-0.2239,0.5-0.5S14.2761,12,14,12z",wheelchair:"M12,1.5C12,2.3284,11.3284,3,10.5,3S9,2.3284,9,1.5S9.6716,0,10.5,0S12,0.6716,12,1.5z M2.82,4.87l1.74-1.71l1.85,1.29 L5.67,5.7c1.0747,0.3341,2.0207,0.9904,2.71,1.88l0.88-1.5c0.2295-0.4158,0.0785-0.939-0.3373-1.1685 C8.9218,4.911,8.9209,4.9105,8.92,4.91L8.3,4.54L4.79,2.1C4.5927,1.9594,4.3231,1.9805,4.15,2.15l-2,2 C1.9852,4.3716,2.0312,4.6848,2.2528,4.8496C2.4193,4.9735,2.645,4.9816,2.82,4.87z M8.13,10.94 c-0.0143,1.2308-0.5794,2.3904-1.54,3.16c-0.7118,0.5804-1.6016,0.8982-2.52,0.9C1.8261,15,0.0055,13.1839,0,10.94 c0.0023-0.9231,0.3238-1.8169,0.91-2.53c0.1868-0.232,0.398-0.4432,0.63-0.63c0.7131-0.5862,1.6069-0.9077,2.53-0.91 C6.3139,6.8755,8.13,8.6961,8.13,10.94z M6,12.21C6.7679,11.2051,6.5758,9.7679,5.5709,9C4.7501,8.3727,3.6109,8.3727,2.79,9 C2.5283,9.151,2.311,9.3683,2.16,9.63c-0.6923,1.0584-0.3956,2.4777,0.6628,3.17c0.7615,0.4981,1.7457,0.4981,2.5072,0 C5.5805,12.6365,5.8061,12.4378,6,12.21z M14.2,13.21l-2.49-5C11.5906,7.9251,11.3088,7.7425,11,7.75H8.51 c0.3293,0.4578,0.5856,0.9638,0.76,1.5h1.26l2.29,4.58c0.185,0.3728,0.6372,0.525,1.01,0.34c0.3728-0.185,0.525-0.6372,0.34-1.01 L14.2,13.21z",windmill:"M6,5L3.5,7.5l1,1L7,6V5.5L7.5,5L8,5.5V6l2.5,2.5l1-1L9,5H8.5L8,4.5L8.5,4H9l2.5-2.5l-1-1L8,3v0.5L7.5,4L7,3.5V3L4.5,0.5 l-1,1L6,4h0.5L7,4.5L6.5,5H6z M11.5,13h-1l-1-4l-2-2l-2,2l-1,4h-1C3.2239,13,3,13.2238,3,13.5C3,13.7761,3.2239,14,3.5,14h8 c0.2761,0,0.5-0.2239,0.5-0.5C12,13.2238,11.7761,13,11.5,13z M8,13H7v-1.5024C7,11.2228,7.2228,11,7.4976,11 C7.7751,11,8,11.2249,8,11.5024V13z",zoo:"M8.3879,3.8928C8.3879,3.8928,7.6818,5,7,5H4.5C3.8182,5,3.2016,5.4086,2.7273,5.8636L0.5,8C0.231,8.258,0.0072,8.7681,0,9 c-0.0156,0.5,0,1,0,1s1,0,1-1V8.5l1-1h0.5l0.158,0.2892c0,0-0.9535,1.8244-0.9535,3.5289C1.7046,12,2.3864,12,2.3864,12h0.6818 c0,0,0.3409,0,0-0.3409l-0.3409-0.3409C2.7273,10.6364,3.5002,9.6667,4,9c0,0,0.0168,1.1579,0,2c-0.008,0.4096,0.2721,1,0.6818,1 h0.6818c0,0,0.3409,0,0-0.3409l-0.3409-0.3409C4.7105,10.7495,5.5,8.5,5.5,8.5C6.7716,8.5,7,9,8.5,9l0.3636,2.3182 C8.975,12.0282,9.5,12,9.5,12H11c0.3409,0,0.9611-0.3115,0.3409-0.7736L11,11V9c1.2142-0.1722,2-1,2-2h1c0.3214,0,1,0,1-0.5v-1 l-1.7045-1.6818C12.5444,3.0772,12,2.5,11,2.5C9.5469,2.5,8.8636,3.0688,8.3879,3.8928z"},L5=Object.keys(_e);function x2(s,l){const u=_e[s];u||console.warn(`[MakiIcon] Unknown icon: "${s}", falling back to "marker"`);const f=u??_e.marker??"",h=(l==null?void 0:l.size)??32,y=(l==null?void 0:l.fill)??"#333",m=`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 15 15" width="${h}" height="${h}"><path fill="${y}" d="${f}"/></svg>`;return`data:image/svg+xml,${encodeURIComponent(m)}`}function k5(s,l){const u={};for(const f of s)u[f]=x2(f,l);return u}const M5="M16 0C7.16344 0 0 7.16344 0 16C0 24.8366 16 40 16 40C16 40 32 24.8366 32 16C32 7.16344 24.8366 0 16 0Z";function b2(s,l){const u=_e[s];u||console.warn(`[MakiIcon] Unknown icon: "${s}", falling back to "marker"`);const f=u??_e.marker??"",h=(l==null?void 0:l.size)??40,y=(l==null?void 0:l.fill)??"#2563eb",m=`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 40" width="${h}" height="${Math.round(h*1.25)}"><path d="${M5}" fill="${y}" stroke="white" stroke-width="1.5"/>`+(f?`<svg x="8" y="8" viewBox="0 0 15 15" width="16" height="16"><path fill="white" d="${f}"/></svg>`:"")+"</svg>";return`data:image/svg+xml,${encodeURIComponent(m)}`}function w2(s,l){const u={};for(const f of s)u[f]=b2(f,l);return u}const Yt={primary:{fill:"#2563eb",bg:"rgba(37, 99, 235, 0.2)",ring:"rgba(37, 99, 235, 0.2)"},success:{fill:"#00854d",bg:"rgba(0, 133, 77, 0.2)",ring:"rgba(0, 133, 77, 0.2)"},warning:{fill:"#943700",bg:"rgba(148, 55, 0, 0.2)",ring:"rgba(148, 55, 0, 0.2)"},error:{fill:"#ba1a1a",bg:"rgba(186, 26, 26, 0.2)",ring:"rgba(186, 26, 26, 0.2)"}};function E5(s){return typeof s=="string"&&/<[a-zA-Z][^>]*>/.test(s)}function xr({color:s="primary"}){const{fill:l}=Yt[s];return g.jsxs("svg",{viewBox:"0 0 32 40",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:"aimapui-marker-pin",style:{width:32,height:40,display:"block",filter:"drop-shadow(0 4px 3px rgba(0,0,0,0.07)) drop-shadow(0 2px 2px rgba(0,0,0,0.06))"},children:[g.jsx("path",{d:"M16 0C7.16344 0 0 7.16344 0 16C0 24.8366 16 40 16 40C16 40 32 24.8366 32 16C32 7.16344 24.8366 0 16 0Z",fill:l,stroke:"white",strokeWidth:1.5}),g.jsx("circle",{cx:"16",cy:"16",r:"4",fill:"white"})]})}function z5({icon:s,color:l="primary"}){const{fill:u}=Yt[l],f=_e[s]??_e.marker??"";return g.jsxs("div",{className:"aimapui-marker-pin aimapui-marker-pin--icon",style:{position:"relative",display:"inline-flex",alignItems:"flex-start",justifyContent:"center",width:32,height:40,filter:"drop-shadow(0 4px 3px rgba(0,0,0,0.07)) drop-shadow(0 2px 2px rgba(0,0,0,0.06))"},children:[g.jsx("svg",{viewBox:"0 0 32 40",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{position:"absolute",inset:0,width:"100%",height:"100%"},children:g.jsx("path",{d:"M16 0C7.16344 0 0 7.16344 0 16C0 24.8366 16 40 16 40C16 40 32 24.8366 32 16C32 7.16344 24.8366 0 16 0Z",fill:u,stroke:"white",strokeWidth:1.5})}),f&&g.jsx("svg",{viewBox:"0 0 15 15",xmlns:"http://www.w3.org/2000/svg",style:{position:"relative",zIndex:1,width:16,height:16,marginTop:8,fill:"white"},children:g.jsx("path",{d:f,style:{fill:"white"}})})]})}function j5({color:s="primary"}){const{fill:l,bg:u}=Yt[s];return g.jsx("div",{className:"aimapui-marker-circle",style:{position:"relative",width:24,height:24,borderRadius:"50%",border:"1.5px solid white",boxShadow:"0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -2px rgba(0,0,0,0.1)",display:"flex",alignItems:"center",justifyContent:"center",background:u,borderColor:l},children:g.jsx("div",{className:"aimapui-marker-circle__inner",style:{width:6,height:6,borderRadius:"50%",background:l}})})}function S5({color:s="primary"}){const{fill:l}=Yt[s];return g.jsx("div",{className:"aimapui-marker-dot",style:{width:8,height:8,borderRadius:"50%",border:"1.5px solid white",boxShadow:"0 1px 3px rgba(0,0,0,0.3)",background:l}})}function D5({text:s}){return g.jsx("div",{className:"aimapui-marker-label",style:{position:"absolute",top:"calc(100% + 4px)",left:"50%",transform:"translateX(-50%)",fontFamily:"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace",fontSize:12,lineHeight:"16px",fontWeight:450,color:"#1d1d1f",whiteSpace:"nowrap",pointerEvents:"none",textShadow:"-1px -1px 0 #fff, 1px -1px 0 #fff, -1px 1px 0 #fff, 1px 1px 0 #fff, 0 0 2px #fff, 0 0 4px rgba(255,255,255,0.5)"},children:s})}const br={center:"translate(-50%, -50%)",top:"translate(-50%, 0)",bottom:"translate(-50%, -100%)",left:"translate(0, -50%)",right:"translate(-100%, -50%)","top-left":"translate(0, 0)","top-right":"translate(-100%, 0)","bottom-left":"translate(0, -100%)","bottom-right":"translate(-100%, -100%)"},H5=[0,0];function B5(s,l,u,f){let h;switch(s){case"pin":h=g.jsx(xr,{color:l});break;case"circle":h=g.jsx(j5,{color:l});break;case"icon":h=g.jsx(z5,{icon:u||"marker",color:l});break;case"dot":h=g.jsx(S5,{color:l});break;default:h=g.jsx(xr,{color:l})}return f?g.jsxs("div",{style:{position:"relative",display:"inline-flex",flexDirection:"column",alignItems:"center"},children:[h,g.jsx(D5,{text:f})]}):h}function Ue({longitude:s,latitude:l,variant:u="pin",color:f="primary",icon:h,label:y,content:m,children:C,draggable:x=!1,className:L,overlayContainer:M,onClick:S,onMouseEnter:z,onMouseLeave:H,onDoubleClick:D,onDragEnd:V,onDragging:O,onDragStart:R,selected:N=!1,inactive:F=!1,anchor:Y="bottom",offsets:X=H5,overflowHide:n0=!0}){const Z=jA(),G=b.useRef(null),r0=b.useRef(null),A0=b.useRef({lng:s,lat:l}),o0=b.useRef({width:0,height:0}),q=X[0]??0,t0=X[1]??0,B=b.useRef(null),U=b.useRef(S);U.current=S;const e0=b.useRef(z);e0.current=z;const c0=b.useRef(H);c0.current=H;const h0=b.useRef(D);h0.current=D;const p0=b.useRef(R);p0.current=R;const S0=b.useRef(O);S0.current=O;const Z0=b.useRef(V);Z0.current=V;const x0=b.useMemo(()=>{const j0=["aimapui-marker"];return N&&j0.push("aimapui-marker--selected"),F&&j0.push("aimapui-marker--inactive"),j0.push(`aimapui-marker--${f}`),L&&j0.push(L),j0.join(" ")},[N,F,f,L]),g0=b.useMemo(()=>m||C||B5(u,f,h,y),[m,C,u,f,h,y]),T0=j0=>{const B0=G.current;if(!B0||!j0)return;const{lng:pA,lat:E0}=A0.current;if(isNaN(pA)||isNaN(E0))return;let D0;try{D0=j0.lngLatToContainer([pA,E0])}catch{return}if(!D0||isNaN(D0.x)||isNaN(D0.y))return;const Q0=D0.x+q,l0=D0.y-t0,T=br[Y]||br.bottom,a0=Math.round(Q0),Q=Math.round(l0);if(B0.style.left="0",B0.style.top="0",B0.style.transform=`translate3d(${a0}px, ${Q}px, 0) ${T}`,n0){const{width:H0,height:d0}=o0.current;B0.style.visibility=Q0<0||Q0>H0||l0<0||l0>d0?"hidden":"visible"}};return b.useEffect(()=>{if(!Z)return;let j0=!1;const B0=Z.mapService;if(!B0){console.error("[Marker] mapService not available");return}const pA=()=>{var a0;const T=(a0=B0.getContainer)==null?void 0:a0.call(B0);T&&(o0.current={width:T.scrollWidth||T.clientWidth||0,height:T.scrollHeight||T.clientHeight||0})},E0=()=>{G.current&&T0(B0)},D0=(T,a0,Q)=>{var H0;try{(H0=T==null?void 0:T.on)==null||H0.call(T,a0,Q)}catch{}},Q0=(T,a0,Q)=>{var H0;try{(H0=T==null?void 0:T.off)==null||H0.call(T,a0,Q)}catch{}};return pA(),D0(B0,"camerachange",E0),D0(B0,"viewchange",E0),D0(Z,"resize",pA),(async()=>{var F0;if(Z.loaded||await new Promise(L0=>{Z.once("loaded",()=>L0())}),j0)return;const T=document.createElement("div");T.className=x0,T.style.position="absolute",T.style.left="0",T.style.top="0",T.style.whiteSpace="nowrap",T.style.pointerEvents="auto",G.current=T;const a0=M??((F0=B0.getMarkerContainer)==null?void 0:F0.call(B0));if(a0)a0.appendChild(T);else{console.error("[Marker] getMarkerContainer not available");return}T0(B0);let Q=!1,H0={lng:0,lat:0};const d0=L0=>{var G0;if(!x)return;Q=!0,B0.setMapStatus({dragEnable:!1,zoomEnable:!1});const _0=B0.getContainer(),v0=(G0=_0==null?void 0:_0.getClientRects())==null?void 0:G0[0];if(v0){const sA=v0.left,fA=v0.top,kA=L0.x||L0.clientX,_A=L0.y||L0.clientY;H0=B0.containerToLngLat([kA-sA,_A-fA])}B0.on("mousemove",b0),document.addEventListener("mouseup",I0),p0.current&&p0.current(A0.current.lng,A0.current.lat)},b0=L0=>{if(!Q)return;const _0=L0.lngLat||L0.lnglat,{lng:v0,lat:G0}=H0,{lng:sA,lat:fA}=_0,kA={lng:A0.current.lng+sA-v0,lat:A0.current.lat+fA-G0};A0.current=kA,H0=_0,T0(B0),S0.current&&S0.current(kA.lng,kA.lat)},I0=()=>{Q&&(Q=!1,B0.setMapStatus({dragEnable:!0,zoomEnable:!0}),B0.off("mousemove",b0),document.removeEventListener("mouseup",I0),Z0.current&&Z0.current(A0.current.lng,A0.current.lat))};T.addEventListener("click",(L0=>{var _0;return(_0=U.current)==null?void 0:_0.call(U,L0)})),T.addEventListener("mouseenter",(L0=>{var _0;return(_0=e0.current)==null?void 0:_0.call(e0,L0)})),T.addEventListener("mouseleave",(L0=>{var _0;return(_0=c0.current)==null?void 0:_0.call(c0,L0)})),T.addEventListener("dblclick",(L0=>{var _0;return(_0=h0.current)==null?void 0:_0.call(h0,L0)})),x&&T.addEventListener("mousedown",d0),B.current={updatePosition:E0,handleDragStart:d0,handleDragMove:b0,handleDragEnd:I0}})(),()=>{if(j0=!0,Q0(B0,"camerachange",E0),Q0(B0,"viewchange",E0),Q0(Z,"resize",pA),B.current&&x&&B0.setMapStatus({dragEnable:!0,zoomEnable:!0}),G.current){const a0=r0.current,Q=G.current;r0.current=null,G.current=null,queueMicrotask(()=>{a0&&a0.unmount(),Q.parentNode&&Q.parentNode.removeChild(Q)})}B.current=null}},[Z,Y,q,t0,n0,x,M]),b.useEffect(()=>{if(!G.current)return;const j0=G.current;E5(g0)?j0.innerHTML=g0:(r0.current||(r0.current=_o.createRoot(j0)),r0.current.render(g.jsx(g.Fragment,{children:g0})))},[g0]),b.useEffect(()=>{G.current&&(G.current.className=x0)},[x0]),b.useEffect(()=>{if(A0.current={lng:s,lat:l},Z&&G.current){const j0=Z.mapService;j0&&T0(j0)}},[s,l,Z]),null}function L2({interactions:s}){const l=jA(),[u,f]=b.useState(null);b.useEffect(()=>{if(!l)return;const m=()=>{try{const x=l.mapService;if(x&&typeof x.getMarkerContainer=="function"){const L=x.getMarkerContainer();if(L){f(L);return}}}catch{}const C=setTimeout(()=>{try{const x=l.mapService;if(x&&typeof x.getMarkerContainer=="function"){const L=x.getMarkerContainer();L&&f(L)}}catch{}},100);return()=>clearTimeout(C)};return l.loaded?m():(l.on("loaded",m),()=>{l.off("loaded",m)})},[l]);const h=s.filter(m=>m.type==="marker"),y=s.filter(m=>m.type==="popup");return g.jsxs(g.Fragment,{children:[u&&h.map((m,C)=>g.jsx(Ue,{...m,overlayContainer:u},`marker-${C}`)),u&&y.map((m,C)=>g.jsx(kt,{...m,overlayContainer:u},`popup-${C}`))]})}function on({title:s,labels:l,colors:u,swatchShape:f="square",grid:h=!1,className:y,interaction:m}){const[C,x]=b.useState(-1),[L,M]=b.useState(new Set),S=D=>{var V;x(D),(V=m==null?void 0:m.onHover)==null||V.call(m,D)},z=()=>{var D;x(-1),(D=m==null?void 0:m.onHover)==null||D.call(m,-1)},H=D=>{var V;M(O=>{const R=new Set(O);return R.has(D)?R.delete(D):R.add(D),R}),(V=m==null?void 0:m.onToggle)==null||V.call(m,D)};return g.jsxs("div",{className:vA(y),children:[s&&g.jsx("div",{className:"mb-2 text-xs font-semibold uppercase tracking-wide text-on-surface-variant",children:s}),g.jsx("div",{className:vA("flex flex-col gap-1",h&&"grid grid-cols-2 gap-x-3 gap-y-1"),children:l.map((D,V)=>{const O=C>=0?C!==V:L.has(V);return g.jsxs("div",{className:vA("flex items-center gap-2 rounded px-1 py-0.5 cursor-pointer select-none transition-[background,opacity] duration-150 hover:bg-primary/[0.06]",O&&"opacity-35"),onMouseEnter:()=>S(V),onMouseLeave:z,onClick:()=>H(V),children:[g.jsx("span",{className:vA("size-3 shrink-0 rounded-sm shadow-[inset_0_0_0_1px_rgba(0,0,0,0.08)] transition-opacity duration-150",f==="circle"&&"rounded-full"),style:{backgroundColor:u[V]??"#ccc"}}),g.jsx("span",{className:"text-xs leading-4 text-on-surface truncate",children:D})]},V)})})]})}function sn({title:s,labels:l,colors:u,isContinuous:f=!1,showTicks:h=!1,brushable:y=!1,className:m,interaction:C}){const[x,L]=b.useState([0,100]),M=b.useRef(null),S=u.join(", "),z=b.useCallback(H=>D=>{D.stopPropagation(),D.preventDefault();const V=M.current;if(!V)return;const O=V.getBoundingClientRect().width,R=F=>{const Y=V.getBoundingClientRect(),X=F.clientX-Y.left,n0=Math.max(0,Math.min(100,X/O*100));L(Z=>{var r0;let G;return H==="left"?G=[Math.min(n0,Z[1]-5),Z[1]]:G=[Z[0],Math.max(n0,Z[0]+5)],(r0=C==null?void 0:C.onBrush)==null||r0.call(C,G),G})},N=()=>{document.removeEventListener("mousemove",R),document.removeEventListener("mouseup",N)};document.addEventListener("mousemove",R),document.addEventListener("mouseup",N)},[C,M]);return g.jsxs("div",{className:vA(m),children:[s&&g.jsx("div",{className:"mb-2 text-xs font-semibold uppercase tracking-wide text-on-surface-variant",children:s}),g.jsxs("div",{className:"flex flex-col gap-1",ref:M,children:[g.jsx("div",{className:vA("flex h-3 rounded overflow-hidden shadow-[inset_0_0_0_1px_rgba(0,0,0,0.06)]",f&&"bg-[length:100%_100%]"),style:f?{background:`linear-gradient(to right, ${S})`}:void 0,children:!f&&u.map((H,D)=>g.jsx("div",{className:"flex-1 relative",style:{backgroundColor:H}},D))}),h&&g.jsx("div",{className:"flex justify-between h-1.5 mt-0.5",children:u.map((H,D)=>D===0?null:g.jsx("div",{className:"w-px h-full bg-outline-variant",style:{position:"absolute",left:`${D/(u.length-1)*100}%`}},D))}),g.jsxs("div",{className:"flex justify-between font-mono text-[11px] leading-3.5 font-[450] text-on-surface-variant",children:[g.jsx("span",{children:l[0]}),l.length>2&&g.jsx("span",{children:l[Math.floor(l.length/2)]}),g.jsx("span",{children:l[l.length-1]})]}),y&&g.jsxs("div",{className:"relative h-3 mt-1 cursor-ew-resize",children:[g.jsx("div",{className:"absolute top-0 h-full border-2 border-primary rounded-sm bg-primary/10 pointer-events-none",style:{left:`${x[0]}%`,width:`${x[1]-x[0]}%`}}),g.jsx("div",{className:"absolute top-1/2 w-2 h-4 bg-primary rounded-sm -translate-x-1/2 -translate-y-1/2 cursor-ew-resize shadow-sm hover:shadow-md hover:shadow-primary/30 transition-shadow duration-150",style:{left:`${x[0]}%`},onMouseDown:z("left")}),g.jsx("div",{className:"absolute top-1/2 w-2 h-4 bg-primary rounded-sm -translate-x-1/2 -translate-y-1/2 cursor-ew-resize shadow-sm hover:shadow-md hover:shadow-primary/30 transition-shadow duration-150",style:{left:`${x[1]}%`},onMouseDown:z("right")})]})]})]})}function ln({title:s,colors:l,labels:u,middleLabel:f,className:h}){const y=l.join(", ");return g.jsxs("div",{className:vA(h),children:[s&&g.jsx("div",{className:"mb-2 text-xs font-semibold uppercase tracking-wide text-on-surface-variant",children:s}),g.jsxs("div",{className:"flex flex-col gap-1",children:[g.jsxs("div",{style:{position:"relative"},children:[g.jsx("div",{className:"flex h-3 rounded overflow-hidden shadow-[inset_0_0_0_1px_rgba(0,0,0,0.06)]",style:{background:`linear-gradient(to right, ${y})`}}),g.jsx("div",{style:{position:"absolute",top:-4,left:"50%",transform:"translateX(-50%)",width:1,height:20,background:"var(--color-outline-variant, #c3c6d7)"}}),f&&g.jsx("div",{className:"absolute left-1/2 -translate-x-1/2 -bottom-[18px] font-mono text-[11px] text-on-surface-variant whitespace-nowrap",children:f})]}),g.jsxs("div",{className:"flex justify-between font-mono text-[11px] leading-3.5 font-[450] text-on-surface-variant",style:f?{marginBottom:12}:void 0,children:[g.jsx("span",{children:u[0]}),g.jsx("span",{children:u[1]})]})]})]})}function an({title:s,ranges:l,colors:u,className:f,interaction:h}){const[y,m]=b.useState(-1),[C,x]=b.useState(new Set),L=z=>{var H;m(z),(H=h==null?void 0:h.onHover)==null||H.call(h,z)},M=()=>{var z;m(-1),(z=h==null?void 0:h.onHover)==null||z.call(h,-1)},S=z=>{var H;x(D=>{const V=new Set(D);return V.has(z)?V.delete(z):V.add(z),V}),(H=h==null?void 0:h.onToggle)==null||H.call(h,z)};return g.jsxs("div",{className:vA(f),children:[s&&g.jsx("div",{className:"mb-2 text-xs font-semibold uppercase tracking-wide text-on-surface-variant",children:s}),g.jsx("div",{className:"flex flex-col gap-1.5",children:l.map(([z,H],D)=>{const V=y>=0?y!==D:C.has(D);return g.jsxs("div",{className:vA("flex items-center gap-2 cursor-pointer select-none transition-opacity duration-150 hover:opacity-80",V&&"opacity-35"),onMouseEnter:()=>L(D),onMouseLeave:M,onClick:()=>S(D),children:[g.jsx("span",{className:"w-6 h-3 shrink-0 rounded-sm shadow-[inset_0_0_0_1px_rgba(0,0,0,0.06)]",style:{backgroundColor:u[D]??"#ccc"}}),g.jsxs("span",{className:"font-mono text-[11px] leading-3.5 text-on-surface-variant",children:["[",z,", ",H,")"]})]},D)})})]})}function cn({title:s,fillColor:l="#4A90D9",items:u,className:f}){const h=Math.max(...u.map(y=>y.size),1);return g.jsxs("div",{className:vA(f),children:[s&&g.jsx("div",{className:"mb-2 text-xs font-semibold uppercase tracking-wide text-on-surface-variant",children:s}),g.jsxs("div",{className:"flex flex-col gap-2",children:[g.jsx("div",{className:"flex items-end gap-2 px-1",children:u.map((y,m)=>g.jsx("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"flex-end",height:h},children:g.jsx("div",{className:"rounded-full shrink-0 shadow-[inset_0_0_0_1px_rgba(0,0,0,0.06)]",style:{width:y.size,height:y.size,backgroundColor:l,opacity:.85}})},m))}),g.jsx("div",{className:"flex items-end gap-2 mt-1",children:u.map((y,m)=>g.jsx("span",{className:"font-mono text-[11px] leading-3.5 text-on-surface-variant whitespace-nowrap",children:y.label},m))})]})]})}function un({title:s,color:l="#4A90D9",items:u,className:f,interaction:h}){const[y,m]=b.useState(-1),[C,x]=b.useState(new Set),L=z=>{var H;m(z),(H=h==null?void 0:h.onHover)==null||H.call(h,z)},M=()=>{var z;m(-1),(z=h==null?void 0:h.onHover)==null||z.call(h,-1)},S=z=>{var H;x(D=>{const V=new Set(D);return V.has(z)?V.delete(z):V.add(z),V}),(H=h==null?void 0:h.onToggle)==null||H.call(h,z)};return g.jsxs("div",{className:vA(f),children:[s&&g.jsx("div",{className:"mb-2 text-xs font-semibold uppercase tracking-wide text-on-surface-variant",children:s}),g.jsx("div",{className:"flex flex-col gap-1.5",children:u.map((z,H)=>{const D=y>=0?y!==H:C.has(H);return g.jsxs("div",{className:vA("flex items-center gap-2.5 py-0.5 cursor-pointer select-none transition-opacity duration-150 hover:opacity-80",D&&"opacity-35"),onMouseEnter:()=>L(H),onMouseLeave:M,onClick:()=>S(H),children:[g.jsx("div",{className:"w-7 shrink-0 rounded-full shadow-[0_0_0_1px_rgba(0,0,0,0.06)]",style:{height:z.width,backgroundColor:l,opacity:.85}}),g.jsx("span",{className:"text-xs leading-4 text-on-surface whitespace-nowrap",children:z.label})]},H)})})]})}function fn({title:s,labels:l,fillColor:u="#4A90D9",className:f}){return g.jsxs("div",{className:vA(f),children:[s&&g.jsx("div",{className:"mb-2 text-xs font-semibold uppercase tracking-wide text-on-surface-variant",children:s}),g.jsxs("div",{className:"flex flex-col gap-2",children:[g.jsx("div",{className:"flex items-end gap-2 px-1",children:l.map(([m,C],x)=>{const M=6+x/Math.max(l.length-1,1)*18;return g.jsx("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"flex-end",height:24},children:g.jsx("div",{className:"rounded-full shrink-0 shadow-[inset_0_0_0_1px_rgba(0,0,0,0.06)]",style:{width:M,height:M,backgroundColor:u,opacity:.85}})},x)})}),g.jsx("div",{className:"flex items-end gap-2 mt-1",children:l.map(([m,C],x)=>g.jsxs("span",{className:"font-mono text-[11px] leading-3.5 text-on-surface-variant whitespace-nowrap",children:[m,"–",C]},x))})]})]})}function wr(s){return/^(https?:|\/\/|data:)/i.test(s)}function dn({title:s,items:l,className:u,interaction:f}){const[h,y]=b.useState(-1),[m,C]=b.useState(new Set),x=S=>{var z;y(S),(z=f==null?void 0:f.onHover)==null||z.call(f,S)},L=()=>{var S;y(-1),(S=f==null?void 0:f.onHover)==null||S.call(f,-1)},M=S=>{var z;C(H=>{const D=new Set(H);return D.has(S)?D.delete(S):D.add(S),D}),(z=f==null?void 0:f.onToggle)==null||z.call(f,S)};return g.jsxs("div",{className:vA(u),children:[s&&g.jsx("div",{className:"mb-2 text-xs font-semibold uppercase tracking-wide text-on-surface-variant",children:s}),g.jsx("div",{className:"flex flex-col gap-1",children:l.map((S,z)=>{const H=h>=0?h!==z:m.has(z);return g.jsxs("div",{className:vA("flex items-center gap-2 px-1 py-0.5 rounded cursor-pointer select-none transition-[background,opacity] duration-150 hover:bg-primary/[0.06]",H&&"opacity-35"),onMouseEnter:()=>x(z),onMouseLeave:L,onClick:()=>M(z),children:[wr(S.icon)?g.jsx("img",{src:S.icon,alt:S.label,className:"size-5 object-contain shrink-0",onError:D=>{const V=D.target;V.style.display="none";const O=V.nextElementSibling;O&&(O.style.display="flex")}}):g.jsx("span",{className:"size-5 flex items-center justify-center shrink-0 text-base leading-none",children:S.icon}),wr(S.icon)&&g.jsx("span",{className:"size-5 hidden items-center justify-center shrink-0 text-base leading-none text-on-surface-variant",children:"□"}),g.jsx("span",{className:"text-xs leading-4 text-on-surface",children:S.label})]},z)})})]})}function k2({legends:s,className:l,style:u,interaction:f}){return s.length?g.jsx("div",{className:vA("absolute z-20 bottom-6 left-6 max-h-[40%] overflow-y-auto rounded-xl border border-outline-variant/30 bg-surface/80 backdrop-blur-md p-3 px-3.5 text-on-surface shadow-lg scrollbar-thin scrollbar-track-transparent scrollbar-thumb-outline-variant",l),style:u,children:g.jsx("div",{className:"flex flex-col gap-4 [&>*+*]:border-t [&>*+*]:border-outline-variant/20 [&>*+*]:pt-4",children:s.map((h,y)=>g.jsx(V5,{legend:h,interaction:f},`legend-${y}`))})}):null}function V5({legend:s,interaction:l}){switch(s.type){case"categories":return g.jsx(on,{...s,interaction:l});case"ramp":return g.jsx(sn,{...s,interaction:l});case"diverging":return g.jsx(ln,{...s,interaction:l});case"threshold":return g.jsx(an,{...s,interaction:l});case"size":return g.jsx(cn,{...s,interaction:l});case"lineWidth":return g.jsx(un,{...s,interaction:l});case"proportion":return g.jsx(fn,{...s,interaction:l});case"icon":return g.jsx(dn,{...s,interaction:l});default:return null}}const M2=b.createContext({isMobile:!1,breakpoint:768,width:typeof window<"u"?window.innerWidth:1024,schema:void 0});function _5({responsive:s,children:l}){const[u,f]=b.useState(typeof window<"u"?window.innerWidth:1024);b.useEffect(()=>{const C=()=>f(window.innerWidth);return window.addEventListener("resize",C),()=>window.removeEventListener("resize",C)},[]);const h=(s==null?void 0:s.breakpoint)??768,y=u<h,m=b.useMemo(()=>({isMobile:y,breakpoint:h,width:u,schema:s}),[y,h,u,s]);return g.jsx(M2.Provider,{value:m,children:l})}function E2(){return b.useContext(M2)}function z2({config:s,className:l}){const u=jA(),{items:f,position:h="bottom"}=s,y=x=>{switch(x){case"zoomIn":u==null||u.zoomIn();break;case"zoomOut":u==null||u.zoomOut();break;case"locate":navigator.geolocation&&navigator.geolocation.getCurrentPosition(L=>{u==null||u.setCenter([L.coords.longitude,L.coords.latitude]),u==null||u.setZoom(14)});break;case"reset":u==null||u.setCenter([105,35]),u==null||u.setZoom(4);break}},m={zoomIn:g.jsx("svg",{viewBox:"0 0 24 24",className:"w-6 h-6",fill:"none",stroke:"currentColor",strokeWidth:2,children:g.jsx("path",{d:"M12 5v14m-7-7h14"})}),zoomOut:g.jsx("svg",{viewBox:"0 0 24 24",className:"w-6 h-6",fill:"none",stroke:"currentColor",strokeWidth:2,children:g.jsx("path",{d:"M5 12h14"})}),locate:g.jsxs("svg",{viewBox:"0 0 24 24",className:"w-6 h-6",fill:"none",stroke:"currentColor",strokeWidth:2,children:[g.jsx("circle",{cx:"12",cy:"12",r:"3"}),g.jsx("path",{d:"M12 2v4m0 12v4m10-10h-4M6 12H2"})]}),reset:g.jsxs("svg",{viewBox:"0 0 24 24",className:"w-6 h-6",fill:"none",stroke:"currentColor",strokeWidth:2,children:[g.jsx("path",{d:"M3 12a9 9 0 1 1 3.3 6.9"}),g.jsx("path",{d:"M3 22v-7h7"})]}),layers:g.jsx("svg",{viewBox:"0 0 24 24",className:"w-6 h-6",fill:"none",stroke:"currentColor",strokeWidth:2,children:g.jsx("path",{d:"M12 2L2 7l10 5 10-5-10-5zM2 17l10 5 10-5M2 12l10 5 10-5"})})},C={zoomIn:"放大",zoomOut:"缩小",locate:"定位",reset:"复位",layers:"图层"};return g.jsx("div",{className:vA("aimapui-mobile-toolbar pointer-events-none",h==="bottom"?"aimapui-mobile-toolbar--bottom":"aimapui-mobile-toolbar--top",l),children:g.jsx("div",{className:"aimapui-mobile-toolbar__bar pointer-events-auto",children:f.map((x,L)=>g.jsxs("button",{onClick:()=>y(x),className:"aimapui-mobile-toolbar__button group",style:{background:"none",border:"none",cursor:"pointer"},"aria-label":C[x]??x,title:C[x]??x,children:[g.jsx("span",{className:"aimapui-mobile-toolbar__icon",children:m[x]}),g.jsx("span",{className:"aimapui-mobile-toolbar__label",children:C[x]??x})]},`${x}-${L}`))})})}function j2({legends:s,className:l,interaction:u}){const[f,h]=b.useState(!1);return s.length?g.jsx("div",{className:vA("aimapui-mobile-sheet-legend",l),children:g.jsxs("div",{className:"aimapui-mobile-sheet-legend__panel",children:[g.jsx("div",{className:"aimapui-mobile-sheet-legend__handle","aria-hidden":"true"}),g.jsxs("button",{onClick:()=>h(!f),className:"aimapui-mobile-sheet-legend__toggle",style:{background:"none",border:"none",cursor:"pointer"},children:[g.jsxs("span",{className:"aimapui-mobile-sheet-legend__toggle-copy",children:[g.jsx("span",{className:"aimapui-mobile-sheet-legend__eyebrow",children:"Legend Panel"}),g.jsxs("span",{className:"aimapui-mobile-sheet-legend__title-row",children:[g.jsx("span",{className:"aimapui-mobile-sheet-legend__title",children:"图例"}),g.jsxs("span",{className:"aimapui-mobile-sheet-legend__badge",children:[s.length," 项"]})]})]}),g.jsx("span",{className:"aimapui-mobile-sheet-legend__chevron-shell","aria-hidden":"true",children:g.jsx("svg",{viewBox:"0 0 24 24",className:vA("aimapui-mobile-sheet-legend__chevron",f&&"aimapui-mobile-sheet-legend__chevron--expanded"),fill:"none",stroke:"currentColor",strokeWidth:2,children:g.jsx("path",{d:"M6 9l6 6 6-6"})})})]}),g.jsx("div",{className:vA("aimapui-mobile-sheet-legend__content custom-scrollbar",f?"aimapui-mobile-sheet-legend__content--expanded":"aimapui-mobile-sheet-legend__content--collapsed"),children:s.map((y,m)=>g.jsx("div",{className:"aimapui-mobile-sheet-legend__section",children:g.jsx(I5,{legend:y,interaction:u})},`mobile-legend-${m}`))})]})}):null}function I5({legend:s,interaction:l}){switch(s.type){case"categories":return g.jsx(on,{...s,interaction:l});case"ramp":return g.jsx(sn,{...s,interaction:l});case"diverging":return g.jsx(ln,{...s,interaction:l});case"threshold":return g.jsx(an,{...s,interaction:l});case"size":return g.jsx(cn,{...s,interaction:l});case"lineWidth":return g.jsx(un,{...s,interaction:l});case"proportion":return g.jsx(fn,{...s,interaction:l});case"icon":return g.jsx(dn,{...s,interaction:l});default:return null}}function P5({map:s,schema:l,theme:u="light",onSceneReady:f,onLayerClick:h,onLayerMouseMove:y,onLayerMouseEnter:m,onLayerMouseLeave:C,onMapMove:x,onMapZoom:L,autoFit:M,events:S,children:z,className:H,style:D}){const V=b.useRef(null),O=b.useMemo(()=>{if(l)return N1(Rr(l));const X=s??{basemap:"gaode"};return!X.basemap&&!X.engine&&(X.basemap="gaode"),{map:F5(X),layers:[],controls:[],interactions:[],legends:[]}},[l,s]),R=!l&&!!s,N=b.useMemo(()=>({onClick:h,onMouseMove:y,onMouseEnter:m,onMouseLeave:C}),[h,y,m,C]),F=b.useMemo(()=>({onMove:x,onZoom:L}),[x,L]),Y=b.useCallback(X=>{f==null||f(X)},[f]);return g.jsx(Gr,{defaultTheme:u,target:"container",children:g.jsx(Zr,{schema:O,children:g.jsx($r,{events:S,children:g.jsx(Go,{responsive:O.responsive,children:g.jsx(R5,{schema:O,isComposableMode:R,autoFit:M,onSceneReady:Y,layerEventHandlers:N,mapEventHandlers:F,containerRef:V,className:H,style:D,children:z})})})})})}function T5(){const s=jA();return b.useEffect(()=>{if(!s)return;let l=!1,u=null,f=null;const h=new Set,y=()=>{var O,R;if(l)return;const M=((O=s.getLayers)==null?void 0:O.call(s))??[];if(M.length===0)return;let S=1/0,z=1/0,H=-1/0,D=-1/0,V=!1;for(const N of M)try{const F=(R=N.getSource)==null?void 0:R.call(N),Y=F==null?void 0:F.extent;if(!Y||!Array.isArray(Y)||Y.length<4)continue;const[X,n0,Z,G]=Y;if(!isFinite(X)||!isFinite(n0)||!isFinite(Z)||!isFinite(G)||X>=Z||n0>=G)continue;S=Math.min(S,X),z=Math.min(z,n0),H=Math.max(H,Z),D=Math.max(D,G),V=!0}catch{}if(!(!V||S>=H||z>=D))try{s.fitBounds([[S,z],[H,D]]),l=!0}catch{}},m=()=>{l||(u&&clearTimeout(u),u=setTimeout(y,200))};let C=0;const x=50,L=()=>{var S;if(l)return;C+=1;const M=((S=s.getLayers)==null?void 0:S.call(s))??[];for(const z of M)h.has(z)||(h.add(z),z.inited&&m(),typeof z.on=="function"&&z.on("inited",m));!l&&C<x&&(f=setTimeout(L,100))};return f=setTimeout(L,100),()=>{u&&clearTimeout(u),f&&clearTimeout(f)}},[s]),null}function F5(s){return{basemap:s.basemap??(s.engine?void 0:"gaode"),engine:s.engine,token:s.token,style:s.style,center:s.center??[105,35],zoom:s.zoom??4,pitch:s.pitch??0,rotation:s.rotation??0,minZoom:s.minZoom,maxZoom:s.maxZoom,bounds:s.bounds,gestureConfig:s.gestureConfig}}function R5({schema:s,isComposableMode:l,autoFit:u,onSceneReady:f,layerEventHandlers:h,mapEventHandlers:y,containerRef:m,className:C,style:x,children:L}){var O,R;const{isMobile:M}=E2(),[S,z]=b.useState(s.layers??[]),H=b.useMemo(()=>{var F,Y;if(l||!M||!((Y=(F=s.responsive)==null?void 0:F.mobile)!=null&&Y.layers))return s.layers;const N=s.responsive.mobile.layers;if("*"in N){const X=N["*"];return s.layers.map(n0=>({...n0,...X,id:n0.id}))}return s.layers.map(X=>X.id&&N[X.id]?{...X,...N[X.id],id:X.id}:X)},[s.layers,s.responsive,M,l]),D=b.useMemo(()=>{var Y,X;const N=s.controls??[];if(!M||!((X=(Y=s.responsive)==null?void 0:Y.mobile)!=null&&X.controls))return N;const F=s.responsive.mobile.controls;return F.hide?N.filter(n0=>!F.hide.includes(n0.type)):N},[s.controls,s.responsive,M]),V=b.useCallback((N,F)=>{z(Y=>Y.map(X=>X.id===N?{...X,visible:F}:X))},[]);return g.jsx("div",{ref:m,className:C??"aimapui-container",style:x??{width:"100%",height:"100%"},children:g.jsxs(Kr,{mapSchema:s.map,onSceneReady:f,mapEventHandlers:y,events:s.events,style:{width:"100%",height:"100%"},children:[u&&g.jsx(T5,{}),!l&&H.length>0&&g.jsx(l2,{layers:H,eventHandlers:h}),!l&&g.jsx(v2,{controls:D,layers:H,onLayerToggle:V,containerRef:m}),!l&&s.interactions&&s.interactions.length>0&&g.jsx(L2,{interactions:s.interactions}),!l&&(M?s.legends&&s.legends.length>0&&g.jsx(j2,{legends:s.legends}):g.jsx(k2,{legends:s.legends??[]})),!l&&M&&((R=(O=s.responsive)==null?void 0:O.mobile)==null?void 0:R.toolbar)&&g.jsx(z2,{config:s.responsive.mobile.toolbar}),l?g.jsx(N5,{children:L}):null]})})}function N5({children:s}){const{controls:l,others:u}=b.useMemo(()=>{const f=[],h=[];return b.Children.forEach(s,(y,m)=>{b.isValidElement(y)&&OA.check(y)?f.push(y):h.push(y)}),{controls:f,others:h}},[s]);return g.jsxs(g.Fragment,{children:[l.length>0&&g.jsx(W1,{children:l}),u]})}function bt(s,l){if(s===l)return!1;if(s==null||l==null||typeof s!=typeof l||typeof s!="object")return!0;try{return JSON.stringify(s)!==JSON.stringify(l)}catch{return!0}}function Z5(s,l){const u=bt(s.map,l.map),f=new Map;(s.layers??[]).forEach(O=>{O.id&&f.set(O.id,O)});const h=new Map;(l.layers??[]).forEach(O=>{O.id&&h.set(O.id,O)});const y=[],m=[],C=[];(l.layers??[]).forEach((O,R)=>{const N=O.id??`__index_${R}`;if(!f.has(N))y.push(O);else{const F=f.get(N);bt(F,O)&&C.push({id:N,prev:F,next:O})}}),(s.layers??[]).forEach((O,R)=>{const N=O.id??`__index_${R}`;h.has(N)||m.push(N)});const x=s.controls??[],L=l.controls??[],M=[],S=[],z=[],H=Math.max(x.length,L.length);for(let O=0;O<H;O++)O>=x.length?M.push(L[O]):O>=L.length?S.push(x[O]):bt(x[O],L[O])&&z.push({index:O,prev:x[O],next:L[O]});const D=bt(s.interactions,l.interactions),V=bt(s.legends,l.legends);return{mapChanged:u,layersAdded:y,layersRemoved:m,layersUpdated:C,controlsAdded:M,controlsRemoved:S,controlsUpdated:z,interactionsChanged:D,legendsChanged:V}}function Q5(s){const l=[];return s.map?l.push(...O5(s.map)):l.push({path:"map",message:"map is required",severity:"error"}),!s.layers||!Array.isArray(s.layers)?l.push({path:"layers",message:"layers must be an array",severity:"error"}):s.layers.forEach((u,f)=>{l.push(...U5(u,f))}),s.controls&&(Array.isArray(s.controls)?s.controls.forEach((u,f)=>{u.type||l.push({path:`controls[${f}].type`,message:"control type is required",severity:"error"})}):l.push({path:"controls",message:"controls must be an array",severity:"error"})),s.interactions&&(Array.isArray(s.interactions)?s.interactions.forEach((u,f)=>{(u.type==="marker"||u.type==="popup")&&(typeof u.longitude!="number"||typeof u.latitude!="number")&&l.push({path:`interactions[${f}]`,message:"marker/popup requires longitude and latitude as numbers",severity:"error"})}):l.push({path:"interactions",message:"interactions must be an array",severity:"error"})),s.legends&&(Array.isArray(s.legends)?s.legends.forEach((u,f)=>{u.type||l.push({path:`legends[${f}].type`,message:"legend type is required",severity:"error"})}):l.push({path:"legends",message:"legends must be an array",severity:"error"})),l}function O5(s){const l=[],u=["gaode","mapbox","maplibre","tianditu","tencent","baidu","google","map"];if(s.basemap&&!u.includes(s.basemap)&&l.push({path:"map.basemap",message:`Invalid basemap "${s.basemap}". Valid values: ${u.join(", ")}`,severity:"error"}),s.center){const[f,h]=s.center;(f<-180||f>180)&&l.push({path:"map.center[0]",message:"Longitude must be between -180 and 180",severity:"error"}),(h<-90||h>90)&&l.push({path:"map.center[1]",message:"Latitude must be between -90 and 90",severity:"error"})}return s.zoom!==void 0&&(s.zoom<0||s.zoom>22)&&l.push({path:"map.zoom",message:"Zoom must be between 0 and 22",severity:"warning"}),s.basemap&&["gaode","mapbox","tianditu","tencent","baidu","google"].includes(s.basemap)&&!s.token&&l.push({path:"map.token",message:`basemap "${s.basemap}" requires a token`,severity:"warning"}),l}function U5(s,l){const u=[],f=`layers[${l}]`,h=["point","line","polygon","heatmap","raster","image"];return s.type?h.includes(s.type)||u.push({path:`${f}.type`,message:`Invalid layer type "${s.type}". Valid values: ${h.join(", ")}`,severity:"error"}):u.push({path:`${f}.type`,message:"layer type is required",severity:"error"}),s.source===void 0&&s.source,s.colorField&&!s.colorValues&&!s.color&&u.push({path:`${f}.colorValues`,message:"colorField is set but colorValues is not. L7 will use default scale.",severity:"warning"}),s.sizeField&&!s.sizeValues&&s.size===void 0&&u.push({path:`${f}.sizeValues`,message:"sizeField is set but sizeValues is not. L7 will use default scale.",severity:"warning"}),u}const $5={$schema:"http://json-schema.org/draft-07/schema#",title:"AiMapSchema",description:"Schema-driven React map visualization component configuration",type:"object",required:["map","layers"],properties:{map:{type:"object",required:["basemap"],properties:{basemap:{type:"string",enum:["gaode","mapbox","maplibre","tianditu","tencent","baidu","google","map"],description:"Map base tile provider"},token:{type:"string",description:"API token for the map service"},style:{type:"string",description:"Map style preset (light/dark/normal/darkblue/satellite) or custom URL"},center:{type:"array",items:{type:"number"},minItems:2,maxItems:2,description:"Map center [longitude, latitude], default [105, 35]"},zoom:{type:"number",description:"Map zoom level, default 4"},pitch:{type:"number",description:"Map pitch in degrees, default 0"},rotation:{type:"number",description:"Map rotation in degrees, default 0"},minZoom:{type:"number",description:"Minimum zoom level"},maxZoom:{type:"number",description:"Maximum zoom level"},bounds:{type:"array",items:{type:"array",items:{type:"number"},minItems:2,maxItems:2},minItems:2,maxItems:2,description:"Initial bounds [[swLng, swLat], [neLng, neLat]]"},gestureConfig:{type:"object",properties:{dragPan:{type:"boolean"},pinchZoom:{type:"boolean"},dragRotate:{type:"boolean"}}}}},layers:{type:"array",description:"Array of map layers",items:{type:"object",required:["type","source"],properties:{id:{type:"string",description:"Unique layer ID (auto-generated if omitted)"},type:{type:"string",enum:["point","line","polygon","heatmap","raster","image"],description:"Layer visualization type"},name:{type:"string",description:"Human-readable layer name"},visible:{type:"boolean",default:!0},zIndex:{type:"number",default:0},minZoom:{type:"number"},maxZoom:{type:"number"},autoFit:{type:"boolean",default:!1},source:{description:"GeoJSON, JSON array, or URL string"},sourceType:{type:"string",enum:["geojson","json","csv"]},sourceConfig:{type:"object",properties:{x:{type:"string",description:"Longitude field name"},y:{type:"string",description:"Latitude field name"},x1:{type:"string",description:"End longitude field (for arc lines)"},y1:{type:"string",description:"End latitude field (for arc lines)"},coordinates:{type:"string",description:"Coordinates field"}}},color:{type:"string",description:"Fixed color"},colorField:{type:"string",description:"Field to map color to"},colorValues:{oneOf:[{type:"string",description:"Color palette name"},{type:"array",items:{type:"string"},description:"Array of color values"}]},size:{type:"number",description:"Fixed size"},sizeField:{type:"string",description:"Field to map size to"},sizeValues:{type:"array",items:{type:"number"},description:"Size range [min, max]"},shape:{type:"string",description:"Fixed shape"},shapeField:{type:"string",description:"Field to map shape to"},shapeValues:{type:"array",items:{type:"string"}},style:{type:"object",description:"Additional style properties"},filterField:{type:"string"},filterValues:{type:"array"},animate:{type:"object",properties:{enable:{type:"boolean"},speed:{type:"number"},duration:{type:"number"},trailLength:{type:"number"},repeat:{type:"number"}}},active:{oneOf:[{type:"boolean"},{type:"object",properties:{color:{type:"string"}}}]},select:{oneOf:[{type:"boolean"},{type:"object",properties:{color:{type:"string"}}}]},events:{type:"object",description:"Layer event configuration",properties:{click:{type:"string",description:"Event identifier emitted on click (via EventBus)"},mousemove:{type:"string",description:"Event identifier emitted on mousemove"},mouseenter:{type:"string",description:"Event identifier emitted on mouseenter"},mouseleave:{type:"string",description:"Event identifier emitted on mouseleave"},enablePopup:{type:"boolean",description:"Auto-show popup on click"},popupFields:{type:"array",items:{type:"string"},description:"Fields to show in popup"},popupTemplate:{type:"string",description:"HTML template with {{field}} interpolation"}}}}}},controls:{type:"array",description:"Map control widgets",items:{type:"object",required:["type"],properties:{type:{type:"string",enum:["zoom","scale","fullscreen","geoLocate","mapTheme","mouseLocation","exportImage","layerSwitch"]},position:{type:"string",enum:["topleft","topright","bottomleft","bottomright","topcenter","bottomcenter"]},options:{type:"object"}}}},interactions:{type:"array",description:"Interactive elements (markers, popups, tooltips)",items:{oneOf:[{type:"object",required:["type","longitude","latitude"],properties:{type:{type:"string",const:"marker"},longitude:{type:"number"},latitude:{type:"number"},content:{type:"string"},draggable:{type:"boolean"}}},{type:"object",required:["type","longitude","latitude","content"],properties:{type:{type:"string",const:"popup"},longitude:{type:"number"},latitude:{type:"number"},content:{type:"string"},closeButton:{type:"boolean"}}},{type:"object",required:["type","content"],properties:{type:{type:"string",const:"tooltip"},content:{type:"string"},trigger:{type:"string",enum:["hover","click"]}}}]}},legends:{type:"array",description:"Legend configurations",items:{oneOf:[{type:"object",required:["type","labels","colors"],properties:{type:{type:"string",const:"categories"},title:{type:"string"},labels:{type:"array",items:{type:"string"}},colors:{type:"array",items:{type:"string"}}}},{type:"object",required:["type","labels","colors"],properties:{type:{type:"string",const:"ramp"},title:{type:"string"},labels:{type:"array",items:{type:"string"}},colors:{type:"array",items:{type:"string"}},isContinuous:{type:"boolean"}}},{type:"object",required:["type","labels"],properties:{type:{type:"string",const:"proportion"},title:{type:"string"},labels:{type:"array",items:{type:"array",items:{type:"number"}}},fillColor:{type:"string"}}},{type:"object",required:["type","items"],properties:{type:{type:"string",const:"icon"},title:{type:"string"},items:{type:"array",items:{type:"object",properties:{icon:{type:"string"},label:{type:"string"}}}}}}]}},responsive:{type:"object",properties:{breakpoint:{type:"number",default:768},mobile:{type:"object",properties:{controls:{type:"object",properties:{position:{type:"string"},scale:{type:"number"},hide:{type:"array",items:{type:"string"}}}},legends:{type:"object",properties:{compact:{type:"boolean"},position:{type:"string"}}},toolbar:{type:"object",required:["items","position"],properties:{items:{type:"array",items:{type:"string"}},position:{type:"string",enum:["bottom","top"]}}}}}}},events:{type:"object",description:"Global event identifier mappings for map and interactions",properties:{mapMove:{type:"string",description:"Event identifier for map move"},mapZoom:{type:"string",description:"Event identifier for map zoom"},markerDragEnd:{type:"string",description:"Event identifier for marker drag end"}}}}};function RA({source:s,sourceType:l,sourceConfig:u,onClick:f,onMouseMove:h,onMouseEnter:y,onMouseLeave:m,onLayerCreated:C,...x}){const L=jA();if(!L)return null;const M={...x,type:"point",source:s,sourceType:l??"json",sourceConfig:u},S=f||h||y||m?{onClick:f,onMouseMove:h,onMouseEnter:y,onMouseLeave:m}:void 0;return g.jsx(Ge,{schema:M,scene:L,eventHandlers:S,onLayerCreated:C})}function re({source:s,sourceType:l,sourceConfig:u,onClick:f,onMouseMove:h,onMouseEnter:y,onMouseLeave:m,onLayerCreated:C,...x}){const L=jA();if(!L)return null;const M={...x,type:"line",source:s,sourceType:l??"json",sourceConfig:u},S=f||h||y||m?{onClick:f,onMouseMove:h,onMouseEnter:y,onMouseLeave:m}:void 0;return g.jsx(Ge,{schema:M,scene:L,eventHandlers:S,onLayerCreated:C})}function Lt({source:s,sourceType:l,sourceConfig:u,onClick:f,onMouseMove:h,onMouseEnter:y,onMouseLeave:m,onLayerCreated:C,...x}){const L=jA();if(!L)return null;const M={...x,type:"polygon",source:s,sourceType:l??"geojson",sourceConfig:u},S=f||h||y||m?{onClick:f,onMouseMove:h,onMouseEnter:y,onMouseLeave:m}:void 0;return g.jsx(Ge,{schema:M,scene:L,eventHandlers:S,onLayerCreated:C})}function S2({source:s,sourceType:l,sourceConfig:u,onClick:f,onMouseMove:h,onMouseEnter:y,onMouseLeave:m,onLayerCreated:C,...x}){const L=jA();if(!L)return null;const M={...x,type:"heatmap",source:s,sourceType:l??"json",sourceConfig:u},S=f||h||y||m?{onClick:f,onMouseMove:h,onMouseEnter:y,onMouseLeave:m}:void 0;return g.jsx(Ge,{schema:M,scene:L,eventHandlers:S,onLayerCreated:C})}function D2({source:s,sourceType:l="json",sourceConfig:u,hexSize:f=100,weightField:h="h12",weightMethod:y="sum",onClick:m,onMouseMove:C,style:x,...L}){const M=[{type:"hexagon",size:f,field:h,method:y}];return g.jsx(S2,{...L,source:s,sourceType:l,sourceConfig:{...u,transforms:M},shape:"hexagonColumn",style:{coverage:.8,angle:0,...x??{}},onClick:m,onMouseMove:C})}function H2({source:s,sourceType:l,sourceConfig:u,onClick:f,...h}){const y=jA();if(!y)return null;const m={...h,type:"raster",source:s,sourceType:l??"raster",sourceConfig:u},C=f?{onClick:f}:void 0;return g.jsx(Ge,{schema:m,scene:y,eventHandlers:C})}function W5({source:s,sourceType:l,sourceConfig:u,onClick:f,...h}){const y=jA();if(!y)return null;const m={...h,type:"image",source:s,sourceType:l??"image",sourceConfig:u},C=f?{onClick:f}:void 0;return g.jsx(Ge,{schema:m,scene:y,eventHandlers:C})}const B2=[8,16,32,48,64],Zt={primary:"#2563eb",warning:"#f59e0b",error:"#ef4444",success:"#10b981"};function G5({source:s,sourceType:l="geojson",sourceConfig:u,labelField:f="name",labelColor:h="#0b3b8c",labelSize:y=12,showLabel:m=!0,labelOffset:C,sizeDomain:x,bubbleAnchor:L="bottom",labelAnchor:M="top",hoverEffect:S=!0,clickEffect:z=!0,tooltipEffect:H=!0,tooltipFields:D,tooltipTemplate:V,semanticColorField:O,color:R="#2563eb",size:N=16,sizeField:F,sizeValues:Y,style:X,active:n0,select:Z,onClick:G,onMouseMove:r0,onMouseEnter:A0,onMouseLeave:o0,...q}){const t0=O??q.colorField,B=q.colorValues??(O?[Zt.primary,Zt.warning,Zt.error,Zt.success]:void 0),U=F?Y??[...B2]:Y,e0={color:"#60a5fa"},c0={color:"#1d4ed8"},h0=(()=>{const g0=q.events;return H?{...g0,enablePopup:(g0==null?void 0:g0.enablePopup)??!0,popupFields:(g0==null?void 0:g0.popupFields)??D,popupTemplate:(g0==null?void 0:g0.popupTemplate)??V}:g0})(),[p0,S0]=b.useState(!1);b.useEffect(()=>{const g0=requestAnimationFrame(()=>S0(!0));return()=>cancelAnimationFrame(g0)},[]);const Z0=m&&p0,x0=F?{sizeField:F,sizeValues:U}:{size:N};return g.jsxs(g.Fragment,{children:[g.jsx(RA,{source:s,sourceType:l,sourceConfig:u,shape:"circle",color:R,colorField:t0,colorValues:B,...x0,opacity:.75,active:S?n0??e0:n0,select:z?Z??c0:Z,events:h0,zIndex:q.zIndex??0,autoFit:q.autoFit,visible:q.visible,name:q.name??"bubble-circle",onClick:G,onMouseMove:r0,onMouseEnter:A0,onMouseLeave:o0,style:{stroke:R??"#004ac6",strokeWidth:2,strokeOpacity:1,...X??{}}}),Z0&&g.jsx(RA,{source:s,sourceType:l,sourceConfig:u,shapeField:f,shapeValues:"text",color:h,size:y,zIndex:(q.zIndex??0)+1,style:{textAnchor:M,textOffset:C??[0,0],stroke:"#fff",strokeWidth:2,textAllowOverlap:!0}})]})}function Y5({source:s,sourceType:l="geojson",sourceConfig:u,gridSize:f=60,minClusterSize:h=2,animationDuration:y=300,easing:m="cubic-bezier(0.4, 0, 0.2, 1)",onPointClick:C,onClusterClick:x}){const L=jA(),[M,S]=b.useState([]),[z,H]=b.useState(null),[D,V]=b.useState(null),O=b.useRef(null),R=b.useRef(-1),N=b.useMemo(()=>J5(s,l,u),[s,l,u]);b.useEffect(()=>{if(N.length===0){O.current=null,S([]),R.current=-1;return}const Z=new Io({radius:f,minPoints:h,maxZoom:20,minZoom:0}),G=N.map(r0=>({type:"Feature",properties:{id:r0.id,...r0.properties},geometry:{type:"Point",coordinates:[r0.lng,r0.lat]}}));Z.load(G),O.current=Z,R.current=-1},[N,f,h]);const F=b.useCallback((Z,G)=>{try{const r0=Math.floor(G.getZoom());if(r0===R.current)return;R.current=r0;let A0=[-180,-90,180,90];try{const t0=G.getBounds();t0&&(A0=[t0[0][0],t0[0][1],t0[1][0],t0[1][1]])}catch{}const q=Z.getClusters(A0,r0).map(t0=>{const B=t0.geometry.coordinates,U=B[0],e0=B[1];return t0.properties.cluster?{id:`cluster-${t0.properties.cluster_id}`,clusterId:t0.properties.cluster_id,lng:U,lat:e0,pointCount:t0.properties.point_count,isCluster:!0,properties:{}}:{id:`point-${t0.properties.id}`,clusterId:-1,lng:U,lat:e0,pointCount:1,isCluster:!1,properties:t0.properties}});S(q),H(null)}catch{}},[]);b.useEffect(()=>{var A0,o0;if(!L)return;const Z=L.mapService,G=()=>{requestAnimationFrame(()=>{const q=O.current;q&&L.loaded&&F(q,L)})};L.loaded?G():L.once("loaded",G);const r0=()=>{const q=O.current;q&&F(q,L)};return(A0=Z==null?void 0:Z.on)==null||A0.call(Z,"camerachange",r0),(o0=Z==null?void 0:Z.on)==null||o0.call(Z,"viewchange",r0),()=>{var q,t0;L.off("loaded",G),(q=Z==null?void 0:Z.off)==null||q.call(Z,"camerachange",r0),(t0=Z==null?void 0:Z.off)==null||t0.call(Z,"viewchange",r0)}},[L,F]);const Y=b.useCallback(Z=>{if(!L||!Z.isCluster)return;let G=[];const r0=O.current;r0&&(G=r0.getLeaves(Z.clusterId,1/0)),x==null||x(Z,G);try{if(L.getZoom()>=20-.5){H(q=>q===Z.id?null:Z.id);return}if(G.length>0){const q=G.map(c0=>c0.geometry.coordinates),t0=q.map(c0=>c0[0]),B=q.map(c0=>c0[1]),U=[Math.min(...t0),Math.min(...B)],e0=[Math.max(...t0),Math.max(...B)];L.fitBounds([U,e0],{padding:[40,40,40,40],duration:y})}}catch{}},[L,x,y]),X=b.useMemo(()=>{if(!L||!z||!O.current)return[];const Z=M.find(G=>G.id===z&&G.isCluster);if(!Z)return[];try{const G=O.current.getLeaves(Z.clusterId,1/0),r0=L.mapService;if(!r0)return[];const A0=r0.lngLatToContainer([Z.lng,Z.lat]);if(!A0)return[];const o0=G.length,q=Math.max(24,Math.min(72,18+o0*2));return G.map((t0,B)=>{var p0,S0;const U=Math.PI*2*B/o0-Math.PI/2,e0=A0.x+Math.cos(U)*q,c0=A0.y+Math.sin(U)*q,h0=r0.containerToLngLat([e0,c0]);return{id:`spider-${Z.id}-${((p0=t0.properties)==null?void 0:p0.id)??B}`,lng:h0.lng,lat:h0.lat,point:{id:String(((S0=t0.properties)==null?void 0:S0.id)??B),lng:t0.geometry.coordinates[0],lat:t0.geometry.coordinates[1],properties:t0.properties??{}}}})}catch{return[]}},[L,z,M]),n0=b.useMemo(()=>z?M.find(Z=>Z.id===z&&Z.isCluster)??null:null,[z,M]);return g.jsxs(g.Fragment,{children:[z&&n0&&X.map(Z=>g.jsx(Ue,{longitude:Z.lng,latitude:Z.lat,anchor:"center",content:g.jsx(q5,{centerLng:n0.lng,centerLat:n0.lat,lineLng:Z.lng,lineLat:Z.lat})},`line-${Z.id}`)),M.map(Z=>{var o0;if(!Z.isCluster)return g.jsx(Ue,{longitude:Z.lng,latitude:Z.lat,anchor:"center",content:g.jsx("div",{title:String(((o0=Z.properties)==null?void 0:o0.name)??"单点"),onClick:()=>{var q;return C==null?void 0:C({id:String(((q=Z.properties)==null?void 0:q.id)??""),lng:Z.lng,lat:Z.lat,properties:Z.properties})},style:{width:14,height:14,borderRadius:9999,background:"#2563eb",border:"2px solid #fff",boxShadow:"0 2px 10px rgba(37,99,235,.5), 0 0 0 3px rgba(37,99,235,.15)",transition:"transform 0.15s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.15s cubic-bezier(0.4, 0, 0.2, 1)",cursor:"pointer"}})},Z.id);const G=Z.pointCount,r0=X5(G),A0=D===Z.id;return g.jsx(Ue,{longitude:Z.lng,latitude:Z.lat,anchor:"center",content:g.jsxs("div",{title:`包含 ${G} 个要素`,onClick:()=>Y(Z),onMouseEnter:()=>V(Z.id),onMouseLeave:()=>V(q=>q===Z.id?null:q),style:{width:r0.size,height:r0.size,borderRadius:9999,display:"flex",alignItems:"center",justifyContent:"center",color:"#fff",fontWeight:r0.fontWeight,fontSize:r0.fontSize,background:r0.background,border:r0.border,boxShadow:r0.shadow,position:"relative",cursor:"pointer",transition:"transform 0.15s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.15s cubic-bezier(0.4, 0, 0.2, 1)",transform:A0?"scale(1.1)":"scale(1)"},children:[r0.pulse&&g.jsx("span",{style:{position:"absolute",inset:-6,borderRadius:9999,background:"rgba(37,99,235,0.25)",animation:"aimapui-cluster-pulse 1.6s ease-out infinite"}}),g.jsx("span",{style:{position:"relative",zIndex:1},children:G})]})},Z.id)}),X.map(Z=>{var G;return g.jsx(Ue,{longitude:Z.lng,latitude:Z.lat,anchor:"center",content:g.jsx("div",{title:String(((G=Z.point.properties)==null?void 0:G.name)??Z.point.id),onClick:()=>C==null?void 0:C(Z.point),style:{width:10,height:10,borderRadius:9999,background:"#fff",border:"2px solid #2563eb",boxShadow:"0 2px 8px rgba(0,0,0,.2)",cursor:"pointer"}})},Z.id)})]})}function q5({centerLng:s,centerLat:l,lineLng:u,lineLat:f}){const h=jA(),y=b.useRef(null);return b.useEffect(()=>{if(!h)return;const m=h.mapService;if(!m)return;const C=()=>{const M=y.current;if(M)try{const S=m.lngLatToContainer([s,l]),z=m.lngLatToContainer([u,f]);if(!S||!z)return;const H=z.x-S.x,D=z.y-S.y,V=Math.sqrt(H*H+D*D),O=Math.atan2(D,H)*180/Math.PI;M.style.width=`${V}px`,M.style.transform=`rotate(${O}deg)`}catch{}};C();const x=(M,S,z)=>{var H;try{(H=M==null?void 0:M.on)==null||H.call(M,S,z)}catch{}},L=(M,S,z)=>{var H;try{(H=M==null?void 0:M.off)==null||H.call(M,S,z)}catch{}};return x(m,"camerachange",C),x(m,"viewchange",C),()=>{L(m,"camerachange",C),L(m,"viewchange",C)}},[h,s,l,u,f]),g.jsx("div",{ref:y,style:{position:"absolute",left:0,top:0,height:1,background:"rgba(195, 198, 215, 0.5)",transformOrigin:"0 50%",pointerEvents:"none"}})}function X5(s){return s>=1e3?{size:48,fontSize:14,fontWeight:700,background:"linear-gradient(135deg, #2563eb 0%, #1e3a8a 100%)",border:"2px solid rgba(255,255,255,0.55)",shadow:"0 10px 24px rgba(37,99,235,.45)",pulse:!0}:s>=100?{size:40,fontSize:13,fontWeight:700,background:"rgba(37,99,235,0.30)",border:"2px solid rgba(255,255,255,0.5)",shadow:"0 6px 16px rgba(37,99,235,.25)",pulse:!1}:{size:32,fontSize:12,fontWeight:600,background:"radial-gradient(circle, #2563eb 60%, rgba(37,99,235,0.20) 61%)",border:"1px solid rgba(255,255,255,0.55)",shadow:"0 4px 12px rgba(37,99,235,.2)",pulse:!1}}function J5(s,l,u){if(!s)return[];if(l==="geojson"&&typeof s=="object"&&s!==null){const f=s;return(Array.isArray(f.features)?f.features:[]).map((y,m)=>{var L,M,S;const C=y,x=(L=C==null?void 0:C.geometry)==null?void 0:L.coordinates;return!Array.isArray(x)||x.length<2?null:{id:String(((M=C==null?void 0:C.properties)==null?void 0:M.id)??((S=C==null?void 0:C.properties)==null?void 0:S.Id)??m),lng:Number(x[0]),lat:Number(x[1]),properties:(C==null?void 0:C.properties)??{}}}).filter(Boolean)}if(Array.isArray(s)){const f=(u==null?void 0:u.x)??"lng",h=(u==null?void 0:u.y)??"lat";return s.map((y,m)=>{const C=y,x=Number(C[f]),L=Number(C[h]);return Number.isNaN(x)||Number.isNaN(L)?null:{id:String(C.id??m),lng:x,lat:L,properties:C}}).filter(Boolean)}return[]}const K5=["#dbeafe","#93c5fd","#60a5fa","#3b82f6","#2563eb"],Al=["#dc2626","#fca5a5","#e5e7eb","#86efac","#16a34a"],el=["#2563eb","#f59e0b","#ef4444","#10b981","#8b5cf6","#14b8a6","#f97316","#64748b"];function tl({source:s,sourceType:l="geojson",colorMapping:u="sequential",showStroke:f=!0,strokeColor:h="rgba(255,255,255,0.30)",strokeWidth:y=.5,hoverEffect:m=!0,clickEffect:C=!0,stickySelection:x=!0,tooltipEffect:L=!0,tooltipFields:M,tooltipTemplate:S,regionIdField:z="name",highlightStrokeColor:H="#2563eb",highlightStrokeWidth:D=2,zoomToRegionOnClick:V=!0,clickZoomPadding:O=40,clickZoomDelta:R=1.2,onRegionClick:N,onDrilldown:F,onLayerCreated:Y,showLabel:X=!1,labelField:n0="name",labelColor:Z="#0f172a",labelSize:G=11,labelAreaThreshold:r0=5e-5,labelHaloWidth:A0=2,minLabelZoom:o0,valueField:q,percentageField:t0,nameField:B,color:U,colorField:e0,colorValues:c0,active:h0,select:p0,events:S0,style:Z0,...x0}){const g0=jA(),[T0,j0]=b.useState(null),[B0,pA]=b.useState(null),[E0,D0]=b.useState(()=>{if(!g0)return 0;try{return g0.getZoom()}catch{return 0}});b.useEffect(()=>{if(!g0)return;const v0=()=>{try{D0(g0.getZoom())}catch{}};return v0(),g0.on("zoomchange",v0),()=>{g0.off("zoomchange",v0)}},[g0]);const Q0=o0===void 0||E0>=o0,l0=b.useMemo(()=>{if(c0)return c0;switch(u){case"diverging":return[...Al];case"categorical":return[...el];case"sequential":default:return[...K5]}},[c0,u]),T=q??e0??"value",a0=B??n0,Q=b.useMemo(()=>S??nl(a0,T,t0),[S,a0,T,t0]),H0={color:"#ffffff"},d0={color:"#0f172a"},b0=b.useMemo(()=>rl(s,l,n0,z,r0),[s,l,n0,z,r0]),I0=b.useCallback(v0=>{N==null||N(v0);const G0=kr(v0.feature,z);if(G0!==null&&C&&pA(fA=>!x&&fA===G0?null:G0),v0.feature&&(F==null||F(v0.feature)),!g0||!V)return;const sA=Number.isFinite(v0.lng)&&Number.isFinite(v0.lat)?[v0.lng,v0.lat]:ol(v0.originalEvent);if(sA)try{const fA=g0.getZoom(),kA=Math.abs(R);g0.setCenter(sA),g0.setZoom(fA+kA)}catch{}},[N,z,C,x,F,g0,V,R]),F0=b.useCallback(v0=>{if(!m)return;const G0=kr(v0.feature,z);j0(G0)},[m,z]),L0=b.useCallback(()=>{m&&j0(null)},[m]),_0=b.useMemo(()=>{const v0=S0;return L?{...v0,enablePopup:(v0==null?void 0:v0.enablePopup)??!0,popupTrigger:(v0==null?void 0:v0.popupTrigger)??"hover",popupFields:(v0==null?void 0:v0.popupFields)??M,popupTemplate:(v0==null?void 0:v0.popupTemplate)??Q}:v0},[S0,L,M,Q]);return g.jsxs(g.Fragment,{children:[g.jsx(Lt,{...x0,source:s,sourceType:l,shape:x0.shape??"fill",color:U??"#2563eb",colorField:e0,colorValues:l0,active:m?h0??H0:h0,select:C?p0??d0:p0,events:_0,onClick:I0,onMouseEnter:F0,onMouseLeave:L0,onLayerCreated:Y,style:{opacity:.8,...Z0??{}}}),f&&g.jsx(re,{source:s,sourceType:l,color:h,size:y,zIndex:2}),m&&T0!==null&&g.jsxs(g.Fragment,{children:[g.jsx(re,{source:s,sourceType:l,color:Lr(H,.35),size:D+2,filterField:z,filterValues:[T0],zIndex:3}),g.jsx(re,{source:s,sourceType:l,color:H,size:D,filterField:z,filterValues:[T0],zIndex:4})]}),C&&B0!==null&&g.jsx(re,{source:s,sourceType:l,color:Lr(H,.9),size:Math.max(1.5,D),filterField:z,filterValues:[B0],zIndex:5}),X&&Q0&&g.jsx(RA,{source:b0.data,sourceType:b0.sourceType,sourceConfig:b0.sourceConfig,shapeField:n0,shapeValues:"text",color:Z,size:G,style:{textAllowOverlap:!1,stroke:"#ffffff",strokeWidth:A0,fontFamily:"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, Liberation Mono, Courier New, monospace"}})]})}function nl(s,l,u){const f=u?`<tr><td style="padding-right:8px;color:#64748b">占比</td><td style="font-weight:600">{{${u}}}%</td></tr>`:"";return['<div style="min-width:160px">',`<div style="font-weight:700;margin-bottom:6px">{{${s}}}</div>`,'<table style="font-size:12px;line-height:1.4">',`<tr><td style="padding-right:8px;color:#64748b">指标</td><td style="font-weight:600">{{${l}}}</td></tr>`,f,"</table>","</div>"].join("")}function Lr(s,l){if(s.startsWith("#")){const u=s.replace("#",""),f=u.length===3?`${u[0]}${u[0]}${u[1]}${u[1]}${u[2]}${u[2]}`:u;if(f.length===6){const h=parseInt(f.slice(0,2),16),y=parseInt(f.slice(2,4),16),m=parseInt(f.slice(4,6),16);return`rgba(${h},${y},${m},${l})`}}return s}function kr(s,l){if(!s)return null;const u=s[l]??s.id??s.name;return typeof u=="string"||typeof u=="number"?u:null}function rl(s,l,u,f,h){return l!=="geojson"||!il(s)?{data:s,sourceType:l}:{data:s.features.map(m=>{if(!m||!m.geometry||!m.properties)return null;const C=V2(m.geometry),x=ll(m.geometry);if(!C||x<h)return null;const L=m.properties;return{lng:C[0],lat:C[1],[u]:L[u],[f]:L[f]}}).filter(m=>m!==null),sourceType:"json",sourceConfig:{x:"lng",y:"lat"}}}function il(s){if(!s||typeof s!="object")return!1;const l=s;return l.type==="FeatureCollection"&&Array.isArray(l.features)}function ol(s){const l=sl(s);return l?V2(l):null}function sl(s){var u,f;const l=s;return((u=l==null?void 0:l.feature)==null?void 0:u.geometry)??((f=l==null?void 0:l.data)==null?void 0:f.geometry)??null}function V2(s){if(s.type==="Polygon")return Mr(s.coordinates[0]);if(s.type==="MultiPolygon"){let l=0,u=null;return s.coordinates.forEach(f=>{const h=f[0],y=Math.abs(F1(h));y>l&&(l=y,u=Mr(h))}),u}return null}function ll(s){return s.type==="Polygon"?Math.abs(F1(s.coordinates[0])):s.type==="MultiPolygon"?s.coordinates.reduce((l,u)=>l+Math.abs(F1(u[0])),0):0}function Mr(s){if(!s||s.length<3)return null;let l=0,u=0,f=0;for(let y=0;y<s.length-1;y+=1){const[m,C]=s[y],[x,L]=s[y+1],M=m*L-x*C;l+=M,u+=(m+x)*M,f+=(C+L)*M}const h=l/2;if(Math.abs(h)<1e-12){const y=s[0];return y?[y[0],y[1]]:null}return[u/(6*h),f/(6*h)]}function F1(s){if(!s||s.length<3)return 0;let l=0;for(let u=0;u<s.length-1;u+=1){const[f,h]=s[u],[y,m]=s[u+1];l+=f*m-y*h}return l/2}const _2=["#eff6ff","#bfdbfe","#60a5fa","#2563eb","#1d4ed8","#1e3a8a"],I2="https://mdn.alipayobjects.com/antforest/afts/file/A*T2OJQ7XZzeEAAAAAgCAAAAgAerd2AQ/original_中国_省.json",P2="https://mdn.alipayobjects.com/antforest/afts/file/A*Xd8TQoduwj8AAAAAgEAAAAgAerd2AQ/original_中国_市.json",T2="https://mdn.alipayobjects.com/portal_moelhz/afts/file/A*Rb96Tac1p8EAAAAAgKAAAAgAegAAAQ",al=b.forwardRef(function(l,u){const{provinceSource:f=I2,citySource:h=P2,districtSource:y=T2,level:m="province",drillEnabled:C=!0,drillPath:x,onDrill:L,onDrillUp:M,autoFitOnDrill:S=!0,data:z,joinField:H="name",dataJoinField:D="name",valueField:V="value",colors:O=[..._2],fillOpacity:R=.8,strokeColor:N="rgba(255,255,255,0.5)",strokeWidth:F=1.5,dimOpacity:Y=.12,showLabel:X=!0,labelField:n0="name",labelSize:Z=12,hoverHighlight:G=!0,clickSelect:r0=!0,showTooltip:A0=!0,tooltipFields:o0,onRegionClick:q,zIndex:t0=0}=l,B=jA(),[U,e0]=b.useState(null),[c0,h0]=b.useState(null),[p0,S0]=b.useState(null),[Z0,x0]=b.useState(null),[g0,T0]=b.useState([{level:"province",name:"中国"}]),j0=x??g0,B0=C?ul(j0):m,pA=b.useCallback(()=>{if(j0.length<=1)return;const L0=j0.slice(0,-1);x?M==null||M(L0):(T0(L0),M==null||M(L0),L==null||L(L0)),Q0(null)},[j0,x,M,L]),E0=b.useCallback(L0=>{if(L0<0||L0>=j0.length-1)return;const _0=j0.slice(0,L0+1);x?M==null||M(_0):(T0(_0),M==null||M(_0),L==null||L(_0)),Q0(null)},[j0,x,M,L]),[D0,Q0]=b.useState(null);b.useImperativeHandle(u,()=>({drillUp:pA,drillUpTo:E0,getDrillPath:()=>j0}),[pA,E0,j0]);const l0=b.useRef(j0.length);b.useEffect(()=>{S1(f,e0,x0)},[f]),b.useEffect(()=>{h&&S1(h,h0)},[h]),b.useEffect(()=>{y&&S1(y,S0)},[y]);const T=b.useMemo(()=>{switch(B0){case"city":return c0;case"district":return p0;default:return U}},[B0,U,c0,p0]),a0=b.useMemo(()=>!T||!z||z.length===0?T:gl(T,z,H,D,V),[T,z,H,D,V]),Q=b.useMemo(()=>{if(!C||j0.length<=1)return a0;if(!a0)return null;const L0=j0[j0.length-1];return!L0.adcode&&!L0.name?a0:yl(a0,L0)},[C,j0,a0,H]),H0=b.useMemo(()=>!C||j0.length<=1?null:(j0.length===2?U:c0)??null,[C,j0,U,c0]);b.useMemo(()=>`<div style="min-width:140px"><table style="font-size:12px;line-height:1.6">${(o0??[n0,V]).map(v0=>`<tr><td style="padding-right:8px;color:#64748b">${v0}</td><td style="font-weight:600">{{${v0}}}</td></tr>`).join("")}</table></div>`,[o0,n0,V]);const d0=!!(z&&z.length>0),b0=b.useMemo(()=>a0?Q??a0:null,[Q,a0]),I0=B0==="province"?F:F*.6;b.useEffect(()=>{if(!(!S||!B||!b0||l0.current===j0.length)){l0.current=j0.length;try{const _0=bl(b0);_0&&B.fitBounds(_0,{padding:[40,40,40,40]})}catch{}}},[S,B,b0,j0.length]);const F0=b.useCallback(L0=>{const _0=L0.feature;if(!_0)return;const v0=String(_0[n0]??_0.name??""),G0=_0.adcode??_0.gb;if(q==null||q(_0,B0),r0&&Q0(sA=>sA===v0?null:v0),C&&fl(B0)){const sA=[...j0,{level:B0,name:v0,adcode:G0}];x||T0(sA),L==null||L(sA),Q0(null)}},[n0,B0,r0,C,j0,x,L,q]);return!B||!b0?null:g.jsxs(g.Fragment,{children:[C&&H0&&j0.length>1&&g.jsxs(g.Fragment,{children:[g.jsx(Lt,{source:H0,sourceType:"geojson",shape:"fill",color:"#94a3b8",style:{opacity:Y},zIndex:t0}),g.jsx(re,{source:H0,sourceType:"geojson",color:"rgba(148,163,184,0.2)",size:.5,zIndex:t0+1})]}),g.jsx(Lt,{source:b0,sourceType:"geojson",shape:"fill",...d0?{colorField:V,colorValues:O}:{color:O[2]??"#3b82f6"},active:G?{color:"#ffffff"}:void 0,select:r0?{color:"#0f172a"}:void 0,style:{opacity:R},onClick:F0,zIndex:t0+2}),g.jsx(re,{source:b0,sourceType:"geojson",color:N,size:I0,zIndex:t0+3}),Z0&&B0==="province"&&j0.length<=1&&g.jsx(re,{source:Z0,sourceType:"geojson",color:"#94a3b8",size:1,zIndex:t0+3}),X&&b0&&g.jsx(cl,{geoData:b0,labelField:n0,labelSize:Z,zIndex:t0+4})]})});function cl({geoData:s,labelField:l,labelSize:u,zIndex:f}){const h=b.useMemo(()=>Cl(s,l),[s,l]);return!h||h.data.length===0?null:g.jsx(RA,{source:h.data,sourceType:h.sourceType,sourceConfig:h.sourceConfig,shapeField:l,shapeValues:"text",color:"#0f172a",size:u,style:{textAllowOverlap:!1,stroke:"#ffffff",strokeWidth:2,fontFamily:"PingFang SC, Microsoft YaHei, sans-serif"},zIndex:f})}function ul(s){return s.length<=1?"province":s.length===2?"city":"district"}function fl(s){return s!=="district"}const dl=new Set(["境界线","边界线","九段线","十段线"]);function hl(s){var u,f,h;const l=(u=s.properties)==null?void 0:u.name;if(typeof l!="string")return!1;if(l==="九段线"||l==="十段线")return!0;if(l==="境界线"){const y=(f=s.geometry)==null?void 0:f.type;if(y!=="MultiLineString"&&y!=="LineString")return!1;const m=(h=s.geometry)==null?void 0:h.coordinates;if(!m)return!1;const C=y==="MultiLineString"?m.flat():m;if(Math.min(...C.map(L=>L[1]))<10)return!0}return!1}function pl(s){var f,h;const l=(f=s.properties)==null?void 0:f.name;if(!l||typeof l!="string"||dl.has(l))return!1;const u=(h=s.geometry)==null?void 0:h.type;return!(u==="LineString"||u==="MultiLineString")}function Er(s){const l=[],u=[];for(const f of s.features)hl(f)?u.push(f):pl(f)&&l.push(f);return{admin:{type:"FeatureCollection",features:l},dashLine:u.length>0?{type:"FeatureCollection",features:u}:null}}function S1(s,l,u){if(typeof s=="string")fetch(s).then(f=>f.json()).then(f=>{if(f&&f.type==="FeatureCollection"){const h=Er(f);l(h.admin),u==null||u(h.dashLine)}}).catch(()=>{});else if(s&&s.type==="FeatureCollection"){const f=Er(s);l(f.admin),u==null||u(f.dashLine)}}function gl(s,l,u,f,h){const y=new Map;for(const C of l){const x=String(C[f]??"");x&&y.set(x,C)}return{type:"FeatureCollection",features:s.features.map(C=>{const x=String(C.properties[u]??""),L=y.get(x),M=L?L[h]??L.value??0:0;return{...C,properties:{...C.properties,...L??{},[h]:M}}})}}function D1(s){const l=String(s);return l.startsWith("156")&&l.length>=9?l.slice(3):l}const ml=["省","市","自治区","特别行政区","壮族","回族","维吾尔","藏族","彝族","苗","侗","瑶","白","哈尼","傣","傈僳","佤","畲","拉祜","水","景颇","土家","羌","毛南","仫佬","布朗","撒拉","裕固","塔吉克","柯尔克孜","锡伯","达斡尔","鄂温克","鄂伦春","赫哲","德昂","门巴","珞巴","基诺","怒","保安","京","独龙","仡佬","阿昌","普米"];function H1(s){let l=s;for(const u of ml)if(l.endsWith(u)){l=l.slice(0,-u.length);break}return l}function yl(s,l,u){const f=l.name,h=l.adcode,y=l.level,m=h?D1(String(h)):"",C=y==="city"&&m.endsWith("0000"),x=y==="province"||C?2:4;return{type:"FeatureCollection",features:s.features.filter(M=>{const S=M.properties;if(S.parent&&String(S.parent)===f||S.parentName&&String(S.parentName)===f)return!0;const z=S.adcode??S.gb;if(h&&z){const D=D1(String(h)),V=D1(String(z));if(V.length>=x&&V.slice(0,x)===D.slice(0,x)&&(V!==D||y==="province"))return!0}const H=H1(f);return!!(S.province&&(String(S.province)===f||H1(String(S.province))===H)||S.city&&(String(S.city)===f||H1(String(S.city))===H))})}}function Cl(s,l){const u=[];for(const f of s.features){if(!f.geometry||!f.properties)continue;const h=vl(f.geometry);h&&u.push({lng:h[0],lat:h[1],[l]:f.properties[l]??f.properties.name??""})}return u.length===0?null:{data:u,sourceType:"json",sourceConfig:{x:"lng",y:"lat"}}}function vl(s){const l=s.type,u=s.coordinates;if(!u)return null;if(l==="Point")return u;if(l==="Polygon")return zr(u);if(l==="MultiPolygon"){const f=u;let h=0,y=null;for(const m of f){const C=Math.abs(xl(m[0]));C>h&&(h=C,y=zr(m))}return y}return null}function zr(s){const l=s[0];if(!l||l.length===0)return null;let u=0,f=0;const h=l.length;for(const y of l)u+=y[0],f+=y[1];return[u/h,f/h]}function xl(s){let l=0;const u=s.length;for(let f=0;f<u;f++){const h=(f+1)%u;l+=s[f][0]*s[h][1],l-=s[h][0]*s[f][1]}return l/2}function bl(s){let l=1/0,u=1/0,f=-1/0,h=-1/0;for(const y of s.features)wl(y.geometry,(m,C)=>{m<l&&(l=m),C<u&&(u=C),m>f&&(f=m),C>h&&(h=C)});return!isFinite(l)||!isFinite(u)?null:[[l,u],[f,h]]}function wl(s,l){const u=s.type,f=s.coordinates;if(f){if(u==="Point"){const[h,y]=f;l(h,y)}else if(u==="LineString"||u==="MultiPoint")for(const[h,y]of f)l(h,y);else if(u==="Polygon"||u==="MultiLineString")for(const h of f)for(const[y,m]of h)l(y,m);else if(u==="MultiPolygon")for(const h of f)for(const y of h)for(const[m,C]of y)l(m,C)}}const Ll=[["sunny",""],["cloud",""],["cloudy",""],["partly_cloudy_day",""],["partly_cloudy_night",""],["rainy",""],["rainy_heavy",""],["rainy_light",""],["rainy_snow",""],["thunderstorm",""],["foggy",""],["air",""],["water_drop",""],["ac_unit",""],["filter_drama",""],["cloudy_snowing",""],["snowing",""],["snowflake",""],["severe_cold",""],["umbrella",""],["storm",""],["tornado",""],["thermostat",""],["heat",""],["hot",""],["flight",""],["flight_takeoff",""],["flight_land",""],["train",""],["directions_transit",""],["directions_railway",""],["directions_bus",""],["directions_car",""],["directions_boat",""],["directions_bike",""],["directions_walk",""],["directions_run",""],["taxi",""],["local_taxi",""],["local_airport",""],["connecting_airports",""],["two_wheeler",""],["tram",""],["subway",""],["ferry",""],["cable_car",""],["ev_station",""],["local_gas_station",""],["location_on",""],["place",""],["room",""],["pin",""],["pin_drop",""],["near_me",""],["my_location",""],["gps_fixed",""],["navigation",""],["explore",""],["map",""],["restaurant",""],["local_cafe",""],["coffee",""],["local_bar",""],["hotel",""],["local_hospital",""],["local_pharmacy",""],["local_atm",""],["local_police",""],["local_fire_department",""],["local_post_office",""],["local_library",""],["local_mall",""],["local_grocery_store",""],["store",""],["school",""],["church",""],["mosque",""],["synagogue",""],["temple_buddhist",""],["temple_hindu",""],["museum",""],["castle",""],["stadium",""],["theater_comedy",""],["pool",""],["fitness_center",""],["spa",""],["park",""],["forest",""],["attractions",""],["celebration",""],["festival",""],["nightlife",""],["sports",""],["sports_soccer",""],["sports_basketball",""],["sports_football",""],["sports_tennis",""],["sports_golf",""],["layers",""],["layers_clear",""],["terrain",""],["landscape",""],["share",""],["favorite",""],["star",""],["home",""],["work",""],["person",""],["people",""],["trip",""],["warning",""],["emergency",""],["photo_camera",""],["shopping_bag",""],["search",""],["settings",""],["info",""],["help",""],["close",""],["check",""],["add",""],["remove",""],["edit",""],["delete",""],["refresh",""],["download",""],["upload",""],["visibility",""],["visibility_off",""]],jr="Material Symbols Outlined",kl="https://fonts.gstatic.com/s/materialsymbolsoutlined/v261/kJEhBvYX7BgnkSrUwT8OhrdQw4oELdPIeeII9v6oFsI.woff2",Ml="M16 0C7.16344 0 0 7.16344 0 16C0 24.8366 16 40 16 40C16 40 32 24.8366 32 16C32 7.16344 24.8366 0 16 0Z";function El(s){const l=`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 40"><path d="${Ml}" fill="${s}" stroke="white" stroke-width="1.5"/></svg>`;return`data:image/svg+xml,${encodeURIComponent(l)}`}function zl({source:s,sourceType:l="json",sourceConfig:u,iconField:f,iconFontFamily:h="material-symbols",iconFontPath:y,iconFontMap:m,iconColor:C="#3b82f6",iconSize:x=20,iconHaloColor:L="#fff",iconHaloWidth:M=1,iconStyle:S,iconAnchor:z="center",iconBgShape:H="pin",iconBgShapeColor:D,iconBgShapeSize:V=24,iconBgStrokeColor:O,iconBgStrokeWidth:R=0,iconBgPadding:N=0,iconBgCornerRadius:F=0,showLabel:Y=!0,labelField:X,labelColor:n0="#333",labelSize:Z=11,labelAnchor:G="top",labelOffset:r0=[0,0],labelHaloColor:A0="#fff",labelHaloWidth:o0=2,labelStyle:q,textAllowOverlap:t0=!1,iconAllowOverlap:B=!0,zoomAdaption:U=!0,zoomShowLabel:e0=14,zoomDegradeToPoint:c0=10,onClick:h0,onMouseEnter:p0,onMouseLeave:S0,...Z0}){const x0=jA(),[g0,T0]=b.useState(!1),[j0,B0]=b.useState(!1),[pA,E0]=b.useState(!1),[D0,Q0]=b.useState(14),l0=b.useRef(!1);b.useEffect(()=>{if(!x0||H!=="pin"||!D)return;const I0=El(D);x0.addImage("glyph-pin-bg",I0),E0(!0)},[x0,H,D]);const{fontFamily:T,fontPath:a0,iconMappings:Q}=b.useMemo(()=>{switch(h){case"material-symbols":return{fontFamily:jr,fontPath:kl,iconMappings:Ll};default:return{fontFamily:h,fontPath:y??null,iconMappings:m??[]}}},[h,y,m]);if(b.useEffect(()=>{if(!x0||l0.current)return;l0.current=!0;let I0=!1;return(async()=>{a0&&x0.addFontFace(T,a0),Q.length>0&&x0.addIconFonts(Q);try{if(T===jr){const L0=Q.slice(0,10).map(([,_0])=>String.fromCharCode(parseInt(_0.replace("&#x","").replace(";",""),16))).join("");await document.fonts.load(`${x}px "${T}"`,L0)}else a0&&await new Promise(L0=>{const _0=setTimeout(()=>{L0()},3e3),v0=()=>{clearTimeout(_0),x0.off("fontloaded",v0),L0()};x0.on("fontloaded",v0),document.fonts.load(`${x}px "${T}"`).then(()=>{clearTimeout(_0),x0.off("fontloaded",v0),L0()}).catch(()=>{clearTimeout(_0),x0.off("fontloaded",v0),L0()})})}catch{console.warn(`[GlyphLayer] 字体 "${T}" 加载超时,尝试继续渲染`)}try{const _0=`${x}px "${T}"`;document.fonts.check(_0,"X")||await document.fonts.ready}catch{}I0||T0(!0)})(),()=>{I0=!0}},[x0,T,a0,Q,x]),b.useEffect(()=>{if(!x0)return;const I0=()=>B0(!0);return x0.loaded?I0():x0.on("loaded",I0),()=>{x0.off("loaded",I0)}},[x0]),b.useEffect(()=>{if(!x0||!U)return;const I0=()=>{Q0(x0.getZoom())};return I0(),x0.on("zoomchange",I0),()=>{x0.off("zoomchange",I0)}},[x0,U]),!g0||!j0||H==="pin"&&D&&!pA)return null;const H0=X??f,d0=!U||D0>=e0;return U&&D0<c0?g.jsx(RA,{source:s,sourceType:l,sourceConfig:u,shape:"circle",color:typeof C=="string"?C:"#3b82f6",size:4,style:{opacity:.7}}):g.jsxs(g.Fragment,{children:[g.jsx(RA,{...Z0,source:s,sourceType:l,sourceConfig:u,shapeField:f,shapeValues:"text",color:C,size:x,style:{fontFamily:T,iconfont:!0,textAllowOverlap:B,textAnchor:z,backgroundColor:D,backgroundPadding:N,backgroundRadius:F,backgroundShape:H==="pin"?void 0:"circle",stroke:O,strokeWidth:R,...S??{}},onClick:h0,onMouseEnter:p0,onMouseLeave:S0}),Y&&d0&&g.jsx(RA,{source:s,sourceType:l,sourceConfig:u,shapeField:H0,shapeValues:"text",color:n0,size:Z,style:{textAnchor:G,textOffset:r0,stroke:A0,strokeWidth:o0,fontWeight:"500",textAllowOverlap:t0,...q??{}}})]})}function F2({source:s,sourceType:l="json",sourceConfig:u,iconField:f,iconMap:h,iconSize:y=24,iconAnchor:m="bottom",size:C,showLabel:x=!0,labelField:L,labelColor:M="#333",labelSize:S=12,labelAnchor:z="top",labelOffset:H=[0,0],labelHaloColor:D="#fff",labelHaloWidth:V=2,labelStyle:O,textAllowOverlap:R=!1,iconAllowOverlap:N=!0,zoomAdaption:F=!0,zoomShowLabel:Y=15,zoomDegradeToPoint:X=10,onClick:n0,onMouseEnter:Z,onMouseLeave:G,...r0}){const A0=jA(),[o0,q]=b.useState(!1),[t0,B]=b.useState(15),U=b.useMemo(()=>Object.keys(h),[h]),e0=C??y,c0=L??f;if(b.useEffect(()=>{A0&&(U.forEach(S0=>{A0.addImage(S0,h[S0])}),q(!0))},[A0,U,h]),b.useEffect(()=>{if(!A0||!F)return;const S0=()=>{B(A0.getZoom())};return S0(),A0.on("zoomchange",S0),()=>{A0.off("zoomchange",S0)}},[A0,F]),!o0)return null;const h0=!F||t0>=Y;return F&&t0<X?g.jsx(RA,{source:s,sourceType:l,sourceConfig:u,shape:"circle",color:r0.color??"#3b82f6",size:6,style:{opacity:.8}}):g.jsxs(g.Fragment,{children:[g.jsx(RA,{source:s,sourceType:l,sourceConfig:u,shapeField:f,shapeValues:U,size:e0,style:{...r0.style??{},anchor:m,allowOverlap:N},onClick:n0,onMouseEnter:Z,onMouseLeave:G}),x&&h0&&g.jsx(RA,{source:s,sourceType:l,sourceConfig:u,shapeField:c0,shapeValues:"text",color:M,size:S,style:{textAnchor:z,textOffset:H,stroke:D,strokeWidth:V,fontWeight:"500",textAllowOverlap:R,...O??{}}})]})}const jl={gaode:()=>"https://webst0{1-4}.is.autonavi.com/appmaptile?style=6&x={x}&y={y}&z={z}",google:()=>"https://gwxc.shipxy.com/tile.g?z={z}&x={x}&y={y}",tianditu:(s="4043dde46add842282bacc412299311d")=>`https://t{0-7}.tianditu.gov.cn/DataServer?T=img_w&X={x}&Y={y}&L={z}&tk=${s}`},Sl={gaode:"高德卫星",tianditu:"天地图卫星",google:"谷歌卫星"};function Dl({provider:s="gaode",zIndex:l=0,opacity:u=1,tiandituToken:f,visible:h=!0}){if(!h)return null;const y=jl[s](f);return g.jsx(H2,{source:y,sourceType:"rasterTile",sourceConfig:{parser:{type:"rasterTile",tileSize:256,zoomOffset:1}},zIndex:l,opacity:u})}function Hl({source:s,sourceType:l="json",sourceConfig:u,shape:f="arc",color:h="#2563EB",gradientColors:y,colorMode:m="single",colorField:C,colorValues:x,lineWidth:L=1.5,lineWidthRange:M,weightField:S="weight",opacity:z=.8,blur:H=.6,animate:D=!1,animateSpeed:V=1,animateTrailLength:O=.3,animateDuration:R=2e3,showNodes:N=!0,nodeColor:F,nodeSize:Y=4,nodeSizeRange:X,nodePulse:n0=!1,showTooltip:Z=!0,showNodePopup:G=!0,activeColor:r0="#FFD93D",onArcHover:A0,onArcClick:o0,onNodeClick:q,style:t0}){const B=b.useMemo(()=>u??{x:"fromLng",y:"fromLat",x1:"toLng",y1:"toLat"},[u]),U=b.useMemo(()=>m==="gradient"&&y?y:h,[m,y,h]),e0=b.useMemo(()=>L,[L,M]),c0=b.useMemo(()=>{if(D)return{enable:!0,speed:V,duration:R,trailLength:O}},[D,V,R,O]),h0=b.useMemo(()=>({opacity:z,blur:H,...t0}),[z,H,t0]),p0=b.useMemo(()=>{if(!N||typeof s=="string")return[];const E0=new Map,D0=B.x??"fromLng",Q0=B.y??"fromLat",l0=B.x1??"toLng",T=B.y1??"toLat";return s.forEach(a0=>{const Q=`${a0[D0]}_${a0[Q0]}`,H0=`${a0[l0]}_${a0[T]}`;E0.has(Q)||E0.set(Q,{lng:Number(a0[D0]),lat:Number(a0[Q0]),degree:0,name:a0.fromName}),E0.has(H0)||E0.set(H0,{lng:Number(a0[l0]),lat:Number(a0[T]),degree:0,name:a0.toName}),E0.get(Q).degree++,E0.get(H0).degree++}),Array.from(E0.values())},[s,N,B]),S0=F??h,[Z0,x0]=b.useState({visible:!1,lng:0,lat:0,from:"",to:"",weight:0}),g0=b.useCallback(E0=>{if(A0==null||A0(E0),!Z)return;const D0=E0.feature;D0&&x0({visible:!0,lng:E0.lng,lat:E0.lat,from:String(D0.fromName??""),to:String(D0.toName??""),weight:Number(D0[S]??0)})},[A0,Z,S]),T0=b.useCallback(()=>{x0(E0=>({...E0,visible:!1}))},[]),[j0,B0]=b.useState({visible:!1,lng:0,lat:0,name:"",degree:0}),pA=b.useCallback(E0=>{if(q==null||q(E0),!G)return;const D0=E0.feature;D0&&B0({visible:!0,lng:E0.lng,lat:E0.lat,name:String(D0.name??""),degree:Number(D0.degree??0)})},[q,G]);return g.jsxs(g.Fragment,{children:[g.jsx(re,{source:s,sourceType:l,sourceConfig:B,shape:f,color:U,colorField:m==="field"?C:void 0,colorValues:m==="field"?x:void 0,size:e0,sizeField:M?S:void 0,sizeValues:M||void 0,animate:c0,active:r0?{color:r0}:!1,style:h0,onMouseMove:g0,onMouseLeave:T0,onClick:o0}),N&&p0.length>0&&g.jsx(RA,{source:p0,sourceConfig:{x:"lng",y:"lat"},color:S0,size:Y,sizeField:X?"degree":void 0,sizeValues:X,shape:"circle",style:{opacity:.9,strokeWidth:1,stroke:"#fff"},animate:n0?{enable:!0,speed:.6}:void 0,active:r0?{color:r0}:!1,onClick:pA}),Z&&Z0.visible&&g.jsx($1,{longitude:Z0.lng,latitude:Z0.lat,visible:!0,variant:"dark",items:[{label:"起点",value:Z0.from},{label:"终点",value:Z0.to},{label:"流量",value:Z0.weight}]}),G&&j0.visible&&g.jsx(kt,{longitude:j0.lng,latitude:j0.lat,content:`<div style="min-width:80px"><div style="font-weight:700;font-size:13px;margin-bottom:4px">${j0.name||"节点"}</div><div style="font-size:12px;color:#64748b">连接数: ${j0.degree}</div></div>`,closeButton:!0,size:"compact",onClose:()=>B0(E0=>({...E0,visible:!1}))})]})}function Bl({path:s,segments:l,stops:u=[],routeType:f="straight",onRouteQuery:h,onRouteResult:y,color:m="#2563eb",lineWidth:C=4,opacity:x=.9,glow:L=!0,animate:M=!1,animateSpeed:S=1,stopSize:z=14,stopColor:H,endColor:D="#10b981",showStopIndex:V=!0,showStopName:O=!0,stopNameColor:R="#334155",stopNameSize:N=11,stopRenderer:F="point",stopMarkerVariant:Y="circle",stopIconMap:X,stopIconField:n0="iconValue",stopIconSize:Z=16,stopIconAnchor:G="bottom",showStopPopup:r0=!0,activeColor:A0="#fbbf24",onPathClick:o0,onStopClick:q}){const[t0,B]=b.useState(null),U=b.useRef(0),e0=f==="walking"||f==="cycling"||f==="driving"||f==="transit";b.useEffect(()=>{if(!e0||!h||u.length<2){B(null);return}const E0=[u[0].lng,u[0].lat],D0=[u[u.length-1].lng,u[u.length-1].lat],Q0=u.length>2?u.slice(1,-1).map(T=>[T.lng,T.lat]):[],l0=++U.current;h({origin:E0,destination:D0,waypoints:Q0.length>0?Q0:void 0,routeType:f}).then(T=>{U.current===l0&&(B(T),y==null||y(T))}).catch(()=>{U.current===l0&&B(null)})},[e0,h,u,f]);const c0=e0&&t0?t0.path:s,h0=e0&&(t0!=null&&t0.segments)?t0.segments:l,p0=e0&&(t0!=null&&t0.stops)?t0.stops:[],S0=f==="arc"?"arc":"line",Z0=b.useMemo(()=>h0&&h0.length>0?{type:"FeatureCollection",features:h0.map((E0,D0)=>({type:"Feature",properties:{color:E0.color||m,width:E0.width||C,index:D0},geometry:{type:"LineString",coordinates:E0.coordinates}}))}:c0&&c0.length>1?{type:"FeatureCollection",features:[{type:"Feature",properties:{color:m,width:C},geometry:{type:"LineString",coordinates:c0}}]}:null,[c0,h0,m,C]),x0=h0&&h0.some(E0=>E0.color),g0=b.useMemo(()=>{const E0=c0??(h0&&h0.length>0?[...h0[0].coordinates.slice(0,1),...h0[h0.length-1].coordinates.slice(-1)]:null);let D0=[...u,...p0];if(E0&&E0.length>=2){const[Q0,l0]=E0[0],[T,a0]=E0[E0.length-1],Q=u.some(d0=>Math.abs(d0.lng-Q0)<1e-6&&Math.abs(d0.lat-l0)<1e-6),H0=u.some(d0=>Math.abs(d0.lng-T)<1e-6&&Math.abs(d0.lat-a0)<1e-6);Q||(D0=[{lng:Q0,lat:l0,name:"起点",type:"start"},...D0]),H0||(D0=[...D0,{lng:T,lat:a0,name:"终点",type:"end"}])}return D0.map((Q0,l0)=>({...Q0,index:Q0.index??l0+1,type:Q0.type??(l0===0?"start":l0===D0.length-1?"end":"waypoint"),stopColor:Q0.type==="end"||!Q0.type&&l0===D0.length-1?D:H??m,iconValue:Q0.icon??"marker",indexLabel:String(Q0.index??l0+1),markerColorValue:Q0.markerColor??Vl(Q0.type??(l0===0?"start":l0===D0.length-1?"end":"waypoint"))}))},[u,p0,c0,h0,m,H,D]),T0=b.useMemo(()=>{if(F!=="icon")return;if(X)return X;const E0=[...new Set(g0.map(D0=>D0.iconValue).filter(Boolean))];if(E0.length)return w2(E0,{fill:H??m,size:Math.max(24,Z+8)})},[F,X,g0,H,m,Z]),[j0,B0]=b.useState({visible:!1,lng:0,lat:0,name:"",index:""}),pA=b.useCallback(E0=>{if(q==null||q(E0),!r0)return;const D0=E0.feature;D0&&B0({visible:!0,lng:E0.lng,lat:E0.lat,name:String(D0.name??""),index:String(D0.indexLabel??D0.index??"")})},[q,r0]);return Z0?g.jsxs(g.Fragment,{children:[L&&g.jsx(re,{source:Z0,sourceType:"geojson",shape:S0,color:x0?void 0:m,colorField:x0?"color":void 0,colorValues:x0?h0.map(E0=>E0.color||m):void 0,size:C*2.5,style:{opacity:.15}}),g.jsx(re,{source:Z0,sourceType:"geojson",shape:S0,color:x0?void 0:m,colorField:x0?"color":void 0,colorValues:x0?h0.map(E0=>E0.color||m):void 0,size:x0?void 0:C,sizeField:x0?"width":void 0,sizeValues:x0?h0.map(E0=>E0.width||C):void 0,style:{opacity:x},active:A0?{color:A0}:!1,onClick:o0}),M&&g.jsx(re,{source:Z0,sourceType:"geojson",shape:"line",color:"#ffffff",size:Math.max(1.5,C*.5),style:{opacity:.6,lineType:"dash",lineDash:[8,16]},animate:{enable:!0,speed:S,duration:1500},zIndex:10}),g0.length>0&&F==="point"&&g.jsx(RA,{source:g0,sourceConfig:{x:"lng",y:"lat"},colorField:"stopColor",colorValues:[...new Set(g0.map(E0=>E0.stopColor))],size:z,shape:"circle",style:{opacity:1,strokeWidth:2,stroke:"#ffffff"},active:A0?{color:A0}:!1,onClick:pA}),g0.length>0&&F==="point"&&V&&g.jsx(RA,{source:g0,sourceConfig:{x:"lng",y:"lat"},shapeField:"indexLabel",shapeValues:"text",color:"#ffffff",size:Math.max(10,Math.round(z*.75)),style:{textAnchor:"center",stroke:"rgba(18, 28, 42, 0.28)",strokeWidth:1.5,fontWeight:"700",textAllowOverlap:!0}}),g0.length>0&&F==="point"&&O&&g.jsx(RA,{source:g0,sourceConfig:{x:"lng",y:"lat"},shapeField:"name",shapeValues:"text",color:R,size:N,style:{textAnchor:"top",textOffset:[0,z/2+4],stroke:"#ffffff",strokeWidth:2,fontWeight:"500"}}),g0.length>0&&F==="icon"&&T0&&g.jsx(F2,{source:g0,sourceType:"json",sourceConfig:{x:"lng",y:"lat"},iconField:n0,iconMap:T0,iconSize:Z,iconAnchor:G,showLabel:V,labelField:"indexLabel",labelColor:"#ffffff",labelSize:11,labelAnchor:"top",labelOffset:[0,G==="bottom"?Math.max(10,Math.round(Z*.6)):0],labelHaloColor:"rgba(18, 28, 42, 0.35)",labelHaloWidth:2,onClick:pA}),g0.length>0&&F==="icon"&&O&&g.jsx(RA,{source:g0,sourceConfig:{x:"lng",y:"lat"},shapeField:"name",shapeValues:"text",color:R,size:N,style:{textAnchor:"top",textOffset:[0,(G==="bottom"?Z:0)+14],stroke:"#ffffff",strokeWidth:2,fontWeight:"500"}}),g0.length>0&&F==="marker"&&g0.map((E0,D0)=>{const Q0=E0.markerVariant??Y,l0=E0.markerColorValue,T=_l(E0.indexLabel,E0.stopColor,V,Q0);return g.jsx(Ue,{longitude:E0.lng,latitude:E0.lat,variant:Q0,color:l0,icon:E0.icon,content:T,label:T?void 0:V?E0.indexLabel:void 0,onClick:a0=>{pA({layerId:"route-stop-marker",layerType:"point",originalEvent:a0,lng:E0.lng,lat:E0.lat,feature:E0})}},`route-stop-marker-${D0}`)}),g0.length>0&&F==="marker"&&O&&g.jsx(RA,{source:g0,sourceConfig:{x:"lng",y:"lat"},shapeField:"name",shapeValues:"text",color:R,size:N,style:{textAnchor:"top",textOffset:[0,18],stroke:"#ffffff",strokeWidth:2,fontWeight:"500"}}),r0&&j0.visible&&g.jsx(kt,{longitude:j0.lng,latitude:j0.lat,content:`<div style="min-width:100px"><div style="font-weight:700;font-size:13px;margin-bottom:4px">${j0.name}</div><div style="font-size:12px;color:#64748b">第 ${j0.index} 站</div></div>`,closeButton:!0,size:"compact",onClose:()=>B0(E0=>({...E0,visible:!1}))})]}):null}function Vl(s){switch(s){case"start":return"success";case"end":return"error";default:return"primary"}}function _l(s,l,u,f){if(!u||f!=="circle"&&f!=="dot")return;const h=f==="circle"?24:18,y=f==="circle"?11:10;return g.jsx("div",{style:{width:h,height:h,borderRadius:"9999px",border:"2px solid #ffffff",background:l,color:"#ffffff",display:"flex",alignItems:"center",justifyContent:"center",fontSize:y,lineHeight:1,fontWeight:700,boxShadow:"0 6px 12px rgba(0,0,0,0.14)"},children:s})}const Sr=[73.482190241,3.8150178409999995,135.106618732,57.630045996],Il={type:"linear",colors:["rgba(92,58,16,0)","rgba(92,58,16,0)","#fabd08","#f1e93f","#f1ff8f","#fcfff7"],positions:[0,3,9,22.5,45,90]};function Dr(s){const l=s[0]/2003750834e-2*180;let u=s[1]/2003750834e-2*180;return u=180/Math.PI*(2*Math.atan(Math.exp(u*Math.PI/180))-Math.PI/2),[l,u]}function Pl({url:s,extent:l=Sr,renderMode:u="raster",bandIndex:f=0,domain:h=[0,90],noDataValue:y=0,rampColors:m=Il,clampLow:C=!1,clampHigh:x=!1,bands:L=[0,1,2],countCut:M,rMinMax:S,gMinMax:z,bMinMax:H,opacity:D=.8,mask:V=!1,maskData:O}){const[R,N]=b.useState(null),[F,Y]=b.useState(null),[X,n0]=b.useState(null);b.useEffect(()=>{let B=!1;async function U(){try{const e0=await import("geotiff"),c0=await fetch(s);if(!c0.ok)throw new Error(`Fetch failed: ${c0.status}`);const h0=await c0.arrayBuffer(),S0=await(await e0.fromArrayBuffer(h0)).getImage(),Z0=S0.getWidth(),x0=S0.getHeight(),g0=await S0.readRasters();let T0;try{const j0=S0.getBoundingBox();j0&&j0.length===4&&(T0=j0)}catch{}B||(N({rasters:g0,width:Z0,height:x0,tiffExtent:T0}),n0(null))}catch(e0){B||(n0(e0 instanceof Error?e0.message:"Failed to load TIFF"),console.error("[TiffRasterLayer] Load error:",e0))}}return U(),()=>{B=!0}},[s]),b.useEffect(()=>{if(!V||!O)return;let B=!1;return typeof O=="string"?fetch(O).then(U=>U.json()).then(U=>{B||Y(U)}).catch(U=>console.error("[TiffRasterLayer] Mask load error:",U)):Y(O),()=>{B=!0}},[V,O]);const Z=b.useMemo(()=>{if(l!==Sr)return l;if(R!=null&&R.tiffExtent){const[B,U,e0,c0]=R.tiffExtent;if(Math.abs(B)>180||Math.abs(e0)>180){const h0=Dr([B,U]),p0=Dr([e0,c0]);return[h0[0],h0[1],p0[0],p0[1]]}return R.tiffExtent}return l},[l,R==null?void 0:R.tiffExtent]),G=b.useMemo(()=>{if(!R)return null;if(u==="rgb"){const B={type:"rgb",width:R.width,height:R.height,bands:L,extent:Z};return S&&(B.RMinMax=S),z&&(B.GMinMax=z),H&&(B.BMinMax=H),M&&(B.countCut=M),{parser:B}}return u==="ndi"?{parser:{type:"ndi",width:R.width,height:R.height,bands:L,extent:Z}}:{parser:{type:"raster",width:R.width,height:R.height,extent:Z}}},[R,u,L,Z]),r0=b.useMemo(()=>u==="rgb"?{opacity:D}:u==="ndi"?{domain:h,rampColors:m,opacity:D}:{clampLow:C,clampHigh:x,domain:h,noDataValue:y,rampColors:m,opacity:D},[u,C,x,h,y,m,D]),A0=b.useMemo(()=>R?u==="rgb"||u==="ndi"?R.rasters:R.rasters[f]:null,[R,u,f]),o0=jA(),q=b.useRef(null);b.useRef(!1);const t0=!V||!!F;return b.useEffect(()=>{if(!o0||!G||!A0||!t0)return;q.current&&(o0.removeLayer(q.current),q.current=null);const B={zIndex:10};V&&F&&(B.mask=!0,B.maskfence=F);const U=new zA.RasterLayer(B);return U.source(A0,{parser:G.parser}),U.style(r0),o0.addLayer(U),q.current=U,()=>{q.current&&o0&&(o0.removeLayer(q.current),q.current=null)}},[o0,G,A0,t0,F]),null}var Ce=(function(s){s=s||{};var l=typeof s<"u"?s:{},u={},f;for(f in l)l.hasOwnProperty(f)&&(u[f]=l[f]);var h="";function y(f0){return l.locateFile?l.locateFile(f0,h):h+f0}var m;typeof document<"u"&&document.currentScript&&(h=document.currentScript.src),h.indexOf("blob:")!==0?h=h.substr(0,h.lastIndexOf("/")+1):h="",m=function(y0,V0,m0){var t=new XMLHttpRequest;t.open("GET",y0,!0),t.responseType="arraybuffer",t.onload=function(){if(t.status==200||t.status==0&&t.response){V0(t.response);return}var dA=Ye(y0);if(dA){V0(dA.buffer);return}m0()},t.onerror=m0,t.send(null)};var C=l.print||console.log.bind(console),x=l.printErr||console.warn.bind(console);for(f in u)u.hasOwnProperty(f)&&(l[f]=u[f]);u=null,l.arguments&&l.arguments;var L=0,M=function(f0){L=f0},S=function(){return L},z=8;function H(f0,y0,V0,m0){switch(V0=V0||"i8",V0.charAt(V0.length-1)==="*"&&(V0="i32"),V0){case"i1":q[f0>>0]=y0;break;case"i8":q[f0>>0]=y0;break;case"i16":B[f0>>1]=y0;break;case"i32":U[f0>>2]=y0;break;case"i64":fA=[y0>>>0,(sA=y0,+a0(sA)>=1?sA>0?(d0(+H0(sA/4294967296),4294967295)|0)>>>0:~~+Q((sA-+(~~sA>>>0))/4294967296)>>>0:0)],U[f0>>2]=fA[0],U[f0+4>>2]=fA[1];break;case"float":e0[f0>>2]=y0;break;case"double":c0[f0>>3]=y0;break;default:ke("invalid type for setValue: "+V0)}}function D(f0,y0,V0){switch(y0=y0||"i8",y0.charAt(y0.length-1)==="*"&&(y0="i32"),y0){case"i1":return q[f0>>0];case"i8":return q[f0>>0];case"i16":return B[f0>>1];case"i32":return U[f0>>2];case"i64":return U[f0>>2];case"float":return e0[f0>>2];case"double":return c0[f0>>3];default:ke("invalid type for getValue: "+y0)}return null}var V=!1;function O(f0,y0){f0||ke("Assertion failed: "+y0)}function R(f0){var y0=l["_"+f0];return O(y0,"Cannot call unknown function "+f0+", make sure it is exported"),y0}function N(f0,y0,V0,m0,t){var k={string:function(aA){var GA=0;if(aA!=null&&aA!==0){var Xe=(aA.length<<2)+1;GA=lt(Xe),G(aA,GA,Xe)}return GA},array:function(aA){var GA=lt(aA.length);return r0(aA,GA),GA}};function dA(aA){return y0==="string"?n0(aA):y0==="boolean"?!!aA:aA}var yA=R(f0),SA=[],lA=0;if(m0)for(var gA=0;gA<m0.length;gA++){var ge=k[V0[gA]];ge?(lA===0&&(lA=Ie()),SA[gA]=ge(m0[gA])):SA[gA]=m0[gA]}var mA=yA.apply(null,SA);return mA=dA(mA),lA!==0&&ZA(lA),mA}function F(f0,y0,V0,m0){V0=V0||[];var t=V0.every(function(dA){return dA==="number"}),k=y0!=="string";return k&&t&&!m0?R(f0):function(){return N(f0,y0,V0,arguments)}}var Y=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0;function X(f0,y0,V0){for(var m0=y0+V0,t=y0;f0[t]&&!(t>=m0);)++t;if(t-y0>16&&f0.subarray&&Y)return Y.decode(f0.subarray(y0,t));for(var k="";y0<t;){var dA=f0[y0++];if(!(dA&128)){k+=String.fromCharCode(dA);continue}var yA=f0[y0++]&63;if((dA&224)==192){k+=String.fromCharCode((dA&31)<<6|yA);continue}var SA=f0[y0++]&63;if((dA&240)==224?dA=(dA&15)<<12|yA<<6|SA:dA=(dA&7)<<18|yA<<12|SA<<6|f0[y0++]&63,dA<65536)k+=String.fromCharCode(dA);else{var lA=dA-65536;k+=String.fromCharCode(55296|lA>>10,56320|lA&1023)}}return k}function n0(f0,y0){return f0?X(t0,f0,y0):""}function Z(f0,y0,V0,m0){if(!(m0>0))return 0;for(var t=V0,k=V0+m0-1,dA=0;dA<f0.length;++dA){var yA=f0.charCodeAt(dA);if(yA>=55296&&yA<=57343){var SA=f0.charCodeAt(++dA);yA=65536+((yA&1023)<<10)|SA&1023}if(yA<=127){if(V0>=k)break;y0[V0++]=yA}else if(yA<=2047){if(V0+1>=k)break;y0[V0++]=192|yA>>6,y0[V0++]=128|yA&63}else if(yA<=65535){if(V0+2>=k)break;y0[V0++]=224|yA>>12,y0[V0++]=128|yA>>6&63,y0[V0++]=128|yA&63}else{if(V0+3>=k)break;y0[V0++]=240|yA>>18,y0[V0++]=128|yA>>12&63,y0[V0++]=128|yA>>6&63,y0[V0++]=128|yA&63}}return y0[V0]=0,V0-t}function G(f0,y0,V0){return Z(f0,t0,y0,V0)}typeof TextDecoder<"u"&&new TextDecoder("utf-16le");function r0(f0,y0){q.set(f0,y0)}function A0(f0,y0){return f0%y0>0&&(f0+=y0-f0%y0),f0}var o0,q,t0,B,U,e0,c0;function h0(f0){o0=f0,l.HEAP8=q=new Int8Array(f0),l.HEAP16=B=new Int16Array(f0),l.HEAP32=U=new Int32Array(f0),l.HEAPU8=t0=new Uint8Array(f0),l.HEAPU16=new Uint16Array(f0),l.HEAPU32=new Uint32Array(f0),l.HEAPF32=e0=new Float32Array(f0),l.HEAPF64=c0=new Float64Array(f0)}var p0=5271536,S0=28624,Z0=l.TOTAL_MEMORY||33554432;l.buffer?o0=l.buffer:o0=new ArrayBuffer(Z0),Z0=o0.byteLength,h0(o0),U[S0>>2]=p0;function x0(f0){for(;f0.length>0;){var y0=f0.shift();if(typeof y0=="function"){y0();continue}var V0=y0.func;typeof V0=="number"?y0.arg===void 0?l.dynCall_v(V0):l.dynCall_vi(V0,y0.arg):V0(y0.arg===void 0?null:y0.arg)}}var g0=[],T0=[],j0=[],B0=[];function pA(){if(l.preRun)for(typeof l.preRun=="function"&&(l.preRun=[l.preRun]);l.preRun.length;)l0(l.preRun.shift());x0(g0)}function E0(){x0(T0)}function D0(){x0(j0)}function Q0(){if(l.postRun)for(typeof l.postRun=="function"&&(l.postRun=[l.postRun]);l.postRun.length;)T(l.postRun.shift());x0(B0)}function l0(f0){g0.unshift(f0)}function T(f0){B0.unshift(f0)}var a0=Math.abs,Q=Math.ceil,H0=Math.floor,d0=Math.min,b0=0,I0=null;function F0(f0){b0++,l.monitorRunDependencies&&l.monitorRunDependencies(b0)}function L0(f0){if(b0--,l.monitorRunDependencies&&l.monitorRunDependencies(b0),b0==0&&I0){var y0=I0;I0=null,y0()}}l.preloadedImages={},l.preloadedAudios={};var _0=null,v0="data:application/octet-stream;base64,";function G0(f0){return String.prototype.startsWith?f0.startsWith(v0):f0.indexOf(v0)===0}var sA,fA;_0="data:application/octet-stream;base64,AAAAAAAAAAAAAAAAAQAAAAIAAAADAAAABAAAAAUAAAAGAAAAAQAAAAQAAAADAAAABgAAAAUAAAACAAAAAAAAAAIAAAADAAAAAQAAAAQAAAAGAAAAAAAAAAUAAAADAAAABgAAAAQAAAAFAAAAAAAAAAEAAAACAAAABAAAAAUAAAAGAAAAAAAAAAIAAAADAAAAAQAAAAUAAAACAAAAAAAAAAEAAAADAAAABgAAAAQAAAAGAAAAAAAAAAUAAAACAAAAAQAAAAQAAAADAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAEAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAIAAAADAAAAAAAAAAAAAAACAAAAAAAAAAEAAAADAAAAAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAABAAAAAYAAAAAAAAABQAAAAAAAAAAAAAABAAAAAUAAAAAAAAAAAAAAAAAAAACAAAAAAAAAAYAAAAAAAAABgAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAgAAAAMAAAAEAAAABQAAAAYAAAABAAAAAgAAAAMAAAAEAAAABQAAAAYAAAAAAAAAAgAAAAMAAAAEAAAABQAAAAYAAAAAAAAAAQAAAAMAAAAEAAAABQAAAAYAAAAAAAAAAQAAAAIAAAAEAAAABQAAAAYAAAAAAAAAAQAAAAIAAAADAAAABQAAAAYAAAAAAAAAAQAAAAIAAAADAAAABAAAAAYAAAAAAAAAAQAAAAIAAAADAAAABAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAwAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAgAAAAIAAAAAAAAAAAAAAAYAAAAAAAAAAwAAAAIAAAADAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAFAAAABAAAAAAAAAABAAAAAAAAAAAAAAAFAAAABQAAAAAAAAAAAAAAAAAAAAYAAAAAAAAABAAAAAAAAAAGAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAFAAAAAgAAAAQAAAADAAAACAAAAAEAAAAHAAAABgAAAAkAAAAAAAAAAwAAAAIAAAACAAAABgAAAAoAAAALAAAAAAAAAAEAAAAFAAAAAwAAAA0AAAABAAAABwAAAAQAAAAMAAAAAAAAAAQAAAB/AAAADwAAAAgAAAADAAAAAAAAAAwAAAAFAAAAAgAAABIAAAAKAAAACAAAAAAAAAAQAAAABgAAAA4AAAALAAAAEQAAAAEAAAAJAAAAAgAAAAcAAAAVAAAACQAAABMAAAADAAAADQAAAAEAAAAIAAAABQAAABYAAAAQAAAABAAAAAAAAAAPAAAACQAAABMAAAAOAAAAFAAAAAEAAAAHAAAABgAAAAoAAAALAAAAGAAAABcAAAAFAAAAAgAAABIAAAALAAAAEQAAABcAAAAZAAAAAgAAAAYAAAAKAAAADAAAABwAAAANAAAAGgAAAAQAAAAPAAAAAwAAAA0AAAAaAAAAFQAAAB0AAAADAAAADAAAAAcAAAAOAAAAfwAAABEAAAAbAAAACQAAABQAAAAGAAAADwAAABYAAAAcAAAAHwAAAAQAAAAIAAAADAAAABAAAAASAAAAIQAAAB4AAAAIAAAABQAAABYAAAARAAAACwAAAA4AAAAGAAAAIwAAABkAAAAbAAAAEgAAABgAAAAeAAAAIAAAAAUAAAAKAAAAEAAAABMAAAAiAAAAFAAAACQAAAAHAAAAFQAAAAkAAAAUAAAADgAAABMAAAAJAAAAKAAAABsAAAAkAAAAFQAAACYAAAATAAAAIgAAAA0AAAAdAAAABwAAABYAAAAQAAAAKQAAACEAAAAPAAAACAAAAB8AAAAXAAAAGAAAAAsAAAAKAAAAJwAAACUAAAAZAAAAGAAAAH8AAAAgAAAAJQAAAAoAAAAXAAAAEgAAABkAAAAXAAAAEQAAAAsAAAAtAAAAJwAAACMAAAAaAAAAKgAAAB0AAAArAAAADAAAABwAAAANAAAAGwAAACgAAAAjAAAALgAAAA4AAAAUAAAAEQAAABwAAAAfAAAAKgAAACwAAAAMAAAADwAAABoAAAAdAAAAKwAAACYAAAAvAAAADQAAABoAAAAVAAAAHgAAACAAAAAwAAAAMgAAABAAAAASAAAAIQAAAB8AAAApAAAALAAAADUAAAAPAAAAFgAAABwAAAAgAAAAHgAAABgAAAASAAAANAAAADIAAAAlAAAAIQAAAB4AAAAxAAAAMAAAABYAAAAQAAAAKQAAACIAAAATAAAAJgAAABUAAAA2AAAAJAAAADMAAAAjAAAALgAAAC0AAAA4AAAAEQAAABsAAAAZAAAAJAAAABQAAAAiAAAAEwAAADcAAAAoAAAANgAAACUAAAAnAAAANAAAADkAAAAYAAAAFwAAACAAAAAmAAAAfwAAACIAAAAzAAAAHQAAAC8AAAAVAAAAJwAAACUAAAAZAAAAFwAAADsAAAA5AAAALQAAACgAAAAbAAAAJAAAABQAAAA8AAAALgAAADcAAAApAAAAMQAAADUAAAA9AAAAFgAAACEAAAAfAAAAKgAAADoAAAArAAAAPgAAABwAAAAsAAAAGgAAACsAAAA+AAAALwAAAEAAAAAaAAAAKgAAAB0AAAAsAAAANQAAADoAAABBAAAAHAAAAB8AAAAqAAAALQAAACcAAAAjAAAAGQAAAD8AAAA7AAAAOAAAAC4AAAA8AAAAOAAAAEQAAAAbAAAAKAAAACMAAAAvAAAAJgAAACsAAAAdAAAARQAAADMAAABAAAAAMAAAADEAAAAeAAAAIQAAAEMAAABCAAAAMgAAADEAAAB/AAAAPQAAAEIAAAAhAAAAMAAAACkAAAAyAAAAMAAAACAAAAAeAAAARgAAAEMAAAA0AAAAMwAAAEUAAAA2AAAARwAAACYAAAAvAAAAIgAAADQAAAA5AAAARgAAAEoAAAAgAAAAJQAAADIAAAA1AAAAPQAAAEEAAABLAAAAHwAAACkAAAAsAAAANgAAAEcAAAA3AAAASQAAACIAAAAzAAAAJAAAADcAAAAoAAAANgAAACQAAABIAAAAPAAAAEkAAAA4AAAARAAAAD8AAABNAAAAIwAAAC4AAAAtAAAAOQAAADsAAABKAAAATgAAACUAAAAnAAAANAAAADoAAAB/AAAAPgAAAEwAAAAsAAAAQQAAACoAAAA7AAAAPwAAAE4AAABPAAAAJwAAAC0AAAA5AAAAPAAAAEgAAABEAAAAUAAAACgAAAA3AAAALgAAAD0AAAA1AAAAMQAAACkAAABRAAAASwAAAEIAAAA+AAAAKwAAADoAAAAqAAAAUgAAAEAAAABMAAAAPwAAAH8AAAA4AAAALQAAAE8AAAA7AAAATQAAAEAAAAAvAAAAPgAAACsAAABUAAAARQAAAFIAAABBAAAAOgAAADUAAAAsAAAAVgAAAEwAAABLAAAAQgAAAEMAAABRAAAAVQAAADEAAAAwAAAAPQAAAEMAAABCAAAAMgAAADAAAABXAAAAVQAAAEYAAABEAAAAOAAAADwAAAAuAAAAWgAAAE0AAABQAAAARQAAADMAAABAAAAALwAAAFkAAABHAAAAVAAAAEYAAABDAAAANAAAADIAAABTAAAAVwAAAEoAAABHAAAAWQAAAEkAAABbAAAAMwAAAEUAAAA2AAAASAAAAH8AAABJAAAANwAAAFAAAAA8AAAAWAAAAEkAAABbAAAASAAAAFgAAAA2AAAARwAAADcAAABKAAAATgAAAFMAAABcAAAANAAAADkAAABGAAAASwAAAEEAAAA9AAAANQAAAF4AAABWAAAAUQAAAEwAAABWAAAAUgAAAGAAAAA6AAAAQQAAAD4AAABNAAAAPwAAAEQAAAA4AAAAXQAAAE8AAABaAAAATgAAAEoAAAA7AAAAOQAAAF8AAABcAAAATwAAAE8AAABOAAAAPwAAADsAAABdAAAAXwAAAE0AAABQAAAARAAAAEgAAAA8AAAAYwAAAFoAAABYAAAAUQAAAFUAAABeAAAAZQAAAD0AAABCAAAASwAAAFIAAABgAAAAVAAAAGIAAAA+AAAATAAAAEAAAABTAAAAfwAAAEoAAABGAAAAZAAAAFcAAABcAAAAVAAAAEUAAABSAAAAQAAAAGEAAABZAAAAYgAAAFUAAABXAAAAZQAAAGYAAABCAAAAQwAAAFEAAABWAAAATAAAAEsAAABBAAAAaAAAAGAAAABeAAAAVwAAAFMAAABmAAAAZAAAAEMAAABGAAAAVQAAAFgAAABIAAAAWwAAAEkAAABjAAAAUAAAAGkAAABZAAAAYQAAAFsAAABnAAAARQAAAFQAAABHAAAAWgAAAE0AAABQAAAARAAAAGoAAABdAAAAYwAAAFsAAABJAAAAWQAAAEcAAABpAAAAWAAAAGcAAABcAAAAUwAAAE4AAABKAAAAbAAAAGQAAABfAAAAXQAAAE8AAABaAAAATQAAAG0AAABfAAAAagAAAF4AAABWAAAAUQAAAEsAAABrAAAAaAAAAGUAAABfAAAAXAAAAE8AAABOAAAAbQAAAGwAAABdAAAAYAAAAGgAAABiAAAAbgAAAEwAAABWAAAAUgAAAGEAAAB/AAAAYgAAAFQAAABnAAAAWQAAAG8AAABiAAAAbgAAAGEAAABvAAAAUgAAAGAAAABUAAAAYwAAAFAAAABpAAAAWAAAAGoAAABaAAAAcQAAAGQAAABmAAAAUwAAAFcAAABsAAAAcgAAAFwAAABlAAAAZgAAAGsAAABwAAAAUQAAAFUAAABeAAAAZgAAAGUAAABXAAAAVQAAAHIAAABwAAAAZAAAAGcAAABbAAAAYQAAAFkAAAB0AAAAaQAAAG8AAABoAAAAawAAAG4AAABzAAAAVgAAAF4AAABgAAAAaQAAAFgAAABnAAAAWwAAAHEAAABjAAAAdAAAAGoAAABdAAAAYwAAAFoAAAB1AAAAbQAAAHEAAABrAAAAfwAAAGUAAABeAAAAcwAAAGgAAABwAAAAbAAAAGQAAABfAAAAXAAAAHYAAAByAAAAbQAAAG0AAABsAAAAXQAAAF8AAAB1AAAAdgAAAGoAAABuAAAAYgAAAGgAAABgAAAAdwAAAG8AAABzAAAAbwAAAGEAAABuAAAAYgAAAHQAAABnAAAAdwAAAHAAAABrAAAAZgAAAGUAAAB4AAAAcwAAAHIAAABxAAAAYwAAAHQAAABpAAAAdQAAAGoAAAB5AAAAcgAAAHAAAABkAAAAZgAAAHYAAAB4AAAAbAAAAHMAAABuAAAAawAAAGgAAAB4AAAAdwAAAHAAAAB0AAAAZwAAAHcAAABvAAAAcQAAAGkAAAB5AAAAdQAAAH8AAABtAAAAdgAAAHEAAAB5AAAAagAAAHYAAAB4AAAAbAAAAHIAAAB1AAAAeQAAAG0AAAB3AAAAbwAAAHMAAABuAAAAeQAAAHQAAAB4AAAAeAAAAHMAAAByAAAAcAAAAHkAAAB3AAAAdgAAAHkAAAB0AAAAeAAAAHcAAAB1AAAAcQAAAHYAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAABAAAABQAAAAEAAAAAAAAAAAAAAAEAAAAAAAAAAQAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAACAAAABQAAAAEAAAAAAAAA/////wEAAAAAAAAAAwAAAAQAAAACAAAAAAAAAAAAAAABAAAAAAAAAAEAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAMAAAAFAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAFAAAAAQAAAAAAAAAAAAAAAQAAAAMAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAEAAAADAAAAAAAAAAAAAAABAAAAAAAAAAMAAAADAAAAAwAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAADAAAABQAAAAEAAAAAAAAAAAAAAAEAAAAAAAAAAQAAAAAAAAABAAAAAAAAAP////8DAAAAAAAAAAUAAAACAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAEAAAABQAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAMAAAADAAAAAwAAAAMAAAAAAAAAAwAAAAAAAAAAAAAAAAAAAAMAAAAFAAAABQAAAAAAAAAAAAAAAwAAAAMAAAADAAAAAAAAAAAAAAAAAAAAAAAAAAMAAAADAAAAAwAAAAAAAAADAAAAAAAAAAAAAAAAAAAAAAAAAAMAAAAFAAAABQAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAQAAAAAAAAABAAAAAAAAAAMAAAADAAAAAwAAAAAAAAADAAAAAAAAAAAAAAD/////AwAAAAAAAAAFAAAAAgAAAAAAAAAAAAAAAAAAAAAAAAADAAAAAAAAAAAAAAADAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAADAAAAAAAAAAAAAAAAAAAAAwAAAAMAAAAAAAAAAAAAAAEAAAAAAAAAAQAAAAAAAAABAAAAAAAAAAAAAAABAAAAAwAAAAAAAAAAAAAAAQAAAAAAAAADAAAAAwAAAAMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAMAAAADAAAAAwAAAAMAAAAAAAAAAwAAAAAAAAAAAAAAAQAAAAMAAAAAAAAAAAAAAAEAAAAAAAAAAwAAAAMAAAADAAAAAwAAAAAAAAADAAAAAAAAAAAAAAADAAAAAAAAAAMAAAAAAAAAAwAAAAAAAAAAAAAAAAAAAAMAAAAAAAAAAAAAAAMAAAAAAAAAAwAAAAAAAAAAAAAAAAAAAAMAAAADAAAAAAAAAP////8DAAAAAAAAAAUAAAACAAAAAAAAAAAAAAADAAAAAAAAAAAAAAADAAAAAwAAAAAAAAAAAAAAAwAAAAAAAAAAAAAAAwAAAAMAAAAAAAAAAAAAAAAAAAAAAAAAAwAAAAUAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAMAAAAFAAAABQAAAAAAAAAAAAAAAwAAAAMAAAADAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAwAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAwAAAAAAAAAAAAAAAwAAAAMAAAAAAAAAAAAAAAAAAAADAAAAAAAAAAMAAAAAAAAAAAAAAAMAAAADAAAAAwAAAAAAAAADAAAAAAAAAAAAAAADAAAAAwAAAAMAAAAAAAAAAwAAAAAAAAAAAAAA/////wMAAAAAAAAABQAAAAIAAAAAAAAAAAAAAAAAAAAAAAAAAwAAAAAAAAAAAAAAAwAAAAAAAAADAAAAAAAAAAAAAAAAAAAAAwAAAAMAAAAAAAAAAAAAAAMAAAAAAAAAAwAAAAAAAAADAAAAAAAAAAMAAAADAAAAAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAwAAAAAAAAADAAAAAAAAAAMAAAAAAAAAAAAAAAMAAAAAAAAAAAAAAAMAAAADAAAAAAAAAAMAAAADAAAAAwAAAAAAAAAAAAAAAwAAAAAAAAAAAAAAAAAAAAMAAAAAAAAAAwAAAAAAAAAAAAAA/////wMAAAAAAAAABQAAAAIAAAAAAAAAAAAAAAMAAAADAAAAAwAAAAMAAAADAAAAAAAAAAAAAAADAAAAAwAAAAMAAAADAAAAAwAAAAAAAAAAAAAAAwAAAAMAAAADAAAAAwAAAAAAAAADAAAAAAAAAAMAAAADAAAAAwAAAAMAAAAAAAAAAwAAAAAAAAD/////AwAAAAAAAAAFAAAAAgAAAAAAAAAAAAAAAAAAAAAAAAADAAAAAAAAAAAAAAADAAAAAAAAAAMAAAADAAAAAwAAAAAAAAADAAAAAAAAAAAAAAADAAAAAAAAAAAAAAAAAAAAAwAAAAMAAAAAAAAAAwAAAAAAAAAAAAAAAwAAAAMAAAAAAAAAAAAAAAMAAAADAAAAAwAAAAAAAAAAAAAAAAAAAAAAAAADAAAAAAAAAAAAAAADAAAAAwAAAAAAAAAAAAAAAAAAAAMAAAAAAAAAAAAAAAMAAAADAAAAAAAAAAAAAAAAAAAAAwAAAAAAAAADAAAAAAAAAAAAAAD/////AwAAAAAAAAAFAAAAAgAAAAAAAAAAAAAAAwAAAAMAAAADAAAAAAAAAAAAAAADAAAAAAAAAAMAAAADAAAAAwAAAAAAAAAAAAAAAwAAAAAAAAAAAAAAAAAAAAMAAAAAAAAAAAAAAAMAAAAAAAAAAwAAAAAAAAAAAAAAAAAAAAMAAAADAAAAAAAAAAAAAAAAAAAAAwAAAAAAAAAFAAAAAAAAAAAAAAADAAAAAwAAAAMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAADAAAAAQAAAAAAAAABAAAAAAAAAAAAAAABAAAAAwAAAAEAAAAAAAAAAQAAAAAAAAAAAAAAAwAAAAAAAAADAAAAAAAAAAMAAAAAAAAAAAAAAAMAAAAAAAAAAwAAAAAAAAADAAAAAAAAAP////8DAAAAAAAAAAUAAAACAAAAAAAAAAAAAAAAAAAAAwAAAAAAAAAAAAAAAwAAAAMAAAAAAAAAAAAAAAAAAAADAAAAAAAAAAMAAAAAAAAAAAAAAAMAAAAAAAAAAAAAAAMAAAADAAAAAAAAAAAAAAADAAAAAwAAAAMAAAADAAAAAwAAAAAAAAAAAAAAAAAAAAAAAAADAAAAAAAAAAUAAAAAAAAAAAAAAAMAAAADAAAAAwAAAAMAAAADAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAwAAAAMAAAADAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAwAAAAAAAAAFAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAFAAAABQAAAAAAAAAAAAAAAAAAAAMAAAAAAAAAAAAAAAMAAAADAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAMAAAAAAAAAAwAAAAAAAAAAAAAA/////wMAAAAAAAAABQAAAAIAAAAAAAAAAAAAAAMAAAADAAAAAwAAAAAAAAAAAAAAAwAAAAAAAAAFAAAAAAAAAAAAAAAFAAAABQAAAAAAAAAAAAAAAAAAAAEAAAADAAAAAQAAAAAAAAABAAAAAAAAAAMAAAADAAAAAwAAAAAAAAAAAAAAAwAAAAAAAAADAAAAAwAAAAMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAADAAAAAQAAAAAAAAABAAAAAAAAAAMAAAADAAAAAwAAAAMAAAADAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAEAAAAAAAAAAwAAAAUAAAABAAAAAAAAAP////8DAAAAAAAAAAUAAAACAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAFAAAABQAAAAAAAAAAAAAAAAAAAAEAAAAAAAAABAAAAAUAAAABAAAAAAAAAAMAAAADAAAAAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAADAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAIAAAAFAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAEAAAADAAAAAQAAAAAAAAABAAAAAAAAAAUAAAAAAAAAAAAAAAUAAAAFAAAAAAAAAAAAAAD/////AQAAAAAAAAADAAAABAAAAAIAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAUAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAFAAAAAAAAAAAAAAAFAAAABQAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAQAAAAUAAAABAAAAAAAAAAAAAAABAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgAAAAEAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIAAAAAAAAAAAAAAAEAAAD//////////wEAAAABAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAQAAAAEAAAAAAAAAAAAAAAAAAAADAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAwAAAAEAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAsAAAACAAAAAAAAAAAAAAABAAAAAgAAAAYAAAAEAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAYAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAgAAAAAAAAABAAAAAQAAAAAAAAAAAAAAAAAAAAcAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAACAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAYAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAKAAAAAgAAAAAAAAAAAAAAAQAAAAEAAAAFAAAABgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAALAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAEAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAMAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAABAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAABwAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAsAAAABAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACgAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAwAAAACAAAAAAAAAAAAAAABAAAAAwAAAAcAAAAGAAAAAQAAAAAAAAABAAAAAAAAAAAAAAAAAAAABwAAAAEAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAADAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAwAAAAAAAAABAAAAAQAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAGAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAADgAAAAIAAAAAAAAAAAAAAAEAAAAAAAAACQAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACgAAAAEAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAQAAAAEAAAAAAAAAAAAAAAAAAAAMAAAAAQAAAAEAAAAAAAAAAAAAAAAAAAAAAAAABwAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAsAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAKAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADQAAAAIAAAAAAAAAAAAAAAEAAAAEAAAACAAAAAoAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAALAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAACQAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAgAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAGAAAAAgAAAAAAAAAAAAAAAQAAAAsAAAAPAAAACAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAkAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAOAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAEAAAAAAAAAAQAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAQAAAAEAAAAAAAAAAAAAAAAAAAAIAAAAAQAAAAAAAAABAAAAAAAAAAAAAAAAAAAABQAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAAAAgAAAAAAAAAAAAAAAQAAAAwAAAAQAAAADAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAoAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAJAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADQAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAPAAAAAAAAAAEAAAABAAAAAAAAAAAAAAAAAAAADwAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAQAAAAEAAAAAAAAAAAAAAAAAAAAAAAAADQAAAAEAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAACAAAAAAAAAAAAAAABAAAACgAAABMAAAAIAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAkAAAABAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAEQAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAwAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEQAAAAAAAAABAAAAAQAAAAAAAAAAAAAAAAAAAA8AAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAQAAAAAQAAAAAAAAABAAAAAAAAAAAAAAAAAAAACQAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAANAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACAAAAAIAAAAAAAAAAAAAAAEAAAANAAAAEQAAAA0AAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAARAAAAAQAAAAAAAAABAAAAAAAAAAAAAAAAAAAAEwAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAA4AAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAATAAAAAAAAAAEAAAABAAAAAAAAAAAAAAAAAAAAEQAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAA0AAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAARAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAkAAAACAAAAAAAAAAAAAAABAAAADgAAABIAAAAPAAAAAQAAAAAAAAABAAAAAAAAAAAAAAAAAAAADwAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABIAAAAAAAAAAQAAAAEAAAAAAAAAAAAAAAAAAAASAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAEwAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAABEAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAATAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEgAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAABIAAAABAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAATAAAAAgAAAAAAAAAAAAAAAQAAAP//////////EwAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAATAAAAAQAAAAAAAAABAAAAAAAAAAAAAAAAAAAAEgAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAASAAAAAAAAABgAAAAAAAAAIQAAAAAAAAAeAAAAAAAAACAAAAADAAAAMQAAAAEAAAAwAAAAAwAAADIAAAADAAAACAAAAAAAAAAFAAAABQAAAAoAAAAFAAAAFgAAAAAAAAAQAAAAAAAAABIAAAAAAAAAKQAAAAEAAAAhAAAAAAAAAB4AAAAAAAAABAAAAAAAAAAAAAAABQAAAAIAAAAFAAAADwAAAAEAAAAIAAAAAAAAAAUAAAAFAAAAHwAAAAEAAAAWAAAAAAAAABAAAAAAAAAAAgAAAAAAAAAGAAAAAAAAAA4AAAAAAAAACgAAAAAAAAALAAAAAAAAABEAAAADAAAAGAAAAAEAAAAXAAAAAwAAABkAAAADAAAAAAAAAAAAAAABAAAABQAAAAkAAAAFAAAABQAAAAAAAAACAAAAAAAAAAYAAAAAAAAAEgAAAAEAAAAKAAAAAAAAAAsAAAAAAAAABAAAAAEAAAADAAAABQAAAAcAAAAFAAAACAAAAAEAAAAAAAAAAAAAAAEAAAAFAAAAEAAAAAEAAAAFAAAAAAAAAAIAAAAAAAAABwAAAAAAAAAVAAAAAAAAACYAAAAAAAAACQAAAAAAAAATAAAAAAAAACIAAAADAAAADgAAAAEAAAAUAAAAAwAAACQAAAADAAAAAwAAAAAAAAANAAAABQAAAB0AAAAFAAAAAQAAAAAAAAAHAAAAAAAAABUAAAAAAAAABgAAAAEAAAAJAAAAAAAAABMAAAAAAAAABAAAAAIAAAAMAAAABQAAABoAAAAFAAAAAAAAAAEAAAADAAAAAAAAAA0AAAAFAAAAAgAAAAEAAAABAAAAAAAAAAcAAAAAAAAAGgAAAAAAAAAqAAAAAAAAADoAAAAAAAAAHQAAAAAAAAArAAAAAAAAAD4AAAADAAAAJgAAAAEAAAAvAAAAAwAAAEAAAAADAAAADAAAAAAAAAAcAAAABQAAACwAAAAFAAAADQAAAAAAAAAaAAAAAAAAACoAAAAAAAAAFQAAAAEAAAAdAAAAAAAAACsAAAAAAAAABAAAAAMAAAAPAAAABQAAAB8AAAAFAAAAAwAAAAEAAAAMAAAAAAAAABwAAAAFAAAABwAAAAEAAAANAAAAAAAAABoAAAAAAAAAHwAAAAAAAAApAAAAAAAAADEAAAAAAAAALAAAAAAAAAA1AAAAAAAAAD0AAAADAAAAOgAAAAEAAABBAAAAAwAAAEsAAAADAAAADwAAAAAAAAAWAAAABQAAACEAAAAFAAAAHAAAAAAAAAAfAAAAAAAAACkAAAAAAAAAKgAAAAEAAAAsAAAAAAAAADUAAAAAAAAABAAAAAQAAAAIAAAABQAAABAAAAAFAAAADAAAAAEAAAAPAAAAAAAAABYAAAAFAAAAGgAAAAEAAAAcAAAAAAAAAB8AAAAAAAAAMgAAAAAAAAAwAAAAAAAAADEAAAADAAAAIAAAAAAAAAAeAAAAAwAAACEAAAADAAAAGAAAAAMAAAASAAAAAwAAABAAAAADAAAARgAAAAAAAABDAAAAAAAAAEIAAAADAAAANAAAAAMAAAAyAAAAAAAAADAAAAAAAAAAJQAAAAMAAAAgAAAAAAAAAB4AAAADAAAAUwAAAAAAAABXAAAAAwAAAFUAAAADAAAASgAAAAMAAABGAAAAAAAAAEMAAAAAAAAAOQAAAAEAAAA0AAAAAwAAADIAAAAAAAAAGQAAAAAAAAAXAAAAAAAAABgAAAADAAAAEQAAAAAAAAALAAAAAwAAAAoAAAADAAAADgAAAAMAAAAGAAAAAwAAAAIAAAADAAAALQAAAAAAAAAnAAAAAAAAACUAAAADAAAAIwAAAAMAAAAZAAAAAAAAABcAAAAAAAAAGwAAAAMAAAARAAAAAAAAAAsAAAADAAAAPwAAAAAAAAA7AAAAAwAAADkAAAADAAAAOAAAAAMAAAAtAAAAAAAAACcAAAAAAAAALgAAAAMAAAAjAAAAAwAAABkAAAAAAAAAJAAAAAAAAAAUAAAAAAAAAA4AAAADAAAAIgAAAAAAAAATAAAAAwAAAAkAAAADAAAAJgAAAAMAAAAVAAAAAwAAAAcAAAADAAAANwAAAAAAAAAoAAAAAAAAABsAAAADAAAANgAAAAMAAAAkAAAAAAAAABQAAAAAAAAAMwAAAAMAAAAiAAAAAAAAABMAAAADAAAASAAAAAAAAAA8AAAAAwAAAC4AAAADAAAASQAAAAMAAAA3AAAAAAAAACgAAAAAAAAARwAAAAMAAAA2AAAAAwAAACQAAAAAAAAAQAAAAAAAAAAvAAAAAAAAACYAAAADAAAAPgAAAAAAAAArAAAAAwAAAB0AAAADAAAAOgAAAAMAAAAqAAAAAwAAABoAAAADAAAAVAAAAAAAAABFAAAAAAAAADMAAAADAAAAUgAAAAMAAABAAAAAAAAAAC8AAAAAAAAATAAAAAMAAAA+AAAAAAAAACsAAAADAAAAYQAAAAAAAABZAAAAAwAAAEcAAAADAAAAYgAAAAMAAABUAAAAAAAAAEUAAAAAAAAAYAAAAAMAAABSAAAAAwAAAEAAAAAAAAAASwAAAAAAAABBAAAAAAAAADoAAAADAAAAPQAAAAAAAAA1AAAAAwAAACwAAAADAAAAMQAAAAMAAAApAAAAAwAAAB8AAAADAAAAXgAAAAAAAABWAAAAAAAAAEwAAAADAAAAUQAAAAMAAABLAAAAAAAAAEEAAAAAAAAAQgAAAAMAAAA9AAAAAAAAADUAAAADAAAAawAAAAAAAABoAAAAAwAAAGAAAAADAAAAZQAAAAMAAABeAAAAAAAAAFYAAAAAAAAAVQAAAAMAAABRAAAAAwAAAEsAAAAAAAAAOQAAAAAAAAA7AAAAAAAAAD8AAAADAAAASgAAAAAAAABOAAAAAwAAAE8AAAADAAAAUwAAAAMAAABcAAAAAwAAAF8AAAADAAAAJQAAAAAAAAAnAAAAAwAAAC0AAAADAAAANAAAAAAAAAA5AAAAAAAAADsAAAAAAAAARgAAAAMAAABKAAAAAAAAAE4AAAADAAAAGAAAAAAAAAAXAAAAAwAAABkAAAADAAAAIAAAAAMAAAAlAAAAAAAAACcAAAADAAAAMgAAAAMAAAA0AAAAAAAAADkAAAAAAAAALgAAAAAAAAA8AAAAAAAAAEgAAAADAAAAOAAAAAAAAABEAAAAAwAAAFAAAAADAAAAPwAAAAMAAABNAAAAAwAAAFoAAAADAAAAGwAAAAAAAAAoAAAAAwAAADcAAAADAAAAIwAAAAAAAAAuAAAAAAAAADwAAAAAAAAALQAAAAMAAAA4AAAAAAAAAEQAAAADAAAADgAAAAAAAAAUAAAAAwAAACQAAAADAAAAEQAAAAMAAAAbAAAAAAAAACgAAAADAAAAGQAAAAMAAAAjAAAAAAAAAC4AAAAAAAAARwAAAAAAAABZAAAAAAAAAGEAAAADAAAASQAAAAAAAABbAAAAAwAAAGcAAAADAAAASAAAAAMAAABYAAAAAwAAAGkAAAADAAAAMwAAAAAAAABFAAAAAwAAAFQAAAADAAAANgAAAAAAAABHAAAAAAAAAFkAAAAAAAAANwAAAAMAAABJAAAAAAAAAFsAAAADAAAAJgAAAAAAAAAvAAAAAwAAAEAAAAADAAAAIgAAAAMAAAAzAAAAAAAAAEUAAAADAAAAJAAAAAMAAAA2AAAAAAAAAEcAAAAAAAAAYAAAAAAAAABoAAAAAAAAAGsAAAADAAAAYgAAAAAAAABuAAAAAwAAAHMAAAADAAAAYQAAAAMAAABvAAAAAwAAAHcAAAADAAAATAAAAAAAAABWAAAAAwAAAF4AAAADAAAAUgAAAAAAAABgAAAAAAAAAGgAAAAAAAAAVAAAAAMAAABiAAAAAAAAAG4AAAADAAAAOgAAAAAAAABBAAAAAwAAAEsAAAADAAAAPgAAAAMAAABMAAAAAAAAAFYAAAADAAAAQAAAAAMAAABSAAAAAAAAAGAAAAAAAAAAVQAAAAAAAABXAAAAAAAAAFMAAAADAAAAZQAAAAAAAABmAAAAAwAAAGQAAAADAAAAawAAAAMAAABwAAAAAwAAAHIAAAADAAAAQgAAAAAAAABDAAAAAwAAAEYAAAADAAAAUQAAAAAAAABVAAAAAAAAAFcAAAAAAAAAXgAAAAMAAABlAAAAAAAAAGYAAAADAAAAMQAAAAAAAAAwAAAAAwAAADIAAAADAAAAPQAAAAMAAABCAAAAAAAAAEMAAAADAAAASwAAAAMAAABRAAAAAAAAAFUAAAAAAAAAXwAAAAAAAABcAAAAAAAAAFMAAAAAAAAATwAAAAAAAABOAAAAAAAAAEoAAAADAAAAPwAAAAEAAAA7AAAAAwAAADkAAAADAAAAbQAAAAAAAABsAAAAAAAAAGQAAAAFAAAAXQAAAAEAAABfAAAAAAAAAFwAAAAAAAAATQAAAAEAAABPAAAAAAAAAE4AAAAAAAAAdQAAAAQAAAB2AAAABQAAAHIAAAAFAAAAagAAAAEAAABtAAAAAAAAAGwAAAAAAAAAWgAAAAEAAABdAAAAAQAAAF8AAAAAAAAAWgAAAAAAAABNAAAAAAAAAD8AAAAAAAAAUAAAAAAAAABEAAAAAAAAADgAAAADAAAASAAAAAEAAAA8AAAAAwAAAC4AAAADAAAAagAAAAAAAABdAAAAAAAAAE8AAAAFAAAAYwAAAAEAAABaAAAAAAAAAE0AAAAAAAAAWAAAAAEAAABQAAAAAAAAAEQAAAAAAAAAdQAAAAMAAABtAAAABQAAAF8AAAAFAAAAcQAAAAEAAABqAAAAAAAAAF0AAAAAAAAAaQAAAAEAAABjAAAAAQAAAFoAAAAAAAAAaQAAAAAAAABYAAAAAAAAAEgAAAAAAAAAZwAAAAAAAABbAAAAAAAAAEkAAAADAAAAYQAAAAEAAABZAAAAAwAAAEcAAAADAAAAcQAAAAAAAABjAAAAAAAAAFAAAAAFAAAAdAAAAAEAAABpAAAAAAAAAFgAAAAAAAAAbwAAAAEAAABnAAAAAAAAAFsAAAAAAAAAdQAAAAIAAABqAAAABQAAAFoAAAAFAAAAeQAAAAEAAABxAAAAAAAAAGMAAAAAAAAAdwAAAAEAAAB0AAAAAQAAAGkAAAAAAAAAdwAAAAAAAABvAAAAAAAAAGEAAAAAAAAAcwAAAAAAAABuAAAAAAAAAGIAAAADAAAAawAAAAEAAABoAAAAAwAAAGAAAAADAAAAeQAAAAAAAAB0AAAAAAAAAGcAAAAFAAAAeAAAAAEAAAB3AAAAAAAAAG8AAAAAAAAAcAAAAAEAAABzAAAAAAAAAG4AAAAAAAAAdQAAAAEAAABxAAAABQAAAGkAAAAFAAAAdgAAAAEAAAB5AAAAAAAAAHQAAAAAAAAAcgAAAAEAAAB4AAAAAQAAAHcAAAAAAAAAcgAAAAAAAABwAAAAAAAAAGsAAAAAAAAAZAAAAAAAAABmAAAAAAAAAGUAAAADAAAAUwAAAAEAAABXAAAAAwAAAFUAAAADAAAAdgAAAAAAAAB4AAAAAAAAAHMAAAAFAAAAbAAAAAEAAAByAAAAAAAAAHAAAAAAAAAAXAAAAAEAAABkAAAAAAAAAGYAAAAAAAAAdQAAAAAAAAB5AAAABQAAAHcAAAAFAAAAbQAAAAEAAAB2AAAAAAAAAHgAAAAAAAAAXwAAAAEAAABsAAAAAQAAAHIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAEAAAAAAAAAAAAAAAEAAAABAAAAAQAAAAAAAAAAAAAAAQAAAAAAAAABAAAAAQAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMAAAAGAAAAAgAAAAUAAAABAAAABAAAAAAAAAAAAAAABQAAAAMAAAABAAAABgAAAAQAAAACAAAAAAAAAH6iBfbytuk/Gq6akm/58z/Xrm0Liez0P5doSdOpSwRAWs602ULg8D/dT7Rcbo/1v1N1RQHFNOM/g9Snx7HW3L8HWsP8Q3jfP6VwOLosutk/9rjk1YQcxj+gnmKMsNn6P/HDeuPFY+M/YHwDjqKhB0Ci19/fCVrbP4UxKkDWOP6/pvljWa09tL9wi7wrQXjnv/Z6yLImkM2/3yTlOzY14D+m+WNZrT20PzwKVQnrQwNA9nrIsiaQzT/g40rFrRQFwPa45NWEHMa/kbslHEZq97/xw3rjxWPjv4cLC2SMBci/otff3wla27+rKF5oIAv0P1N1RQHFNOO/iDJPGyWHBUAHWsP8Q3jfvwQf/by16gXAfqIF9vK26b8XrO0Vh0r+v9eubQuJ7PS/BxLrA0ZZ479azrTZQuDwv1MK1EuItPw/yscgV9Z6FkAwHBR2WjQMQJNRzXsQ5vY/GlUHVJYKF0DONuFv2lMNQNCGZ28QJfk/0WUwoIL36D8ggDOMQuATQNqMOeAy/wZAWFYOYM+M2z/LWC4uH3oSQDE+LyTsMgRAkJzhRGWFGEDd4soovCQQQKqk0DJMEP8/rGmNdwOLBUAW2X/9xCbjP4hu3dcqJhNAzuYItRvdB0CgzW3zJW/sPxotm/Y2TxRAQAk9XmdDDEC1Kx9MKgT3P1M+NctcghZAFVqcLlb0C0Bgzd3sB2b2P77mZDPUWhZAFROHJpUGCEDAfma5CxXtPz1DWq/zYxRAmhYY5824F0DOuQKWSbAOQNCMqrvu3fs/L6DR22K2wT9nAAxPBU8RQGiN6mW43AFAZhu25b633D8c1YgmzowSQNM25BRKWARArGS08/lNxD+LFssHwmMRQLC5aNcxBgJABL9HT0WRF0CjCmJmOGEOQHsuaVzMP/s/TWJCaGGwBUCeu1PAPLzjP9nqN9DZOBNAKE4JcydbCkCGtbd1qjPzP8dgm9U8jhVAtPeKTkVwDkCeCLss5l37P401XMPLmBdAFd29VMVQDUBg0yA55h75Pz6odcYLCRdApBM4rBrkAkDyAVWgQxbRP4XDMnK20hFAymLlF7EmzD8GUgo9XBHlP3lbK7T9COc/k+OhPthhy7+YGEpnrOvCPzBFhLs15u4/epbqB6H4uz9IuuLF5svev6lzLKY31es/CaQ0envF5z8ZY0xlUADXv7zaz7HYEuI/CfbK1sn16T8uAQfWwxLWPzKn/YuFN94/5KdbC1AFu793fyCSnlfvPzK2y4doAMY/NRg5t1/X6b/shq4QJaHDP5yNIAKPOeI/vpn7BSE30r/X4YQrO6nrv78Ziv/Thto/DqJ1Y6+y5z9l51NaxFrlv8QlA65HOLS/86dxiEc96z+Hj0+LFjneP6LzBZ8LTc2/DaJ1Y6+y579l51NaxFrlP8QlA65HOLQ/8qdxiEc967+Jj0+LFjnev6LzBZ8LTc0/1qdbC1AFuz93fyCSnlfvvzK2y4doAMa/NRg5t1/X6T/vhq4QJaHDv5yNIAKPOeK/wJn7BSE30j/W4YQrO6nrP78Ziv/Thtq/CaQ0envF578XY0xlUADXP7zaz7HYEuK/CvbK1sn16b8rAQfWwxLWvzKn/YuFN96/zWLlF7EmzL8GUgo9XBHlv3lbK7T9COe/kOOhPthhyz+cGEpnrOvCvzBFhLs15u6/c5bqB6H4u79IuuLF5sveP6lzLKY31eu/AQAAAP////8HAAAA/////zEAAAD/////VwEAAP////9hCQAA/////6dBAAD/////kcsBAP/////3kAwA/////8H2VwAAAAAAAAAAAAAAAAACAAAA/////w4AAAD/////YgAAAP////+uAgAA/////8ISAAD/////ToMAAP////8ilwMA/////+4hGQD/////gu2vAAAAAAAAAAAAAAAAAAAAAAACAAAA//////////8BAAAAAwAAAP//////////////////////////////////////////////////////////////////////////AQAAAAAAAAACAAAA////////////////AwAAAP//////////////////////////////////////////////////////////////////////////AQAAAAAAAAACAAAA////////////////AwAAAP//////////////////////////////////////////////////////////////////////////AQAAAAAAAAACAAAA////////////////AwAAAP//////////////////////////////////////////////////////////AgAAAP//////////AQAAAAAAAAD/////////////////////AwAAAP////////////////////////////////////////////////////8DAAAA/////////////////////wAAAAD/////////////////////AQAAAP///////////////wIAAAD///////////////////////////////8DAAAA/////////////////////wAAAAD///////////////8CAAAAAQAAAP////////////////////////////////////////////////////8DAAAA/////////////////////wAAAAD///////////////8CAAAAAQAAAP////////////////////////////////////////////////////8DAAAA/////////////////////wAAAAD///////////////8CAAAAAQAAAP////////////////////////////////////////////////////8DAAAA/////////////////////wAAAAD///////////////8CAAAAAQAAAP////////////////////////////////////////////////////8BAAAAAgAAAP///////////////wAAAAD/////////////////////AwAAAP////////////////////////////////////////////////////8BAAAAAgAAAP///////////////wAAAAD/////////////////////AwAAAP////////////////////////////////////////////////////8BAAAAAgAAAP///////////////wAAAAD/////////////////////AwAAAP////////////////////////////////////////////////////8BAAAAAgAAAP///////////////wAAAAD/////////////////////AwAAAP///////////////////////////////wIAAAD///////////////8BAAAA/////////////////////wAAAAD/////////////////////AwAAAP////////////////////////////////////////////////////8DAAAA/////////////////////wAAAAABAAAA//////////8CAAAA//////////////////////////////////////////////////////////8DAAAA////////////////AgAAAAAAAAABAAAA//////////////////////////////////////////////////////////////////////////8DAAAA////////////////AgAAAAAAAAABAAAA//////////////////////////////////////////////////////////////////////////8DAAAA////////////////AgAAAAAAAAABAAAA//////////////////////////////////////////////////////////////////////////8DAAAAAQAAAP//////////AgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAACAAAAAAAAAAIAAAABAAAAAQAAAAIAAAACAAAAAAAAAAUAAAAFAAAAAAAAAAIAAAACAAAAAwAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIAAAAAAAAAAgAAAAEAAAACAAAAAgAAAAIAAAAAAAAABQAAAAYAAAAAAAAAAgAAAAIAAAADAAAAAgAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAgAAAAAAAAACAAAAAQAAAAMAAAACAAAAAgAAAAAAAAAFAAAABwAAAAAAAAACAAAAAgAAAAMAAAADAAAAAAAAAAAAAAAAAAAAAAAAAAIAAAACAAAAAAAAAAIAAAABAAAABAAAAAIAAAACAAAAAAAAAAUAAAAIAAAAAAAAAAIAAAACAAAAAwAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAwAAAAIAAAAAAAAAAgAAAAEAAAAAAAAAAgAAAAIAAAAAAAAABQAAAAkAAAAAAAAAAgAAAAIAAAADAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAKAAAAAgAAAAIAAAAAAAAAAwAAAA4AAAACAAAAAAAAAAIAAAADAAAAAAAAAAAAAAACAAAAAgAAAAMAAAAGAAAAAAAAAAAAAAAAAAAAAAAAAAsAAAACAAAAAgAAAAAAAAADAAAACgAAAAIAAAAAAAAAAgAAAAMAAAABAAAAAAAAAAIAAAACAAAAAwAAAAcAAAAAAAAAAAAAAAAAAAAAAAAADAAAAAIAAAACAAAAAAAAAAMAAAALAAAAAgAAAAAAAAACAAAAAwAAAAIAAAAAAAAAAgAAAAIAAAADAAAACAAAAAAAAAAAAAAAAAAAAAAAAAANAAAAAgAAAAIAAAAAAAAAAwAAAAwAAAACAAAAAAAAAAIAAAADAAAAAwAAAAAAAAACAAAAAgAAAAMAAAAJAAAAAAAAAAAAAAAAAAAAAAAAAA4AAAACAAAAAgAAAAAAAAADAAAADQAAAAIAAAAAAAAAAgAAAAMAAAAEAAAAAAAAAAIAAAACAAAAAwAAAAoAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAIAAAACAAAAAAAAAAMAAAAGAAAAAgAAAAAAAAACAAAAAwAAAA8AAAAAAAAAAgAAAAIAAAADAAAACwAAAAAAAAAAAAAAAAAAAAAAAAAGAAAAAgAAAAIAAAAAAAAAAwAAAAcAAAACAAAAAAAAAAIAAAADAAAAEAAAAAAAAAACAAAAAgAAAAMAAAAMAAAAAAAAAAAAAAAAAAAAAAAAAAcAAAACAAAAAgAAAAAAAAADAAAACAAAAAIAAAAAAAAAAgAAAAMAAAARAAAAAAAAAAIAAAACAAAAAwAAAA0AAAAAAAAAAAAAAAAAAAAAAAAACAAAAAIAAAACAAAAAAAAAAMAAAAJAAAAAgAAAAAAAAACAAAAAwAAABIAAAAAAAAAAgAAAAIAAAADAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAJAAAAAgAAAAIAAAAAAAAAAwAAAAUAAAACAAAAAAAAAAIAAAADAAAAEwAAAAAAAAACAAAAAgAAAAMAAAAPAAAAAAAAAAAAAAAAAAAAAAAAABAAAAACAAAAAAAAAAIAAAABAAAAEwAAAAIAAAACAAAAAAAAAAUAAAAKAAAAAAAAAAIAAAACAAAAAwAAABAAAAAAAAAAAAAAAAAAAAAAAAAAEQAAAAIAAAAAAAAAAgAAAAEAAAAPAAAAAgAAAAIAAAAAAAAABQAAAAsAAAAAAAAAAgAAAAIAAAADAAAAEQAAAAAAAAAAAAAAAAAAAAAAAAASAAAAAgAAAAAAAAACAAAAAQAAABAAAAACAAAAAgAAAAAAAAAFAAAADAAAAAAAAAACAAAAAgAAAAMAAAASAAAAAAAAAAAAAAAAAAAAAAAAABMAAAACAAAAAAAAAAIAAAABAAAAEQAAAAIAAAACAAAAAAAAAAUAAAANAAAAAAAAAAIAAAACAAAAAwAAABMAAAAAAAAAAAAAAAAAAAAAAAAADwAAAAIAAAAAAAAAAgAAAAEAAAASAAAAAgAAAAIAAAAAAAAABQAAAA4AAAAAAAAAAgAAAAIAAAADAAAAAgAAAAEAAAAAAAAAAQAAAAIAAAAAAAAAAAAAAAIAAAABAAAAAAAAAAEAAAACAAAAAQAAAAAAAAACAAAAAAAAAAUAAAAEAAAAAAAAAAEAAAAFAAAAAAAAAAAAAAAFAAAABAAAAAAAAAABAAAABQAAAAQAAAAAAAAABQAAAAAAAAACAAAAAQAAAAAAAAABAAAAAgAAAAAAAAAAAAAAAgAAAAEAAAAAAAAAAQAAAAIAAAABAAAAAAAAAAIAAAACAAAAAAAAAAEAAAAAAAAAAAAAAAUAAAAEAAAAAAAAAAEAAAAFAAAAAAAAAAAAAAAFAAAABAAAAAAAAAABAAAABQAAAAQAAAAAAAAABQAAAAUAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAABAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAEAAAAAAAAAAAEAAAAAAQAAAAAAAAAAAQAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAABAAAAAAAAAAAAAQAAAAAAAAAAAAA6B6FaUp9QQTPXMuL4myJBraiDfBwx9UBYJseitzTIQOL5if9jqZtAnXX+Z+ycb0C3pucbhRBCQG8wJBYqpRRAlWbDCzCY5z/eFWBUEve6P/+qo4Q50Y4/D9YM3iCcYT8fcA2QJSA0P4ADxu0qAAc/BNcGolVJ2j5d9FACqwquPh9z7MthtI9CSUSYJke/YUJQ/64OyjU0Qpi0+HCmFQdCm3GfIVdh2kHsJ11kAyauQYC3UDFJOoFBSJsFV1OwU0FK5fcxX4AmQWhy/zZIt/lACqaCPsBjzUDbdUNIScugQMYQlVJ4MXNANiuq8GTvRUDxTXnulxEZQFZ8QX5kpuw/qmG/JwYFlEAluh3Q6DB+QKn4vyNq0GZAKOXekas+UUB8xabXXhI6QG63C2pLtSNAdDBtyNfLDUDyOcu67ID2P0rCMvRXAeE/Ki2TSVyzyT9Dk+8Sz2uzP5J+w5ARWp0/NQAoOiMuhj9YnP+RyMJwPxgW7TvQVFk/KgsLYF0kQz9g5dAC6IwzQcgHPVvDex1B1XjppodHBkHJq3OMM9fwQNvcmJ7wddlAInGPpQs/w0BRobq5EBmtQJZ2ai7n+ZVAtv2G5E+bgECG+gIfKBlpQK5f8jdI91JAL39sL/WpPEB8rGxhDqklQK6yUf43XhBAxL9y/tK8+D86XyZpgrHiPwAAAAD/////AAAAAAAAAAAAAAAAAAAAAAAAAAD/////////////////////////////////////AAAAAP////8AAAAAAAAAAAAAAAABAAAAAAAAAAAAAAD/////AAAAAAAAAAABAAAAAQAAAAAAAAAAAAAA/////wAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAP////8FAAAABQAAAAAAAAAAAAAAAAAAAAAAAAD/////AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA/////////////////////////////////////wAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP////////////////////////////////////8AAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAFAAAAAQAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD/////////////////////////////////////AAAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAQAAAAEAAAABAAAAAAAAAAEAAAAAAAAABQAAAAEAAAABAAAAAAAAAAAAAAABAAAAAQAAAAAAAAABAAAAAQAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAQAAAAAAAQABAAABAQAAAAAAAQAAAAEAAAABAAEAAAAAAAAAAAAAAAAAAAAAquJYWJZl+D9jaeZNtj/zPwwdI9KqaeO/qGefXwdHdz+q4lhYlmX4P+OrlPMN3PI/DB0j0qpp47+7SQLV4VIEQKriWFiWZfg/r2kma3tz8T82eQmLqNIGwMRIWXMqSvo/fcCszPux9j+jara6ozTwP6hnn18HR3c/MSoKLequ8r+SabgA2nj0P7jBLbDOHO8/1Ym/ICfH4T+6lxjvlFXHv73m373LRPU/0vXyDVxo7T+ToKRHJXMAQF/33578aPE/pAyy64tD9T8+U/hCvyruPwxv8Y7YYwLAuXYr8NAiCEB4+LDK0Sn0P1Qeuy4j+eo/OMx50n7K7L+TrGB/nyf8v5ehC2fbYPM/aXMKexiT6z8mFRIMjg/zP7yUVwGGBNw/E6opHERf8z/z0wR2g9DqPw4pBpcOhvu/NbA29uWAA8DMaTExyXzyP02biiQ+Ruk/S8jz2/FKBEB1pzZnpbb9P7pQU4wLfPI//7ZcQXeG6D9CqEQvAYoIwDB2VB6sSgRAVyv8H5We8T+EHWF8XNPmPzB2wT8Nrrg/SEi+cX+w4L8of+GtdSDxP1sjk5AdouU/6ZjOVru13r8K0obqI6bxvwVbdNXyhfA/w5GG024n5z+rwmtMzP8BwLw9pSX49QXABe/2uQxP8D+b6wCzCvXkP7uGT87fK+Q/pz/JWw4coj+qoBf2J0nwP/yE3PUo0+I/vFJeHcaC+D96luSIqvntP/bf8sHUYu8/gZNN41mL4z9bhOqVOF4FwO6lmAh1hQhAbCVxbdhk7z+1C8NdDcfiPwG36x/0OQBAx0WJ76c2+D9nlSHXANfuP2HlfZ3gqOE/EwnVlVPg9r96+oHzEH//v5bXzdT1Auw/DM3GwLsA4D9p/8uoKcr+v+U9x5DQVAPAehjSdghb7D9sc1IetODgP8MVwwB1pu6/azPk6OGe978W8t/TUc3rP+0QMvYfP+A/RsG/QpSE8D+l3uwScxzgPwQaifgujuw/k1Vti1I43z8MAwLnSh0GQH5nYnwwZgJAiGUzWC5s6j8WyyI/BbLgPw4iUapGeQJAB3W+imnp/j9BLWR4ssrpP2t+gG5Pstk/cpBsfm6DCMCOpU9dOZsFQEv8nFypHeo/ehJ6i+6S2D9jqlGEmarLv7STC5TRiOa/bC+x8WZD6D9H3yUkWpDZP8gZvmCMuQLAreY19/eRBsCoPOc8UzzpP6KI/QV+y9g/t/MoboyWzT+Hv5q3Zu3Mvy2xROCT4uY/9gQitMMg1T9abAqhWMDkv1oLTavoUfG/PMUJP9CD5j+fHRX3t6fSPz7W2gk6bvs/WRnuHwqN9D8YFturGCTmP1EZczv0b9I/5t4exabB5D/1ESLh5fTEP9X2z6SYweQ/6lv3I2zT0D9zkRGNUNMAQKoSvc4EIfs/Xggt8wQI5T+mJHHg/w/SP4lhT/9t8vQ/DrZ/DbwH7D+XlhbYZrjkP34LIpFt6c4/lwfp8fLX9L+j96CTTf76v3WdNhEv9uM/d8c3o4lV0D/vFdCHVcsFwAHeDq0F1QhApbYqcZiN5D9KoilqByXLPwX0/diA0vq/0fo0GxnxAMBbaTkvlCzjP/RrFrWXrMs/UYTrky7jA0DB9f4FiZYAQEGAk/3QzeE/r/TeqE8t0D/OqjlsnPbvvz8RKU8JOfW/smSEbK/O4T8MzuyPm3DDP/rFtctq9gZAfb1EVEaSA0Dts5dVInnhP18SFMc79MM/7y34cw6LAMDFrRJsZO0DwC2KLvLSYuA/hx5wcUHewz+49SnK/4ruPyeS0PX9a+E/ZxaaLvvZ3z8WPu5T2QS8Pygo4RIvMqa/BJ0Kqsd0279cKW4ay8jdP3b05bmZ364/10/qtdxk2r+Bcz6CDMvpv54qOw+Amdw/qLV71pW7sT/YKc80nIPUP8OfIaBJ77G/LyTuD1un2z+diYu8efWzP1wU7ACkfwjAZroyPL1yBkAmv3lKJJbbPysKSE4W+p0/dIgqY79TA8ATLTOQ3tsGwJ2zweD/Xdg/XO/jXeFUaL8VW2qLFKfov1cA9Aa6XfK/tIa7YGgI2T+f3hu/sxqPv2nXdPpf3Pc/jkw8Jbda8j+tT/z8tGPVP1yBHpJd35k/KYvYOy1s8j/yz+kCQjPrP9+agH7x59g/PZfJ9aBhpr/rDKzvYBb+PwtkiaGCt/c/vb1mVr+f1T/JIHwHc8Govw7aeF6+9vG/Xv7kD6fp979isYioQYHVP7AIQZuSFrG/3z1AdUTnAUDN3XY9O7f9P0AdQ9ljYNQ/dJANJPTOrb8kLECUiiPlP4yF7UgmStA/9xGmXxCG1T9qZzix4W2zv2SGJRJVrPe/Fh9a2M/B/b8IexzFCoPSP9y1QFD2bLe/Q86cWLJe/b+mOOfYm78BwOTjkPAGE9E/8aPCUKu/ub9pPZyLCiUGwBA7Mev/BQlALOmrlRi+0j+AMJ/dKULBv7iLtL6a6QRAEMDV/yajAUDa62dE3crJP1P70RgBUbq/38hVnR6esT/s1tG10Z/Ov/zLwalHPss/dTS9NKTXx78nMcRzCIEHQAabxDsAmQRA0tyLK3gSyT+Aui7nOhDGv5Gs58z3WgHATN3forJuBMCAui7nOhDGP9Lciyt4Esm/WAJyHQ4c7z8UP5HFIs3iP3U0vTSk18c//MvBqUc+y7+cvv8HLg/Kvy1I/mHsI+K/U/vRGAFRuj/a62dE3crJv8p+WV8KlQjAuQ/nOP43B0CAMJ/dKULBPyzpq5UYvtK/ZoU+VoLh4L9etLlRUfvtv/GjwlCrv7k/5OOQ8AYT0b9DfT9FhufXPwUX8hJp+4u/3LVAUPZstz8IexzFCoPSv9+L609E5fQ/q9Fz7X2J7T9qZzix4W2zP/cRpl8QhtW/vtNilqGX+j8MOy7QJoL0P3SQDST0zq0/QB1D2WNg1L8IIjSvGNkDwGB8Jou2GAfAsAhBm5IWsT9isYioQYHVvyS9D3zb6uy/gnwRa7uM9L/JIHwHc8GoP729Zla/n9W/CsAHJZwmAEDEW6OYT1r6Pz2XyfWgYaY/35qAfvHn2L83Tdy4lS30vxf2/gZ0jPq/XIEekl3fmb+tT/z8tGPVvybPr2zJ1/+/K7mJ0ypVAsCf3hu/sxqPPwCGu2BoCNm/5oITrpZn+r+UDUyDP+n/v1zv413hVGg/nbPB4P9d2L9MlmkxNvgCQMtZlKE85v8/KwpIThb6nb8mv3lKJJbbv8+SZsTvOOc/pQCIIOYw0j+diYu8efWzvy8k7g9bp9u/kxYDa+pKtD9XlYvA8HnVv6i1e9aVu7G/nio7D4CZ3L/WR6rNh5EGwCkgQweBkghAdvTluZnfrr9cKW4ay8jdvxbjhr1f1QVAR5C0MzivAkAWPu5T2QS8v2cWmi772d+/cKj4lzLJCEBx2QJfYrMFQIcecHFB3sO/LYou8tJi4L+jr7lhO38BwIcI0Nb7xgTAXxIUxzv0w7/ts5dVInnhv0T+l8DZLfE/MP3FoFvS5D8MzuyPm3DDv7JkhGyvzuG/tzhzRIRc0b9Ovv3/0z7mv6/03qhPLdC/m4CT/dDN4b9dwjU5VCQBQBBJX1ntCv0/9GsWtZesy79baTkvlCzjv1mjYgEz++S/oW6KnOQW8b9KoilqByXLv6W2KnGYjeS/SmaKz3Vx9z+BZB5yxGHwP3fHN6OJVdC/dZ02ES/2478PuaBjLrXaP4/JU81pPaO/fgsikW3pzr+XlhbYZrjkv4tSn7YDbP0/f2LnFKlF9z+mJHHg/w/Sv14ILfMECOW/mfg4qYhR/b+OP+RQDCACwOpb9yNs09C/1fbPpJjB5L9pN2WOVZ3wv3hHy9nxIve/URlzO/Rv0r8YFturGCTmv1d1/KKR8QPA8gsy9qzSB8CfHRX3t6fSvzzFCT/Qg+a/EYStnrzV9r/2QJqI7Lb9v/YEIrTDINW/LbFE4JPi5r/7kQEs5fEDQHunnf4GeQBAooj9BX7L2L+oPOc8Uzzpv+ydYY2SSAfAL4HK6CRTB0BH3yUkWpDZv2wvsfFmQ+i/Ik0Yzruh6T8fM3LoGoDUP3oSeovukti/S/ycXKkd6r9rEv+7UWcHQCRIQe/GfwNAa36Abk+y2b9BLWR4ssrpv9KT87qa0bM/FTyktw823L8WyyI/BbLgv4hlM1gubOq/DizMp9Ki6r8b5ckdjVrzv5NVbYtSON+/BBqJ+C6O7L/dUBFqgyXYv00Wh18r7+q/7RAy9h8/4L8W8t/TUc3rv4RM5DKx3wDAfvWIj94aBcBsc1IetODgv3oY0nYIW+y/oGcTFF54AUDkJqS/FKX6PwzNxsC7AOC/ltfN1PUC7L+5Wrz/zHnzP6688w2rNOc/YeV9neCo4b9nlSHXANfuvw9RsxKjY/s/1V8GteXE8j+1C8NdDcfiv2wlcW3YZO+/IOywaA7Q8b9bFP+4Tg36v4GTTeNZi+O/9t/ywdRi77+tRc3yFR7eP2bkcHXJkLO//ITc9SjT4r+qoBf2J0nwv2YHKoswwfm/iQcLspCjAcCb6wCzCvXkvwXv9rkMT/C/YkuwYAMXBMApCNUai9kIwMORhtNuJ+e/BVt01fKF8L+ZqWEfvIjsP6h693QZYNk/WyOTkB2i5b8of+GtdSDxvwpaaulDSwVADMQAX+lOAECEHWF8XNPmv1cr/B+VnvG/XyFG6opcCMD/mtR32/UEQP+2XEF3hui/ulBTjAt88r/imfCfRP+yP9zbvtc8XeO/TZuKJD5G6b/MaTExyXzyvxiTQeElXOO/rbJRQVGN9L/z0wR2g9DqvxOqKRxEX/O/FDGCEei99j9x8zV4VYTmP2lzCnsYk+u/l6ELZ9tg878pRXacaDT/v3k6GZRqoQXAVB67LiP56r94+LDK0Sn0vwO6pZ9b7wFAvK0nKVcc9j8+U/hCvyruv6QMsuuLQ/W/FPhKFYv46j8MyxaDTOW/v9L18g1caO2/vebfvctE9b/7GD8ZrF3xv3gx1AR9bQDAuMEtsM4c77+SabgA2nj0v5xKFIwxsATArKNSBaKsB0Cjara6ozTwv33ArMz7sfa/dF2U0FcWCcDxL357DJX/P69pJmt7c/G/quJYWJZl+L/YntVJlnrSP4sRLzXM+fe/46uU8w3c8r+q4lhYlmX4v85lu5+QRwRAsI0H/WU8479jaeZNtj/zv6riWFiWZfi/sI0H/WU847/OZbufkEcEQHAoPUBrnss/9exKzDtFtT88wM8kax+gP9OqeKeAYog/MW0ItiZvcj+ph+smvt5bP2lCaV5dEUU/StaUmQDaLz+kK9y22BMYP0O3whZuMwI/IIbgZGWE6z7UkjYaEM3UPuezxwa9cr8+LybxRMnFpz6E1N8DbPiRPsYjySMvK3s+//////8fAAj//////zMQCP////9/MiAI/////28yMAj/////YzJACP///z9iMlAI////N2IyYAj///8zYjJwCP//vzNiMoAI//+rM2IykAj/f6szYjKgCP8PqzNiMrAI/wOrM2IywAi/A6szYjLQCJ8DqzNiMuAImQOrM2Iy8Aj//////z8PCP//////Kx8I/////38pLwj/////Pyk/CP////85KU8I////PzgpXwj///8POClvCP///w44KX8I//8fDjgpjwj//w8OOCmfCP9/DQ44Ka8I/w8NDjgpvwj/DQ0OOCnPCP8MDQ44Kd8IxwwNDjgp7wjEDA0OOCn/CAcAAAAHAAAAAQAAAAIAAAAEAAAAAwAAAAAAAAAAAAAABwAAAAMAAAABAAAAAgAAAAUAAAAEAAAAAAAAAAAAAAAEAAAABAAAAAAAAAACAAAAAQAAAAMAAAAOAAAABgAAAAsAAAACAAAABwAAAAEAAAAYAAAABQAAAAoAAAABAAAABgAAAAAAAAAmAAAABwAAAAwAAAADAAAACAAAAAIAAAAxAAAACQAAAA4AAAAAAAAABQAAAAQAAAA6AAAACAAAAA0AAAAEAAAACQAAAAMAAAA/AAAACwAAAAYAAAAPAAAACgAAABAAAABIAAAADAAAAAcAAAAQAAAACwAAABEAAABTAAAACgAAAAUAAAATAAAADgAAAA8AAABhAAAADQAAAAgAAAARAAAADAAAABIAAABrAAAADgAAAAkAAAASAAAADQAAABMAAAB1AAAADwAAABMAAAARAAAAEgAAABAAAAAGAAAAAgAAAAMAAAAFAAAABAAAAAAAAAAAAAAAAAAAAAYAAAACAAAAAwAAAAEAAAAFAAAABAAAAAAAAAAAAAAABwAAAAUAAAADAAAABAAAAAEAAAAAAAAAAgAAAAAAAAACAAAAAwAAAAEAAAAFAAAABAAAAAYAAAAAAAAAAAAAABgtRFT7Ifk/GC1EVPsh+b8YLURU+yEJQBgtRFT7IQnAYWxnb3MuYwBoM05laWdoYm9yUm90YXRpb25zAGNvb3JkaWprLmMAX3VwQXA3Q2hlY2tlZABfdXBBcDdyQ2hlY2tlZABkaXJlY3RlZEVkZ2UuYwBkaXJlY3RlZEVkZ2VUb0JvdW5kYXJ5AGFkamFjZW50RmFjZURpclt0bXBGaWprLmZhY2VdW2ZpamsuZmFjZV0gPT0gS0kAZmFjZWlqay5jAF9mYWNlSWprUGVudFRvQ2VsbEJvdW5kYXJ5AGFkamFjZW50RmFjZURpcltjZW50ZXJJSksuZmFjZV1bZmFjZTJdID09IEtJAF9mYWNlSWprVG9DZWxsQm91bmRhcnkAaDNJbmRleC5jAGNvbXBhY3RDZWxscwBsYXRMbmdUb0NlbGwAY2VsbFRvQ2hpbGRQb3MAdmFsaWRhdGVDaGlsZFBvcwBsYXRMbmcuYwBjZWxsQXJlYVJhZHMyAHBvbHlnb24tPm5leHQgPT0gTlVMTABsaW5rZWRHZW8uYwBhZGROZXdMaW5rZWRQb2x5Z29uAG5leHQgIT0gTlVMTABsb29wICE9IE5VTEwAYWRkTmV3TGlua2VkTG9vcABwb2x5Z29uLT5maXJzdCA9PSBOVUxMAGFkZExpbmtlZExvb3AAY29vcmQgIT0gTlVMTABhZGRMaW5rZWRDb29yZABsb29wLT5maXJzdCA9PSBOVUxMAGlubmVyTG9vcHMgIT0gTlVMTABub3JtYWxpemVNdWx0aVBvbHlnb24AYmJveGVzICE9IE5VTEwAY2FuZGlkYXRlcyAhPSBOVUxMAGZpbmRQb2x5Z29uRm9ySG9sZQBjYW5kaWRhdGVCQm94ZXMgIT0gTlVMTAByZXZEaXIgIT0gSU5WQUxJRF9ESUdJVABsb2NhbGlqLmMAY2VsbFRvTG9jYWxJamsAYmFzZUNlbGwgIT0gb3JpZ2luQmFzZUNlbGwAIShvcmlnaW5PblBlbnQgJiYgaW5kZXhPblBlbnQpAGJhc2VDZWxsID09IG9yaWdpbkJhc2VDZWxsAGJhc2VDZWxsICE9IElOVkFMSURfQkFTRV9DRUxMAGxvY2FsSWprVG9DZWxsACFfaXNCYXNlQ2VsbFBlbnRhZ29uKGJhc2VDZWxsKQBiYXNlQ2VsbFJvdGF0aW9ucyA+PSAwAGdyaWRQYXRoQ2VsbHMAcG9seWZpbGwuYwBpdGVyU3RlcFBvbHlnb25Db21wYWN0ADAAdmVydGV4LmMAdmVydGV4Um90YXRpb25zAGNlbGxUb1ZlcnRleABncmFwaC0+YnVja2V0cyAhPSBOVUxMAHZlcnRleEdyYXBoLmMAaW5pdFZlcnRleEdyYXBoAG5vZGUgIT0gTlVMTABhZGRWZXJ0ZXhOb2Rl";var kA=28640;function _A(f0,y0,V0,m0){ke("Assertion failed: "+n0(f0)+", at: "+[y0?n0(y0):"unknown filename",V0,m0?n0(m0):"unknown function"])}function ie(){return q.length}function KA(f0,y0,V0){t0.set(t0.subarray(y0,y0+V0),f0)}function Ae(f0){return l.___errno_location&&(U[l.___errno_location()>>2]=f0),f0}function NA(f0){ke("OOM")}function HA(f0){try{var y0=new ArrayBuffer(f0);return y0.byteLength!=f0?void 0:(new Int8Array(y0).set(q),Xt(y0),h0(y0),1)}catch{}}function oe(f0){var y0=ie(),V0=16777216,m0=2147483648-V0;if(f0>m0)return!1;for(var t=16777216,k=Math.max(y0,t);k<f0;)k<=536870912?k=A0(2*k,V0):k=Math.min(A0((3*k+2147483648)/4,V0),m0);var dA=HA(k);return!!dA}var pe=typeof atob=="function"?atob:function(f0){var y0="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",V0="",m0,t,k,dA,yA,SA,lA,gA=0;f0=f0.replace(/[^A-Za-z0-9\+\/\=]/g,"");do dA=y0.indexOf(f0.charAt(gA++)),yA=y0.indexOf(f0.charAt(gA++)),SA=y0.indexOf(f0.charAt(gA++)),lA=y0.indexOf(f0.charAt(gA++)),m0=dA<<2|yA>>4,t=(yA&15)<<4|SA>>2,k=(SA&3)<<6|lA,V0=V0+String.fromCharCode(m0),SA!==64&&(V0=V0+String.fromCharCode(t)),lA!==64&&(V0=V0+String.fromCharCode(k));while(gA<f0.length);return V0};function we(f0){try{for(var y0=pe(f0),V0=new Uint8Array(y0.length),m0=0;m0<y0.length;++m0)V0[m0]=y0.charCodeAt(m0);return V0}catch{throw new Error("Converting base64 string to bytes failed.")}}function Ye(f0){if(G0(f0))return we(f0.slice(v0.length))}var qt={Math,Int8Array,Int32Array,Uint8Array,Float32Array,Float64Array},Mt={b:M,c:S,d:_A,e:Ae,f:ie,g:KA,h:oe,i:NA,o:kA,p:S0},w0=(function(f0,y0,V0){"almost asm";var m0=new f0.Int8Array(V0),t=new f0.Int32Array(V0);new f0.Uint8Array(V0),new f0.Float32Array(V0);var k=new f0.Float64Array(V0),dA=y0.o|0,yA=y0.p|0,SA=f0.Math.floor,lA=f0.Math.abs,gA=f0.Math.sqrt,ge=f0.Math.pow,mA=f0.Math.cos,aA=f0.Math.sin,GA=f0.Math.tan,Xe=f0.Math.acos,Jt=f0.Math.asin,ft=f0.Math.atan,CA=f0.Math.atan2,ue=f0.Math.ceil,UA=f0.Math.imul,Pe=f0.Math.min,Kt=f0.Math.max,fe=f0.Math.clz32,nA=y0.b,j=y0.c,X0=y0.d,dt=y0.e,ht=y0.f,A1=y0.g,Et=y0.h,J=y0.i,w=28656;function P0(e){return m0=new Int8Array(e),t=new Int32Array(e),k=new Float64Array(e),V0=e,!0}function Y0(e){e=e|0;var A=0;return A=w,w=w+e|0,w=w+15&-16,A|0}function K0(){return w|0}function cA(e){e=e|0,w=e}function wA(e,A){e=e|0,w=e}function de(e,A){e=e|0,A=A|0;var n=0,r=0,i=0;return(e|0)<0?(A=2,A|0):(e|0)>13780509?(A=Ht(15,A)|0,A|0):(n=((e|0)<0)<<31>>31,i=TA(e|0,n|0,3,0)|0,r=j()|0,n=$0(e|0,n|0,1,0)|0,n=TA(i|0,r|0,n|0,j()|0)|0,n=$0(n|0,j()|0,1,0)|0,e=j()|0,t[A>>2]=n,t[A+4>>2]=e,A=0,A|0)}function se(e,A,n,r){return e=e|0,A=A|0,n=n|0,r=r|0,Me(e,A,n,r,0)|0}function Me(e,A,n,r,i){e=e|0,A=A|0,n=n|0,r=r|0,i=i|0;var o=0,a=0,c=0,d=0,p=0;if(d=w,w=w+16|0,a=d,!(ve(e,A,n,r,i)|0))return r=0,w=d,r|0;do if((n|0)>=0){if((n|0)>13780509){if(o=Ht(15,a)|0,o|0)break;c=a,a=t[c>>2]|0,c=t[c+4>>2]|0}else o=((n|0)<0)<<31>>31,p=TA(n|0,o|0,3,0)|0,c=j()|0,o=$0(n|0,o|0,1,0)|0,o=TA(p|0,c|0,o|0,j()|0)|0,o=$0(o|0,j()|0,1,0)|0,c=j()|0,t[a>>2]=o,t[a+4>>2]=c,a=o;if(De(r|0,0,a<<3|0)|0,i|0){De(i|0,0,a<<2|0)|0,o=ee(e,A,n,r,i,a,c,0)|0;break}o=qA(a,4)|0,o?(p=ee(e,A,n,r,o,a,c,0)|0,W0(o),o=p):o=13}else o=2;while(!1);return p=o,w=d,p|0}function ve(e,A,n,r,i){e=e|0,A=A|0,n=n|0,r=r|0,i=i|0;var o=0,a=0,c=0,d=0,p=0,v=0,E=0,_=0,I=0,P=0,$=0;if($=w,w=w+16|0,I=$,P=$+8|0,_=I,t[_>>2]=e,t[_+4>>2]=A,(n|0)<0)return P=2,w=$,P|0;if(o=r,t[o>>2]=e,t[o+4>>2]=A,o=(i|0)!=0,o&&(t[i>>2]=0),LA(e,A)|0)return P=9,w=$,P|0;t[P>>2]=0;A:do if((n|0)>=1)if(o)for(v=1,p=0,E=0,_=1,o=e;;){if(!(p|E)){if(o=IA(o,A,4,P,I)|0,o|0)break A;if(A=I,o=t[A>>2]|0,A=t[A+4>>2]|0,LA(o,A)|0){o=9;break A}}if(o=IA(o,A,t[26800+(E<<2)>>2]|0,P,I)|0,o|0)break A;if(A=I,o=t[A>>2]|0,A=t[A+4>>2]|0,e=r+(v<<3)|0,t[e>>2]=o,t[e+4>>2]=A,t[i+(v<<2)>>2]=_,e=p+1|0,a=(e|0)==(_|0),c=E+1|0,d=(c|0)==6,LA(o,A)|0){o=9;break A}if(_=_+(d&a&1)|0,(_|0)>(n|0)){o=0;break}else v=v+1|0,p=a?0:e,E=a?d?0:c:E}else for(v=1,p=0,E=0,_=1,o=e;;){if(!(p|E)){if(o=IA(o,A,4,P,I)|0,o|0)break A;if(A=I,o=t[A>>2]|0,A=t[A+4>>2]|0,LA(o,A)|0){o=9;break A}}if(o=IA(o,A,t[26800+(E<<2)>>2]|0,P,I)|0,o|0)break A;if(A=I,o=t[A>>2]|0,A=t[A+4>>2]|0,e=r+(v<<3)|0,t[e>>2]=o,t[e+4>>2]=A,e=p+1|0,a=(e|0)==(_|0),c=E+1|0,d=(c|0)==6,LA(o,A)|0){o=9;break A}if(_=_+(d&a&1)|0,(_|0)>(n|0)){o=0;break}else v=v+1|0,p=a?0:e,E=a?d?0:c:E}else o=0;while(!1);return P=o,w=$,P|0}function ee(e,A,n,r,i,o,a,c){e=e|0,A=A|0,n=n|0,r=r|0,i=i|0,o=o|0,a=a|0,c=c|0;var d=0,p=0,v=0,E=0,_=0,I=0,P=0,$=0,K=0,u0=0;if($=w,w=w+16|0,I=$+8|0,P=$,d=nt(e|0,A|0,o|0,a|0)|0,v=j()|0,E=r+(d<<3)|0,K=E,u0=t[K>>2]|0,K=t[K+4>>2]|0,p=(u0|0)==(e|0)&(K|0)==(A|0),!((u0|0)==0&(K|0)==0|p))do d=$0(d|0,v|0,1,0)|0,d=tt(d|0,j()|0,o|0,a|0)|0,v=j()|0,E=r+(d<<3)|0,u0=E,K=t[u0>>2]|0,u0=t[u0+4>>2]|0,p=(K|0)==(e|0)&(u0|0)==(A|0);while(!((K|0)==0&(u0|0)==0|p));if(d=i+(d<<2)|0,p&&(t[d>>2]|0)<=(c|0)||(u0=E,t[u0>>2]=e,t[u0+4>>2]=A,t[d>>2]=c,(c|0)>=(n|0)))return u0=0,w=$,u0|0;switch(p=c+1|0,t[I>>2]=0,d=IA(e,A,2,I,P)|0,d|0){case 9:{_=9;break}case 0:{d=P,d=ee(t[d>>2]|0,t[d+4>>2]|0,n,r,i,o,a,p)|0,d||(_=9);break}}A:do if((_|0)==9){switch(t[I>>2]=0,d=IA(e,A,3,I,P)|0,d|0){case 9:break;case 0:{if(d=P,d=ee(t[d>>2]|0,t[d+4>>2]|0,n,r,i,o,a,p)|0,d|0)break A;break}default:break A}switch(t[I>>2]=0,d=IA(e,A,1,I,P)|0,d|0){case 9:break;case 0:{if(d=P,d=ee(t[d>>2]|0,t[d+4>>2]|0,n,r,i,o,a,p)|0,d|0)break A;break}default:break A}switch(t[I>>2]=0,d=IA(e,A,5,I,P)|0,d|0){case 9:break;case 0:{if(d=P,d=ee(t[d>>2]|0,t[d+4>>2]|0,n,r,i,o,a,p)|0,d|0)break A;break}default:break A}switch(t[I>>2]=0,d=IA(e,A,4,I,P)|0,d|0){case 9:break;case 0:{if(d=P,d=ee(t[d>>2]|0,t[d+4>>2]|0,n,r,i,o,a,p)|0,d|0)break A;break}default:break A}switch(t[I>>2]=0,d=IA(e,A,6,I,P)|0,d|0){case 9:break;case 0:{if(d=P,d=ee(t[d>>2]|0,t[d+4>>2]|0,n,r,i,o,a,p)|0,d|0)break A;break}default:break A}return u0=0,w=$,u0|0}while(!1);return u0=d,w=$,u0|0}function IA(e,A,n,r,i){e=e|0,A=A|0,n=n|0,r=r|0,i=i|0;var o=0,a=0,c=0,d=0,p=0,v=0,E=0,_=0,I=0,P=0;if(n>>>0>6)return i=1,i|0;if(E=(t[r>>2]|0)%6|0,t[r>>2]=E,(E|0)>0){o=0;do n=Re(n)|0,o=o+1|0;while((o|0)<(t[r>>2]|0))}if(E=C0(e|0,A|0,45)|0,j()|0,v=E&127,v>>>0>121)return i=5,i|0;d=YA(e,A)|0,o=C0(e|0,A|0,52)|0,j()|0,o=o&15;A:do if(!o)p=8;else{for(;;){if(a=(15-o|0)*3|0,c=C0(e|0,A|0,a|0)|0,j()|0,c=c&7,(c|0)==7){A=5;break}if(P=(le(o)|0)==0,o=o+-1|0,_=k0(7,0,a|0)|0,A=A&~(j()|0),I=k0(t[(P?432:16)+(c*28|0)+(n<<2)>>2]|0,0,a|0)|0,a=j()|0,n=t[(P?640:224)+(c*28|0)+(n<<2)>>2]|0,e=I|e&~_,A=a|A,!n){n=0;break A}if(!o){p=8;break A}}return A|0}while(!1);(p|0)==8&&(P=t[848+(v*28|0)+(n<<2)>>2]|0,I=k0(P|0,0,45)|0,e=I|e,A=j()|0|A&-1040385,n=t[4272+(v*28|0)+(n<<2)>>2]|0,(P&127|0)==127&&(P=k0(t[848+(v*28|0)+20>>2]|0,0,45)|0,A=j()|0|A&-1040385,n=t[4272+(v*28|0)+20>>2]|0,e=Ne(P|e,A)|0,A=j()|0,t[r>>2]=(t[r>>2]|0)+1)),c=C0(e|0,A|0,45)|0,j()|0,c=c&127;A:do if(EA(c)|0){e:do if((YA(e,A)|0)==1){if((v|0)!=(c|0))if(Cn(c,t[7696+(v*28|0)>>2]|0)|0){e=p1(e,A)|0,a=1,A=j()|0;break}else X0(27795,26864,533,26872);switch(d|0){case 3:{e=Ne(e,A)|0,A=j()|0,t[r>>2]=(t[r>>2]|0)+1,a=0;break e}case 5:{e=p1(e,A)|0,A=j()|0,t[r>>2]=(t[r>>2]|0)+5,a=0;break e}case 0:return P=9,P|0;default:return P=1,P|0}}else a=0;while(!1);if((n|0)>0){o=0;do e=h1(e,A)|0,A=j()|0,o=o+1|0;while((o|0)!=(n|0))}if((v|0)!=(c|0)){if(!(t1(c)|0)){if((a|0)!=0|(YA(e,A)|0)!=5)break;t[r>>2]=(t[r>>2]|0)+1;break}switch(E&127){case 8:case 118:break A}(YA(e,A)|0)!=3&&(t[r>>2]=(t[r>>2]|0)+1)}}else if((n|0)>0){o=0;do e=Ne(e,A)|0,A=j()|0,o=o+1|0;while((o|0)!=(n|0))}while(!1);return t[r>>2]=((t[r>>2]|0)+n|0)%6|0,P=i,t[P>>2]=e,t[P+4>>2]=A,P=0,P|0}function O2(e,A,n,r){return e=e|0,A=A|0,n=n|0,r=r|0,gn(e,A,n,r)|0?(De(r|0,0,n*48|0)|0,r=U2(e,A,n,r)|0,r|0):(r=0,r|0)}function gn(e,A,n,r){e=e|0,A=A|0,n=n|0,r=r|0;var i=0,o=0,a=0,c=0,d=0,p=0,v=0,E=0,_=0,I=0,P=0;if(P=w,w=w+16|0,_=P,I=P+8|0,E=_,t[E>>2]=e,t[E+4>>2]=A,(n|0)<0)return I=2,w=P,I|0;if(!n)return I=r,t[I>>2]=e,t[I+4>>2]=A,I=0,w=P,I|0;t[I>>2]=0;A:do if(LA(e,A)|0)e=9;else{i=0,E=e;do{if(e=IA(E,A,4,I,_)|0,e|0)break A;if(A=_,E=t[A>>2]|0,A=t[A+4>>2]|0,i=i+1|0,LA(E,A)|0){e=9;break A}}while((i|0)<(n|0));v=r,t[v>>2]=E,t[v+4>>2]=A,v=n+-1|0,p=0,e=1;do{if(i=26800+(p<<2)|0,(p|0)==5)for(a=t[i>>2]|0,o=0,i=e;;){if(e=_,e=IA(t[e>>2]|0,t[e+4>>2]|0,a,I,_)|0,e|0)break A;if((o|0)!=(v|0))if(d=_,c=t[d>>2]|0,d=t[d+4>>2]|0,e=r+(i<<3)|0,t[e>>2]=c,t[e+4>>2]=d,!(LA(c,d)|0))e=i+1|0;else{e=9;break A}else e=i;if(o=o+1|0,(o|0)>=(n|0))break;i=e}else for(a=_,d=t[i>>2]|0,c=0,i=e,o=t[a>>2]|0,a=t[a+4>>2]|0;;){if(e=IA(o,a,d,I,_)|0,e|0)break A;if(a=_,o=t[a>>2]|0,a=t[a+4>>2]|0,e=r+(i<<3)|0,t[e>>2]=o,t[e+4>>2]=a,e=i+1|0,LA(o,a)|0){e=9;break A}if(c=c+1|0,(c|0)>=(n|0))break;i=e}p=p+1|0}while(p>>>0<6);e=_,e=(E|0)==(t[e>>2]|0)&&(A|0)==(t[e+4>>2]|0)?0:9}while(!1);return I=e,w=P,I|0}function U2(e,A,n,r){e=e|0,A=A|0,n=n|0,r=r|0;var i=0,o=0,a=0,c=0,d=0,p=0,v=0,E=0,_=0;if(E=w,w=w+16|0,a=E,!n)return t[r>>2]=e,t[r+4>>2]=A,r=0,w=E,r|0;do if((n|0)>=0){if((n|0)>13780509){if(i=Ht(15,a)|0,i|0)break;o=a,i=t[o>>2]|0,o=t[o+4>>2]|0}else i=((n|0)<0)<<31>>31,v=TA(n|0,i|0,3,0)|0,o=j()|0,i=$0(n|0,i|0,1,0)|0,i=TA(v|0,o|0,i|0,j()|0)|0,i=$0(i|0,j()|0,1,0)|0,o=j()|0,v=a,t[v>>2]=i,t[v+4>>2]=o;if(p=qA(i,8)|0,!p)i=13;else{if(v=qA(i,4)|0,!v){W0(p),i=13;break}if(i=ee(e,A,n,p,v,i,o,0)|0,i|0){W0(p),W0(v);break}if(A=t[a>>2]|0,a=t[a+4>>2]|0,(a|0)>0|(a|0)==0&A>>>0>0){i=0,c=0,d=0;do e=p+(c<<3)|0,o=t[e>>2]|0,e=t[e+4>>2]|0,!((o|0)==0&(e|0)==0)&&(t[v+(c<<2)>>2]|0)==(n|0)&&(_=r+(i<<3)|0,t[_>>2]=o,t[_+4>>2]=e,i=i+1|0),c=$0(c|0,d|0,1,0)|0,d=j()|0;while((d|0)<(a|0)|(d|0)==(a|0)&c>>>0<A>>>0)}W0(p),W0(v),i=0}}else i=2;while(!1);return _=i,w=E,_|0}function e1(e,A,n,r){e=e|0,A=A|0,n=n|0,r=r|0;var i=0,o=0,a=0,c=0,d=0,p=0;for(c=w,w=w+16|0,o=c,a=c+8|0,i=(LA(e,A)|0)==0,i=i?1:2;;){if(t[a>>2]=0,p=(IA(e,A,i,a,o)|0)==0,d=o,p&((t[d>>2]|0)==(n|0)?(t[d+4>>2]|0)==(r|0):0)){e=4;break}if(i=i+1|0,i>>>0>=7){i=7,e=4;break}}return(e|0)==4?(w=c,i|0):0}function $2(e,A,n,r){e=e|0,A=A|0,n=n|0,r=r|0;var i=0,o=0,a=0,c=0,d=0,p=0;if(c=w,w=w+48|0,i=c+16|0,o=c+8|0,a=c,n=vt(n)|0,n|0)return a=n,w=c,a|0;if(p=e,d=t[p+4>>2]|0,n=o,t[n>>2]=t[p>>2],t[n+4>>2]=d,Un(o,i),n=wn(i,A,a)|0,!n){if(A=t[o>>2]|0,o=t[e+8>>2]|0,(o|0)>0){i=t[e+12>>2]|0,n=0;do A=(t[i+(n<<3)>>2]|0)+A|0,n=n+1|0;while((n|0)<(o|0))}n=a,i=t[n>>2]|0,n=t[n+4>>2]|0,o=((A|0)<0)<<31>>31,(n|0)<(o|0)|(n|0)==(o|0)&i>>>0<A>>>0?(n=a,t[n>>2]=A,t[n+4>>2]=o,n=o):A=i,d=$0(A|0,n|0,12,0)|0,p=j()|0,n=a,t[n>>2]=d,t[n+4>>2]=p,n=r,t[n>>2]=d,t[n+4>>2]=p,n=0}return p=n,w=c,p|0}function mn(e,A,n,r,i,o,a){e=e|0,A=A|0,n=n|0,r=r|0,i=i|0,o=o|0,a=a|0;var c=0,d=0,p=0,v=0,E=0,_=0,I=0,P=0,$=0,K=0,u0=0,s0=0,i0=0,W=0,z0=0,O0=0,N0=0,rA=0,iA=0,hA=0,AA=0,U0=0,M0=0,uA=0,xA=0,oA=0,bA=0,WA=0,ir=0;if(xA=w,w=w+64|0,AA=xA+48|0,U0=xA+32|0,M0=xA+24|0,z0=xA+8|0,O0=xA,d=t[e>>2]|0,(d|0)<=0)return uA=0,w=xA,uA|0;for(N0=e+4|0,rA=AA+8|0,iA=U0+8|0,hA=z0+8|0,c=0,i0=0;;){p=t[N0>>2]|0,s0=p+(i0<<4)|0,t[AA>>2]=t[s0>>2],t[AA+4>>2]=t[s0+4>>2],t[AA+8>>2]=t[s0+8>>2],t[AA+12>>2]=t[s0+12>>2],(i0|0)==(d+-1|0)?(t[U0>>2]=t[p>>2],t[U0+4>>2]=t[p+4>>2],t[U0+8>>2]=t[p+8>>2],t[U0+12>>2]=t[p+12>>2]):(s0=p+(i0+1<<4)|0,t[U0>>2]=t[s0>>2],t[U0+4>>2]=t[s0+4>>2],t[U0+8>>2]=t[s0+8>>2],t[U0+12>>2]=t[s0+12>>2]),d=ri(AA,U0,r,M0)|0;A:do if(d)p=0,c=d;else if(d=M0,p=t[d>>2]|0,d=t[d+4>>2]|0,(d|0)>0|(d|0)==0&p>>>0>0){u0=0,s0=0;e:for(;;){if(bA=1/(+(p>>>0)+4294967296*+(d|0)),ir=+k[AA>>3],d=PA(p|0,d|0,u0|0,s0|0)|0,WA=+(d>>>0)+4294967296*+(j()|0),oA=+(u0>>>0)+4294967296*+(s0|0),k[z0>>3]=bA*(ir*WA)+bA*(+k[U0>>3]*oA),k[hA>>3]=bA*(+k[rA>>3]*WA)+bA*(+k[iA>>3]*oA),d=g1(z0,r,O0)|0,d|0){c=d;break}K=O0,$=t[K>>2]|0,K=t[K+4>>2]|0,_=nt($|0,K|0,A|0,n|0)|0,v=j()|0,d=a+(_<<3)|0,E=d,p=t[E>>2]|0,E=t[E+4>>2]|0;t:do if((p|0)==0&(E|0)==0)W=d,uA=16;else for(I=0,P=0;;){if((I|0)>(n|0)|(I|0)==(n|0)&P>>>0>A>>>0){c=1;break e}if((p|0)==($|0)&(E|0)==(K|0))break t;if(d=$0(_|0,v|0,1,0)|0,_=tt(d|0,j()|0,A|0,n|0)|0,v=j()|0,P=$0(P|0,I|0,1,0)|0,I=j()|0,d=a+(_<<3)|0,E=d,p=t[E>>2]|0,E=t[E+4>>2]|0,(p|0)==0&(E|0)==0){W=d,uA=16;break}}while(!1);if((uA|0)==16&&(uA=0,!(($|0)==0&(K|0)==0))&&(P=W,t[P>>2]=$,t[P+4>>2]=K,P=o+(t[i>>2]<<3)|0,t[P>>2]=$,t[P+4>>2]=K,P=i,P=$0(t[P>>2]|0,t[P+4>>2]|0,1,0)|0,$=j()|0,K=i,t[K>>2]=P,t[K+4>>2]=$),u0=$0(u0|0,s0|0,1,0)|0,s0=j()|0,d=M0,p=t[d>>2]|0,d=t[d+4>>2]|0,!((d|0)>(s0|0)|(d|0)==(s0|0)&p>>>0>u0>>>0)){p=1;break A}}p=0}else p=1;while(!1);if(i0=i0+1|0,!p){uA=21;break}if(d=t[e>>2]|0,(i0|0)>=(d|0)){c=0,uA=21;break}}return(uA|0)==21?(w=xA,c|0):0}function W2(e,A,n,r){e=e|0,A=A|0,n=n|0,r=r|0;var i=0,o=0,a=0,c=0,d=0,p=0,v=0,E=0,_=0,I=0,P=0,$=0,K=0,u0=0,s0=0,i0=0,W=0,z0=0,O0=0,N0=0,rA=0,iA=0,hA=0,AA=0,U0=0,M0=0,uA=0,xA=0,oA=0,bA=0,WA=0;if(WA=w,w=w+112|0,uA=WA+80|0,d=WA+72|0,xA=WA,oA=WA+56|0,i=vt(n)|0,i|0)return bA=i,w=WA,bA|0;if(p=e+8|0,bA=me((t[p>>2]<<5)+32|0)|0,!bA)return bA=13,w=WA,bA|0;if(w1(e,bA),i=vt(n)|0,!i){if(U0=e,M0=t[U0+4>>2]|0,i=d,t[i>>2]=t[U0>>2],t[i+4>>2]=M0,Un(d,uA),i=wn(uA,A,xA)|0,i)U0=0,M0=0;else{if(i=t[d>>2]|0,o=t[p>>2]|0,(o|0)>0){a=t[e+12>>2]|0,n=0;do i=(t[a+(n<<3)>>2]|0)+i|0,n=n+1|0;while((n|0)!=(o|0));n=i}else n=i;i=xA,o=t[i>>2]|0,i=t[i+4>>2]|0,a=((n|0)<0)<<31>>31,(i|0)<(a|0)|(i|0)==(a|0)&o>>>0<n>>>0?(i=xA,t[i>>2]=n,t[i+4>>2]=a,i=a):n=o,U0=$0(n|0,i|0,12,0)|0,M0=j()|0,i=xA,t[i>>2]=U0,t[i+4>>2]=M0,i=0}if(!i){if(n=qA(U0,8)|0,!n)return W0(bA),bA=13,w=WA,bA|0;if(c=qA(U0,8)|0,!c)return W0(bA),W0(n),bA=13,w=WA,bA|0;hA=uA,t[hA>>2]=0,t[hA+4>>2]=0,hA=e,AA=t[hA+4>>2]|0,i=d,t[i>>2]=t[hA>>2],t[i+4>>2]=AA,i=mn(d,U0,M0,A,uA,n,c)|0;A:do if(i)W0(n),W0(c),W0(bA);else{e:do if((t[p>>2]|0)>0){for(a=e+12|0,o=0;i=mn((t[a>>2]|0)+(o<<3)|0,U0,M0,A,uA,n,c)|0,o=o+1|0,!(i|0);)if((o|0)>=(t[p>>2]|0))break e;W0(n),W0(c),W0(bA);break A}while(!1);(M0|0)>0|(M0|0)==0&U0>>>0>0&&De(c|0,0,U0<<3|0)|0,AA=uA,hA=t[AA+4>>2]|0;e:do if((hA|0)>0|(hA|0)==0&(t[AA>>2]|0)>>>0>0){N0=n,rA=c,iA=n,hA=c,AA=n,i=n,W=n,z0=c,O0=c,n=c;t:for(;;){for(K=0,u0=0,s0=0,i0=0,o=0,a=0;;){c=xA,d=c+56|0;do t[c>>2]=0,c=c+4|0;while((c|0)<(d|0));if(A=N0+(K<<3)|0,p=t[A>>2]|0,A=t[A+4>>2]|0,ve(p,A,1,xA,0)|0){c=xA,d=c+56|0;do t[c>>2]=0,c=c+4|0;while((c|0)<(d|0));c=qA(7,4)|0,c|0&&(ee(p,A,1,xA,c,7,0,0)|0,W0(c))}for($=0;;){P=xA+($<<3)|0,I=t[P>>2]|0,P=t[P+4>>2]|0;n:do if((I|0)==0&(P|0)==0)c=o,d=a;else{if(v=nt(I|0,P|0,U0|0,M0|0)|0,p=j()|0,c=r+(v<<3)|0,A=c,d=t[A>>2]|0,A=t[A+4>>2]|0,!((d|0)==0&(A|0)==0)){E=0,_=0;do{if((E|0)>(M0|0)|(E|0)==(M0|0)&_>>>0>U0>>>0)break t;if((d|0)==(I|0)&(A|0)==(P|0)){c=o,d=a;break n}c=$0(v|0,p|0,1,0)|0,v=tt(c|0,j()|0,U0|0,M0|0)|0,p=j()|0,_=$0(_|0,E|0,1,0)|0,E=j()|0,c=r+(v<<3)|0,A=c,d=t[A>>2]|0,A=t[A+4>>2]|0}while(!((d|0)==0&(A|0)==0))}if((I|0)==0&(P|0)==0){c=o,d=a;break}Ze(I,P,oA)|0,L1(e,bA,oA)|0&&(_=$0(o|0,a|0,1,0)|0,a=j()|0,E=c,t[E>>2]=I,t[E+4>>2]=P,o=rA+(o<<3)|0,t[o>>2]=I,t[o+4>>2]=P,o=_),c=o,d=a}while(!1);if($=$+1|0,$>>>0>=7)break;o=c,a=d}if(K=$0(K|0,u0|0,1,0)|0,u0=j()|0,s0=$0(s0|0,i0|0,1,0)|0,i0=j()|0,a=uA,o=t[a>>2]|0,a=t[a+4>>2]|0,(i0|0)<(a|0)|(i0|0)==(a|0)&s0>>>0<o>>>0)o=c,a=d;else break}if((a|0)>0|(a|0)==0&o>>>0>0){o=0,a=0;do i0=N0+(o<<3)|0,t[i0>>2]=0,t[i0+4>>2]=0,o=$0(o|0,a|0,1,0)|0,a=j()|0,i0=uA,s0=t[i0+4>>2]|0;while((a|0)<(s0|0)|((a|0)==(s0|0)?o>>>0<(t[i0>>2]|0)>>>0:0))}if(i0=uA,t[i0>>2]=c,t[i0+4>>2]=d,(d|0)>0|(d|0)==0&c>>>0>0)$=n,K=O0,u0=AA,s0=z0,i0=rA,n=W,O0=i,z0=iA,W=$,i=K,AA=hA,hA=u0,iA=s0,rA=N0,N0=i0;else break e}W0(iA),W0(hA),W0(bA),i=1;break A}else i=c;while(!1);W0(bA),W0(n),W0(i),i=0}while(!1);return bA=i,w=WA,bA|0}}return W0(bA),bA=i,w=WA,bA|0}function G2(e,A,n){e=e|0,A=A|0,n=n|0;var r=0,i=0,o=0,a=0,c=0,d=0,p=0,v=0;if(v=w,w=w+176|0,d=v,(A|0)<1)return Xn(n,0,0),p=0,w=v,p|0;for(c=e,c=C0(t[c>>2]|0,t[c+4>>2]|0,52)|0,j()|0,Xn(n,(A|0)>6?A:6,c&15),c=0;r=e+(c<<3)|0,r=At(t[r>>2]|0,t[r+4>>2]|0,d)|0,!(r|0);){if(r=t[d>>2]|0,(r|0)>0){a=0;do o=d+8+(a<<4)|0,a=a+1|0,r=d+8+(((a|0)%(r|0)|0)<<4)|0,i=Lo(n,r,o)|0,i?Ar(n,i)|0:wo(n,o,r)|0,r=t[d>>2]|0;while((a|0)<(r|0))}if(c=c+1|0,(c|0)>=(A|0)){r=0,p=13;break}}return(p|0)==13?(w=v,r|0):(Jn(n),p=r,w=v,p|0)}function Y2(e,A,n){e=e|0,A=A|0,n=n|0;var r=0,i=0,o=0,a=0;if(o=w,w=w+32|0,r=o,i=o+16|0,e=G2(e,A,i)|0,e|0)return n=e,w=o,n|0;if(t[n>>2]=0,t[n+4>>2]=0,t[n+8>>2]=0,e=Kn(i)|0,e|0)do{A=Ji(n)|0;do Ki(A,e)|0,a=e+16|0,t[r>>2]=t[a>>2],t[r+4>>2]=t[a+4>>2],t[r+8>>2]=t[a+8>>2],t[r+12>>2]=t[a+12>>2],Ar(i,e)|0,e=ko(i,r)|0;while((e|0)!=0);e=Kn(i)|0}while((e|0)!=0);return Jn(i),e=Ao(n)|0,e?(Nn(n),a=e,w=o,a|0):(a=0,w=o,a|0)}function EA(e){return e=e|0,e>>>0>121?(e=0,e|0):(e=t[7696+(e*28|0)+16>>2]|0,e|0)}function t1(e){return e=e|0,(e|0)==4|(e|0)==117|0}function yn(e){return e=e|0,t[11120+((t[e>>2]|0)*216|0)+((t[e+4>>2]|0)*72|0)+((t[e+8>>2]|0)*24|0)+(t[e+12>>2]<<3)>>2]|0}function q2(e){return e=e|0,t[11120+((t[e>>2]|0)*216|0)+((t[e+4>>2]|0)*72|0)+((t[e+8>>2]|0)*24|0)+(t[e+12>>2]<<3)+4>>2]|0}function X2(e,A){e=e|0,A=A|0,e=7696+(e*28|0)|0,t[A>>2]=t[e>>2],t[A+4>>2]=t[e+4>>2],t[A+8>>2]=t[e+8>>2],t[A+12>>2]=t[e+12>>2]}function J2(e,A){e=e|0,A=A|0;var n=0,r=0;if(A>>>0>20)return A=-1,A|0;do if((t[11120+(A*216|0)>>2]|0)!=(e|0))if((t[11120+(A*216|0)+8>>2]|0)!=(e|0))if((t[11120+(A*216|0)+16>>2]|0)!=(e|0))if((t[11120+(A*216|0)+24>>2]|0)!=(e|0))if((t[11120+(A*216|0)+32>>2]|0)!=(e|0))if((t[11120+(A*216|0)+40>>2]|0)!=(e|0))if((t[11120+(A*216|0)+48>>2]|0)!=(e|0))if((t[11120+(A*216|0)+56>>2]|0)!=(e|0))if((t[11120+(A*216|0)+64>>2]|0)!=(e|0))if((t[11120+(A*216|0)+72>>2]|0)!=(e|0))if((t[11120+(A*216|0)+80>>2]|0)!=(e|0))if((t[11120+(A*216|0)+88>>2]|0)!=(e|0))if((t[11120+(A*216|0)+96>>2]|0)!=(e|0))if((t[11120+(A*216|0)+104>>2]|0)!=(e|0))if((t[11120+(A*216|0)+112>>2]|0)!=(e|0))if((t[11120+(A*216|0)+120>>2]|0)!=(e|0))if((t[11120+(A*216|0)+128>>2]|0)!=(e|0))if((t[11120+(A*216|0)+136>>2]|0)==(e|0))e=2,n=1,r=2;else{if((t[11120+(A*216|0)+144>>2]|0)==(e|0)){e=0,n=2,r=0;break}if((t[11120+(A*216|0)+152>>2]|0)==(e|0)){e=0,n=2,r=1;break}if((t[11120+(A*216|0)+160>>2]|0)==(e|0)){e=0,n=2,r=2;break}if((t[11120+(A*216|0)+168>>2]|0)==(e|0)){e=1,n=2,r=0;break}if((t[11120+(A*216|0)+176>>2]|0)==(e|0)){e=1,n=2,r=1;break}if((t[11120+(A*216|0)+184>>2]|0)==(e|0)){e=1,n=2,r=2;break}if((t[11120+(A*216|0)+192>>2]|0)==(e|0)){e=2,n=2,r=0;break}if((t[11120+(A*216|0)+200>>2]|0)==(e|0)){e=2,n=2,r=1;break}if((t[11120+(A*216|0)+208>>2]|0)==(e|0)){e=2,n=2,r=2;break}else e=-1;return e|0}else e=2,n=1,r=1;else e=2,n=1,r=0;else e=1,n=1,r=2;else e=1,n=1,r=1;else e=1,n=1,r=0;else e=0,n=1,r=2;else e=0,n=1,r=1;else e=0,n=1,r=0;else e=2,n=0,r=2;else e=2,n=0,r=1;else e=2,n=0,r=0;else e=1,n=0,r=2;else e=1,n=0,r=1;else e=1,n=0,r=0;else e=0,n=0,r=2;else e=0,n=0,r=1;else e=0,n=0,r=0;while(!1);return A=t[11120+(A*216|0)+(n*72|0)+(e*24|0)+(r<<3)+4>>2]|0,A|0}function Cn(e,A){return e=e|0,A=A|0,(t[7696+(e*28|0)+20>>2]|0)==(A|0)?(A=1,A|0):(A=(t[7696+(e*28|0)+24>>2]|0)==(A|0),A|0)}function n1(e,A){return e=e|0,A=A|0,t[848+(e*28|0)+(A<<2)>>2]|0}function r1(e,A){return e=e|0,A=A|0,(t[848+(e*28|0)>>2]|0)==(A|0)?(A=0,A|0):(t[848+(e*28|0)+4>>2]|0)==(A|0)?(A=1,A|0):(t[848+(e*28|0)+8>>2]|0)==(A|0)?(A=2,A|0):(t[848+(e*28|0)+12>>2]|0)==(A|0)?(A=3,A|0):(t[848+(e*28|0)+16>>2]|0)==(A|0)?(A=4,A|0):(t[848+(e*28|0)+20>>2]|0)==(A|0)?(A=5,A|0):((t[848+(e*28|0)+24>>2]|0)==(A|0)?6:7)|0}function K2(){return 122}function Ai(e){e=e|0;var A=0,n=0,r=0;A=0;do k0(A|0,0,45)|0,r=j()|0|134225919,n=e+(A<<3)|0,t[n>>2]=-1,t[n+4>>2]=r,A=A+1|0;while((A|0)!=122);return 0}function ei(e){e=e|0;var A=0,n=0,r=0;return r=+k[e+16>>3],n=+k[e+24>>3],A=r-n,+(r<n?A+6.283185307179586:A)}function vn(e){return e=e|0,+k[e+16>>3]<+k[e+24>>3]|0}function ti(e){return e=e|0,+(+k[e>>3]-+k[e+8>>3])}function i1(e,A){e=e|0,A=A|0;var n=0,r=0,i=0;return n=+k[A>>3],!(n>=+k[e+8>>3])||!(n<=+k[e>>3])?(A=0,A|0):(r=+k[e+16>>3],n=+k[e+24>>3],i=+k[A+8>>3],A=i>=n,e=i<=r&1,r<n?A&&(e=1):A||(e=0),A=(e|0)!=0,A|0)}function o1(e,A){e=e|0,A=A|0;var n=0,r=0,i=0,o=0,a=0,c=0,d=0,p=0,v=0;return+k[e>>3]<+k[A+8>>3]||+k[e+8>>3]>+k[A>>3]?(r=0,r|0):(o=+k[e+16>>3],n=e+24|0,v=+k[n>>3],a=o<v,r=A+16|0,p=+k[r>>3],i=A+24|0,d=+k[i>>3],c=p<d,A=v-p<d-o,e=a?c|A?1:2:0,A=c?a?1:A?2:1:0,o=+te(o,e),o<+te(+k[i>>3],A)||(v=+te(+k[n>>3],e),v>+te(+k[r>>3],A))?(c=0,c|0):(c=1,c|0))}function ni(e,A,n,r){e=e|0,A=A|0,n=n|0,r=r|0;var i=0,o=0,a=0,c=0,d=0;o=+k[e+16>>3],d=+k[e+24>>3],e=o<d,c=+k[A+16>>3],a=+k[A+24>>3],i=c<a,A=d-c<a-o,t[n>>2]=e?i|A?1:2:0,t[r>>2]=i?e?1:A?2:1:0}function xn(e,A){e=e|0,A=A|0;var n=0,r=0,i=0,o=0,a=0,c=0,d=0,p=0,v=0;return+k[e>>3]<+k[A>>3]||+k[e+8>>3]>+k[A+8>>3]?(r=0,r|0):(r=e+16|0,d=+k[r>>3],o=+k[e+24>>3],a=d<o,n=A+16|0,v=+k[n>>3],i=A+24|0,p=+k[i>>3],c=v<p,A=o-v<p-d,e=a?c|A?1:2:0,A=c?a?1:A?2:1:0,o=+te(o,e),o<=+te(+k[i>>3],A)?(v=+te(+k[r>>3],e),c=v>=+te(+k[n>>3],A),c|0):(c=0,c|0))}function bn(e,A){e=e|0,A=A|0;var n=0,r=0,i=0,o=0,a=0,c=0;i=w,w=w+176|0,r=i,t[r>>2]=4,c=+k[A>>3],k[r+8>>3]=c,o=+k[A+16>>3],k[r+16>>3]=o,k[r+24>>3]=c,c=+k[A+24>>3],k[r+32>>3]=c,a=+k[A+8>>3],k[r+40>>3]=a,k[r+48>>3]=c,k[r+56>>3]=a,k[r+64>>3]=o,A=r+72|0,n=A+96|0;do t[A>>2]=0,A=A+4|0;while((A|0)<(n|0));rt(e|0,r|0,168)|0,w=i}function wn(e,A,n){e=e|0,A=A|0,n=n|0;var r=0,i=0,o=0,a=0,c=0,d=0,p=0,v=0,E=0,_=0,I=0,P=0,$=0,K=0;P=w,w=w+288|0,v=P+264|0,E=P+96|0,p=P,c=p,d=c+96|0;do t[c>>2]=0,c=c+4|0;while((c|0)<(d|0));return A=y1(A,p)|0,A|0?(I=A,w=P,I|0):(d=p,p=t[d>>2]|0,d=t[d+4>>2]|0,Ze(p,d,v)|0,At(p,d,E)|0,a=+yt(v,E+8|0),k[v>>3]=+k[e>>3],d=v+8|0,k[d>>3]=+k[e+16>>3],k[E>>3]=+k[e+8>>3],p=E+8|0,k[p>>3]=+k[e+24>>3],i=+yt(v,E),K=+k[d>>3]-+k[p>>3],o=+lA(+K),$=+k[v>>3]-+k[E>>3],r=+lA(+$),!(K==0|$==0)&&(K=+nr(+o,+r),K=+ue(+(i*i/+_t(+(K/+_t(+o,+r)),3)/(a*(a*2.59807621135)*.8))),k[dA>>3]=K,_=~~K>>>0,I=+lA(K)>=1?K>0?~~+Pe(+SA(K/4294967296),4294967295)>>>0:~~+ue((K-+(~~K>>>0))/4294967296)>>>0:0,(t[dA+4>>2]&2146435072|0)!=2146435072)?(E=(_|0)==0&(I|0)==0,A=n,t[A>>2]=E?1:_,t[A+4>>2]=E?0:I,A=0):A=1,I=A,w=P,I|0)}function ri(e,A,n,r){e=e|0,A=A|0,n=n|0,r=r|0;var i=0,o=0,a=0,c=0,d=0,p=0,v=0;p=w,w=w+288|0,a=p+264|0,c=p+96|0,d=p,i=d,o=i+96|0;do t[i>>2]=0,i=i+4|0;while((i|0)<(o|0));return n=y1(n,d)|0,n|0?(r=n,w=p,r|0):(n=d,i=t[n>>2]|0,n=t[n+4>>2]|0,Ze(i,n,a)|0,At(i,n,c)|0,v=+yt(a,c+8|0),v=+ue(+(+yt(e,A)/(v*2))),k[dA>>3]=v,n=~~v>>>0,i=+lA(v)>=1?v>0?~~+Pe(+SA(v/4294967296),4294967295)>>>0:~~+ue((v-+(~~v>>>0))/4294967296)>>>0:0,(t[dA+4>>2]&2146435072|0)==2146435072?(r=1,w=p,r|0):(d=(n|0)==0&(i|0)==0,t[r>>2]=d?1:n,t[r+4>>2]=d?0:i,r=0,w=p,r|0))}function ii(e,A){e=e|0,A=+A;var n=0,r=0,i=0,o=0,a=0,c=0,d=0,p=0,v=0;o=e+16|0,a=+k[o>>3],n=e+24|0,i=+k[n>>3],r=a-i,r=a<i?r+6.283185307179586:r,p=+k[e>>3],c=e+8|0,d=+k[c>>3],v=p-d,r=(r*A-r)*.5,A=(v*A-v)*.5,p=p+A,k[e>>3]=p>1.5707963267948966?1.5707963267948966:p,A=d-A,k[c>>3]=A<-1.5707963267948966?-1.5707963267948966:A,A=a+r,A=A>3.141592653589793?A+-6.283185307179586:A,k[o>>3]=A<-3.141592653589793?A+6.283185307179586:A,A=i-r,A=A>3.141592653589793?A+-6.283185307179586:A,k[n>>3]=A<-3.141592653589793?A+6.283185307179586:A}function oi(e,A,n,r){e=e|0,A=A|0,n=n|0,r=r|0,t[e>>2]=A,t[e+4>>2]=n,t[e+8>>2]=r}function si(e,A){e=e|0,A=A|0;var n=0,r=0,i=0,o=0,a=0,c=0,d=0,p=0,v=0,E=0,_=0;E=A+8|0,t[E>>2]=0,d=+k[e>>3],a=+lA(+d),p=+k[e+8>>3],c=+lA(+p)*1.1547005383792515,a=a+c*.5,n=~~a,e=~~c,a=a-+(n|0),c=c-+(e|0);do if(a<.5)if(a<.3333333333333333)if(t[A>>2]=n,c<(a+1)*.5){t[A+4>>2]=e;break}else{e=e+1|0,t[A+4>>2]=e;break}else if(_=1-a,e=(!(c<_)&1)+e|0,t[A+4>>2]=e,_<=c&c<a*2){n=n+1|0,t[A>>2]=n;break}else{t[A>>2]=n;break}else{if(!(a<.6666666666666666))if(n=n+1|0,t[A>>2]=n,c<a*.5){t[A+4>>2]=e;break}else{e=e+1|0,t[A+4>>2]=e;break}if(c<1-a){if(t[A+4>>2]=e,a*2+-1<c){t[A>>2]=n;break}}else e=e+1|0,t[A+4>>2]=e;n=n+1|0,t[A>>2]=n}while(!1);do if(d<0)if(e&1){v=(e+1|0)/2|0,v=PA(n|0,((n|0)<0)<<31>>31|0,v|0,((v|0)<0)<<31>>31|0)|0,n=~~(+(n|0)-((+(v>>>0)+4294967296*+(j()|0))*2+1)),t[A>>2]=n;break}else{v=(e|0)/2|0,v=PA(n|0,((n|0)<0)<<31>>31|0,v|0,((v|0)<0)<<31>>31|0)|0,n=~~(+(n|0)-(+(v>>>0)+4294967296*+(j()|0))*2),t[A>>2]=n;break}while(!1);v=A+4|0,p<0&&(n=n-((e<<1|1|0)/2|0)|0,t[A>>2]=n,e=0-e|0,t[v>>2]=e),r=e-n|0,(n|0)<0?(i=0-n|0,t[v>>2]=r,t[E>>2]=i,t[A>>2]=0,e=r,n=0):i=0,(e|0)<0&&(n=n-e|0,t[A>>2]=n,i=i-e|0,t[E>>2]=i,t[v>>2]=0,e=0),o=n-i|0,r=e-i|0,(i|0)<0&&(t[A>>2]=o,t[v>>2]=r,t[E>>2]=0,e=r,n=o,i=0),r=(e|0)<(n|0)?e:n,r=(i|0)<(r|0)?i:r,!((r|0)<=0)&&(t[A>>2]=n-r,t[v>>2]=e-r,t[E>>2]=i-r)}function QA(e){e=e|0;var A=0,n=0,r=0,i=0,o=0,a=0;A=t[e>>2]|0,a=e+4|0,n=t[a>>2]|0,(A|0)<0&&(n=n-A|0,t[a>>2]=n,o=e+8|0,t[o>>2]=(t[o>>2]|0)-A,t[e>>2]=0,A=0),(n|0)<0?(A=A-n|0,t[e>>2]=A,o=e+8|0,i=(t[o>>2]|0)-n|0,t[o>>2]=i,t[a>>2]=0,n=0):(i=e+8|0,o=i,i=t[i>>2]|0),(i|0)<0&&(A=A-i|0,t[e>>2]=A,n=n-i|0,t[a>>2]=n,t[o>>2]=0,i=0),r=(n|0)<(A|0)?n:A,r=(i|0)<(r|0)?i:r,!((r|0)<=0)&&(t[e>>2]=A-r,t[a>>2]=n-r,t[o>>2]=i-r)}function Te(e,A){e=e|0,A=A|0;var n=0,r=0;r=t[e+8>>2]|0,n=+((t[e+4>>2]|0)-r|0),k[A>>3]=+((t[e>>2]|0)-r|0)-n*.5,k[A+8>>3]=n*.8660254037844386}function $A(e,A,n){e=e|0,A=A|0,n=n|0,t[n>>2]=(t[A>>2]|0)+(t[e>>2]|0),t[n+4>>2]=(t[A+4>>2]|0)+(t[e+4>>2]|0),t[n+8>>2]=(t[A+8>>2]|0)+(t[e+8>>2]|0)}function s1(e,A,n){e=e|0,A=A|0,n=n|0,t[n>>2]=(t[e>>2]|0)-(t[A>>2]|0),t[n+4>>2]=(t[e+4>>2]|0)-(t[A+4>>2]|0),t[n+8>>2]=(t[e+8>>2]|0)-(t[A+8>>2]|0)}function Ln(e,A){e=e|0,A=A|0;var n=0,r=0;n=UA(t[e>>2]|0,A)|0,t[e>>2]=n,n=e+4|0,r=UA(t[n>>2]|0,A)|0,t[n>>2]=r,e=e+8|0,A=UA(t[e>>2]|0,A)|0,t[e>>2]=A}function zt(e){e=e|0;var A=0,n=0,r=0,i=0,o=0,a=0,c=0;a=t[e>>2]|0,c=(a|0)<0,r=(t[e+4>>2]|0)-(c?a:0)|0,o=(r|0)<0,i=(o?0-r|0:0)+((t[e+8>>2]|0)-(c?a:0))|0,n=(i|0)<0,e=n?0:i,A=(o?0:r)-(n?i:0)|0,i=(c?0:a)-(o?r:0)-(n?i:0)|0,n=(A|0)<(i|0)?A:i,n=(e|0)<(n|0)?e:n,r=(n|0)>0,e=e-(r?n:0)|0,A=A-(r?n:0)|0;A:do switch(i-(r?n:0)|0){case 0:switch(A|0){case 0:return c=(e|0)==0?0:(e|0)==1?1:7,c|0;case 1:return c=(e|0)==0?2:(e|0)==1?3:7,c|0;default:break A}case 1:switch(A|0){case 0:return c=(e|0)==0?4:(e|0)==1?5:7,c|0;case 1:{if(!e)e=6;else break A;return e|0}default:break A}}while(!1);return c=7,c|0}function li(e){e=e|0;var A=0,n=0,r=0,i=0,o=0,a=0,c=0,d=0,p=0;if(d=e+8|0,a=t[d>>2]|0,c=(t[e>>2]|0)-a|0,p=e+4|0,a=(t[p>>2]|0)-a|0,c>>>0>715827881|a>>>0>715827881){if(r=(c|0)>0,i=2147483647-c|0,o=-2147483648-c|0,(r?(i|0)<(c|0):(o|0)>(c|0))||(n=c<<1,r?(2147483647-n|0)<(c|0):(-2147483648-n|0)>(c|0))||((a|0)>0?(2147483647-a|0)<(a|0):(-2147483648-a|0)>(a|0))||(A=c*3|0,n=a<<1,(r?(i|0)<(n|0):(o|0)>(n|0))||((c|0)>-1?(A|-2147483648|0)>=(a|0):(A^-2147483648|0)<(a|0))))return p=1,p|0}else n=a<<1,A=c*3|0;return r=je(+(A-a|0)*.14285714285714285)|0,t[e>>2]=r,i=je(+(n+c|0)*.14285714285714285)|0,t[p>>2]=i,t[d>>2]=0,n=(i|0)<(r|0),A=n?r:i,n=n?i:r,(n|0)<0&&(((n|0)==-2147483648||((A|0)>0?(2147483647-A|0)<(n|0):(-2147483648-A|0)>(n|0)))&&X0(27795,26892,354,26903),((A|0)>-1?(A|-2147483648|0)>=(n|0):(A^-2147483648|0)<(n|0))&&X0(27795,26892,354,26903)),A=i-r|0,(r|0)<0?(n=0-r|0,t[p>>2]=A,t[d>>2]=n,t[e>>2]=0,r=0):(A=i,n=0),(A|0)<0&&(r=r-A|0,t[e>>2]=r,n=n-A|0,t[d>>2]=n,t[p>>2]=0,A=0),o=r-n|0,i=A-n|0,(n|0)<0?(t[e>>2]=o,t[p>>2]=i,t[d>>2]=0,A=i,i=o,n=0):i=r,r=(A|0)<(i|0)?A:i,r=(n|0)<(r|0)?n:r,(r|0)<=0?(p=0,p|0):(t[e>>2]=i-r,t[p>>2]=A-r,t[d>>2]=n-r,p=0,p|0)}function ai(e){e=e|0;var A=0,n=0,r=0,i=0,o=0,a=0,c=0,d=0;if(a=e+8|0,i=t[a>>2]|0,o=(t[e>>2]|0)-i|0,c=e+4|0,i=(t[c>>2]|0)-i|0,o>>>0>715827881|i>>>0>715827881){if(n=(o|0)>0,(n?(2147483647-o|0)<(o|0):(-2147483648-o|0)>(o|0))||(A=o<<1,r=(i|0)>0,r?(2147483647-i|0)<(i|0):(-2147483648-i|0)>(i|0)))return c=1,c|0;if(d=i<<1,(r?(2147483647-d|0)<(i|0):(-2147483648-d|0)>(i|0))||(n?(2147483647-A|0)<(i|0):(-2147483648-A|0)>(i|0))||(n=i*3|0,(i|0)>-1?(n|-2147483648|0)>=(o|0):(n^-2147483648|0)<(o|0)))return d=1,d|0}else n=i*3|0,A=o<<1;return r=je(+(A+i|0)*.14285714285714285)|0,t[e>>2]=r,i=je(+(n-o|0)*.14285714285714285)|0,t[c>>2]=i,t[a>>2]=0,n=(i|0)<(r|0),A=n?r:i,n=n?i:r,(n|0)<0&&(((n|0)==-2147483648||((A|0)>0?(2147483647-A|0)<(n|0):(-2147483648-A|0)>(n|0)))&&X0(27795,26892,402,26917),((A|0)>-1?(A|-2147483648|0)>=(n|0):(A^-2147483648|0)<(n|0))&&X0(27795,26892,402,26917)),A=i-r|0,(r|0)<0?(n=0-r|0,t[c>>2]=A,t[a>>2]=n,t[e>>2]=0,r=0):(A=i,n=0),(A|0)<0&&(r=r-A|0,t[e>>2]=r,n=n-A|0,t[a>>2]=n,t[c>>2]=0,A=0),o=r-n|0,i=A-n|0,(n|0)<0?(t[e>>2]=o,t[c>>2]=i,t[a>>2]=0,A=i,i=o,n=0):i=r,r=(A|0)<(i|0)?A:i,r=(n|0)<(r|0)?n:r,(r|0)<=0?(d=0,d|0):(t[e>>2]=i-r,t[c>>2]=A-r,t[a>>2]=n-r,d=0,d|0)}function ci(e){e=e|0;var A=0,n=0,r=0,i=0,o=0,a=0,c=0;a=e+8|0,n=t[a>>2]|0,A=(t[e>>2]|0)-n|0,c=e+4|0,n=(t[c>>2]|0)-n|0,r=je(+((A*3|0)-n|0)*.14285714285714285)|0,t[e>>2]=r,A=je(+((n<<1)+A|0)*.14285714285714285)|0,t[c>>2]=A,t[a>>2]=0,n=A-r|0,(r|0)<0?(o=0-r|0,t[c>>2]=n,t[a>>2]=o,t[e>>2]=0,A=n,r=0,n=o):n=0,(A|0)<0&&(r=r-A|0,t[e>>2]=r,n=n-A|0,t[a>>2]=n,t[c>>2]=0,A=0),o=r-n|0,i=A-n|0,(n|0)<0?(t[e>>2]=o,t[c>>2]=i,t[a>>2]=0,A=i,i=o,n=0):i=r,r=(A|0)<(i|0)?A:i,r=(n|0)<(r|0)?n:r,!((r|0)<=0)&&(t[e>>2]=i-r,t[c>>2]=A-r,t[a>>2]=n-r)}function kn(e){e=e|0;var A=0,n=0,r=0,i=0,o=0,a=0,c=0;a=e+8|0,n=t[a>>2]|0,A=(t[e>>2]|0)-n|0,c=e+4|0,n=(t[c>>2]|0)-n|0,r=je(+((A<<1)+n|0)*.14285714285714285)|0,t[e>>2]=r,A=je(+((n*3|0)-A|0)*.14285714285714285)|0,t[c>>2]=A,t[a>>2]=0,n=A-r|0,(r|0)<0?(o=0-r|0,t[c>>2]=n,t[a>>2]=o,t[e>>2]=0,A=n,r=0,n=o):n=0,(A|0)<0&&(r=r-A|0,t[e>>2]=r,n=n-A|0,t[a>>2]=n,t[c>>2]=0,A=0),o=r-n|0,i=A-n|0,(n|0)<0?(t[e>>2]=o,t[c>>2]=i,t[a>>2]=0,A=i,i=o,n=0):i=r,r=(A|0)<(i|0)?A:i,r=(n|0)<(r|0)?n:r,!((r|0)<=0)&&(t[e>>2]=i-r,t[c>>2]=A-r,t[a>>2]=n-r)}function jt(e){e=e|0;var A=0,n=0,r=0,i=0,o=0,a=0,c=0;A=t[e>>2]|0,a=e+4|0,n=t[a>>2]|0,c=e+8|0,r=t[c>>2]|0,i=n+(A*3|0)|0,t[e>>2]=i,n=r+(n*3|0)|0,t[a>>2]=n,A=(r*3|0)+A|0,t[c>>2]=A,r=n-i|0,(i|0)<0?(A=A-i|0,t[a>>2]=r,t[c>>2]=A,t[e>>2]=0,n=r,r=0):r=i,(n|0)<0&&(r=r-n|0,t[e>>2]=r,A=A-n|0,t[c>>2]=A,t[a>>2]=0,n=0),o=r-A|0,i=n-A|0,(A|0)<0?(t[e>>2]=o,t[a>>2]=i,t[c>>2]=0,r=o,A=0):i=n,n=(i|0)<(r|0)?i:r,n=(A|0)<(n|0)?A:n,!((n|0)<=0)&&(t[e>>2]=r-n,t[a>>2]=i-n,t[c>>2]=A-n)}function Fe(e){e=e|0;var A=0,n=0,r=0,i=0,o=0,a=0,c=0;i=t[e>>2]|0,a=e+4|0,A=t[a>>2]|0,c=e+8|0,n=t[c>>2]|0,r=(A*3|0)+i|0,i=n+(i*3|0)|0,t[e>>2]=i,t[a>>2]=r,A=(n*3|0)+A|0,t[c>>2]=A,n=r-i|0,(i|0)<0?(A=A-i|0,t[a>>2]=n,t[c>>2]=A,t[e>>2]=0,i=0):n=r,(n|0)<0&&(i=i-n|0,t[e>>2]=i,A=A-n|0,t[c>>2]=A,t[a>>2]=0,n=0),o=i-A|0,r=n-A|0,(A|0)<0?(t[e>>2]=o,t[a>>2]=r,t[c>>2]=0,i=o,A=0):r=n,n=(r|0)<(i|0)?r:i,n=(A|0)<(n|0)?A:n,!((n|0)<=0)&&(t[e>>2]=i-n,t[a>>2]=r-n,t[c>>2]=A-n)}function Mn(e,A){e=e|0,A=A|0;var n=0,r=0,i=0,o=0,a=0,c=0;(A+-1|0)>>>0>=6||(i=(t[15440+(A*12|0)>>2]|0)+(t[e>>2]|0)|0,t[e>>2]=i,c=e+4|0,r=(t[15440+(A*12|0)+4>>2]|0)+(t[c>>2]|0)|0,t[c>>2]=r,a=e+8|0,A=(t[15440+(A*12|0)+8>>2]|0)+(t[a>>2]|0)|0,t[a>>2]=A,n=r-i|0,(i|0)<0?(A=A-i|0,t[c>>2]=n,t[a>>2]=A,t[e>>2]=0,r=0):(n=r,r=i),(n|0)<0&&(r=r-n|0,t[e>>2]=r,A=A-n|0,t[a>>2]=A,t[c>>2]=0,n=0),o=r-A|0,i=n-A|0,(A|0)<0?(t[e>>2]=o,t[c>>2]=i,t[a>>2]=0,r=o,A=0):i=n,n=(i|0)<(r|0)?i:r,n=(A|0)<(n|0)?A:n,!((n|0)<=0)&&(t[e>>2]=r-n,t[c>>2]=i-n,t[a>>2]=A-n))}function En(e){e=e|0;var A=0,n=0,r=0,i=0,o=0,a=0,c=0;i=t[e>>2]|0,a=e+4|0,A=t[a>>2]|0,c=e+8|0,n=t[c>>2]|0,r=A+i|0,i=n+i|0,t[e>>2]=i,t[a>>2]=r,A=n+A|0,t[c>>2]=A,n=r-i|0,(i|0)<0?(A=A-i|0,t[a>>2]=n,t[c>>2]=A,t[e>>2]=0,r=0):(n=r,r=i),(n|0)<0&&(r=r-n|0,t[e>>2]=r,A=A-n|0,t[c>>2]=A,t[a>>2]=0,n=0),o=r-A|0,i=n-A|0,(A|0)<0?(t[e>>2]=o,t[a>>2]=i,t[c>>2]=0,r=o,A=0):i=n,n=(i|0)<(r|0)?i:r,n=(A|0)<(n|0)?A:n,!((n|0)<=0)&&(t[e>>2]=r-n,t[a>>2]=i-n,t[c>>2]=A-n)}function St(e){e=e|0;var A=0,n=0,r=0,i=0,o=0,a=0,c=0;A=t[e>>2]|0,a=e+4|0,r=t[a>>2]|0,c=e+8|0,n=t[c>>2]|0,i=r+A|0,t[e>>2]=i,r=n+r|0,t[a>>2]=r,A=n+A|0,t[c>>2]=A,n=r-i|0,(i|0)<0?(A=A-i|0,t[a>>2]=n,t[c>>2]=A,t[e>>2]=0,r=0):(n=r,r=i),(n|0)<0&&(r=r-n|0,t[e>>2]=r,A=A-n|0,t[c>>2]=A,t[a>>2]=0,n=0),o=r-A|0,i=n-A|0,(A|0)<0?(t[e>>2]=o,t[a>>2]=i,t[c>>2]=0,r=o,A=0):i=n,n=(i|0)<(r|0)?i:r,n=(A|0)<(n|0)?A:n,!((n|0)<=0)&&(t[e>>2]=r-n,t[a>>2]=i-n,t[c>>2]=A-n)}function Re(e){switch(e=e|0,e|0){case 1:{e=5;break}case 5:{e=4;break}case 4:{e=6;break}case 6:{e=2;break}case 2:{e=3;break}case 3:{e=1;break}}return e|0}function Ee(e){switch(e=e|0,e|0){case 1:{e=3;break}case 3:{e=2;break}case 2:{e=6;break}case 6:{e=4;break}case 4:{e=5;break}case 5:{e=1;break}}return e|0}function zn(e){e=e|0;var A=0,n=0,r=0,i=0,o=0,a=0,c=0;A=t[e>>2]|0,a=e+4|0,n=t[a>>2]|0,c=e+8|0,r=t[c>>2]|0,i=n+(A<<1)|0,t[e>>2]=i,n=r+(n<<1)|0,t[a>>2]=n,A=(r<<1)+A|0,t[c>>2]=A,r=n-i|0,(i|0)<0?(A=A-i|0,t[a>>2]=r,t[c>>2]=A,t[e>>2]=0,n=r,r=0):r=i,(n|0)<0&&(r=r-n|0,t[e>>2]=r,A=A-n|0,t[c>>2]=A,t[a>>2]=0,n=0),o=r-A|0,i=n-A|0,(A|0)<0?(t[e>>2]=o,t[a>>2]=i,t[c>>2]=0,r=o,A=0):i=n,n=(i|0)<(r|0)?i:r,n=(A|0)<(n|0)?A:n,!((n|0)<=0)&&(t[e>>2]=r-n,t[a>>2]=i-n,t[c>>2]=A-n)}function jn(e){e=e|0;var A=0,n=0,r=0,i=0,o=0,a=0,c=0;i=t[e>>2]|0,a=e+4|0,A=t[a>>2]|0,c=e+8|0,n=t[c>>2]|0,r=(A<<1)+i|0,i=n+(i<<1)|0,t[e>>2]=i,t[a>>2]=r,A=(n<<1)+A|0,t[c>>2]=A,n=r-i|0,(i|0)<0?(A=A-i|0,t[a>>2]=n,t[c>>2]=A,t[e>>2]=0,i=0):n=r,(n|0)<0&&(i=i-n|0,t[e>>2]=i,A=A-n|0,t[c>>2]=A,t[a>>2]=0,n=0),o=i-A|0,r=n-A|0,(A|0)<0?(t[e>>2]=o,t[a>>2]=r,t[c>>2]=0,i=o,A=0):r=n,n=(r|0)<(i|0)?r:i,n=(A|0)<(n|0)?A:n,!((n|0)<=0)&&(t[e>>2]=i-n,t[a>>2]=r-n,t[c>>2]=A-n)}function l1(e,A){e=e|0,A=A|0;var n=0,r=0,i=0,o=0,a=0,c=0;return a=(t[e>>2]|0)-(t[A>>2]|0)|0,c=(a|0)<0,r=(t[e+4>>2]|0)-(t[A+4>>2]|0)-(c?a:0)|0,o=(r|0)<0,i=(c?0-a|0:0)+(t[e+8>>2]|0)-(t[A+8>>2]|0)+(o?0-r|0:0)|0,e=(i|0)<0,A=e?0:i,n=(o?0:r)-(e?i:0)|0,i=(c?0:a)-(o?r:0)-(e?i:0)|0,e=(n|0)<(i|0)?n:i,e=(A|0)<(e|0)?A:e,r=(e|0)>0,A=A-(r?e:0)|0,n=n-(r?e:0)|0,e=i-(r?e:0)|0,e=(e|0)>-1?e:0-e|0,n=(n|0)>-1?n:0-n|0,A=(A|0)>-1?A:0-A|0,A=(n|0)>(A|0)?n:A,((e|0)>(A|0)?e:A)|0}function ui(e,A){e=e|0,A=A|0;var n=0;n=t[e+8>>2]|0,t[A>>2]=(t[e>>2]|0)-n,t[A+4>>2]=(t[e+4>>2]|0)-n}function fi(e,A){e=e|0,A=A|0;var n=0,r=0,i=0,o=0,a=0,c=0;return r=t[e>>2]|0,t[A>>2]=r,i=t[e+4>>2]|0,a=A+4|0,t[a>>2]=i,c=A+8|0,t[c>>2]=0,n=(i|0)<(r|0),e=n?r:i,n=n?i:r,(n|0)<0&&((n|0)==-2147483648||((e|0)>0?(2147483647-e|0)<(n|0):(-2147483648-e|0)>(n|0))||((e|0)>-1?(e|-2147483648|0)>=(n|0):(e^-2147483648|0)<(n|0)))?(A=1,A|0):(e=i-r|0,(r|0)<0?(n=0-r|0,t[a>>2]=e,t[c>>2]=n,t[A>>2]=0,r=0):(e=i,n=0),(e|0)<0&&(r=r-e|0,t[A>>2]=r,n=n-e|0,t[c>>2]=n,t[a>>2]=0,e=0),o=r-n|0,i=e-n|0,(n|0)<0?(t[A>>2]=o,t[a>>2]=i,t[c>>2]=0,e=i,i=o,n=0):i=r,r=(e|0)<(i|0)?e:i,r=(n|0)<(r|0)?n:r,(r|0)<=0?(A=0,A|0):(t[A>>2]=i-r,t[a>>2]=e-r,t[c>>2]=n-r,A=0,A|0))}function Sn(e){e=e|0;var A=0,n=0,r=0,i=0;A=e+8|0,i=t[A>>2]|0,n=i-(t[e>>2]|0)|0,t[e>>2]=n,r=e+4|0,e=(t[r>>2]|0)-i|0,t[r>>2]=e,t[A>>2]=0-(e+n)}function di(e){e=e|0;var A=0,n=0,r=0,i=0,o=0,a=0,c=0;n=t[e>>2]|0,A=0-n|0,t[e>>2]=A,a=e+8|0,t[a>>2]=0,c=e+4|0,r=t[c>>2]|0,i=r+n|0,(n|0)>0?(t[c>>2]=i,t[a>>2]=n,t[e>>2]=0,A=0,r=i):n=0,(r|0)<0?(o=A-r|0,t[e>>2]=o,n=n-r|0,t[a>>2]=n,t[c>>2]=0,i=o-n|0,A=0-n|0,(n|0)<0?(t[e>>2]=i,t[c>>2]=A,t[a>>2]=0,r=A,n=0):(r=0,i=o)):i=A,A=(r|0)<(i|0)?r:i,A=(n|0)<(A|0)?n:A,!((A|0)<=0)&&(t[e>>2]=i-A,t[c>>2]=r-A,t[a>>2]=n-A)}function hi(e,A,n,r,i){e=e|0,A=A|0,n=n|0,r=r|0,i=i|0;var o=0,a=0,c=0,d=0,p=0,v=0,E=0;if(E=w,w=w+64|0,v=E,c=E+56|0,!(!0&(A&2013265920|0)==134217728&(!0&(r&2013265920|0)==134217728)))return i=5,w=E,i|0;if((e|0)==(n|0)&(A|0)==(r|0))return t[i>>2]=0,i=0,w=E,i|0;if(a=C0(e|0,A|0,52)|0,j()|0,a=a&15,p=C0(n|0,r|0,52)|0,j()|0,(a|0)!=(p&15|0))return i=12,w=E,i|0;if(o=a+-1|0,a>>>0>1){d1(e,A,o,v)|0,d1(n,r,o,c)|0,p=v,d=t[p>>2]|0,p=t[p+4>>2]|0;A:do if((d|0)==(t[c>>2]|0)&&(p|0)==(t[c+4>>2]|0)){a=(a^15)*3|0,o=C0(e|0,A|0,a|0)|0,j()|0,o=o&7,a=C0(n|0,r|0,a|0)|0,j()|0,a=a&7;do if((o|0)==0|(a|0)==0)t[i>>2]=1,o=0;else if((o|0)==7)o=5;else{if((o|0)==1|(a|0)==1&&LA(d,p)|0){o=5;break}if((t[15536+(o<<2)>>2]|0)!=(a|0)&&(t[15568+(o<<2)>>2]|0)!=(a|0))break A;t[i>>2]=1,o=0}while(!1);return i=o,w=E,i|0}while(!1)}o=v,a=o+56|0;do t[o>>2]=0,o=o+4|0;while((o|0)<(a|0));return se(e,A,1,v)|0,A=v,!((t[A>>2]|0)==(n|0)&&(t[A+4>>2]|0)==(r|0))&&(A=v+8|0,!((t[A>>2]|0)==(n|0)&&(t[A+4>>2]|0)==(r|0)))&&(A=v+16|0,!((t[A>>2]|0)==(n|0)&&(t[A+4>>2]|0)==(r|0)))&&(A=v+24|0,!((t[A>>2]|0)==(n|0)&&(t[A+4>>2]|0)==(r|0)))&&(A=v+32|0,!((t[A>>2]|0)==(n|0)&&(t[A+4>>2]|0)==(r|0)))&&(A=v+40|0,!((t[A>>2]|0)==(n|0)&&(t[A+4>>2]|0)==(r|0)))?(o=v+48|0,o=((t[o>>2]|0)==(n|0)?(t[o+4>>2]|0)==(r|0):0)&1):o=1,t[i>>2]=o,i=0,w=E,i|0}function pi(e,A,n,r,i){return e=e|0,A=A|0,n=n|0,r=r|0,i=i|0,n=e1(e,A,n,r)|0,(n|0)==7?(i=11,i|0):(r=k0(n|0,0,56)|0,A=A&-2130706433|(j()|0)|268435456,t[i>>2]=e|r,t[i+4>>2]=A,i=0,i|0)}function gi(e,A,n){return e=e|0,A=A|0,n=n|0,!0&(A&2013265920|0)==268435456?(t[n>>2]=e,t[n+4>>2]=A&-2130706433|134217728,n=0,n|0):(n=6,n|0)}function mi(e,A,n){e=e|0,A=A|0,n=n|0;var r=0,i=0,o=0;return i=w,w=w+16|0,r=i,t[r>>2]=0,!0&(A&2013265920|0)==268435456?(o=C0(e|0,A|0,56)|0,j()|0,r=IA(e,A&-2130706433|134217728,o&7,r,n)|0,w=i,r|0):(r=6,w=i,r|0)}function Dn(e,A){e=e|0,A=A|0;var n=0;switch(n=C0(e|0,A|0,56)|0,j()|0,n&7){case 0:case 7:return n=0,n|0}return n=A&-2130706433|134217728,!(!0&(A&2013265920|0)==268435456)||!0&(A&117440512|0)==16777216&(LA(e,n)|0)!=0?(n=0,n|0):(n=u1(e,n)|0,n|0)}function yi(e,A,n){e=e|0,A=A|0,n=n|0;var r=0,i=0,o=0,a=0;return i=w,w=w+16|0,r=i,!0&(A&2013265920|0)==268435456?(o=A&-2130706433|134217728,a=n,t[a>>2]=e,t[a+4>>2]=o,t[r>>2]=0,A=C0(e|0,A|0,56)|0,j()|0,r=IA(e,o,A&7,r,n+8|0)|0,w=i,r|0):(r=6,w=i,r|0)}function Ci(e,A,n){e=e|0,A=A|0,n=n|0;var r=0,i=0;return i=(LA(e,A)|0)==0,A=A&-2130706433,r=n,t[r>>2]=i?e:0,t[r+4>>2]=i?A|285212672:0,r=n+8|0,t[r>>2]=e,t[r+4>>2]=A|301989888,r=n+16|0,t[r>>2]=e,t[r+4>>2]=A|318767104,r=n+24|0,t[r>>2]=e,t[r+4>>2]=A|335544320,r=n+32|0,t[r>>2]=e,t[r+4>>2]=A|352321536,n=n+40|0,t[n>>2]=e,t[n+4>>2]=A|369098752,0}function Dt(e,A,n){e=e|0,A=A|0,n=n|0;var r=0,i=0,o=0,a=0;return a=w,w=w+16|0,i=a,o=A&-2130706433|134217728,!0&(A&2013265920|0)==268435456?(r=C0(e|0,A|0,56)|0,j()|0,r=vo(e,o,r&7)|0,(r|0)==-1?(t[n>>2]=0,o=6,w=a,o|0):(Ke(e,o,i)|0&&X0(27795,26932,282,26947),A=C0(e|0,A|0,52)|0,j()|0,A=A&15,LA(e,o)|0?a1(i,A,r,2,n):c1(i,A,r,2,n),o=0,w=a,o|0)):(o=6,w=a,o|0)}function vi(e,A,n){e=e|0,A=A|0,n=n|0;var r=0,i=0;r=w,w=w+16|0,i=r,xi(e,A,n,i),si(i,n+4|0),w=r}function xi(e,A,n,r){e=e|0,A=A|0,n=n|0,r=r|0;var i=0,o=0,a=0,c=0,d=0;if(c=w,w=w+16|0,d=c,bi(e,n,d),o=+Xe(+(1-+k[d>>3]*.5)),o<1e-16){t[r>>2]=0,t[r+4>>2]=0,t[r+8>>2]=0,t[r+12>>2]=0,w=c;return}if(d=t[n>>2]|0,i=+k[15920+(d*24|0)>>3],i=+mt(i-+mt(+Zi(15600+(d<<4)|0,e))),le(A)|0?a=+mt(i+-.3334731722518321):a=i,i=+GA(+o)*2.618033988749896,(A|0)>0){e=0;do i=i*2.6457513110645907,e=e+1|0;while((e|0)!=(A|0))}o=+mA(+a)*i,k[r>>3]=o,a=+aA(+a)*i,k[r+8>>3]=a,w=c}function bi(e,A,n){e=e|0,A=A|0,n=n|0;var r=0,i=0,o=0;if(o=w,w=w+32|0,i=o,Co(e,i),t[A>>2]=0,k[n>>3]=5,r=+BA(16400,i),r<+k[n>>3]&&(t[A>>2]=0,k[n>>3]=r),r=+BA(16424,i),r<+k[n>>3]&&(t[A>>2]=1,k[n>>3]=r),r=+BA(16448,i),r<+k[n>>3]&&(t[A>>2]=2,k[n>>3]=r),r=+BA(16472,i),r<+k[n>>3]&&(t[A>>2]=3,k[n>>3]=r),r=+BA(16496,i),r<+k[n>>3]&&(t[A>>2]=4,k[n>>3]=r),r=+BA(16520,i),r<+k[n>>3]&&(t[A>>2]=5,k[n>>3]=r),r=+BA(16544,i),r<+k[n>>3]&&(t[A>>2]=6,k[n>>3]=r),r=+BA(16568,i),r<+k[n>>3]&&(t[A>>2]=7,k[n>>3]=r),r=+BA(16592,i),r<+k[n>>3]&&(t[A>>2]=8,k[n>>3]=r),r=+BA(16616,i),r<+k[n>>3]&&(t[A>>2]=9,k[n>>3]=r),r=+BA(16640,i),r<+k[n>>3]&&(t[A>>2]=10,k[n>>3]=r),r=+BA(16664,i),r<+k[n>>3]&&(t[A>>2]=11,k[n>>3]=r),r=+BA(16688,i),r<+k[n>>3]&&(t[A>>2]=12,k[n>>3]=r),r=+BA(16712,i),r<+k[n>>3]&&(t[A>>2]=13,k[n>>3]=r),r=+BA(16736,i),r<+k[n>>3]&&(t[A>>2]=14,k[n>>3]=r),r=+BA(16760,i),r<+k[n>>3]&&(t[A>>2]=15,k[n>>3]=r),r=+BA(16784,i),r<+k[n>>3]&&(t[A>>2]=16,k[n>>3]=r),r=+BA(16808,i),r<+k[n>>3]&&(t[A>>2]=17,k[n>>3]=r),r=+BA(16832,i),r<+k[n>>3]&&(t[A>>2]=18,k[n>>3]=r),r=+BA(16856,i),!(r<+k[n>>3])){w=o;return}t[A>>2]=19,k[n>>3]=r,w=o}function pt(e,A,n,r,i){e=e|0,A=A|0,n=n|0,r=r|0,i=i|0;var o=0,a=0,c=0;if(o=+yo(e),o<1e-16){A=15600+(A<<4)|0,t[i>>2]=t[A>>2],t[i+4>>2]=t[A+4>>2],t[i+8>>2]=t[A+8>>2],t[i+12>>2]=t[A+12>>2];return}if(a=+CA(+ +k[e+8>>3],+ +k[e>>3]),(n|0)>0){e=0;do o=o*.37796447300922725,e=e+1|0;while((e|0)!=(n|0))}c=o*.3333333333333333,r?(n=(le(n)|0)==0,o=+ft(+((n?c:c*.37796447300922725)*.381966011250105))):(o=+ft(+(o*.381966011250105)),le(n)|0&&(a=+mt(a+.3334731722518321))),Qi(15600+(A<<4)|0,+mt(+k[15920+(A*24|0)>>3]-a),o,i)}function wi(e,A,n){e=e|0,A=A|0,n=n|0;var r=0,i=0;r=w,w=w+16|0,i=r,Te(e+4|0,i),pt(i,t[e>>2]|0,A,0,n),w=r}function a1(e,A,n,r,i){e=e|0,A=A|0,n=n|0,r=r|0,i=i|0;var o=0,a=0,c=0,d=0,p=0,v=0,E=0,_=0,I=0,P=0,$=0,K=0,u0=0,s0=0,i0=0,W=0,z0=0,O0=0,N0=0,rA=0,iA=0,hA=0,AA=0,U0=0,M0=0,uA=0,xA=0,oA=0;if(uA=w,w=w+272|0,o=uA+256|0,s0=uA+240|0,AA=uA,U0=uA+224|0,M0=uA+208|0,i0=uA+176|0,W=uA+160|0,z0=uA+192|0,O0=uA+144|0,N0=uA+128|0,rA=uA+112|0,iA=uA+96|0,hA=uA+80|0,t[o>>2]=A,t[s0>>2]=t[e>>2],t[s0+4>>2]=t[e+4>>2],t[s0+8>>2]=t[e+8>>2],t[s0+12>>2]=t[e+12>>2],Hn(s0,o,AA),t[i>>2]=0,s0=r+n+((r|0)==5&1)|0,(s0|0)<=(n|0)){w=uA;return}d=t[o>>2]|0,p=U0+4|0,v=i0+4|0,E=n+5|0,_=16880+(d<<2)|0,I=16960+(d<<2)|0,P=N0+8|0,$=rA+8|0,K=iA+8|0,u0=M0+4|0,c=n;A:for(;;){a=AA+(((c|0)%5|0)<<4)|0,t[M0>>2]=t[a>>2],t[M0+4>>2]=t[a+4>>2],t[M0+8>>2]=t[a+8>>2],t[M0+12>>2]=t[a+12>>2];do;while((Je(M0,d,0,1)|0)==2);if((c|0)>(n|0)&(le(A)|0)!=0){if(t[i0>>2]=t[M0>>2],t[i0+4>>2]=t[M0+4>>2],t[i0+8>>2]=t[M0+8>>2],t[i0+12>>2]=t[M0+12>>2],Te(p,W),r=t[i0>>2]|0,o=t[17040+(r*80|0)+(t[U0>>2]<<2)>>2]|0,t[i0>>2]=t[18640+(r*80|0)+(o*20|0)>>2],a=t[18640+(r*80|0)+(o*20|0)+16>>2]|0,(a|0)>0){e=0;do En(v),e=e+1|0;while((e|0)<(a|0))}switch(a=18640+(r*80|0)+(o*20|0)+4|0,t[z0>>2]=t[a>>2],t[z0+4>>2]=t[a+4>>2],t[z0+8>>2]=t[a+8>>2],Ln(z0,(t[_>>2]|0)*3|0),$A(v,z0,v),QA(v),Te(v,O0),xA=+(t[I>>2]|0),k[N0>>3]=xA*3,k[P>>3]=0,oA=xA*-1.5,k[rA>>3]=oA,k[$>>3]=xA*2.598076211353316,k[iA>>3]=oA,k[K>>3]=xA*-2.598076211353316,t[17040+((t[i0>>2]|0)*80|0)+(t[M0>>2]<<2)>>2]|0){case 1:{e=rA,r=N0;break}case 3:{e=iA,r=rA;break}case 2:{e=N0,r=iA;break}default:{e=12;break A}}Gn(W,O0,r,e,hA),pt(hA,t[i0>>2]|0,d,1,i+8+(t[i>>2]<<4)|0),t[i>>2]=(t[i>>2]|0)+1}if((c|0)<(E|0)&&(Te(u0,i0),pt(i0,t[M0>>2]|0,d,1,i+8+(t[i>>2]<<4)|0),t[i>>2]=(t[i>>2]|0)+1),t[U0>>2]=t[M0>>2],t[U0+4>>2]=t[M0+4>>2],t[U0+8>>2]=t[M0+8>>2],t[U0+12>>2]=t[M0+12>>2],c=c+1|0,(c|0)>=(s0|0)){e=3;break}}if((e|0)==3){w=uA;return}else(e|0)==12&&X0(26970,27017,572,27027)}function Hn(e,A,n){e=e|0,A=A|0,n=n|0;var r=0,i=0,o=0,a=0,c=0,d=0;d=w,w=w+128|0,r=d+64|0,i=d,o=r,a=20240,c=o+60|0;do t[o>>2]=t[a>>2],o=o+4|0,a=a+4|0;while((o|0)<(c|0));o=i,a=20304,c=o+60|0;do t[o>>2]=t[a>>2],o=o+4|0,a=a+4|0;while((o|0)<(c|0));c=(le(t[A>>2]|0)|0)==0,r=c?r:i,i=e+4|0,zn(i),jn(i),le(t[A>>2]|0)|0&&(Fe(i),t[A>>2]=(t[A>>2]|0)+1),t[n>>2]=t[e>>2],A=n+4|0,$A(i,r,A),QA(A),t[n+16>>2]=t[e>>2],A=n+20|0,$A(i,r+12|0,A),QA(A),t[n+32>>2]=t[e>>2],A=n+36|0,$A(i,r+24|0,A),QA(A),t[n+48>>2]=t[e>>2],A=n+52|0,$A(i,r+36|0,A),QA(A),t[n+64>>2]=t[e>>2],n=n+68|0,$A(i,r+48|0,n),QA(n),w=d}function Je(e,A,n,r){e=e|0,A=A|0,n=n|0,r=r|0;var i=0,o=0,a=0,c=0,d=0,p=0,v=0,E=0,_=0,I=0,P=0;if(P=w,w=w+32|0,_=P+12|0,c=P,I=e+4|0,E=t[16960+(A<<2)>>2]|0,v=(r|0)!=0,E=v?E*3|0:E,i=t[I>>2]|0,p=e+8|0,a=t[p>>2]|0,v){if(o=e+12|0,r=t[o>>2]|0,i=a+i+r|0,(i|0)==(E|0))return I=1,w=P,I|0;d=o}else d=e+12|0,r=t[d>>2]|0,i=a+i+r|0;if((i|0)<=(E|0))return I=0,w=P,I|0;do if((r|0)>0){if(r=t[e>>2]|0,(a|0)>0){o=18640+(r*80|0)+60|0,r=e;break}r=18640+(r*80|0)+40|0,n?(oi(_,E,0,0),s1(I,_,c),St(c),$A(c,_,I),o=r,r=e):(o=r,r=e)}else o=18640+((t[e>>2]|0)*80|0)+20|0,r=e;while(!1);if(t[r>>2]=t[o>>2],i=o+16|0,(t[i>>2]|0)>0){r=0;do En(I),r=r+1|0;while((r|0)<(t[i>>2]|0))}return e=o+4|0,t[_>>2]=t[e>>2],t[_+4>>2]=t[e+4>>2],t[_+8>>2]=t[e+8>>2],A=t[16880+(A<<2)>>2]|0,Ln(_,v?A*3|0:A),$A(I,_,I),QA(I),v?r=((t[p>>2]|0)+(t[I>>2]|0)+(t[d>>2]|0)|0)==(E|0)?1:2:r=2,I=r,w=P,I|0}function Li(e,A){e=e|0,A=A|0;var n=0;do n=Je(e,A,0,1)|0;while((n|0)==2);return n|0}function c1(e,A,n,r,i){e=e|0,A=A|0,n=n|0,r=r|0,i=i|0;var o=0,a=0,c=0,d=0,p=0,v=0,E=0,_=0,I=0,P=0,$=0,K=0,u0=0,s0=0,i0=0,W=0,z0=0,O0=0,N0=0,rA=0,iA=0,hA=0,AA=0;if(iA=w,w=w+240|0,o=iA+224|0,z0=iA+208|0,O0=iA,N0=iA+192|0,rA=iA+176|0,K=iA+160|0,u0=iA+144|0,s0=iA+128|0,i0=iA+112|0,W=iA+96|0,t[o>>2]=A,t[z0>>2]=t[e>>2],t[z0+4>>2]=t[e+4>>2],t[z0+8>>2]=t[e+8>>2],t[z0+12>>2]=t[e+12>>2],Bn(z0,o,O0),t[i>>2]=0,$=r+n+((r|0)==6&1)|0,($|0)<=(n|0)){w=iA;return}d=t[o>>2]|0,p=n+6|0,v=16960+(d<<2)|0,E=u0+8|0,_=s0+8|0,I=i0+8|0,P=N0+4|0,a=0,c=n,r=-1;A:for(;;){if(o=(c|0)%6|0,e=O0+(o<<4)|0,t[N0>>2]=t[e>>2],t[N0+4>>2]=t[e+4>>2],t[N0+8>>2]=t[e+8>>2],t[N0+12>>2]=t[e+12>>2],e=a,a=Je(N0,d,0,1)|0,(c|0)>(n|0)&(le(A)|0)!=0&&(e|0)!=1&&(t[N0>>2]|0)!=(r|0)){switch(Te(O0+(((o+5|0)%6|0)<<4)+4|0,rA),Te(O0+(o<<4)+4|0,K),hA=+(t[v>>2]|0),k[u0>>3]=hA*3,k[E>>3]=0,AA=hA*-1.5,k[s0>>3]=AA,k[_>>3]=hA*2.598076211353316,k[i0>>3]=AA,k[I>>3]=hA*-2.598076211353316,o=t[z0>>2]|0,t[17040+(o*80|0)+(((r|0)==(o|0)?t[N0>>2]|0:r)<<2)>>2]|0){case 1:{e=s0,r=u0;break}case 3:{e=i0,r=s0;break}case 2:{e=u0,r=i0;break}default:{e=8;break A}}Gn(rA,K,r,e,W),!(Yn(rA,W)|0)&&!(Yn(K,W)|0)&&(pt(W,t[z0>>2]|0,d,1,i+8+(t[i>>2]<<4)|0),t[i>>2]=(t[i>>2]|0)+1)}if((c|0)<(p|0)&&(Te(P,rA),pt(rA,t[N0>>2]|0,d,1,i+8+(t[i>>2]<<4)|0),t[i>>2]=(t[i>>2]|0)+1),c=c+1|0,(c|0)>=($|0)){e=3;break}else r=t[N0>>2]|0}if((e|0)==3){w=iA;return}else(e|0)==8&&X0(27054,27017,737,27099)}function Bn(e,A,n){e=e|0,A=A|0,n=n|0;var r=0,i=0,o=0,a=0,c=0,d=0;d=w,w=w+160|0,r=d+80|0,i=d,o=r,a=20368,c=o+72|0;do t[o>>2]=t[a>>2],o=o+4|0,a=a+4|0;while((o|0)<(c|0));o=i,a=20448,c=o+72|0;do t[o>>2]=t[a>>2],o=o+4|0,a=a+4|0;while((o|0)<(c|0));c=(le(t[A>>2]|0)|0)==0,r=c?r:i,i=e+4|0,zn(i),jn(i),le(t[A>>2]|0)|0&&(Fe(i),t[A>>2]=(t[A>>2]|0)+1),t[n>>2]=t[e>>2],A=n+4|0,$A(i,r,A),QA(A),t[n+16>>2]=t[e>>2],A=n+20|0,$A(i,r+12|0,A),QA(A),t[n+32>>2]=t[e>>2],A=n+36|0,$A(i,r+24|0,A),QA(A),t[n+48>>2]=t[e>>2],A=n+52|0,$A(i,r+36|0,A),QA(A),t[n+64>>2]=t[e>>2],A=n+68|0,$A(i,r+48|0,A),QA(A),t[n+80>>2]=t[e>>2],n=n+84|0,$A(i,r+60|0,n),QA(n),w=d}function ki(e,A){return e=e|0,A=A|0,A=C0(e|0,A|0,52)|0,j()|0,A&15|0}function Vn(e,A){return e=e|0,A=A|0,A=C0(e|0,A|0,45)|0,j()|0,A&127|0}function Mi(e,A,n,r){return e=e|0,A=A|0,n=n|0,r=r|0,(n+-1|0)>>>0>14?(r=4,r|0):(n=C0(e|0,A|0,(15-n|0)*3|0)|0,j()|0,t[r>>2]=n&7,r=0,r|0)}function Ei(e,A,n,r){e=e|0,A=A|0,n=n|0,r=r|0;var i=0,o=0,a=0,c=0,d=0,p=0;if(e>>>0>15)return r=4,r|0;if(A>>>0>121)return r=17,r|0;a=k0(e|0,0,52)|0,i=j()|0,c=k0(A|0,0,45)|0,i=i|(j()|0)|134225919;A:do if((e|0)>=1){for(c=1,a=(m0[20528+A>>0]|0)!=0,o=-1;;){if(A=t[n+(c+-1<<2)>>2]|0,A>>>0>6){i=18,A=10;break}if(!((A|0)==0|a^1))if((A|0)==1){i=19,A=10;break}else a=0;if(p=(15-c|0)*3|0,d=k0(7,0,p|0)|0,i=i&~(j()|0),A=k0(A|0,((A|0)<0)<<31>>31|0,p|0)|0,o=A|o&~d,i=j()|0|i,(c|0)<(e|0))c=c+1|0;else break A}if((A|0)==10)return i|0}else o=-1;while(!1);return p=r,t[p>>2]=o,t[p+4>>2]=i,p=0,p|0}function u1(e,A){e=e|0,A=A|0;var n=0,r=0,i=0,o=0,a=0;return!(!0&(A&-16777216|0)==134217728)||(r=C0(e|0,A|0,52)|0,j()|0,r=r&15,n=C0(e|0,A|0,45)|0,j()|0,n=n&127,n>>>0>121)?(e=0,e|0):(a=(r^15)*3|0,i=C0(e|0,A|0,a|0)|0,a=k0(i|0,j()|0,a|0)|0,i=j()|0,o=PA(-1227133514,-1171,a|0,i|0)|0,!((a&613566756&o|0)==0&(i&4681&(j()|0)|0)==0)||(a=(r*3|0)+19|0,o=k0(~e|0,~A|0,a|0)|0,a=C0(o|0,j()|0,a|0)|0,!((r|0)==15|(a|0)==0&(j()|0)==0))?(a=0,a|0):!(m0[20528+n>>0]|0)||(A=A&8191,(e|0)==0&(A|0)==0)?(a=1,a|0):(a=M1(e|0,A|0)|0,j()|0,((63-a|0)%3|0|0)!=0|0))}function zi(e,A){e=e|0,A=A|0;var n=0,r=0,i=0,o=0,a=0;return!0&(A&-16777216|0)==134217728&&(r=C0(e|0,A|0,52)|0,j()|0,r=r&15,n=C0(e|0,A|0,45)|0,j()|0,n=n&127,n>>>0<=121)&&(a=(r^15)*3|0,i=C0(e|0,A|0,a|0)|0,a=k0(i|0,j()|0,a|0)|0,i=j()|0,o=PA(-1227133514,-1171,a|0,i|0)|0,(a&613566756&o|0)==0&(i&4681&(j()|0)|0)==0)&&(a=(r*3|0)+19|0,o=k0(~e|0,~A|0,a|0)|0,a=C0(o|0,j()|0,a|0)|0,(r|0)==15|(a|0)==0&(j()|0)==0)&&(!(m0[20528+n>>0]|0)||(n=A&8191,(e|0)==0&(n|0)==0)||(a=M1(e|0,n|0)|0,j()|0,(63-a|0)%3|0|0))||Dn(e,A)|0?(a=1,a|0):(a=(qn(e,A)|0)!=0&1,a|0)}function f1(e,A,n,r){e=e|0,A=A|0,n=n|0,r=r|0;var i=0,o=0,a=0,c=0;if(i=k0(A|0,0,52)|0,o=j()|0,n=k0(n|0,0,45)|0,n=o|(j()|0)|134225919,(A|0)<1){o=-1,r=n,A=e,t[A>>2]=o,e=e+4|0,t[e>>2]=r;return}for(o=1,i=-1;a=(15-o|0)*3|0,c=k0(7,0,a|0)|0,n=n&~(j()|0),a=k0(r|0,0,a|0)|0,i=i&~c|a,n=n|(j()|0),(o|0)!=(A|0);)o=o+1|0;c=e,a=c,t[a>>2]=i,c=c+4|0,t[c>>2]=n}function d1(e,A,n,r){e=e|0,A=A|0,n=n|0,r=r|0;var i=0,o=0;if(o=C0(e|0,A|0,52)|0,j()|0,o=o&15,n>>>0>15)return r=4,r|0;if((o|0)<(n|0))return r=12,r|0;if((o|0)==(n|0))return t[r>>2]=e,t[r+4>>2]=A,r=0,r|0;if(i=k0(n|0,0,52)|0,i=i|e,e=j()|0|A&-15728641,(o|0)>(n|0))do A=k0(7,0,(14-n|0)*3|0)|0,n=n+1|0,i=A|i,e=j()|0|e;while((n|0)<(o|0));return t[r>>2]=i,t[r+4>>2]=e,r=0,r|0}function gt(e,A,n,r){e=e|0,A=A|0,n=n|0,r=r|0;var i=0,o=0,a=0;if(o=C0(e|0,A|0,52)|0,j()|0,o=o&15,!((n|0)<16&(o|0)<=(n|0)))return r=4,r|0;i=n-o|0,n=C0(e|0,A|0,45)|0,j()|0;A:do if(!(EA(n&127)|0))n=ze(7,0,i,((i|0)<0)<<31>>31)|0,i=j()|0;else{e:do if(o|0){for(n=1;a=k0(7,0,(15-n|0)*3|0)|0,!!((a&e|0)==0&((j()|0)&A|0)==0);)if(n>>>0<o>>>0)n=n+1|0;else break e;n=ze(7,0,i,((i|0)<0)<<31>>31)|0,i=j()|0;break A}while(!1);n=ze(7,0,i,((i|0)<0)<<31>>31)|0,n=TA(n|0,j()|0,5,0)|0,n=$0(n|0,j()|0,-5,-1)|0,n=Se(n|0,j()|0,6,0)|0,n=$0(n|0,j()|0,1,0)|0,i=j()|0}while(!1);return a=r,t[a>>2]=n,t[a+4>>2]=i,a=0,a|0}function LA(e,A){e=e|0,A=A|0;var n=0,r=0,i=0;if(i=C0(e|0,A|0,45)|0,j()|0,!(EA(i&127)|0))return i=0,i|0;i=C0(e|0,A|0,52)|0,j()|0,i=i&15;A:do if(!i)n=0;else for(r=1;;){if(n=C0(e|0,A|0,(15-r|0)*3|0)|0,j()|0,n=n&7,n|0)break A;if(r>>>0<i>>>0)r=r+1|0;else{n=0;break}}while(!1);return i=(n|0)==0&1,i|0}function ji(e,A,n,r){e=e|0,A=A|0,n=n|0,r=r|0;var i=0,o=0,a=0,c=0;if(a=w,w=w+16|0,o=a,C1(o,e,A,n),A=o,e=t[A>>2]|0,A=t[A+4>>2]|0,(e|0)==0&(A|0)==0)return w=a,0;i=0,n=0;do c=r+(i<<3)|0,t[c>>2]=e,t[c+4>>2]=A,i=$0(i|0,n|0,1,0)|0,n=j()|0,v1(o),c=o,e=t[c>>2]|0,A=t[c+4>>2]|0;while(!((e|0)==0&(A|0)==0));return w=a,0}function _n(e,A,n,r){return e=e|0,A=A|0,n=n|0,r=r|0,(r|0)<(n|0)?(n=A,r=e,nA(n|0),r|0):(n=k0(-1,-1,((r-n|0)*3|0)+3|0)|0,r=k0(~n|0,~(j()|0)|0,(15-r|0)*3|0)|0,n=~(j()|0)&A,r=~r&e,nA(n|0),r|0)}function In(e,A,n,r){e=e|0,A=A|0,n=n|0,r=r|0;var i=0;return i=C0(e|0,A|0,52)|0,j()|0,i=i&15,(n|0)<16&(i|0)<=(n|0)?((i|0)<(n|0)&&(i=k0(-1,-1,((n+-1-i|0)*3|0)+3|0)|0,i=k0(~i|0,~(j()|0)|0,(15-n|0)*3|0)|0,A=~(j()|0)&A,e=~i&e),i=k0(n|0,0,52)|0,n=A&-15728641|(j()|0),t[r>>2]=e|i,t[r+4>>2]=n,r=0,r|0):(r=4,r|0)}function Si(e,A,n,r){e=e|0,A=A|0,n=n|0,r=r|0;var i=0,o=0,a=0,c=0,d=0,p=0,v=0,E=0,_=0,I=0,P=0,$=0,K=0,u0=0,s0=0,i0=0,W=0,z0=0,O0=0,N0=0,rA=0,iA=0,hA=0,AA=0,U0=0,M0=0;if((n|0)==0&(r|0)==0)return M0=0,M0|0;if(i=e,o=t[i>>2]|0,i=t[i+4>>2]|0,!0&(i&15728640|0)==0){if(!((r|0)>0|(r|0)==0&n>>>0>0)||(M0=A,t[M0>>2]=o,t[M0+4>>2]=i,(n|0)==1&(r|0)==0))return M0=0,M0|0;i=1,o=0;do AA=e+(i<<3)|0,U0=t[AA+4>>2]|0,M0=A+(i<<3)|0,t[M0>>2]=t[AA>>2],t[M0+4>>2]=U0,i=$0(i|0,o|0,1,0)|0,o=j()|0;while((o|0)<(r|0)|(o|0)==(r|0)&i>>>0<n>>>0);return i=0,i|0}if(hA=n<<3,U0=me(hA)|0,!U0)return M0=13,M0|0;if(rt(U0|0,e|0,hA|0)|0,AA=qA(n,8)|0,!AA)return W0(U0),M0=13,M0|0;A:for(;;){i=U0,p=t[i>>2]|0,i=t[i+4>>2]|0,rA=C0(p|0,i|0,52)|0,j()|0,rA=rA&15,iA=rA+-1|0,N0=(rA|0)!=0,O0=(r|0)>0|(r|0)==0&n>>>0>0;e:do if(N0&O0){if(s0=k0(iA|0,0,52)|0,i0=j()|0,iA>>>0>15){if(!((p|0)==0&(i|0)==0)){M0=16;break A}for(o=0,e=0;;){if(o=$0(o|0,e|0,1,0)|0,e=j()|0,!((e|0)<(r|0)|(e|0)==(r|0)&o>>>0<n>>>0))break e;if(a=U0+(o<<3)|0,z0=t[a>>2]|0,a=t[a+4>>2]|0,!((z0|0)==0&(a|0)==0)){i=a,M0=16;break A}}}for(c=p,e=i,o=0,a=0;;){if(!((c|0)==0&(e|0)==0)){if(!(!0&(e&117440512|0)==0)){M0=21;break A}if(v=C0(c|0,e|0,52)|0,j()|0,v=v&15,(v|0)<(iA|0)){i=12,M0=27;break A}if((v|0)!=(iA|0)&&(c=c|s0,e=e&-15728641|i0,v>>>0>=rA>>>0)){d=iA;do z0=k0(7,0,(14-d|0)*3|0)|0,d=d+1|0,c=z0|c,e=j()|0|e;while(d>>>0<v>>>0)}if(_=nt(c|0,e|0,n|0,r|0)|0,I=j()|0,d=AA+(_<<3)|0,v=d,E=t[v>>2]|0,v=t[v+4>>2]|0,!((E|0)==0&(v|0)==0)){K=0,u0=0;do{if((K|0)>(r|0)|(K|0)==(r|0)&u0>>>0>n>>>0){M0=31;break A}if((E|0)==(c|0)&(v&-117440513|0)==(e|0)){P=C0(E|0,v|0,56)|0,j()|0,P=P&7,$=P+1|0,z0=C0(E|0,v|0,45)|0,j()|0;t:do if(!(EA(z0&127)|0))v=7;else{if(E=C0(E|0,v|0,52)|0,j()|0,E=E&15,!E){v=6;break}for(v=1;;){if(z0=k0(7,0,(15-v|0)*3|0)|0,!((z0&c|0)==0&((j()|0)&e|0)==0)){v=7;break t}if(v>>>0<E>>>0)v=v+1|0;else{v=6;break}}}while(!1);if((P+2|0)>>>0>v>>>0){M0=41;break A}z0=k0($|0,0,56)|0,e=j()|0|e&-117440513,W=d,t[W>>2]=0,t[W+4>>2]=0,c=z0|c}else _=$0(_|0,I|0,1,0)|0,_=tt(_|0,j()|0,n|0,r|0)|0,I=j()|0;u0=$0(u0|0,K|0,1,0)|0,K=j()|0,d=AA+(_<<3)|0,v=d,E=t[v>>2]|0,v=t[v+4>>2]|0}while(!((E|0)==0&(v|0)==0))}z0=d,t[z0>>2]=c,t[z0+4>>2]=e}if(o=$0(o|0,a|0,1,0)|0,a=j()|0,!((a|0)<(r|0)|(a|0)==(r|0)&o>>>0<n>>>0))break e;e=U0+(o<<3)|0,c=t[e>>2]|0,e=t[e+4>>2]|0}}while(!1);if(z0=$0(n|0,r|0,5,0)|0,W=j()|0,W>>>0<0|(W|0)==0&z0>>>0<11){M0=85;break}if(z0=Se(n|0,r|0,6,0)|0,j()|0,z0=qA(z0,8)|0,!z0){M0=48;break}do if(O0){for($=0,e=0,P=0,K=0;;){if(v=AA+($<<3)|0,a=v,o=t[a>>2]|0,a=t[a+4>>2]|0,(o|0)==0&(a|0)==0)W=P;else{E=C0(o|0,a|0,56)|0,j()|0,E=E&7,c=E+1|0,_=a&-117440513,W=C0(o|0,a|0,45)|0,j()|0;e:do if(EA(W&127)|0){if(I=C0(o|0,a|0,52)|0,j()|0,I=I&15,I|0)for(d=1;;){if(W=k0(7,0,(15-d|0)*3|0)|0,!((o&W|0)==0&(_&(j()|0)|0)==0))break e;if(d>>>0<I>>>0)d=d+1|0;else break}a=k0(c|0,0,56)|0,o=a|o,a=j()|0|_,c=v,t[c>>2]=o,t[c+4>>2]=a,c=E+2|0}while(!1);(c|0)==7?(W=z0+(e<<3)|0,t[W>>2]=o,t[W+4>>2]=a&-117440513,e=$0(e|0,P|0,1,0)|0,W=j()|0):W=P}if($=$0($|0,K|0,1,0)|0,K=j()|0,(K|0)<(r|0)|(K|0)==(r|0)&$>>>0<n>>>0)P=W;else break}if(O0){if(u0=iA>>>0>15,s0=k0(iA|0,0,52)|0,i0=j()|0,!N0){for(o=0,d=0,c=0,a=0;(p|0)==0&(i|0)==0||(iA=A+(o<<3)|0,t[iA>>2]=p,t[iA+4>>2]=i,o=$0(o|0,d|0,1,0)|0,d=j()|0),c=$0(c|0,a|0,1,0)|0,a=j()|0,!!((a|0)<(r|0)|(a|0)==(r|0)&c>>>0<n>>>0);)i=U0+(c<<3)|0,p=t[i>>2]|0,i=t[i+4>>2]|0;i=W;break}for(o=0,d=0,a=0,c=0;;){do if(!((p|0)==0&(i|0)==0)){if(I=C0(p|0,i|0,52)|0,j()|0,I=I&15,u0|(I|0)<(iA|0)){M0=80;break A}if((I|0)!=(iA|0)){if(v=p|s0,E=i&-15728641|i0,I>>>0>=rA>>>0){_=iA;do N0=k0(7,0,(14-_|0)*3|0)|0,_=_+1|0,v=N0|v,E=j()|0|E;while(_>>>0<I>>>0)}}else v=p,E=i;P=nt(v|0,E|0,n|0,r|0)|0,_=0,I=0,K=j()|0;do{if((_|0)>(r|0)|(_|0)==(r|0)&I>>>0>n>>>0){M0=81;break A}if(N0=AA+(P<<3)|0,$=t[N0+4>>2]|0,($&-117440513|0)==(E|0)&&(t[N0>>2]|0)==(v|0)){M0=65;break}N0=$0(P|0,K|0,1,0)|0,P=tt(N0|0,j()|0,n|0,r|0)|0,K=j()|0,I=$0(I|0,_|0,1,0)|0,_=j()|0,N0=AA+(P<<3)|0}while(!((t[N0>>2]|0)==(v|0)&&(t[N0+4>>2]|0)==(E|0)));if((M0|0)==65&&(M0=0,!0&($&117440512|0)==100663296))break;N0=A+(o<<3)|0,t[N0>>2]=p,t[N0+4>>2]=i,o=$0(o|0,d|0,1,0)|0,d=j()|0}while(!1);if(a=$0(a|0,c|0,1,0)|0,c=j()|0,!((c|0)<(r|0)|(c|0)==(r|0)&a>>>0<n>>>0))break;i=U0+(a<<3)|0,p=t[i>>2]|0,i=t[i+4>>2]|0}i=W}else o=0,i=W}else o=0,e=0,i=0;while(!1);if(De(AA|0,0,hA|0)|0,rt(U0|0,z0|0,e<<3|0)|0,W0(z0),(e|0)==0&(i|0)==0){M0=89;break}else A=A+(o<<3)|0,r=i,n=e}if((M0|0)==16)!0&(i&117440512|0)==0?(i=4,M0=27):M0=21;else if((M0|0)==31)X0(27795,27122,620,27132);else{if((M0|0)==41)return W0(U0),W0(AA),M0=10,M0|0;if((M0|0)==48)return W0(U0),W0(AA),M0=13,M0|0;(M0|0)==80?X0(27795,27122,711,27132):(M0|0)==81?X0(27795,27122,723,27132):(M0|0)==85&&(rt(A|0,U0|0,n<<3|0)|0,M0=89)}return(M0|0)==21?(W0(U0),W0(AA),M0=5,M0|0):(M0|0)==27?(W0(U0),W0(AA),M0=i,M0|0):(M0|0)==89?(W0(U0),W0(AA),M0=0,M0|0):0}function Di(e,A,n,r,i,o,a){e=e|0,A=A|0,n=n|0,r=r|0,i=i|0,o=o|0,a=a|0;var c=0,d=0,p=0,v=0,E=0,_=0,I=0,P=0,$=0;if($=w,w=w+16|0,P=$,!((n|0)>0|(n|0)==0&A>>>0>0))return P=0,w=$,P|0;if((a|0)>=16)return P=12,w=$,P|0;_=0,I=0,E=0,c=0;A:for(;;){if(p=e+(_<<3)|0,d=t[p>>2]|0,p=t[p+4>>2]|0,v=C0(d|0,p|0,52)|0,j()|0,(v&15|0)>(a|0)){c=12,d=11;break}if(C1(P,d,p,a),v=P,p=t[v>>2]|0,v=t[v+4>>2]|0,(p|0)==0&(v|0)==0)d=E;else{d=E;do{if(!((c|0)<(o|0)|(c|0)==(o|0)&d>>>0<i>>>0)){d=10;break A}E=r+(d<<3)|0,t[E>>2]=p,t[E+4>>2]=v,d=$0(d|0,c|0,1,0)|0,c=j()|0,v1(P),E=P,p=t[E>>2]|0,v=t[E+4>>2]|0}while(!((p|0)==0&(v|0)==0))}if(_=$0(_|0,I|0,1,0)|0,I=j()|0,(I|0)<(n|0)|(I|0)==(n|0)&_>>>0<A>>>0)E=d;else{c=0,d=11;break}}return(d|0)==10?(P=14,w=$,P|0):(d|0)==11?(w=$,c|0):0}function Hi(e,A,n,r,i){e=e|0,A=A|0,n=n|0,r=r|0,i=i|0;var o=0,a=0,c=0,d=0,p=0,v=0,E=0,_=0;_=w,w=w+16|0,E=_;A:do if((n|0)>0|(n|0)==0&A>>>0>0){for(p=0,a=0,o=0,v=0;;){if(d=e+(p<<3)|0,c=t[d>>2]|0,d=t[d+4>>2]|0,!((c|0)==0&(d|0)==0)&&(d=(gt(c,d,r,E)|0)==0,c=E,a=$0(t[c>>2]|0,t[c+4>>2]|0,a|0,o|0)|0,o=j()|0,!d)){o=12;break}if(p=$0(p|0,v|0,1,0)|0,v=j()|0,!((v|0)<(n|0)|(v|0)==(n|0)&p>>>0<A>>>0))break A}return w=_,o|0}else a=0,o=0;while(!1);return t[i>>2]=a,t[i+4>>2]=o,i=0,w=_,i|0}function Bi(e,A){return e=e|0,A=A|0,A=C0(e|0,A|0,52)|0,j()|0,A&1|0}function YA(e,A){e=e|0,A=A|0;var n=0,r=0,i=0;if(i=C0(e|0,A|0,52)|0,j()|0,i=i&15,!i)return i=0,i|0;for(r=1;;){if(n=C0(e|0,A|0,(15-r|0)*3|0)|0,j()|0,n=n&7,n|0){r=5;break}if(r>>>0<i>>>0)r=r+1|0;else{n=0,r=5;break}}return(r|0)==5?n|0:0}function h1(e,A){e=e|0,A=A|0;var n=0,r=0,i=0,o=0,a=0,c=0,d=0;if(d=C0(e|0,A|0,52)|0,j()|0,d=d&15,!d)return c=A,d=e,nA(c|0),d|0;for(c=1,n=0;;){o=(15-c|0)*3|0,r=k0(7,0,o|0)|0,i=j()|0,a=C0(e|0,A|0,o|0)|0,j()|0,o=k0(Re(a&7)|0,0,o|0)|0,a=j()|0,e=o|e&~r,A=a|A&~i;A:do if(!n)if((o&r|0)==0&(a&i|0)==0)n=0;else if(r=C0(e|0,A|0,52)|0,j()|0,r=r&15,!r)n=1;else{n=1;e:for(;;){switch(a=C0(e|0,A|0,(15-n|0)*3|0)|0,j()|0,a&7){case 1:break e;case 0:break;default:{n=1;break A}}if(n>>>0<r>>>0)n=n+1|0;else{n=1;break A}}for(n=1;;)if(a=(15-n|0)*3|0,i=C0(e|0,A|0,a|0)|0,j()|0,o=k0(7,0,a|0)|0,A=A&~(j()|0),a=k0(Re(i&7)|0,0,a|0)|0,e=e&~o|a,A=A|(j()|0),n>>>0<r>>>0)n=n+1|0;else{n=1;break}}while(!1);if(c>>>0<d>>>0)c=c+1|0;else break}return nA(A|0),e|0}function Ne(e,A){e=e|0,A=A|0;var n=0,r=0,i=0,o=0,a=0;if(r=C0(e|0,A|0,52)|0,j()|0,r=r&15,!r)return n=A,r=e,nA(n|0),r|0;for(n=1;o=(15-n|0)*3|0,a=C0(e|0,A|0,o|0)|0,j()|0,i=k0(7,0,o|0)|0,A=A&~(j()|0),o=k0(Re(a&7)|0,0,o|0)|0,e=o|e&~i,A=j()|0|A,n>>>0<r>>>0;)n=n+1|0;return nA(A|0),e|0}function Vi(e,A){e=e|0,A=A|0;var n=0,r=0,i=0,o=0,a=0,c=0,d=0;if(d=C0(e|0,A|0,52)|0,j()|0,d=d&15,!d)return c=A,d=e,nA(c|0),d|0;for(c=1,n=0;;){o=(15-c|0)*3|0,r=k0(7,0,o|0)|0,i=j()|0,a=C0(e|0,A|0,o|0)|0,j()|0,o=k0(Ee(a&7)|0,0,o|0)|0,a=j()|0,e=o|e&~r,A=a|A&~i;A:do if(!n)if((o&r|0)==0&(a&i|0)==0)n=0;else if(r=C0(e|0,A|0,52)|0,j()|0,r=r&15,!r)n=1;else{n=1;e:for(;;){switch(a=C0(e|0,A|0,(15-n|0)*3|0)|0,j()|0,a&7){case 1:break e;case 0:break;default:{n=1;break A}}if(n>>>0<r>>>0)n=n+1|0;else{n=1;break A}}for(n=1;;)if(i=(15-n|0)*3|0,o=k0(7,0,i|0)|0,a=A&~(j()|0),A=C0(e|0,A|0,i|0)|0,j()|0,A=k0(Ee(A&7)|0,0,i|0)|0,e=e&~o|A,A=a|(j()|0),n>>>0<r>>>0)n=n+1|0;else{n=1;break}}while(!1);if(c>>>0<d>>>0)c=c+1|0;else break}return nA(A|0),e|0}function p1(e,A){e=e|0,A=A|0;var n=0,r=0,i=0,o=0,a=0;if(r=C0(e|0,A|0,52)|0,j()|0,r=r&15,!r)return n=A,r=e,nA(n|0),r|0;for(n=1;a=(15-n|0)*3|0,o=k0(7,0,a|0)|0,i=A&~(j()|0),A=C0(e|0,A|0,a|0)|0,j()|0,A=k0(Ee(A&7)|0,0,a|0)|0,e=A|e&~o,A=j()|0|i,n>>>0<r>>>0;)n=n+1|0;return nA(A|0),e|0}function _i(e,A){e=e|0,A=A|0;var n=0,r=0,i=0,o=0,a=0,c=0,d=0,p=0,v=0;if(d=w,w=w+64|0,c=d+40|0,r=d+24|0,i=d+12|0,o=d,k0(A|0,0,52)|0,n=j()|0|134225919,!A)return(t[e+4>>2]|0)>2||(t[e+8>>2]|0)>2||(t[e+12>>2]|0)>2?(a=0,c=0,nA(a|0),w=d,c|0):(k0(yn(e)|0,0,45)|0,a=j()|0|n,c=-1,nA(a|0),w=d,c|0);if(t[c>>2]=t[e>>2],t[c+4>>2]=t[e+4>>2],t[c+8>>2]=t[e+8>>2],t[c+12>>2]=t[e+12>>2],a=c+4|0,(A|0)>0)for(e=-1;t[r>>2]=t[a>>2],t[r+4>>2]=t[a+4>>2],t[r+8>>2]=t[a+8>>2],A&1?(ci(a),t[i>>2]=t[a>>2],t[i+4>>2]=t[a+4>>2],t[i+8>>2]=t[a+8>>2],jt(i)):(kn(a),t[i>>2]=t[a>>2],t[i+4>>2]=t[a+4>>2],t[i+8>>2]=t[a+8>>2],Fe(i)),s1(r,i,o),QA(o),v=(15-A|0)*3|0,p=k0(7,0,v|0)|0,n=n&~(j()|0),v=k0(zt(o)|0,0,v|0)|0,e=v|e&~p,n=j()|0|n,(A|0)>1;)A=A+-1|0;else e=-1;A:do if((t[a>>2]|0)<=2&&(t[c+8>>2]|0)<=2&&(t[c+12>>2]|0)<=2){if(r=yn(c)|0,A=k0(r|0,0,45)|0,A=A|e,e=j()|0|n&-1040385,o=q2(c)|0,!(EA(r)|0)){if((o|0)<=0)break;for(i=0;;){if(r=C0(A|0,e|0,52)|0,j()|0,r=r&15,r)for(n=1;v=(15-n|0)*3|0,c=C0(A|0,e|0,v|0)|0,j()|0,p=k0(7,0,v|0)|0,e=e&~(j()|0),v=k0(Re(c&7)|0,0,v|0)|0,A=A&~p|v,e=e|(j()|0),n>>>0<r>>>0;)n=n+1|0;if(i=i+1|0,(i|0)==(o|0))break A}}i=C0(A|0,e|0,52)|0,j()|0,i=i&15;e:do if(i){n=1;t:for(;;){switch(v=C0(A|0,e|0,(15-n|0)*3|0)|0,j()|0,v&7){case 1:break t;case 0:break;default:break e}if(n>>>0<i>>>0)n=n+1|0;else break e}if(Cn(r,t[c>>2]|0)|0)for(n=1;c=(15-n|0)*3|0,p=k0(7,0,c|0)|0,v=e&~(j()|0),e=C0(A|0,e|0,c|0)|0,j()|0,e=k0(Ee(e&7)|0,0,c|0)|0,A=A&~p|e,e=v|(j()|0),n>>>0<i>>>0;)n=n+1|0;else for(n=1;v=(15-n|0)*3|0,c=C0(A|0,e|0,v|0)|0,j()|0,p=k0(7,0,v|0)|0,e=e&~(j()|0),v=k0(Re(c&7)|0,0,v|0)|0,A=A&~p|v,e=e|(j()|0),n>>>0<i>>>0;)n=n+1|0}while(!1);if((o|0)>0){n=0;do A=h1(A,e)|0,e=j()|0,n=n+1|0;while((n|0)!=(o|0))}}else A=0,e=0;while(!1);return p=e,v=A,nA(p|0),w=d,v|0}function le(e){return e=e|0,(e|0)%2|0|0}function g1(e,A,n){e=e|0,A=A|0,n=n|0;var r=0,i=0;return i=w,w=w+16|0,r=i,A>>>0>15?(r=4,w=i,r|0):(t[e+4>>2]&2146435072|0)==2146435072||(t[e+8+4>>2]&2146435072|0)==2146435072?(r=3,w=i,r|0):(vi(e,A,r),A=_i(r,A)|0,r=j()|0,t[n>>2]=A,t[n+4>>2]=r,(A|0)==0&(r|0)==0&&X0(27795,27122,1050,27145),r=0,w=i,r|0)}function m1(e,A,n){e=e|0,A=A|0,n=n|0;var r=0,i=0,o=0,a=0;if(i=n+4|0,o=C0(e|0,A|0,52)|0,j()|0,o=o&15,a=C0(e|0,A|0,45)|0,j()|0,r=(o|0)==0,EA(a&127)|0){if(r)return a=1,a|0;r=1}else{if(r)return a=0,a|0;(t[i>>2]|0)==0&&(t[n+8>>2]|0)==0?r=(t[n+12>>2]|0)!=0&1:r=1}for(n=1;n&1?jt(i):Fe(i),a=C0(e|0,A|0,(15-n|0)*3|0)|0,j()|0,Mn(i,a&7),n>>>0<o>>>0;)n=n+1|0;return r|0}function Ke(e,A,n){e=e|0,A=A|0,n=n|0;var r=0,i=0,o=0,a=0,c=0,d=0,p=0,v=0;if(v=w,w=w+16|0,d=v,p=C0(e|0,A|0,45)|0,j()|0,p=p&127,p>>>0>121)return t[n>>2]=0,t[n+4>>2]=0,t[n+8>>2]=0,t[n+12>>2]=0,p=5,w=v,p|0;A:do if((EA(p)|0)!=0&&(o=C0(e|0,A|0,52)|0,j()|0,o=o&15,(o|0)!=0)){r=1;e:for(;;){switch(c=C0(e|0,A|0,(15-r|0)*3|0)|0,j()|0,c&7){case 5:break e;case 0:break;default:{r=A;break A}}if(r>>>0<o>>>0)r=r+1|0;else{r=A;break A}}for(i=1,r=A;A=(15-i|0)*3|0,a=k0(7,0,A|0)|0,c=r&~(j()|0),r=C0(e|0,r|0,A|0)|0,j()|0,r=k0(Ee(r&7)|0,0,A|0)|0,e=e&~a|r,r=c|(j()|0),i>>>0<o>>>0;)i=i+1|0}else r=A;while(!1);if(c=7696+(p*28|0)|0,t[n>>2]=t[c>>2],t[n+4>>2]=t[c+4>>2],t[n+8>>2]=t[c+8>>2],t[n+12>>2]=t[c+12>>2],!(m1(e,r,n)|0))return p=0,w=v,p|0;if(a=n+4|0,t[d>>2]=t[a>>2],t[d+4>>2]=t[a+4>>2],t[d+8>>2]=t[a+8>>2],o=C0(e|0,r|0,52)|0,j()|0,c=o&15,o&1?(Fe(a),o=c+1|0):o=c,!(EA(p)|0))r=0;else{A:do if(!c)r=0;else for(A=1;;){if(i=C0(e|0,r|0,(15-A|0)*3|0)|0,j()|0,i=i&7,i|0){r=i;break A}if(A>>>0<c>>>0)A=A+1|0;else{r=0;break}}while(!1);r=(r|0)==4&1}if(!(Je(n,o,r,0)|0))(o|0)!=(c|0)&&(t[a>>2]=t[d>>2],t[a+4>>2]=t[d+4>>2],t[a+8>>2]=t[d+8>>2]);else{if(EA(p)|0)do;while((Je(n,o,0,0)|0)!=0);(o|0)!=(c|0)&&kn(a)}return p=0,w=v,p|0}function Ze(e,A,n){e=e|0,A=A|0,n=n|0;var r=0,i=0,o=0;return o=w,w=w+16|0,r=o,i=Ke(e,A,r)|0,i|0?(w=o,i|0):(i=C0(e|0,A|0,52)|0,j()|0,wi(r,i&15,n),i=0,w=o,i|0)}function At(e,A,n){e=e|0,A=A|0,n=n|0;var r=0,i=0,o=0,a=0,c=0;if(a=w,w=w+16|0,o=a,r=Ke(e,A,o)|0,r|0)return o=r,w=a,o|0;r=C0(e|0,A|0,45)|0,j()|0,r=(EA(r&127)|0)==0,i=C0(e|0,A|0,52)|0,j()|0,i=i&15;A:do if(!r){if(i|0)for(r=1;;){if(c=k0(7,0,(15-r|0)*3|0)|0,!((c&e|0)==0&((j()|0)&A|0)==0))break A;if(r>>>0<i>>>0)r=r+1|0;else break}return a1(o,i,0,5,n),c=0,w=a,c|0}while(!1);return c1(o,i,0,6,n),c=0,w=a,c|0}function Ii(e,A,n){e=e|0,A=A|0,n=n|0;var r=0,i=0,o=0;if(i=C0(e|0,A|0,45)|0,j()|0,!(EA(i&127)|0))return i=2,t[n>>2]=i,0;if(i=C0(e|0,A|0,52)|0,j()|0,i=i&15,!i)return i=5,t[n>>2]=i,0;for(r=1;;){if(o=k0(7,0,(15-r|0)*3|0)|0,!((o&e|0)==0&((j()|0)&A|0)==0)){r=2,e=6;break}if(r>>>0<i>>>0)r=r+1|0;else{r=5,e=6;break}}return(e|0)==6&&(t[n>>2]=r),0}function Pn(e,A,n){e=e|0,A=A|0,n=n|0;var r=0,i=0,o=0,a=0,c=0,d=0,p=0,v=0,E=0;E=w,w=w+128|0,p=E+112|0,o=E+96|0,v=E,i=C0(e|0,A|0,52)|0,j()|0,c=i&15,t[p>>2]=c,a=C0(e|0,A|0,45)|0,j()|0,a=a&127;A:do if(EA(a)|0){if(c|0)for(r=1;;){if(d=k0(7,0,(15-r|0)*3|0)|0,!((d&e|0)==0&((j()|0)&A|0)==0)){i=0;break A}if(r>>>0<c>>>0)r=r+1|0;else break}if(i&1)i=1;else return d=k0(c+1|0,0,52)|0,v=j()|0|A&-15728641,p=k0(7,0,(14-c|0)*3|0)|0,v=Pn((d|e)&~p,v&~(j()|0),n)|0,w=E,v|0}else i=0;while(!1);if(r=Ke(e,A,o)|0,!r){i?(Hn(o,p,v),d=5):(Bn(o,p,v),d=6);A:do if(EA(a)|0)if(!c)e=5;else for(r=1;;){if(a=k0(7,0,(15-r|0)*3|0)|0,!((a&e|0)==0&((j()|0)&A|0)==0)){e=2;break A}if(r>>>0<c>>>0)r=r+1|0;else{e=5;break}}else e=2;while(!1);De(n|0,-1,e<<2|0)|0;A:do if(i)for(o=0;;){if(a=v+(o<<4)|0,Li(a,t[p>>2]|0)|0,a=t[a>>2]|0,c=t[n>>2]|0,(c|0)==-1|(c|0)==(a|0))r=n;else{i=0;do{if(i=i+1|0,i>>>0>=e>>>0){r=1;break A}r=n+(i<<2)|0,c=t[r>>2]|0}while(!((c|0)==-1|(c|0)==(a|0)))}if(t[r>>2]=a,o=o+1|0,o>>>0>=d>>>0){r=0;break}}else for(o=0;;){if(a=v+(o<<4)|0,Je(a,t[p>>2]|0,0,1)|0,a=t[a>>2]|0,c=t[n>>2]|0,(c|0)==-1|(c|0)==(a|0))r=n;else{i=0;do{if(i=i+1|0,i>>>0>=e>>>0){r=1;break A}r=n+(i<<2)|0,c=t[r>>2]|0}while(!((c|0)==-1|(c|0)==(a|0)))}if(t[r>>2]=a,o=o+1|0,o>>>0>=d>>>0){r=0;break}}while(!1)}return v=r,w=E,v|0}function Pi(){return 12}function y1(e,A){e=e|0,A=A|0;var n=0,r=0,i=0,o=0,a=0,c=0,d=0;if(e>>>0>15)return c=4,c|0;if(k0(e|0,0,52)|0,c=j()|0|134225919,!e){n=0,r=0;do EA(r)|0&&(k0(r|0,0,45)|0,a=c|(j()|0),e=A+(n<<3)|0,t[e>>2]=-1,t[e+4>>2]=a,n=n+1|0),r=r+1|0;while((r|0)!=122);return n=0,n|0}n=0,a=0;do{if(EA(a)|0){for(k0(a|0,0,45)|0,r=1,i=-1,o=c|(j()|0);d=k0(7,0,(15-r|0)*3|0)|0,i=i&~d,o=o&~(j()|0),(r|0)!=(e|0);)r=r+1|0;d=A+(n<<3)|0,t[d>>2]=i,t[d+4>>2]=o,n=n+1|0}a=a+1|0}while((a|0)!=122);return n=0,n|0}function Ti(e,A,n,r){e=e|0,A=A|0,n=n|0,r=r|0;var i=0,o=0,a=0,c=0,d=0,p=0,v=0,E=0,_=0,I=0,P=0,$=0,K=0,u0=0,s0=0;if(s0=w,w=w+16|0,K=s0,u0=C0(e|0,A|0,52)|0,j()|0,u0=u0&15,n>>>0>15)return u0=4,w=s0,u0|0;if((u0|0)<(n|0))return u0=12,w=s0,u0|0;if((u0|0)!=(n|0))if(o=k0(n|0,0,52)|0,o=o|e,c=j()|0|A&-15728641,(u0|0)>(n|0)){d=n;do $=k0(7,0,(14-d|0)*3|0)|0,d=d+1|0,o=$|o,c=j()|0|c;while((d|0)<(u0|0));$=o}else $=o;else $=e,c=A;P=C0($|0,c|0,45)|0,j()|0;A:do if(EA(P&127)|0){if(d=C0($|0,c|0,52)|0,j()|0,d=d&15,d|0)for(o=1;;){if(P=k0(7,0,(15-o|0)*3|0)|0,!((P&$|0)==0&((j()|0)&c|0)==0)){p=33;break A}if(o>>>0<d>>>0)o=o+1|0;else break}if(P=r,t[P>>2]=0,t[P+4>>2]=0,(u0|0)>(n|0)){for(P=A&-15728641,I=u0;;){if(_=I,I=I+-1|0,I>>>0>15|(u0|0)<(I|0)){p=19;break}if((u0|0)!=(I|0))if(o=k0(I|0,0,52)|0,o=o|e,d=j()|0|P,(u0|0)<(_|0))E=o;else{p=I;do E=k0(7,0,(14-p|0)*3|0)|0,p=p+1|0,o=E|o,d=j()|0|d;while((p|0)<(u0|0));E=o}else E=e,d=A;if(v=C0(E|0,d|0,45)|0,j()|0,!(EA(v&127)|0))o=0;else{v=C0(E|0,d|0,52)|0,j()|0,v=v&15;e:do if(!v)o=0;else for(p=1;;){if(o=C0(E|0,d|0,(15-p|0)*3|0)|0,j()|0,o=o&7,o|0)break e;if(p>>>0<v>>>0)p=p+1|0;else{o=0;break}}while(!1);o=(o|0)==0&1}if(d=C0(e|0,A|0,(15-_|0)*3|0)|0,j()|0,d=d&7,(d|0)==7){i=5,p=42;break}if(o=(o|0)!=0,(d|0)==1&o){i=5,p=42;break}if(E=d+(((d|0)!=0&o)<<31>>31)|0,E|0&&(p=u0-_|0,p=ze(7,0,p,((p|0)<0)<<31>>31)|0,v=j()|0,o?(o=TA(p|0,v|0,5,0)|0,o=$0(o|0,j()|0,-5,-1)|0,o=Se(o|0,j()|0,6,0)|0,o=$0(o|0,j()|0,1,0)|0,d=j()|0):(o=p,d=v),_=E+-1|0,_=TA(p|0,v|0,_|0,((_|0)<0)<<31>>31|0)|0,_=$0(o|0,d|0,_|0,j()|0)|0,E=j()|0,v=r,v=$0(_|0,E|0,t[v>>2]|0,t[v+4>>2]|0)|0,E=j()|0,_=r,t[_>>2]=v,t[_+4>>2]=E),(I|0)<=(n|0)){p=37;break}}if((p|0)==19)X0(27795,27122,1367,27158);else if((p|0)==37){a=r,i=t[a+4>>2]|0,a=t[a>>2]|0;break}else if((p|0)==42)return w=s0,i|0}else i=0,a=0}else p=33;while(!1);A:do if((p|0)==33)if(P=r,t[P>>2]=0,t[P+4>>2]=0,(u0|0)>(n|0)){for(o=u0;;){if(i=C0(e|0,A|0,(15-o|0)*3|0)|0,j()|0,i=i&7,(i|0)==7){i=5;break}if(a=u0-o|0,a=ze(7,0,a,((a|0)<0)<<31>>31)|0,i=TA(a|0,j()|0,i|0,0)|0,a=j()|0,P=r,a=$0(t[P>>2]|0,t[P+4>>2]|0,i|0,a|0)|0,i=j()|0,P=r,t[P>>2]=a,t[P+4>>2]=i,o=o+-1|0,(o|0)<=(n|0))break A}return w=s0,i|0}else i=0,a=0;while(!1);return gt($,c,u0,K)|0&&X0(27795,27122,1327,27173),u0=K,K=t[u0+4>>2]|0,((i|0)>-1|(i|0)==-1&a>>>0>4294967295)&((K|0)>(i|0)|((K|0)==(i|0)?(t[u0>>2]|0)>>>0>a>>>0:0))?(u0=0,w=s0,u0|0):(X0(27795,27122,1407,27158),0)}function Fi(e,A,n,r,i,o){e=e|0,A=A|0,n=n|0,r=r|0,i=i|0,o=o|0;var a=0,c=0,d=0,p=0,v=0,E=0,_=0,I=0,P=0,$=0;if(E=w,w=w+16|0,a=E,i>>>0>15)return o=4,w=E,o|0;if(c=C0(n|0,r|0,52)|0,j()|0,c=c&15,(c|0)>(i|0))return o=12,w=E,o|0;if(gt(n,r,i,a)|0&&X0(27795,27122,1327,27173),v=a,p=t[v+4>>2]|0,!(((A|0)>-1|(A|0)==-1&e>>>0>4294967295)&((p|0)>(A|0)|((p|0)==(A|0)?(t[v>>2]|0)>>>0>e>>>0:0))))return o=2,w=E,o|0;v=i-c|0,i=k0(i|0,0,52)|0,d=j()|0|r&-15728641,p=o,t[p>>2]=i|n,t[p+4>>2]=d,p=C0(n|0,r|0,45)|0,j()|0;A:do if(EA(p&127)|0){if(c|0)for(a=1;;){if(p=k0(7,0,(15-a|0)*3|0)|0,!((p&n|0)==0&((j()|0)&r|0)==0))break A;if(a>>>0<c>>>0)a=a+1|0;else break}if((v|0)<1)return o=0,w=E,o|0;for(p=c^15,r=-1,d=1,a=1;;){c=v-d|0,c=ze(7,0,c,((c|0)<0)<<31>>31)|0,n=j()|0;do if(a)if(a=TA(c|0,n|0,5,0)|0,a=$0(a|0,j()|0,-5,-1)|0,a=Se(a|0,j()|0,6,0)|0,i=j()|0,(A|0)>(i|0)|(A|0)==(i|0)&e>>>0>a>>>0){A=$0(e|0,A|0,-1,-1)|0,A=PA(A|0,j()|0,a|0,i|0)|0,a=j()|0,_=o,P=t[_>>2]|0,_=t[_+4>>2]|0,$=(p+r|0)*3|0,I=k0(7,0,$|0)|0,_=_&~(j()|0),r=Se(A|0,a|0,c|0,n|0)|0,e=j()|0,i=$0(r|0,e|0,2,0)|0,$=k0(i|0,j()|0,$|0)|0,_=j()|0|_,i=o,t[i>>2]=$|P&~I,t[i+4>>2]=_,e=TA(r|0,e|0,c|0,n|0)|0,e=PA(A|0,a|0,e|0,j()|0)|0,a=0,A=j()|0;break}else{$=o,I=t[$>>2]|0,$=t[$+4>>2]|0,P=k0(7,0,(p+r|0)*3|0)|0,$=$&~(j()|0),a=o,t[a>>2]=I&~P,t[a+4>>2]=$,a=1;break}else I=o,i=t[I>>2]|0,I=t[I+4>>2]|0,r=(p+r|0)*3|0,_=k0(7,0,r|0)|0,I=I&~(j()|0),$=Se(e|0,A|0,c|0,n|0)|0,a=j()|0,r=k0($|0,a|0,r|0)|0,I=j()|0|I,P=o,t[P>>2]=r|i&~_,t[P+4>>2]=I,a=TA($|0,a|0,c|0,n|0)|0,e=PA(e|0,A|0,a|0,j()|0)|0,a=0,A=j()|0;while(!1);if((v|0)>(d|0))r=~d,d=d+1|0;else{A=0;break}}return w=E,A|0}while(!1);if((v|0)<1)return $=0,w=E,$|0;for(i=c^15,a=1;;)if(P=v-a|0,P=ze(7,0,P,((P|0)<0)<<31>>31)|0,$=j()|0,d=o,n=t[d>>2]|0,d=t[d+4>>2]|0,c=(i-a|0)*3|0,r=k0(7,0,c|0)|0,d=d&~(j()|0),_=Se(e|0,A|0,P|0,$|0)|0,I=j()|0,c=k0(_|0,I|0,c|0)|0,d=j()|0|d,p=o,t[p>>2]=c|n&~r,t[p+4>>2]=d,$=TA(_|0,I|0,P|0,$|0)|0,e=PA(e|0,A|0,$|0,j()|0)|0,A=j()|0,(v|0)<=(a|0)){A=0;break}else a=a+1|0;return w=E,A|0}function C1(e,A,n,r){e=e|0,A=A|0,n=n|0,r=r|0;var i=0,o=0,a=0;i=C0(A|0,n|0,52)|0,j()|0,i=i&15,(A|0)==0&(n|0)==0|((r|0)>15|(i|0)>(r|0))?(o=-1,A=-1,n=0,i=0):(A=_n(A,n,i+1|0,r)|0,a=(j()|0)&-15728641,n=k0(r|0,0,52)|0,n=A|n,a=a|(j()|0),A=(LA(n,a)|0)==0,o=i,A=A?-1:r,i=a),a=e,t[a>>2]=n,t[a+4>>2]=i,t[e+8>>2]=o,t[e+12>>2]=A}function Tn(e,A,n,r){e=e|0,A=A|0,n=n|0,r=r|0;var i=0,o=0;if(i=C0(e|0,A|0,52)|0,j()|0,i=i&15,o=r+8|0,t[o>>2]=i,(e|0)==0&(A|0)==0|((n|0)>15|(i|0)>(n|0))){n=r,t[n>>2]=0,t[n+4>>2]=0,t[o>>2]=-1,t[r+12>>2]=-1;return}if(e=_n(e,A,i+1|0,n)|0,o=(j()|0)&-15728641,i=k0(n|0,0,52)|0,i=e|i,o=o|(j()|0),e=r,t[e>>2]=i,t[e+4>>2]=o,e=r+12|0,LA(i,o)|0){t[e>>2]=n;return}else{t[e>>2]=-1;return}}function v1(e){e=e|0;var A=0,n=0,r=0,i=0,o=0,a=0,c=0,d=0,p=0;if(n=e,A=t[n>>2]|0,n=t[n+4>>2]|0,!((A|0)==0&(n|0)==0)&&(r=C0(A|0,n|0,52)|0,j()|0,r=r&15,c=k0(1,0,(r^15)*3|0)|0,A=$0(c|0,j()|0,A|0,n|0)|0,n=j()|0,c=e,t[c>>2]=A,t[c+4>>2]=n,c=e+8|0,a=t[c>>2]|0,!((r|0)<(a|0)))){for(d=e+12|0,o=r;;){if((o|0)==(a|0)){r=5;break}if(p=(o|0)==(t[d>>2]|0),i=(15-o|0)*3|0,r=C0(A|0,n|0,i|0)|0,j()|0,r=r&7,p&((r|0)==1&!0)){r=7;break}if(!((r|0)==7&!0)){r=10;break}if(p=k0(1,0,i|0)|0,A=$0(A|0,n|0,p|0,j()|0)|0,n=j()|0,p=e,t[p>>2]=A,t[p+4>>2]=n,(o|0)>(a|0))o=o+-1|0;else{r=10;break}}if((r|0)==5){p=e,t[p>>2]=0,t[p+4>>2]=0,t[c>>2]=-1,t[d>>2]=-1;return}else if((r|0)==7){a=k0(1,0,i|0)|0,a=$0(A|0,n|0,a|0,j()|0)|0,c=j()|0,p=e,t[p>>2]=a,t[p+4>>2]=c,t[d>>2]=o+-1;return}else if((r|0)==10)return}}function mt(e){e=+e;var A=0;return A=e<0?e+6.283185307179586:e,+(e>=6.283185307179586?A+-6.283185307179586:A)}function et(e,A){return e=e|0,A=A|0,+lA(+(+k[e>>3]-+k[A>>3]))<17453292519943298e-27?(A=+lA(+(+k[e+8>>3]-+k[A+8>>3]))<17453292519943298e-27,A|0):(A=0,A|0)}function te(e,A){switch(e=+e,A=A|0,A|0){case 1:{e=e<0?e+6.283185307179586:e;break}case 2:{e=e>0?e+-6.283185307179586:e;break}}return+e}function Ri(e,A){e=e|0,A=A|0;var n=0,r=0,i=0,o=0;return i=+k[A>>3],r=+k[e>>3],o=+aA(+((i-r)*.5)),n=+aA(+((+k[A+8>>3]-+k[e+8>>3])*.5)),n=o*o+n*(+mA(+i)*+mA(+r)*n),+(+CA(+ +gA(+n),+ +gA(+(1-n)))*2)}function yt(e,A){e=e|0,A=A|0;var n=0,r=0,i=0,o=0;return i=+k[A>>3],r=+k[e>>3],o=+aA(+((i-r)*.5)),n=+aA(+((+k[A+8>>3]-+k[e+8>>3])*.5)),n=o*o+n*(+mA(+i)*+mA(+r)*n),+(+CA(+ +gA(+n),+ +gA(+(1-n)))*2*6371.007180918475)}function Ni(e,A){e=e|0,A=A|0;var n=0,r=0,i=0,o=0;return i=+k[A>>3],r=+k[e>>3],o=+aA(+((i-r)*.5)),n=+aA(+((+k[A+8>>3]-+k[e+8>>3])*.5)),n=o*o+n*(+mA(+i)*+mA(+r)*n),+(+CA(+ +gA(+n),+ +gA(+(1-n)))*2*6371.007180918475*1e3)}function Zi(e,A){e=e|0,A=A|0;var n=0,r=0,i=0,o=0,a=0;return o=+k[A>>3],r=+mA(+o),i=+k[A+8>>3]-+k[e+8>>3],a=r*+aA(+i),n=+k[e>>3],+ +CA(+a,+(+aA(+o)*+mA(+n)-+mA(+i)*(r*+aA(+n))))}function Qi(e,A,n,r){e=e|0,A=+A,n=+n,r=r|0;var i=0,o=0,a=0,c=0;if(n<1e-16){t[r>>2]=t[e>>2],t[r+4>>2]=t[e+4>>2],t[r+8>>2]=t[e+8>>2],t[r+12>>2]=t[e+12>>2];return}o=A<0?A+6.283185307179586:A,o=A>=6.283185307179586?o+-6.283185307179586:o;do if(o<1e-16)A=+k[e>>3]+n,k[r>>3]=A,i=r;else{if(i=+lA(+(o+-3.141592653589793))<1e-16,A=+k[e>>3],i){A=A-n,k[r>>3]=A,i=r;break}if(a=+mA(+n),n=+aA(+n),A=a*+aA(+A)+ +mA(+o)*(n*+mA(+A)),A=A>1?1:A,A=+Jt(+(A<-1?-1:A)),k[r>>3]=A,+lA(+(A+-1.5707963267948966))<1e-16){k[r>>3]=1.5707963267948966,k[r+8>>3]=0;return}if(+lA(+(A+1.5707963267948966))<1e-16){k[r>>3]=-1.5707963267948966,k[r+8>>3]=0;return}if(c=1/+mA(+A),o=n*+aA(+o)*c,n=+k[e>>3],A=c*((a-+aA(+A)*+aA(+n))/+mA(+n)),a=o>1?1:o,A=A>1?1:A,A=+k[e+8>>3]+ +CA(+(a<-1?-1:a),+(A<-1?-1:A)),A>3.141592653589793)do A=A+-6.283185307179586;while(A>3.141592653589793);if(A<-3.141592653589793)do A=A+6.283185307179586;while(A<-3.141592653589793);k[r+8>>3]=A;return}while(!1);if(+lA(+(A+-1.5707963267948966))<1e-16){k[i>>3]=1.5707963267948966,k[r+8>>3]=0;return}if(+lA(+(A+1.5707963267948966))<1e-16){k[i>>3]=-1.5707963267948966,k[r+8>>3]=0;return}if(A=+k[e+8>>3],A>3.141592653589793)do A=A+-6.283185307179586;while(A>3.141592653589793);if(A<-3.141592653589793)do A=A+6.283185307179586;while(A<-3.141592653589793);k[r+8>>3]=A}function Fn(e,A){return e=e|0,A=A|0,e>>>0>15?(A=4,A|0):(k[A>>3]=+k[20656+(e<<3)>>3],A=0,A|0)}function Oi(e,A){return e=e|0,A=A|0,e>>>0>15?(A=4,A|0):(k[A>>3]=+k[20784+(e<<3)>>3],A=0,A|0)}function Ui(e,A){return e=e|0,A=A|0,e>>>0>15?(A=4,A|0):(k[A>>3]=+k[20912+(e<<3)>>3],A=0,A|0)}function $i(e,A){return e=e|0,A=A|0,e>>>0>15?(A=4,A|0):(k[A>>3]=+k[21040+(e<<3)>>3],A=0,A|0)}function Ht(e,A){e=e|0,A=A|0;var n=0;return e>>>0>15?(A=4,A|0):(n=ze(7,0,e,((e|0)<0)<<31>>31)|0,n=TA(n|0,j()|0,120,0)|0,e=j()|0,t[A>>2]=n|2,t[A+4>>2]=e,A=0,A|0)}function Rn(e,A,n){e=e|0,A=A|0,n=n|0;var r=0,i=0,o=0,a=0,c=0,d=0,p=0,v=0,E=0,_=0;return _=+k[A>>3],v=+k[e>>3],d=+aA(+((_-v)*.5)),o=+k[A+8>>3],p=+k[e+8>>3],a=+aA(+((o-p)*.5)),c=+mA(+v),E=+mA(+_),a=d*d+a*(E*c*a),a=+CA(+ +gA(+a),+ +gA(+(1-a)))*2,d=+k[n>>3],_=+aA(+((d-_)*.5)),r=+k[n+8>>3],o=+aA(+((r-o)*.5)),i=+mA(+d),o=_*_+o*(E*i*o),o=+CA(+ +gA(+o),+ +gA(+(1-o)))*2,d=+aA(+((v-d)*.5)),r=+aA(+((p-r)*.5)),r=d*d+r*(c*i*r),r=+CA(+ +gA(+r),+ +gA(+(1-r)))*2,i=(a+o+r)*.5,+(+ft(+ +gA(+(+GA(+(i*.5))*+GA(+((i-a)*.5))*+GA(+((i-o)*.5))*+GA(+((i-r)*.5)))))*4)}function x1(e,A,n){e=e|0,A=A|0,n=n|0;var r=0,i=0,o=0,a=0,c=0;if(c=w,w=w+192|0,o=c+168|0,a=c,i=Ze(e,A,o)|0,i|0)return n=i,w=c,n|0;if(At(e,A,a)|0&&X0(27795,27190,415,27199),A=t[a>>2]|0,(A|0)>0){if(r=+Rn(a+8|0,a+8+(((A|0)!=1&1)<<4)|0,o)+0,(A|0)!=1){e=1;do i=e,e=e+1|0,r=r+ +Rn(a+8+(i<<4)|0,a+8+(((e|0)%(A|0)|0)<<4)|0,o);while((e|0)<(A|0))}}else r=0;return k[n>>3]=r,n=0,w=c,n|0}function Wi(e,A,n){return e=e|0,A=A|0,n=n|0,e=x1(e,A,n)|0,e|0||(k[n>>3]=+k[n>>3]*6371.007180918475*6371.007180918475),e|0}function Gi(e,A,n){return e=e|0,A=A|0,n=n|0,e=x1(e,A,n)|0,e|0||(k[n>>3]=+k[n>>3]*6371.007180918475*6371.007180918475*1e3*1e3),e|0}function Yi(e,A,n){e=e|0,A=A|0,n=n|0;var r=0,i=0,o=0,a=0,c=0,d=0,p=0,v=0;if(c=w,w=w+176|0,a=c,e=Dt(e,A,a)|0,e|0)return a=e,w=c,a|0;if(k[n>>3]=0,e=t[a>>2]|0,(e|0)<=1)return a=0,w=c,a|0;A=e+-1|0,e=0,r=+k[a+8>>3],i=+k[a+16>>3],o=0;do e=e+1|0,p=r,r=+k[a+8+(e<<4)>>3],v=+aA(+((r-p)*.5)),d=i,i=+k[a+8+(e<<4)+8>>3],d=+aA(+((i-d)*.5)),d=v*v+d*(+mA(+r)*+mA(+p)*d),o=o+ +CA(+ +gA(+d),+ +gA(+(1-d)))*2;while((e|0)<(A|0));return k[n>>3]=o,a=0,w=c,a|0}function qi(e,A,n){e=e|0,A=A|0,n=n|0;var r=0,i=0,o=0,a=0,c=0,d=0,p=0,v=0;if(c=w,w=w+176|0,a=c,e=Dt(e,A,a)|0,e|0)return a=e,o=+k[n>>3],o=o*6371.007180918475,k[n>>3]=o,w=c,a|0;if(k[n>>3]=0,e=t[a>>2]|0,(e|0)<=1)return a=0,o=0,o=o*6371.007180918475,k[n>>3]=o,w=c,a|0;A=e+-1|0,e=0,r=+k[a+8>>3],i=+k[a+16>>3],o=0;do e=e+1|0,p=r,r=+k[a+8+(e<<4)>>3],v=+aA(+((r-p)*.5)),d=i,i=+k[a+8+(e<<4)+8>>3],d=+aA(+((i-d)*.5)),d=v*v+d*(+mA(+p)*+mA(+r)*d),o=o+ +CA(+ +gA(+d),+ +gA(+(1-d)))*2;while((e|0)!=(A|0));return k[n>>3]=o,a=0,v=o,v=v*6371.007180918475,k[n>>3]=v,w=c,a|0}function Xi(e,A,n){e=e|0,A=A|0,n=n|0;var r=0,i=0,o=0,a=0,c=0,d=0,p=0,v=0;if(c=w,w=w+176|0,a=c,e=Dt(e,A,a)|0,e|0)return a=e,o=+k[n>>3],o=o*6371.007180918475,o=o*1e3,k[n>>3]=o,w=c,a|0;if(k[n>>3]=0,e=t[a>>2]|0,(e|0)<=1)return a=0,o=0,o=o*6371.007180918475,o=o*1e3,k[n>>3]=o,w=c,a|0;A=e+-1|0,e=0,r=+k[a+8>>3],i=+k[a+16>>3],o=0;do e=e+1|0,p=r,r=+k[a+8+(e<<4)>>3],v=+aA(+((r-p)*.5)),d=i,i=+k[a+8+(e<<4)+8>>3],d=+aA(+((i-d)*.5)),d=v*v+d*(+mA(+p)*+mA(+r)*d),o=o+ +CA(+ +gA(+d),+ +gA(+(1-d)))*2;while((e|0)!=(A|0));return k[n>>3]=o,a=0,v=o,v=v*6371.007180918475,v=v*1e3,k[n>>3]=v,w=c,a|0}function Ji(e){e=e|0;var A=0,n=0,r=0;return A=qA(1,12)|0,A||X0(27280,27235,49,27293),n=e+4|0,r=t[n>>2]|0,r|0?(r=r+8|0,t[r>>2]=A,t[n>>2]=A,A|0):(t[e>>2]|0&&X0(27310,27235,61,27333),r=e,t[r>>2]=A,t[n>>2]=A,A|0)}function Ki(e,A){e=e|0,A=A|0;var n=0,r=0;return r=me(24)|0,r||X0(27347,27235,78,27361),t[r>>2]=t[A>>2],t[r+4>>2]=t[A+4>>2],t[r+8>>2]=t[A+8>>2],t[r+12>>2]=t[A+12>>2],t[r+16>>2]=0,A=e+4|0,n=t[A>>2]|0,n|0?(t[n+16>>2]=r,t[A>>2]=r,r|0):(t[e>>2]|0&&X0(27376,27235,82,27361),t[e>>2]=r,t[A>>2]=r,r|0)}function Nn(e){e=e|0;var A=0,n=0,r=0,i=0;if(e)for(r=1;;){if(A=t[e>>2]|0,A|0)do{if(n=t[A>>2]|0,n|0)do i=n,n=t[n+16>>2]|0,W0(i);while((n|0)!=0);i=A,A=t[A+8>>2]|0,W0(i)}while((A|0)!=0);if(A=e,e=t[e+8>>2]|0,r||W0(A),e)r=0;else break}}function Ao(e){e=e|0;var A=0,n=0,r=0,i=0,o=0,a=0,c=0,d=0,p=0,v=0,E=0,_=0,I=0,P=0,$=0,K=0,u0=0,s0=0,i0=0,W=0,z0=0,O0=0,N0=0,rA=0,iA=0,hA=0,AA=0,U0=0,M0=0,uA=0,xA=0,oA=0;if(i=e+8|0,t[i>>2]|0)return oA=1,oA|0;if(r=t[e>>2]|0,!r)return oA=0,oA|0;A=r,n=0;do n=n+1|0,A=t[A+8>>2]|0;while((A|0)!=0);if(n>>>0<2)return oA=0,oA|0;uA=me(n<<2)|0,uA||X0(27396,27235,317,27415),M0=me(n<<5)|0,M0||X0(27437,27235,321,27415),t[e>>2]=0,O0=e+4|0,t[O0>>2]=0,t[i>>2]=0,n=0,U0=0,z0=0,E=0;A:for(;;){if(v=t[r>>2]|0,v){o=0,a=v;do{if(d=+k[a+8>>3],A=a,a=t[a+16>>2]|0,p=(a|0)==0,i=p?v:a,c=+k[i+8>>3],+lA(+(d-c))>3.141592653589793){oA=14;break}o=o+(c-d)*(+k[A>>3]+ +k[i>>3])}while(!p);if((oA|0)==14){oA=0,o=0,A=v;do W=+k[A+8>>3],AA=A+16|0,hA=t[AA>>2]|0,hA=(hA|0)==0?v:hA,i0=+k[hA+8>>3],o=o+(+k[A>>3]+ +k[hA>>3])*((i0<0?i0+6.283185307179586:i0)-(W<0?W+6.283185307179586:W)),A=t[((A|0)==0?r:AA)>>2]|0;while((A|0)!=0)}o>0?(t[uA+(U0<<2)>>2]=r,U0=U0+1|0,i=z0,A=E):oA=19}else oA=19;if((oA|0)==19){oA=0;do if(n){if(A=n+8|0,t[A>>2]|0){oA=21;break A}if(n=qA(1,12)|0,!n){oA=23;break A}t[A>>2]=n,i=n+4|0,a=n,A=E}else if(E){i=O0,a=E+8|0,A=r,n=e;break}else if(t[e>>2]|0){oA=27;break A}else{i=O0,a=e,A=r,n=e;break}while(!1);if(t[a>>2]=r,t[i>>2]=r,a=M0+(z0<<5)|0,p=t[r>>2]|0,p){for(v=M0+(z0<<5)+8|0,k[v>>3]=17976931348623157e292,E=M0+(z0<<5)+24|0,k[E>>3]=17976931348623157e292,k[a>>3]=-17976931348623157e292,_=M0+(z0<<5)+16|0,k[_>>3]=-17976931348623157e292,u0=17976931348623157e292,s0=-17976931348623157e292,i=0,I=p,d=17976931348623157e292,$=17976931348623157e292,K=-17976931348623157e292,c=-17976931348623157e292;o=+k[I>>3],W=+k[I+8>>3],I=t[I+16>>2]|0,P=(I|0)==0,i0=+k[(P?p:I)+8>>3],o<d&&(k[v>>3]=o,d=o),W<$&&(k[E>>3]=W,$=W),o>K?k[a>>3]=o:o=K,W>c&&(k[_>>3]=W,c=W),u0=W>0&W<u0?W:u0,s0=W<0&W>s0?W:s0,i=i|+lA(+(W-i0))>3.141592653589793,!P;)K=o;i&&(k[_>>3]=s0,k[E>>3]=u0)}else t[a>>2]=0,t[a+4>>2]=0,t[a+8>>2]=0,t[a+12>>2]=0,t[a+16>>2]=0,t[a+20>>2]=0,t[a+24>>2]=0,t[a+28>>2]=0;i=z0+1|0}if(AA=r+8|0,r=t[AA>>2]|0,t[AA>>2]=0,r)z0=i,E=A;else{oA=45;break}}if((oA|0)==21)X0(27213,27235,35,27247);else if((oA|0)==23)X0(27267,27235,37,27247);else if((oA|0)==27)X0(27310,27235,61,27333);else if((oA|0)==45){A:do if((U0|0)>0){for(AA=(i|0)==0,iA=i<<2,hA=(e|0)==0,rA=0,A=0;;){if(N0=t[uA+(rA<<2)>>2]|0,AA)oA=73;else{if(z0=me(iA)|0,!z0){oA=50;break}if(O0=me(iA)|0,!O0){oA=52;break}e:do if(hA)n=0;else{for(i=0,n=0,a=e;r=M0+(i<<5)|0,Zn(t[a>>2]|0,r,t[N0>>2]|0)|0?(t[z0+(n<<2)>>2]=a,t[O0+(n<<2)>>2]=r,P=n+1|0):P=n,a=t[a+8>>2]|0,a;)i=i+1|0,n=P;if((P|0)>0)if(r=t[z0>>2]|0,(P|0)==1)n=r;else for(_=0,I=-1,n=r,E=r;;){for(p=t[E>>2]|0,r=0,a=0;i=t[t[z0+(a<<2)>>2]>>2]|0,(i|0)==(p|0)?v=r:v=r+((Zn(i,t[O0+(a<<2)>>2]|0,t[p>>2]|0)|0)&1)|0,a=a+1|0,(a|0)!=(P|0);)r=v;if(i=(v|0)>(I|0),n=i?E:n,r=_+1|0,(r|0)==(P|0))break e;_=r,I=i?v:I,E=t[z0+(r<<2)>>2]|0}else n=0}while(!1);if(W0(z0),W0(O0),n){if(i=n+4|0,r=t[i>>2]|0,r)n=r+8|0;else if(t[n>>2]|0){oA=70;break}t[n>>2]=N0,t[i>>2]=N0}else oA=73}if((oA|0)==73){if(oA=0,A=t[N0>>2]|0,A|0)do O0=A,A=t[A+16>>2]|0,W0(O0);while((A|0)!=0);W0(N0),A=1}if(rA=rA+1|0,(rA|0)>=(U0|0)){xA=A;break A}}(oA|0)==50?X0(27452,27235,249,27471):(oA|0)==52?X0(27490,27235,252,27471):(oA|0)==70&&X0(27310,27235,61,27333)}else xA=0;while(!1);return W0(uA),W0(M0),oA=xA,oA|0}return 0}function Zn(e,A,n){e=e|0,A=A|0,n=n|0;var r=0,i=0,o=0,a=0,c=0,d=0,p=0,v=0;if(!(i1(A,n)|0)||(A=vn(A)|0,r=+k[n>>3],i=+k[n+8>>3],i=A&i<0?i+6.283185307179586:i,e=t[e>>2]|0,!e))return e=0,e|0;if(A){A=0,p=i,n=e;A:for(;;){for(;a=+k[n>>3],i=+k[n+8>>3],n=n+16|0,v=t[n>>2]|0,v=(v|0)==0?e:v,o=+k[v>>3],c=+k[v+8>>3],a>o?(d=a,a=c):(d=o,o=a,a=i,i=c),r=r==o|r==d?r+2220446049250313e-31:r,!!(r<o|r>d);)if(n=t[n>>2]|0,!n){n=22;break A}if(c=a<0?a+6.283185307179586:a,a=i<0?i+6.283185307179586:i,p=c==p|a==p?p+-2220446049250313e-31:p,d=c+(a-c)*((r-o)/(d-o)),(d<0?d+6.283185307179586:d)>p&&(A=A^1),n=t[n>>2]|0,!n){n=22;break}}if((n|0)==22)return A|0}else{A=0,p=i,n=e;A:for(;;){for(;a=+k[n>>3],i=+k[n+8>>3],n=n+16|0,v=t[n>>2]|0,v=(v|0)==0?e:v,o=+k[v>>3],c=+k[v+8>>3],a>o?(d=a,a=c):(d=o,o=a,a=i,i=c),r=r==o|r==d?r+2220446049250313e-31:r,!!(r<o|r>d);)if(n=t[n>>2]|0,!n){n=22;break A}if(p=a==p|i==p?p+-2220446049250313e-31:p,a+(i-a)*((r-o)/(d-o))>p&&(A=A^1),n=t[n>>2]|0,!n){n=22;break}}if((n|0)==22)return A|0}return 0}function xe(e,A,n,r,i){e=e|0,A=A|0,n=n|0,r=r|0,i=i|0;var o=0,a=0,c=0,d=0,p=0,v=0,E=0,_=0,I=0,P=0,$=0,K=0,u0=0,s0=0;if(s0=w,w=w+32|0,u0=s0+16|0,K=s0,o=C0(e|0,A|0,52)|0,j()|0,o=o&15,I=C0(n|0,r|0,52)|0,j()|0,(o|0)!=(I&15|0))return u0=12,w=s0,u0|0;if(p=C0(e|0,A|0,45)|0,j()|0,p=p&127,v=C0(n|0,r|0,45)|0,j()|0,v=v&127,p>>>0>121|v>>>0>121)return u0=5,w=s0,u0|0;if(I=(p|0)!=(v|0),I){if(c=r1(p,v)|0,(c|0)==7)return u0=1,w=s0,u0|0;d=r1(v,p)|0,(d|0)==7?X0(27514,27538,161,27548):(P=c,a=d)}else P=0,a=0;E=EA(p)|0,_=EA(v)|0,t[u0>>2]=0,t[u0+4>>2]=0,t[u0+8>>2]=0,t[u0+12>>2]=0;do if(P){if(v=t[4272+(p*28|0)+(P<<2)>>2]|0,c=(v|0)>0,_)if(c){p=0,d=n,c=r;do d=Vi(d,c)|0,c=j()|0,a=Ee(a)|0,(a|0)==1&&(a=Ee(1)|0),p=p+1|0;while((p|0)!=(v|0));v=a,p=d,d=c}else v=a,p=n,d=r;else if(c){p=0,d=n,c=r;do d=p1(d,c)|0,c=j()|0,a=Ee(a)|0,p=p+1|0;while((p|0)!=(v|0));v=a,p=d,d=c}else v=a,p=n,d=r;if(m1(p,d,u0)|0,I||X0(27563,27538,191,27548),c=(E|0)!=0,a=(_|0)!=0,c&a&&X0(27590,27538,192,27548),c){if(a=YA(e,A)|0,(a|0)==7){o=5;break}if(m0[22e3+(a*7|0)+P>>0]|0){o=1;break}d=t[21168+(a*28|0)+(P<<2)>>2]|0,p=d}else if(a){if(a=YA(p,d)|0,(a|0)==7){o=5;break}if(m0[22e3+(a*7|0)+v>>0]|0){o=1;break}p=0,d=t[21168+(v*28|0)+(a<<2)>>2]|0}else p=0,d=0;if((p|d|0)<0)o=5;else{if((d|0)>0){c=u0+4|0,a=0;do St(c),a=a+1|0;while((a|0)!=(d|0))}if(t[K>>2]=0,t[K+4>>2]=0,t[K+8>>2]=0,Mn(K,P),o|0)for(;le(o)|0?jt(K):Fe(K),(o|0)>1;)o=o+-1|0;if((p|0)>0){o=0;do St(K),o=o+1|0;while((o|0)!=(p|0))}$=u0+4|0,$A($,K,$),QA($),$=51}}else if(m1(n,r,u0)|0,(E|0)!=0&(_|0)!=0)if((v|0)!=(p|0)&&X0(27621,27538,261,27548),a=YA(e,A)|0,o=YA(n,r)|0,(a|0)==7|(o|0)==7)o=5;else if(m0[22e3+(a*7|0)+o>>0]|0)o=1;else if(a=t[21168+(a*28|0)+(o<<2)>>2]|0,(a|0)>0){c=u0+4|0,o=0;do St(c),o=o+1|0;while((o|0)!=(a|0));$=51}else $=51;else $=51;while(!1);return($|0)==51&&(o=u0+4|0,t[i>>2]=t[o>>2],t[i+4>>2]=t[o+4>>2],t[i+8>>2]=t[o+8>>2],o=0),u0=o,w=s0,u0|0}function Qn(e,A,n,r){e=e|0,A=A|0,n=n|0,r=r|0;var i=0,o=0,a=0,c=0,d=0,p=0,v=0,E=0,_=0,I=0,P=0,$=0,K=0,u0=0,s0=0,i0=0;if($=w,w=w+48|0,p=$+36|0,a=$+24|0,c=$+12|0,d=$,i=C0(e|0,A|0,52)|0,j()|0,i=i&15,_=C0(e|0,A|0,45)|0,j()|0,_=_&127,_>>>0>121)return r=5,w=$,r|0;if(v=EA(_)|0,k0(i|0,0,52)|0,K=j()|0|134225919,o=r,t[o>>2]=-1,t[o+4>>2]=K,!i)return i=zt(n)|0,(i|0)==7||(i=n1(_,i)|0,(i|0)==127)?(K=1,w=$,K|0):(I=k0(i|0,0,45)|0,P=j()|0,_=r,P=t[_+4>>2]&-1040385|P,K=r,t[K>>2]=t[_>>2]|I,t[K+4>>2]=P,K=0,w=$,K|0);for(t[p>>2]=t[n>>2],t[p+4>>2]=t[n+4>>2],t[p+8>>2]=t[n+8>>2],n=i;;){if(o=n,n=n+-1|0,t[a>>2]=t[p>>2],t[a+4>>2]=t[p+4>>2],t[a+8>>2]=t[p+8>>2],le(o)|0){if(i=li(p)|0,i|0){n=13;break}t[c>>2]=t[p>>2],t[c+4>>2]=t[p+4>>2],t[c+8>>2]=t[p+8>>2],jt(c)}else{if(i=ai(p)|0,i|0){n=13;break}t[c>>2]=t[p>>2],t[c+4>>2]=t[p+4>>2],t[c+8>>2]=t[p+8>>2],Fe(c)}if(s1(a,c,d),QA(d),i=r,s0=t[i>>2]|0,i=t[i+4>>2]|0,i0=(15-o|0)*3|0,u0=k0(7,0,i0|0)|0,i=i&~(j()|0),i0=k0(zt(d)|0,0,i0|0)|0,i=j()|0|i,K=r,t[K>>2]=i0|s0&~u0,t[K+4>>2]=i,(o|0)<=1){n=14;break}}A:do if((n|0)!=13&&(n|0)==14)if((t[p>>2]|0)<=1&&(t[p+4>>2]|0)<=1&&(t[p+8>>2]|0)<=1){n=zt(p)|0,i=n1(_,n)|0,(i|0)==127?d=0:d=EA(i)|0;e:do if(n){if(v){if(i=YA(e,A)|0,(i|0)==7){i=5;break A}if(o=t[21376+(i*28|0)+(n<<2)>>2]|0,(o|0)>0){i=n,n=0;do i=Re(i)|0,n=n+1|0;while((n|0)!=(o|0))}else i=n;if((i|0)==1){i=9;break A}n=n1(_,i)|0,(n|0)==127&&X0(27648,27538,411,27678),EA(n)|0?X0(27693,27538,412,27678):(P=n,I=o,E=i)}else P=i,I=0,E=n;if(c=t[4272+(_*28|0)+(E<<2)>>2]|0,(c|0)<=-1&&X0(27724,27538,419,27678),!d){if((I|0)<0){i=5;break A}if(I|0){o=r,i=0,n=t[o>>2]|0,o=t[o+4>>2]|0;do n=Ne(n,o)|0,o=j()|0,i0=r,t[i0>>2]=n,t[i0+4>>2]=o,i=i+1|0;while((i|0)<(I|0))}if((c|0)<=0){i=P,n=58;break}for(o=r,i=0,n=t[o>>2]|0,o=t[o+4>>2]|0;;)if(n=Ne(n,o)|0,o=j()|0,i0=r,t[i0>>2]=n,t[i0+4>>2]=o,i=i+1|0,(i|0)==(c|0)){i=P,n=58;break e}}if(a=r1(P,_)|0,(a|0)==7&&X0(27514,27538,428,27678),i=r,n=t[i>>2]|0,i=t[i+4>>2]|0,(c|0)>0){o=0;do n=Ne(n,i)|0,i=j()|0,i0=r,t[i0>>2]=n,t[i0+4>>2]=i,o=o+1|0;while((o|0)!=(c|0))}if(i=YA(n,i)|0,(i|0)==7&&X0(27795,27538,440,27678),n=t1(P)|0,n=t[(n?21792:21584)+(a*28|0)+(i<<2)>>2]|0,(n|0)<0&&X0(27795,27538,454,27678),!n)i=P,n=58;else{a=r,i=0,o=t[a>>2]|0,a=t[a+4>>2]|0;do o=h1(o,a)|0,a=j()|0,i0=r,t[i0>>2]=o,t[i0+4>>2]=a,i=i+1|0;while((i|0)<(n|0));i=P,n=58}}else if((v|0)!=0&(d|0)!=0){if(n=YA(e,A)|0,o=r,o=YA(t[o>>2]|0,t[o+4>>2]|0)|0,(n|0)==7|(o|0)==7){i=5;break A}if(o=t[21376+(n*28|0)+(o<<2)>>2]|0,(o|0)<0){i=5;break A}if(!o)n=59;else{c=r,n=0,a=t[c>>2]|0,c=t[c+4>>2]|0;do a=Ne(a,c)|0,c=j()|0,i0=r,t[i0>>2]=a,t[i0+4>>2]=c,n=n+1|0;while((n|0)<(o|0));n=58}}else n=58;while(!1);if((n|0)==58&&d&&(n=59),(n|0)==59&&(i0=r,(YA(t[i0>>2]|0,t[i0+4>>2]|0)|0)==1)){i=9;break}i0=r,u0=t[i0>>2]|0,i0=t[i0+4>>2]&-1040385,s0=k0(i|0,0,45)|0,i0=i0|(j()|0),i=r,t[i>>2]=u0|s0,t[i+4>>2]=i0,i=0}else i=1;while(!1);return i0=i,w=$,i0|0}function eo(e,A,n,r,i,o){e=e|0,A=A|0,n=n|0,r=r|0,i=i|0,o=o|0;var a=0,c=0;return c=w,w=w+16|0,a=c,i?e=15:(e=xe(e,A,n,r,a)|0,e||(ui(a,o),e=0)),w=c,e|0}function to(e,A,n,r,i){e=e|0,A=A|0,n=n|0,r=r|0,i=i|0;var o=0,a=0;return a=w,w=w+16|0,o=a,r?n=15:(n=fi(n,o)|0,n||(n=Qn(e,A,o,i)|0)),w=a,n|0}function no(e,A,n,r,i){e=e|0,A=A|0,n=n|0,r=r|0,i=i|0;var o=0,a=0,c=0,d=0;return d=w,w=w+32|0,a=d+12|0,c=d,o=xe(e,A,e,A,a)|0,o|0?(c=o,w=d,c|0):(e=xe(e,A,n,r,c)|0,e|0?(c=e,w=d,c|0):(a=l1(a,c)|0,c=i,t[c>>2]=a,t[c+4>>2]=((a|0)<0)<<31>>31,c=0,w=d,c|0))}function ro(e,A,n,r,i){e=e|0,A=A|0,n=n|0,r=r|0,i=i|0;var o=0,a=0,c=0,d=0;return d=w,w=w+32|0,a=d+12|0,c=d,o=xe(e,A,e,A,a)|0,!o&&(o=xe(e,A,n,r,c)|0,!o)?(r=l1(a,c)|0,r=$0(r|0,((r|0)<0)<<31>>31|0,1,0)|0,a=j()|0,c=i,t[c>>2]=r,t[c+4>>2]=a,c=0,w=d,c|0):(c=o,w=d,c|0)}function io(e,A,n,r,i){e=e|0,A=A|0,n=n|0,r=r|0,i=i|0;var o=0,a=0,c=0,d=0,p=0,v=0,E=0,_=0,I=0,P=0,$=0,K=0,u0=0,s0=0,i0=0,W=0,z0=0,O0=0,N0=0,rA=0;if(N0=w,w=w+48|0,z0=N0+24|0,a=N0+12|0,O0=N0,o=xe(e,A,e,A,z0)|0,!o&&(o=xe(e,A,n,r,a)|0,!o)){i0=l1(z0,a)|0,W=((i0|0)<0)<<31>>31,t[z0>>2]=0,t[z0+4>>2]=0,t[z0+8>>2]=0,t[a>>2]=0,t[a+4>>2]=0,t[a+8>>2]=0,xe(e,A,e,A,z0)|0&&X0(27795,27538,692,27747),xe(e,A,n,r,a)|0&&X0(27795,27538,697,27747),Sn(z0),Sn(a),v=(i0|0)==0?0:1/+(i0|0),n=t[z0>>2]|0,$=v*+((t[a>>2]|0)-n|0),K=z0+4|0,r=t[K>>2]|0,u0=v*+((t[a+4>>2]|0)-r|0),s0=z0+8|0,o=t[s0>>2]|0,v=v*+((t[a+8>>2]|0)-o|0),t[O0>>2]=n,E=O0+4|0,t[E>>2]=r,_=O0+8|0,t[_>>2]=o;A:do if((i0|0)<0)o=0;else for(I=0,P=0;;){d=+(P>>>0)+4294967296*+(I|0),rA=$*d+ +(n|0),c=u0*d+ +(r|0),d=v*d+ +(o|0),n=~~+It(+rA),a=~~+It(+c),o=~~+It(+d),rA=+lA(+(+(n|0)-rA)),c=+lA(+(+(a|0)-c)),d=+lA(+(+(o|0)-d));do if(rA>c&rA>d)n=0-(a+o)|0,r=a;else if(p=0-n|0,c>d){r=p-o|0;break}else{r=a,o=p-a|0;break}while(!1);if(t[O0>>2]=n,t[E>>2]=r,t[_>>2]=o,di(O0),o=Qn(e,A,O0,i+(P<<3)|0)|0,o|0)break A;if(!((I|0)<(W|0)|(I|0)==(W|0)&P>>>0<i0>>>0)){o=0;break A}n=$0(P|0,I|0,1,0)|0,r=j()|0,I=r,P=n,n=t[z0>>2]|0,r=t[K>>2]|0,o=t[s0>>2]|0}while(!1);return O0=o,w=N0,O0|0}return O0=o,w=N0,O0|0}function ze(e,A,n,r){e=e|0,A=A|0,n=n|0,r=r|0;var i=0,o=0,a=0;if((n|0)==0&(r|0)==0)return i=0,o=1,nA(i|0),o|0;o=e,i=A,e=1,A=0;do a=(n&1|0)==0&!0,e=TA((a?1:o)|0,(a?0:i)|0,e|0,A|0)|0,A=j()|0,n=tr(n|0,r|0,1)|0,r=j()|0,o=TA(o|0,i|0,o|0,i|0)|0,i=j()|0;while(!((n|0)==0&(r|0)==0));return nA(A|0),e|0}function b1(e,A,n,r){e=e|0,A=A|0,n=n|0,r=r|0;var i=0,o=0,a=0,c=0,d=0,p=0,v=0;c=w,w=w+16|0,o=c,a=C0(e|0,A|0,52)|0,j()|0,a=a&15;do if(a){if(i=Ze(e,A,o)|0,!i){p=+k[o>>3],d=1/+mA(+p),v=+k[25968+(a<<3)>>3],k[n>>3]=p+v,k[n+8>>3]=p-v,p=+k[o+8>>3],d=v*d,k[n+16>>3]=d+p,k[n+24>>3]=p-d;break}return a=i,w=c,a|0}else{if(i=C0(e|0,A|0,45)|0,j()|0,i=i&127,i>>>0>121)return a=5,w=c,a|0;o=22064+(i<<5)|0,t[n>>2]=t[o>>2],t[n+4>>2]=t[o+4>>2],t[n+8>>2]=t[o+8>>2],t[n+12>>2]=t[o+12>>2],t[n+16>>2]=t[o+16>>2],t[n+20>>2]=t[o+20>>2],t[n+24>>2]=t[o+24>>2],t[n+28>>2]=t[o+28>>2];break}while(!1);return ii(n,r?1.4:1.1),r=26096+(a<<3)|0,(t[r>>2]|0)==(e|0)&&(t[r+4>>2]|0)==(A|0)&&(k[n>>3]=1.5707963267948966),a=26224+(a<<3)|0,(t[a>>2]|0)==(e|0)&&(t[a+4>>2]|0)==(A|0)&&(k[n+8>>3]=-1.5707963267948966),+k[n>>3]!=1.5707963267948966&&+k[n+8>>3]!=-1.5707963267948966?(a=0,w=c,a|0):(k[n+16>>3]=3.141592653589793,k[n+24>>3]=-3.141592653589793,a=0,w=c,a|0)}function oo(e,A,n,r){e=e|0,A=A|0,n=n|0,r=r|0;var i=0,o=0,a=0,c=0,d=0,p=0,v=0;p=w,w=w+48|0,a=p+32|0,o=p+40|0,c=p,f1(a,0,0,0),d=t[a>>2]|0,a=t[a+4>>2]|0;do if(n>>>0<=15){if(i=vt(r)|0,i|0){r=c,t[r>>2]=0,t[r+4>>2]=0,t[c+8>>2]=i,t[c+12>>2]=-1,r=c+16|0,d=c+29|0,t[r>>2]=0,t[r+4>>2]=0,t[r+8>>2]=0,m0[r+12>>0]=0,m0[d>>0]=m0[o>>0]|0,m0[d+1>>0]=m0[o+1>>0]|0,m0[d+2>>0]=m0[o+2>>0]|0;break}if(i=qA((t[A+8>>2]|0)+1|0,32)|0,i){w1(A,i),v=c,t[v>>2]=d,t[v+4>>2]=a,t[c+8>>2]=0,t[c+12>>2]=n,t[c+16>>2]=r,t[c+20>>2]=A,t[c+24>>2]=i,m0[c+28>>0]=0,d=c+29|0,m0[d>>0]=m0[o>>0]|0,m0[d+1>>0]=m0[o+1>>0]|0,m0[d+2>>0]=m0[o+2>>0]|0;break}else{r=c,t[r>>2]=0,t[r+4>>2]=0,t[c+8>>2]=13,t[c+12>>2]=-1,r=c+16|0,d=c+29|0,t[r>>2]=0,t[r+4>>2]=0,t[r+8>>2]=0,m0[r+12>>0]=0,m0[d>>0]=m0[o>>0]|0,m0[d+1>>0]=m0[o+1>>0]|0,m0[d+2>>0]=m0[o+2>>0]|0;break}}else d=c,t[d>>2]=0,t[d+4>>2]=0,t[c+8>>2]=4,t[c+12>>2]=-1,d=c+16|0,v=c+29|0,t[d>>2]=0,t[d+4>>2]=0,t[d+8>>2]=0,m0[d+12>>0]=0,m0[v>>0]=m0[o>>0]|0,m0[v+1>>0]=m0[o+1>>0]|0,m0[v+2>>0]=m0[o+2>>0]|0;while(!1);Bt(c),t[e>>2]=t[c>>2],t[e+4>>2]=t[c+4>>2],t[e+8>>2]=t[c+8>>2],t[e+12>>2]=t[c+12>>2],t[e+16>>2]=t[c+16>>2],t[e+20>>2]=t[c+20>>2],t[e+24>>2]=t[c+24>>2],t[e+28>>2]=t[c+28>>2],w=p}function Bt(e){e=e|0;var A=0,n=0,r=0,i=0,o=0,a=0,c=0,d=0,p=0,v=0,E=0,_=0,I=0,P=0,$=0,K=0,u0=0,s0=0,i0=0,W=0;if(W=w,w=w+336|0,I=W+168|0,P=W,r=e,n=t[r>>2]|0,r=t[r+4>>2]|0,(n|0)==0&(r|0)==0){w=W;return}if(A=e+28|0,m0[A>>0]|0?(n=On(n,r)|0,r=j()|0):m0[A>>0]=1,i0=e+20|0,!(t[t[i0>>2]>>2]|0)){A=e+24|0,n=t[A>>2]|0,n|0&&W0(n),s0=e,t[s0>>2]=0,t[s0+4>>2]=0,t[e+8>>2]=0,t[i0>>2]=0,t[e+12>>2]=-1,t[e+16>>2]=0,t[A>>2]=0,w=W;return}s0=e+16|0,A=t[s0>>2]|0,i=A&15;A:do if((n|0)==0&(r|0)==0)u0=e+24|0;else{$=e+12|0,E=(i|0)==3,v=A&255,d=(i|1|0)==3,_=e+24|0,p=(i+-1|0)>>>0<3,a=(i|2|0)==3,c=P+8|0;e:for(;;){if(o=C0(n|0,r|0,52)|0,j()|0,o=o&15,(o|0)==(t[$>>2]|0)){switch(v&15){case 0:case 2:case 3:{if(i=Ze(n,r,I)|0,i|0){K=15;break e}if(L1(t[i0>>2]|0,t[_>>2]|0,I)|0){K=19;break e}break}}if(d&&(i=t[(t[i0>>2]|0)+4>>2]|0,t[I>>2]=t[i>>2],t[I+4>>2]=t[i+4>>2],t[I+8>>2]=t[i+8>>2],t[I+12>>2]=t[i+12>>2],i1(26832,I)|0)){if(g1(t[(t[i0>>2]|0)+4>>2]|0,o,P)|0){K=25;break}if(i=P,(t[i>>2]|0)==(n|0)&&(t[i+4>>2]|0)==(r|0)){K=29;break}}if(p){if(i=At(n,r,I)|0,i|0){K=32;break}if(b1(n,r,P,0)|0){K=36;break}if(a&&$n(t[i0>>2]|0,t[_>>2]|0,I,P)|0){K=42;break}if(d&&Wn(t[i0>>2]|0,t[_>>2]|0,I,P)|0){K=42;break}}if(E){if(A=b1(n,r,I,1)|0,i=t[_>>2]|0,A|0){K=45;break}if(o1(i,I)|0){if(bn(P,I),xn(I,t[_>>2]|0)|0){K=53;break}if(L1(t[i0>>2]|0,t[_>>2]|0,c)|0){K=53;break}if(Wn(t[i0>>2]|0,t[_>>2]|0,P,I)|0){K=53;break}}}}do if((o|0)<(t[$>>2]|0)){if(A=b1(n,r,I,1)|0,i=t[_>>2]|0,A|0){K=58;break e}if(!(o1(i,I)|0)){K=73;break}if(xn(t[_>>2]|0,I)|0&&(bn(P,I),$n(t[i0>>2]|0,t[_>>2]|0,P,I)|0)){K=65;break e}if(n=In(n,r,o+1|0,P)|0,n|0){K=67;break e}r=P,n=t[r>>2]|0,r=t[r+4>>2]|0}else K=73;while(!1);if((K|0)==73&&(K=0,n=On(n,r)|0,r=j()|0),(n|0)==0&(r|0)==0){u0=_;break A}}switch(K|0){case 15:{A=t[_>>2]|0,A|0&&W0(A),K=e,t[K>>2]=0,t[K+4>>2]=0,t[i0>>2]=0,t[$>>2]=-1,t[s0>>2]=0,t[_>>2]=0,t[e+8>>2]=i,K=20;break}case 19:{t[e>>2]=n,t[e+4>>2]=r,K=20;break}case 25:{X0(27795,27761,470,27772);break}case 29:{t[e>>2]=n,t[e+4>>2]=r,w=W;return}case 32:{A=t[_>>2]|0,A|0&&W0(A),u0=e,t[u0>>2]=0,t[u0+4>>2]=0,t[i0>>2]=0,t[$>>2]=-1,t[s0>>2]=0,t[_>>2]=0,t[e+8>>2]=i,w=W;return}case 36:{X0(27795,27761,493,27772);break}case 42:{t[e>>2]=n,t[e+4>>2]=r,w=W;return}case 45:{i|0&&W0(i),K=e,t[K>>2]=0,t[K+4>>2]=0,t[i0>>2]=0,t[$>>2]=-1,t[s0>>2]=0,t[_>>2]=0,t[e+8>>2]=A,K=55;break}case 53:{t[e>>2]=n,t[e+4>>2]=r,K=55;break}case 58:{i|0&&W0(i),K=e,t[K>>2]=0,t[K+4>>2]=0,t[i0>>2]=0,t[$>>2]=-1,t[s0>>2]=0,t[_>>2]=0,t[e+8>>2]=A,K=71;break}case 65:{t[e>>2]=n,t[e+4>>2]=r,K=71;break}case 67:{A=t[_>>2]|0,A|0&&W0(A),u0=e,t[u0>>2]=0,t[u0+4>>2]=0,t[i0>>2]=0,t[$>>2]=-1,t[s0>>2]=0,t[_>>2]=0,t[e+8>>2]=n,w=W;return}}if((K|0)==20){w=W;return}else if((K|0)==55){w=W;return}else if((K|0)==71){w=W;return}}while(!1);A=t[u0>>2]|0,A|0&&W0(A),K=e,t[K>>2]=0,t[K+4>>2]=0,t[e+8>>2]=0,t[i0>>2]=0,t[e+12>>2]=-1,t[s0>>2]=0,t[u0>>2]=0,w=W}function On(e,A){e=e|0,A=A|0;var n=0,r=0,i=0,o=0,a=0,c=0,d=0,p=0,v=0,E=0;E=w,w=w+16|0,v=E,r=C0(e|0,A|0,52)|0,j()|0,r=r&15,n=C0(e|0,A|0,45)|0,j()|0;do if(r){for(;n=k0(r+4095|0,0,52)|0,i=j()|0|A&-15728641,o=(15-r|0)*3|0,a=k0(7,0,o|0)|0,c=j()|0,n=n|e|a,i=i|c,d=C0(e|0,A|0,o|0)|0,j()|0,d=d&7,r=r+-1|0,!(d>>>0<6);)if(r)A=i,e=n;else{p=4;break}if((p|0)==4){n=C0(n|0,i|0,45)|0,j()|0;break}return v=(d|0)==0&(LA(n,i)|0)!=0,v=k0((v?2:1)+d|0,0,o|0)|0,p=j()|0|A&~c,v=v|e&~a,nA(p|0),w=E,v|0}while(!1);return n=n&127,n>>>0>120?(p=0,v=0,nA(p|0),w=E,v|0):(f1(v,0,n+1|0,0),p=t[v+4>>2]|0,v=t[v>>2]|0,nA(p|0),w=E,v|0)}function so(e,A,n,r,i,o){e=e|0,A=A|0,n=n|0,r=r|0,i=i|0,o=o|0;var a=0,c=0,d=0,p=0,v=0,E=0,_=0,I=0,P=0,$=0,K=0;K=w,w=w+160|0,E=K+80|0,c=K+64|0,_=K+112|0,$=K,oo(E,e,A,n),p=E,C1(c,t[p>>2]|0,t[p+4>>2]|0,A),p=c,d=t[p>>2]|0,p=t[p+4>>2]|0,a=t[E+8>>2]|0,I=_+4|0,t[I>>2]=t[E>>2],t[I+4>>2]=t[E+4>>2],t[I+8>>2]=t[E+8>>2],t[I+12>>2]=t[E+12>>2],t[I+16>>2]=t[E+16>>2],t[I+20>>2]=t[E+20>>2],t[I+24>>2]=t[E+24>>2],t[I+28>>2]=t[E+28>>2],I=$,t[I>>2]=d,t[I+4>>2]=p,I=$+8|0,t[I>>2]=a,e=$+12|0,A=_,n=e+36|0;do t[e>>2]=t[A>>2],e=e+4|0,A=A+4|0;while((e|0)<(n|0));if(_=$+48|0,t[_>>2]=t[c>>2],t[_+4>>2]=t[c+4>>2],t[_+8>>2]=t[c+8>>2],t[_+12>>2]=t[c+12>>2],(d|0)==0&(p|0)==0)return $=a,w=K,$|0;n=$+16|0,v=$+24|0,E=$+28|0,a=0,c=0,A=d,e=p;do{if(!((a|0)<(i|0)|(a|0)==(i|0)&c>>>0<r>>>0)){P=4;break}if(p=c,c=$0(c|0,a|0,1,0)|0,a=j()|0,p=o+(p<<3)|0,t[p>>2]=A,t[p+4>>2]=e,v1(_),e=_,A=t[e>>2]|0,e=t[e+4>>2]|0,(A|0)==0&(e|0)==0){if(Bt(n),A=n,e=t[A>>2]|0,A=t[A+4>>2]|0,(e|0)==0&(A|0)==0){P=10;break}Tn(e,A,t[E>>2]|0,_),e=_,A=t[e>>2]|0,e=t[e+4>>2]|0}p=$,t[p>>2]=A,t[p+4>>2]=e}while(!((A|0)==0&(e|0)==0));return(P|0)==4?(e=$+40|0,A=t[e>>2]|0,A|0&&W0(A),P=$+16|0,t[P>>2]=0,t[P+4>>2]=0,t[v>>2]=0,t[$+36>>2]=0,t[E>>2]=-1,t[$+32>>2]=0,t[e>>2]=0,Tn(0,0,0,_),t[$>>2]=0,t[$+4>>2]=0,t[I>>2]=0,$=14,w=K,$|0):((P|0)==10&&(t[$>>2]=0,t[$+4>>2]=0,t[I>>2]=t[v>>2]),$=t[I>>2]|0,w=K,$|0)}function lo(e,A,n,r){e=e|0,A=A|0,n=n|0,r=r|0;var i=0,o=0,a=0,c=0,d=0,p=0,v=0,E=0,_=0,I=0;if(E=w,w=w+48|0,d=E+32|0,c=E+40|0,p=E,!(t[e>>2]|0))return v=r,t[v>>2]=0,t[v+4>>2]=0,v=0,w=E,v|0;f1(d,0,0,0),a=d,i=t[a>>2]|0,a=t[a+4>>2]|0;do if(A>>>0>15)v=p,t[v>>2]=0,t[v+4>>2]=0,t[p+8>>2]=4,t[p+12>>2]=-1,v=p+16|0,n=p+29|0,t[v>>2]=0,t[v+4>>2]=0,t[v+8>>2]=0,m0[v+12>>0]=0,m0[n>>0]=m0[c>>0]|0,m0[n+1>>0]=m0[c+1>>0]|0,m0[n+2>>0]=m0[c+2>>0]|0,n=4,v=9;else{if(n=vt(n)|0,n|0){d=p,t[d>>2]=0,t[d+4>>2]=0,t[p+8>>2]=n,t[p+12>>2]=-1,d=p+16|0,v=p+29|0,t[d>>2]=0,t[d+4>>2]=0,t[d+8>>2]=0,m0[d+12>>0]=0,m0[v>>0]=m0[c>>0]|0,m0[v+1>>0]=m0[c+1>>0]|0,m0[v+2>>0]=m0[c+2>>0]|0,v=9;break}if(n=qA((t[e+8>>2]|0)+1|0,32)|0,!n){v=p,t[v>>2]=0,t[v+4>>2]=0,t[p+8>>2]=13,t[p+12>>2]=-1,v=p+16|0,n=p+29|0,t[v>>2]=0,t[v+4>>2]=0,t[v+8>>2]=0,m0[v+12>>0]=0,m0[n>>0]=m0[c>>0]|0,m0[n+1>>0]=m0[c+1>>0]|0,m0[n+2>>0]=m0[c+2>>0]|0,n=13,v=9;break}w1(e,n),I=p,t[I>>2]=i,t[I+4>>2]=a,a=p+8|0,t[a>>2]=0,t[p+12>>2]=A,t[p+20>>2]=e,t[p+24>>2]=n,m0[p+28>>0]=0,i=p+29|0,m0[i>>0]=m0[c>>0]|0,m0[i+1>>0]=m0[c+1>>0]|0,m0[i+2>>0]=m0[c+2>>0]|0,t[p+16>>2]=3,_=+ti(n),_=_*+ei(n),o=+lA(+ +k[n>>3]),o=_/+mA(+ +_t(+o,+ +lA(+ +k[n+8>>3])))*6371.007180918475*6371.007180918475,i=p+12|0,n=t[i>>2]|0;A:do if((n|0)>0)do{if(Fn(n+-1|0,d)|0,!(o/+k[d>>3]>10))break A;I=t[i>>2]|0,n=I+-1|0,t[i>>2]=n}while((I|0)>1);while(!1);if(Bt(p),i=r,t[i>>2]=0,t[i+4>>2]=0,i=p,n=t[i>>2]|0,i=t[i+4>>2]|0,!((n|0)==0&(i|0)==0))do gt(n,i,A,d)|0,c=d,e=r,c=$0(t[e>>2]|0,t[e+4>>2]|0,t[c>>2]|0,t[c+4>>2]|0)|0,e=j()|0,I=r,t[I>>2]=c,t[I+4>>2]=e,Bt(p),I=p,n=t[I>>2]|0,i=t[I+4>>2]|0;while(!((n|0)==0&(i|0)==0));n=t[a>>2]|0}while(!1);return I=n,w=E,I|0}function Ct(e,A,n){e=e|0,A=A|0,n=n|0;var r=0,i=0,o=0,a=0,c=0,d=0,p=0,v=0,E=0,_=0;if(!(i1(A,n)|0)||(A=vn(A)|0,r=+k[n>>3],i=+k[n+8>>3],i=A&i<0?i+6.283185307179586:i,_=t[e>>2]|0,(_|0)<=0))return _=0,_|0;if(E=t[e+4>>2]|0,A){A=0,v=i,n=-1,e=0;A:for(;;){for(p=e;a=+k[E+(p<<4)>>3],i=+k[E+(p<<4)+8>>3],e=(n+2|0)%(_|0)|0,o=+k[E+(e<<4)>>3],c=+k[E+(e<<4)+8>>3],a>o?(d=a,a=c):(d=o,o=a,a=i,i=c),r=r==o|r==d?r+2220446049250313e-31:r,!!(r<o|r>d);)if(n=p+1|0,(n|0)>=(_|0)){n=22;break A}else e=p,p=n,n=e;if(c=a<0?a+6.283185307179586:a,a=i<0?i+6.283185307179586:i,v=c==v|a==v?v+-2220446049250313e-31:v,d=c+(a-c)*((r-o)/(d-o)),(d<0?d+6.283185307179586:d)>v&&(A=A^1),e=p+1|0,(e|0)>=(_|0)){n=22;break}else n=p}if((n|0)==22)return A|0}else{A=0,v=i,n=-1,e=0;A:for(;;){for(p=e;a=+k[E+(p<<4)>>3],i=+k[E+(p<<4)+8>>3],e=(n+2|0)%(_|0)|0,o=+k[E+(e<<4)>>3],c=+k[E+(e<<4)+8>>3],a>o?(d=a,a=c):(d=o,o=a,a=i,i=c),r=r==o|r==d?r+2220446049250313e-31:r,!!(r<o|r>d);)if(n=p+1|0,(n|0)>=(_|0)){n=22;break A}else e=p,p=n,n=e;if(v=a==v|i==v?v+-2220446049250313e-31:v,a+(i-a)*((r-o)/(d-o))>v&&(A=A^1),e=p+1|0,(e|0)>=(_|0)){n=22;break}else n=p}if((n|0)==22)return A|0}return 0}function Un(e,A){e=e|0,A=A|0;var n=0,r=0,i=0,o=0,a=0,c=0,d=0,p=0,v=0,E=0,_=0,I=0,P=0,$=0,K=0,u0=0,s0=0;if(P=t[e>>2]|0,!P){t[A>>2]=0,t[A+4>>2]=0,t[A+8>>2]=0,t[A+12>>2]=0,t[A+16>>2]=0,t[A+20>>2]=0,t[A+24>>2]=0,t[A+28>>2]=0;return}if($=A+8|0,k[$>>3]=17976931348623157e292,K=A+24|0,k[K>>3]=17976931348623157e292,k[A>>3]=-17976931348623157e292,u0=A+16|0,k[u0>>3]=-17976931348623157e292,!((P|0)<=0)){for(_=t[e+4>>2]|0,p=17976931348623157e292,v=-17976931348623157e292,E=0,e=-1,o=17976931348623157e292,a=17976931348623157e292,d=-17976931348623157e292,r=-17976931348623157e292,I=0;n=+k[_+(I<<4)>>3],c=+k[_+(I<<4)+8>>3],e=e+2|0,i=+k[_+(((e|0)==(P|0)?0:e)<<4)+8>>3],n<o&&(k[$>>3]=n,o=n),c<a&&(k[K>>3]=c,a=c),n>d?k[A>>3]=n:n=d,c>r&&(k[u0>>3]=c,r=c),p=c>0&c<p?c:p,v=c<0&c>v?c:v,E=E|+lA(+(c-i))>3.141592653589793,e=I+1|0,(e|0)!=(P|0);)s0=I,d=n,I=e,e=s0;E&&(k[u0>>3]=v,k[K>>3]=p)}}function vt(e){return e=e|0,(e>>>0<4?0:15)|0}function w1(e,A){e=e|0,A=A|0;var n=0,r=0,i=0,o=0,a=0,c=0,d=0,p=0,v=0,E=0,_=0,I=0,P=0,$=0,K=0,u0=0,s0=0,i0=0,W=0,z0=0,O0=0,N0=0;if(P=t[e>>2]|0,P){if($=A+8|0,k[$>>3]=17976931348623157e292,K=A+24|0,k[K>>3]=17976931348623157e292,k[A>>3]=-17976931348623157e292,u0=A+16|0,k[u0>>3]=-17976931348623157e292,(P|0)>0){for(i=t[e+4>>2]|0,_=17976931348623157e292,I=-17976931348623157e292,r=0,n=-1,d=17976931348623157e292,p=17976931348623157e292,E=-17976931348623157e292,a=-17976931348623157e292,s0=0;o=+k[i+(s0<<4)>>3],v=+k[i+(s0<<4)+8>>3],O0=n+2|0,c=+k[i+(((O0|0)==(P|0)?0:O0)<<4)+8>>3],o<d&&(k[$>>3]=o,d=o),v<p&&(k[K>>3]=v,p=v),o>E?k[A>>3]=o:o=E,v>a&&(k[u0>>3]=v,a=v),_=v>0&v<_?v:_,I=v<0&v>I?v:I,r=r|+lA(+(v-c))>3.141592653589793,n=s0+1|0,(n|0)!=(P|0);)O0=s0,E=o,s0=n,n=O0;r&&(k[u0>>3]=I,k[K>>3]=_)}}else t[A>>2]=0,t[A+4>>2]=0,t[A+8>>2]=0,t[A+12>>2]=0,t[A+16>>2]=0,t[A+20>>2]=0,t[A+24>>2]=0,t[A+28>>2]=0;if(O0=e+8|0,n=t[O0>>2]|0,!((n|0)<=0)){z0=e+12|0,W=0;do if(i=t[z0>>2]|0,r=W,W=W+1|0,K=A+(W<<5)|0,u0=t[i+(r<<3)>>2]|0,u0){if(s0=A+(W<<5)+8|0,k[s0>>3]=17976931348623157e292,e=A+(W<<5)+24|0,k[e>>3]=17976931348623157e292,k[K>>3]=-17976931348623157e292,i0=A+(W<<5)+16|0,k[i0>>3]=-17976931348623157e292,(u0|0)>0){for(P=t[i+(r<<3)+4>>2]|0,_=17976931348623157e292,I=-17976931348623157e292,i=0,r=-1,$=0,d=17976931348623157e292,p=17976931348623157e292,v=-17976931348623157e292,a=-17976931348623157e292;o=+k[P+($<<4)>>3],E=+k[P+($<<4)+8>>3],r=r+2|0,c=+k[P+(((r|0)==(u0|0)?0:r)<<4)+8>>3],o<d&&(k[s0>>3]=o,d=o),E<p&&(k[e>>3]=E,p=E),o>v?k[K>>3]=o:o=v,E>a&&(k[i0>>3]=E,a=E),_=E>0&E<_?E:_,I=E<0&E>I?E:I,i=i|+lA(+(E-c))>3.141592653589793,r=$+1|0,(r|0)!=(u0|0);)N0=$,$=r,v=o,r=N0;i&&(k[i0>>3]=I,k[e>>3]=_)}}else t[K>>2]=0,t[K+4>>2]=0,t[K+8>>2]=0,t[K+12>>2]=0,t[K+16>>2]=0,t[K+20>>2]=0,t[K+24>>2]=0,t[K+28>>2]=0,n=t[O0>>2]|0;while((W|0)<(n|0))}}function L1(e,A,n){e=e|0,A=A|0,n=n|0;var r=0,i=0,o=0;if(!(Ct(e,A,n)|0))return i=0,i|0;if(i=e+8|0,(t[i>>2]|0)<=0)return i=1,i|0;for(r=e+12|0,e=0;;){if(o=e,e=e+1|0,Ct((t[r>>2]|0)+(o<<3)|0,A+(e<<5)|0,n)|0){e=0,r=6;break}if((e|0)>=(t[i>>2]|0)){e=1,r=6;break}}return(r|0)==6?e|0:0}function $n(e,A,n,r){e=e|0,A=A|0,n=n|0,r=r|0;var i=0,o=0,a=0,c=0,d=0,p=0,v=0;if(p=w,w=w+16|0,c=p,a=n+8|0,!(Ct(e,A,a)|0))return d=0,w=p,d|0;d=e+8|0;A:do if((t[d>>2]|0)>0){for(o=e+12|0,i=0;;){if(v=i,i=i+1|0,Ct((t[o>>2]|0)+(v<<3)|0,A+(i<<5)|0,a)|0){i=0;break}if((i|0)>=(t[d>>2]|0))break A}return w=p,i|0}while(!1);if(Vt(e,A,n,r)|0)return v=0,w=p,v|0;t[c>>2]=t[n>>2],t[c+4>>2]=a,i=t[d>>2]|0;A:do if((i|0)>0)for(e=e+12|0,a=0,o=i;;){if(i=t[e>>2]|0,(t[i+(a<<3)>>2]|0)>0){if(Ct(c,r,t[i+(a<<3)+4>>2]|0)|0){i=0;break A}if(i=a+1|0,Vt((t[e>>2]|0)+(a<<3)|0,A+(i<<5)|0,n,r)|0){i=0;break A}o=t[d>>2]|0}else i=a+1|0;if((i|0)<(o|0))a=i;else{i=1;break}}else i=1;while(!1);return v=i,w=p,v|0}function Vt(e,A,n,r){e=e|0,A=A|0,n=n|0,r=r|0;var i=0,o=0,a=0,c=0,d=0,p=0,v=0,E=0,_=0,I=0,P=0,$=0,K=0,u0=0,s0=0,i0=0,W=0,z0=0,O0=0,N0=0,rA=0;if(O0=w,w=w+176|0,s0=O0+172|0,i=O0+168|0,i0=O0,!(o1(A,r)|0))return e=0,w=O0,e|0;if(ni(A,r,s0,i),rt(i0|0,n|0,168)|0,(t[n>>2]|0)>0){A=0;do N0=i0+8+(A<<4)+8|0,u0=+te(+k[N0>>3],t[i>>2]|0),k[N0>>3]=u0,A=A+1|0;while((A|0)<(t[n>>2]|0))}$=+k[r>>3],K=+k[r+8>>3],u0=+te(+k[r+16>>3],t[i>>2]|0),I=+te(+k[r+24>>3],t[i>>2]|0);A:do if((t[e>>2]|0)>0){if(r=e+4|0,i=t[i0>>2]|0,(i|0)<=0){for(A=0;;)if(A=A+1|0,(A|0)>=(t[e>>2]|0)){A=0;break A}}for(n=0;;){if(A=t[r>>2]|0,_=+k[A+(n<<4)>>3],P=+te(+k[A+(n<<4)+8>>3],t[s0>>2]|0),A=t[r>>2]|0,n=n+1|0,N0=(n|0)%(t[e>>2]|0)|0,o=+k[A+(N0<<4)>>3],a=+te(+k[A+(N0<<4)+8>>3],t[s0>>2]|0),!(_>=$)|!(o>=$)&&!(_<=K)|!(o<=K)&&!(P<=I)|!(a<=I)&&!(P>=u0)|!(a>=u0)){E=o-_,p=a-P,A=0;do if(rA=A,A=A+1|0,N0=(A|0)==(i|0)?0:A,o=+k[i0+8+(rA<<4)+8>>3],a=+k[i0+8+(N0<<4)+8>>3]-o,c=+k[i0+8+(rA<<4)>>3],d=+k[i0+8+(N0<<4)>>3]-c,v=E*a-p*d,v!=0&&(W=P-o,z0=_-c,d=(W*d-a*z0)/v,!(d<0|d>1))&&(v=(E*W-p*z0)/v,v>=0&v<=1)){A=1;break A}while((A|0)<(i|0))}if((n|0)>=(t[e>>2]|0)){A=0;break}}}else A=0;while(!1);return rA=A,w=O0,rA|0}function Wn(e,A,n,r){e=e|0,A=A|0,n=n|0,r=r|0;var i=0,o=0,a=0;if(Vt(e,A,n,r)|0)return o=1,o|0;if(o=e+8|0,(t[o>>2]|0)<=0)return o=0,o|0;for(i=e+12|0,e=0;;){if(a=e,e=e+1|0,Vt((t[i>>2]|0)+(a<<3)|0,A+(e<<5)|0,n,r)|0){e=1,i=6;break}if((e|0)>=(t[o>>2]|0)){e=0,i=6;break}}return(i|0)==6?e|0:0}function ao(){return 8}function co(){return 16}function uo(){return 168}function fo(){return 8}function ho(){return 16}function po(){return 12}function go(){return 8}function mo(e){return e=e|0,+(+((t[e>>2]|0)>>>0)+4294967296*+(t[e+4>>2]|0))}function yo(e){e=e|0;var A=0,n=0;return n=+k[e>>3],A=+k[e+8>>3],+ +gA(+(n*n+A*A))}function Gn(e,A,n,r,i){e=e|0,A=A|0,n=n|0,r=r|0,i=i|0;var o=0,a=0,c=0,d=0,p=0,v=0,E=0,_=0;p=+k[e>>3],d=+k[A>>3]-p,c=+k[e+8>>3],a=+k[A+8>>3]-c,E=+k[n>>3],o=+k[r>>3]-E,_=+k[n+8>>3],v=+k[r+8>>3]-_,o=(o*(c-_)-(p-E)*v)/(d*v-a*o),k[i>>3]=p+d*o,k[i+8>>3]=c+a*o}function Yn(e,A){return e=e|0,A=A|0,+lA(+(+k[e>>3]-+k[A>>3]))<11920928955078125e-23?(A=+lA(+(+k[e+8>>3]-+k[A+8>>3]))<11920928955078125e-23,A|0):(A=0,A|0)}function BA(e,A){e=e|0,A=A|0;var n=0,r=0,i=0;return i=+k[e>>3]-+k[A>>3],r=+k[e+8>>3]-+k[A+8>>3],n=+k[e+16>>3]-+k[A+16>>3],+(i*i+r*r+n*n)}function Co(e,A){e=e|0,A=A|0;var n=0,r=0,i=0;n=+k[e>>3],r=+mA(+n),n=+aA(+n),k[A+16>>3]=n,n=+k[e+8>>3],i=r*+mA(+n),k[A>>3]=i,n=r*+aA(+n),k[A+8>>3]=n}function vo(e,A,n){e=e|0,A=A|0,n=n|0;var r=0,i=0,o=0;if(o=w,w=w+16|0,i=o,r=LA(e,A)|0,(n+-1|0)>>>0>5||(r=(r|0)!=0,(n|0)==1&r))return i=-1,w=o,i|0;do if(xt(e,A,i)|0)r=-1;else if(r){r=((t[26352+(n<<2)>>2]|0)+5-(t[i>>2]|0)|0)%5|0;break}else{r=((t[26384+(n<<2)>>2]|0)+6-(t[i>>2]|0)|0)%6|0;break}while(!1);return i=r,w=o,i|0}function xt(e,A,n){e=e|0,A=A|0,n=n|0;var r=0,i=0,o=0,a=0,c=0,d=0,p=0,v=0;if(v=w,w=w+32|0,c=v+16|0,d=v,r=Ke(e,A,c)|0,r|0)return n=r,w=v,n|0;o=Vn(e,A)|0,p=YA(e,A)|0,X2(o,d),r=J2(o,t[c>>2]|0)|0;do if(EA(o)|0){do switch(o|0){case 4:{i=0;break}case 14:{i=1;break}case 24:{i=2;break}case 38:{i=3;break}case 49:{i=4;break}case 58:{i=5;break}case 63:{i=6;break}case 72:{i=7;break}case 83:{i=8;break}case 97:{i=9;break}case 107:{i=10;break}case 117:{i=11;break}default:X0(27795,27797,75,27806)}while(!1);if(a=t[26416+(i*24|0)+8>>2]|0,A=t[26416+(i*24|0)+16>>2]|0,e=t[c>>2]|0,(e|0)!=(t[d>>2]|0)&&(d=t1(o)|0,e=t[c>>2]|0,d|(e|0)==(A|0)&&(r=(r+1|0)%6|0)),(p|0)==3&(e|0)==(A|0)){r=(r+5|0)%6|0;break}(p|0)==5&(e|0)==(a|0)&&(r=(r+1|0)%6|0)}while(!1);return t[n>>2]=r,n=0,w=v,n|0}function ae(e,A,n,r){e=e|0,A=A|0,n=n|0,r=r|0;var i=0,o=0,a=0,c=0,d=0,p=0,v=0,E=0,_=0,I=0,P=0,$=0,K=0,u0=0,s0=0,i0=0;if(i0=w,w=w+32|0,s0=i0+24|0,K=i0+20|0,P=i0+8|0,I=i0+16|0,_=i0,d=(LA(e,A)|0)==0,d=d?6:5,v=C0(e|0,A|0,52)|0,j()|0,v=v&15,d>>>0<=n>>>0)return r=2,w=i0,r|0;E=(v|0)==0,!E&&($=k0(7,0,(v^15)*3|0)|0,($&e|0)==0&((j()|0)&A|0)==0)?i=n:o=4;A:do if((o|0)==4){if(i=(LA(e,A)|0)!=0,((i?4:5)|0)<(n|0)||xt(e,A,s0)|0||(o=(t[s0>>2]|0)+n|0,i?i=26704+(((o|0)%5|0)<<2)|0:i=26736+(((o|0)%6|0)<<2)|0,$=t[i>>2]|0,($|0)==7))return r=1,w=i0,r|0;t[K>>2]=0,i=IA(e,A,$,K,P)|0;do if(!i){if(c=P,p=t[c>>2]|0,c=t[c+4>>2]|0,a=c>>>0<A>>>0|(c|0)==(A|0)&p>>>0<e>>>0,o=a?p:e,a=a?c:A,!E&&(E=k0(7,0,(v^15)*3|0)|0,(p&E|0)==0&(c&(j()|0)|0)==0))i=n;else{if(c=(n+-1+d|0)%(d|0)|0,i=LA(e,A)|0,(c|0)<0&&X0(27795,27797,248,27822),d=(i|0)!=0,((d?4:5)|0)<(c|0)&&X0(27795,27797,248,27822),xt(e,A,s0)|0&&X0(27795,27797,248,27822),i=(t[s0>>2]|0)+c|0,d?i=26704+(((i|0)%5|0)<<2)|0:i=26736+(((i|0)%6|0)<<2)|0,c=t[i>>2]|0,(c|0)==7&&X0(27795,27797,248,27822),t[I>>2]=0,i=IA(e,A,c,I,_)|0,i|0)break;p=_,d=t[p>>2]|0,p=t[p+4>>2]|0;do if(p>>>0<a>>>0|(p|0)==(a|0)&d>>>0<o>>>0){if(LA(d,p)|0?o=e1(d,p,e,A)|0:o=t[26800+((((t[I>>2]|0)+(t[26768+(c<<2)>>2]|0)|0)%6|0)<<2)>>2]|0,i=LA(d,p)|0,(o+-1|0)>>>0>5){i=-1,o=d,a=p;break}if(i=(i|0)!=0,(o|0)==1&i){i=-1,o=d,a=p;break}do if(xt(d,p,s0)|0)i=-1;else if(i){i=((t[26352+(o<<2)>>2]|0)+5-(t[s0>>2]|0)|0)%5|0;break}else{i=((t[26384+(o<<2)>>2]|0)+6-(t[s0>>2]|0)|0)%6|0;break}while(!1);o=d,a=p}else i=n;while(!1);c=P,p=t[c>>2]|0,c=t[c+4>>2]|0}if((o|0)==(p|0)&(a|0)==(c|0)){if(d=(LA(p,c)|0)!=0,d?e=e1(p,c,e,A)|0:e=t[26800+((((t[K>>2]|0)+(t[26768+($<<2)>>2]|0)|0)%6|0)<<2)>>2]|0,i=LA(p,c)|0,(e+-1|0)>>>0<=5&&(u0=(i|0)!=0,!((e|0)==1&u0)))do if(xt(p,c,s0)|0)i=-1;else if(u0){i=((t[26352+(e<<2)>>2]|0)+5-(t[s0>>2]|0)|0)%5|0;break}else{i=((t[26384+(e<<2)>>2]|0)+6-(t[s0>>2]|0)|0)%6|0;break}while(!1);else i=-1;i=i+1|0,i=(i|0)==6|d&(i|0)==5?0:i}A=a,e=o;break A}while(!1);return r=i,w=i0,r|0}while(!1);return u0=k0(i|0,0,56)|0,s0=j()|0|A&-2130706433|536870912,t[r>>2]=u0|e,t[r+4>>2]=s0,r=0,w=i0,r|0}function xo(e,A,n){e=e|0,A=A|0,n=n|0;var r=0,i=0,o=0;return o=(LA(e,A)|0)==0,r=ae(e,A,0,n)|0,i=(r|0)==0,o?!i||(r=ae(e,A,1,n+8|0)|0,r|0)||(r=ae(e,A,2,n+16|0)|0,r|0)||(r=ae(e,A,3,n+24|0)|0,r|0)||(r=ae(e,A,4,n+32|0)|0,r)?(o=r,o|0):ae(e,A,5,n+40|0)|0:!i||(r=ae(e,A,1,n+8|0)|0,r|0)||(r=ae(e,A,2,n+16|0)|0,r|0)||(r=ae(e,A,3,n+24|0)|0,r|0)||(r=ae(e,A,4,n+32|0)|0,r|0)?(o=r,o|0):(o=n+40|0,t[o>>2]=0,t[o+4>>2]=0,o=0,o|0)}function bo(e,A,n){e=e|0,A=A|0,n=n|0;var r=0,i=0,o=0,a=0,c=0,d=0;return d=w,w=w+192|0,i=d,o=d+168|0,a=C0(e|0,A|0,56)|0,j()|0,a=a&7,c=A&-2130706433|134217728,r=Ke(e,c,o)|0,r|0?(c=r,w=d,c|0):(A=C0(e|0,A|0,52)|0,j()|0,A=A&15,LA(e,c)|0?a1(o,A,a,1,i):c1(o,A,a,1,i),c=i+8|0,t[n>>2]=t[c>>2],t[n+4>>2]=t[c+4>>2],t[n+8>>2]=t[c+8>>2],t[n+12>>2]=t[c+12>>2],c=0,w=d,c|0)}function qn(e,A){e=e|0,A=A|0;var n=0,r=0,i=0,o=0;return i=w,w=w+16|0,n=i,!(!0&(A&2013265920|0)==536870912)||(r=A&-2130706433|134217728,!(u1(e,r)|0))?(r=0,w=i,r|0):(o=C0(e|0,A|0,56)|0,j()|0,o=(ae(e,r,o&7,n)|0)==0,r=n,r=o&((t[r>>2]|0)==(e|0)?(t[r+4>>2]|0)==(A|0):0)&1,w=i,r|0)}function Xn(e,A,n){e=e|0,A=A|0,n=n|0;var r=0;(A|0)>0?(r=qA(A,4)|0,t[e>>2]=r,r||X0(27835,27858,40,27872)):t[e>>2]=0,t[e+4>>2]=A,t[e+8>>2]=0,t[e+12>>2]=n}function Jn(e){e=e|0;var A=0,n=0,r=0,i=0,o=0,a=0,c=0;i=e+4|0,o=e+12|0,a=e+8|0;A:for(;;){for(n=t[i>>2]|0,A=0;;){if((A|0)>=(n|0))break A;if(r=t[e>>2]|0,c=t[r+(A<<2)>>2]|0,!c)A=A+1|0;else break}A=r+(~~(+lA(+(+ge(10,+ +(15-(t[o>>2]|0)|0))*(+k[c>>3]+ +k[c+8>>3])))%+(n|0))>>>0<<2)|0,n=t[A>>2]|0;e:do if(n|0){if(r=c+32|0,(n|0)==(c|0))t[A>>2]=t[r>>2];else{if(n=n+32|0,A=t[n>>2]|0,!A)break;for(;(A|0)!=(c|0);)if(n=A+32|0,A=t[n>>2]|0,!A)break e;t[n>>2]=t[r>>2]}W0(c),t[a>>2]=(t[a>>2]|0)+-1}while(!1)}W0(t[e>>2]|0)}function Kn(e){e=e|0;var A=0,n=0,r=0;for(r=t[e+4>>2]|0,n=0;;){if((n|0)>=(r|0)){A=0,n=4;break}if(A=t[(t[e>>2]|0)+(n<<2)>>2]|0,!A)n=n+1|0;else{n=4;break}}return(n|0)==4?A|0:0}function Ar(e,A){e=e|0,A=A|0;var n=0,r=0,i=0,o=0;if(n=~~(+lA(+(+ge(10,+ +(15-(t[e+12>>2]|0)|0))*(+k[A>>3]+ +k[A+8>>3])))%+(t[e+4>>2]|0))>>>0,n=(t[e>>2]|0)+(n<<2)|0,r=t[n>>2]|0,!r)return o=1,o|0;o=A+32|0;do if((r|0)!=(A|0)){if(n=t[r+32>>2]|0,!n)return o=1,o|0;for(i=n;;){if((i|0)==(A|0)){i=8;break}if(n=t[i+32>>2]|0,n)r=i,i=n;else{n=1,i=10;break}}if((i|0)==8){t[r+32>>2]=t[o>>2];break}else if((i|0)==10)return n|0}else t[n>>2]=t[o>>2];while(!1);return W0(A),o=e+8|0,t[o>>2]=(t[o>>2]|0)+-1,o=0,o|0}function wo(e,A,n){e=e|0,A=A|0,n=n|0;var r=0,i=0,o=0,a=0;o=me(40)|0,o||X0(27888,27858,98,27901),t[o>>2]=t[A>>2],t[o+4>>2]=t[A+4>>2],t[o+8>>2]=t[A+8>>2],t[o+12>>2]=t[A+12>>2],i=o+16|0,t[i>>2]=t[n>>2],t[i+4>>2]=t[n+4>>2],t[i+8>>2]=t[n+8>>2],t[i+12>>2]=t[n+12>>2],t[o+32>>2]=0,i=~~(+lA(+(+ge(10,+ +(15-(t[e+12>>2]|0)|0))*(+k[A>>3]+ +k[A+8>>3])))%+(t[e+4>>2]|0))>>>0,i=(t[e>>2]|0)+(i<<2)|0,r=t[i>>2]|0;do if(!r)t[i>>2]=o;else{for(;!(et(r,A)|0&&et(r+16|0,n)|0);)if(i=t[r+32>>2]|0,r=(i|0)==0?r:i,!(t[r+32>>2]|0)){a=10;break}if((a|0)==10){t[r+32>>2]=o;break}return W0(o),a=r,a|0}while(!1);return a=e+8|0,t[a>>2]=(t[a>>2]|0)+1,a=o,a|0}function Lo(e,A,n){e=e|0,A=A|0,n=n|0;var r=0,i=0;if(i=~~(+lA(+(+ge(10,+ +(15-(t[e+12>>2]|0)|0))*(+k[A>>3]+ +k[A+8>>3])))%+(t[e+4>>2]|0))>>>0,i=t[(t[e>>2]|0)+(i<<2)>>2]|0,!i)return n=0,n|0;if(!n){for(e=i;;){if(et(e,A)|0){r=10;break}if(e=t[e+32>>2]|0,!e){e=0,r=10;break}}if((r|0)==10)return e|0}for(e=i;;){if(et(e,A)|0&&et(e+16|0,n)|0){r=10;break}if(e=t[e+32>>2]|0,!e){e=0,r=10;break}}return(r|0)==10?e|0:0}function ko(e,A){e=e|0,A=A|0;var n=0;if(n=~~(+lA(+(+ge(10,+ +(15-(t[e+12>>2]|0)|0))*(+k[A>>3]+ +k[A+8>>3])))%+(t[e+4>>2]|0))>>>0,e=t[(t[e>>2]|0)+(n<<2)>>2]|0,!e)return n=0,n|0;for(;;){if(et(e,A)|0){A=5;break}if(e=t[e+32>>2]|0,!e){e=0,A=5;break}}return(A|0)==5?e|0:0}function Mo(){return 27920}function je(e){return e=+e,~~+rr(+e)|0}function me(e){e=e|0;var A=0,n=0,r=0,i=0,o=0,a=0,c=0,d=0,p=0,v=0,E=0,_=0,I=0,P=0,$=0,K=0,u0=0,s0=0,i0=0,W=0,z0=0;z0=w,w=w+16|0,_=z0;do if(e>>>0<245){if(p=e>>>0<11?16:e+11&-8,e=p>>>3,E=t[6981]|0,n=E>>>e,n&3|0)return A=(n&1^1)+e|0,e=27964+(A<<1<<2)|0,n=e+8|0,r=t[n>>2]|0,i=r+8|0,o=t[i>>2]|0,(o|0)==(e|0)?t[6981]=E&~(1<<A):(t[o+12>>2]=e,t[n>>2]=o),W=A<<3,t[r+4>>2]=W|3,W=r+W+4|0,t[W>>2]=t[W>>2]|1,W=i,w=z0,W|0;if(v=t[6983]|0,p>>>0>v>>>0){if(n|0)return A=2<<e,A=n<<e&(A|0-A),A=(A&0-A)+-1|0,c=A>>>12&16,A=A>>>c,n=A>>>5&8,A=A>>>n,o=A>>>2&4,A=A>>>o,e=A>>>1&2,A=A>>>e,r=A>>>1&1,r=(n|c|o|e|r)+(A>>>r)|0,A=27964+(r<<1<<2)|0,e=A+8|0,o=t[e>>2]|0,c=o+8|0,n=t[c>>2]|0,(n|0)==(A|0)?(e=E&~(1<<r),t[6981]=e):(t[n+12>>2]=A,t[e>>2]=n,e=E),W=r<<3,a=W-p|0,t[o+4>>2]=p|3,i=o+p|0,t[i+4>>2]=a|1,t[o+W>>2]=a,v|0&&(r=t[6986]|0,A=v>>>3,n=27964+(A<<1<<2)|0,A=1<<A,e&A?(e=n+8|0,A=t[e>>2]|0):(t[6981]=e|A,A=n,e=n+8|0),t[e>>2]=r,t[A+12>>2]=r,t[r+8>>2]=A,t[r+12>>2]=n),t[6983]=a,t[6986]=i,W=c,w=z0,W|0;if(o=t[6982]|0,o){for(n=(o&0-o)+-1|0,i=n>>>12&16,n=n>>>i,r=n>>>5&8,n=n>>>r,a=n>>>2&4,n=n>>>a,c=n>>>1&2,n=n>>>c,d=n>>>1&1,d=t[28228+((r|i|a|c|d)+(n>>>d)<<2)>>2]|0,n=d,c=d,d=(t[d+4>>2]&-8)-p|0;e=t[n+16>>2]|0,!(!e&&(e=t[n+20>>2]|0,!e));)a=(t[e+4>>2]&-8)-p|0,i=a>>>0<d>>>0,n=e,c=i?e:c,d=i?a:d;if(a=c+p|0,a>>>0>c>>>0){i=t[c+24>>2]|0,A=t[c+12>>2]|0;do if((A|0)==(c|0)){if(e=c+20|0,A=t[e>>2]|0,!A&&(e=c+16|0,A=t[e>>2]|0,!A)){n=0;break}for(;;)if(r=A+20|0,n=t[r>>2]|0,n)A=n,e=r;else if(r=A+16|0,n=t[r>>2]|0,n)A=n,e=r;else break;t[e>>2]=0,n=A}else n=t[c+8>>2]|0,t[n+12>>2]=A,t[A+8>>2]=n,n=A;while(!1);do if(i|0){if(A=t[c+28>>2]|0,e=28228+(A<<2)|0,(c|0)==(t[e>>2]|0)){if(t[e>>2]=n,!n){t[6982]=o&~(1<<A);break}}else if(W=i+16|0,t[((t[W>>2]|0)==(c|0)?W:i+20|0)>>2]=n,!n)break;t[n+24>>2]=i,A=t[c+16>>2]|0,A|0&&(t[n+16>>2]=A,t[A+24>>2]=n),A=t[c+20>>2]|0,A|0&&(t[n+20>>2]=A,t[A+24>>2]=n)}while(!1);return d>>>0<16?(W=d+p|0,t[c+4>>2]=W|3,W=c+W+4|0,t[W>>2]=t[W>>2]|1):(t[c+4>>2]=p|3,t[a+4>>2]=d|1,t[a+d>>2]=d,v|0&&(r=t[6986]|0,A=v>>>3,n=27964+(A<<1<<2)|0,A=1<<A,A&E?(e=n+8|0,A=t[e>>2]|0):(t[6981]=A|E,A=n,e=n+8|0),t[e>>2]=r,t[A+12>>2]=r,t[r+8>>2]=A,t[r+12>>2]=n),t[6983]=d,t[6986]=a),W=c+8|0,w=z0,W|0}else E=p}else E=p}else E=p}else if(e>>>0<=4294967231)if(e=e+11|0,p=e&-8,r=t[6982]|0,r){i=0-p|0,e=e>>>8,e?p>>>0>16777215?d=31:(E=(e+1048320|0)>>>16&8,$=e<<E,c=($+520192|0)>>>16&4,$=$<<c,d=($+245760|0)>>>16&2,d=14-(c|E|d)+($<<d>>>15)|0,d=p>>>(d+7|0)&1|d<<1):d=0,n=t[28228+(d<<2)>>2]|0;A:do if(!n)n=0,e=0,$=61;else for(e=0,c=p<<((d|0)==31?0:25-(d>>>1)|0),o=0;;){if(a=(t[n+4>>2]&-8)-p|0,a>>>0<i>>>0)if(a)e=n,i=a;else{e=n,i=0,$=65;break A}if($=t[n+20>>2]|0,n=t[n+16+(c>>>31<<2)>>2]|0,o=($|0)==0|($|0)==(n|0)?o:$,n)c=c<<1;else{n=o,$=61;break}}while(!1);if(($|0)==61){if((n|0)==0&(e|0)==0){if(e=2<<d,e=(e|0-e)&r,!e){E=p;break}E=(e&0-e)+-1|0,a=E>>>12&16,E=E>>>a,o=E>>>5&8,E=E>>>o,c=E>>>2&4,E=E>>>c,d=E>>>1&2,E=E>>>d,n=E>>>1&1,e=0,n=t[28228+((o|a|c|d|n)+(E>>>n)<<2)>>2]|0}n?$=65:(c=e,a=i)}if(($|0)==65)for(o=n;;)if(E=(t[o+4>>2]&-8)-p|0,n=E>>>0<i>>>0,i=n?E:i,e=n?o:e,n=t[o+16>>2]|0,n||(n=t[o+20>>2]|0),n)o=n;else{c=e,a=i;break}if((c|0)!=0&&a>>>0<((t[6983]|0)-p|0)>>>0&&(v=c+p|0,v>>>0>c>>>0)){o=t[c+24>>2]|0,A=t[c+12>>2]|0;do if((A|0)==(c|0)){if(e=c+20|0,A=t[e>>2]|0,!A&&(e=c+16|0,A=t[e>>2]|0,!A)){A=0;break}for(;;)if(i=A+20|0,n=t[i>>2]|0,n)A=n,e=i;else if(i=A+16|0,n=t[i>>2]|0,n)A=n,e=i;else break;t[e>>2]=0}else W=t[c+8>>2]|0,t[W+12>>2]=A,t[A+8>>2]=W;while(!1);do if(o){if(e=t[c+28>>2]|0,n=28228+(e<<2)|0,(c|0)==(t[n>>2]|0)){if(t[n>>2]=A,!A){r=r&~(1<<e),t[6982]=r;break}}else if(W=o+16|0,t[((t[W>>2]|0)==(c|0)?W:o+20|0)>>2]=A,!A)break;t[A+24>>2]=o,e=t[c+16>>2]|0,e|0&&(t[A+16>>2]=e,t[e+24>>2]=A),e=t[c+20>>2]|0,e&&(t[A+20>>2]=e,t[e+24>>2]=A)}while(!1);A:do if(a>>>0<16)W=a+p|0,t[c+4>>2]=W|3,W=c+W+4|0,t[W>>2]=t[W>>2]|1;else{if(t[c+4>>2]=p|3,t[v+4>>2]=a|1,t[v+a>>2]=a,A=a>>>3,a>>>0<256){n=27964+(A<<1<<2)|0,e=t[6981]|0,A=1<<A,e&A?(e=n+8|0,A=t[e>>2]|0):(t[6981]=e|A,A=n,e=n+8|0),t[e>>2]=v,t[A+12>>2]=v,t[v+8>>2]=A,t[v+12>>2]=n;break}if(A=a>>>8,A?a>>>0>16777215?n=31:(i0=(A+1048320|0)>>>16&8,W=A<<i0,s0=(W+520192|0)>>>16&4,W=W<<s0,n=(W+245760|0)>>>16&2,n=14-(s0|i0|n)+(W<<n>>>15)|0,n=a>>>(n+7|0)&1|n<<1):n=0,A=28228+(n<<2)|0,t[v+28>>2]=n,e=v+16|0,t[e+4>>2]=0,t[e>>2]=0,e=1<<n,!(r&e)){t[6982]=r|e,t[A>>2]=v,t[v+24>>2]=A,t[v+12>>2]=v,t[v+8>>2]=v;break}A=t[A>>2]|0;e:do if((t[A+4>>2]&-8|0)!=(a|0)){for(r=a<<((n|0)==31?0:25-(n>>>1)|0);n=A+16+(r>>>31<<2)|0,e=t[n>>2]|0,!!e;)if((t[e+4>>2]&-8|0)==(a|0)){A=e;break e}else r=r<<1,A=e;t[n>>2]=v,t[v+24>>2]=A,t[v+12>>2]=v,t[v+8>>2]=v;break A}while(!1);i0=A+8|0,W=t[i0>>2]|0,t[W+12>>2]=v,t[i0>>2]=v,t[v+8>>2]=W,t[v+12>>2]=A,t[v+24>>2]=0}while(!1);return W=c+8|0,w=z0,W|0}else E=p}else E=p;else E=-1;while(!1);if(n=t[6983]|0,n>>>0>=E>>>0)return A=n-E|0,e=t[6986]|0,A>>>0>15?(W=e+E|0,t[6986]=W,t[6983]=A,t[W+4>>2]=A|1,t[e+n>>2]=A,t[e+4>>2]=E|3):(t[6983]=0,t[6986]=0,t[e+4>>2]=n|3,W=e+n+4|0,t[W>>2]=t[W>>2]|1),W=e+8|0,w=z0,W|0;if(a=t[6984]|0,a>>>0>E>>>0)return s0=a-E|0,t[6984]=s0,W=t[6987]|0,i0=W+E|0,t[6987]=i0,t[i0+4>>2]=s0|1,t[W+4>>2]=E|3,W=W+8|0,w=z0,W|0;if(t[7099]|0?e=t[7101]|0:(t[7101]=4096,t[7100]=4096,t[7102]=-1,t[7103]=-1,t[7104]=0,t[7092]=0,t[7099]=_&-16^1431655768,e=4096),c=E+48|0,d=E+47|0,o=e+d|0,i=0-e|0,p=o&i,p>>>0<=E>>>0||(e=t[7091]|0,e|0&&(v=t[7089]|0,_=v+p|0,_>>>0<=v>>>0|_>>>0>e>>>0)))return W=0,w=z0,W|0;A:do if(t[7092]&4)A=0,$=143;else{n=t[6987]|0;e:do if(n){for(r=28372;_=t[r>>2]|0,!(_>>>0<=n>>>0&&(_+(t[r+4>>2]|0)|0)>>>0>n>>>0);)if(e=t[r+8>>2]|0,e)r=e;else{$=128;break e}if(A=o-a&i,A>>>0<2147483647)if(e=He(A|0)|0,(e|0)==((t[r>>2]|0)+(t[r+4>>2]|0)|0)){if((e|0)!=-1){a=A,o=e,$=145;break A}}else r=e,$=136;else A=0}else $=128;while(!1);do if(($|0)==128)if(n=He(0)|0,(n|0)!=-1&&(A=n,I=t[7100]|0,P=I+-1|0,A=((P&A|0)==0?0:(P+A&0-I)-A|0)+p|0,I=t[7089]|0,P=A+I|0,A>>>0>E>>>0&A>>>0<2147483647)){if(_=t[7091]|0,_|0&&P>>>0<=I>>>0|P>>>0>_>>>0){A=0;break}if(e=He(A|0)|0,(e|0)==(n|0)){a=A,o=n,$=145;break A}else r=e,$=136}else A=0;while(!1);do if(($|0)==136){if(n=0-A|0,!(c>>>0>A>>>0&(A>>>0<2147483647&(r|0)!=-1)))if((r|0)==-1){A=0;break}else{a=A,o=r,$=145;break A}if(e=t[7101]|0,e=d-A+e&0-e,e>>>0>=2147483647){a=A,o=r,$=145;break A}if((He(e|0)|0)==-1){He(n|0)|0,A=0;break}else{a=e+A|0,o=r,$=145;break A}}while(!1);t[7092]=t[7092]|4,$=143}while(!1);if(($|0)==143&&p>>>0<2147483647&&(s0=He(p|0)|0,P=He(0)|0,K=P-s0|0,u0=K>>>0>(E+40|0)>>>0,!((s0|0)==-1|u0^1|s0>>>0<P>>>0&((s0|0)!=-1&(P|0)!=-1)^1))&&(a=u0?K:A,o=s0,$=145),($|0)==145){A=(t[7089]|0)+a|0,t[7089]=A,A>>>0>(t[7090]|0)>>>0&&(t[7090]=A),d=t[6987]|0;A:do if(d){for(A=28372;;){if(e=t[A>>2]|0,n=t[A+4>>2]|0,(o|0)==(e+n|0)){$=154;break}if(r=t[A+8>>2]|0,r)A=r;else break}if(($|0)==154&&(i0=A+4|0,(t[A+12>>2]&8|0)==0)&&o>>>0>d>>>0&e>>>0<=d>>>0){t[i0>>2]=n+a,W=(t[6984]|0)+a|0,s0=d+8|0,s0=(s0&7|0)==0?0:0-s0&7,i0=d+s0|0,s0=W-s0|0,t[6987]=i0,t[6984]=s0,t[i0+4>>2]=s0|1,t[d+W+4>>2]=40,t[6988]=t[7103];break}for(o>>>0<(t[6985]|0)>>>0&&(t[6985]=o),n=o+a|0,A=28372;;){if((t[A>>2]|0)==(n|0)){$=162;break}if(e=t[A+8>>2]|0,e)A=e;else break}if(($|0)==162&&(t[A+12>>2]&8|0)==0){t[A>>2]=o,v=A+4|0,t[v>>2]=(t[v>>2]|0)+a,v=o+8|0,v=o+((v&7|0)==0?0:0-v&7)|0,A=n+8|0,A=n+((A&7|0)==0?0:0-A&7)|0,p=v+E|0,c=A-v-E|0,t[v+4>>2]=E|3;e:do if((d|0)==(A|0))W=(t[6984]|0)+c|0,t[6984]=W,t[6987]=p,t[p+4>>2]=W|1;else{if((t[6986]|0)==(A|0)){W=(t[6983]|0)+c|0,t[6983]=W,t[6986]=p,t[p+4>>2]=W|1,t[p+W>>2]=W;break}if(e=t[A+4>>2]|0,(e&3|0)==1){a=e&-8,r=e>>>3;t:do if(e>>>0<256)if(e=t[A+8>>2]|0,n=t[A+12>>2]|0,(n|0)==(e|0)){t[6981]=t[6981]&~(1<<r);break}else{t[e+12>>2]=n,t[n+8>>2]=e;break}else{o=t[A+24>>2]|0,e=t[A+12>>2]|0;do if((e|0)==(A|0)){if(n=A+16|0,r=n+4|0,e=t[r>>2]|0,e)n=r;else if(e=t[n>>2]|0,!e){e=0;break}for(;;)if(i=e+20|0,r=t[i>>2]|0,r)e=r,n=i;else if(i=e+16|0,r=t[i>>2]|0,r)e=r,n=i;else break;t[n>>2]=0}else W=t[A+8>>2]|0,t[W+12>>2]=e,t[e+8>>2]=W;while(!1);if(!o)break;n=t[A+28>>2]|0,r=28228+(n<<2)|0;do if((t[r>>2]|0)!=(A|0)){if(W=o+16|0,t[((t[W>>2]|0)==(A|0)?W:o+20|0)>>2]=e,!e)break t}else{if(t[r>>2]=e,e|0)break;t[6982]=t[6982]&~(1<<n);break t}while(!1);if(t[e+24>>2]=o,n=A+16|0,r=t[n>>2]|0,r|0&&(t[e+16>>2]=r,t[r+24>>2]=e),n=t[n+4>>2]|0,!n)break;t[e+20>>2]=n,t[n+24>>2]=e}while(!1);A=A+a|0,i=a+c|0}else i=c;if(A=A+4|0,t[A>>2]=t[A>>2]&-2,t[p+4>>2]=i|1,t[p+i>>2]=i,A=i>>>3,i>>>0<256){n=27964+(A<<1<<2)|0,e=t[6981]|0,A=1<<A,e&A?(e=n+8|0,A=t[e>>2]|0):(t[6981]=e|A,A=n,e=n+8|0),t[e>>2]=p,t[A+12>>2]=p,t[p+8>>2]=A,t[p+12>>2]=n;break}A=i>>>8;do if(!A)r=0;else{if(i>>>0>16777215){r=31;break}i0=(A+1048320|0)>>>16&8,W=A<<i0,s0=(W+520192|0)>>>16&4,W=W<<s0,r=(W+245760|0)>>>16&2,r=14-(s0|i0|r)+(W<<r>>>15)|0,r=i>>>(r+7|0)&1|r<<1}while(!1);if(A=28228+(r<<2)|0,t[p+28>>2]=r,e=p+16|0,t[e+4>>2]=0,t[e>>2]=0,e=t[6982]|0,n=1<<r,!(e&n)){t[6982]=e|n,t[A>>2]=p,t[p+24>>2]=A,t[p+12>>2]=p,t[p+8>>2]=p;break}A=t[A>>2]|0;t:do if((t[A+4>>2]&-8|0)!=(i|0)){for(r=i<<((r|0)==31?0:25-(r>>>1)|0);n=A+16+(r>>>31<<2)|0,e=t[n>>2]|0,!!e;)if((t[e+4>>2]&-8|0)==(i|0)){A=e;break t}else r=r<<1,A=e;t[n>>2]=p,t[p+24>>2]=A,t[p+12>>2]=p,t[p+8>>2]=p;break e}while(!1);i0=A+8|0,W=t[i0>>2]|0,t[W+12>>2]=p,t[i0>>2]=p,t[p+8>>2]=W,t[p+12>>2]=A,t[p+24>>2]=0}while(!1);return W=v+8|0,w=z0,W|0}for(A=28372;e=t[A>>2]|0,!(e>>>0<=d>>>0&&(W=e+(t[A+4>>2]|0)|0,W>>>0>d>>>0));)A=t[A+8>>2]|0;i=W+-47|0,e=i+8|0,e=i+((e&7|0)==0?0:0-e&7)|0,i=d+16|0,e=e>>>0<i>>>0?d:e,A=e+8|0,n=a+-40|0,s0=o+8|0,s0=(s0&7|0)==0?0:0-s0&7,i0=o+s0|0,s0=n-s0|0,t[6987]=i0,t[6984]=s0,t[i0+4>>2]=s0|1,t[o+n+4>>2]=40,t[6988]=t[7103],n=e+4|0,t[n>>2]=27,t[A>>2]=t[7093],t[A+4>>2]=t[7094],t[A+8>>2]=t[7095],t[A+12>>2]=t[7096],t[7093]=o,t[7094]=a,t[7096]=0,t[7095]=A,A=e+24|0;do i0=A,A=A+4|0,t[A>>2]=7;while((i0+8|0)>>>0<W>>>0);if((e|0)!=(d|0)){if(o=e-d|0,t[n>>2]=t[n>>2]&-2,t[d+4>>2]=o|1,t[e>>2]=o,A=o>>>3,o>>>0<256){n=27964+(A<<1<<2)|0,e=t[6981]|0,A=1<<A,e&A?(e=n+8|0,A=t[e>>2]|0):(t[6981]=e|A,A=n,e=n+8|0),t[e>>2]=d,t[A+12>>2]=d,t[d+8>>2]=A,t[d+12>>2]=n;break}if(A=o>>>8,A?o>>>0>16777215?r=31:(i0=(A+1048320|0)>>>16&8,W=A<<i0,s0=(W+520192|0)>>>16&4,W=W<<s0,r=(W+245760|0)>>>16&2,r=14-(s0|i0|r)+(W<<r>>>15)|0,r=o>>>(r+7|0)&1|r<<1):r=0,n=28228+(r<<2)|0,t[d+28>>2]=r,t[d+20>>2]=0,t[i>>2]=0,A=t[6982]|0,e=1<<r,!(A&e)){t[6982]=A|e,t[n>>2]=d,t[d+24>>2]=n,t[d+12>>2]=d,t[d+8>>2]=d;break}A=t[n>>2]|0;e:do if((t[A+4>>2]&-8|0)!=(o|0)){for(r=o<<((r|0)==31?0:25-(r>>>1)|0);n=A+16+(r>>>31<<2)|0,e=t[n>>2]|0,!!e;)if((t[e+4>>2]&-8|0)==(o|0)){A=e;break e}else r=r<<1,A=e;t[n>>2]=d,t[d+24>>2]=A,t[d+12>>2]=d,t[d+8>>2]=d;break A}while(!1);i0=A+8|0,W=t[i0>>2]|0,t[W+12>>2]=d,t[i0>>2]=d,t[d+8>>2]=W,t[d+12>>2]=A,t[d+24>>2]=0}}else W=t[6985]|0,(W|0)==0|o>>>0<W>>>0&&(t[6985]=o),t[7093]=o,t[7094]=a,t[7096]=0,t[6990]=t[7099],t[6989]=-1,t[6994]=27964,t[6993]=27964,t[6996]=27972,t[6995]=27972,t[6998]=27980,t[6997]=27980,t[7e3]=27988,t[6999]=27988,t[7002]=27996,t[7001]=27996,t[7004]=28004,t[7003]=28004,t[7006]=28012,t[7005]=28012,t[7008]=28020,t[7007]=28020,t[7010]=28028,t[7009]=28028,t[7012]=28036,t[7011]=28036,t[7014]=28044,t[7013]=28044,t[7016]=28052,t[7015]=28052,t[7018]=28060,t[7017]=28060,t[7020]=28068,t[7019]=28068,t[7022]=28076,t[7021]=28076,t[7024]=28084,t[7023]=28084,t[7026]=28092,t[7025]=28092,t[7028]=28100,t[7027]=28100,t[7030]=28108,t[7029]=28108,t[7032]=28116,t[7031]=28116,t[7034]=28124,t[7033]=28124,t[7036]=28132,t[7035]=28132,t[7038]=28140,t[7037]=28140,t[7040]=28148,t[7039]=28148,t[7042]=28156,t[7041]=28156,t[7044]=28164,t[7043]=28164,t[7046]=28172,t[7045]=28172,t[7048]=28180,t[7047]=28180,t[7050]=28188,t[7049]=28188,t[7052]=28196,t[7051]=28196,t[7054]=28204,t[7053]=28204,t[7056]=28212,t[7055]=28212,W=a+-40|0,s0=o+8|0,s0=(s0&7|0)==0?0:0-s0&7,i0=o+s0|0,s0=W-s0|0,t[6987]=i0,t[6984]=s0,t[i0+4>>2]=s0|1,t[o+W+4>>2]=40,t[6988]=t[7103];while(!1);if(A=t[6984]|0,A>>>0>E>>>0)return s0=A-E|0,t[6984]=s0,W=t[6987]|0,i0=W+E|0,t[6987]=i0,t[i0+4>>2]=s0|1,t[W+4>>2]=E|3,W=W+8|0,w=z0,W|0}return W=Mo()|0,t[W>>2]=12,W=0,w=z0,W|0}function W0(e){e=e|0;var A=0,n=0,r=0,i=0,o=0,a=0,c=0,d=0;if(e){n=e+-8|0,i=t[6985]|0,e=t[e+-4>>2]|0,A=e&-8,d=n+A|0;do if(e&1)c=n,a=n;else{if(r=t[n>>2]|0,!(e&3)||(a=n+(0-r)|0,o=r+A|0,a>>>0<i>>>0))return;if((t[6986]|0)==(a|0)){if(e=d+4|0,A=t[e>>2]|0,(A&3|0)!=3){c=a,A=o;break}t[6983]=o,t[e>>2]=A&-2,t[a+4>>2]=o|1,t[a+o>>2]=o;return}if(n=r>>>3,r>>>0<256)if(e=t[a+8>>2]|0,A=t[a+12>>2]|0,(A|0)==(e|0)){t[6981]=t[6981]&~(1<<n),c=a,A=o;break}else{t[e+12>>2]=A,t[A+8>>2]=e,c=a,A=o;break}i=t[a+24>>2]|0,e=t[a+12>>2]|0;do if((e|0)==(a|0)){if(A=a+16|0,n=A+4|0,e=t[n>>2]|0,e)A=n;else if(e=t[A>>2]|0,!e){e=0;break}for(;;)if(r=e+20|0,n=t[r>>2]|0,n)e=n,A=r;else if(r=e+16|0,n=t[r>>2]|0,n)e=n,A=r;else break;t[A>>2]=0}else c=t[a+8>>2]|0,t[c+12>>2]=e,t[e+8>>2]=c;while(!1);if(i){if(A=t[a+28>>2]|0,n=28228+(A<<2)|0,(t[n>>2]|0)==(a|0)){if(t[n>>2]=e,!e){t[6982]=t[6982]&~(1<<A),c=a,A=o;break}}else if(c=i+16|0,t[((t[c>>2]|0)==(a|0)?c:i+20|0)>>2]=e,!e){c=a,A=o;break}t[e+24>>2]=i,A=a+16|0,n=t[A>>2]|0,n|0&&(t[e+16>>2]=n,t[n+24>>2]=e),A=t[A+4>>2]|0,A?(t[e+20>>2]=A,t[A+24>>2]=e,c=a,A=o):(c=a,A=o)}else c=a,A=o}while(!1);if(!(a>>>0>=d>>>0)&&(e=d+4|0,r=t[e>>2]|0,!!(r&1))){if(r&2)t[e>>2]=r&-2,t[c+4>>2]=A|1,t[a+A>>2]=A,i=A;else{if((t[6987]|0)==(d|0)){if(d=(t[6984]|0)+A|0,t[6984]=d,t[6987]=c,t[c+4>>2]=d|1,(c|0)!=(t[6986]|0))return;t[6986]=0,t[6983]=0;return}if((t[6986]|0)==(d|0)){d=(t[6983]|0)+A|0,t[6983]=d,t[6986]=a,t[c+4>>2]=d|1,t[a+d>>2]=d;return}i=(r&-8)+A|0,n=r>>>3;do if(r>>>0<256)if(A=t[d+8>>2]|0,e=t[d+12>>2]|0,(e|0)==(A|0)){t[6981]=t[6981]&~(1<<n);break}else{t[A+12>>2]=e,t[e+8>>2]=A;break}else{o=t[d+24>>2]|0,e=t[d+12>>2]|0;do if((e|0)==(d|0)){if(A=d+16|0,n=A+4|0,e=t[n>>2]|0,e)A=n;else if(e=t[A>>2]|0,!e){n=0;break}for(;;)if(r=e+20|0,n=t[r>>2]|0,n)e=n,A=r;else if(r=e+16|0,n=t[r>>2]|0,n)e=n,A=r;else break;t[A>>2]=0,n=e}else n=t[d+8>>2]|0,t[n+12>>2]=e,t[e+8>>2]=n,n=e;while(!1);if(o|0){if(e=t[d+28>>2]|0,A=28228+(e<<2)|0,(t[A>>2]|0)==(d|0)){if(t[A>>2]=n,!n){t[6982]=t[6982]&~(1<<e);break}}else if(r=o+16|0,t[((t[r>>2]|0)==(d|0)?r:o+20|0)>>2]=n,!n)break;t[n+24>>2]=o,e=d+16|0,A=t[e>>2]|0,A|0&&(t[n+16>>2]=A,t[A+24>>2]=n),e=t[e+4>>2]|0,e|0&&(t[n+20>>2]=e,t[e+24>>2]=n)}}while(!1);if(t[c+4>>2]=i|1,t[a+i>>2]=i,(c|0)==(t[6986]|0)){t[6983]=i;return}}if(e=i>>>3,i>>>0<256){n=27964+(e<<1<<2)|0,A=t[6981]|0,e=1<<e,A&e?(A=n+8|0,e=t[A>>2]|0):(t[6981]=A|e,e=n,A=n+8|0),t[A>>2]=c,t[e+12>>2]=c,t[c+8>>2]=e,t[c+12>>2]=n;return}e=i>>>8,e?i>>>0>16777215?r=31:(a=(e+1048320|0)>>>16&8,d=e<<a,o=(d+520192|0)>>>16&4,d=d<<o,r=(d+245760|0)>>>16&2,r=14-(o|a|r)+(d<<r>>>15)|0,r=i>>>(r+7|0)&1|r<<1):r=0,e=28228+(r<<2)|0,t[c+28>>2]=r,t[c+20>>2]=0,t[c+16>>2]=0,A=t[6982]|0,n=1<<r;A:do if(!(A&n))t[6982]=A|n,t[e>>2]=c,t[c+24>>2]=e,t[c+12>>2]=c,t[c+8>>2]=c;else{e=t[e>>2]|0;e:do if((t[e+4>>2]&-8|0)!=(i|0)){for(r=i<<((r|0)==31?0:25-(r>>>1)|0);n=e+16+(r>>>31<<2)|0,A=t[n>>2]|0,!!A;)if((t[A+4>>2]&-8|0)==(i|0)){e=A;break e}else r=r<<1,e=A;t[n>>2]=c,t[c+24>>2]=e,t[c+12>>2]=c,t[c+8>>2]=c;break A}while(!1);a=e+8|0,d=t[a>>2]|0,t[d+12>>2]=c,t[a>>2]=c,t[c+8>>2]=d,t[c+12>>2]=e,t[c+24>>2]=0}while(!1);if(d=(t[6989]|0)+-1|0,t[6989]=d,!(d|0)){for(e=28380;e=t[e>>2]|0,e;)e=e+8|0;t[6989]=-1}}}}function qA(e,A){e=e|0,A=A|0;var n=0;return e?(n=UA(A,e)|0,(A|e)>>>0>65535&&(n=((n>>>0)/(e>>>0)|0|0)==(A|0)?n:-1)):n=0,e=me(n)|0,!e||!(t[e+-4>>2]&3)||De(e|0,0,n|0)|0,e|0}function $0(e,A,n,r){return e=e|0,A=A|0,n=n|0,r=r|0,n=e+n>>>0,nA(A+r+(n>>>0<e>>>0|0)>>>0|0),n|0|0}function PA(e,A,n,r){return e=e|0,A=A|0,n=n|0,r=r|0,r=A-r-(n>>>0>e>>>0|0)>>>0,nA(r|0),e-n>>>0|0|0}function er(e){return e=e|0,(e?31-(fe(e^e-1)|0)|0:32)|0}function k1(e,A,n,r,i){e=e|0,A=A|0,n=n|0,r=r|0,i=i|0;var o=0,a=0,c=0,d=0,p=0,v=0,E=0,_=0,I=0,P=0;if(v=e,d=A,p=d,a=n,_=r,c=_,!p)return o=(i|0)!=0,c?o?(t[i>>2]=e|0,t[i+4>>2]=A&0,_=0,i=0,nA(_|0),i|0):(_=0,i=0,nA(_|0),i|0):(o&&(t[i>>2]=(v>>>0)%(a>>>0),t[i+4>>2]=0),_=0,i=(v>>>0)/(a>>>0)>>>0,nA(_|0),i|0);o=(c|0)==0;do if(a){if(!o){if(o=(fe(c|0)|0)-(fe(p|0)|0)|0,o>>>0<=31){E=o+1|0,c=31-o|0,A=o-31>>31,a=E,e=v>>>(E>>>0)&A|p<<c,A=p>>>(E>>>0)&A,o=0,c=v<<c;break}return i?(t[i>>2]=e|0,t[i+4>>2]=d|A&0,_=0,i=0,nA(_|0),i|0):(_=0,i=0,nA(_|0),i|0)}if(o=a-1|0,o&a|0){c=(fe(a|0)|0)+33-(fe(p|0)|0)|0,P=64-c|0,E=32-c|0,d=E>>31,I=c-32|0,A=I>>31,a=c,e=E-1>>31&p>>>(I>>>0)|(p<<E|v>>>(c>>>0))&A,A=A&p>>>(c>>>0),o=v<<P&d,c=(p<<P|v>>>(I>>>0))&d|v<<E&c-33>>31;break}return i|0&&(t[i>>2]=o&v,t[i+4>>2]=0),(a|0)==1?(I=d|A&0,P=e|0|0,nA(I|0),P|0):(P=er(a|0)|0,I=p>>>(P>>>0)|0,P=p<<32-P|v>>>(P>>>0)|0,nA(I|0),P|0)}else{if(o)return i|0&&(t[i>>2]=(p>>>0)%(a>>>0),t[i+4>>2]=0),I=0,P=(p>>>0)/(a>>>0)>>>0,nA(I|0),P|0;if(!v)return i|0&&(t[i>>2]=0,t[i+4>>2]=(p>>>0)%(c>>>0)),I=0,P=(p>>>0)/(c>>>0)>>>0,nA(I|0),P|0;if(o=c-1|0,!(o&c))return i|0&&(t[i>>2]=e|0,t[i+4>>2]=o&p|A&0),I=0,P=p>>>((er(c|0)|0)>>>0),nA(I|0),P|0;if(o=(fe(c|0)|0)-(fe(p|0)|0)|0,o>>>0<=30){A=o+1|0,c=31-o|0,a=A,e=p<<c|v>>>(A>>>0),A=p>>>(A>>>0),o=0,c=v<<c;break}return i?(t[i>>2]=e|0,t[i+4>>2]=d|A&0,I=0,P=0,nA(I|0),P|0):(I=0,P=0,nA(I|0),P|0)}while(!1);if(!a)p=c,d=0,c=0;else{E=n|0|0,v=_|r&0,p=$0(E|0,v|0,-1,-1)|0,n=j()|0,d=c,c=0;do r=d,d=o>>>31|d<<1,o=c|o<<1,r=e<<1|r>>>31|0,_=e>>>31|A<<1|0,PA(p|0,n|0,r|0,_|0)|0,P=j()|0,I=P>>31|((P|0)<0?-1:0)<<1,c=I&1,e=PA(r|0,_|0,I&E|0,(((P|0)<0?-1:0)>>31|((P|0)<0?-1:0)<<1)&v|0)|0,A=j()|0,a=a-1|0;while((a|0)!=0);p=d,d=0}return a=0,i|0&&(t[i>>2]=e,t[i+4>>2]=A),I=(o|0)>>>31|(p|a)<<1|(a<<1|o>>>31)&0|d,P=(o<<1|0)&-2|c,nA(I|0),P|0}function Se(e,A,n,r){e=e|0,A=A|0,n=n|0,r=r|0;var i=0,o=0,a=0,c=0,d=0,p=0;return p=A>>31|((A|0)<0?-1:0)<<1,d=((A|0)<0?-1:0)>>31|((A|0)<0?-1:0)<<1,o=r>>31|((r|0)<0?-1:0)<<1,i=((r|0)<0?-1:0)>>31|((r|0)<0?-1:0)<<1,c=PA(p^e|0,d^A|0,p|0,d|0)|0,a=j()|0,e=o^p,A=i^d,PA((k1(c,a,PA(o^n|0,i^r|0,o|0,i|0)|0,j()|0,0)|0)^e|0,(j()|0)^A|0,e|0,A|0)|0}function Eo(e,A){e=e|0,A=A|0;var n=0,r=0,i=0,o=0;return o=e&65535,i=A&65535,n=UA(i,o)|0,r=e>>>16,e=(n>>>16)+(UA(i,r)|0)|0,i=A>>>16,A=UA(i,o)|0,nA((e>>>16)+(UA(i,r)|0)+(((e&65535)+A|0)>>>16)|0),e+A<<16|n&65535|0|0}function TA(e,A,n,r){e=e|0,A=A|0,n=n|0,r=r|0;var i=0,o=0;return i=e,o=n,n=Eo(i,o)|0,e=j()|0,nA((UA(A,o)|0)+(UA(r,i)|0)+e|e&0|0),n|0|0|0}function tt(e,A,n,r){e=e|0,A=A|0,n=n|0,r=r|0;var i=0,o=0,a=0,c=0,d=0,p=0;return i=w,w=w+16|0,c=i|0,a=A>>31|((A|0)<0?-1:0)<<1,o=((A|0)<0?-1:0)>>31|((A|0)<0?-1:0)<<1,p=r>>31|((r|0)<0?-1:0)<<1,d=((r|0)<0?-1:0)>>31|((r|0)<0?-1:0)<<1,e=PA(a^e|0,o^A|0,a|0,o|0)|0,A=j()|0,k1(e,A,PA(p^n|0,d^r|0,p|0,d|0)|0,j()|0,c)|0,r=PA(t[c>>2]^a|0,t[c+4>>2]^o|0,a|0,o|0)|0,n=j()|0,w=i,nA(n|0),r|0}function nt(e,A,n,r){e=e|0,A=A|0,n=n|0,r=r|0;var i=0,o=0;return o=w,w=w+16|0,i=o|0,k1(e,A,n,r,i)|0,w=o,nA(t[i+4>>2]|0),t[i>>2]|0|0}function tr(e,A,n){return e=e|0,A=A|0,n=n|0,(n|0)<32?(nA(A>>n|0),e>>>n|(A&(1<<n)-1)<<32-n):(nA(((A|0)<0?-1:0)|0),A>>n-32|0)}function C0(e,A,n){return e=e|0,A=A|0,n=n|0,(n|0)<32?(nA(A>>>n|0),e>>>n|(A&(1<<n)-1)<<32-n):(nA(0),A>>>n-32|0)}function k0(e,A,n){return e=e|0,A=A|0,n=n|0,(n|0)<32?(nA(A<<n|(e&(1<<n)-1<<32-n)>>>32-n|0),e<<n):(nA(e<<n-32|0),0)}function M1(e,A,n){return e=e|0,A=A|0,A=fe(A)|0,(A|0)==32&&(A=A+(fe(e)|0)|0),nA(0),A|0}function nr(e,A){return e=+e,A=+A,e!=e?+A:A!=A?+e:+Kt(+e,+A)}function _t(e,A){return e=+e,A=+A,e!=e?+A:A!=A?+e:+Pe(+e,+A)}function It(e){return e=+e,e>=0?+SA(e+.5):+ue(e-.5)}function rt(e,A,n){e=e|0,A=A|0,n=n|0;var r=0,i=0,o=0;if((n|0)>=8192)return A1(e|0,A|0,n|0)|0,e|0;if(o=e|0,i=e+n|0,(e&3)==(A&3)){for(;e&3;){if(!n)return o|0;m0[e>>0]=m0[A>>0]|0,e=e+1|0,A=A+1|0,n=n-1|0}for(n=i&-4|0,r=n-64|0;(e|0)<=(r|0);)t[e>>2]=t[A>>2],t[e+4>>2]=t[A+4>>2],t[e+8>>2]=t[A+8>>2],t[e+12>>2]=t[A+12>>2],t[e+16>>2]=t[A+16>>2],t[e+20>>2]=t[A+20>>2],t[e+24>>2]=t[A+24>>2],t[e+28>>2]=t[A+28>>2],t[e+32>>2]=t[A+32>>2],t[e+36>>2]=t[A+36>>2],t[e+40>>2]=t[A+40>>2],t[e+44>>2]=t[A+44>>2],t[e+48>>2]=t[A+48>>2],t[e+52>>2]=t[A+52>>2],t[e+56>>2]=t[A+56>>2],t[e+60>>2]=t[A+60>>2],e=e+64|0,A=A+64|0;for(;(e|0)<(n|0);)t[e>>2]=t[A>>2],e=e+4|0,A=A+4|0}else for(n=i-4|0;(e|0)<(n|0);)m0[e>>0]=m0[A>>0]|0,m0[e+1>>0]=m0[A+1>>0]|0,m0[e+2>>0]=m0[A+2>>0]|0,m0[e+3>>0]=m0[A+3>>0]|0,e=e+4|0,A=A+4|0;for(;(e|0)<(i|0);)m0[e>>0]=m0[A>>0]|0,e=e+1|0,A=A+1|0;return o|0}function De(e,A,n){e=e|0,A=A|0,n=n|0;var r=0,i=0,o=0,a=0;if(o=e+n|0,A=A&255,(n|0)>=67){for(;e&3;)m0[e>>0]=A,e=e+1|0;for(r=o&-4|0,a=A|A<<8|A<<16|A<<24,i=r-64|0;(e|0)<=(i|0);)t[e>>2]=a,t[e+4>>2]=a,t[e+8>>2]=a,t[e+12>>2]=a,t[e+16>>2]=a,t[e+20>>2]=a,t[e+24>>2]=a,t[e+28>>2]=a,t[e+32>>2]=a,t[e+36>>2]=a,t[e+40>>2]=a,t[e+44>>2]=a,t[e+48>>2]=a,t[e+52>>2]=a,t[e+56>>2]=a,t[e+60>>2]=a,e=e+64|0;for(;(e|0)<(r|0);)t[e>>2]=a,e=e+4|0}for(;(e|0)<(o|0);)m0[e>>0]=A,e=e+1|0;return o-n|0}function rr(e){return e=+e,e>=0?+SA(e+.5):+ue(e-.5)}function He(e){e=e|0;var A=0,n=0,r=0;return r=ht()|0,n=t[yA>>2]|0,A=n+e|0,(e|0)>0&(A|0)<(n|0)|(A|0)<0?(J(A|0)|0,dt(12),-1):(A|0)>(r|0)&&!(Et(A|0)|0)?(dt(12),-1):(t[yA>>2]=A,n|0)}return{___divdi3:Se,___muldi3:TA,___remdi3:tt,___uremdi3:nt,_areNeighborCells:hi,_bitshift64Ashr:tr,_bitshift64Lshr:C0,_bitshift64Shl:k0,_calloc:qA,_cellAreaKm2:Wi,_cellAreaM2:Gi,_cellAreaRads2:x1,_cellToBoundary:At,_cellToCenterChild:In,_cellToChildPos:Ti,_cellToChildren:ji,_cellToChildrenSize:gt,_cellToLatLng:Ze,_cellToLocalIj:eo,_cellToParent:d1,_cellToVertex:ae,_cellToVertexes:xo,_cellsToDirectedEdge:pi,_cellsToLinkedMultiPolygon:Y2,_childPosToCell:Fi,_compactCells:Si,_constructCell:Ei,_destroyLinkedMultiPolygon:Nn,_directedEdgeToBoundary:Dt,_directedEdgeToCells:yi,_edgeLengthKm:qi,_edgeLengthM:Xi,_edgeLengthRads:Yi,_emscripten_replace_memory:P0,_free:W0,_getBaseCellNumber:Vn,_getDirectedEdgeDestination:mi,_getDirectedEdgeOrigin:gi,_getHexagonAreaAvgKm2:Fn,_getHexagonAreaAvgM2:Oi,_getHexagonEdgeLengthAvgKm:Ui,_getHexagonEdgeLengthAvgM:$i,_getIcosahedronFaces:Pn,_getIndexDigit:Mi,_getNumCells:Ht,_getPentagons:y1,_getRes0Cells:Ai,_getResolution:ki,_greatCircleDistanceKm:yt,_greatCircleDistanceM:Ni,_greatCircleDistanceRads:Ri,_gridDisk:se,_gridDiskDistances:Me,_gridDistance:no,_gridPathCells:io,_gridPathCellsSize:ro,_gridRing:O2,_gridRingUnsafe:gn,_i64Add:$0,_i64Subtract:PA,_isPentagon:LA,_isResClassIII:Bi,_isValidCell:u1,_isValidDirectedEdge:Dn,_isValidIndex:zi,_isValidVertex:qn,_latLngToCell:g1,_llvm_ctlz_i64:M1,_llvm_maxnum_f64:nr,_llvm_minnum_f64:_t,_llvm_round_f64:It,_localIjToCell:to,_malloc:me,_maxFaceCount:Ii,_maxGridDiskSize:de,_maxPolygonToCellsSize:$2,_maxPolygonToCellsSizeExperimental:lo,_memcpy:rt,_memset:De,_originToDirectedEdges:Ci,_pentagonCount:Pi,_polygonToCells:W2,_polygonToCellsExperimental:so,_readInt64AsDoubleFromPointer:mo,_res0CellCount:K2,_round:rr,_sbrk:He,_sizeOfCellBoundary:uo,_sizeOfCoordIJ:go,_sizeOfGeoLoop:fo,_sizeOfGeoPolygon:ho,_sizeOfH3Index:ao,_sizeOfLatLng:co,_sizeOfLinkedGeoPolygon:po,_uncompactCells:Di,_uncompactCellsSize:Hi,_vertexToLatLng:bo,establishStackSpace:wA,stackAlloc:Y0,stackRestore:cA,stackSave:K0}})(qt,Mt,o0);l.___divdi3=w0.___divdi3,l.___muldi3=w0.___muldi3,l.___remdi3=w0.___remdi3,l.___uremdi3=w0.___uremdi3,l._areNeighborCells=w0._areNeighborCells,l._bitshift64Ashr=w0._bitshift64Ashr,l._bitshift64Lshr=w0._bitshift64Lshr,l._bitshift64Shl=w0._bitshift64Shl,l._calloc=w0._calloc,l._cellAreaKm2=w0._cellAreaKm2,l._cellAreaM2=w0._cellAreaM2,l._cellAreaRads2=w0._cellAreaRads2,l._cellToBoundary=w0._cellToBoundary,l._cellToCenterChild=w0._cellToCenterChild,l._cellToChildPos=w0._cellToChildPos,l._cellToChildren=w0._cellToChildren,l._cellToChildrenSize=w0._cellToChildrenSize,l._cellToLatLng=w0._cellToLatLng,l._cellToLocalIj=w0._cellToLocalIj,l._cellToParent=w0._cellToParent,l._cellToVertex=w0._cellToVertex,l._cellToVertexes=w0._cellToVertexes,l._cellsToDirectedEdge=w0._cellsToDirectedEdge,l._cellsToLinkedMultiPolygon=w0._cellsToLinkedMultiPolygon,l._childPosToCell=w0._childPosToCell,l._compactCells=w0._compactCells,l._constructCell=w0._constructCell,l._destroyLinkedMultiPolygon=w0._destroyLinkedMultiPolygon,l._directedEdgeToBoundary=w0._directedEdgeToBoundary,l._directedEdgeToCells=w0._directedEdgeToCells,l._edgeLengthKm=w0._edgeLengthKm,l._edgeLengthM=w0._edgeLengthM,l._edgeLengthRads=w0._edgeLengthRads;var Xt=l._emscripten_replace_memory=w0._emscripten_replace_memory;l._free=w0._free,l._getBaseCellNumber=w0._getBaseCellNumber,l._getDirectedEdgeDestination=w0._getDirectedEdgeDestination,l._getDirectedEdgeOrigin=w0._getDirectedEdgeOrigin,l._getHexagonAreaAvgKm2=w0._getHexagonAreaAvgKm2,l._getHexagonAreaAvgM2=w0._getHexagonAreaAvgM2,l._getHexagonEdgeLengthAvgKm=w0._getHexagonEdgeLengthAvgKm,l._getHexagonEdgeLengthAvgM=w0._getHexagonEdgeLengthAvgM,l._getIcosahedronFaces=w0._getIcosahedronFaces,l._getIndexDigit=w0._getIndexDigit,l._getNumCells=w0._getNumCells,l._getPentagons=w0._getPentagons,l._getRes0Cells=w0._getRes0Cells,l._getResolution=w0._getResolution,l._greatCircleDistanceKm=w0._greatCircleDistanceKm,l._greatCircleDistanceM=w0._greatCircleDistanceM,l._greatCircleDistanceRads=w0._greatCircleDistanceRads,l._gridDisk=w0._gridDisk,l._gridDiskDistances=w0._gridDiskDistances,l._gridDistance=w0._gridDistance,l._gridPathCells=w0._gridPathCells,l._gridPathCellsSize=w0._gridPathCellsSize,l._gridRing=w0._gridRing,l._gridRingUnsafe=w0._gridRingUnsafe,l._i64Add=w0._i64Add,l._i64Subtract=w0._i64Subtract,l._isPentagon=w0._isPentagon,l._isResClassIII=w0._isResClassIII,l._isValidCell=w0._isValidCell,l._isValidDirectedEdge=w0._isValidDirectedEdge,l._isValidIndex=w0._isValidIndex,l._isValidVertex=w0._isValidVertex,l._latLngToCell=w0._latLngToCell,l._llvm_ctlz_i64=w0._llvm_ctlz_i64,l._llvm_maxnum_f64=w0._llvm_maxnum_f64,l._llvm_minnum_f64=w0._llvm_minnum_f64,l._llvm_round_f64=w0._llvm_round_f64,l._localIjToCell=w0._localIjToCell,l._malloc=w0._malloc,l._maxFaceCount=w0._maxFaceCount,l._maxGridDiskSize=w0._maxGridDiskSize,l._maxPolygonToCellsSize=w0._maxPolygonToCellsSize,l._maxPolygonToCellsSizeExperimental=w0._maxPolygonToCellsSizeExperimental,l._memcpy=w0._memcpy,l._memset=w0._memset,l._originToDirectedEdges=w0._originToDirectedEdges,l._pentagonCount=w0._pentagonCount,l._polygonToCells=w0._polygonToCells,l._polygonToCellsExperimental=w0._polygonToCellsExperimental,l._readInt64AsDoubleFromPointer=w0._readInt64AsDoubleFromPointer,l._res0CellCount=w0._res0CellCount,l._round=w0._round,l._sbrk=w0._sbrk,l._sizeOfCellBoundary=w0._sizeOfCellBoundary,l._sizeOfCoordIJ=w0._sizeOfCoordIJ,l._sizeOfGeoLoop=w0._sizeOfGeoLoop,l._sizeOfGeoPolygon=w0._sizeOfGeoPolygon,l._sizeOfH3Index=w0._sizeOfH3Index,l._sizeOfLatLng=w0._sizeOfLatLng,l._sizeOfLinkedGeoPolygon=w0._sizeOfLinkedGeoPolygon,l._uncompactCells=w0._uncompactCells,l._uncompactCellsSize=w0._uncompactCellsSize,l._vertexToLatLng=w0._vertexToLatLng,l.establishStackSpace=w0.establishStackSpace;var lt=l.stackAlloc=w0.stackAlloc,ZA=l.stackRestore=w0.stackRestore,Ie=l.stackSave=w0.stackSave;if(l.asm=w0,l.cwrap=F,l.setValue=H,l.getValue=D,_0){G0(_0)||(_0=y(_0));{F0();var MA=function(f0){f0.byteLength&&(f0=new Uint8Array(f0)),t0.set(f0,z),l.memoryInitializerRequest&&delete l.memoryInitializerRequest.response,L0()},qe=function(){m(_0,MA,function(){throw"could not load memory initializer "+_0})},at=Ye(_0);if(at)MA(at.buffer);else if(l.memoryInitializerRequest){var ct=function(){var f0=l.memoryInitializerRequest,y0=f0.response;if(f0.status!==200&&f0.status!==0){var V0=Ye(l.memoryInitializerRequestURL);if(V0)y0=V0.buffer;else{console.warn("a problem seems to have happened with Module.memoryInitializerRequest, status: "+f0.status+", retrying "+_0),qe();return}}MA(y0)};l.memoryInitializerRequest.response?setTimeout(ct,0):l.memoryInitializerRequest.addEventListener("load",ct)}else qe()}}var Le;I0=function f0(){Le||ut(),Le||(I0=f0)};function ut(f0){if(b0>0||(pA(),b0>0))return;function y0(){Le||(Le=!0,!V&&(E0(),D0(),l.onRuntimeInitialized&&l.onRuntimeInitialized(),Q0()))}l.setStatus?(l.setStatus("Running..."),setTimeout(function(){setTimeout(function(){l.setStatus("")},1),y0()},1)):y0()}l.run=ut;function ke(f0){throw l.onAbort&&l.onAbort(f0),f0+="",C(f0),x(f0),V=!0,"abort("+f0+"). Build with -s ASSERTIONS=1 for more info."}if(l.abort=ke,l.preInit)for(typeof l.preInit=="function"&&(l.preInit=[l.preInit]);l.preInit.length>0;)l.preInit.pop()();return ut(),s})(typeof Ce=="object"?Ce:{}),J0="number",q0=J0,ot=J0,eA=J0,tA=J0,FA=J0,R0=J0,Tl=[["sizeOfH3Index",J0],["sizeOfLatLng",J0],["sizeOfCellBoundary",J0],["sizeOfGeoLoop",J0],["sizeOfGeoPolygon",J0],["sizeOfLinkedGeoPolygon",J0],["sizeOfCoordIJ",J0],["readInt64AsDoubleFromPointer",J0],["isValidCell",ot,[eA,tA]],["isValidIndex",ot,[eA,tA]],["latLngToCell",q0,[J0,J0,FA,R0]],["cellToLatLng",q0,[eA,tA,R0]],["cellToBoundary",q0,[eA,tA,R0]],["maxGridDiskSize",q0,[J0,R0]],["gridDisk",q0,[eA,tA,J0,R0]],["gridDiskDistances",q0,[eA,tA,J0,R0,R0]],["gridRing",q0,[eA,tA,J0,R0]],["gridRingUnsafe",q0,[eA,tA,J0,R0]],["maxPolygonToCellsSize",q0,[R0,FA,J0,R0]],["polygonToCells",q0,[R0,FA,J0,R0]],["maxPolygonToCellsSizeExperimental",q0,[R0,FA,J0,R0]],["polygonToCellsExperimental",q0,[R0,FA,J0,J0,J0,R0]],["cellsToLinkedMultiPolygon",q0,[R0,J0,R0]],["destroyLinkedMultiPolygon",null,[R0]],["compactCells",q0,[R0,R0,J0,J0]],["uncompactCells",q0,[R0,J0,J0,R0,J0,FA]],["uncompactCellsSize",q0,[R0,J0,J0,FA,R0]],["isPentagon",ot,[eA,tA]],["isResClassIII",ot,[eA,tA]],["getBaseCellNumber",J0,[eA,tA]],["getResolution",J0,[eA,tA]],["getIndexDigit",J0,[eA,tA,J0]],["constructCell",q0,[J0,J0,R0,R0]],["maxFaceCount",q0,[eA,tA,R0]],["getIcosahedronFaces",q0,[eA,tA,R0]],["cellToParent",q0,[eA,tA,FA,R0]],["cellToChildren",q0,[eA,tA,FA,R0]],["cellToCenterChild",q0,[eA,tA,FA,R0]],["cellToChildrenSize",q0,[eA,tA,FA,R0]],["cellToChildPos",q0,[eA,tA,FA,R0]],["childPosToCell",q0,[J0,J0,eA,tA,FA,R0]],["areNeighborCells",q0,[eA,tA,eA,tA,R0]],["cellsToDirectedEdge",q0,[eA,tA,eA,tA,R0]],["getDirectedEdgeOrigin",q0,[eA,tA,R0]],["getDirectedEdgeDestination",q0,[eA,tA,R0]],["isValidDirectedEdge",ot,[eA,tA]],["directedEdgeToCells",q0,[eA,tA,R0]],["originToDirectedEdges",q0,[eA,tA,R0]],["directedEdgeToBoundary",q0,[eA,tA,R0]],["gridDistance",q0,[eA,tA,eA,tA,R0]],["gridPathCells",q0,[eA,tA,eA,tA,R0]],["gridPathCellsSize",q0,[eA,tA,eA,tA,R0]],["cellToLocalIj",q0,[eA,tA,eA,tA,J0,R0]],["localIjToCell",q0,[eA,tA,R0,J0,R0]],["getHexagonAreaAvgM2",q0,[FA,R0]],["getHexagonAreaAvgKm2",q0,[FA,R0]],["getHexagonEdgeLengthAvgM",q0,[FA,R0]],["getHexagonEdgeLengthAvgKm",q0,[FA,R0]],["greatCircleDistanceM",J0,[R0,R0]],["greatCircleDistanceKm",J0,[R0,R0]],["greatCircleDistanceRads",J0,[R0,R0]],["cellAreaM2",q0,[eA,tA,R0]],["cellAreaKm2",q0,[eA,tA,R0]],["cellAreaRads2",q0,[eA,tA,R0]],["edgeLengthM",q0,[eA,tA,R0]],["edgeLengthKm",q0,[eA,tA,R0]],["edgeLengthRads",q0,[eA,tA,R0]],["getNumCells",q0,[FA,R0]],["getRes0Cells",q0,[R0]],["res0CellCount",J0],["getPentagons",q0,[J0,R0]],["pentagonCount",J0],["cellToVertex",q0,[eA,tA,J0,R0]],["cellToVertexes",q0,[eA,tA,R0]],["vertexToLatLng",q0,[eA,tA,R0]],["isValidVertex",ot,[eA,tA]]],Fl=0,Rl=1,Nl=2,Zl=3,Ql=4,Ol=5,Ul=6,$l=7,Wl=8,Gl=9,Yl=10,ql=11,Xl=12,Jl=13,Kl=14,A3=15,e3=16,t3=17,n3=18,r3=19,DA={};DA[Fl]="Success";DA[Rl]="The operation failed but a more specific error is not available";DA[Nl]="Argument was outside of acceptable range";DA[Zl]="Latitude or longitude arguments were outside of acceptable range";DA[Ql]="Resolution argument was outside of acceptable range";DA[Ol]="Cell argument was not valid";DA[Ul]="Directed edge argument was not valid";DA[$l]="Undirected edge argument was not valid";DA[Wl]="Vertex argument was not valid";DA[Gl]="Pentagon distortion was encountered";DA[Yl]="Duplicate input";DA[ql]="Cell arguments were not neighbors";DA[Xl]="Cell arguments had incompatible resolutions";DA[Jl]="Memory allocation failed";DA[Kl]="Bounds of provided memory were insufficient";DA[A3]="Mode or flags argument was not valid";DA[e3]="Index argument was not valid";DA[t3]="Base cell number was outside of acceptable range";DA[n3]="Child indexing digits invalid";DA[r3]="Child indexing digits refer to a deleted subsequence";var i3="Unknown error";function o3(s,l,u){var f=u&&"value"in u,h=new Error((s[l]||i3)+" (code: "+l+(f?", value: "+u.value:"")+")");return h.code=l,h}function s3(s,l){var u=arguments.length===2?{value:l}:{};return o3(DA,s,u)}function R2(s){if(s!==0)throw s3(s)}var he={};Tl.forEach(function(l){he[l[0]]=Ce.cwrap.apply(Ce,l)});var Hr=16,Wt=8;he.sizeOfH3Index();var l3=he.sizeOfLatLng(),a3=he.sizeOfCellBoundary();he.sizeOfGeoPolygon();he.sizeOfGeoLoop();he.sizeOfLinkedGeoPolygon();he.sizeOfCoordIJ();var c3=/[^0-9a-fA-F]/;function hn(s){if(Array.isArray(s)&&s.length===2&&Number.isInteger(s[0])&&Number.isInteger(s[1]))return s;if(typeof s!="string"||c3.test(s))return[0,0];var l=parseInt(s.substring(0,s.length-8),Hr),u=parseInt(s.substring(s.length-8),Hr);return[u,l]}function Gt(s){return g3(Ce.getValue(s,"double"))}function u3(s){return[Gt(s),Gt(s+Wt)]}function f3(s){return[Gt(s+Wt),Gt(s)]}function d3(s,l,u){for(var f=Ce.getValue(s,"i32"),h=s+Wt,y=[],m=f3,C=0;C<f*2;C+=2)y.push(m(h+Wt*C));return y.push(y[0]),y}function Br(s){var l=hn(s),u=l[0],f=l[1];return!!he.isValidCell(u,f)}function h3(s){var l=Ce._malloc(l3),u=hn(s),f=u[0],h=u[1];try{return R2(he.cellToLatLng(f,h,l)),u3(l)}finally{Ce._free(l)}}function p3(s,l){var u=Ce._malloc(a3),f=hn(s),h=f[0],y=f[1];try{return R2(he.cellToBoundary(h,y,u)),d3(u,l,l)}finally{Ce._free(u)}}function g3(s){return s*180/Math.PI}const m3=["#dbeafe","#93c5fd","#60a5fa","#3b82f6","#2563eb"];function y3({source:s,h3Field:l="h3",color:u,colorField:f,colorValues:h,opacity:y=.8,showStroke:m=!0,strokeColor:C="rgba(255,255,255,0.3)",strokeWidth:x=.5,hoverEffect:L=!0,clickEffect:M=!1,showLabel:S=!1,labelField:z,labelColor:H="#333",labelSize:D=12,active:V,select:O,style:R,onClick:N,onMouseMove:F,onMouseEnter:Y,onMouseLeave:X,...n0}){const Z=b.useMemo(()=>!s||s.length===0?{type:"FeatureCollection",features:[]}:{type:"FeatureCollection",features:s.filter(q=>{const t0=q[l];return typeof t0=="string"&&Br(t0)}).map(q=>{const t0=q[l],B=p3(t0,!0),U=[...B,B[0]],e0={};for(const c0 of Object.keys(q))c0!==l&&(e0[c0]=q[c0]);return e0._h3Index=t0,{type:"Feature",geometry:{type:"Polygon",coordinates:[U]},properties:e0}})},[s,l]),G=b.useMemo(()=>!S||!s||s.length===0?{type:"FeatureCollection",features:[]}:{type:"FeatureCollection",features:s.filter(q=>{const t0=q[l];return typeof t0=="string"&&Br(t0)}).map(q=>{const t0=q[l],[B,U]=h3(t0),e0={};for(const c0 of Object.keys(q))c0!==l&&(e0[c0]=q[c0]);return e0._h3Index=t0,{type:"Feature",geometry:{type:"Point",coordinates:[U,B]},properties:e0}})},[s,l,S]),r0=V??(L?{color:"#2563eb"}:!1),A0=O??(M?{color:"#1d4ed8"}:!1);return g.jsxs(g.Fragment,{children:[g.jsx(Lt,{...n0,source:Z,sourceType:"geojson",color:u,colorField:f,colorValues:h,opacity:y,active:r0,select:A0,style:R,onClick:N,onMouseMove:F,onMouseEnter:Y,onMouseLeave:X}),m&&g.jsx(re,{source:Z,sourceType:"geojson",color:C,size:x,style:{opacity:1}}),S&&z&&g.jsx(RA,{source:G,sourceType:"geojson",shapeField:z,shapeValues:"text",color:H,size:D,style:{textAnchor:"center",textOffset:[0,0],fontWeight:400,stroke:"#fff",strokeWidth:2}})]})}function N2({position:s="bottomleft",className:l,style:u,children:f}){const{positionClassName:h}=JA(s),y=XA();if(!f)return null;const m=g.jsx("div",{className:`l7-control l7-control-legend l7-control--glass${l?` ${l}`:""}`,style:{padding:"12px 14px",borderRadius:8,maxHeight:"40%",overflowY:"auto",...u},children:f});return y?m:g.jsx("div",{className:`l7-control-anchor ${h}`,children:m})}OA.mark(N2);function C3(s){return{mode:"select",features:s?[...s]:[],selectedFeatureId:null,isDrawing:!1,currentStrokeVertices:[],editingFeatureId:null}}let v3=0;function Vr(){return`annotation-${Date.now()}-${++v3}`}function R1(s,l){if(s.length<=2)return s;let u=0,f=0;const h=s[0],y=s[s.length-1];for(let m=1;m<s.length-1;m++){const C=x3(s[m],h,y);C>u&&(u=C,f=m)}if(u>l){const m=R1(s.slice(0,f+1),l),C=R1(s.slice(f),l);return m.slice(0,-1).concat(C)}return[h,y]}function x3(s,l,u){const f=u[0]-l[0],h=u[1]-l[1],y=f*f+h*h;if(y===0){const S=s[0]-l[0],z=s[1]-l[1];return Math.sqrt(S*S+z*z)}const m=((s[0]-l[0])*f+(s[1]-l[1])*h)/y,C=l[0]+m*f,x=l[1]+m*h,L=s[0]-C,M=s[1]-x;return Math.sqrt(L*L+M*M)}function b3(s){const{scene:l,mapsService:u,defaultFeatures:f,features:h,onAnnotationCreate:y,onAnnotationUpdate:m,onAnnotationDelete:C,onAnnotationSelect:x,onModeChange:L,onChange:M,activeColor:S,activeOpacity:z,activeStrokeWidth:H,activeFontSize:D}=s,V=b.useRef(C3(f)),[,O]=b.useState(0),R=b.useCallback(()=>O(B=>B+1),[]);b.useEffect(()=>{h!==void 0&&(V.current.features=h,R())},[h,R]);const N=b.useCallback(()=>h??V.current.features,[h]),F=b.useCallback(B=>{h===void 0&&(V.current.features=B),M==null||M(B),R()},[h,M,R]),Y=b.useCallback(B=>{var e0;const U=V.current.mode;U!==B&&(U==="highlighter"&&V.current.isDrawing&&(V.current.isDrawing=!1,V.current.currentStrokeVertices=[],(e0=u==null?void 0:u.setMapStatus)==null||e0.call(u,{dragEnable:!0})),V.current.mode=B,V.current.editingFeatureId=null,B!=="select"&&(V.current.selectedFeatureId=null,x==null||x(null)),L==null||L(B),R())},[u,L,x,R]),X=b.useCallback(B=>{const U=[...N(),B];F(U),y==null||y(B)},[N,F,y]),n0=b.useCallback((B,U)=>{const e0=N().map(c0=>{if(c0.id!==B)return c0;const h0={...c0,properties:{...c0.properties,...U,updatedAt:new Date().toISOString()}};return m==null||m(h0),h0});F(e0)},[N,F,m]),Z=b.useCallback(B=>{const U=N().find(c0=>c0.id===B);if(!U)return;const e0=N().filter(c0=>c0.id!==B);V.current.selectedFeatureId===B&&(V.current.selectedFeatureId=null,x==null||x(null)),V.current.editingFeatureId===B&&(V.current.editingFeatureId=null),F(e0),C==null||C(U)},[N,F,C,x]),G=b.useCallback(B=>{V.current.selectedFeatureId=B;const U=B?N().find(e0=>e0.id===B)??null:null;x==null||x(U),R()},[N,x,R]),r0=b.useCallback(()=>{V.current.selectedFeatureId=null,V.current.editingFeatureId=null,F([]),x==null||x(null)},[F,x]),A0=b.useCallback((B,U,e0)=>{const c0=N().map(h0=>{if(h0.id!==B)return h0;const p0={...h0,geometry:{type:"Point",coordinates:[U,e0]},properties:{...h0.properties,updatedAt:new Date().toISOString()}};return m==null||m(p0),p0});F(c0)},[N,F,m]),o0=b.useCallback(B=>{V.current.editingFeatureId=B,R()},[R]),q=b.useCallback(()=>{V.current.editingFeatureId=null,R()},[R]),t0=b.useCallback((B,U,e0)=>{const c0=new Date().toISOString(),h0={type:"Feature",id:Vr(),geometry:{type:"Point",coordinates:[B,U]}};switch(e0){case"marker":return{...h0,properties:{annotationType:"marker",color:S,createdAt:c0}};case"text":return{...h0,properties:{annotationType:"text",text:"",color:S,fontSize:D,createdAt:c0}};case"note":return{...h0,properties:{annotationType:"note",title:"",body:"",color:S,createdAt:c0}};case"link":return{...h0,properties:{annotationType:"link",url:"",title:"",color:S,createdAt:c0}};case"image":return{...h0,properties:{annotationType:"image",src:"",createdAt:c0}};case"video":return{...h0,properties:{annotationType:"video",url:"",createdAt:c0}};default:return{...h0,properties:{annotationType:"marker",color:S,createdAt:c0}}}},[S,D]);return b.useEffect(()=>{if(!l||!u)return;const B=h0=>{const p0=V.current,S0=We(h0);if(!S0)return;const[Z0,x0]=S0,g0=p0.mode;if(!(g0==="select"||g0==="none")&&g0!=="highlighter"&&(g0==="marker"||g0==="text"||g0==="note"||g0==="link"||g0==="image"||g0==="video")){const T0=t0(Z0,x0,g0);X(T0),V.current.mode=g0,V.current.selectedFeatureId=T0.id,x==null||x(T0),g0!=="marker"&&(V.current.editingFeatureId=T0.id),g0!=="marker"&&(V.current.mode="select",L==null||L("select")),R()}},U=h0=>{var Z0;const p0=V.current;if(p0.mode!=="highlighter")return;const S0=We(h0);S0&&(p0.isDrawing=!0,p0.currentStrokeVertices=[S0],(Z0=u.setMapStatus)==null||Z0.call(u,{dragEnable:!1}),R())},e0=h0=>{var x0,g0;const p0=V.current;if(!p0.isDrawing||p0.mode!=="highlighter")return;const S0=We(h0);if(!S0)return;const Z0=p0.currentStrokeVertices;if(Z0.length>0){const T0=Z0[Z0.length-1],j0=((x0=u.lngLatToContainer)==null?void 0:x0.call(u,T0))??{x:0,y:0},B0=((g0=u.lngLatToContainer)==null?void 0:g0.call(u,S0))??{x:0,y:0};if(h2(j0,B0)<4)return}p0.currentStrokeVertices=[...Z0,S0],R()},c0=()=>{var x0;const h0=V.current;if(!h0.isDrawing||h0.mode!=="highlighter")return;h0.isDrawing=!1,(x0=u.setMapStatus)==null||x0.call(u,{dragEnable:!0});const p0=h0.currentStrokeVertices;if(p0.length<2){h0.currentStrokeVertices=[],R();return}const S0=R1(p0,5e-5);h0.currentStrokeVertices=[];const Z0={type:"Feature",id:Vr(),geometry:{type:"LineString",coordinates:S0},properties:{annotationType:"highlighter",color:S,strokeWidth:H,strokeOpacity:z,createdAt:new Date().toISOString()}};X(Z0),R()};return l.on("click",B),l.on("mousedown",U),l.on("mousemove",e0),l.on("mouseup",c0),()=>{l.off("click",B),l.off("mousedown",U),l.off("mousemove",e0),l.off("mouseup",c0)}},[l,u,X,t0,x,L,R]),b.useEffect(()=>{const B=U=>{var p0,S0;const e0=(p0=U.target)==null?void 0:p0.tagName;if(e0==="INPUT"||e0==="TEXTAREA"||(S0=U.target)!=null&&S0.isContentEditable)return;if(U.key==="Escape"){Y("select");return}if(U.key==="Delete"||U.key==="Backspace"){const Z0=V.current.selectedFeatureId;Z0&&Z(Z0);return}const h0={m:"marker",h:"highlighter",t:"text",n:"note",k:"link",i:"image",v:"video"}[U.key.toLowerCase()];h0&&Y(h0)};return document.addEventListener("keydown",B),()=>document.removeEventListener("keydown",B)},[Y,Z]),{mode:V.current.mode,features:N(),selectedFeatureId:V.current.selectedFeatureId,editingFeatureId:V.current.editingFeatureId,isDrawing:V.current.isDrawing,currentStrokeVertices:V.current.currentStrokeVertices,setMode:Y,addFeature:X,updateFeature:n0,deleteFeature:Z,selectFeature:G,clearAll:r0,getFeatures:N,openEditor:o0,closeEditor:q,moveFeature:A0}}const _r=[{mode:"select",icon:"pan_tool",title:"选择 — 点击标注选中/拖拽移动",shortcut:"Esc"},{mode:"marker",icon:"location_on",title:"标记 — 单击放置地图钉",shortcut:"M"},{mode:"highlighter",icon:"ink_highlighter",title:"高亮 — 按住拖拽手绘",shortcut:"H"},{mode:"text",icon:"title",title:"文字 — 单击放置文字标签",shortcut:"T"},{mode:"note",icon:"sticky_note_2",title:"笔记 — 单击放置富文本笔记",shortcut:"N"},{mode:"link",icon:"link",title:"链接 — 单击放置链接",shortcut:"K"},{mode:"image",icon:"image",title:"图片 — 单击放置图片",shortcut:"I"},{mode:"video",icon:"videocam",title:"视频 — 单击放置视频",shortcut:"V"}];function w3(){const s=b.useRef(null),l=b.useCallback((f,h,y)=>{var R;if(!s.current){const N=document.createElement("div");N.style.cssText=["position:fixed","pointer-events:none","z-index:9999","padding:5px 10px","border-radius:4px","background:rgba(26,27,34,0.92)","color:#f2eff9",'font:500 11px/16px "JetBrains Mono",monospace',"white-space:nowrap","box-shadow:0 2px 8px rgba(0,0,0,0.3)"].join(";"),document.body.appendChild(N),s.current=N}const m=s.current;m.textContent=`${h} ${y}`,m.style.display="block";const C=m.getBoundingClientRect(),x=f.currentTarget.getBoundingClientRect(),M=((R=f.currentTarget.closest('.l7-map-container, [id*="map"]'))==null?void 0:R.getBoundingClientRect())??{left:0,top:0,right:window.innerWidth,bottom:window.innerHeight},S="right"in M?M.right:window.innerWidth,z="bottom"in M?M.bottom:window.innerHeight,H=M.left,D=M.top;let V=x.left-C.width-8,O=x.top+x.height/2-C.height/2;V<H+4&&(V=x.right+8),V+C.width>S-4&&(V=x.left+x.width/2-C.width/2,O=x.top-C.height-8),O<D+4&&(O=x.bottom+8),O+C.height>z-4&&(O=x.top-C.height-8),m.style.left=`${Math.max(H+4,Math.min(V,S-C.width-4))}px`,m.style.top=`${Math.max(D+4,Math.min(O,z-C.height-4))}px`},[]),u=b.useCallback(()=>{s.current&&(s.current.style.display="none")},[]);return b.useEffect(()=>()=>{var f;s.current&&((f=s.current.parentElement)==null||f.removeChild(s.current),s.current=null)},[]),{showTooltip:l,hideTooltip:u}}const L3=({activeMode:s,onModeChange:l,tools:u,hasSelection:f=!1,hasFeatures:h=!1,onDeleteSelected:y,onClearAll:m,className:C,style:x})=>{const{showTooltip:L,hideTooltip:M}=w3(),S=b.useMemo(()=>u?_r.filter(H=>u.includes(H.mode)):_r,[u]),z=b.useCallback(H=>{l(H==="select"||s===H?"select":H)},[s,l]);return g.jsxs("div",{className:`l7-control l7-control-annotation l7-control--glass${C?` ${C}`:""}`,style:x,role:"toolbar","aria-label":"标注工具",children:[S.map(H=>g.jsx("button",{className:`l7-button-control l7-annotation-tool-btn${s===H.mode?" l7-button-control--active":""}`,onClick:()=>z(H.mode),onMouseEnter:D=>L(D,H.title,H.shortcut),onMouseLeave:M,"aria-label":H.title,"aria-pressed":s===H.mode,children:g.jsx("span",{className:"material-symbols-outlined",children:H.icon})},H.mode)),f&&y&&g.jsxs(g.Fragment,{children:[g.jsx("div",{className:"l7-draw-separator"}),g.jsx("button",{className:"l7-button-control l7-annotation-action-btn",onClick:y,onMouseEnter:H=>L(H,"删除选中标注","Del"),onMouseLeave:M,"aria-label":"删除选中标注",children:g.jsx("span",{className:"material-symbols-outlined",children:"delete"})})]}),h&&m&&g.jsx("button",{className:"l7-button-control l7-annotation-action-btn",onClick:m,onMouseEnter:H=>L(H,"清除所有标注",""),onMouseLeave:M,"aria-label":"清除所有标注",children:g.jsx("span",{className:"material-symbols-outlined",children:"delete_sweep"})})]})},Be={marker:{color:"#3f51b5",size:32},highlighter:{color:"#ffeb3b",width:8,opacity:.5},text:{color:"#1a1a2e",fontSize:14,fontFamily:"inherit"},note:{color:"#3f51b5",maxWidth:240},link:{color:"#3f51b5"},image:{maxWidth:200,borderRadius:8},video:{maxWidth:200}},k3=["#3f51b5","#e53935","#43a047","#fb8c00","#8e24aa","#00897b","#5c6bc0","#d81b60"];function M3(s){return s?{marker:{...Be.marker,...s.marker},highlighter:{...Be.highlighter,...s.highlighter},text:{...Be.text,...s.text},note:{...Be.note,...s.note},link:{...Be.link,...s.link},image:{...Be.image,...s.image},video:{...Be.video,...s.video}}:Be}const E3={marker:"translate(-50%, -100%)",text:"translate(-50%, -50%)",note:"translate(-50%, -100%)",link:"translate(-50%, -100%)",image:"translate(-50%, -100%)",video:"translate(-50%, -100%)"};function z3(s,l){const{annotationType:u}=s.properties;switch(u){case"marker":{const f=s.properties,h=f.color||l.marker.color;return`
|
|
2
|
+
<div class="aimapui-annotation-marker" style="color:${h}">
|
|
3
|
+
<span class="material-symbols-outlined" style="font-size:${l.marker.size}px;color:${h}">location_on</span>
|
|
4
|
+
${f.label?`<div class="aimapui-annotation-marker-label">${st(f.label)}</div>`:""}
|
|
5
5
|
</div>
|
|
6
|
-
`}case"text":{const
|
|
7
|
-
<div class="aimapui-annotation-text" style="color:${
|
|
8
|
-
${
|
|
6
|
+
`}case"text":{const f=s.properties,h=f.color||l.text.color,y=f.fontSize||l.text.fontSize,m=f.text||"(空文字)";return`
|
|
7
|
+
<div class="aimapui-annotation-text" style="color:${h};font-size:${y}px">
|
|
8
|
+
${st(m)}
|
|
9
9
|
</div>
|
|
10
|
-
`}case"note":{const
|
|
11
|
-
<div class="aimapui-annotation-note" style="border-left-color:${
|
|
12
|
-
<div class="aimapui-annotation-note-title">${
|
|
13
|
-
${
|
|
10
|
+
`}case"note":{const f=s.properties;return`
|
|
11
|
+
<div class="aimapui-annotation-note" style="border-left-color:${f.color||l.note.color};max-width:${l.note.maxWidth}px">
|
|
12
|
+
<div class="aimapui-annotation-note-title">${st(f.title||"无标题")}</div>
|
|
13
|
+
${f.body?`<div class="aimapui-annotation-note-body">${st(f.body)}</div>`:""}
|
|
14
14
|
</div>
|
|
15
|
-
`}case"link":{const
|
|
16
|
-
<div class="aimapui-annotation-link" style="--link-color:${
|
|
15
|
+
`}case"link":{const f=s.properties;return`
|
|
16
|
+
<div class="aimapui-annotation-link" style="--link-color:${f.color||l.link.color}">
|
|
17
17
|
<span class="material-symbols-outlined" style="font-size:16px">link</span>
|
|
18
|
-
<span class="aimapui-annotation-link-title">${
|
|
18
|
+
<span class="aimapui-annotation-link-title">${st(f.title||f.url||"未设置链接")}</span>
|
|
19
19
|
</div>
|
|
20
|
-
`}case"image":{const
|
|
21
|
-
<div class="aimapui-annotation-image" style="width:${
|
|
22
|
-
data-annotation-image-id="${
|
|
23
|
-
<img src="${
|
|
24
|
-
style="border-radius:${
|
|
25
|
-
<div class="aimapui-annotation-image-resize-handle" data-resize-id="${
|
|
20
|
+
`}case"image":{const f=s.properties,h=f.width||l.image.maxWidth,y=f.height;return f.src?`
|
|
21
|
+
<div class="aimapui-annotation-image" style="width:${h}px"
|
|
22
|
+
data-annotation-image-id="${s.id}">
|
|
23
|
+
<img src="${Ot(f.src)}" alt="${Ot(f.alt||"")}"
|
|
24
|
+
style="border-radius:${l.image.borderRadius}px;width:100%;display:block;${y?`height:${y}px;object-fit:cover;`:""}" />
|
|
25
|
+
<div class="aimapui-annotation-image-resize-handle" data-resize-id="${s.id}"></div>
|
|
26
26
|
</div>
|
|
27
27
|
`:`
|
|
28
28
|
<div class="aimapui-annotation-image-placeholder" style="width:80px;height:60px">
|
|
29
29
|
<span class="material-symbols-outlined" style="font-size:32px;color:#999">image</span>
|
|
30
30
|
</div>
|
|
31
|
-
`}case"video":{const
|
|
32
|
-
<div class="aimapui-annotation-video" style="max-width:${
|
|
33
|
-
${
|
|
31
|
+
`}case"video":{const f=s.properties;return`
|
|
32
|
+
<div class="aimapui-annotation-video" style="max-width:${l.video.maxWidth}px">
|
|
33
|
+
${f.thumbnailUrl?`<img src="${Ot(f.thumbnailUrl)}" class="aimapui-annotation-video-thumb" />`:'<div class="aimapui-annotation-video-placeholder"><span class="material-symbols-outlined" style="font-size:32px">videocam</span></div>'}
|
|
34
34
|
<div class="aimapui-annotation-video-play">
|
|
35
35
|
<span class="material-symbols-outlined">play_arrow</span>
|
|
36
36
|
</div>
|
|
37
|
-
${
|
|
37
|
+
${f.title?`<div class="aimapui-annotation-video-title">${st(f.title)}</div>`:""}
|
|
38
38
|
</div>
|
|
39
|
-
`}default:return""}}function
|
|
39
|
+
`}default:return""}}function st(s){return s.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")}function Ot(s){return s.replace(/"/g,""").replace(/'/g,"'")}const j3=({features:s,selectedId:l,editingId:u,scene:f,mapsService:h,styles:y,onSelect:m,onDoubleClick:C,onMove:x,onInlineCommit:L,onInlineCancel:M,onResize:S})=>{const z=b.useRef(null),H=b.useRef(new Map),D=b.useRef(null),V=b.useRef(null),O=M3(y),R=b.useCallback(()=>{if(!h)return;const N=H.current;for(const F of s){if(F.properties.annotationType==="highlighter")continue;const Y=N.get(F.id);if(!Y)continue;const X=F.geometry.coordinates;try{const n0=h.lngLatToContainer(X);if(!n0||isNaN(n0.x)||isNaN(n0.y))continue;const Z=E3[F.properties.annotationType]||"translate(-50%, -100%)",G=Math.round(n0.x),r0=Math.round(n0.y);Y.style.transform=`translate3d(${G}px, ${r0}px, 0) ${Z}`}catch{}}},[s,h]);return b.useEffect(()=>{if(!h)return;const N=()=>R();return h.on("camerachange",N),()=>{h.off("camerachange",N)}},[h,R]),b.useEffect(()=>{var Z;if(!h)return;const N=(Z=h.getMarkerContainer)==null?void 0:Z.call(h);if(!N)return;if(!z.current){const G=document.createElement("div");G.className="aimapui-annotation-container",G.style.cssText="position:absolute;top:0;left:0;width:0;height:0;z-index:10;",N.appendChild(G),z.current=G}const F=z.current,Y=H.current,X=new Map,n0=s.filter(G=>G.properties.annotationType!=="highlighter");for(const G of n0){let r0=Y.get(G.id);if(r0||(r0=document.createElement("div"),r0.className="aimapui-annotation-item",r0.style.cssText="position:absolute;left:0;top:0;pointer-events:auto;cursor:pointer;user-select:none;",r0.dataset.annotationId=G.id,r0.addEventListener("click",q=>{q.stopPropagation(),m(G.id)}),r0.addEventListener("dblclick",q=>{q.stopPropagation(),C(G.id)}),r0.addEventListener("mousedown",q=>{if(q.button!==0)return;const t0=G.geometry.coordinates;D.current={id:G.id,startLng:t0[0],startLat:t0[1],startX:q.clientX,startY:q.clientY,isDragging:!1}}),F.appendChild(r0)),G.id===u&&(G.properties.annotationType==="text"||G.properties.annotationType==="link")){const q=G.properties.annotationType,t0=q==="text"?G.properties.text||"":G.properties.url||"",B=q==="text"?"Add text...":"https://...",U=G.properties.color||(q==="text"?O.text.color:O.link.color),e0=q==="text"?G.properties.fontSize||O.text.fontSize:14;r0.innerHTML=`
|
|
40
40
|
<input
|
|
41
41
|
class="aimapui-annotation-inline-input"
|
|
42
42
|
type="text"
|
|
43
|
-
value="${
|
|
44
|
-
placeholder="${
|
|
45
|
-
style="color:${
|
|
46
|
-
data-annotation-inline="${
|
|
47
|
-
data-annotation-type="${
|
|
43
|
+
value="${Ot(t0)}"
|
|
44
|
+
placeholder="${B}"
|
|
45
|
+
style="color:${U};font-size:${e0}px"
|
|
46
|
+
data-annotation-inline="${G.id}"
|
|
47
|
+
data-annotation-type="${q}"
|
|
48
48
|
/>
|
|
49
|
-
`;const R=T.querySelector("input");R&&document.activeElement!==R&&requestAnimationFrame(()=>{R==null||R.focus(),R==null||R.select()}),T.dataset.inlineBound||(T.dataset.inlineBound="1",T.addEventListener("keydown",_=>{var Q;const $=_,G=$.target;if((Q=G==null?void 0:G.dataset)!=null&&Q.annotationInline){if($.key==="Enter"){$.preventDefault(),$.stopPropagation();const U=G.dataset.annotationInline,q=G.dataset.annotationType,ee=G.value.trim();if(ee){const D=q==="text"?{text:ee}:{url:ee,title:ee};d==null||d(U,D)}else h==null||h(U)}else if($.key==="Escape"){$.preventDefault(),$.stopPropagation();const U=G.dataset.annotationInline;h==null||h(U)}}}),T.addEventListener("blur",_=>{var q;const $=_.target;if(!((q=$==null?void 0:$.dataset)!=null&&q.annotationInline))return;const G=$.dataset.annotationInline,Q=$.dataset.annotationType,U=$.value.trim();setTimeout(()=>{if(U){const ee=Q==="text"?{text:U}:{url:U,title:U};d==null||d(G,ee)}else h==null||h(G)},100)},!0))}else T.dataset.inlineBound="",T.innerHTML=qo(j,v);const Z=T.querySelector("[data-resize-id]");Z&&(Z.onmousedown=E=>{E.stopPropagation(),E.preventDefault();const N=Z.parentElement;x.current={id:j.id,startX:E.clientX,startY:E.clientY,startWidth:(N==null?void 0:N.offsetWidth)??200,startHeight:(N==null?void 0:N.offsetHeight)??150}}),j.id===t?T.classList.add("aimapui-annotation-item--selected"):T.classList.remove("aimapui-annotation-item--selected"),j.id===n?T.classList.add("aimapui-annotation-item--editing"):T.classList.remove("aimapui-annotation-item--editing"),V.set(j.id,T),z.delete(j.id)}for(const[,j]of z)b.removeChild(j);g.current=V,L()},[e,t,n,o,v,s,l,L]),u.useEffect(()=>{const k=z=>{var T;const V=x.current;if(V){const H=z.clientX-V.startX,Z=z.clientY-V.startY,E=Math.max(60,V.startWidth+H),N=Math.max(40,V.startHeight+Z),y=document.querySelector(`[data-annotation-image-id="${V.id}"]`);if(y){y.style.width=`${E}px`;const w=y.querySelector("img");w&&(w.style.height=`${N}px`,w.style.objectFit="cover")}return}const F=m.current;if(!F||!o)return;const M=z.clientX-F.startX,j=z.clientY-F.startY;if(!(!F.isDragging&&Math.abs(M)+Math.abs(j)<4)){F.isDragging=!0;try{const H=(T=o.getMapContainer)==null?void 0:T.call(o),Z=H==null?void 0:H.getBoundingClientRect(),E=Z?z.clientX-Z.left:z.clientX,N=Z?z.clientY-Z.top:z.clientY,y=o.containerToLngLat({x:E,y:N});y&&c(F.id,y.lng,y.lat)}catch{}}},b=z=>{const V=x.current;if(V&&f){const F=z.clientX-V.startX,M=z.clientY-V.startY,j=Math.max(60,V.startWidth+F),T=Math.max(40,V.startHeight+M);f(V.id,j,T)}x.current=null,m.current=null};return document.addEventListener("mousemove",k),document.addEventListener("mouseup",b),()=>{document.removeEventListener("mousemove",k),document.removeEventListener("mouseup",b)}},[o,c,f]),u.useEffect(()=>()=>{var k;p.current&&((k=p.current.parentElement)==null||k.removeChild(p.current),p.current=null),g.current.clear()},[]),null};function Xo(e,t,n){u.useEffect(()=>{if(!e||!t||!n.current)return;const r=()=>{if(!n.current||e.properties.annotationType==="highlighter")return;const a=e.geometry.coordinates;try{const s=t.lngLatToContainer(a);if(!s||isNaN(s.x)||isNaN(s.y))return;const l=document.querySelector(`[data-annotation-id="${e.id}"]`),h=((l==null?void 0:l.offsetHeight)??40)+8;n.current.style.transform=`translate3d(${Math.round(s.x)}px, ${Math.round(s.y-h)}px, 0) translate(-50%, -100%)`}catch{}};r();const o=requestAnimationFrame(r);return t.on("camerachange",r),()=>{cancelAnimationFrame(o),t.off("camerachange",r)}},[e,t,n])}const Go=({feature:e,onSave:t,onCancel:n,onDelete:r})=>{const[o,a]=u.useState(e.properties.text||""),s=u.useRef(null);u.useEffect(()=>{var c;(c=s.current)==null||c.focus()},[]);const l=()=>{o.trim()?t(e.id,{text:o.trim()}):r(e.id),n()};return i.jsxs("div",{className:"aimapui-annotation-editor-form",children:[i.jsx("input",{ref:s,className:"aimapui-annotation-editor-input",value:o,onChange:c=>a(c.target.value),onKeyDown:c=>{c.key==="Enter"&&l(),c.key==="Escape"&&n()},placeholder:"输入文字..."}),i.jsxs("div",{className:"aimapui-annotation-editor-actions",children:[i.jsx("button",{className:"aimapui-annotation-editor-btn aimapui-annotation-editor-btn--primary",onClick:l,children:"确定"}),i.jsx("button",{className:"aimapui-annotation-editor-btn",onClick:n,children:"取消"})]})]})},Jo=({feature:e,onSave:t,onCancel:n,onDelete:r})=>{const o=e.properties,[a,s]=u.useState(o.title||""),[l,c]=u.useState(o.body||""),d=u.useRef(null);u.useEffect(()=>{var f;(f=d.current)==null||f.focus()},[]);const h=()=>{a.trim()||l.trim()?t(e.id,{title:a.trim(),body:l.trim()}):r(e.id),n()};return i.jsxs("div",{className:"aimapui-annotation-editor-form",children:[i.jsx("input",{ref:d,className:"aimapui-annotation-editor-input",value:a,onChange:f=>s(f.target.value),placeholder:"标题...",onKeyDown:f=>{f.key==="Escape"&&n()}}),i.jsx("textarea",{className:"aimapui-annotation-editor-textarea",value:l,onChange:f=>c(f.target.value),placeholder:"正文内容...",rows:4,onKeyDown:f=>{f.key==="Escape"&&n()}}),i.jsxs("div",{className:"aimapui-annotation-editor-actions",children:[i.jsx("button",{className:"aimapui-annotation-editor-btn aimapui-annotation-editor-btn--primary",onClick:h,children:"确定"}),i.jsx("button",{className:"aimapui-annotation-editor-btn",onClick:n,children:"取消"})]})]})},Ko=({feature:e,onSave:t,onCancel:n,onDelete:r})=>{const o=e.properties,[a,s]=u.useState(o.url||""),[l,c]=u.useState(o.title||""),d=u.useRef(null);u.useEffect(()=>{var f;(f=d.current)==null||f.focus()},[]);const h=()=>{a.trim()?t(e.id,{url:a.trim(),title:l.trim()||a.trim()}):r(e.id),n()};return i.jsxs("div",{className:"aimapui-annotation-editor-form",children:[i.jsx("input",{ref:d,className:"aimapui-annotation-editor-input",value:a,onChange:f=>s(f.target.value),placeholder:"https://...",onKeyDown:f=>{f.key==="Enter"&&h(),f.key==="Escape"&&n()}}),i.jsx("input",{className:"aimapui-annotation-editor-input",value:l,onChange:f=>c(f.target.value),placeholder:"链接标题(可选)...",onKeyDown:f=>{f.key==="Enter"&&h(),f.key==="Escape"&&n()}}),i.jsxs("div",{className:"aimapui-annotation-editor-actions",children:[i.jsx("button",{className:"aimapui-annotation-editor-btn aimapui-annotation-editor-btn--primary",onClick:h,children:"确定"}),i.jsx("button",{className:"aimapui-annotation-editor-btn",onClick:n,children:"取消"})]})]})},Qo=({feature:e,onSave:t,onCancel:n,onDelete:r,onUpload:o})=>{const a=e.properties,[s,l]=u.useState(a.src||""),[c,d]=u.useState(a.alt||""),[h,f]=u.useState(!1),p=u.useRef(null);u.useEffect(()=>{!a.src&&o&&requestAnimationFrame(()=>{var x;return(x=p.current)==null?void 0:x.click()})},[]);const g=u.useCallback(async x=>{var L;const v=(L=x.target.files)==null?void 0:L[0];if(!v){a.src||(r(e.id),n());return}if(o){f(!0);try{const k=await o(v,"image");l(k),t(e.id,{src:k,alt:c.trim()}),n()}catch(k){console.error("[AnnotationEditor] Image upload failed:",k)}finally{f(!1)}}},[o,e.id,c,t,n,r,a.src]),m=()=>{s.trim()?t(e.id,{src:s.trim(),alt:c.trim()}):r(e.id),n()};return i.jsxs("div",{className:"aimapui-annotation-editor-form",children:[o&&i.jsxs("div",{className:"aimapui-annotation-editor-upload",children:[i.jsxs("button",{className:"aimapui-annotation-editor-btn",onClick:()=>{var x;return(x=p.current)==null?void 0:x.click()},disabled:h,children:[i.jsx("span",{className:"material-symbols-outlined",style:{fontSize:16,marginRight:4},children:"upload"}),h?"上传中...":"选择图片"]}),i.jsx("input",{ref:p,type:"file",accept:"image/*",onChange:g,style:{display:"none"}})]}),i.jsx("input",{className:"aimapui-annotation-editor-input",value:s,onChange:x=>l(x.target.value),placeholder:"或输入图片 URL...",onKeyDown:x=>{x.key==="Enter"&&m(),x.key==="Escape"&&n()}}),i.jsx("input",{className:"aimapui-annotation-editor-input",value:c,onChange:x=>d(x.target.value),placeholder:"图片描述(可选)...",onKeyDown:x=>{x.key==="Enter"&&m(),x.key==="Escape"&&n()}}),s&&i.jsx("div",{className:"aimapui-annotation-editor-preview",children:i.jsx("img",{src:s,alt:c,style:{maxWidth:"100%",maxHeight:120,borderRadius:4}})}),i.jsxs("div",{className:"aimapui-annotation-editor-actions",children:[i.jsx("button",{className:"aimapui-annotation-editor-btn aimapui-annotation-editor-btn--primary",onClick:m,children:"确定"}),i.jsx("button",{className:"aimapui-annotation-editor-btn",onClick:n,children:"取消"})]})]})},es=({feature:e,onSave:t,onCancel:n,onDelete:r})=>{const o=e.properties,[a,s]=u.useState(o.url||""),[l,c]=u.useState(o.title||""),d=u.useRef(null);u.useEffect(()=>{var f;(f=d.current)==null||f.focus()},[]);const h=()=>{a.trim()?t(e.id,{url:a.trim(),title:l.trim()}):r(e.id),n()};return i.jsxs("div",{className:"aimapui-annotation-editor-form",children:[i.jsx("input",{ref:d,className:"aimapui-annotation-editor-input",value:a,onChange:f=>s(f.target.value),placeholder:"视频 URL...",onKeyDown:f=>{f.key==="Enter"&&h(),f.key==="Escape"&&n()}}),i.jsx("input",{className:"aimapui-annotation-editor-input",value:l,onChange:f=>c(f.target.value),placeholder:"视频标题(可选)...",onKeyDown:f=>{f.key==="Enter"&&h(),f.key==="Escape"&&n()}}),i.jsxs("div",{className:"aimapui-annotation-editor-actions",children:[i.jsx("button",{className:"aimapui-annotation-editor-btn aimapui-annotation-editor-btn--primary",onClick:h,children:"确定"}),i.jsx("button",{className:"aimapui-annotation-editor-btn",onClick:n,children:"取消"})]})]})},ts=({feature:e,scene:t,mapsService:n,onSave:r,onCancel:o,onDelete:a,onUpload:s})=>{const l=u.useRef(null),c=u.useRef(null);if(Xo(e,n,l),u.useEffect(()=>{var g;if(!n)return;const f=(g=n.getMarkerContainer)==null?void 0:g.call(n);if(!f)return;const p=document.createElement("div");return p.className="aimapui-annotation-editor-container",p.style.cssText="position:absolute;top:0;left:0;width:0;height:0;z-index:20;pointer-events:none;",f.appendChild(p),c.current=p,()=>{var m;(m=p.parentElement)==null||m.removeChild(p),c.current=null}},[n]),!e||!c.current)return null;const{annotationType:d}=e.properties;if(d==="marker"||d==="highlighter")return null;const h=i.jsxs("div",{ref:l,className:"aimapui-annotation-editor",style:{position:"absolute",left:0,top:0,pointerEvents:"auto"},onClick:f=>f.stopPropagation(),children:[i.jsxs("div",{className:"aimapui-annotation-editor-header",children:[i.jsx("span",{className:"material-symbols-outlined",style:{fontSize:16},children:d==="text"?"title":d==="note"?"sticky_note_2":d==="link"?"link":d==="image"?"image":"videocam"}),i.jsx("span",{style:{marginLeft:6,fontSize:12},children:d==="text"?"编辑文字":d==="note"?"编辑笔记":d==="link"?"编辑链接":d==="image"?"编辑图片":"编辑视频"})]}),d==="text"&&i.jsx(Go,{feature:e,onSave:r,onCancel:o,onDelete:a}),d==="note"&&i.jsx(Jo,{feature:e,onSave:r,onCancel:o,onDelete:a}),d==="link"&&i.jsx(Ko,{feature:e,onSave:r,onCancel:o,onDelete:a}),d==="image"&&i.jsx(Qo,{feature:e,onSave:r,onCancel:o,onDelete:a,onUpload:s}),d==="video"&&i.jsx(es,{feature:e,onSave:r,onCancel:o,onDelete:a})]});return Re.createPortal(h,c.current)},ns=({value:e,onChange:t})=>i.jsxs("div",{className:"aimapui-style-panel-row",children:[i.jsx("span",{className:"aimapui-style-panel-label",children:"颜色"}),i.jsx("div",{className:"aimapui-style-panel-swatches",children:Bo.map(n=>i.jsx("button",{className:`aimapui-style-panel-swatch${e===n?" aimapui-style-panel-swatch--active":""}`,style:{background:n},onClick:()=>t(n),"aria-label":n},n))})]}),dt=({label:e,value:t,min:n,max:r,step:o,unit:a="",onChange:s})=>i.jsxs("div",{className:"aimapui-style-panel-row",children:[i.jsx("span",{className:"aimapui-style-panel-label",children:e}),i.jsx("input",{type:"range",className:"aimapui-style-panel-slider",min:n,max:r,step:o,value:t,onChange:l=>s(Number(l.target.value))}),i.jsxs("span",{className:"aimapui-style-panel-value",children:[t,a]})]});function rs(e,t){return t?t.properties.annotationType:e==="select"||e==="none"?null:e}const os=({mode:e,selectedFeature:t,activeColor:n,activeOpacity:r,activeStrokeWidth:o,activeFontSize:a,onColorChange:s,onOpacityChange:l,onStrokeWidthChange:c,onFontSizeChange:d,onUpdateFeature:h})=>{const f=rs(e,t),p=u.useCallback(z=>{s(z),t&&h&&h(t.id,{color:z})},[s,t,h]),g=u.useCallback(z=>{l(z),(t==null?void 0:t.properties.annotationType)==="highlighter"&&h&&h(t.id,{strokeOpacity:z})},[l,t,h]),m=u.useCallback(z=>{c(z),(t==null?void 0:t.properties.annotationType)==="highlighter"&&h&&h(t.id,{strokeWidth:z})},[c,t,h]),x=u.useCallback(z=>{d(z),(t==null?void 0:t.properties.annotationType)==="text"&&h&&h(t.id,{fontSize:z})},[d,t,h]);if(!f)return null;const v=["marker","highlighter","text","note","link"].includes(f),L=f==="highlighter",k=f==="highlighter",b=f==="text";return!v&&!L&&!k&&!b?null:i.jsxs("div",{className:"aimapui-style-panel l7-control--glass",children:[v&&i.jsx(ns,{value:n,onChange:p}),L&&i.jsx(dt,{label:"透明度",value:r,min:.1,max:1,step:.1,onChange:g}),k&&i.jsx(dt,{label:"线宽",value:o,min:2,max:24,step:1,unit:"px",onChange:m}),b&&i.jsx(dt,{label:"字号",value:a,min:10,max:48,step:1,unit:"px",onChange:x})]})},x1="aimapui-annotation-highlighter-";class ss{constructor(t){this.completedLayer=null,this.drawingLayer=null,this.scene=t}removeAndDestroy(t){var n;if(t){try{this.scene.removeLayer(t)}catch{}try{(n=t.destroy)==null||n.call(t)}catch{}}}addLayerWithRender(t){t.once("inited",()=>{try{this.scene.render()}catch{}}),this.scene.addLayer(t)}updateCompleted(t){const r={type:"FeatureCollection",features:t.filter(o=>o.properties.annotationType==="highlighter").map(o=>({type:"Feature",geometry:o.geometry,properties:{id:o.id,color:o.properties.color||"#ffeb3b",width:o.properties.strokeWidth||8,opacity:o.properties.strokeOpacity||.5}}))};this.completedLayer?this.completedLayer.setData(r):(this.completedLayer=new ge.LineLayer({name:`${x1}completed`,zIndex:8}).source(r).color("color",o=>o).size("width",o=>o).style({opacity:.5,lineType:"solid",lineCap:"round",lineJoin:"round"}).shape("line"),this.addLayerWithRender(this.completedLayer))}updateDrawing(t){if(t.length<2){this.drawingLayer&&(this.removeAndDestroy(this.drawingLayer),this.drawingLayer=null);return}const n={type:"FeatureCollection",features:[{type:"Feature",geometry:{type:"LineString",coordinates:t},properties:{color:"#ffeb3b",width:8,opacity:.5}}]};this.drawingLayer?this.drawingLayer.setData(n):(this.drawingLayer=new ge.LineLayer({name:`${x1}drawing`,zIndex:9}).source(n).color("#ffeb3b").size(8).style({opacity:.5,lineType:"solid",lineCap:"round",lineJoin:"round"}).shape("line"),this.addLayerWithRender(this.drawingLayer))}destroy(){this.removeAndDestroy(this.completedLayer),this.removeAndDestroy(this.drawingLayer),this.completedLayer=null,this.drawingLayer=null}}const w0=u.forwardRef(function({position:t="topright",defaultFeatures:n,features:r,tools:o,styles:a,onUpload:s,className:l,style:c,onAnnotationCreate:d,onAnnotationUpdate:h,onAnnotationDelete:f,onAnnotationSelect:p,onModeChange:g,onChange:m},x){const{scene:v,mapsService:L,positionClassName:k}=ke(t),b=Me(),z=u.useRef(null),V=u.useRef(null),[F,M]=u.useState("#3f51b5"),[j,T]=u.useState(.5),[H,Z]=u.useState(8),[E,N]=u.useState(14),y=$o({scene:v,mapsService:L,defaultFeatures:n,features:r,onAnnotationCreate:d,onAnnotationUpdate:h,onAnnotationDelete:f,onAnnotationSelect:p,onModeChange:g,onChange:m,activeColor:F,activeOpacity:j,activeStrokeWidth:H,activeFontSize:E});u.useImperativeHandle(x,()=>({setMode:y.setMode,addAnnotation:y.addFeature,updateAnnotation:y.updateFeature,deleteAnnotation:y.deleteFeature,clearAll:y.clearAll,getAnnotations:y.getFeatures,selectAnnotation:y.selectFeature}),[y]);const w=u.useCallback(J=>{y.setMode(J)},[y]),I=u.useCallback(()=>{y.selectedFeatureId&&y.deleteFeature(y.selectedFeatureId)},[y]),R=u.useCallback(()=>{y.clearAll()},[y]),_=u.useCallback((J,ie)=>{y.updateFeature(J,ie),y.closeEditor()},[y]),$=u.useCallback(J=>{const ie=y.getFeatures().find(A=>A.id===J);ie&&(ie.properties.annotationType==="text"?!ie.properties.text:!ie.properties.url)&&y.deleteFeature(J),y.closeEditor()},[y]),G=u.useCallback((J,ie,A)=>{y.updateFeature(J,{width:ie,height:A})},[y]);u.useEffect(()=>{if(v)return z.current=new ss(v),()=>{var J;(J=z.current)==null||J.destroy(),z.current=null}},[v]),u.useEffect(()=>{z.current&&z.current.updateCompleted(y.features)},[y.features]),u.useEffect(()=>{z.current&&z.current.updateDrawing(y.currentStrokeVertices)},[y.currentStrokeVertices]),u.useEffect(()=>{var A;if(!L)return;const J=(A=L.getMapContainer)==null?void 0:A.call(L);if(!J)return;const ie=y.mode;return ie!=="select"&&ie!=="none"?J.style.cursor="crosshair":J.style.cursor="",()=>{J.style.cursor=""}},[y.mode,L]),u.useEffect(()=>{var A;if(!L)return;const J=(A=L.getMapContainer)==null?void 0:A.call(L);if(!J)return;const ie=document.createElement("div");return ie.className="aimapui-style-panel-anchor",ie.style.cssText="position:absolute;top:10px;left:10px;z-index:10;pointer-events:auto;",J.appendChild(ie),V.current=ie,()=>{var C;(C=ie.parentElement)==null||C.removeChild(ie),V.current=null}},[L]);const Q=y.selectedFeatureId!==null,U=y.features.length>0,q=y.selectedFeatureId?y.features.find(J=>J.id===y.selectedFeatureId)??null:null,ee=y.editingFeatureId?y.features.find(J=>J.id===y.editingFeatureId):void 0,D=ee&&(ee.properties.annotationType==="text"||ee.properties.annotationType==="link"),B=ee&&!D,le=i.jsxs(i.Fragment,{children:[i.jsx(Oo,{activeMode:y.mode,onModeChange:w,tools:o,hasSelection:Q,hasFeatures:U,onDeleteSelected:I,onClearAll:R}),i.jsx(Yo,{features:y.features,selectedId:y.selectedFeatureId,editingId:y.editingFeatureId,scene:v,mapsService:L,styles:a,onSelect:y.selectFeature,onDoubleClick:y.openEditor,onMove:y.moveFeature,onInlineCommit:_,onInlineCancel:$,onResize:G}),B&&i.jsx(ts,{feature:ee,scene:v,mapsService:L,onSave:y.updateFeature,onCancel:y.closeEditor,onDelete:y.deleteFeature,onUpload:s})]}),se=V.current?Re.createPortal(i.jsx(os,{mode:y.mode,selectedFeature:q,activeColor:F,activeOpacity:j,activeStrokeWidth:H,activeFontSize:E,onColorChange:M,onOpacityChange:T,onStrokeWidthChange:Z,onFontSizeChange:N,onUpdateFeature:y.updateFeature}),V.current):null;return b?i.jsxs(i.Fragment,{children:[i.jsx("div",{className:l,style:c,children:le}),se]}):i.jsxs(i.Fragment,{children:[i.jsx("div",{className:`l7-control-anchor ${k}`,children:le}),se]})});Le.mark(w0);function M0({logos:e,position:t="bottomleft",className:n,style:r}){const{positionClassName:o}=ke(t),a=Me(),s=i.jsx("div",{className:`l7-control l7-control-logo${n?` ${n}`:""}`,style:r,children:e.map((l,c)=>{const d=i.jsx("img",{src:l.src,alt:l.alt??"logo",width:l.width??24,height:l.width??24,style:{objectFit:"contain",display:"block"}},c);return l.href?i.jsx("a",{href:l.href,target:"_blank",rel:"noopener noreferrer",className:"l7-control-logo-link",children:d},c):i.jsx("div",{className:"l7-control-logo-link",children:d},c)})});return a?s:i.jsx("div",{className:`l7-control-anchor ${o}`,children:s})}Le.mark(M0);function is({children:e,defaultSnap:t="collapsed",collapsedHeight:n=80,halfRatio:r=.45,expandedRatio:o=.85,onSnapChange:a,className:s,showHandle:l=!0,borderRadius:c=32}){const d=u.useRef(null),h=u.useRef(0),f=u.useRef(0),p=u.useRef(!1),[g,m]=u.useState(0),[x,v]=u.useState(t),[L,k]=u.useState(!1),b=u.useCallback(()=>{var Z;const H=(Z=d.current)==null?void 0:Z.offsetParent;return H?H.clientHeight:window.innerHeight},[]),z=u.useCallback(H=>{const Z=b();switch(H){case"collapsed":return n;case"half":return Z*r;case"expanded":return Z*o}},[n,r,o,b]);u.useEffect(()=>{m(z(t))},[t,z]);const V=u.useCallback((H,Z)=>{const E=z("collapsed"),N=z("half"),y=z("expanded");let w;if(Math.abs(Z)>.5)Z>0?w=H>N?"expanded":"half":w=H<N?"collapsed":"half";else{const I=Math.abs(H-E),R=Math.abs(H-N),_=Math.abs(H-y),$=Math.min(I,R,_);$===I?w="collapsed":$===R?w="half":w="expanded"}k(!0),v(w),m(z(w)),a==null||a(w),setTimeout(()=>k(!1),300)},[z,a]),F=u.useCallback(H=>{p.current=!0,h.current=H.touches[0].clientY,f.current=g,k(!1)},[g]),M=u.useCallback(H=>{if(!p.current)return;const Z=h.current-H.touches[0].clientY,E=b()*o,N=Math.max(n,Math.min(E,f.current+Z));m(N)},[n,o,b]),j=u.useCallback(H=>{if(!p.current)return;p.current=!1;const E=(h.current-H.changedTouches[0].clientY)/100;V(g,E)},[g,V]),T=u.useCallback(H=>{p.current=!0,h.current=H.clientY,f.current=g,k(!1);const Z=N=>{if(!p.current)return;const y=h.current-N.clientY,w=b()*o,I=Math.max(n,Math.min(w,f.current+y));m(I)},E=N=>{p.current=!1;const w=(h.current-N.clientY)/100,I=b()*o;V(Math.max(n,Math.min(I,f.current+(h.current-N.clientY))),w),document.removeEventListener("mousemove",Z),document.removeEventListener("mouseup",E)};document.addEventListener("mousemove",Z),document.addEventListener("mouseup",E)},[g,n,o,V,b]);return u.useCallback(H=>{k(!0),v(H),m(z(H)),a==null||a(H),setTimeout(()=>k(!1),300)},[z,a]),i.jsx("div",{ref:d,className:s,style:{position:"absolute",bottom:0,left:0,width:"100%",height:g,zIndex:1e3,pointerEvents:"auto",transition:L?"height 0.3s cubic-bezier(0.4, 0, 0.2, 1)":"none",willChange:"height",touchAction:"none"},children:i.jsxs("div",{style:{width:"100%",height:"100%",background:"var(--color-surface, #f8f9ff)",borderTopLeftRadius:c,borderTopRightRadius:c,boxShadow:"0 -10px 40px rgba(0, 0, 0, 0.15)",borderTop:"1px solid rgba(195, 198, 215, 0.2)",display:"flex",flexDirection:"column",overflow:"hidden"},children:[i.jsx("div",{onTouchStart:F,onTouchMove:M,onTouchEnd:j,onMouseDown:T,style:{padding:"12px 0 16px",cursor:"grab",userSelect:"none",flexShrink:0},children:l&&i.jsx("div",{style:{width:48,height:6,borderRadius:3,background:"rgba(195, 198, 215, 0.5)",margin:"0 auto"}})}),i.jsx("div",{style:{flex:1,overflowY:x==="collapsed"?"hidden":"auto",overflowX:"hidden",padding:"0 16px",WebkitOverflowScrolling:"touch",msOverflowStyle:"none",scrollbarWidth:"none"},children:e})]})})}function as({placeholder:e="搜索地点...",onSearch:t,onFilter:n,className:r,trailing:o}){const[a,s]=u.useState(""),l=u.useCallback(d=>{const h=d.target.value;s(h),t==null||t(h)},[t]),c=u.useCallback(()=>{s(""),t==null||t("")},[t]);return i.jsxs("div",{className:`glass-panel ${r??""}`,style:{display:"flex",alignItems:"center",padding:"12px 16px",borderRadius:16,boxShadow:"0 2px 8px rgba(0, 0, 0, 0.08)",border:"1px solid rgba(195, 198, 215, 0.3)"},children:[i.jsx("span",{className:"material-symbols-outlined",style:{color:"var(--color-primary, #004ac6)",marginRight:12,fontSize:22},children:"search"}),i.jsx("input",{type:"text",value:a,onChange:l,placeholder:e,style:{flex:1,border:"none",background:"transparent",outline:"none",fontSize:14,lineHeight:"20px",color:"var(--color-on-surface, #121c2a)"}}),a&&i.jsx("button",{onClick:c,style:{background:"none",border:"none",cursor:"pointer",padding:4,borderRadius:999,display:"flex",alignItems:"center",justifyContent:"center"},children:i.jsx("span",{className:"material-symbols-outlined",style:{fontSize:18,color:"var(--color-on-surface-variant, #434655)"},children:"close"})}),n&&i.jsx("button",{onClick:n,style:{background:"none",border:"none",cursor:"pointer",padding:4,borderRadius:999,display:"flex",alignItems:"center",justifyContent:"center",marginLeft:4},children:i.jsx("span",{className:"material-symbols-outlined",style:{fontSize:22,color:"var(--color-on-surface-variant, #434655)"},children:"tune"})}),o]})}function Bt(e,t){if(!t)return e;const n={...e};for(const r of Object.keys(t)){const o=t[r],a=n[r];o!==null&&typeof o=="object"&&!Array.isArray(o)&&a!==null&&typeof a=="object"&&!Array.isArray(a)?n[r]=Bt(a,o):o!==void 0&&(n[r]=o)}return n}function ls(e,t){return t?Bt(e,t):e}class cs extends u.Component{constructor(){super(...arguments),this.state={hasError:!1,error:null}}static getDerivedStateFromError(t){return{hasError:!0,error:t}}componentDidCatch(t,n){var r,o;(o=(r=this.props).onError)==null||o.call(r,t,n)}render(){if(this.state.hasError){const{fallback:t}=this.props,{error:n}=this.state;return typeof t=="function"?t(n):t||i.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",width:"100%",height:"100%",padding:32,color:"#666",fontFamily:"system-ui, sans-serif"},children:[i.jsx("span",{className:"material-symbols-outlined",style:{fontSize:48,marginBottom:16,color:"#e53e3e"},children:"error"}),i.jsx("p",{style:{fontSize:16,fontWeight:600,marginBottom:8},children:"地图加载失败"}),i.jsx("p",{style:{fontSize:13,color:"#999"},children:(n==null?void 0:n.message)??"未知错误"})]})}return this.props.children}}exports.ADMIN_SEQUENTIAL_COLORS=y0;exports.AiMap=Tr;exports.AiMapJSONSchema=Br;exports.AnnotationControl=w0;exports.ArcFlowLayer=Ao;exports.BottomSheet=is;exports.BubbleLayer=qr;exports.ChinaDistrict=lo;exports.ControlContainer=Mt;exports.ControlRegistry=Le;exports.ControlRenderer=r0;exports.DEFAULT_CITY_SOURCE=C0;exports.DEFAULT_DISTRICT_SOURCE=v0;exports.DEFAULT_PROVINCE_SOURCE=x0;exports.DrawControl=Ft;exports.ErrorBoundary=cs;exports.EventBus=k1;exports.EventBusProvider=j1;exports.ExportImageControl=At;exports.FillLayer=to;exports.FullscreenControl=zt;exports.GAODE_THEME_PRESETS=gt;exports.GeoLocateControl=jt;exports.GlyphLayer=jo;exports.HeatmapHexagonLayer=f0;exports.HeatmapLayer=p0;exports.HexagonLayer=f0;exports.INDEPENDENT_MAP_THEME_PRESETS=Zn;exports.IconLayer=b0;exports.ImageCalibrationControl=Tt;exports.ImageLayer=Wr;exports.InteractionRenderer=a0;exports.LayerRenderer=B1;exports.LayerSwitchControl=Zt;exports.LegendCategories=Nt;exports.LegendControl=L0;exports.LegendDiverging=Pt;exports.LegendIcon=Ot;exports.LegendLineWidth=$t;exports.LegendProportion=_t;exports.LegendRamp=It;exports.LegendRenderer=l0;exports.LegendSize=Dt;exports.LegendThreshold=Rt;exports.LineLayer=He;exports.LogoControl=M0;exports.MAKI_ICONS=Te;exports.MAKI_ICON_NAMES=Lr;exports.MapSceneRenderer=T1;exports.MapThemeControl=Vt;exports.Marker=Pe;exports.MarkerClusterLayer=Yr;exports.MobileSheetLegend=h0;exports.MobileToolbar=d0;exports.MouseLocationControl=Et;exports.OPENFREEMAP_THEME_PRESETS=An;exports.PointLayer=we;exports.PolygonLayer=ot;exports.Popup=qe;exports.RasterLayer=g0;exports.ResponsiveProvider=Zr;exports.RouteLayer=Zo;exports.SATELLITE_PROVIDER_NAMES=Vo;exports.SatelliteLayer=Eo;exports.ScaleControl=St;exports.SceneProvider=Z1;exports.SchemaProvider=M1;exports.SearchBar=as;exports.ThemeProvider=V1;exports.TiffRasterLayer=Io;exports.Tooltip=wt;exports.ZoomControl=kt;exports.adaptHeatmapLayer=$1;exports.adaptImageLayer=O1;exports.adaptLineLayer=R1;exports.adaptPointLayer=P1;exports.adaptPolygonLayer=D1;exports.adaptRasterLayer=_1;exports.applyControlDefaults=b1;exports.applyLayerDefaults=v1;exports.applyMapDefaults=nt;exports.applyResponsiveOverrides=ls;exports.applySchemaDefaults=xt;exports.createBasemap=F1;exports.createEventBus=S1;exports.createMakiIconMap=wr;exports.createMakiPinMap=i0;exports.cx=pe;exports.deepMerge=Bt;exports.diffSchema=Dr;exports.getPopperDirection=ft;exports.hexToRgba=un;exports.makiIconUrl=o0;exports.makiPinUrl=s0;exports.parseSchema=L1;exports.useControlContainer=Me;exports.useEventBus=Ct;exports.useMapControl=ke;exports.useMapPosition=Lt;exports.usePopperPosition=Ht;exports.useResponsive=u0;exports.useScene=ye;exports.useSchema=B0;exports.useTheme=E1;exports.validateAiMapSchema=$r;exports.validateSchema=O0;
|
|
49
|
+
`;const c0=r0.querySelector("input");c0&&document.activeElement!==c0&&requestAnimationFrame(()=>{c0==null||c0.focus(),c0==null||c0.select()}),r0.dataset.inlineBound||(r0.dataset.inlineBound="1",r0.addEventListener("keydown",h0=>{var Z0;const p0=h0,S0=p0.target;if((Z0=S0==null?void 0:S0.dataset)!=null&&Z0.annotationInline){if(p0.key==="Enter"){p0.preventDefault(),p0.stopPropagation();const x0=S0.dataset.annotationInline,g0=S0.dataset.annotationType,T0=S0.value.trim();if(T0){const j0=g0==="text"?{text:T0}:{url:T0,title:T0};L==null||L(x0,j0)}else M==null||M(x0)}else if(p0.key==="Escape"){p0.preventDefault(),p0.stopPropagation();const x0=S0.dataset.annotationInline;M==null||M(x0)}}}),r0.addEventListener("blur",h0=>{var g0;const p0=h0.target;if(!((g0=p0==null?void 0:p0.dataset)!=null&&g0.annotationInline))return;const S0=p0.dataset.annotationInline,Z0=p0.dataset.annotationType,x0=p0.value.trim();setTimeout(()=>{if(x0){const T0=Z0==="text"?{text:x0}:{url:x0,title:x0};L==null||L(S0,T0)}else M==null||M(S0)},100)},!0))}else r0.dataset.inlineBound="",r0.innerHTML=z3(G,O);const o0=r0.querySelector("[data-resize-id]");o0&&(o0.onmousedown=q=>{q.stopPropagation(),q.preventDefault();const t0=o0.parentElement;V.current={id:G.id,startX:q.clientX,startY:q.clientY,startWidth:(t0==null?void 0:t0.offsetWidth)??200,startHeight:(t0==null?void 0:t0.offsetHeight)??150}}),G.id===l?r0.classList.add("aimapui-annotation-item--selected"):r0.classList.remove("aimapui-annotation-item--selected"),G.id===u?r0.classList.add("aimapui-annotation-item--editing"):r0.classList.remove("aimapui-annotation-item--editing"),X.set(G.id,r0),Y.delete(G.id)}for(const[,G]of Y)F.removeChild(G);H.current=X,R()},[s,l,u,h,O,m,C,R]),b.useEffect(()=>{const N=Y=>{var r0;const X=V.current;if(X){const A0=Y.clientX-X.startX,o0=Y.clientY-X.startY,q=Math.max(60,X.startWidth+A0),t0=Math.max(40,X.startHeight+o0),B=document.querySelector(`[data-annotation-image-id="${X.id}"]`);if(B){B.style.width=`${q}px`;const U=B.querySelector("img");U&&(U.style.height=`${t0}px`,U.style.objectFit="cover")}return}const n0=D.current;if(!n0||!h)return;const Z=Y.clientX-n0.startX,G=Y.clientY-n0.startY;if(!(!n0.isDragging&&Math.abs(Z)+Math.abs(G)<4)){n0.isDragging=!0;try{const A0=(r0=h.getMapContainer)==null?void 0:r0.call(h),o0=A0==null?void 0:A0.getBoundingClientRect(),q=o0?Y.clientX-o0.left:Y.clientX,t0=o0?Y.clientY-o0.top:Y.clientY,B=h.containerToLngLat({x:q,y:t0});B&&x(n0.id,B.lng,B.lat)}catch{}}},F=Y=>{const X=V.current;if(X&&S){const n0=Y.clientX-X.startX,Z=Y.clientY-X.startY,G=Math.max(60,X.startWidth+n0),r0=Math.max(40,X.startHeight+Z);S(X.id,G,r0)}V.current=null,D.current=null};return document.addEventListener("mousemove",N),document.addEventListener("mouseup",F),()=>{document.removeEventListener("mousemove",N),document.removeEventListener("mouseup",F)}},[h,x,S]),b.useEffect(()=>()=>{var N;z.current&&((N=z.current.parentElement)==null||N.removeChild(z.current),z.current=null),H.current.clear()},[]),null};function S3(s,l,u){b.useEffect(()=>{if(!s||!l||!u.current)return;const f=()=>{if(!u.current||s.properties.annotationType==="highlighter")return;const y=s.geometry.coordinates;try{const m=l.lngLatToContainer(y);if(!m||isNaN(m.x)||isNaN(m.y))return;const C=document.querySelector(`[data-annotation-id="${s.id}"]`),M=((C==null?void 0:C.offsetHeight)??40)+8;u.current.style.transform=`translate3d(${Math.round(m.x)}px, ${Math.round(m.y-M)}px, 0) translate(-50%, -100%)`}catch{}};f();const h=requestAnimationFrame(f);return l.on("camerachange",f),()=>{cancelAnimationFrame(h),l.off("camerachange",f)}},[s,l,u])}const D3=({feature:s,onSave:l,onCancel:u,onDelete:f})=>{const[h,y]=b.useState(s.properties.text||""),m=b.useRef(null);b.useEffect(()=>{var x;(x=m.current)==null||x.focus()},[]);const C=()=>{h.trim()?l(s.id,{text:h.trim()}):f(s.id),u()};return g.jsxs("div",{className:"aimapui-annotation-editor-form",children:[g.jsx("input",{ref:m,className:"aimapui-annotation-editor-input",value:h,onChange:x=>y(x.target.value),onKeyDown:x=>{x.key==="Enter"&&C(),x.key==="Escape"&&u()},placeholder:"输入文字..."}),g.jsxs("div",{className:"aimapui-annotation-editor-actions",children:[g.jsx("button",{className:"aimapui-annotation-editor-btn aimapui-annotation-editor-btn--primary",onClick:C,children:"确定"}),g.jsx("button",{className:"aimapui-annotation-editor-btn",onClick:u,children:"取消"})]})]})},H3=({feature:s,onSave:l,onCancel:u,onDelete:f})=>{const h=s.properties,[y,m]=b.useState(h.title||""),[C,x]=b.useState(h.body||""),L=b.useRef(null);b.useEffect(()=>{var S;(S=L.current)==null||S.focus()},[]);const M=()=>{y.trim()||C.trim()?l(s.id,{title:y.trim(),body:C.trim()}):f(s.id),u()};return g.jsxs("div",{className:"aimapui-annotation-editor-form",children:[g.jsx("input",{ref:L,className:"aimapui-annotation-editor-input",value:y,onChange:S=>m(S.target.value),placeholder:"标题...",onKeyDown:S=>{S.key==="Escape"&&u()}}),g.jsx("textarea",{className:"aimapui-annotation-editor-textarea",value:C,onChange:S=>x(S.target.value),placeholder:"正文内容...",rows:4,onKeyDown:S=>{S.key==="Escape"&&u()}}),g.jsxs("div",{className:"aimapui-annotation-editor-actions",children:[g.jsx("button",{className:"aimapui-annotation-editor-btn aimapui-annotation-editor-btn--primary",onClick:M,children:"确定"}),g.jsx("button",{className:"aimapui-annotation-editor-btn",onClick:u,children:"取消"})]})]})},B3=({feature:s,onSave:l,onCancel:u,onDelete:f})=>{const h=s.properties,[y,m]=b.useState(h.url||""),[C,x]=b.useState(h.title||""),L=b.useRef(null);b.useEffect(()=>{var S;(S=L.current)==null||S.focus()},[]);const M=()=>{y.trim()?l(s.id,{url:y.trim(),title:C.trim()||y.trim()}):f(s.id),u()};return g.jsxs("div",{className:"aimapui-annotation-editor-form",children:[g.jsx("input",{ref:L,className:"aimapui-annotation-editor-input",value:y,onChange:S=>m(S.target.value),placeholder:"https://...",onKeyDown:S=>{S.key==="Enter"&&M(),S.key==="Escape"&&u()}}),g.jsx("input",{className:"aimapui-annotation-editor-input",value:C,onChange:S=>x(S.target.value),placeholder:"链接标题(可选)...",onKeyDown:S=>{S.key==="Enter"&&M(),S.key==="Escape"&&u()}}),g.jsxs("div",{className:"aimapui-annotation-editor-actions",children:[g.jsx("button",{className:"aimapui-annotation-editor-btn aimapui-annotation-editor-btn--primary",onClick:M,children:"确定"}),g.jsx("button",{className:"aimapui-annotation-editor-btn",onClick:u,children:"取消"})]})]})},V3=({feature:s,onSave:l,onCancel:u,onDelete:f,onUpload:h})=>{const y=s.properties,[m,C]=b.useState(y.src||""),[x,L]=b.useState(y.alt||""),[M,S]=b.useState(!1),z=b.useRef(null);b.useEffect(()=>{!y.src&&h&&requestAnimationFrame(()=>{var V;return(V=z.current)==null?void 0:V.click()})},[]);const H=b.useCallback(async V=>{var R;const O=(R=V.target.files)==null?void 0:R[0];if(!O){y.src||(f(s.id),u());return}if(h){S(!0);try{const N=await h(O,"image");C(N),l(s.id,{src:N,alt:x.trim()}),u()}catch(N){console.error("[AnnotationEditor] Image upload failed:",N)}finally{S(!1)}}},[h,s.id,x,l,u,f,y.src]),D=()=>{m.trim()?l(s.id,{src:m.trim(),alt:x.trim()}):f(s.id),u()};return g.jsxs("div",{className:"aimapui-annotation-editor-form",children:[h&&g.jsxs("div",{className:"aimapui-annotation-editor-upload",children:[g.jsxs("button",{className:"aimapui-annotation-editor-btn",onClick:()=>{var V;return(V=z.current)==null?void 0:V.click()},disabled:M,children:[g.jsx("span",{className:"material-symbols-outlined",style:{fontSize:16,marginRight:4},children:"upload"}),M?"上传中...":"选择图片"]}),g.jsx("input",{ref:z,type:"file",accept:"image/*",onChange:H,style:{display:"none"}})]}),g.jsx("input",{className:"aimapui-annotation-editor-input",value:m,onChange:V=>C(V.target.value),placeholder:"或输入图片 URL...",onKeyDown:V=>{V.key==="Enter"&&D(),V.key==="Escape"&&u()}}),g.jsx("input",{className:"aimapui-annotation-editor-input",value:x,onChange:V=>L(V.target.value),placeholder:"图片描述(可选)...",onKeyDown:V=>{V.key==="Enter"&&D(),V.key==="Escape"&&u()}}),m&&g.jsx("div",{className:"aimapui-annotation-editor-preview",children:g.jsx("img",{src:m,alt:x,style:{maxWidth:"100%",maxHeight:120,borderRadius:4}})}),g.jsxs("div",{className:"aimapui-annotation-editor-actions",children:[g.jsx("button",{className:"aimapui-annotation-editor-btn aimapui-annotation-editor-btn--primary",onClick:D,children:"确定"}),g.jsx("button",{className:"aimapui-annotation-editor-btn",onClick:u,children:"取消"})]})]})},_3=({feature:s,onSave:l,onCancel:u,onDelete:f})=>{const h=s.properties,[y,m]=b.useState(h.url||""),[C,x]=b.useState(h.title||""),L=b.useRef(null);b.useEffect(()=>{var S;(S=L.current)==null||S.focus()},[]);const M=()=>{y.trim()?l(s.id,{url:y.trim(),title:C.trim()}):f(s.id),u()};return g.jsxs("div",{className:"aimapui-annotation-editor-form",children:[g.jsx("input",{ref:L,className:"aimapui-annotation-editor-input",value:y,onChange:S=>m(S.target.value),placeholder:"视频 URL...",onKeyDown:S=>{S.key==="Enter"&&M(),S.key==="Escape"&&u()}}),g.jsx("input",{className:"aimapui-annotation-editor-input",value:C,onChange:S=>x(S.target.value),placeholder:"视频标题(可选)...",onKeyDown:S=>{S.key==="Enter"&&M(),S.key==="Escape"&&u()}}),g.jsxs("div",{className:"aimapui-annotation-editor-actions",children:[g.jsx("button",{className:"aimapui-annotation-editor-btn aimapui-annotation-editor-btn--primary",onClick:M,children:"确定"}),g.jsx("button",{className:"aimapui-annotation-editor-btn",onClick:u,children:"取消"})]})]})},I3=({feature:s,scene:l,mapsService:u,onSave:f,onCancel:h,onDelete:y,onUpload:m})=>{const C=b.useRef(null),x=b.useRef(null);if(S3(s,u,C),b.useEffect(()=>{var H;if(!u)return;const S=(H=u.getMarkerContainer)==null?void 0:H.call(u);if(!S)return;const z=document.createElement("div");return z.className="aimapui-annotation-editor-container",z.style.cssText="position:absolute;top:0;left:0;width:0;height:0;z-index:20;pointer-events:none;",S.appendChild(z),x.current=z,()=>{var D;(D=z.parentElement)==null||D.removeChild(z),x.current=null}},[u]),!s||!x.current)return null;const{annotationType:L}=s.properties;if(L==="marker"||L==="highlighter")return null;const M=g.jsxs("div",{ref:C,className:"aimapui-annotation-editor",style:{position:"absolute",left:0,top:0,pointerEvents:"auto"},onClick:S=>S.stopPropagation(),children:[g.jsxs("div",{className:"aimapui-annotation-editor-header",children:[g.jsx("span",{className:"material-symbols-outlined",style:{fontSize:16},children:L==="text"?"title":L==="note"?"sticky_note_2":L==="link"?"link":L==="image"?"image":"videocam"}),g.jsx("span",{style:{marginLeft:6,fontSize:12},children:L==="text"?"编辑文字":L==="note"?"编辑笔记":L==="link"?"编辑链接":L==="image"?"编辑图片":"编辑视频"})]}),L==="text"&&g.jsx(D3,{feature:s,onSave:f,onCancel:h,onDelete:y}),L==="note"&&g.jsx(H3,{feature:s,onSave:f,onCancel:h,onDelete:y}),L==="link"&&g.jsx(B3,{feature:s,onSave:f,onCancel:h,onDelete:y}),L==="image"&&g.jsx(V3,{feature:s,onSave:f,onCancel:h,onDelete:y,onUpload:m}),L==="video"&&g.jsx(_3,{feature:s,onSave:f,onCancel:h,onDelete:y})]});return $e.createPortal(M,x.current)},P3=({value:s,onChange:l})=>g.jsxs("div",{className:"aimapui-style-panel-row",children:[g.jsx("span",{className:"aimapui-style-panel-label",children:"颜色"}),g.jsx("div",{className:"aimapui-style-panel-swatches",children:k3.map(u=>g.jsx("button",{className:`aimapui-style-panel-swatch${s===u?" aimapui-style-panel-swatch--active":""}`,style:{background:u},onClick:()=>l(u),"aria-label":u},u))})]}),B1=({label:s,value:l,min:u,max:f,step:h,unit:y="",onChange:m})=>g.jsxs("div",{className:"aimapui-style-panel-row",children:[g.jsx("span",{className:"aimapui-style-panel-label",children:s}),g.jsx("input",{type:"range",className:"aimapui-style-panel-slider",min:u,max:f,step:h,value:l,onChange:C=>m(Number(C.target.value))}),g.jsxs("span",{className:"aimapui-style-panel-value",children:[l,y]})]});function T3(s,l){return l?l.properties.annotationType:s==="select"||s==="none"?null:s}const F3=({mode:s,selectedFeature:l,activeColor:u,activeOpacity:f,activeStrokeWidth:h,activeFontSize:y,onColorChange:m,onOpacityChange:C,onStrokeWidthChange:x,onFontSizeChange:L,onUpdateFeature:M})=>{const S=T3(s,l),z=b.useCallback(Y=>{m(Y),l&&M&&M(l.id,{color:Y})},[m,l,M]),H=b.useCallback(Y=>{C(Y),(l==null?void 0:l.properties.annotationType)==="highlighter"&&M&&M(l.id,{strokeOpacity:Y})},[C,l,M]),D=b.useCallback(Y=>{x(Y),(l==null?void 0:l.properties.annotationType)==="highlighter"&&M&&M(l.id,{strokeWidth:Y})},[x,l,M]),V=b.useCallback(Y=>{L(Y),(l==null?void 0:l.properties.annotationType)==="text"&&M&&M(l.id,{fontSize:Y})},[L,l,M]);if(!S)return null;const O=["marker","highlighter","text","note","link"].includes(S),R=S==="highlighter",N=S==="highlighter",F=S==="text";return!O&&!R&&!N&&!F?null:g.jsxs("div",{className:"aimapui-style-panel l7-control--glass",children:[O&&g.jsx(P3,{value:u,onChange:z}),R&&g.jsx(B1,{label:"透明度",value:f,min:.1,max:1,step:.1,onChange:H}),N&&g.jsx(B1,{label:"线宽",value:h,min:2,max:24,step:1,unit:"px",onChange:D}),F&&g.jsx(B1,{label:"字号",value:y,min:10,max:48,step:1,unit:"px",onChange:V})]})},Ir="aimapui-annotation-highlighter-";class R3{constructor(l){this.completedLayer=null,this.drawingLayer=null,this.scene=l}removeAndDestroy(l){var u;if(l){try{this.scene.removeLayer(l)}catch{}try{(u=l.destroy)==null||u.call(l)}catch{}}}addLayerWithRender(l){l.once("inited",()=>{try{this.scene.render()}catch{}}),this.scene.addLayer(l)}updateCompleted(l){const f={type:"FeatureCollection",features:l.filter(h=>h.properties.annotationType==="highlighter").map(h=>({type:"Feature",geometry:h.geometry,properties:{id:h.id,color:h.properties.color||"#ffeb3b",width:h.properties.strokeWidth||8,opacity:h.properties.strokeOpacity||.5}}))};this.completedLayer?this.completedLayer.setData(f):(this.completedLayer=new zA.LineLayer({name:`${Ir}completed`,zIndex:8}).source(f).color("color",h=>h).size("width",h=>h).style({opacity:.5,lineType:"solid",lineCap:"round",lineJoin:"round"}).shape("line"),this.addLayerWithRender(this.completedLayer))}updateDrawing(l){if(l.length<2){this.drawingLayer&&(this.removeAndDestroy(this.drawingLayer),this.drawingLayer=null);return}const u={type:"FeatureCollection",features:[{type:"Feature",geometry:{type:"LineString",coordinates:l},properties:{color:"#ffeb3b",width:8,opacity:.5}}]};this.drawingLayer?this.drawingLayer.setData(u):(this.drawingLayer=new zA.LineLayer({name:`${Ir}drawing`,zIndex:9}).source(u).color("#ffeb3b").size(8).style({opacity:.5,lineType:"solid",lineCap:"round",lineJoin:"round"}).shape("line"),this.addLayerWithRender(this.drawingLayer))}destroy(){this.removeAndDestroy(this.completedLayer),this.removeAndDestroy(this.drawingLayer),this.completedLayer=null,this.drawingLayer=null}}const Z2=b.forwardRef(function({position:l="topright",defaultFeatures:u,features:f,tools:h,styles:y,onUpload:m,className:C,style:x,onAnnotationCreate:L,onAnnotationUpdate:M,onAnnotationDelete:S,onAnnotationSelect:z,onModeChange:H,onChange:D},V){const{scene:O,mapsService:R,positionClassName:N}=JA(l),F=XA(),Y=b.useRef(null),X=b.useRef(null),[n0,Z]=b.useState("#3f51b5"),[G,r0]=b.useState(.5),[A0,o0]=b.useState(8),[q,t0]=b.useState(14),B=b3({scene:O,mapsService:R,defaultFeatures:u,features:f,onAnnotationCreate:L,onAnnotationUpdate:M,onAnnotationDelete:S,onAnnotationSelect:z,onModeChange:H,onChange:D,activeColor:n0,activeOpacity:G,activeStrokeWidth:A0,activeFontSize:q});b.useImperativeHandle(V,()=>({setMode:B.setMode,addAnnotation:B.addFeature,updateAnnotation:B.updateFeature,deleteAnnotation:B.deleteFeature,clearAll:B.clearAll,getAnnotations:B.getFeatures,selectAnnotation:B.selectFeature}),[B]);const U=b.useCallback(D0=>{B.setMode(D0)},[B]),e0=b.useCallback(()=>{B.selectedFeatureId&&B.deleteFeature(B.selectedFeatureId)},[B]),c0=b.useCallback(()=>{B.clearAll()},[B]),h0=b.useCallback((D0,Q0)=>{B.updateFeature(D0,Q0),B.closeEditor()},[B]),p0=b.useCallback(D0=>{const Q0=B.getFeatures().find(l0=>l0.id===D0);Q0&&(Q0.properties.annotationType==="text"?!Q0.properties.text:!Q0.properties.url)&&B.deleteFeature(D0),B.closeEditor()},[B]),S0=b.useCallback((D0,Q0,l0)=>{B.updateFeature(D0,{width:Q0,height:l0})},[B]);b.useEffect(()=>{if(O)return Y.current=new R3(O),()=>{var D0;(D0=Y.current)==null||D0.destroy(),Y.current=null}},[O]),b.useEffect(()=>{Y.current&&Y.current.updateCompleted(B.features)},[B.features]),b.useEffect(()=>{Y.current&&Y.current.updateDrawing(B.currentStrokeVertices)},[B.currentStrokeVertices]),b.useEffect(()=>{var l0;if(!R)return;const D0=(l0=R.getMapContainer)==null?void 0:l0.call(R);if(!D0)return;const Q0=B.mode;return Q0!=="select"&&Q0!=="none"?D0.style.cursor="crosshair":D0.style.cursor="",()=>{D0.style.cursor=""}},[B.mode,R]),b.useEffect(()=>{var l0;if(!R)return;const D0=(l0=R.getMapContainer)==null?void 0:l0.call(R);if(!D0)return;const Q0=document.createElement("div");return Q0.className="aimapui-style-panel-anchor",Q0.style.cssText="position:absolute;top:10px;left:10px;z-index:10;pointer-events:auto;",D0.appendChild(Q0),X.current=Q0,()=>{var T;(T=Q0.parentElement)==null||T.removeChild(Q0),X.current=null}},[R]);const Z0=B.selectedFeatureId!==null,x0=B.features.length>0,g0=B.selectedFeatureId?B.features.find(D0=>D0.id===B.selectedFeatureId)??null:null,T0=B.editingFeatureId?B.features.find(D0=>D0.id===B.editingFeatureId):void 0,j0=T0&&(T0.properties.annotationType==="text"||T0.properties.annotationType==="link"),B0=T0&&!j0,pA=g.jsxs(g.Fragment,{children:[g.jsx(L3,{activeMode:B.mode,onModeChange:U,tools:h,hasSelection:Z0,hasFeatures:x0,onDeleteSelected:e0,onClearAll:c0}),g.jsx(j3,{features:B.features,selectedId:B.selectedFeatureId,editingId:B.editingFeatureId,scene:O,mapsService:R,styles:y,onSelect:B.selectFeature,onDoubleClick:B.openEditor,onMove:B.moveFeature,onInlineCommit:h0,onInlineCancel:p0,onResize:S0}),B0&&g.jsx(I3,{feature:T0,scene:O,mapsService:R,onSave:B.updateFeature,onCancel:B.closeEditor,onDelete:B.deleteFeature,onUpload:m})]}),E0=X.current?$e.createPortal(g.jsx(F3,{mode:B.mode,selectedFeature:g0,activeColor:n0,activeOpacity:G,activeStrokeWidth:A0,activeFontSize:q,onColorChange:Z,onOpacityChange:r0,onStrokeWidthChange:o0,onFontSizeChange:t0,onUpdateFeature:B.updateFeature}),X.current):null;return F?g.jsxs(g.Fragment,{children:[g.jsx("div",{className:C,style:x,children:pA}),E0]}):g.jsxs(g.Fragment,{children:[g.jsx("div",{className:`l7-control-anchor ${N}`,children:pA}),E0]})});OA.mark(Z2);function Q2({logos:s,position:l="bottomleft",className:u,style:f}){const{positionClassName:h}=JA(l),y=XA(),m=g.jsx("div",{className:`l7-control l7-control-logo${u?` ${u}`:""}`,style:f,children:s.map((C,x)=>{const L=g.jsx("img",{src:C.src,alt:C.alt??"logo",width:C.width??24,height:C.width??24,style:{objectFit:"contain",display:"block"}},x);return C.href?g.jsx("a",{href:C.href,target:"_blank",rel:"noopener noreferrer",className:"l7-control-logo-link",children:L},x):g.jsx("div",{className:"l7-control-logo-link",children:L},x)})});return y?m:g.jsx("div",{className:`l7-control-anchor ${h}`,children:m})}OA.mark(Q2);function N3({children:s,defaultSnap:l="collapsed",collapsedHeight:u=80,halfRatio:f=.45,expandedRatio:h=.85,onSnapChange:y,className:m,showHandle:C=!0,borderRadius:x=32}){const L=b.useRef(null),M=b.useRef(0),S=b.useRef(0),z=b.useRef(!1),[H,D]=b.useState(0),[V,O]=b.useState(l),[R,N]=b.useState(!1),F=b.useCallback(()=>{var o0;const A0=(o0=L.current)==null?void 0:o0.offsetParent;return A0?A0.clientHeight:window.innerHeight},[]),Y=b.useCallback(A0=>{const o0=F();switch(A0){case"collapsed":return u;case"half":return o0*f;case"expanded":return o0*h}},[u,f,h,F]);b.useEffect(()=>{D(Y(l))},[l,Y]);const X=b.useCallback((A0,o0)=>{const q=Y("collapsed"),t0=Y("half"),B=Y("expanded");let U;if(Math.abs(o0)>.5)o0>0?U=A0>t0?"expanded":"half":U=A0<t0?"collapsed":"half";else{const e0=Math.abs(A0-q),c0=Math.abs(A0-t0),h0=Math.abs(A0-B),p0=Math.min(e0,c0,h0);p0===e0?U="collapsed":p0===c0?U="half":U="expanded"}N(!0),O(U),D(Y(U)),y==null||y(U),setTimeout(()=>N(!1),300)},[Y,y]),n0=b.useCallback(A0=>{z.current=!0,M.current=A0.touches[0].clientY,S.current=H,N(!1)},[H]),Z=b.useCallback(A0=>{if(!z.current)return;const o0=M.current-A0.touches[0].clientY,q=F()*h,t0=Math.max(u,Math.min(q,S.current+o0));D(t0)},[u,h,F]),G=b.useCallback(A0=>{if(!z.current)return;z.current=!1;const q=(M.current-A0.changedTouches[0].clientY)/100;X(H,q)},[H,X]),r0=b.useCallback(A0=>{z.current=!0,M.current=A0.clientY,S.current=H,N(!1);const o0=t0=>{if(!z.current)return;const B=M.current-t0.clientY,U=F()*h,e0=Math.max(u,Math.min(U,S.current+B));D(e0)},q=t0=>{z.current=!1;const U=(M.current-t0.clientY)/100,e0=F()*h;X(Math.max(u,Math.min(e0,S.current+(M.current-t0.clientY))),U),document.removeEventListener("mousemove",o0),document.removeEventListener("mouseup",q)};document.addEventListener("mousemove",o0),document.addEventListener("mouseup",q)},[H,u,h,X,F]);return b.useCallback(A0=>{N(!0),O(A0),D(Y(A0)),y==null||y(A0),setTimeout(()=>N(!1),300)},[Y,y]),g.jsx("div",{ref:L,className:m,style:{position:"absolute",bottom:0,left:0,width:"100%",height:H,zIndex:1e3,pointerEvents:"auto",transition:R?"height 0.3s cubic-bezier(0.4, 0, 0.2, 1)":"none",willChange:"height",touchAction:"none"},children:g.jsxs("div",{style:{width:"100%",height:"100%",background:"var(--color-surface, #f8f9ff)",borderTopLeftRadius:x,borderTopRightRadius:x,boxShadow:"0 -10px 40px rgba(0, 0, 0, 0.15)",borderTop:"1px solid rgba(195, 198, 215, 0.2)",display:"flex",flexDirection:"column",overflow:"hidden"},children:[g.jsx("div",{onTouchStart:n0,onTouchMove:Z,onTouchEnd:G,onMouseDown:r0,style:{padding:"12px 0 16px",cursor:"grab",userSelect:"none",flexShrink:0},children:C&&g.jsx("div",{style:{width:48,height:6,borderRadius:3,background:"rgba(195, 198, 215, 0.5)",margin:"0 auto"}})}),g.jsx("div",{style:{flex:1,overflowY:V==="collapsed"?"hidden":"auto",overflowX:"hidden",padding:"0 16px",WebkitOverflowScrolling:"touch",msOverflowStyle:"none",scrollbarWidth:"none"},children:s})]})})}function Z3({placeholder:s="搜索地点...",onSearch:l,onFilter:u,className:f,trailing:h}){const[y,m]=b.useState(""),C=b.useCallback(L=>{const M=L.target.value;m(M),l==null||l(M)},[l]),x=b.useCallback(()=>{m(""),l==null||l("")},[l]);return g.jsxs("div",{className:`glass-panel ${f??""}`,style:{display:"flex",alignItems:"center",padding:"12px 16px",borderRadius:16,boxShadow:"0 2px 8px rgba(0, 0, 0, 0.08)",border:"1px solid rgba(195, 198, 215, 0.3)"},children:[g.jsx("span",{className:"material-symbols-outlined",style:{color:"var(--color-primary, #004ac6)",marginRight:12,fontSize:22},children:"search"}),g.jsx("input",{type:"text",value:y,onChange:C,placeholder:s,style:{flex:1,border:"none",background:"transparent",outline:"none",fontSize:14,lineHeight:"20px",color:"var(--color-on-surface, #121c2a)"}}),y&&g.jsx("button",{onClick:x,style:{background:"none",border:"none",cursor:"pointer",padding:4,borderRadius:999,display:"flex",alignItems:"center",justifyContent:"center"},children:g.jsx("span",{className:"material-symbols-outlined",style:{fontSize:18,color:"var(--color-on-surface-variant, #434655)"},children:"close"})}),u&&g.jsx("button",{onClick:u,style:{background:"none",border:"none",cursor:"pointer",padding:4,borderRadius:999,display:"flex",alignItems:"center",justifyContent:"center",marginLeft:4},children:g.jsx("span",{className:"material-symbols-outlined",style:{fontSize:22,color:"var(--color-on-surface-variant, #434655)"},children:"tune"})}),h]})}function pn(s,l){if(!l)return s;const u={...s};for(const f of Object.keys(l)){const h=l[f],y=u[f];h!==null&&typeof h=="object"&&!Array.isArray(h)&&y!==null&&typeof y=="object"&&!Array.isArray(y)?u[f]=pn(y,h):h!==void 0&&(u[f]=h)}return u}function Q3(s,l){return l?pn(s,l):s}class O3 extends b.Component{constructor(){super(...arguments),this.state={hasError:!1,error:null}}static getDerivedStateFromError(l){return{hasError:!0,error:l}}componentDidCatch(l,u){var f,h;(h=(f=this.props).onError)==null||h.call(f,l,u)}render(){if(this.state.hasError){const{fallback:l}=this.props,{error:u}=this.state;return typeof l=="function"?l(u):l||g.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",width:"100%",height:"100%",padding:32,color:"#666",fontFamily:"system-ui, sans-serif"},children:[g.jsx("span",{className:"material-symbols-outlined",style:{fontSize:48,marginBottom:16,color:"#e53e3e"},children:"error"}),g.jsx("p",{style:{fontSize:16,fontWeight:600,marginBottom:8},children:"地图加载失败"}),g.jsx("p",{style:{fontSize:13,color:"#999"},children:(u==null?void 0:u.message)??"未知错误"})]})}return this.props.children}}exports.ADMIN_SEQUENTIAL_COLORS=_2;exports.AiMap=P5;exports.AiMapJSONSchema=$5;exports.AnnotationControl=Z2;exports.ArcFlowLayer=Hl;exports.BUBBLE_SIZE_LEVELS=B2;exports.BottomSheet=N3;exports.BubbleLayer=G5;exports.ChinaDistrict=al;exports.ControlContainer=W1;exports.ControlRegistry=OA;exports.ControlRenderer=v2;exports.DEFAULT_CITY_SOURCE=P2;exports.DEFAULT_DISTRICT_SOURCE=T2;exports.DEFAULT_PROVINCE_SOURCE=I2;exports.DrawControl=nn;exports.ErrorBoundary=O3;exports.EventBus=Qr;exports.EventBusProvider=$r;exports.ExportImageControl=en;exports.FillLayer=tl;exports.FullscreenControl=q1;exports.GAODE_THEME_PRESETS=P1;exports.GeoLocateControl=X1;exports.GlyphLayer=zl;exports.H3Layer=y3;exports.H3_SEQUENTIAL_COLORS=m3;exports.HeatmapHexagonLayer=D2;exports.HeatmapLayer=S2;exports.HexagonLayer=D2;exports.INDEPENDENT_MAP_THEME_PRESETS=Vs;exports.IconLayer=F2;exports.ImageCalibrationControl=rn;exports.ImageLayer=W5;exports.InteractionRenderer=L2;exports.LayerRenderer=l2;exports.LayerSwitchControl=tn;exports.LegendCategories=on;exports.LegendControl=N2;exports.LegendDiverging=ln;exports.LegendIcon=dn;exports.LegendLineWidth=un;exports.LegendProportion=fn;exports.LegendRamp=sn;exports.LegendRenderer=k2;exports.LegendSize=cn;exports.LegendThreshold=an;exports.LineLayer=re;exports.LogoControl=Q2;exports.MAKI_ICONS=_e;exports.MAKI_ICON_NAMES=L5;exports.MapSceneRenderer=Kr;exports.MapThemeControl=K1;exports.Marker=Ue;exports.MarkerClusterLayer=Y5;exports.MobileSheetLegend=j2;exports.MobileToolbar=z2;exports.MouseLocationControl=An;exports.OPENFREEMAP_THEME_PRESETS=Bs;exports.PointLayer=RA;exports.PolygonLayer=Lt;exports.Popup=kt;exports.RasterLayer=H2;exports.ResponsiveProvider=_5;exports.RouteLayer=Bl;exports.SATELLITE_PROVIDER_NAMES=Sl;exports.SatelliteLayer=Dl;exports.ScaleControl=Y1;exports.SceneProvider=Xr;exports.SchemaProvider=Zr;exports.SearchBar=Z3;exports.ThemeProvider=Gr;exports.TiffRasterLayer=Pl;exports.Tooltip=$1;exports.ZoomControl=G1;exports.adaptHeatmapLayer=i2;exports.adaptImageLayer=s2;exports.adaptLineLayer=n2;exports.adaptPointLayer=t2;exports.adaptPolygonLayer=r2;exports.adaptRasterLayer=o2;exports.applyControlDefaults=Fr;exports.applyLayerDefaults=Tr;exports.applyMapDefaults=Ut;exports.applyResponsiveOverrides=Q3;exports.applySchemaDefaults=N1;exports.createBasemap=Jr;exports.createEventBus=Or;exports.createMakiIconMap=k5;exports.createMakiPinMap=w2;exports.cx=vA;exports.deepMerge=pn;exports.diffSchema=Z5;exports.getPopperDirection=I1;exports.hexToRgba=us;exports.makiIconUrl=x2;exports.makiPinUrl=b2;exports.parseSchema=Rr;exports.useControlContainer=XA;exports.useEventBus=Z1;exports.useMapControl=JA;exports.useMapPosition=U1;exports.usePopperPosition=J1;exports.useResponsive=E2;exports.useScene=jA;exports.useSchema=$o;exports.useTheme=Yr;exports.validateAiMapSchema=Q5;exports.validateSchema=Uo;
|