vue-wiring-diagram 1.1.14 → 1.1.16
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.
|
@@ -11571,7 +11571,7 @@ const Oi = (n, e = {}) => Ms.get(n, { params: e }), il = (n, e = {}) => Ms.post(
|
|
|
11571
11571
|
s[r].style.visibility = e ? "visible" : "hidden";
|
|
11572
11572
|
for (let r = 0, o = i.length; r < o; r += 1)
|
|
11573
11573
|
i[r].style.visibility = e ? "visible" : "hidden";
|
|
11574
|
-
}, Bd = (n) => Oi("/custom/deviceList", {
|
|
11574
|
+
}, Bd = (n) => Oi("/custom/deviceList", { itemIds: n }).then((e) => {
|
|
11575
11575
|
if (e != null && e.isOk)
|
|
11576
11576
|
return e.data;
|
|
11577
11577
|
}), zd = (n) => Oi("/custom/monitorInfo", {
|
|
@@ -36589,7 +36589,7 @@ const a4 = { class: "control-box" }, l4 = {
|
|
|
36589
36589
|
let x, C, S;
|
|
36590
36590
|
if (e.id) {
|
|
36591
36591
|
const M = await mb(e.id);
|
|
36592
|
-
x = (M == null ? void 0 : M.background) || Na, C = (M == null ? void 0 : M.grid) || Ra, S = (M == null ? void 0 : M.
|
|
36592
|
+
x = (M == null ? void 0 : M.background) || Na, C = (M == null ? void 0 : M.grid) || Ra, S = (M == null ? void 0 : M.data) || { cells: [] };
|
|
36593
36593
|
} else
|
|
36594
36594
|
x = e.background, C = {}, S = e.data;
|
|
36595
36595
|
t.value.drawBackground(x), t.value.drawGrid(C), t.value.fromJSON(S), u();
|
|
@@ -35,7 +35,7 @@ usage: app.provide(ZINDEX_INJECTION_KEY, { current: 0 })`),{initialZIndex:s,curr
|
|
|
35
35
|
`)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){const s=new this(e);return t.forEach(r=>s.set(r)),s}static accessor(e){const s=(this[Pm]=this[Pm]={accessors:{}}).accessors,r=this.prototype;function i(o){const a=Qi(o);s[a]||(LV(r,o),s[a]=!0)}return L.isArray(e)?e.forEach(i):i(e),this}}Et.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),L.reduceDescriptors(Et.prototype,({value:n},e)=>{let t=e[0].toUpperCase()+e.slice(1);return{get:()=>n,set(s){this[t]=s}}}),L.freezeMethods(Et);function Eu(n,e){const t=this||Zi,s=e||t,r=Et.from(s.headers);let i=s.data;return L.forEach(n,function(a){i=a.call(t,i,r.normalize(),e?e.status:void 0)}),r.normalize(),i}function Nm(n){return!!(n&&n.__CANCEL__)}function jr(n,e,t){ue.call(this,n??"canceled",ue.ERR_CANCELED,e,t),this.name="CanceledError"}L.inherits(jr,ue,{__CANCEL__:!0});function Am(n,e,t){const s=t.config.validateStatus;!t.status||!s||s(t.status)?n(t):e(new ue("Request failed with status code "+t.status,[ue.ERR_BAD_REQUEST,ue.ERR_BAD_RESPONSE][Math.floor(t.status/100)-4],t.config,t.request,t))}function IV(n){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(n);return e&&e[1]||""}function BV(n,e){n=n||10;const t=new Array(n),s=new Array(n);let r=0,i=0,o;return e=e!==void 0?e:1e3,function(c){const u=Date.now(),d=s[i];o||(o=u),t[r]=c,s[r]=u;let f=i,h=0;for(;f!==r;)h+=t[f++],f=f%n;if(r=(r+1)%n,r===i&&(i=(i+1)%n),u-o<e)return;const p=d&&u-d;return p?Math.round(h*1e3/p):void 0}}function jV(n,e){let t=0,s=1e3/e,r,i;const o=(u,d=Date.now())=>{t=d,r=null,i&&(clearTimeout(i),i=null),n.apply(null,u)};return[(...u)=>{const d=Date.now(),f=d-t;f>=s?o(u,d):(r=u,i||(i=setTimeout(()=>{i=null,o(r)},s-f)))},()=>r&&o(r)]}const Ha=(n,e,t=3)=>{let s=0;const r=BV(50,250);return jV(i=>{const o=i.loaded,a=i.lengthComputable?i.total:void 0,c=o-s,u=r(c),d=o<=a;s=o;const f={loaded:o,total:a,progress:a?o/a:void 0,bytes:c,rate:u||void 0,estimated:u&&a&&d?(a-o)/u:void 0,event:i,lengthComputable:a!=null,[e?"download":"upload"]:!0};n(f)},t)},_m=(n,e)=>{const t=n!=null;return[s=>e[0]({lengthComputable:t,total:n,loaded:s}),e[1]]},Tm=n=>(...e)=>L.asap(()=>n(...e)),$V=St.hasStandardBrowserEnv?function(){const e=St.navigator&&/(msie|trident)/i.test(St.navigator.userAgent),t=document.createElement("a");let s;function r(i){let o=i;return e&&(t.setAttribute("href",o),o=t.href),t.setAttribute("href",o),{href:t.href,protocol:t.protocol?t.protocol.replace(/:$/,""):"",host:t.host,search:t.search?t.search.replace(/^\?/,""):"",hash:t.hash?t.hash.replace(/^#/,""):"",hostname:t.hostname,port:t.port,pathname:t.pathname.charAt(0)==="/"?t.pathname:"/"+t.pathname}}return s=r(window.location.href),function(o){const a=L.isString(o)?r(o):o;return a.protocol===s.protocol&&a.host===s.host}}():function(){return function(){return!0}}(),zV=St.hasStandardBrowserEnv?{write(n,e,t,s,r,i){const o=[n+"="+encodeURIComponent(e)];L.isNumber(t)&&o.push("expires="+new Date(t).toGMTString()),L.isString(s)&&o.push("path="+s),L.isString(r)&&o.push("domain="+r),i===!0&&o.push("secure"),document.cookie=o.join("; ")},read(n){const e=document.cookie.match(new RegExp("(^|;\\s*)("+n+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove(n){this.write(n,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function FV(n){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(n)}function UV(n,e){return e?n.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):n}function km(n,e){return n&&!FV(e)?UV(n,e):e}const Vm=n=>n instanceof Et?{...n}:n;function qs(n,e){e=e||{};const t={};function s(u,d,f){return L.isPlainObject(u)&&L.isPlainObject(d)?L.merge.call({caseless:f},u,d):L.isPlainObject(d)?L.merge({},d):L.isArray(d)?d.slice():d}function r(u,d,f){if(L.isUndefined(d)){if(!L.isUndefined(u))return s(void 0,u,f)}else return s(u,d,f)}function i(u,d){if(!L.isUndefined(d))return s(void 0,d)}function o(u,d){if(L.isUndefined(d)){if(!L.isUndefined(u))return s(void 0,u)}else return s(void 0,d)}function a(u,d,f){if(f in e)return s(u,d);if(f in n)return s(void 0,u)}const c={url:i,method:i,data:i,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage:o,withCredentials:o,withXSRFToken:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBodyLength:o,beforeRedirect:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,responseEncoding:o,validateStatus:a,headers:(u,d)=>r(Vm(u),Vm(d),!0)};return L.forEach(Object.keys(Object.assign({},n,e)),function(d){const f=c[d]||r,h=f(n[d],e[d],d);L.isUndefined(h)&&f!==a||(t[d]=h)}),t}const Dm=n=>{const e=qs({},n);let{data:t,withXSRFToken:s,xsrfHeaderName:r,xsrfCookieName:i,headers:o,auth:a}=e;e.headers=o=Et.from(o),e.url=Sm(km(e.baseURL,e.url),n.params,n.paramsSerializer),a&&o.set("Authorization","Basic "+btoa((a.username||"")+":"+(a.password?unescape(encodeURIComponent(a.password)):"")));let c;if(L.isFormData(t)){if(St.hasStandardBrowserEnv||St.hasStandardBrowserWebWorkerEnv)o.setContentType(void 0);else if((c=o.getContentType())!==!1){const[u,...d]=c?c.split(";").map(f=>f.trim()).filter(Boolean):[];o.setContentType([u||"multipart/form-data",...d].join("; "))}}if(St.hasStandardBrowserEnv&&(s&&L.isFunction(s)&&(s=s(e)),s||s!==!1&&$V(e.url))){const u=r&&i&&zV.read(i);u&&o.set(r,u)}return e},HV=typeof XMLHttpRequest<"u"&&function(n){return new Promise(function(t,s){const r=Dm(n);let i=r.data;const o=Et.from(r.headers).normalize();let{responseType:a,onUploadProgress:c,onDownloadProgress:u}=r,d,f,h,p,g;function m(){p&&p(),g&&g(),r.cancelToken&&r.cancelToken.unsubscribe(d),r.signal&&r.signal.removeEventListener("abort",d)}let y=new XMLHttpRequest;y.open(r.method.toUpperCase(),r.url,!0),y.timeout=r.timeout;function b(){if(!y)return;const x=Et.from("getAllResponseHeaders"in y&&y.getAllResponseHeaders()),C={data:!a||a==="text"||a==="json"?y.responseText:y.response,status:y.status,statusText:y.statusText,headers:x,config:n,request:y};Am(function(S){t(S),m()},function(S){s(S),m()},C),y=null}"onloadend"in y?y.onloadend=b:y.onreadystatechange=function(){!y||y.readyState!==4||y.status===0&&!(y.responseURL&&y.responseURL.indexOf("file:")===0)||setTimeout(b)},y.onabort=function(){y&&(s(new ue("Request aborted",ue.ECONNABORTED,n,y)),y=null)},y.onerror=function(){s(new ue("Network Error",ue.ERR_NETWORK,n,y)),y=null},y.ontimeout=function(){let v=r.timeout?"timeout of "+r.timeout+"ms exceeded":"timeout exceeded";const C=r.transitional||Om;r.timeoutErrorMessage&&(v=r.timeoutErrorMessage),s(new ue(v,C.clarifyTimeoutError?ue.ETIMEDOUT:ue.ECONNABORTED,n,y)),y=null},i===void 0&&o.setContentType(null),"setRequestHeader"in y&&L.forEach(o.toJSON(),function(v,C){y.setRequestHeader(C,v)}),L.isUndefined(r.withCredentials)||(y.withCredentials=!!r.withCredentials),a&&a!=="json"&&(y.responseType=r.responseType),u&&([h,g]=Ha(u,!0),y.addEventListener("progress",h)),c&&y.upload&&([f,p]=Ha(c),y.upload.addEventListener("progress",f),y.upload.addEventListener("loadend",p)),(r.cancelToken||r.signal)&&(d=x=>{y&&(s(!x||x.type?new jr(null,n,y):x),y.abort(),y=null)},r.cancelToken&&r.cancelToken.subscribe(d),r.signal&&(r.signal.aborted?d():r.signal.addEventListener("abort",d)));const w=IV(r.url);if(w&&St.protocols.indexOf(w)===-1){s(new ue("Unsupported protocol "+w+":",ue.ERR_BAD_REQUEST,n));return}y.send(i||null)})},GV=(n,e)=>{const{length:t}=n=n?n.filter(Boolean):[];if(e||t){let s=new AbortController,r;const i=function(u){if(!r){r=!0,a();const d=u instanceof Error?u:this.reason;s.abort(d instanceof ue?d:new jr(d instanceof Error?d.message:d))}};let o=e&&setTimeout(()=>{o=null,i(new ue(`timeout ${e} of ms exceeded`,ue.ETIMEDOUT))},e);const a=()=>{n&&(o&&clearTimeout(o),o=null,n.forEach(u=>{u.unsubscribe?u.unsubscribe(i):u.removeEventListener("abort",i)}),n=null)};n.forEach(u=>u.addEventListener("abort",i));const{signal:c}=s;return c.unsubscribe=()=>L.asap(a),c}},WV=function*(n,e){let t=n.byteLength;if(t<e){yield n;return}let s=0,r;for(;s<t;)r=s+e,yield n.slice(s,r),s=r},YV=async function*(n,e){for await(const t of qV(n))yield*WV(t,e)},qV=async function*(n){if(n[Symbol.asyncIterator]){yield*n;return}const e=n.getReader();try{for(;;){const{done:t,value:s}=await e.read();if(t)break;yield s}}finally{await e.cancel()}},Rm=(n,e,t,s)=>{const r=YV(n,e);let i=0,o,a=c=>{o||(o=!0,s&&s(c))};return new ReadableStream({async pull(c){try{const{done:u,value:d}=await r.next();if(u){a(),c.close();return}let f=d.byteLength;if(t){let h=i+=f;t(h)}c.enqueue(new Uint8Array(d))}catch(u){throw a(u),u}},cancel(c){return a(c),r.return()}},{highWaterMark:2})},Ga=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",Lm=Ga&&typeof ReadableStream=="function",XV=Ga&&(typeof TextEncoder=="function"?(n=>e=>n.encode(e))(new TextEncoder):async n=>new Uint8Array(await new Response(n).arrayBuffer())),Im=(n,...e)=>{try{return!!n(...e)}catch{return!1}},JV=Lm&&Im(()=>{let n=!1;const e=new Request(St.origin,{body:new ReadableStream,method:"POST",get duplex(){return n=!0,"half"}}).headers.has("Content-Type");return n&&!e}),Bm=64*1024,Ou=Lm&&Im(()=>L.isReadableStream(new Response("").body)),Wa={stream:Ou&&(n=>n.body)};Ga&&(n=>{["text","arrayBuffer","blob","formData","stream"].forEach(e=>{!Wa[e]&&(Wa[e]=L.isFunction(n[e])?t=>t[e]():(t,s)=>{throw new ue(`Response type '${e}' is not supported`,ue.ERR_NOT_SUPPORT,s)})})})(new Response);const KV=async n=>{if(n==null)return 0;if(L.isBlob(n))return n.size;if(L.isSpecCompliantForm(n))return(await new Request(St.origin,{method:"POST",body:n}).arrayBuffer()).byteLength;if(L.isArrayBufferView(n)||L.isArrayBuffer(n))return n.byteLength;if(L.isURLSearchParams(n)&&(n=n+""),L.isString(n))return(await XV(n)).byteLength},ZV=async(n,e)=>{const t=L.toFiniteNumber(n.getContentLength());return t??KV(e)},Mu={http:wV,xhr:HV,fetch:Ga&&(async n=>{let{url:e,method:t,data:s,signal:r,cancelToken:i,timeout:o,onDownloadProgress:a,onUploadProgress:c,responseType:u,headers:d,withCredentials:f="same-origin",fetchOptions:h}=Dm(n);u=u?(u+"").toLowerCase():"text";let p=GV([r,i&&i.toAbortSignal()],o),g;const m=p&&p.unsubscribe&&(()=>{p.unsubscribe()});let y;try{if(c&&JV&&t!=="get"&&t!=="head"&&(y=await ZV(d,s))!==0){let C=new Request(e,{method:"POST",body:s,duplex:"half"}),E;if(L.isFormData(s)&&(E=C.headers.get("content-type"))&&d.setContentType(E),C.body){const[S,O]=_m(y,Ha(Tm(c)));s=Rm(C.body,Bm,S,O)}}L.isString(f)||(f=f?"include":"omit");const b="credentials"in Request.prototype;g=new Request(e,{...h,signal:p,method:t.toUpperCase(),headers:d.normalize().toJSON(),body:s,duplex:"half",credentials:b?f:void 0});let w=await fetch(g);const x=Ou&&(u==="stream"||u==="response");if(Ou&&(a||x&&m)){const C={};["status","statusText","headers"].forEach(A=>{C[A]=w[A]});const E=L.toFiniteNumber(w.headers.get("content-length")),[S,O]=a&&_m(E,Ha(Tm(a),!0))||[];w=new Response(Rm(w.body,Bm,S,()=>{O&&O(),m&&m()}),C)}u=u||"text";let v=await Wa[L.findKey(Wa,u)||"text"](w,n);return!x&&m&&m(),await new Promise((C,E)=>{Am(C,E,{data:v,headers:Et.from(w.headers),status:w.status,statusText:w.statusText,config:n,request:g})})}catch(b){throw m&&m(),b&&b.name==="TypeError"&&/fetch/i.test(b.message)?Object.assign(new ue("Network Error",ue.ERR_NETWORK,n,g),{cause:b.cause||b}):ue.from(b,b&&b.code,n,g)}})};L.forEach(Mu,(n,e)=>{if(n){try{Object.defineProperty(n,"name",{value:e})}catch{}Object.defineProperty(n,"adapterName",{value:e})}});const jm=n=>`- ${n}`,QV=n=>L.isFunction(n)||n===null||n===!1,$m={getAdapter:n=>{n=L.isArray(n)?n:[n];const{length:e}=n;let t,s;const r={};for(let i=0;i<e;i++){t=n[i];let o;if(s=t,!QV(t)&&(s=Mu[(o=String(t)).toLowerCase()],s===void 0))throw new ue(`Unknown adapter '${o}'`);if(s)break;r[o||"#"+i]=s}if(!s){const i=Object.entries(r).map(([a,c])=>`adapter ${a} `+(c===!1?"is not supported by the environment":"is not available in the build"));let o=e?i.length>1?`since :
|
|
36
36
|
`+i.map(jm).join(`
|
|
37
37
|
`):" "+jm(i[0]):"as no adapter specified";throw new ue("There is no suitable adapter to dispatch the request "+o,"ERR_NOT_SUPPORT")}return s},adapters:Mu};function Pu(n){if(n.cancelToken&&n.cancelToken.throwIfRequested(),n.signal&&n.signal.aborted)throw new jr(null,n)}function zm(n){return Pu(n),n.headers=Et.from(n.headers),n.data=Eu.call(n,n.transformRequest),["post","put","patch"].indexOf(n.method)!==-1&&n.headers.setContentType("application/x-www-form-urlencoded",!1),$m.getAdapter(n.adapter||Zi.adapter)(n).then(function(s){return Pu(n),s.data=Eu.call(n,n.transformResponse,s),s.headers=Et.from(s.headers),s},function(s){return Nm(s)||(Pu(n),s&&s.response&&(s.response.data=Eu.call(n,n.transformResponse,s.response),s.response.headers=Et.from(s.response.headers))),Promise.reject(s)})}const Fm="1.7.7",Nu={};["object","boolean","number","function","string","symbol"].forEach((n,e)=>{Nu[n]=function(s){return typeof s===n||"a"+(e<1?"n ":" ")+n}});const Um={};Nu.transitional=function(e,t,s){function r(i,o){return"[Axios v"+Fm+"] Transitional option '"+i+"'"+o+(s?". "+s:"")}return(i,o,a)=>{if(e===!1)throw new ue(r(o," has been removed"+(t?" in "+t:"")),ue.ERR_DEPRECATED);return t&&!Um[o]&&(Um[o]=!0,console.warn(r(o," has been deprecated since v"+t+" and will be removed in the near future"))),e?e(i,o,a):!0}};function eD(n,e,t){if(typeof n!="object")throw new ue("options must be an object",ue.ERR_BAD_OPTION_VALUE);const s=Object.keys(n);let r=s.length;for(;r-- >0;){const i=s[r],o=e[i];if(o){const a=n[i],c=a===void 0||o(a,i,n);if(c!==!0)throw new ue("option "+i+" must be "+c,ue.ERR_BAD_OPTION_VALUE);continue}if(t!==!0)throw new ue("Unknown option "+i,ue.ERR_BAD_OPTION)}}const Au={assertOptions:eD,validators:Nu},ps=Au.validators;class Xs{constructor(e){this.defaults=e,this.interceptors={request:new Em,response:new Em}}async request(e,t){try{return await this._request(e,t)}catch(s){if(s instanceof Error){let r;Error.captureStackTrace?Error.captureStackTrace(r={}):r=new Error;const i=r.stack?r.stack.replace(/^.+\n/,""):"";try{s.stack?i&&!String(s.stack).endsWith(i.replace(/^.+\n.+\n/,""))&&(s.stack+=`
|
|
38
|
-
`+i):s.stack=i}catch{}}throw s}}_request(e,t){typeof e=="string"?(t=t||{},t.url=e):t=e||{},t=qs(this.defaults,t);const{transitional:s,paramsSerializer:r,headers:i}=t;s!==void 0&&Au.assertOptions(s,{silentJSONParsing:ps.transitional(ps.boolean),forcedJSONParsing:ps.transitional(ps.boolean),clarifyTimeoutError:ps.transitional(ps.boolean)},!1),r!=null&&(L.isFunction(r)?t.paramsSerializer={serialize:r}:Au.assertOptions(r,{encode:ps.function,serialize:ps.function},!0)),t.method=(t.method||this.defaults.method||"get").toLowerCase();let o=i&&L.merge(i.common,i[t.method]);i&&L.forEach(["delete","get","head","post","put","patch","common"],g=>{delete i[g]}),t.headers=Et.concat(o,i);const a=[];let c=!0;this.interceptors.request.forEach(function(m){typeof m.runWhen=="function"&&m.runWhen(t)===!1||(c=c&&m.synchronous,a.unshift(m.fulfilled,m.rejected))});const u=[];this.interceptors.response.forEach(function(m){u.push(m.fulfilled,m.rejected)});let d,f=0,h;if(!c){const g=[zm.bind(this),void 0];for(g.unshift.apply(g,a),g.push.apply(g,u),h=g.length,d=Promise.resolve(t);f<h;)d=d.then(g[f++],g[f++]);return d}h=a.length;let p=t;for(f=0;f<h;){const g=a[f++],m=a[f++];try{p=g(p)}catch(y){m.call(this,y);break}}try{d=zm.call(this,p)}catch(g){return Promise.reject(g)}for(f=0,h=u.length;f<h;)d=d.then(u[f++],u[f++]);return d}getUri(e){e=qs(this.defaults,e);const t=km(e.baseURL,e.url);return Sm(t,e.params,e.paramsSerializer)}}L.forEach(["delete","get","head","options"],function(e){Xs.prototype[e]=function(t,s){return this.request(qs(s||{},{method:e,url:t,data:(s||{}).data}))}}),L.forEach(["post","put","patch"],function(e){function t(s){return function(i,o,a){return this.request(qs(a||{},{method:e,headers:s?{"Content-Type":"multipart/form-data"}:{},url:i,data:o}))}}Xs.prototype[e]=t(),Xs.prototype[e+"Form"]=t(!0)});class _u{constructor(e){if(typeof e!="function")throw new TypeError("executor must be a function.");let t;this.promise=new Promise(function(i){t=i});const s=this;this.promise.then(r=>{if(!s._listeners)return;let i=s._listeners.length;for(;i-- >0;)s._listeners[i](r);s._listeners=null}),this.promise.then=r=>{let i;const o=new Promise(a=>{s.subscribe(a),i=a}).then(r);return o.cancel=function(){s.unsubscribe(i)},o},e(function(i,o,a){s.reason||(s.reason=new jr(i,o,a),t(s.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){if(this.reason){e(this.reason);return}this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const t=this._listeners.indexOf(e);t!==-1&&this._listeners.splice(t,1)}toAbortSignal(){const e=new AbortController,t=s=>{e.abort(s)};return this.subscribe(t),e.signal.unsubscribe=()=>this.unsubscribe(t),e.signal}static source(){let e;return{token:new _u(function(r){e=r}),cancel:e}}}function tD(n){return function(t){return n.apply(null,t)}}function nD(n){return L.isObject(n)&&n.isAxiosError===!0}const Tu={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Tu).forEach(([n,e])=>{Tu[e]=n});function Hm(n){const e=new Xs(n),t=am(Xs.prototype.request,e);return L.extend(t,Xs.prototype,e,{allOwnKeys:!0}),L.extend(t,e,null,{allOwnKeys:!0}),t.create=function(r){return Hm(qs(n,r))},t}const qe=Hm(Zi);qe.Axios=Xs,qe.CanceledError=jr,qe.CancelToken=_u,qe.isCancel=Nm,qe.VERSION=Fm,qe.toFormData=Fa,qe.AxiosError=ue,qe.Cancel=qe.CanceledError,qe.all=function(e){return Promise.all(e)},qe.spread=tD,qe.isAxiosError=nD,qe.mergeConfig=qs,qe.AxiosHeaders=Et,qe.formToJSON=n=>Mm(L.isHTMLForm(n)?new FormData(n):n),qe.getAdapter=$m.getAdapter,qe.HttpStatusCode=Tu,qe.default=qe;const Yn=qe.create({baseURL:"http://localhost:8001",timeout:1e4,headers:{"Content-Type":"application/json"}}),sD=n=>{Yn.defaults.baseURL=n},rD=n=>{Yn.interceptors.request.use(e=>{if(n)return e.headers.token=n,e},e=>Promise.reject(e))};Yn.interceptors.response.use(n=>(n.data.isOk=n.data.code===200,n.data),n=>{if(n.response)switch(n.response.status){}return Promise.reject(n)});const Js=(n,e={})=>Yn.get(n,{params:e}),Ya=(n,e={})=>Yn.post(n,e),Gm=(n,e={})=>Yn.delete(n,{params:e}),iD=(n,e={})=>Yn.post(n,e,{headers:{"Content-Type":"multipart/form-data"}}),$r=(n,e)=>{const t=document.querySelector(n),s=t.querySelectorAll(".x6-port-body"),r=t.querySelectorAll(".x6-port-label");for(let i=0,o=s.length;i<o;i+=1)s[i].style.visibility=e?"visible":"hidden";for(let i=0,o=r.length;i<o;i+=1)r[i].style.visibility=e?"visible":"hidden"},ku=n=>Js("/custom/deviceList",{itemId:n}).then(e=>{if(e!=null&&e.isOk)return e.data}),Vu=n=>Js("/custom/monitorInfo",{deviceCode:n,fieldType:1}).then(e=>{if(e!=null&&e.isOk)return e.data}),Wm=n=>Js("/template/selectOne",{id:n}).then(e=>{if(e!=null&&e.isOk){const t=JSON.parse(e.data.remark);return t===null?null:{background:t.background,grid:t.grid,data:t.data}}else Ye.error((e==null?void 0:e.msg)||"获取失败")}),oD=n=>Ya("/custom/arrRealData2",n).then(e=>{if(e!=null&&e.isOk)return e.data;Ye.error((e==null?void 0:e.msg)||"获取失败")}),qa={color:"#000000"},Xa={size:10,visible:!1,type:"doubleMesh",args:[{color:"#282828",thickness:1},{color:"#363636",thickness:2,factor:4}]},aD={stencilGraphWidth:300,stencilGraphHeight:0,layoutOptions:{columns:3,columnWidth:74,resizeToFit:!0,center:!0}},Du={position:"absolute",args:{x:0,y:0},attrs:{text:{fill:"#5174ff",fontSize:8},circle:{magnet:!0,stroke:"#5174ff",r:4}},label:{position:"top"}},lD={shape:"rect",label:"文本",width:50,height:30,attrs:{body:{fill:"#00000000",stroke:"#00000000",strokeWidth:1,rx:6,ry:6},text:{fill:"#ffffff"},label:{textAnchor:"start",x:-14,y:0}},data:{type:"text",content:"文本",fields:[]},ports:{groups:{ports:{portOption:Du}}}},Ja={markup:[{tagName:"path",selector:"line",groupSelector:"lines"}],attrs:{wrap:{strokeWidth:10},lines:{connection:!0,strokeLinejoin:"round",fill:"none",strokeWidth:2},line:{stroke:"#ffffff",strokeWidth:1,sourceMarker:{args:{width:10,height:10,offset:0},name:null},targetMarker:{args:{width:10,height:10,offset:0},name:null}}}},Ym={markup:[{tagName:"path",selector:"line",groupSelector:"lines"},{tagName:"path",selector:"pipe",groupSelector:"lines"}],attrs:{wrap:{strokeWidth:10},lines:{connection:!0,strokeLinejoin:"round",fill:"none",strokeWidth:2},line:{stroke:"#ffffff",strokeWidth:1,targetMarker:null,sourceMarker:null},pipe:{stroke:"#2364DD",strokeWidth:1,strokeDasharray:5,sourceMarker:{args:{width:10,height:10,offset:0},name:null},targetMarker:{args:{width:10,height:10,offset:0},name:null}}}},Ka="M 0 -6 8 0 0 6 z",qm="M 0 -6 -8 0 0 6 z",Xm={attrs:{wrap:{strokeWidth:10},arrow:{d:Ka,fill:"#ED8A19",stroke:"#ED8A19",style:{animation:"flashing 2s infinite linear"},display:"block"},arrow1:{atConnectionRatio:.5},lines:{connection:!0,strokeLinejoin:"round",fill:"none",strokeWidth:2},line:{stroke:"#ffffff",strokeWidth:1,sourceMarker:{args:{width:10,height:10,offset:0},name:null},targetMarker:{args:{width:10,height:10,offset:0},name:null}}},markup:[{tagName:"path",selector:"line",groupSelector:"lines"},{tagName:"path",groupSelector:"arrow",selector:"arrow1"}]},Qe={markup:Ja.markup,attrs:Ja.attrs},Dt=(n,e)=>{const t=n.__vccOpts||n;for(const[s,r]of e)t[s]=r;return t},cD={class:"control"},uD={class:"row-column"},dD=Dt({__name:"index",props:{payload:Object},setup(n){var h,p,g,m,y,b,w,x,v,C,E,S,O,A,V,T,D,I,B,N,P;const e=n,t=l.ref(((h=e.payload.value.options.background)==null?void 0:h.color)||null),s=l.ref(((g=(p=e.payload.value.options)==null?void 0:p.grid)==null?void 0:g.visible)||null),r=l.ref(((y=(m=e.payload.value.options)==null?void 0:m.grid)==null?void 0:y.size)||10),i=l.ref(((v=(x=(w=(b=e.payload.value.options)==null?void 0:b.grid)==null?void 0:w.args)==null?void 0:x[0])==null?void 0:v.color)||null),o=l.ref(((O=(S=(E=(C=e.payload.value.options)==null?void 0:C.grid)==null?void 0:E.args)==null?void 0:S[0])==null?void 0:O.thickness)||1),a=l.ref(((D=(T=(V=(A=e.payload.value.options)==null?void 0:A.grid)==null?void 0:V.args)==null?void 0:T[1])==null?void 0:D.color)||null),c=l.ref(((P=(N=(B=(I=e.payload.value.options)==null?void 0:I.grid)==null?void 0:B.args)==null?void 0:N[1])==null?void 0:P.thickness)||1),u=l.ref("1"),d=k=>{e.payload.value.drawBackground({color:k})},f=()=>{e.payload.value.drawGrid({visible:s.value,size:r.value,type:"doubleMesh",args:[{color:i.value,thickness:o.value},{color:a.value,thickness:c.value}]})};return(k,j)=>{const H=l.resolveComponent("el-col"),K=l.resolveComponent("el-color-picker"),R=l.resolveComponent("el-row"),_=l.resolveComponent("el-switch"),z=l.resolveComponent("el-input-number"),Z=l.resolveComponent("el-collapse-item"),X=l.resolveComponent("el-collapse");return l.openBlock(),l.createElementBlock("div",cD,[l.createVNode(X,{modelValue:u.value,"onUpdate:modelValue":j[7]||(j[7]=re=>u.value=re),accordion:""},{default:l.withCtx(()=>[l.createVNode(Z,{title:"基础属性",name:"1"},{default:l.withCtx(()=>[l.createElementVNode("div",uD,[l.createVNode(R,{gutter:20},{default:l.withCtx(()=>[l.createVNode(H,{span:12},{default:l.withCtx(()=>j[8]||(j[8]=[l.createElementVNode("div",{class:"row-label"},"背景色",-1)])),_:1}),l.createVNode(H,{span:12},{default:l.withCtx(()=>[l.createVNode(K,{modelValue:t.value,"onUpdate:modelValue":j[0]||(j[0]=re=>t.value=re),size:"small","show-alpha":"",onChange:d},null,8,["modelValue"])]),_:1})]),_:1}),l.createVNode(R,{gutter:20},{default:l.withCtx(()=>[l.createVNode(H,{span:12},{default:l.withCtx(()=>j[9]||(j[9]=[l.createElementVNode("div",{class:"row-label"},"网格",-1)])),_:1}),l.createVNode(H,{span:12},{default:l.withCtx(()=>[l.createVNode(_,{modelValue:s.value,"onUpdate:modelValue":j[1]||(j[1]=re=>s.value=re),"active-value":!0,"inactive-value":!1,size:"small",onChange:f},null,8,["modelValue"])]),_:1})]),_:1}),l.createVNode(R,{gutter:20},{default:l.withCtx(()=>[l.createVNode(H,{span:12},{default:l.withCtx(()=>j[10]||(j[10]=[l.createElementVNode("div",{class:"row-label"},"网格大小",-1)])),_:1}),l.createVNode(H,{span:12},{default:l.withCtx(()=>[l.createVNode(z,{modelValue:r.value,"onUpdate:modelValue":j[2]||(j[2]=re=>r.value=re),min:1,max:20,size:"small","controls-position":"right",onChange:f},null,8,["modelValue"])]),_:1})]),_:1}),l.createVNode(R,{gutter:20},{default:l.withCtx(()=>[l.createVNode(H,{span:12},{default:l.withCtx(()=>j[11]||(j[11]=[l.createElementVNode("div",{class:"row-label"},"主网格颜色",-1)])),_:1}),l.createVNode(H,{span:12},{default:l.withCtx(()=>[l.createVNode(K,{modelValue:i.value,"onUpdate:modelValue":j[3]||(j[3]=re=>i.value=re),size:"small","show-alpha":"",onChange:f},null,8,["modelValue"])]),_:1})]),_:1}),l.createVNode(R,{gutter:20},{default:l.withCtx(()=>[l.createVNode(H,{span:12},{default:l.withCtx(()=>j[12]||(j[12]=[l.createElementVNode("div",{class:"row-label"},"次网格颜色",-1)])),_:1}),l.createVNode(H,{span:12},{default:l.withCtx(()=>[l.createVNode(K,{modelValue:a.value,"onUpdate:modelValue":j[4]||(j[4]=re=>a.value=re),size:"small","show-alpha":"",onChange:f},null,8,["modelValue"])]),_:1})]),_:1}),l.createVNode(R,{gutter:20},{default:l.withCtx(()=>[l.createVNode(H,{span:12},{default:l.withCtx(()=>j[13]||(j[13]=[l.createElementVNode("div",{class:"row-label"},"主网格粗细",-1)])),_:1}),l.createVNode(H,{span:12},{default:l.withCtx(()=>[l.createVNode(z,{modelValue:o.value,"onUpdate:modelValue":j[5]||(j[5]=re=>o.value=re),min:.5,max:10,size:"small","controls-position":"right",onChange:f},null,8,["modelValue"])]),_:1})]),_:1}),l.createVNode(R,{gutter:20},{default:l.withCtx(()=>[l.createVNode(H,{span:12},{default:l.withCtx(()=>j[14]||(j[14]=[l.createElementVNode("div",{class:"row-label"},"次网格粗细",-1)])),_:1}),l.createVNode(H,{span:12},{default:l.withCtx(()=>[l.createVNode(z,{modelValue:c.value,"onUpdate:modelValue":j[6]||(j[6]=re=>c.value=re),min:.5,max:10,size:"small","controls-position":"right",onChange:f},null,8,["modelValue"])]),_:1})]),_:1})])]),_:1})]),_:1},8,["modelValue"])])}}},[["__scopeId","data-v-5dd827ed"]]);/*! Element Plus Icons Vue v2.3.1 */var hD=l.defineComponent({name:"ArrowDown",__name:"arrow-down",setup(n){return(e,t)=>(l.openBlock(),l.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[l.createElementVNode("path",{fill:"currentColor",d:"M831.872 340.864 512 652.672 192.128 340.864a30.592 30.592 0 0 0-42.752 0 29.12 29.12 0 0 0 0 41.6L489.664 714.24a32 32 0 0 0 44.672 0l340.288-331.712a29.12 29.12 0 0 0 0-41.728 30.592 30.592 0 0 0-42.752 0z"})]))}}),fD=hD,pD=l.defineComponent({name:"DeleteFilled",__name:"delete-filled",setup(n){return(e,t)=>(l.openBlock(),l.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[l.createElementVNode("path",{fill:"currentColor",d:"M352 192V95.936a32 32 0 0 1 32-32h256a32 32 0 0 1 32 32V192h256a32 32 0 1 1 0 64H96a32 32 0 0 1 0-64zm64 0h192v-64H416zM192 960a32 32 0 0 1-32-32V256h704v672a32 32 0 0 1-32 32zm224-192a32 32 0 0 0 32-32V416a32 32 0 0 0-64 0v320a32 32 0 0 0 32 32m192 0a32 32 0 0 0 32-32V416a32 32 0 0 0-64 0v320a32 32 0 0 0 32 32"})]))}}),Jm=pD,gD=l.defineComponent({name:"Document",__name:"document",setup(n){return(e,t)=>(l.openBlock(),l.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[l.createElementVNode("path",{fill:"currentColor",d:"M832 384H576V128H192v768h640zm-26.496-64L640 154.496V320zM160 64h480l256 256v608a32 32 0 0 1-32 32H160a32 32 0 0 1-32-32V96a32 32 0 0 1 32-32m160 448h384v64H320zm0-192h160v64H320zm0 384h384v64H320z"})]))}}),mD=gD,yD=l.defineComponent({name:"Plus",__name:"plus",setup(n){return(e,t)=>(l.openBlock(),l.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[l.createElementVNode("path",{fill:"currentColor",d:"M480 480V128a32 32 0 0 1 64 0v352h352a32 32 0 1 1 0 64H544v352a32 32 0 1 1-64 0V544H128a32 32 0 0 1 0-64z"})]))}}),bD=yD,wD=l.defineComponent({name:"View",__name:"view",setup(n){return(e,t)=>(l.openBlock(),l.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[l.createElementVNode("path",{fill:"currentColor",d:"M512 160c320 0 512 352 512 352S832 864 512 864 0 512 0 512s192-352 512-352m0 64c-225.28 0-384.128 208.064-436.8 288 52.608 79.872 211.456 288 436.8 288 225.28 0 384.128-208.064 436.8-288-52.608-79.872-211.456-288-436.8-288zm0 64a224 224 0 1 1 0 448 224 224 0 0 1 0-448m0 64a160.192 160.192 0 0 0-160 160c0 88.192 71.744 160 160 160s160-71.808 160-160-71.744-160-160-160"})]))}}),xD=wD;typeof window=="object"&&window.NodeList&&!NodeList.prototype.forEach&&(NodeList.prototype.forEach=Array.prototype.forEach),typeof window<"u"&&function(n){n.forEach(e=>{Object.prototype.hasOwnProperty.call(e,"append")||Object.defineProperty(e,"append",{configurable:!0,enumerable:!0,writable:!0,value(...t){const s=document.createDocumentFragment();t.forEach(r=>{const i=r instanceof Node;s.appendChild(i?r:document.createTextNode(String(r)))}),this.appendChild(s)}})})}([Element.prototype,Document.prototype,DocumentFragment.prototype]);class yt{get disposed(){return this._disposed===!0}dispose(){this._disposed=!0}}(function(n){function e(){return(t,s,r)=>{const i=r.value,o=t.__proto__;r.value=function(...a){this.disposed||(i.call(this,...a),o.dispose.call(this))}}}n.dispose=e})(yt||(yt={}));class Km{constructor(){this.isDisposed=!1,this.items=new Set}get disposed(){return this.isDisposed}dispose(){this.isDisposed||(this.isDisposed=!0,this.items.forEach(e=>{e.dispose()}),this.items.clear())}contains(e){return this.items.has(e)}add(e){this.items.add(e)}remove(e){this.items.delete(e)}clear(){this.items.clear()}}(function(n){function e(t){const s=new n;return t.forEach(r=>{s.add(r)}),s}n.from=e})(Km||(Km={}));function Zm(n,e,t){if(t)switch(t.length){case 0:return n.call(e);case 1:return n.call(e,t[0]);case 2:return n.call(e,t[0],t[1]);case 3:return n.call(e,t[0],t[1],t[2]);case 4:return n.call(e,t[0],t[1],t[2],t[3]);case 5:return n.call(e,t[0],t[1],t[2],t[3],t[4]);case 6:return n.call(e,t[0],t[1],t[2],t[3],t[4],t[5]);default:return n.apply(e,t)}return n.call(e)}function ne(n,e,...t){return Zm(n,e,t)}function vD(n){return typeof n=="object"&&n.then&&typeof n.then=="function"}function Ru(n){return n!=null&&(n instanceof Promise||vD(n))}function Lu(...n){const e=[];if(n.forEach(s=>{Array.isArray(s)?e.push(...s):e.push(s)}),e.some(s=>Ru(s))){const s=e.map(r=>Ru(r)?r:Promise.resolve(r!==!1));return Promise.all(s).then(r=>r.reduce((i,o)=>o!==!1&&i,!0))}return e.every(s=>s!==!1)}function CD(...n){const e=Lu(n);return typeof e=="boolean"?Promise.resolve(e):e}function Iu(n,e){const t=[];for(let s=0;s<n.length;s+=2){const r=n[s],i=n[s+1],o=Array.isArray(e)?e:[e],a=Zm(r,i,o);t.push(a)}return Lu(t)}class SD{constructor(){this.listeners={}}on(e,t,s){return t==null?this:(this.listeners[e]||(this.listeners[e]=[]),this.listeners[e].push(t,s),this)}once(e,t,s){const r=(...i)=>(this.off(e,r),Iu([t,s],i));return this.on(e,r,this)}off(e,t,s){if(!(e||t||s))return this.listeners={},this;const r=this.listeners;return(e?[e]:Object.keys(r)).forEach(o=>{const a=r[o];if(a){if(!(t||s)){delete r[o];return}for(let c=a.length-2;c>=0;c-=2)t&&a[c]!==t||s&&a[c+1]!==s||a.splice(c,2)}}),this}trigger(e,...t){let s=!0;if(e!=="*"){const i=this.listeners[e];i!=null&&(s=Iu([...i],t))}const r=this.listeners["*"];return r!=null?Lu([s,Iu([...r],[e,...t])]):s}emit(e,...t){return this.trigger(e,...t)}}function ED(n,...e){e.forEach(t=>{Object.getOwnPropertyNames(t.prototype).forEach(s=>{s!=="constructor"&&Object.defineProperty(n.prototype,s,Object.getOwnPropertyDescriptor(t.prototype,s))})})}const OD=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,e){n.__proto__=e}||function(n,e){for(const t in e)Object.prototype.hasOwnProperty.call(e,t)&&(n[t]=e[t])};function MD(n,e){OD(n,e);function t(){this.constructor=n}n.prototype=e===null?Object.create(e):(t.prototype=e.prototype,new t)}class PD{}const ND=/^\s*class\s+/.test(`${PD}`)||/^\s*class\s*\{/.test(`${class{}}`);function Bu(n,e){let t;return ND?t=class extends e{}:(t=function(){return e.apply(this,arguments)},MD(t,e)),Object.defineProperty(t,"name",{value:n}),t}function Qm(n){return n==="__proto__"}function ju(n,e,t="/"){let s;const r=Array.isArray(e)?e:e.split(t);if(r.length)for(s=n;r.length;){const i=r.shift();if(Object(s)===s&&i&&i in s)s=s[i];else return}return s}function zr(n,e,t,s="/"){const r=Array.isArray(e)?e:e.split(s),i=r.pop();if(i&&!Qm(i)){let o=n;r.forEach(a=>{Qm(a)||(o[a]==null&&(o[a]={}),o=o[a])}),o[i]=t}return n}function ey(n,e,t="/"){const s=Array.isArray(e)?e.slice():e.split(t),r=s.pop();if(r)if(s.length>0){const i=ju(n,s);i&&delete i[r]}else delete n[r];return n}var AD=function(n,e,t,s){var r=arguments.length,i=r<3?e:s===null?s=Object.getOwnPropertyDescriptor(e,t):s,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(n,e,t,s);else for(var a=n.length-1;a>=0;a--)(o=n[a])&&(i=(r<3?o(i):r>3?o(e,t,i):o(e,t))||i);return r>3&&i&&Object.defineProperty(e,t,i),i};class ke extends SD{dispose(){this.off()}}AD([yt.dispose()],ke.prototype,"dispose",null),function(n){n.dispose=yt.dispose}(ke||(ke={})),ED(ke,yt);const ty=n=>{const e=Object.create(null);return t=>e[t]||(e[t]=n(t))},ny=ty(n=>n.replace(/\B([A-Z])/g,"-$1").toLowerCase()),$u=ty(n=>YP(la(n)).replace(/ /g,""));function zu(n){let e=2166136261,t=!1,s=n;for(let r=0,i=s.length;r<i;r+=1){let o=s.charCodeAt(r);o>127&&!t&&(s=unescape(encodeURIComponent(s)),o=s.charCodeAt(r),t=!0),e^=o,e+=(e<<1)+(e<<4)+(e<<7)+(e<<8)+(e<<24)}return e>>>0}function Za(){let n="";const e="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx";for(let t=0,s=e.length;t<s;t+=1){const r=e[t],i=Math.random()*16|0,o=r==="x"?i:r==="y"?i&3|8:r;n+=o.toString(16)}return n}function _D(n,e,t){const s=Math.min(2,Math.floor(n.length*.34));let r=Math.floor(n.length*.4)+1,i,o=!1;const a=n.toLowerCase();for(const c of e){const u=t(c);if(u!==void 0&&Math.abs(u.length-a.length)<=s){const d=u.toLowerCase();if(d===a){if(u===n)continue;return c}if(o||u.length<3)continue;const f=TD(a,d,r-1);if(f===void 0)continue;f<3?(o=!0,i=c):(r=f,i=c)}}return i}function TD(n,e,t){let s=new Array(e.length+1),r=new Array(e.length+1);const i=t+1;for(let a=0;a<=e.length;a+=1)s[a]=a;for(let a=1;a<=n.length;a+=1){const c=n.charCodeAt(a-1),u=a>t?a-t:1,d=e.length>t+a?t+a:e.length;r[0]=a;let f=a;for(let p=1;p<u;p+=1)r[p]=i;for(let p=u;p<=d;p+=1){const g=c===e.charCodeAt(p-1)?s[p-1]:Math.min(s[p]+1,r[p-1]+1,s[p-1]+2);r[p]=g,f=Math.min(f,g)}for(let p=d+1;p<=e.length;p+=1)r[p]=i;if(f>t)return;const h=s;s=r,r=h}const o=s[e.length];return o>t?void 0:o}function qn(n){return typeof n=="string"&&n.slice(-1)==="%"}function fn(n,e){if(n==null)return 0;let t;if(typeof n=="string"){if(t=parseFloat(n),qn(n)&&(t/=100,Number.isFinite(t)))return t*e}else t=n;return Number.isFinite(t)?t>0&&t<1?t*e:t:0}function gs(n){if(typeof n=="object"){let t=0,s=0,r=0,i=0;return n.vertical!=null&&Number.isFinite(n.vertical)&&(s=i=n.vertical),n.horizontal!=null&&Number.isFinite(n.horizontal)&&(r=t=n.horizontal),n.left!=null&&Number.isFinite(n.left)&&(t=n.left),n.top!=null&&Number.isFinite(n.top)&&(s=n.top),n.right!=null&&Number.isFinite(n.right)&&(r=n.right),n.bottom!=null&&Number.isFinite(n.bottom)&&(i=n.bottom),{top:s,right:r,bottom:i,left:t}}let e=0;return n!=null&&Number.isFinite(n)&&(e=n),{top:e,right:e,bottom:e,left:e}}let Fu=!1,sy=!1,ry=!1,iy=!1,oy=!1,ay=!1,ly=!1,cy=!1,uy=!1,dy=!1,hy=!1,fy=!1,py=!1,gy=!1,my=!1,yy=!1;if(typeof navigator=="object"){const n=navigator.userAgent;Fu=n.indexOf("Macintosh")>=0,sy=!!n.match(/(iPad|iPhone|iPod)/g),ry=n.indexOf("Windows")>=0,iy=n.indexOf("MSIE")>=0,oy=!!n.match(/Trident\/7\./),ay=!!n.match(/Edge\//),ly=n.indexOf("Mozilla/")>=0&&n.indexOf("MSIE")<0&&n.indexOf("Edge/")<0,uy=n.indexOf("Chrome/")>=0&&n.indexOf("Edge/")<0,dy=n.indexOf("Opera/")>=0||n.indexOf("OPR/")>=0,hy=n.indexOf("Firefox/")>=0,fy=n.indexOf("AppleWebKit/")>=0&&n.indexOf("Chrome/")<0&&n.indexOf("Edge/")<0,typeof document=="object"&&(yy=!document.createElementNS||`${document.createElementNS("http://www.w3.org/2000/svg","foreignObject")}`!="[object SVGForeignObjectElement]"||n.indexOf("Opera/")>=0)}if(typeof window=="object"&&(cy=window.chrome!=null&&window.chrome.app!=null&&window.chrome.app.runtime!=null,gy=window.PointerEvent!=null&&!Fu),typeof document=="object"){py="ontouchstart"in document.documentElement;try{const n=Object.defineProperty({},"passive",{get(){my=!0}}),e=document.createElement("div");e.addEventListener&&e.addEventListener("click",()=>{},n)}catch{}}var ms;(function(n){n.IS_MAC=Fu,n.IS_IOS=sy,n.IS_WINDOWS=ry,n.IS_IE=iy,n.IS_IE11=oy,n.IS_EDGE=ay,n.IS_NETSCAPE=ly,n.IS_CHROME_APP=cy,n.IS_CHROME=uy,n.IS_OPERA=dy,n.IS_FIREFOX=hy,n.IS_SAFARI=fy,n.SUPPORT_TOUCH=py,n.SUPPORT_POINTER=gy,n.SUPPORT_PASSIVE=my,n.NO_FOREIGNOBJECT=yy,n.SUPPORT_FOREIGNOBJECT=!n.NO_FOREIGNOBJECT})(ms||(ms={})),function(n){function e(){const i=window.module;return i!=null&&i.hot!=null&&i.hot.status!=null?i.hot.status():"unkonwn"}n.getHMRStatus=e;function t(){return e()==="apply"}n.isApplyingHMR=t;const s={select:"input",change:"input",submit:"form",reset:"form",error:"img",load:"img",abort:"img"};function r(i){const o=document.createElement(s[i]||"div"),a=`on${i}`;let c=a in o;return c||(o.setAttribute(a,"return;"),c=typeof o[a]=="function"),c}n.isEventSupported=r}(ms||(ms={}));const Uu=/[\t\r\n\f]/g,Hu=/\S+/g,Fr=n=>` ${n} `;function Ur(n){return n&&n.getAttribute&&n.getAttribute("class")||""}function Pn(n,e){if(n==null||e==null)return!1;const t=Fr(Ur(n)),s=Fr(e);return n.nodeType===1?t.replace(Uu," ").includes(s):!1}function J(n,e){if(!(n==null||e==null)){if(typeof e=="function")return J(n,e(Ur(n)));if(typeof e=="string"&&n.nodeType===1){const t=e.match(Hu)||[],s=Fr(Ur(n)).replace(Uu," ");let r=t.reduce((i,o)=>i.indexOf(Fr(o))<0?`${i}${o} `:i,s);r=r.trim(),s!==r&&n.setAttribute("class",r)}}}function Re(n,e){if(n!=null){if(typeof e=="function")return Re(n,e(Ur(n)));if((!e||typeof e=="string")&&n.nodeType===1){const t=(e||"").match(Hu)||[],s=Fr(Ur(n)).replace(Uu," ");let r=t.reduce((i,o)=>{const a=Fr(o);return i.indexOf(a)>-1?i.replace(a," "):i},s);r=e?r.trim():"",s!==r&&n.setAttribute("class",r)}}}function pn(n,e,t){if(!(n==null||e==null)){if(t!=null&&typeof e=="string"){t?J(n,e):Re(n,e);return}if(typeof e=="function")return pn(n,e(Ur(n),t),t);typeof e=="string"&&(e.match(Hu)||[]).forEach(r=>{Pn(n,r)?Re(n,r):J(n,r)})}}let by=0;function kD(){return by+=1,`v${by}`}function Gu(n){return(n.id==null||n.id==="")&&(n.id=kD()),n.id}function ys(n){return n==null?!1:typeof n.getScreenCTM=="function"&&n instanceof SVGElement}const rt={svg:"http://www.w3.org/2000/svg",xmlns:"http://www.w3.org/2000/xmlns/",xml:"http://www.w3.org/XML/1998/namespace",xlink:"http://www.w3.org/1999/xlink",xhtml:"http://www.w3.org/1999/xhtml"},wy="1.1";function xy(n,e=document){return e.createElement(n)}function Wu(n,e=rt.xhtml,t=document){return t.createElementNS(e,n)}function gn(n,e=document){return Wu(n,rt.svg,e)}function Qa(n){if(n){const t=`<svg xmlns="${rt.svg}" xmlns:xlink="${rt.xlink}" version="${wy}">${n}</svg>`,{documentElement:s}=VD(t,{async:!1});return s}const e=document.createElementNS(rt.svg,"svg");return e.setAttributeNS(rt.xmlns,"xmlns:xlink",rt.xlink),e.setAttribute("version",wy),e}function VD(n,e={}){let t;try{const s=new DOMParser;if(e.async!=null){const r=s;r.async=e.async}t=s.parseFromString(n,e.mimeType||"text/xml")}catch{t=void 0}if(!t||t.getElementsByTagName("parsererror").length)throw new Error(`Invalid XML: ${n}`);return t}function DD(n,e=!0){const t=n.nodeName;return e?t.toLowerCase():t.toUpperCase()}function Yu(n){let e=0,t=n.previousSibling;for(;t;)t.nodeType===1&&(e+=1),t=t.previousSibling;return e}function RD(n,e){return n.querySelectorAll(e)}function LD(n,e){return n.querySelector(e)}function vy(n,e,t){const s=n.ownerSVGElement;let r=n.parentNode;for(;r&&r!==t&&r!==s;){if(Pn(r,e))return r;r=r.parentNode}return null}function qu(n,e){const t=e&&e.parentNode;return n===t||!!(t&&t.nodeType===1&&n.compareDocumentPosition(t)&16)}function Gt(n){n&&(Array.isArray(n)?n:[n]).forEach(t=>{t.parentNode&&t.parentNode.removeChild(t)})}function eo(n){for(;n.firstChild;)n.removeChild(n.firstChild)}function Rt(n,e){(Array.isArray(e)?e:[e]).forEach(s=>{s!=null&&n.appendChild(s)})}function Cy(n,e){const t=n.firstChild;return t?Xu(t,e):Rt(n,e)}function Xu(n,e){const t=n.parentNode;t&&(Array.isArray(e)?e:[e]).forEach(r=>{r!=null&&t.insertBefore(r,n)})}function bs(n,e){e!=null&&e.appendChild(n)}function Sy(n){try{return n instanceof HTMLElement}catch{return typeof n=="object"&&n.nodeType===1&&typeof n.style=="object"&&typeof n.ownerDocument=="object"}}function ID(n,e){const t=[];let s=n.firstChild;for(;s;s=s.nextSibling)s.nodeType===1&&(!e||Pn(s,e))&&t.push(s);return t}const Ey=["viewBox","attributeName","attributeType","repeatCount","textLength","lengthAdjust","gradientUnits"];function BD(n,e){return n.getAttribute(e)}function Ju(n,e){const t=My(e);t.ns?n.hasAttributeNS(t.ns,t.local)&&n.removeAttributeNS(t.ns,t.local):n.hasAttribute(e)&&n.removeAttribute(e)}function Ku(n,e,t){if(t==null)return Ju(n,e);const s=My(e);s.ns&&typeof t=="string"?n.setAttributeNS(s.ns,e,t):e==="id"?n.id=`${t}`:n.setAttribute(e,`${t}`)}function Oy(n,e){Object.keys(e).forEach(t=>{Ku(n,t,e[t])})}function fe(n,e,t){if(e==null){const s=n.attributes,r={};for(let i=0;i<s.length;i+=1)r[s[i].name]=s[i].value;return r}if(typeof e=="string"&&t===void 0)return n.getAttribute(e);typeof e=="object"?Oy(n,e):Ku(n,e,t)}function My(n){if(n.indexOf(":")!==-1){const e=n.split(":");return{ns:rt[e[0]],local:e[1]}}return{ns:null,local:n}}function to(n){const e={};return Object.keys(n).forEach(t=>{const s=Ey.includes(t)?t:ny(t);e[s]=n[t]}),e}function el(n){const e={};return n.split(";").forEach(s=>{const r=s.trim();if(r){const i=r.split("=");i.length&&(e[i[0].trim()]=i[1]?i[1].trim():"")}}),e}function Zu(n,e){return Object.keys(e).forEach(t=>{if(t==="class")n[t]=n[t]?`${n[t]} ${e[t]}`:e[t];else if(t==="style"){const s=typeof n[t]=="object",r=typeof e[t]=="object";let i,o;s&&r?(i=n[t],o=e[t]):s?(i=n[t],o=el(e[t])):r?(i=el(n[t]),o=e[t]):(i=el(n[t]),o=el(e[t])),n[t]=Zu(i,o)}else n[t]=e[t]}),n}function jD(n,e,t={}){const s=t.offset||0,r=[],i=[];let o,a,c=null;for(let u=0;u<n.length;u+=1){o=i[u]=n[u];for(let d=0,f=e.length;d<f;d+=1){const h=e[d],p=h.start+s,g=h.end+s;u>=p&&u<g&&(typeof o=="string"?o=i[u]={t:n[u],attrs:h.attrs}:o.attrs=Zu(Zu({},o.attrs),h.attrs),t.includeAnnotationIndices&&(o.annotations==null&&(o.annotations=[]),o.annotations.push(d)))}a=i[u-1],a?Ie(o)&&Ie(a)?(c=c,JSON.stringify(o.attrs)===JSON.stringify(a.attrs)?c.t+=o.t:(r.push(c),c=o)):Ie(o)||Ie(a)?(c=c,r.push(c),c=o):c=(c||"")+o:c=o}return c!=null&&r.push(c),r}function $D(n){return n.replace(/ /g," ")}var Ks;(function(n){function e(u){const d="data:";return u.substr(0,d.length)===d}n.isDataUrl=e;function t(u,d){if(!u||e(u)){setTimeout(()=>d(null,u));return}const f=()=>{d(new Error(`Failed to load image: ${u}`))},h=window.FileReader?g=>{if(g.status===200){const m=new FileReader;m.onload=y=>{const b=y.target.result;d(null,b)},m.onerror=f,m.readAsDataURL(g.response)}else f()}:g=>{const m=y=>{const w=[];for(let x=0;x<y.length;x+=32768)w.push(String.fromCharCode.apply(null,y.subarray(x,x+32768)));return w.join("")};if(g.status===200){let y=u.split(".").pop()||"png";y==="svg"&&(y="svg+xml");const b=`data:image/${y};base64,`,w=new Uint8Array(g.response),x=b+btoa(m(w));d(null,x)}else f()},p=new XMLHttpRequest;p.responseType=window.FileReader?"blob":"arraybuffer",p.open("GET",u,!0),p.addEventListener("error",f),p.addEventListener("load",()=>h(p)),p.send()}n.imageToDataUri=t;function s(u){let d=u.replace(/\s/g,"");d=decodeURIComponent(d);const f=d.indexOf(","),h=d.slice(0,f),p=h.split(":")[1].split(";")[0],g=d.slice(f+1);let m;h.indexOf("base64")>=0?m=atob(g):m=unescape(encodeURIComponent(g));const y=new Uint8Array(m.length);for(let b=0;b<m.length;b+=1)y[b]=m.charCodeAt(b);return new Blob([y],{type:p})}n.dataUriToBlob=s;function r(u,d){const f=window.navigator.msSaveBlob;if(f)f(u,d);else{const h=window.URL.createObjectURL(u),p=document.createElement("a");p.href=h,p.download=d,document.body.appendChild(p),p.click(),document.body.removeChild(p),window.URL.revokeObjectURL(h)}}n.downloadBlob=r;function i(u,d){const f=s(u);r(f,d)}n.downloadDataUri=i;function o(u){const d=u.match(/<svg[^>]*viewBox\s*=\s*(["']?)(.+?)\1[^>]*>/i);return d&&d[2]?d[2].replace(/\s+/," ").split(" "):null}function a(u){const d=parseFloat(u);return Number.isNaN(d)?null:d}function c(u,d={}){let f=null;const h=x=>(f==null&&(f=o(u)),f!=null?a(f[x]):null),p=x=>{const v=u.match(x);return v&&v[2]?a(v[2]):null};let g=d.width;if(g==null&&(g=p(/<svg[^>]*width\s*=\s*(["']?)(.+?)\1[^>]*>/i)),g==null&&(g=h(2)),g==null)throw new Error("Can not parse width from svg string");let m=d.height;if(m==null&&(m=p(/<svg[^>]*height\s*=\s*(["']?)(.+?)\1[^>]*>/i)),m==null&&(m=h(3)),m==null)throw new Error("Can not parse height from svg string");return`data:image/svg+xml,${encodeURIComponent(u).replace(/'/g,"%27").replace(/"/g,"%22")}`}n.svgToDataUrl=c})(Ks||(Ks={}));let Zs;const zD={px(n){return n},mm(n){return Zs*n},cm(n){return Zs*n*10},in(n){return Zs*n*25.4},pt(n){return Zs*(25.4*n/72)},pc(n){return Zs*(25.4*n/6)}};var Py;(function(n){function e(s,r,i){const o=document.createElement("div"),a=o.style;a.display="inline-block",a.position="absolute",a.left="-15000px",a.top="-15000px",a.width=s+(i||"px"),a.height=r+(i||"px"),document.body.appendChild(o);const c=o.getBoundingClientRect(),u={width:c.width||0,height:c.height||0};return document.body.removeChild(o),u}n.measure=e;function t(s,r){Zs==null&&(Zs=e("1","1","mm").width);const i=r?zD[r]:null;return i?i(s):s}n.toPx=t})(Py||(Py={}));const FD=/-(.)/g;function UD(n){return n.replace(FD,(e,t)=>t.toUpperCase())}const Qu={},Ny=["webkit","ms","moz","o"],Ay=typeof document<"u"?document.createElement("div").style:{};function HD(n){for(let e=0;e<Ny.length;e+=1){const t=Ny[e]+n;if(t in Ay)return t}return null}function GD(n){const e=UD(n);if(Qu[e]==null){const t=e.charAt(0).toUpperCase()+e.slice(1);Qu[e]=e in Ay?e:HD(t)}return Qu[e]}function _y(n,e){const t=n.ownerDocument&&n.ownerDocument.defaultView&&n.ownerDocument.defaultView.opener?n.ownerDocument.defaultView.getComputedStyle(n,null):window.getComputedStyle(n,null);return t&&e?t.getPropertyValue(e)||t[e]:t}const WD={animationIterationCount:!0,columnCount:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,gridArea:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnStart:!0,gridRow:!0,gridRowEnd:!0,gridRowStart:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0};function YD(n){return/^--/.test(n)}function qD(n,e,t){const s=window.getComputedStyle(n,null);return t?s.getPropertyValue(e)||void 0:s[e]||n.style[e]}function XD(n,e){return!WD[n]&&typeof e=="number"?`${e}px`:e}function Xe(n,e,t){if(typeof e=="string"){const s=YD(e);if(s||(e=GD(e)),t===void 0)return qD(n,e,s);s||(t=XD(e,t));const r=n.style;s?r.setProperty(e,t):r[e]=t;return}for(const s in e)Xe(n,s,e[s])}const tl=new WeakMap;function Ty(n,e){const t=la(e),s=tl.get(n);if(s)return s[t]}function JD(n,e,t){const s=la(e),r=tl.get(n);r?r[s]=t:tl.set(n,{[s]:t})}function Qs(n,e,t){if(!e){const s={};return Object.keys(tl).forEach(r=>{s[r]=Ty(n,r)}),s}if(typeof e=="string"){if(t===void 0)return Ty(n,e);JD(n,e,t);return}for(const s in e)Qs(n,s,e[s])}class oe{get[Symbol.toStringTag](){return oe.toStringTag}get type(){return this.node.nodeName}get id(){return this.node.id}set id(e){this.node.id=e}constructor(e,t,s){if(!e)throw new TypeError("Invalid element to create vector");let r;if(oe.isVector(e))r=e.node;else if(typeof e=="string")if(e.toLowerCase()==="svg")r=Qa();else if(e[0]==="<"){const i=Qa(e);r=document.importNode(i.firstChild,!0)}else r=document.createElementNS(rt.svg,e);else r=e;this.node=r,t&&this.setAttributes(t),s&&this.append(s)}transform(e,t){return e==null?Gr(this.node):(Gr(this.node,e,t),this)}translate(e,t=0,s={}){return e==null?$y(this.node):($y(this.node,e,t,s),this)}rotate(e,t,s,r={}){return e==null?nd(this.node):(nd(this.node,e,t,s,r),this)}scale(e,t){return e==null?sd(this.node):(sd(this.node,e,t),this)}getTransformToElement(e){const t=oe.toNode(e);return io(this.node,t)}removeAttribute(e){return Ju(this.node,e),this}getAttribute(e){return BD(this.node,e)}setAttribute(e,t){return Ku(this.node,e,t),this}setAttributes(e){return Oy(this.node,e),this}attr(e,t){return e==null?fe(this.node):typeof e=="string"&&t===void 0?fe(this.node,e):(typeof e=="object"?fe(this.node,e):fe(this.node,e,t),this)}svg(){return this.node instanceof SVGSVGElement?this:oe.create(this.node.ownerSVGElement)}defs(){const e=this.svg()||this,t=e.node.getElementsByTagName("defs")[0];return t?oe.create(t):oe.create("defs").appendTo(e)}text(e,t={}){return Vy(this.node,e,t),this}tagName(){return DD(this.node)}clone(){return oe.create(this.node.cloneNode(!0))}remove(){return Gt(this.node),this}empty(){return eo(this.node),this}append(e){return Rt(this.node,oe.toNodes(e)),this}appendTo(e){return bs(this.node,oe.isVector(e)?e.node:e),this}prepend(e){return Cy(this.node,oe.toNodes(e)),this}before(e){return Xu(this.node,oe.toNodes(e)),this}replace(e){return this.node.parentNode&&this.node.parentNode.replaceChild(oe.toNode(e),this.node),oe.create(e)}first(){return this.node.firstChild?oe.create(this.node.firstChild):null}last(){return this.node.lastChild?oe.create(this.node.lastChild):null}get(e){const t=this.node.childNodes[e];return t?oe.create(t):null}indexOf(e){return Array.prototype.slice.call(this.node.childNodes).indexOf(oe.toNode(e))}find(e){const t=[],s=RD(this.node,e);if(s)for(let r=0,i=s.length;r<i;r+=1)t.push(oe.create(s[r]));return t}findOne(e){const t=LD(this.node,e);return t?oe.create(t):null}findParentByClass(e,t){const s=vy(this.node,e,t);return s?oe.create(s):null}matches(e){const t=this.node;this.node.matches;const s=t.matches||t.matchesSelector||t.msMatchesSelector||t.mozMatchesSelector||t.webkitMatchesSelector||t.oMatchesSelector||null;return s&&s.call(t,e)}contains(e){return qu(this.node,oe.isVector(e)?e.node:e)}wrap(e){const t=oe.create(e),s=this.node.parentNode;return s!=null&&s.insertBefore(t.node,this.node),t.append(this)}parent(e){let t=this;if(t.node.parentNode==null)return null;if(t=oe.create(t.node.parentNode),e==null)return t;do if(typeof e=="string"?t.matches(e):t instanceof e)return t;while(t=oe.create(t.node.parentNode));return t}children(){const e=this.node.childNodes,t=[];for(let s=0;s<e.length;s+=1)e[s].nodeType===1&&t.push(oe.create(e[s]));return t}eachChild(e,t){const s=this.children();for(let r=0,i=s.length;r<i;r+=1)e.call(s[r],s[r],r,s),t&&s[r].eachChild(e,t);return this}index(){return Yu(this.node)}hasClass(e){return Pn(this.node,e)}addClass(e){return J(this.node,e),this}removeClass(e){return Re(this.node,e),this}toggleClass(e,t){return pn(this.node,e,t),this}toLocalPoint(e,t){return mR(this.node,e,t)}sample(e=1){return this.node instanceof SVGPathElement?eR(this.node,e):[]}toPath(){return oe.create(aR(this.node))}toPathData(){return By(this.node)}}(function(n){n.toStringTag=`X6.${n.name}`;function e(o){if(o==null)return!1;if(o instanceof n)return!0;const a=o[Symbol.toStringTag],c=o;return(a==null||a===n.toStringTag)&&c.node instanceof SVGElement&&typeof c.sample=="function"&&typeof c.toPath=="function"}n.isVector=e;function t(o,a,c){return new n(o,a,c)}n.create=t;function s(o){if(o[0]==="<"){const a=Qa(o),c=[];for(let u=0,d=a.childNodes.length;u<d;u+=1){const f=a.childNodes[u];c.push(t(document.importNode(f,!0)))}return c}return[t(o)]}n.createVectors=s;function r(o){return e(o)?o.node:o}n.toNode=r;function i(o){return Array.isArray(o)?o.map(a=>r(a)):[r(o)]}n.toNodes=i})(oe||(oe={}));function KD(n,e){const t=oe.create(e),s=oe.create("textPath"),r=n.d;if(r&&n["xlink:href"]===void 0){const i=oe.create("path").attr("d",r).appendTo(t.defs());s.attr("xlink:href",`#${i.id}`)}return typeof n=="object"&&s.attr(n),s.node}function ZD(n,e,t){const s=t.eol,r=t.baseSize,i=t.lineHeight;let o=0,a;const c={},u=e.length-1;for(let d=0;d<=u;d+=1){let f=e[d],h=null;if(typeof f=="object"){const p=f.attrs,g=oe.create("tspan",p);a=g.node;let m=f.t;s&&d===u&&(m+=s),a.textContent=m;const y=p.class;y&&g.addClass(y),t.includeAnnotationIndices&&g.attr("annotations",f.annotations.join(",")),h=parseFloat(p["font-size"]),h===void 0&&(h=r),h&&h>o&&(o=h)}else s&&d===u&&(f+=s),a=document.createTextNode(f||" "),r&&r>o&&(o=r);n.appendChild(a)}return o&&(c.maxFontSize=o),i?c.lineHeight=i:o&&(c.lineHeight=o*1.2),c}const ky=/em$/;function nl(n,e){const t=parseFloat(n);return ky.test(n)?t*e:t}function QD(n,e,t,s){if(!Array.isArray(e))return 0;const r=e.length;if(!r)return 0;let i=e[0];const o=nl(i.maxFontSize,t)||t;let a=0;const c=nl(s,t);for(let f=1;f<r;f+=1){i=e[f];const h=nl(i.lineHeight,t)||c;a+=h}const u=nl(i.maxFontSize,t)||t;let d;switch(n){case"middle":d=o/2-.15*u-a/2;break;case"bottom":d=-(.25*u)-a;break;case"top":default:d=.8*o;break}return d}function Vy(n,e,t={}){e=$D(e);const s=t.eol;let r=t.textPath;const i=t.textVerticalAnchor,o=i==="middle"||i==="bottom"||i==="top";let a=t.x;a===void 0&&(a=n.getAttribute("x")||0);const c=t.includeAnnotationIndices;let u=t.annotations;u&&!Array.isArray(u)&&(u=[u]);const d=t.lineHeight,f=d==="auto",h=f?"1.5em":d||"1em";let p=!0;const g=n.childNodes;if(g.length===1){const A=g[0];A&&A.tagName.toUpperCase()==="TITLE"&&(p=!1)}p&&eo(n),fe(n,{"xml:space":"preserve",display:e||t.displayEmpty?null:"none"});const m=fe(n,"font-size");let y=parseFloat(m);y||(y=16,(o||u)&&!m&&fe(n,"font-size",`${y}`));let b;r?(typeof r=="string"&&(r={d:r}),b=KD(r,n)):b=document.createDocumentFragment();let w,x=0,v;const C=e.split(`
|
|
38
|
+
`+i):s.stack=i}catch{}}throw s}}_request(e,t){typeof e=="string"?(t=t||{},t.url=e):t=e||{},t=qs(this.defaults,t);const{transitional:s,paramsSerializer:r,headers:i}=t;s!==void 0&&Au.assertOptions(s,{silentJSONParsing:ps.transitional(ps.boolean),forcedJSONParsing:ps.transitional(ps.boolean),clarifyTimeoutError:ps.transitional(ps.boolean)},!1),r!=null&&(L.isFunction(r)?t.paramsSerializer={serialize:r}:Au.assertOptions(r,{encode:ps.function,serialize:ps.function},!0)),t.method=(t.method||this.defaults.method||"get").toLowerCase();let o=i&&L.merge(i.common,i[t.method]);i&&L.forEach(["delete","get","head","post","put","patch","common"],g=>{delete i[g]}),t.headers=Et.concat(o,i);const a=[];let c=!0;this.interceptors.request.forEach(function(m){typeof m.runWhen=="function"&&m.runWhen(t)===!1||(c=c&&m.synchronous,a.unshift(m.fulfilled,m.rejected))});const u=[];this.interceptors.response.forEach(function(m){u.push(m.fulfilled,m.rejected)});let d,f=0,h;if(!c){const g=[zm.bind(this),void 0];for(g.unshift.apply(g,a),g.push.apply(g,u),h=g.length,d=Promise.resolve(t);f<h;)d=d.then(g[f++],g[f++]);return d}h=a.length;let p=t;for(f=0;f<h;){const g=a[f++],m=a[f++];try{p=g(p)}catch(y){m.call(this,y);break}}try{d=zm.call(this,p)}catch(g){return Promise.reject(g)}for(f=0,h=u.length;f<h;)d=d.then(u[f++],u[f++]);return d}getUri(e){e=qs(this.defaults,e);const t=km(e.baseURL,e.url);return Sm(t,e.params,e.paramsSerializer)}}L.forEach(["delete","get","head","options"],function(e){Xs.prototype[e]=function(t,s){return this.request(qs(s||{},{method:e,url:t,data:(s||{}).data}))}}),L.forEach(["post","put","patch"],function(e){function t(s){return function(i,o,a){return this.request(qs(a||{},{method:e,headers:s?{"Content-Type":"multipart/form-data"}:{},url:i,data:o}))}}Xs.prototype[e]=t(),Xs.prototype[e+"Form"]=t(!0)});class _u{constructor(e){if(typeof e!="function")throw new TypeError("executor must be a function.");let t;this.promise=new Promise(function(i){t=i});const s=this;this.promise.then(r=>{if(!s._listeners)return;let i=s._listeners.length;for(;i-- >0;)s._listeners[i](r);s._listeners=null}),this.promise.then=r=>{let i;const o=new Promise(a=>{s.subscribe(a),i=a}).then(r);return o.cancel=function(){s.unsubscribe(i)},o},e(function(i,o,a){s.reason||(s.reason=new jr(i,o,a),t(s.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){if(this.reason){e(this.reason);return}this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const t=this._listeners.indexOf(e);t!==-1&&this._listeners.splice(t,1)}toAbortSignal(){const e=new AbortController,t=s=>{e.abort(s)};return this.subscribe(t),e.signal.unsubscribe=()=>this.unsubscribe(t),e.signal}static source(){let e;return{token:new _u(function(r){e=r}),cancel:e}}}function tD(n){return function(t){return n.apply(null,t)}}function nD(n){return L.isObject(n)&&n.isAxiosError===!0}const Tu={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Tu).forEach(([n,e])=>{Tu[e]=n});function Hm(n){const e=new Xs(n),t=am(Xs.prototype.request,e);return L.extend(t,Xs.prototype,e,{allOwnKeys:!0}),L.extend(t,e,null,{allOwnKeys:!0}),t.create=function(r){return Hm(qs(n,r))},t}const qe=Hm(Zi);qe.Axios=Xs,qe.CanceledError=jr,qe.CancelToken=_u,qe.isCancel=Nm,qe.VERSION=Fm,qe.toFormData=Fa,qe.AxiosError=ue,qe.Cancel=qe.CanceledError,qe.all=function(e){return Promise.all(e)},qe.spread=tD,qe.isAxiosError=nD,qe.mergeConfig=qs,qe.AxiosHeaders=Et,qe.formToJSON=n=>Mm(L.isHTMLForm(n)?new FormData(n):n),qe.getAdapter=$m.getAdapter,qe.HttpStatusCode=Tu,qe.default=qe;const Yn=qe.create({baseURL:"http://localhost:8001",timeout:1e4,headers:{"Content-Type":"application/json"}}),sD=n=>{Yn.defaults.baseURL=n},rD=n=>{Yn.interceptors.request.use(e=>{if(n)return e.headers.token=n,e},e=>Promise.reject(e))};Yn.interceptors.response.use(n=>(n.data.isOk=n.data.code===200,n.data),n=>{if(n.response)switch(n.response.status){}return Promise.reject(n)});const Js=(n,e={})=>Yn.get(n,{params:e}),Ya=(n,e={})=>Yn.post(n,e),Gm=(n,e={})=>Yn.delete(n,{params:e}),iD=(n,e={})=>Yn.post(n,e,{headers:{"Content-Type":"multipart/form-data"}}),$r=(n,e)=>{const t=document.querySelector(n),s=t.querySelectorAll(".x6-port-body"),r=t.querySelectorAll(".x6-port-label");for(let i=0,o=s.length;i<o;i+=1)s[i].style.visibility=e?"visible":"hidden";for(let i=0,o=r.length;i<o;i+=1)r[i].style.visibility=e?"visible":"hidden"},ku=n=>Js("/custom/deviceList",{itemIds:n}).then(e=>{if(e!=null&&e.isOk)return e.data}),Vu=n=>Js("/custom/monitorInfo",{deviceCode:n,fieldType:1}).then(e=>{if(e!=null&&e.isOk)return e.data}),Wm=n=>Js("/template/selectOne",{id:n}).then(e=>{if(e!=null&&e.isOk){const t=JSON.parse(e.data.remark);return t===null?null:{background:t.background,grid:t.grid,data:t.data}}else Ye.error((e==null?void 0:e.msg)||"获取失败")}),oD=n=>Ya("/custom/arrRealData2",n).then(e=>{if(e!=null&&e.isOk)return e.data;Ye.error((e==null?void 0:e.msg)||"获取失败")}),qa={color:"#000000"},Xa={size:10,visible:!1,type:"doubleMesh",args:[{color:"#282828",thickness:1},{color:"#363636",thickness:2,factor:4}]},aD={stencilGraphWidth:300,stencilGraphHeight:0,layoutOptions:{columns:3,columnWidth:74,resizeToFit:!0,center:!0}},Du={position:"absolute",args:{x:0,y:0},attrs:{text:{fill:"#5174ff",fontSize:8},circle:{magnet:!0,stroke:"#5174ff",r:4}},label:{position:"top"}},lD={shape:"rect",label:"文本",width:50,height:30,attrs:{body:{fill:"#00000000",stroke:"#00000000",strokeWidth:1,rx:6,ry:6},text:{fill:"#ffffff"},label:{textAnchor:"start",x:-14,y:0}},data:{type:"text",content:"文本",fields:[]},ports:{groups:{ports:{portOption:Du}}}},Ja={markup:[{tagName:"path",selector:"line",groupSelector:"lines"}],attrs:{wrap:{strokeWidth:10},lines:{connection:!0,strokeLinejoin:"round",fill:"none",strokeWidth:2},line:{stroke:"#ffffff",strokeWidth:1,sourceMarker:{args:{width:10,height:10,offset:0},name:null},targetMarker:{args:{width:10,height:10,offset:0},name:null}}}},Ym={markup:[{tagName:"path",selector:"line",groupSelector:"lines"},{tagName:"path",selector:"pipe",groupSelector:"lines"}],attrs:{wrap:{strokeWidth:10},lines:{connection:!0,strokeLinejoin:"round",fill:"none",strokeWidth:2},line:{stroke:"#ffffff",strokeWidth:1,targetMarker:null,sourceMarker:null},pipe:{stroke:"#2364DD",strokeWidth:1,strokeDasharray:5,sourceMarker:{args:{width:10,height:10,offset:0},name:null},targetMarker:{args:{width:10,height:10,offset:0},name:null}}}},Ka="M 0 -6 8 0 0 6 z",qm="M 0 -6 -8 0 0 6 z",Xm={attrs:{wrap:{strokeWidth:10},arrow:{d:Ka,fill:"#ED8A19",stroke:"#ED8A19",style:{animation:"flashing 2s infinite linear"},display:"block"},arrow1:{atConnectionRatio:.5},lines:{connection:!0,strokeLinejoin:"round",fill:"none",strokeWidth:2},line:{stroke:"#ffffff",strokeWidth:1,sourceMarker:{args:{width:10,height:10,offset:0},name:null},targetMarker:{args:{width:10,height:10,offset:0},name:null}}},markup:[{tagName:"path",selector:"line",groupSelector:"lines"},{tagName:"path",groupSelector:"arrow",selector:"arrow1"}]},Qe={markup:Ja.markup,attrs:Ja.attrs},Dt=(n,e)=>{const t=n.__vccOpts||n;for(const[s,r]of e)t[s]=r;return t},cD={class:"control"},uD={class:"row-column"},dD=Dt({__name:"index",props:{payload:Object},setup(n){var h,p,g,m,y,b,w,x,v,C,E,S,O,A,V,T,D,I,B,N,P;const e=n,t=l.ref(((h=e.payload.value.options.background)==null?void 0:h.color)||null),s=l.ref(((g=(p=e.payload.value.options)==null?void 0:p.grid)==null?void 0:g.visible)||null),r=l.ref(((y=(m=e.payload.value.options)==null?void 0:m.grid)==null?void 0:y.size)||10),i=l.ref(((v=(x=(w=(b=e.payload.value.options)==null?void 0:b.grid)==null?void 0:w.args)==null?void 0:x[0])==null?void 0:v.color)||null),o=l.ref(((O=(S=(E=(C=e.payload.value.options)==null?void 0:C.grid)==null?void 0:E.args)==null?void 0:S[0])==null?void 0:O.thickness)||1),a=l.ref(((D=(T=(V=(A=e.payload.value.options)==null?void 0:A.grid)==null?void 0:V.args)==null?void 0:T[1])==null?void 0:D.color)||null),c=l.ref(((P=(N=(B=(I=e.payload.value.options)==null?void 0:I.grid)==null?void 0:B.args)==null?void 0:N[1])==null?void 0:P.thickness)||1),u=l.ref("1"),d=k=>{e.payload.value.drawBackground({color:k})},f=()=>{e.payload.value.drawGrid({visible:s.value,size:r.value,type:"doubleMesh",args:[{color:i.value,thickness:o.value},{color:a.value,thickness:c.value}]})};return(k,j)=>{const H=l.resolveComponent("el-col"),K=l.resolveComponent("el-color-picker"),R=l.resolveComponent("el-row"),_=l.resolveComponent("el-switch"),z=l.resolveComponent("el-input-number"),Z=l.resolveComponent("el-collapse-item"),X=l.resolveComponent("el-collapse");return l.openBlock(),l.createElementBlock("div",cD,[l.createVNode(X,{modelValue:u.value,"onUpdate:modelValue":j[7]||(j[7]=re=>u.value=re),accordion:""},{default:l.withCtx(()=>[l.createVNode(Z,{title:"基础属性",name:"1"},{default:l.withCtx(()=>[l.createElementVNode("div",uD,[l.createVNode(R,{gutter:20},{default:l.withCtx(()=>[l.createVNode(H,{span:12},{default:l.withCtx(()=>j[8]||(j[8]=[l.createElementVNode("div",{class:"row-label"},"背景色",-1)])),_:1}),l.createVNode(H,{span:12},{default:l.withCtx(()=>[l.createVNode(K,{modelValue:t.value,"onUpdate:modelValue":j[0]||(j[0]=re=>t.value=re),size:"small","show-alpha":"",onChange:d},null,8,["modelValue"])]),_:1})]),_:1}),l.createVNode(R,{gutter:20},{default:l.withCtx(()=>[l.createVNode(H,{span:12},{default:l.withCtx(()=>j[9]||(j[9]=[l.createElementVNode("div",{class:"row-label"},"网格",-1)])),_:1}),l.createVNode(H,{span:12},{default:l.withCtx(()=>[l.createVNode(_,{modelValue:s.value,"onUpdate:modelValue":j[1]||(j[1]=re=>s.value=re),"active-value":!0,"inactive-value":!1,size:"small",onChange:f},null,8,["modelValue"])]),_:1})]),_:1}),l.createVNode(R,{gutter:20},{default:l.withCtx(()=>[l.createVNode(H,{span:12},{default:l.withCtx(()=>j[10]||(j[10]=[l.createElementVNode("div",{class:"row-label"},"网格大小",-1)])),_:1}),l.createVNode(H,{span:12},{default:l.withCtx(()=>[l.createVNode(z,{modelValue:r.value,"onUpdate:modelValue":j[2]||(j[2]=re=>r.value=re),min:1,max:20,size:"small","controls-position":"right",onChange:f},null,8,["modelValue"])]),_:1})]),_:1}),l.createVNode(R,{gutter:20},{default:l.withCtx(()=>[l.createVNode(H,{span:12},{default:l.withCtx(()=>j[11]||(j[11]=[l.createElementVNode("div",{class:"row-label"},"主网格颜色",-1)])),_:1}),l.createVNode(H,{span:12},{default:l.withCtx(()=>[l.createVNode(K,{modelValue:i.value,"onUpdate:modelValue":j[3]||(j[3]=re=>i.value=re),size:"small","show-alpha":"",onChange:f},null,8,["modelValue"])]),_:1})]),_:1}),l.createVNode(R,{gutter:20},{default:l.withCtx(()=>[l.createVNode(H,{span:12},{default:l.withCtx(()=>j[12]||(j[12]=[l.createElementVNode("div",{class:"row-label"},"次网格颜色",-1)])),_:1}),l.createVNode(H,{span:12},{default:l.withCtx(()=>[l.createVNode(K,{modelValue:a.value,"onUpdate:modelValue":j[4]||(j[4]=re=>a.value=re),size:"small","show-alpha":"",onChange:f},null,8,["modelValue"])]),_:1})]),_:1}),l.createVNode(R,{gutter:20},{default:l.withCtx(()=>[l.createVNode(H,{span:12},{default:l.withCtx(()=>j[13]||(j[13]=[l.createElementVNode("div",{class:"row-label"},"主网格粗细",-1)])),_:1}),l.createVNode(H,{span:12},{default:l.withCtx(()=>[l.createVNode(z,{modelValue:o.value,"onUpdate:modelValue":j[5]||(j[5]=re=>o.value=re),min:.5,max:10,size:"small","controls-position":"right",onChange:f},null,8,["modelValue"])]),_:1})]),_:1}),l.createVNode(R,{gutter:20},{default:l.withCtx(()=>[l.createVNode(H,{span:12},{default:l.withCtx(()=>j[14]||(j[14]=[l.createElementVNode("div",{class:"row-label"},"次网格粗细",-1)])),_:1}),l.createVNode(H,{span:12},{default:l.withCtx(()=>[l.createVNode(z,{modelValue:c.value,"onUpdate:modelValue":j[6]||(j[6]=re=>c.value=re),min:.5,max:10,size:"small","controls-position":"right",onChange:f},null,8,["modelValue"])]),_:1})]),_:1})])]),_:1})]),_:1},8,["modelValue"])])}}},[["__scopeId","data-v-5dd827ed"]]);/*! Element Plus Icons Vue v2.3.1 */var hD=l.defineComponent({name:"ArrowDown",__name:"arrow-down",setup(n){return(e,t)=>(l.openBlock(),l.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[l.createElementVNode("path",{fill:"currentColor",d:"M831.872 340.864 512 652.672 192.128 340.864a30.592 30.592 0 0 0-42.752 0 29.12 29.12 0 0 0 0 41.6L489.664 714.24a32 32 0 0 0 44.672 0l340.288-331.712a29.12 29.12 0 0 0 0-41.728 30.592 30.592 0 0 0-42.752 0z"})]))}}),fD=hD,pD=l.defineComponent({name:"DeleteFilled",__name:"delete-filled",setup(n){return(e,t)=>(l.openBlock(),l.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[l.createElementVNode("path",{fill:"currentColor",d:"M352 192V95.936a32 32 0 0 1 32-32h256a32 32 0 0 1 32 32V192h256a32 32 0 1 1 0 64H96a32 32 0 0 1 0-64zm64 0h192v-64H416zM192 960a32 32 0 0 1-32-32V256h704v672a32 32 0 0 1-32 32zm224-192a32 32 0 0 0 32-32V416a32 32 0 0 0-64 0v320a32 32 0 0 0 32 32m192 0a32 32 0 0 0 32-32V416a32 32 0 0 0-64 0v320a32 32 0 0 0 32 32"})]))}}),Jm=pD,gD=l.defineComponent({name:"Document",__name:"document",setup(n){return(e,t)=>(l.openBlock(),l.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[l.createElementVNode("path",{fill:"currentColor",d:"M832 384H576V128H192v768h640zm-26.496-64L640 154.496V320zM160 64h480l256 256v608a32 32 0 0 1-32 32H160a32 32 0 0 1-32-32V96a32 32 0 0 1 32-32m160 448h384v64H320zm0-192h160v64H320zm0 384h384v64H320z"})]))}}),mD=gD,yD=l.defineComponent({name:"Plus",__name:"plus",setup(n){return(e,t)=>(l.openBlock(),l.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[l.createElementVNode("path",{fill:"currentColor",d:"M480 480V128a32 32 0 0 1 64 0v352h352a32 32 0 1 1 0 64H544v352a32 32 0 1 1-64 0V544H128a32 32 0 0 1 0-64z"})]))}}),bD=yD,wD=l.defineComponent({name:"View",__name:"view",setup(n){return(e,t)=>(l.openBlock(),l.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[l.createElementVNode("path",{fill:"currentColor",d:"M512 160c320 0 512 352 512 352S832 864 512 864 0 512 0 512s192-352 512-352m0 64c-225.28 0-384.128 208.064-436.8 288 52.608 79.872 211.456 288 436.8 288 225.28 0 384.128-208.064 436.8-288-52.608-79.872-211.456-288-436.8-288zm0 64a224 224 0 1 1 0 448 224 224 0 0 1 0-448m0 64a160.192 160.192 0 0 0-160 160c0 88.192 71.744 160 160 160s160-71.808 160-160-71.744-160-160-160"})]))}}),xD=wD;typeof window=="object"&&window.NodeList&&!NodeList.prototype.forEach&&(NodeList.prototype.forEach=Array.prototype.forEach),typeof window<"u"&&function(n){n.forEach(e=>{Object.prototype.hasOwnProperty.call(e,"append")||Object.defineProperty(e,"append",{configurable:!0,enumerable:!0,writable:!0,value(...t){const s=document.createDocumentFragment();t.forEach(r=>{const i=r instanceof Node;s.appendChild(i?r:document.createTextNode(String(r)))}),this.appendChild(s)}})})}([Element.prototype,Document.prototype,DocumentFragment.prototype]);class yt{get disposed(){return this._disposed===!0}dispose(){this._disposed=!0}}(function(n){function e(){return(t,s,r)=>{const i=r.value,o=t.__proto__;r.value=function(...a){this.disposed||(i.call(this,...a),o.dispose.call(this))}}}n.dispose=e})(yt||(yt={}));class Km{constructor(){this.isDisposed=!1,this.items=new Set}get disposed(){return this.isDisposed}dispose(){this.isDisposed||(this.isDisposed=!0,this.items.forEach(e=>{e.dispose()}),this.items.clear())}contains(e){return this.items.has(e)}add(e){this.items.add(e)}remove(e){this.items.delete(e)}clear(){this.items.clear()}}(function(n){function e(t){const s=new n;return t.forEach(r=>{s.add(r)}),s}n.from=e})(Km||(Km={}));function Zm(n,e,t){if(t)switch(t.length){case 0:return n.call(e);case 1:return n.call(e,t[0]);case 2:return n.call(e,t[0],t[1]);case 3:return n.call(e,t[0],t[1],t[2]);case 4:return n.call(e,t[0],t[1],t[2],t[3]);case 5:return n.call(e,t[0],t[1],t[2],t[3],t[4]);case 6:return n.call(e,t[0],t[1],t[2],t[3],t[4],t[5]);default:return n.apply(e,t)}return n.call(e)}function ne(n,e,...t){return Zm(n,e,t)}function vD(n){return typeof n=="object"&&n.then&&typeof n.then=="function"}function Ru(n){return n!=null&&(n instanceof Promise||vD(n))}function Lu(...n){const e=[];if(n.forEach(s=>{Array.isArray(s)?e.push(...s):e.push(s)}),e.some(s=>Ru(s))){const s=e.map(r=>Ru(r)?r:Promise.resolve(r!==!1));return Promise.all(s).then(r=>r.reduce((i,o)=>o!==!1&&i,!0))}return e.every(s=>s!==!1)}function CD(...n){const e=Lu(n);return typeof e=="boolean"?Promise.resolve(e):e}function Iu(n,e){const t=[];for(let s=0;s<n.length;s+=2){const r=n[s],i=n[s+1],o=Array.isArray(e)?e:[e],a=Zm(r,i,o);t.push(a)}return Lu(t)}class SD{constructor(){this.listeners={}}on(e,t,s){return t==null?this:(this.listeners[e]||(this.listeners[e]=[]),this.listeners[e].push(t,s),this)}once(e,t,s){const r=(...i)=>(this.off(e,r),Iu([t,s],i));return this.on(e,r,this)}off(e,t,s){if(!(e||t||s))return this.listeners={},this;const r=this.listeners;return(e?[e]:Object.keys(r)).forEach(o=>{const a=r[o];if(a){if(!(t||s)){delete r[o];return}for(let c=a.length-2;c>=0;c-=2)t&&a[c]!==t||s&&a[c+1]!==s||a.splice(c,2)}}),this}trigger(e,...t){let s=!0;if(e!=="*"){const i=this.listeners[e];i!=null&&(s=Iu([...i],t))}const r=this.listeners["*"];return r!=null?Lu([s,Iu([...r],[e,...t])]):s}emit(e,...t){return this.trigger(e,...t)}}function ED(n,...e){e.forEach(t=>{Object.getOwnPropertyNames(t.prototype).forEach(s=>{s!=="constructor"&&Object.defineProperty(n.prototype,s,Object.getOwnPropertyDescriptor(t.prototype,s))})})}const OD=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,e){n.__proto__=e}||function(n,e){for(const t in e)Object.prototype.hasOwnProperty.call(e,t)&&(n[t]=e[t])};function MD(n,e){OD(n,e);function t(){this.constructor=n}n.prototype=e===null?Object.create(e):(t.prototype=e.prototype,new t)}class PD{}const ND=/^\s*class\s+/.test(`${PD}`)||/^\s*class\s*\{/.test(`${class{}}`);function Bu(n,e){let t;return ND?t=class extends e{}:(t=function(){return e.apply(this,arguments)},MD(t,e)),Object.defineProperty(t,"name",{value:n}),t}function Qm(n){return n==="__proto__"}function ju(n,e,t="/"){let s;const r=Array.isArray(e)?e:e.split(t);if(r.length)for(s=n;r.length;){const i=r.shift();if(Object(s)===s&&i&&i in s)s=s[i];else return}return s}function zr(n,e,t,s="/"){const r=Array.isArray(e)?e:e.split(s),i=r.pop();if(i&&!Qm(i)){let o=n;r.forEach(a=>{Qm(a)||(o[a]==null&&(o[a]={}),o=o[a])}),o[i]=t}return n}function ey(n,e,t="/"){const s=Array.isArray(e)?e.slice():e.split(t),r=s.pop();if(r)if(s.length>0){const i=ju(n,s);i&&delete i[r]}else delete n[r];return n}var AD=function(n,e,t,s){var r=arguments.length,i=r<3?e:s===null?s=Object.getOwnPropertyDescriptor(e,t):s,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(n,e,t,s);else for(var a=n.length-1;a>=0;a--)(o=n[a])&&(i=(r<3?o(i):r>3?o(e,t,i):o(e,t))||i);return r>3&&i&&Object.defineProperty(e,t,i),i};class ke extends SD{dispose(){this.off()}}AD([yt.dispose()],ke.prototype,"dispose",null),function(n){n.dispose=yt.dispose}(ke||(ke={})),ED(ke,yt);const ty=n=>{const e=Object.create(null);return t=>e[t]||(e[t]=n(t))},ny=ty(n=>n.replace(/\B([A-Z])/g,"-$1").toLowerCase()),$u=ty(n=>YP(la(n)).replace(/ /g,""));function zu(n){let e=2166136261,t=!1,s=n;for(let r=0,i=s.length;r<i;r+=1){let o=s.charCodeAt(r);o>127&&!t&&(s=unescape(encodeURIComponent(s)),o=s.charCodeAt(r),t=!0),e^=o,e+=(e<<1)+(e<<4)+(e<<7)+(e<<8)+(e<<24)}return e>>>0}function Za(){let n="";const e="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx";for(let t=0,s=e.length;t<s;t+=1){const r=e[t],i=Math.random()*16|0,o=r==="x"?i:r==="y"?i&3|8:r;n+=o.toString(16)}return n}function _D(n,e,t){const s=Math.min(2,Math.floor(n.length*.34));let r=Math.floor(n.length*.4)+1,i,o=!1;const a=n.toLowerCase();for(const c of e){const u=t(c);if(u!==void 0&&Math.abs(u.length-a.length)<=s){const d=u.toLowerCase();if(d===a){if(u===n)continue;return c}if(o||u.length<3)continue;const f=TD(a,d,r-1);if(f===void 0)continue;f<3?(o=!0,i=c):(r=f,i=c)}}return i}function TD(n,e,t){let s=new Array(e.length+1),r=new Array(e.length+1);const i=t+1;for(let a=0;a<=e.length;a+=1)s[a]=a;for(let a=1;a<=n.length;a+=1){const c=n.charCodeAt(a-1),u=a>t?a-t:1,d=e.length>t+a?t+a:e.length;r[0]=a;let f=a;for(let p=1;p<u;p+=1)r[p]=i;for(let p=u;p<=d;p+=1){const g=c===e.charCodeAt(p-1)?s[p-1]:Math.min(s[p]+1,r[p-1]+1,s[p-1]+2);r[p]=g,f=Math.min(f,g)}for(let p=d+1;p<=e.length;p+=1)r[p]=i;if(f>t)return;const h=s;s=r,r=h}const o=s[e.length];return o>t?void 0:o}function qn(n){return typeof n=="string"&&n.slice(-1)==="%"}function fn(n,e){if(n==null)return 0;let t;if(typeof n=="string"){if(t=parseFloat(n),qn(n)&&(t/=100,Number.isFinite(t)))return t*e}else t=n;return Number.isFinite(t)?t>0&&t<1?t*e:t:0}function gs(n){if(typeof n=="object"){let t=0,s=0,r=0,i=0;return n.vertical!=null&&Number.isFinite(n.vertical)&&(s=i=n.vertical),n.horizontal!=null&&Number.isFinite(n.horizontal)&&(r=t=n.horizontal),n.left!=null&&Number.isFinite(n.left)&&(t=n.left),n.top!=null&&Number.isFinite(n.top)&&(s=n.top),n.right!=null&&Number.isFinite(n.right)&&(r=n.right),n.bottom!=null&&Number.isFinite(n.bottom)&&(i=n.bottom),{top:s,right:r,bottom:i,left:t}}let e=0;return n!=null&&Number.isFinite(n)&&(e=n),{top:e,right:e,bottom:e,left:e}}let Fu=!1,sy=!1,ry=!1,iy=!1,oy=!1,ay=!1,ly=!1,cy=!1,uy=!1,dy=!1,hy=!1,fy=!1,py=!1,gy=!1,my=!1,yy=!1;if(typeof navigator=="object"){const n=navigator.userAgent;Fu=n.indexOf("Macintosh")>=0,sy=!!n.match(/(iPad|iPhone|iPod)/g),ry=n.indexOf("Windows")>=0,iy=n.indexOf("MSIE")>=0,oy=!!n.match(/Trident\/7\./),ay=!!n.match(/Edge\//),ly=n.indexOf("Mozilla/")>=0&&n.indexOf("MSIE")<0&&n.indexOf("Edge/")<0,uy=n.indexOf("Chrome/")>=0&&n.indexOf("Edge/")<0,dy=n.indexOf("Opera/")>=0||n.indexOf("OPR/")>=0,hy=n.indexOf("Firefox/")>=0,fy=n.indexOf("AppleWebKit/")>=0&&n.indexOf("Chrome/")<0&&n.indexOf("Edge/")<0,typeof document=="object"&&(yy=!document.createElementNS||`${document.createElementNS("http://www.w3.org/2000/svg","foreignObject")}`!="[object SVGForeignObjectElement]"||n.indexOf("Opera/")>=0)}if(typeof window=="object"&&(cy=window.chrome!=null&&window.chrome.app!=null&&window.chrome.app.runtime!=null,gy=window.PointerEvent!=null&&!Fu),typeof document=="object"){py="ontouchstart"in document.documentElement;try{const n=Object.defineProperty({},"passive",{get(){my=!0}}),e=document.createElement("div");e.addEventListener&&e.addEventListener("click",()=>{},n)}catch{}}var ms;(function(n){n.IS_MAC=Fu,n.IS_IOS=sy,n.IS_WINDOWS=ry,n.IS_IE=iy,n.IS_IE11=oy,n.IS_EDGE=ay,n.IS_NETSCAPE=ly,n.IS_CHROME_APP=cy,n.IS_CHROME=uy,n.IS_OPERA=dy,n.IS_FIREFOX=hy,n.IS_SAFARI=fy,n.SUPPORT_TOUCH=py,n.SUPPORT_POINTER=gy,n.SUPPORT_PASSIVE=my,n.NO_FOREIGNOBJECT=yy,n.SUPPORT_FOREIGNOBJECT=!n.NO_FOREIGNOBJECT})(ms||(ms={})),function(n){function e(){const i=window.module;return i!=null&&i.hot!=null&&i.hot.status!=null?i.hot.status():"unkonwn"}n.getHMRStatus=e;function t(){return e()==="apply"}n.isApplyingHMR=t;const s={select:"input",change:"input",submit:"form",reset:"form",error:"img",load:"img",abort:"img"};function r(i){const o=document.createElement(s[i]||"div"),a=`on${i}`;let c=a in o;return c||(o.setAttribute(a,"return;"),c=typeof o[a]=="function"),c}n.isEventSupported=r}(ms||(ms={}));const Uu=/[\t\r\n\f]/g,Hu=/\S+/g,Fr=n=>` ${n} `;function Ur(n){return n&&n.getAttribute&&n.getAttribute("class")||""}function Pn(n,e){if(n==null||e==null)return!1;const t=Fr(Ur(n)),s=Fr(e);return n.nodeType===1?t.replace(Uu," ").includes(s):!1}function J(n,e){if(!(n==null||e==null)){if(typeof e=="function")return J(n,e(Ur(n)));if(typeof e=="string"&&n.nodeType===1){const t=e.match(Hu)||[],s=Fr(Ur(n)).replace(Uu," ");let r=t.reduce((i,o)=>i.indexOf(Fr(o))<0?`${i}${o} `:i,s);r=r.trim(),s!==r&&n.setAttribute("class",r)}}}function Re(n,e){if(n!=null){if(typeof e=="function")return Re(n,e(Ur(n)));if((!e||typeof e=="string")&&n.nodeType===1){const t=(e||"").match(Hu)||[],s=Fr(Ur(n)).replace(Uu," ");let r=t.reduce((i,o)=>{const a=Fr(o);return i.indexOf(a)>-1?i.replace(a," "):i},s);r=e?r.trim():"",s!==r&&n.setAttribute("class",r)}}}function pn(n,e,t){if(!(n==null||e==null)){if(t!=null&&typeof e=="string"){t?J(n,e):Re(n,e);return}if(typeof e=="function")return pn(n,e(Ur(n),t),t);typeof e=="string"&&(e.match(Hu)||[]).forEach(r=>{Pn(n,r)?Re(n,r):J(n,r)})}}let by=0;function kD(){return by+=1,`v${by}`}function Gu(n){return(n.id==null||n.id==="")&&(n.id=kD()),n.id}function ys(n){return n==null?!1:typeof n.getScreenCTM=="function"&&n instanceof SVGElement}const rt={svg:"http://www.w3.org/2000/svg",xmlns:"http://www.w3.org/2000/xmlns/",xml:"http://www.w3.org/XML/1998/namespace",xlink:"http://www.w3.org/1999/xlink",xhtml:"http://www.w3.org/1999/xhtml"},wy="1.1";function xy(n,e=document){return e.createElement(n)}function Wu(n,e=rt.xhtml,t=document){return t.createElementNS(e,n)}function gn(n,e=document){return Wu(n,rt.svg,e)}function Qa(n){if(n){const t=`<svg xmlns="${rt.svg}" xmlns:xlink="${rt.xlink}" version="${wy}">${n}</svg>`,{documentElement:s}=VD(t,{async:!1});return s}const e=document.createElementNS(rt.svg,"svg");return e.setAttributeNS(rt.xmlns,"xmlns:xlink",rt.xlink),e.setAttribute("version",wy),e}function VD(n,e={}){let t;try{const s=new DOMParser;if(e.async!=null){const r=s;r.async=e.async}t=s.parseFromString(n,e.mimeType||"text/xml")}catch{t=void 0}if(!t||t.getElementsByTagName("parsererror").length)throw new Error(`Invalid XML: ${n}`);return t}function DD(n,e=!0){const t=n.nodeName;return e?t.toLowerCase():t.toUpperCase()}function Yu(n){let e=0,t=n.previousSibling;for(;t;)t.nodeType===1&&(e+=1),t=t.previousSibling;return e}function RD(n,e){return n.querySelectorAll(e)}function LD(n,e){return n.querySelector(e)}function vy(n,e,t){const s=n.ownerSVGElement;let r=n.parentNode;for(;r&&r!==t&&r!==s;){if(Pn(r,e))return r;r=r.parentNode}return null}function qu(n,e){const t=e&&e.parentNode;return n===t||!!(t&&t.nodeType===1&&n.compareDocumentPosition(t)&16)}function Gt(n){n&&(Array.isArray(n)?n:[n]).forEach(t=>{t.parentNode&&t.parentNode.removeChild(t)})}function eo(n){for(;n.firstChild;)n.removeChild(n.firstChild)}function Rt(n,e){(Array.isArray(e)?e:[e]).forEach(s=>{s!=null&&n.appendChild(s)})}function Cy(n,e){const t=n.firstChild;return t?Xu(t,e):Rt(n,e)}function Xu(n,e){const t=n.parentNode;t&&(Array.isArray(e)?e:[e]).forEach(r=>{r!=null&&t.insertBefore(r,n)})}function bs(n,e){e!=null&&e.appendChild(n)}function Sy(n){try{return n instanceof HTMLElement}catch{return typeof n=="object"&&n.nodeType===1&&typeof n.style=="object"&&typeof n.ownerDocument=="object"}}function ID(n,e){const t=[];let s=n.firstChild;for(;s;s=s.nextSibling)s.nodeType===1&&(!e||Pn(s,e))&&t.push(s);return t}const Ey=["viewBox","attributeName","attributeType","repeatCount","textLength","lengthAdjust","gradientUnits"];function BD(n,e){return n.getAttribute(e)}function Ju(n,e){const t=My(e);t.ns?n.hasAttributeNS(t.ns,t.local)&&n.removeAttributeNS(t.ns,t.local):n.hasAttribute(e)&&n.removeAttribute(e)}function Ku(n,e,t){if(t==null)return Ju(n,e);const s=My(e);s.ns&&typeof t=="string"?n.setAttributeNS(s.ns,e,t):e==="id"?n.id=`${t}`:n.setAttribute(e,`${t}`)}function Oy(n,e){Object.keys(e).forEach(t=>{Ku(n,t,e[t])})}function fe(n,e,t){if(e==null){const s=n.attributes,r={};for(let i=0;i<s.length;i+=1)r[s[i].name]=s[i].value;return r}if(typeof e=="string"&&t===void 0)return n.getAttribute(e);typeof e=="object"?Oy(n,e):Ku(n,e,t)}function My(n){if(n.indexOf(":")!==-1){const e=n.split(":");return{ns:rt[e[0]],local:e[1]}}return{ns:null,local:n}}function to(n){const e={};return Object.keys(n).forEach(t=>{const s=Ey.includes(t)?t:ny(t);e[s]=n[t]}),e}function el(n){const e={};return n.split(";").forEach(s=>{const r=s.trim();if(r){const i=r.split("=");i.length&&(e[i[0].trim()]=i[1]?i[1].trim():"")}}),e}function Zu(n,e){return Object.keys(e).forEach(t=>{if(t==="class")n[t]=n[t]?`${n[t]} ${e[t]}`:e[t];else if(t==="style"){const s=typeof n[t]=="object",r=typeof e[t]=="object";let i,o;s&&r?(i=n[t],o=e[t]):s?(i=n[t],o=el(e[t])):r?(i=el(n[t]),o=e[t]):(i=el(n[t]),o=el(e[t])),n[t]=Zu(i,o)}else n[t]=e[t]}),n}function jD(n,e,t={}){const s=t.offset||0,r=[],i=[];let o,a,c=null;for(let u=0;u<n.length;u+=1){o=i[u]=n[u];for(let d=0,f=e.length;d<f;d+=1){const h=e[d],p=h.start+s,g=h.end+s;u>=p&&u<g&&(typeof o=="string"?o=i[u]={t:n[u],attrs:h.attrs}:o.attrs=Zu(Zu({},o.attrs),h.attrs),t.includeAnnotationIndices&&(o.annotations==null&&(o.annotations=[]),o.annotations.push(d)))}a=i[u-1],a?Ie(o)&&Ie(a)?(c=c,JSON.stringify(o.attrs)===JSON.stringify(a.attrs)?c.t+=o.t:(r.push(c),c=o)):Ie(o)||Ie(a)?(c=c,r.push(c),c=o):c=(c||"")+o:c=o}return c!=null&&r.push(c),r}function $D(n){return n.replace(/ /g," ")}var Ks;(function(n){function e(u){const d="data:";return u.substr(0,d.length)===d}n.isDataUrl=e;function t(u,d){if(!u||e(u)){setTimeout(()=>d(null,u));return}const f=()=>{d(new Error(`Failed to load image: ${u}`))},h=window.FileReader?g=>{if(g.status===200){const m=new FileReader;m.onload=y=>{const b=y.target.result;d(null,b)},m.onerror=f,m.readAsDataURL(g.response)}else f()}:g=>{const m=y=>{const w=[];for(let x=0;x<y.length;x+=32768)w.push(String.fromCharCode.apply(null,y.subarray(x,x+32768)));return w.join("")};if(g.status===200){let y=u.split(".").pop()||"png";y==="svg"&&(y="svg+xml");const b=`data:image/${y};base64,`,w=new Uint8Array(g.response),x=b+btoa(m(w));d(null,x)}else f()},p=new XMLHttpRequest;p.responseType=window.FileReader?"blob":"arraybuffer",p.open("GET",u,!0),p.addEventListener("error",f),p.addEventListener("load",()=>h(p)),p.send()}n.imageToDataUri=t;function s(u){let d=u.replace(/\s/g,"");d=decodeURIComponent(d);const f=d.indexOf(","),h=d.slice(0,f),p=h.split(":")[1].split(";")[0],g=d.slice(f+1);let m;h.indexOf("base64")>=0?m=atob(g):m=unescape(encodeURIComponent(g));const y=new Uint8Array(m.length);for(let b=0;b<m.length;b+=1)y[b]=m.charCodeAt(b);return new Blob([y],{type:p})}n.dataUriToBlob=s;function r(u,d){const f=window.navigator.msSaveBlob;if(f)f(u,d);else{const h=window.URL.createObjectURL(u),p=document.createElement("a");p.href=h,p.download=d,document.body.appendChild(p),p.click(),document.body.removeChild(p),window.URL.revokeObjectURL(h)}}n.downloadBlob=r;function i(u,d){const f=s(u);r(f,d)}n.downloadDataUri=i;function o(u){const d=u.match(/<svg[^>]*viewBox\s*=\s*(["']?)(.+?)\1[^>]*>/i);return d&&d[2]?d[2].replace(/\s+/," ").split(" "):null}function a(u){const d=parseFloat(u);return Number.isNaN(d)?null:d}function c(u,d={}){let f=null;const h=x=>(f==null&&(f=o(u)),f!=null?a(f[x]):null),p=x=>{const v=u.match(x);return v&&v[2]?a(v[2]):null};let g=d.width;if(g==null&&(g=p(/<svg[^>]*width\s*=\s*(["']?)(.+?)\1[^>]*>/i)),g==null&&(g=h(2)),g==null)throw new Error("Can not parse width from svg string");let m=d.height;if(m==null&&(m=p(/<svg[^>]*height\s*=\s*(["']?)(.+?)\1[^>]*>/i)),m==null&&(m=h(3)),m==null)throw new Error("Can not parse height from svg string");return`data:image/svg+xml,${encodeURIComponent(u).replace(/'/g,"%27").replace(/"/g,"%22")}`}n.svgToDataUrl=c})(Ks||(Ks={}));let Zs;const zD={px(n){return n},mm(n){return Zs*n},cm(n){return Zs*n*10},in(n){return Zs*n*25.4},pt(n){return Zs*(25.4*n/72)},pc(n){return Zs*(25.4*n/6)}};var Py;(function(n){function e(s,r,i){const o=document.createElement("div"),a=o.style;a.display="inline-block",a.position="absolute",a.left="-15000px",a.top="-15000px",a.width=s+(i||"px"),a.height=r+(i||"px"),document.body.appendChild(o);const c=o.getBoundingClientRect(),u={width:c.width||0,height:c.height||0};return document.body.removeChild(o),u}n.measure=e;function t(s,r){Zs==null&&(Zs=e("1","1","mm").width);const i=r?zD[r]:null;return i?i(s):s}n.toPx=t})(Py||(Py={}));const FD=/-(.)/g;function UD(n){return n.replace(FD,(e,t)=>t.toUpperCase())}const Qu={},Ny=["webkit","ms","moz","o"],Ay=typeof document<"u"?document.createElement("div").style:{};function HD(n){for(let e=0;e<Ny.length;e+=1){const t=Ny[e]+n;if(t in Ay)return t}return null}function GD(n){const e=UD(n);if(Qu[e]==null){const t=e.charAt(0).toUpperCase()+e.slice(1);Qu[e]=e in Ay?e:HD(t)}return Qu[e]}function _y(n,e){const t=n.ownerDocument&&n.ownerDocument.defaultView&&n.ownerDocument.defaultView.opener?n.ownerDocument.defaultView.getComputedStyle(n,null):window.getComputedStyle(n,null);return t&&e?t.getPropertyValue(e)||t[e]:t}const WD={animationIterationCount:!0,columnCount:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,gridArea:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnStart:!0,gridRow:!0,gridRowEnd:!0,gridRowStart:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0};function YD(n){return/^--/.test(n)}function qD(n,e,t){const s=window.getComputedStyle(n,null);return t?s.getPropertyValue(e)||void 0:s[e]||n.style[e]}function XD(n,e){return!WD[n]&&typeof e=="number"?`${e}px`:e}function Xe(n,e,t){if(typeof e=="string"){const s=YD(e);if(s||(e=GD(e)),t===void 0)return qD(n,e,s);s||(t=XD(e,t));const r=n.style;s?r.setProperty(e,t):r[e]=t;return}for(const s in e)Xe(n,s,e[s])}const tl=new WeakMap;function Ty(n,e){const t=la(e),s=tl.get(n);if(s)return s[t]}function JD(n,e,t){const s=la(e),r=tl.get(n);r?r[s]=t:tl.set(n,{[s]:t})}function Qs(n,e,t){if(!e){const s={};return Object.keys(tl).forEach(r=>{s[r]=Ty(n,r)}),s}if(typeof e=="string"){if(t===void 0)return Ty(n,e);JD(n,e,t);return}for(const s in e)Qs(n,s,e[s])}class oe{get[Symbol.toStringTag](){return oe.toStringTag}get type(){return this.node.nodeName}get id(){return this.node.id}set id(e){this.node.id=e}constructor(e,t,s){if(!e)throw new TypeError("Invalid element to create vector");let r;if(oe.isVector(e))r=e.node;else if(typeof e=="string")if(e.toLowerCase()==="svg")r=Qa();else if(e[0]==="<"){const i=Qa(e);r=document.importNode(i.firstChild,!0)}else r=document.createElementNS(rt.svg,e);else r=e;this.node=r,t&&this.setAttributes(t),s&&this.append(s)}transform(e,t){return e==null?Gr(this.node):(Gr(this.node,e,t),this)}translate(e,t=0,s={}){return e==null?$y(this.node):($y(this.node,e,t,s),this)}rotate(e,t,s,r={}){return e==null?nd(this.node):(nd(this.node,e,t,s,r),this)}scale(e,t){return e==null?sd(this.node):(sd(this.node,e,t),this)}getTransformToElement(e){const t=oe.toNode(e);return io(this.node,t)}removeAttribute(e){return Ju(this.node,e),this}getAttribute(e){return BD(this.node,e)}setAttribute(e,t){return Ku(this.node,e,t),this}setAttributes(e){return Oy(this.node,e),this}attr(e,t){return e==null?fe(this.node):typeof e=="string"&&t===void 0?fe(this.node,e):(typeof e=="object"?fe(this.node,e):fe(this.node,e,t),this)}svg(){return this.node instanceof SVGSVGElement?this:oe.create(this.node.ownerSVGElement)}defs(){const e=this.svg()||this,t=e.node.getElementsByTagName("defs")[0];return t?oe.create(t):oe.create("defs").appendTo(e)}text(e,t={}){return Vy(this.node,e,t),this}tagName(){return DD(this.node)}clone(){return oe.create(this.node.cloneNode(!0))}remove(){return Gt(this.node),this}empty(){return eo(this.node),this}append(e){return Rt(this.node,oe.toNodes(e)),this}appendTo(e){return bs(this.node,oe.isVector(e)?e.node:e),this}prepend(e){return Cy(this.node,oe.toNodes(e)),this}before(e){return Xu(this.node,oe.toNodes(e)),this}replace(e){return this.node.parentNode&&this.node.parentNode.replaceChild(oe.toNode(e),this.node),oe.create(e)}first(){return this.node.firstChild?oe.create(this.node.firstChild):null}last(){return this.node.lastChild?oe.create(this.node.lastChild):null}get(e){const t=this.node.childNodes[e];return t?oe.create(t):null}indexOf(e){return Array.prototype.slice.call(this.node.childNodes).indexOf(oe.toNode(e))}find(e){const t=[],s=RD(this.node,e);if(s)for(let r=0,i=s.length;r<i;r+=1)t.push(oe.create(s[r]));return t}findOne(e){const t=LD(this.node,e);return t?oe.create(t):null}findParentByClass(e,t){const s=vy(this.node,e,t);return s?oe.create(s):null}matches(e){const t=this.node;this.node.matches;const s=t.matches||t.matchesSelector||t.msMatchesSelector||t.mozMatchesSelector||t.webkitMatchesSelector||t.oMatchesSelector||null;return s&&s.call(t,e)}contains(e){return qu(this.node,oe.isVector(e)?e.node:e)}wrap(e){const t=oe.create(e),s=this.node.parentNode;return s!=null&&s.insertBefore(t.node,this.node),t.append(this)}parent(e){let t=this;if(t.node.parentNode==null)return null;if(t=oe.create(t.node.parentNode),e==null)return t;do if(typeof e=="string"?t.matches(e):t instanceof e)return t;while(t=oe.create(t.node.parentNode));return t}children(){const e=this.node.childNodes,t=[];for(let s=0;s<e.length;s+=1)e[s].nodeType===1&&t.push(oe.create(e[s]));return t}eachChild(e,t){const s=this.children();for(let r=0,i=s.length;r<i;r+=1)e.call(s[r],s[r],r,s),t&&s[r].eachChild(e,t);return this}index(){return Yu(this.node)}hasClass(e){return Pn(this.node,e)}addClass(e){return J(this.node,e),this}removeClass(e){return Re(this.node,e),this}toggleClass(e,t){return pn(this.node,e,t),this}toLocalPoint(e,t){return mR(this.node,e,t)}sample(e=1){return this.node instanceof SVGPathElement?eR(this.node,e):[]}toPath(){return oe.create(aR(this.node))}toPathData(){return By(this.node)}}(function(n){n.toStringTag=`X6.${n.name}`;function e(o){if(o==null)return!1;if(o instanceof n)return!0;const a=o[Symbol.toStringTag],c=o;return(a==null||a===n.toStringTag)&&c.node instanceof SVGElement&&typeof c.sample=="function"&&typeof c.toPath=="function"}n.isVector=e;function t(o,a,c){return new n(o,a,c)}n.create=t;function s(o){if(o[0]==="<"){const a=Qa(o),c=[];for(let u=0,d=a.childNodes.length;u<d;u+=1){const f=a.childNodes[u];c.push(t(document.importNode(f,!0)))}return c}return[t(o)]}n.createVectors=s;function r(o){return e(o)?o.node:o}n.toNode=r;function i(o){return Array.isArray(o)?o.map(a=>r(a)):[r(o)]}n.toNodes=i})(oe||(oe={}));function KD(n,e){const t=oe.create(e),s=oe.create("textPath"),r=n.d;if(r&&n["xlink:href"]===void 0){const i=oe.create("path").attr("d",r).appendTo(t.defs());s.attr("xlink:href",`#${i.id}`)}return typeof n=="object"&&s.attr(n),s.node}function ZD(n,e,t){const s=t.eol,r=t.baseSize,i=t.lineHeight;let o=0,a;const c={},u=e.length-1;for(let d=0;d<=u;d+=1){let f=e[d],h=null;if(typeof f=="object"){const p=f.attrs,g=oe.create("tspan",p);a=g.node;let m=f.t;s&&d===u&&(m+=s),a.textContent=m;const y=p.class;y&&g.addClass(y),t.includeAnnotationIndices&&g.attr("annotations",f.annotations.join(",")),h=parseFloat(p["font-size"]),h===void 0&&(h=r),h&&h>o&&(o=h)}else s&&d===u&&(f+=s),a=document.createTextNode(f||" "),r&&r>o&&(o=r);n.appendChild(a)}return o&&(c.maxFontSize=o),i?c.lineHeight=i:o&&(c.lineHeight=o*1.2),c}const ky=/em$/;function nl(n,e){const t=parseFloat(n);return ky.test(n)?t*e:t}function QD(n,e,t,s){if(!Array.isArray(e))return 0;const r=e.length;if(!r)return 0;let i=e[0];const o=nl(i.maxFontSize,t)||t;let a=0;const c=nl(s,t);for(let f=1;f<r;f+=1){i=e[f];const h=nl(i.lineHeight,t)||c;a+=h}const u=nl(i.maxFontSize,t)||t;let d;switch(n){case"middle":d=o/2-.15*u-a/2;break;case"bottom":d=-(.25*u)-a;break;case"top":default:d=.8*o;break}return d}function Vy(n,e,t={}){e=$D(e);const s=t.eol;let r=t.textPath;const i=t.textVerticalAnchor,o=i==="middle"||i==="bottom"||i==="top";let a=t.x;a===void 0&&(a=n.getAttribute("x")||0);const c=t.includeAnnotationIndices;let u=t.annotations;u&&!Array.isArray(u)&&(u=[u]);const d=t.lineHeight,f=d==="auto",h=f?"1.5em":d||"1em";let p=!0;const g=n.childNodes;if(g.length===1){const A=g[0];A&&A.tagName.toUpperCase()==="TITLE"&&(p=!1)}p&&eo(n),fe(n,{"xml:space":"preserve",display:e||t.displayEmpty?null:"none"});const m=fe(n,"font-size");let y=parseFloat(m);y||(y=16,(o||u)&&!m&&fe(n,"font-size",`${y}`));let b;r?(typeof r=="string"&&(r={d:r}),b=KD(r,n)):b=document.createDocumentFragment();let w,x=0,v;const C=e.split(`
|
|
39
39
|
`),E=[],S=C.length-1;for(let A=0;A<=S;A+=1){w=h;let V="v-line";const T=gn("tspan");let D,I=C[A];if(I)if(u){const B=jD(I,u,{offset:-x,includeAnnotationIndices:c});D=ZD(T,B,{eol:A!==S&&s,baseSize:y,lineHeight:f?null:h,includeAnnotationIndices:c});const N=D.lineHeight;N&&f&&A!==0&&(w=N),A===0&&(v=D.maxFontSize*.8)}else s&&A!==S&&(I+=s),T.textContent=I;else{T.textContent="-",V+=" v-empty-line";const B=T.style;B.fillOpacity=0,B.strokeOpacity=0,u&&(D={})}D&&E.push(D),A>0&&T.setAttribute("dy",w),(A>0||r)&&T.setAttribute("x",a),T.className.baseVal=V,b.appendChild(T),x+=I.length+1}if(o)if(u)w=QD(i,E,y,h);else if(i==="top")w="0.8em";else{let A;switch(S>0?(A=parseFloat(h)||1,A*=S,ky.test(h)||(A/=y)):A=0,i){case"middle":w=`${.3-A/2}em`;break;case"bottom":w=`${-A-.3}em`;break}}else i===0?w="0em":i?w=i:(w=0,n.getAttribute("y")==null&&n.setAttribute("y",`${v||"0.8em"}`));b.firstChild.setAttribute("dy",w),n.appendChild(b)}function no(n,e={}){const t=document.createElement("canvas").getContext("2d");if(!n)return{width:0};const s=[],r=e["font-size"]?`${parseFloat(e["font-size"])}px`:"14px";return s.push(e["font-style"]||"normal"),s.push(e["font-variant"]||"normal"),s.push(e["font-weight"]||400),s.push(r),s.push(e["font-family"]||"sans-serif"),t.font=s.join(" "),t.measureText(n)}function Dy(n,e,t,s={}){if(e>=t)return[n,""];const r=n.length,i={};let o=Math.round(e/t*r-1);for(o<0&&(o=0);o>=0&&o<r;){const a=n.slice(0,o),c=i[a]||no(a,s).width,u=n.slice(0,o+1),d=i[u]||no(u,s).width;if(i[a]=c,i[u]=d,c>e)o-=1;else if(d<=e)o+=1;else break}return[n.slice(0,o),n.slice(o)]}function Ry(n,e,t={},s={}){const r=e.width,i=e.height,o=s.eol||`
|
|
40
40
|
`,a=t.fontSize||14,c=t.lineHeight?parseFloat(t.lineHeight):Math.ceil(a*1.4),u=Math.floor(i/c);if(n.indexOf(o)>-1){const y=Za(),b=[];return n.split(o).map(w=>{const x=Ry(w,Object.assign(Object.assign({},e),{height:Number.MAX_SAFE_INTEGER}),t,Object.assign(Object.assign({},s),{eol:y}));x&&b.push(...x.split(y))}),b.slice(0,u).join(o)}const{width:d}=no(n,t);if(d<r)return n;const f=[];let h=n,p=d,g=s.ellipsis,m=0;g&&(typeof g!="string"&&(g="…"),m=no(g,t).width);for(let y=0;y<u;y+=1)if(p>r)if(y===u-1){const[w]=Dy(h,r-m,p,t);f.push(g?`${w}${g}`:w)}else{const[w,x]=Dy(h,r,p,t);f.push(w),h=x,p=no(h,t).width}else{f.push(h);break}return f.join(o)}const ed=.551784;function ct(n,e,t=NaN){const s=n.getAttribute(e);if(s==null)return t;const r=parseFloat(s);return Number.isNaN(r)?t:r}function eR(n,e=1){const t=n.getTotalLength(),s=[];let r=0,i;for(;r<t;)i=n.getPointAtLength(r),s.push({distance:r,x:i.x,y:i.y}),r+=e;return s}function tR(n){return["M",ct(n,"x1"),ct(n,"y1"),"L",ct(n,"x2"),ct(n,"y2")].join(" ")}function nR(n){const e=sl(n);return e.length===0?null:`${Ly(e)} Z`}function sR(n){const e=sl(n);return e.length===0?null:Ly(e)}function Ly(n){return`M ${n.map(t=>`${t.x} ${t.y}`).join(" L")}`}function sl(n){const e=[],t=n.points;if(t)for(let s=0,r=t.numberOfItems;s<r;s+=1)e.push(t.getItem(s));return e}function rR(n){const e=ct(n,"cx",0),t=ct(n,"cy",0),s=ct(n,"r"),r=s*ed;return["M",e,t-s,"C",e+r,t-s,e+s,t-r,e+s,t,"C",e+s,t+r,e+r,t+s,e,t+s,"C",e-r,t+s,e-s,t+r,e-s,t,"C",e-s,t-r,e-r,t-s,e,t-s,"Z"].join(" ")}function iR(n){const e=ct(n,"cx",0),t=ct(n,"cy",0),s=ct(n,"rx"),r=ct(n,"ry")||s,i=s*ed,o=r*ed;return["M",e,t-r,"C",e+i,t-r,e+s,t-o,e+s,t,"C",e+s,t+o,e+i,t+r,e,t+r,"C",e-i,t+r,e-s,t+o,e-s,t,"C",e-s,t-o,e-i,t-r,e,t-r,"Z"].join(" ")}function oR(n){return Iy({x:ct(n,"x",0),y:ct(n,"y",0),width:ct(n,"width",0),height:ct(n,"height",0),rx:ct(n,"rx",0),ry:ct(n,"ry",0)})}function Iy(n){let e;const t=n.x,s=n.y,r=n.width,i=n.height,o=Math.min(n.rx||n["top-rx"]||0,r/2),a=Math.min(n.rx||n["bottom-rx"]||0,r/2),c=Math.min(n.ry||n["top-ry"]||0,i/2),u=Math.min(n.ry||n["bottom-ry"]||0,i/2);return o||a||c||u?e=["M",t,s+c,"v",i-c-u,"a",a,u,0,0,0,a,u,"h",r-2*a,"a",a,u,0,0,0,a,-u,"v",-(i-u-c),"a",o,c,0,0,0,-o,-c,"h",-(r-2*o),"a",o,c,0,0,0,-o,c,"Z"]:e=["M",t,s,"H",t+r,"V",s+i,"H",t,"V",s,"Z"],e.join(" ")}function aR(n){const e=gn("path");fe(e,fe(n));const t=By(n);return t&&e.setAttribute("d",t),e}function By(n){const e=n.tagName.toLowerCase();switch(e){case"path":return n.getAttribute("d");case"line":return tR(n);case"polygon":return nR(n);case"polyline":return sR(n);case"ellipse":return iR(n);case"circle":return rR(n);case"rect":return oR(n)}throw new Error(`"${e}" cannot be converted to svg path element.`)}const lR=/(\w+)\(([^,)]+),?([^)]+)?\)/gi,jy=/[ ,]+/,cR=/^(\w+)\((.*)\)/;function uR(n,e){const s=gn("svg").createSVGPoint();return s.x=n,s.y=e,s}function it(n){const t=gn("svg").createSVGMatrix();if(n!=null){const s=n,r=t;for(const i in s)r[i]=s[i]}return t}function so(n){const e=gn("svg");return n!=null?(n instanceof DOMMatrix||(n=it(n)),e.createSVGTransformFromMatrix(n)):e.createSVGTransform()}function ro(n){let e=it();const t=n!=null&&n.match(lR);if(!t)return e;for(let s=0,r=t.length;s<r;s+=1){const o=t[s].match(cR);if(o){let a,c,u,d,f,h=it();const p=o[2].split(jy);switch(o[1].toLowerCase()){case"scale":a=parseFloat(p[0]),c=p[1]===void 0?a:parseFloat(p[1]),h=h.scaleNonUniform(a,c);break;case"translate":u=parseFloat(p[0]),d=parseFloat(p[1]),h=h.translate(u,d);break;case"rotate":f=parseFloat(p[0]),u=parseFloat(p[1])||0,d=parseFloat(p[2])||0,u!==0||d!==0?h=h.translate(u,d).rotate(f).translate(-u,-d):h=h.rotate(f);break;case"skewx":f=parseFloat(p[0]),h=h.skewX(f);break;case"skewy":f=parseFloat(p[0]),h=h.skewY(f);break;case"matrix":h.a=parseFloat(p[0]),h.b=parseFloat(p[1]),h.c=parseFloat(p[2]),h.d=parseFloat(p[3]),h.e=parseFloat(p[4]),h.f=parseFloat(p[5]);break;default:continue}e=e.multiply(h)}}return e}function Hr(n){const e=n||{},t=e.a!=null?e.a:1,s=e.b!=null?e.b:0,r=e.c!=null?e.c:0,i=e.d!=null?e.d:1,o=e.e!=null?e.e:0,a=e.f!=null?e.f:0;return`matrix(${t},${s},${r},${i},${o},${a})`}function rl(n){let e,t,s;if(n){const i=jy;if(n.trim().indexOf("matrix")>=0){const o=ro(n),a=dR(o);e=[a.translateX,a.translateY],t=[a.rotation],s=[a.scaleX,a.scaleY];const c=[];(e[0]!==0||e[1]!==0)&&c.push(`translate(${e.join(",")})`),(s[0]!==1||s[1]!==1)&&c.push(`scale(${s.join(",")})`),t[0]!==0&&c.push(`rotate(${t[0]})`),n=c.join(" ")}else{const o=n.match(/translate\((.*?)\)/);o&&(e=o[1].split(i));const a=n.match(/rotate\((.*?)\)/);a&&(t=a[1].split(i));const c=n.match(/scale\((.*?)\)/);c&&(s=c[1].split(i))}}const r=s&&s[0]?parseFloat(s[0]):1;return{raw:n||"",translation:{tx:e&&e[0]?parseInt(e[0],10):0,ty:e&&e[1]?parseInt(e[1],10):0},rotation:{angle:t&&t[0]?parseInt(t[0],10):0,cx:t&&t[1]?parseInt(t[1],10):void 0,cy:t&&t[2]?parseInt(t[2],10):void 0},scale:{sx:r,sy:s&&s[1]?parseFloat(s[1]):r}}}function td(n,e){const t=e.x*n.a+e.y*n.c+0,s=e.x*n.b+e.y*n.d+0;return{x:t,y:s}}function dR(n){const e=td(n,{x:0,y:1}),t=td(n,{x:1,y:0}),s=180/Math.PI*Math.atan2(e.y,e.x)-90,r=180/Math.PI*Math.atan2(t.y,t.x);return{skewX:s,skewY:r,translateX:n.e,translateY:n.f,scaleX:Math.sqrt(n.a*n.a+n.b*n.b),scaleY:Math.sqrt(n.c*n.c+n.d*n.d),rotation:s}}function hR(n){let e,t,s,r;return n?(e=n.a==null?1:n.a,r=n.d==null?1:n.d,t=n.b,s=n.c):e=r=1,{sx:t?Math.sqrt(e*e+t*t):e,sy:s?Math.sqrt(s*s+r*r):r}}function fR(n){let e={x:0,y:1};n&&(e=td(n,e));const t=180*Math.atan2(e.y,e.x)/Math.PI%360-90;return{angle:t%360+(t<0?360:0)}}function pR(n){return{tx:n&&n.e||0,ty:n&&n.f||0}}function Gr(n,e,t={}){if(e==null)return ro(fe(n,"transform"));if(t.absolute){n.setAttribute("transform",Hr(e));return}const s=n.transform,r=so(e);s.baseVal.appendItem(r)}function $y(n,e,t=0,s={}){let r=fe(n,"transform");const i=rl(r);if(e==null)return i.translation;r=i.raw,r=r.replace(/translate\([^)]*\)/g,"").trim();const o=s.absolute?e:i.translation.tx+e,a=s.absolute?t:i.translation.ty+t,c=`translate(${o},${a})`;n.setAttribute("transform",`${c} ${r}`.trim())}function nd(n,e,t,s,r={}){let i=fe(n,"transform");const o=rl(i);if(e==null)return o.rotation;i=o.raw,i=i.replace(/rotate\([^)]*\)/g,"").trim(),e%=360;const a=r.absolute?e:o.rotation.angle+e,c=t!=null&&s!=null?`,${t},${s}`:"",u=`rotate(${a}${c})`;n.setAttribute("transform",`${i} ${u}`.trim())}function sd(n,e,t){let s=fe(n,"transform");const r=rl(s);if(e==null)return r.scale;t=t??e,s=r.raw,s=s.replace(/scale\([^)]*\)/g,"").trim();const i=`scale(${e},${t})`;n.setAttribute("transform",`${s} ${i}`.trim())}function io(n,e){if(ys(e)&&ys(n)){const t=e.getScreenCTM(),s=n.getScreenCTM();if(t&&s)return t.inverse().multiply(s)}return it()}function gR(n,e){let t=it();if(ys(e)&&ys(n)){let s=n;const r=[];for(;s&&s!==e;){const i=s.getAttribute("transform")||null,o=ro(i);r.push(o),s=s.parentNode}r.reverse().forEach(i=>{t=t.multiply(i)})}return t}function mR(n,e,t){const s=n instanceof SVGSVGElement?n:n.ownerSVGElement,r=s.createSVGPoint();r.x=e,r.y=t;try{const i=s.getScreenCTM(),o=r.matrixTransform(i.inverse()),a=io(n,s).inverse();return o.matrixTransform(a)}catch{return r}}var Wt;(function(n){const e={};function t(i){return e[i]||{}}n.get=t;function s(i,o){e[i]=o}n.register=s;function r(i){delete e[i]}n.unregister=r})(Wt||(Wt={}));var er;(function(n){const e=new WeakMap;function t(i){return e.has(i)||e.set(i,{events:Object.create(null)}),e.get(i)}n.ensure=t;function s(i){return e.get(i)}n.get=s;function r(i){return e.delete(i)}n.remove=r})(er||(er={}));var ce;(function(n){n.returnTrue=()=>!0,n.returnFalse=()=>!1;function e(r){r.stopPropagation()}n.stopPropagationCallback=e;function t(r,i,o){r.addEventListener!=null&&r.addEventListener(i,o)}n.addEventListener=t;function s(r,i,o){r.removeEventListener!=null&&r.removeEventListener(i,o)}n.removeEventListener=s})(ce||(ce={})),function(n){const e=/[^\x20\t\r\n\f]+/g,t=/^([^.]*)(?:\.(.+)|)/;function s(a){return(a||"").match(e)||[""]}n.splitType=s;function r(a){const c=t.exec(a)||[];return{originType:c[1]?c[1].trim():c[1],namespaces:c[2]?c[2].split(".").map(u=>u.trim()).sort():[]}}n.normalizeType=r;function i(a){return a.nodeType===1||a.nodeType===9||!+a.nodeType}n.isValidTarget=i;function o(a,c){if(c){const u=a;return u.querySelector!=null&&u.querySelector(c)!=null}return!0}n.isValidSelector=o}(ce||(ce={})),function(n){let e=0;const t=new WeakMap;function s(a){return t.has(a)||(t.set(a,e),e+=1),t.get(a)}n.ensureHandlerId=s;function r(a){return t.get(a)}n.getHandlerId=r;function i(a){return t.delete(a)}n.removeHandlerId=i;function o(a,c){return t.set(a,c)}n.setHandlerId=o}(ce||(ce={})),function(n){function e(t,s){const r=[],i=er.get(t),o=i&&i.events&&i.events[s.type],a=o&&o.handlers||[],c=o?o.delegateCount:0;if(c>0&&!(s.type==="click"&&typeof s.button=="number"&&s.button>=1)){for(let u=s.target;u!==t;u=u.parentNode||t)if(u.nodeType===1&&!(s.type==="click"&&u.disabled===!0)){const d=[],f={};for(let h=0;h<c;h+=1){const p=a[h],g=p.selector;if(g!=null&&f[g]==null){const m=t,y=[];m.querySelectorAll(g).forEach(b=>{y.push(b)}),f[g]=y.includes(u)}f[g]&&d.push(p)}d.length&&r.push({elem:u,handlers:d})}}return c<a.length&&r.push({elem:t,handlers:a.slice(c)}),r}n.getHandlerQueue=e}(ce||(ce={})),function(n){function e(t){return t!=null&&t===t.window}n.isWindow=e}(ce||(ce={})),function(n){function e(t,s){const r=t.nodeType===9?t.documentElement:t,i=s&&s.parentNode;return t===i||!!(i&&i.nodeType===1&&(r.contains?r.contains(i):t.compareDocumentPosition&&t.compareDocumentPosition(i)&16))}n.contains=e}(ce||(ce={}));class Nn{constructor(e,t){this.isDefaultPrevented=ce.returnFalse,this.isPropagationStopped=ce.returnFalse,this.isImmediatePropagationStopped=ce.returnFalse,this.isSimulated=!1,this.preventDefault=()=>{const s=this.originalEvent;this.isDefaultPrevented=ce.returnTrue,s&&!this.isSimulated&&s.preventDefault()},this.stopPropagation=()=>{const s=this.originalEvent;this.isPropagationStopped=ce.returnTrue,s&&!this.isSimulated&&s.stopPropagation()},this.stopImmediatePropagation=()=>{const s=this.originalEvent;this.isImmediatePropagationStopped=ce.returnTrue,s&&!this.isSimulated&&s.stopImmediatePropagation(),this.stopPropagation()},typeof e=="string"?this.type=e:e.type&&(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented?ce.returnTrue:ce.returnFalse,this.target=e.target,this.currentTarget=e.currentTarget,this.relatedTarget=e.relatedTarget,this.timeStamp=e.timeStamp),t&&Object.assign(this,t),this.timeStamp||(this.timeStamp=Date.now())}}(function(n){function e(t){return t instanceof n?t:new n(t)}n.create=e})(Nn||(Nn={})),function(n){function e(t,s){Object.defineProperty(n.prototype,t,{enumerable:!0,configurable:!0,get:typeof s=="function"?function(){if(this.originalEvent)return s(this.originalEvent)}:function(){if(this.originalEvent)return this.originalEvent[t]},set(r){Object.defineProperty(this,t,{enumerable:!0,configurable:!0,writable:!0,value:r})}})}n.addProperty=e}(Nn||(Nn={})),function(n){const e={bubbles:!0,cancelable:!0,eventPhase:!0,detail:!0,view:!0,button:!0,buttons:!0,clientX:!0,clientY:!0,offsetX:!0,offsetY:!0,pageX:!0,pageY:!0,screenX:!0,screenY:!0,toElement:!0,pointerId:!0,pointerType:!0,char:!0,code:!0,charCode:!0,key:!0,keyCode:!0,touches:!0,changedTouches:!0,targetTouches:!0,which:!0,altKey:!0,ctrlKey:!0,metaKey:!0,shiftKey:!0};Object.keys(e).forEach(t=>n.addProperty(t,e[t]))}(Nn||(Nn={})),function(n){Wt.register("load",{noBubble:!0})}(),function(n){Wt.register("beforeunload",{postDispatch(e,t){t.result!==void 0&&t.originalEvent&&(t.originalEvent.returnValue=t.result)}})}(),function(n){Wt.register("mouseenter",{delegateType:"mouseover",bindType:"mouseover",handle(e,t){let s;const r=t.relatedTarget,i=t.handleObj;return(!r||r!==e&&!ce.contains(e,r))&&(t.type=i.originType,s=i.handler.call(e,t),t.type="mouseover"),s}}),Wt.register("mouseleave",{delegateType:"mouseout",bindType:"mouseout",handle(e,t){let s;const r=t.relatedTarget,i=t.handleObj;return(!r||r!==e&&!ce.contains(e,r))&&(t.type=i.originType,s=i.handler.call(e,t),t.type="mouseout"),s}})}();var yR=function(n,e){var t={};for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&e.indexOf(s)<0&&(t[s]=n[s]);if(n!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,s=Object.getOwnPropertySymbols(n);r<s.length;r++)e.indexOf(s[r])<0&&Object.prototype.propertyIsEnumerable.call(n,s[r])&&(t[s[r]]=n[s[r]]);return t},oo;(function(n){let e;function t(o,a,c,u,d){if(!ce.isValidTarget(o))return;let f;if(typeof c!="function"){const{handler:m,selector:y}=c,b=yR(c,["handler","selector"]);c=m,d=y,f=b}const h=er.ensure(o);let p=h.handler;p==null&&(p=h.handler=function(m,...y){return e!==m.type?r(o,m,...y):void 0});const g=ce.ensureHandlerId(c);ce.splitType(a).forEach(m=>{const{originType:y,namespaces:b}=ce.normalizeType(m);if(!y)return;let w=y,x=Wt.get(w);w=(d?x.delegateType:x.bindType)||w,x=Wt.get(w);const v=Object.assign({type:w,originType:y,data:u,selector:d,guid:g,handler:c,namespace:b.join(".")},f),C=h.events;let E=C[w];E||(E=C[w]={handlers:[],delegateCount:0},(!x.setup||x.setup(o,u,b,p)===!1)&&ce.addEventListener(o,w,p)),x.add&&(ce.removeHandlerId(v.handler),x.add(o,v),ce.setHandlerId(v.handler,g)),d?(E.handlers.splice(E.delegateCount,0,v),E.delegateCount+=1):E.handlers.push(v)})}n.on=t;function s(o,a,c,u,d){const f=er.get(o);if(!f)return;const h=f.events;h&&(ce.splitType(a).forEach(p=>{const{originType:g,namespaces:m}=ce.normalizeType(p);if(!g){Object.keys(h).forEach(C=>{s(o,C+p,c,u,!0)});return}let y=g;const b=Wt.get(y);y=(u?b.delegateType:b.bindType)||y;const w=h[y];if(!w)return;const x=m.length>0?new RegExp(`(^|\\.)${m.join("\\.(?:.*\\.|)")}(\\.|$)`):null,v=w.handlers.length;for(let C=w.handlers.length-1;C>=0;C-=1){const E=w.handlers[C];(d||g===E.originType)&&(!c||ce.getHandlerId(c)===E.guid)&&(x==null||E.namespace&&x.test(E.namespace))&&(u==null||u===E.selector||u==="**"&&E.selector)&&(w.handlers.splice(C,1),E.selector&&(w.delegateCount-=1),b.remove&&b.remove(o,E))}v&&w.handlers.length===0&&((!b.teardown||b.teardown(o,m,f.handler)===!1)&&ce.removeEventListener(o,y,f.handler),delete h[y])}),Object.keys(h).length===0&&er.remove(o))}n.off=s;function r(o,a,...c){const u=Nn.create(a);u.delegateTarget=o;const d=Wt.get(u.type);if(d.preDispatch&&d.preDispatch(o,u)===!1)return;const f=ce.getHandlerQueue(o,u);for(let h=0,p=f.length;h<p&&!u.isPropagationStopped();h+=1){const g=f[h];u.currentTarget=g.elem;for(let m=0,y=g.handlers.length;m<y&&!u.isImmediatePropagationStopped();m+=1){const b=g.handlers[m];if(u.rnamespace==null||b.namespace&&u.rnamespace.test(b.namespace)){u.handleObj=b,u.data=b.data;const w=Wt.get(b.originType).handle,x=w?w(g.elem,u,...c):b.handler.call(g.elem,u,...c);x!==void 0&&(u.result=x,x===!1&&(u.preventDefault(),u.stopPropagation()))}}}return d.postDispatch&&d.postDispatch(o,u),u.result}n.dispatch=r;function i(o,a,c,u){let d=o,f=typeof o=="string"?o:o.type,h=typeof o=="string"||d.namespace==null?[]:d.namespace.split(".");const p=c;if(p.nodeType===3||p.nodeType===8)return;f.indexOf(".")>-1&&(h=f.split("."),f=h.shift(),h.sort());const g=f.indexOf(":")<0&&`on${f}`;d=o instanceof Nn?o:new Nn(f,typeof o=="object"?o:null),d.namespace=h.join("."),d.rnamespace=d.namespace?new RegExp(`(^|\\.)${h.join("\\.(?:.*\\.|)")}(\\.|$)`):null,d.result=void 0,d.target||(d.target=p);const m=[d];Array.isArray(a)?m.push(...a):m.push(a);const y=Wt.get(f);if(!u&&y.trigger&&y.trigger(p,d,a)===!1)return;let b;const w=[p];if(!u&&!y.noBubble&&!ce.isWindow(p)){b=y.delegateType||f;let v=p,C=p.parentNode;for(;C!=null;)w.push(C),v=C,C=C.parentNode;const E=p.ownerDocument||document;if(v===E){const S=v.defaultView||v.parentWindow||window;w.push(S)}}let x=p;for(let v=0,C=w.length;v<C&&!d.isPropagationStopped();v+=1){const E=w[v];x=E,d.type=v>1?b:y.bindType||f;const S=er.get(E);S&&S.events[d.type]&&S.handler&&S.handler.call(E,...m);const O=g&&E[g]||null;O&&ce.isValidTarget(E)&&(d.result=O.call(E,...m),d.result===!1&&d.preventDefault())}if(d.type=f,!u&&!d.isDefaultPrevented()){const v=y.preventDefault;if((v==null||v(w.pop(),d,a)===!1)&&ce.isValidTarget(p)&&g&&typeof p[f]=="function"&&!ce.isWindow(p)){const C=p[g];C&&(p[g]=null),e=f,d.isPropagationStopped()&&x.addEventListener(f,ce.stopPropagationCallback),p[f](),d.isPropagationStopped()&&x.removeEventListener(f,ce.stopPropagationCallback),e=void 0,C&&(p[g]=C)}}return d.result}n.trigger=i})(oo||(oo={}));var ut;(function(n){function e(i,o,a,c,u){return ao.on(i,o,a,c,u),i}n.on=e;function t(i,o,a,c,u){return ao.on(i,o,a,c,u,!0),i}n.once=t;function s(i,o,a,c){return ao.off(i,o,a,c),i}n.off=s;function r(i,o,a,c){return oo.trigger(o,a,i,c),i}n.trigger=r})(ut||(ut={}));var ao;(function(n){function e(s,r,i,o,a,c){if(typeof r=="object"){typeof i!="string"&&(o=o||i,i=void 0),Object.keys(r).forEach(u=>e(s,u,i,o,r[u],c));return}if(o==null&&a==null?(a=i,o=i=void 0):a==null&&(typeof i=="string"?(a=o,o=void 0):(a=o,o=i,i=void 0)),a===!1)a=ce.returnFalse;else if(!a)return;if(c){const u=a;a=function(d,...f){return n.off(s,d),u.call(this,d,...f)},ce.setHandlerId(a,ce.ensureHandlerId(u))}oo.on(s,r,a,o,i)}n.on=e;function t(s,r,i,o){const a=r;if(a&&a.preventDefault!=null&&a.handleObj!=null){const c=a.handleObj;t(a.delegateTarget,c.namespace?`${c.originType}.${c.namespace}`:c.originType,c.selector,c.handler);return}if(typeof r=="object"){const c=r;Object.keys(c).forEach(u=>t(s,u,i,c[u]));return}(i===!1||typeof i=="function")&&(o=i,i=void 0),o===!1&&(o=ce.returnFalse),oo.off(s,r,o,i)}n.off=t})(ao||(ao={}));class zy{constructor(e,t,s){this.animationFrameId=0,this.deltaX=0,this.deltaY=0,this.eventName=ms.isEventSupported("wheel")?"wheel":"mousewheel",this.target=e,this.onWheelCallback=t,this.onWheelGuard=s,this.onWheel=this.onWheel.bind(this),this.didWheel=this.didWheel.bind(this)}enable(){this.target.addEventListener(this.eventName,this.onWheel,{passive:!1})}disable(){this.target.removeEventListener(this.eventName,this.onWheel)}onWheel(e){if(this.onWheelGuard!=null&&!this.onWheelGuard(e))return;this.deltaX+=e.deltaX,this.deltaY+=e.deltaY,e.preventDefault();let t;(this.deltaX!==0||this.deltaY!==0)&&(e.stopPropagation(),t=!0),t===!0&&this.animationFrameId===0&&(this.animationFrameId=requestAnimationFrame(()=>{this.didWheel(e)}))}didWheel(e){this.animationFrameId=0,this.onWheelCallback(e,this.deltaX,this.deltaY),this.deltaX=0,this.deltaY=0}}function rd(n){const e=n.getBoundingClientRect(),t=n.ownerDocument.defaultView;return{top:e.top+t.pageYOffset,left:e.left+t.pageXOffset}}function bR(n){return n.getBoundingClientRect().width}function wR(n){return n.getBoundingClientRect().height}function Fy(n,e=60){let t=null;return(...s)=>{t&&clearTimeout(t),t=window.setTimeout(()=>{n.apply(this,s)},e)}}function xR(n){let e=null,t=[];const s=()=>{if(getComputedStyle(n).position==="static"){const u=n.style;u.position="relative"}const c=document.createElement("object");return c.onload=()=>{c.contentDocument.defaultView.addEventListener("resize",r),r()},c.style.display="block",c.style.position="absolute",c.style.top="0",c.style.left="0",c.style.height="100%",c.style.width="100%",c.style.overflow="hidden",c.style.pointerEvents="none",c.style.zIndex="-1",c.style.opacity="0",c.setAttribute("tabindex","-1"),c.type="text/html",n.appendChild(c),c.data="about:blank",c},r=Fy(()=>{t.forEach(c=>c(n))}),i=c=>{e||(e=s()),t.indexOf(c)===-1&&t.push(c)},o=()=>{e&&e.parentNode&&(e.contentDocument&&e.contentDocument.defaultView.removeEventListener("resize",r),e.parentNode.removeChild(e),e=null,t=[])};return{element:n,bind:i,destroy:o,unbind:c=>{const u=t.indexOf(c);u!==-1&&t.splice(u,1),t.length===0&&e&&o()}}}function vR(n){let e=null,t=[];const s=Fy(()=>{t.forEach(c=>{c(n)})}),r=()=>{const c=new ResizeObserver(s);return c.observe(n),s(),c},i=c=>{e||(e=r()),t.indexOf(c)===-1&&t.push(c)},o=()=>{e&&(e.disconnect(),t=[],e=null)};return{element:n,bind:i,destroy:o,unbind:c=>{const u=t.indexOf(c);u!==-1&&t.splice(u,1),t.length===0&&e&&o()}}}const CR=typeof ResizeObserver<"u"?vR:xR;var il;(function(n){const e=new WeakMap;function t(r){let i=e.get(r);return i||(i=CR(r),e.set(r,i),i)}function s(r){r.destroy(),e.delete(r.element)}n.bind=(r,i)=>{const o=t(r);return o.bind(i),()=>o.unbind(i)},n.clear=r=>{const i=t(r);s(i)}})(il||(il={}));class lo{constructor(e={}){this.comparator=e.comparator||lo.defaultComparator,this.index={},this.data=e.data||[],this.heapify()}isEmpty(){return this.data.length===0}insert(e,t,s){const r={priority:e,value:t},i=this.data.length;return s&&(r.id=s,this.index[s]=i),this.data.push(r),this.bubbleUp(i),this}peek(){return this.data[0]?this.data[0].value:null}peekPriority(){return this.data[0]?this.data[0].priority:null}updatePriority(e,t){const s=this.index[e];if(typeof s>"u")throw new Error(`Node with id '${e}' was not found in the heap.`);const r=this.data,i=r[s].priority,o=this.comparator(t,i);o<0?(r[s].priority=t,this.bubbleUp(s)):o>0&&(r[s].priority=t,this.bubbleDown(s))}remove(){const e=this.data,t=e[0],s=e.pop();return t.id&&delete this.index[t.id],e.length>0&&(e[0]=s,s.id&&(this.index[s.id]=0),this.bubbleDown(0)),t?t.value:null}heapify(){for(let e=0;e<this.data.length;e+=1)this.bubbleUp(e)}bubbleUp(e){const t=this.data;let s,r,i=e;for(;i>0&&(r=i-1>>>1,this.comparator(t[i].priority,t[r].priority)<0);){s=t[r],t[r]=t[i];let o=t[i].id;o!=null&&(this.index[o]=r),t[i]=s,o=t[i].id,o!=null&&(this.index[o]=i),i=r}}bubbleDown(e){const t=this.data,s=t.length-1;let r=e;for(;;){const i=(r<<1)+1,o=i+1;let a=r;if(i<=s&&this.comparator(t[i].priority,t[a].priority)<0&&(a=i),o<=s&&this.comparator(t[o].priority,t[a].priority)<0&&(a=o),a!==r){const c=t[a];t[a]=t[r];let u=t[r].id;u!=null&&(this.index[u]=a),t[r]=c,u=t[r].id,u!=null&&(this.index[u]=r),r=a}else break}}}(function(n){n.defaultComparator=(e,t)=>e-t})(lo||(lo={}));var id;(function(n){function e(t,s,r=(i,o)=>1){const i={},o={},a={},c=new lo;for(i[s]=0,Object.keys(t).forEach(u=>{u!==s&&(i[u]=1/0),c.insert(i[u],u,u)});!c.isEmpty();){const u=c.remove();a[u]=!0;const d=t[u]||[];for(let f=0;f<d.length;f+=1){const h=d[f];if(!a[h]){const p=i[u]+r(u,h);p<i[h]&&(i[h]=p,o[h]=u,c.updatePriority(h,p))}}}return o}n.run=e})(id||(id={}));class Xn{constructor(e,t,s,r){if(e==null)return this.set(255,255,255,1);if(typeof e=="number")return this.set(e,t,s,r);if(typeof e=="string")return Xn.fromString(e)||this;if(Array.isArray(e))return this.set(e);this.set(e.r,e.g,e.b,e.a==null?1:e.a)}blend(e,t,s){this.set(e.r+(t.r-e.r)*s,e.g+(t.g-e.g)*s,e.b+(t.b-e.b)*s,e.a+(t.a-e.a)*s)}lighten(e){const t=Xn.lighten(this.toArray(),e);this.r=t[0],this.g=t[1],this.b=t[2],this.a=t[3]}darken(e){this.lighten(-e)}set(e,t,s,r){const i=Array.isArray(e)?e[0]:e,o=Array.isArray(e)?e[1]:t,a=Array.isArray(e)?e[2]:s,c=Array.isArray(e)?e[3]:r;return this.r=Math.round(xt(i,0,255)),this.g=Math.round(xt(o,0,255)),this.b=Math.round(xt(a,0,255)),this.a=c==null?1:xt(c,0,1),this}toHex(){return`#${["r","g","b"].map(t=>{const s=this[t].toString(16);return s.length<2?`0${s}`:s}).join("")}`}toRGBA(){return this.toArray()}toHSLA(){return Xn.rgba2hsla(this.r,this.g,this.b,this.a)}toCSS(e){const t=`${this.r},${this.g},${this.b},`;return e?`rgb(${t})`:`rgba(${t},${this.a})`}toGrey(){return Xn.makeGrey(Math.round((this.r+this.g+this.b)/3),this.a)}toArray(){return[this.r,this.g,this.b,this.a]}toString(){return this.toCSS()}}(function(n){function e(x){return new n(x)}n.fromArray=e;function t(x){return new n([...g(x),1])}n.fromHex=t;function s(x){const v=x.toLowerCase().match(/^rgba?\(([\s.,0-9]+)\)/);if(v){const C=v[1].split(/\s*,\s*/).map(E=>parseInt(E,10));return new n(C)}return null}n.fromRGBA=s;function r(x,v,C){C<0&&++C,C>1&&--C;const E=6*C;return E<1?x+(v-x)*E:2*C<1?v:3*C<2?x+(v-x)*(2/3-C)*6:x}function i(x){const v=x.toLowerCase().match(/^hsla?\(([\s.,0-9]+)\)/);if(v){const C=v[2].split(/\s*,\s*/),E=(parseFloat(C[0])%360+360)%360/360,S=parseFloat(C[1])/100,O=parseFloat(C[2])/100,A=C[3]==null?1:parseInt(C[3],10);return new n(u(E,S,O,A))}return null}n.fromHSLA=i;function o(x){if(x.startsWith("#"))return t(x);if(x.startsWith("rgb"))return s(x);const v=n.named[x];return v?t(v):i(x)}n.fromString=o;function a(x,v){return n.fromArray([x,x,x,v])}n.makeGrey=a;function c(x,v,C,E){const S=Array.isArray(x)?x[0]:x,O=Array.isArray(x)?x[1]:v,A=Array.isArray(x)?x[2]:C,V=Array.isArray(x)?x[3]:E,T=Math.max(S,O,A),D=Math.min(S,O,A),I=(T+D)/2;let B=0,N=0;if(D!==T){const P=T-D;switch(N=I>.5?P/(2-T-D):P/(T+D),T){case S:B=(O-A)/P+(O<A?6:0);break;case O:B=(A-S)/P+2;break;case A:B=(S-O)/P+4;break}B/=6}return[B,N,I,V??1]}n.rgba2hsla=c;function u(x,v,C,E){const S=Array.isArray(x)?x[0]:x,O=Array.isArray(x)?x[1]:v,A=Array.isArray(x)?x[2]:C,V=Array.isArray(x)?x[3]:E,T=A<=.5?A*(O+1):A+O-A*O,D=2*A-T;return[r(D,T,S+1/3)*256,r(D,T,S)*256,r(D,T,S-1/3)*256,V??1]}n.hsla2rgba=u;function d(x){return new n(Math.round(Math.random()*256),Math.round(Math.random()*256),Math.round(Math.random()*256),x?void 0:parseFloat(Math.random().toFixed(2)))}n.random=d;function f(){const x="0123456789ABCDEF";let v="#";for(let C=0;C<6;C+=1)v+=x[Math.floor(Math.random()*16)];return v}n.randomHex=f;function h(x){return d(x).toString()}n.randomRGBA=h;function p(x,v){if(typeof x=="string"){const A=x[0]==="#",[V,T,D]=g(x);return v?V*.299+T*.587+D*.114>186?"#000000":"#ffffff":`${A?"#":""}${m(255-V,255-T,255-D)}`}const C=x[0],E=x[1],S=x[2],O=x[3];return v?C*.299+E*.587+S*.114>186?[0,0,0,O]:[255,255,255,O]:[255-C,255-E,255-S,O]}n.invert=p;function g(x){const v=x.indexOf("#")===0?x:`#${x}`;let C=+`0x${v.substr(1)}`;if(!(v.length===4||v.length===7)||Number.isNaN(C))throw new Error("Invalid hex color.");const E=v.length===4?4:8,S=(1<<E)-1,O=["b","g","r"].map(()=>{const A=C&S;return C>>=E,E===4?17*A:A});return[O[2],O[1],O[0]]}function m(x,v,C){const E=S=>S.length<2?`0${S}`:S;return`${E(x.toString(16))}${E(v.toString(16))}${E(C.toString(16))}`}function y(x,v){return w(x,v)}n.lighten=y;function b(x,v){return w(x,-v)}n.darken=b;function w(x,v){if(typeof x=="string"){const S=x[0]==="#",O=parseInt(S?x.substr(1):x,16),A=xt((O>>16)+v,0,255),V=xt((O>>8&255)+v,0,255),T=xt((O&255)+v,0,255);return`${S?"#":""}${(T|V<<8|A<<16).toString(16)}`}const C=m(x[0],x[1],x[2]),E=g(w(C,v));return[E[0],E[1],E[2],x[3]]}})(Xn||(Xn={})),function(n){n.named={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",burntsienna:"#ea7e5d",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"}}(Xn||(Xn={}));class od{constructor(){this.clear()}clear(){this.map=new WeakMap,this.arr=[]}has(e){return this.map.has(e)}get(e){return this.map.get(e)}set(e,t){this.map.set(e,t),this.arr.push(e)}delete(e){const t=this.arr.indexOf(e);t>=0&&this.arr.splice(t,1);const s=this.map.get(e);return this.map.delete(e),s}each(e){this.arr.forEach(t=>{const s=this.map.get(t);e(s,t)})}dispose(){this.clear()}}var ws;(function(n){function e(r){const i=[],o=[];return Array.isArray(r)?i.push(...r):r.split("|").forEach(a=>{a.indexOf("&")===-1?i.push(a):o.push(...a.split("&"))}),{or:i,and:o}}n.parse=e;function t(r,i){if(r!=null&&i!=null){const o=e(r),a=e(i),c=o.or.sort(),u=a.or.sort(),d=o.and.sort(),f=a.and.sort(),h=(p,g)=>p.length===g.length&&(p.length===0||p.every((m,y)=>m===g[y]));return h(c,u)&&h(d,f)}return r==null&&i==null}n.equals=t;function s(r,i,o){if(i==null||Array.isArray(i)&&i.length===0)return o?r.altKey!==!0&&r.ctrlKey!==!0&&r.metaKey!==!0&&r.shiftKey!==!0:!0;const{or:a,and:c}=e(i),u=d=>{const f=`${d.toLowerCase()}Key`;return r[f]===!0};return a.some(d=>u(d))&&c.every(d=>u(d))}n.isMatch=s})(ws||(ws={}));var tr;(function(n){n.linear=e=>e,n.quad=e=>e*e,n.cubic=e=>e*e*e,n.inout=e=>{if(e<=0)return 0;if(e>=1)return 1;const t=e*e,s=t*e;return 4*(e<.5?s:3*(e-t)+s-.75)},n.exponential=e=>Math.pow(2,10*(e-1)),n.bounce=e=>{for(let t=0,s=1;;t+=s,s/=2)if(e>=(7-4*t)/11){const r=(11-6*t-11*e)/4;return-r*r+s*s}}})(tr||(tr={})),function(n){n.decorators={reverse(e){return t=>1-e(1-t)},reflect(e){return t=>.5*(t<.5?e(2*t):2-e(2-2*t))},clamp(e,t=0,s=1){return r=>{const i=e(r);return i<t?t:i>s?s:i}},back(e=1.70158){return t=>t*t*((e+1)*t-e)},elastic(e=1.5){return t=>Math.pow(2,10*(t-1))*Math.cos(20*Math.PI*e/3*t)}}}(tr||(tr={})),function(n){function e(N){return-1*Math.cos(N*(Math.PI/2))+1}n.easeInSine=e;function t(N){return Math.sin(N*(Math.PI/2))}n.easeOutSine=t;function s(N){return-.5*(Math.cos(Math.PI*N)-1)}n.easeInOutSine=s;function r(N){return N*N}n.easeInQuad=r;function i(N){return N*(2-N)}n.easeOutQuad=i;function o(N){return N<.5?2*N*N:-1+(4-2*N)*N}n.easeInOutQuad=o;function a(N){return N*N*N}n.easeInCubic=a;function c(N){const P=N-1;return P*P*P+1}n.easeOutCubic=c;function u(N){return N<.5?4*N*N*N:(N-1)*(2*N-2)*(2*N-2)+1}n.easeInOutCubic=u;function d(N){return N*N*N*N}n.easeInQuart=d;function f(N){const P=N-1;return 1-P*P*P*P}n.easeOutQuart=f;function h(N){const P=N-1;return N<.5?8*N*N*N*N:1-8*P*P*P*P}n.easeInOutQuart=h;function p(N){return N*N*N*N*N}n.easeInQuint=p;function g(N){const P=N-1;return 1+P*P*P*P*P}n.easeOutQuint=g;function m(N){const P=N-1;return N<.5?16*N*N*N*N*N:1+16*P*P*P*P*P}n.easeInOutQuint=m;function y(N){return N===0?0:Math.pow(2,10*(N-1))}n.easeInExpo=y;function b(N){return N===1?1:-Math.pow(2,-10*N)+1}n.easeOutExpo=b;function w(N){if(N===0||N===1)return N;const P=N*2,k=P-1;return P<1?.5*Math.pow(2,10*k):.5*(-Math.pow(2,-10*k)+2)}n.easeInOutExpo=w;function x(N){const P=N/1;return-1*(Math.sqrt(1-P*N)-1)}n.easeInCirc=x;function v(N){const P=N-1;return Math.sqrt(1-P*P)}n.easeOutCirc=v;function C(N){const P=N*2,k=P-2;return P<1?-.5*(Math.sqrt(1-P*P)-1):.5*(Math.sqrt(1-k*k)+1)}n.easeInOutCirc=C;function E(N,P=1.70158){return N*N*((P+1)*N-P)}n.easeInBack=E;function S(N,P=1.70158){const k=N/1-1;return k*k*((P+1)*k+P)+1}n.easeOutBack=S;function O(N,P=1.70158){const k=N*2,j=k-2,H=P*1.525;return k<1?.5*k*k*((H+1)*k-H):.5*(j*j*((H+1)*j+H)+2)}n.easeInOutBack=O;function A(N,P=.7){if(N===0||N===1)return N;const j=N/1-1,H=1-P,K=H/(2*Math.PI)*Math.asin(1);return-(Math.pow(2,10*j)*Math.sin((j-K)*(2*Math.PI)/H))}n.easeInElastic=A;function V(N,P=.7){const k=1-P,j=N*2;if(N===0||N===1)return N;const H=k/(2*Math.PI)*Math.asin(1);return Math.pow(2,-10*j)*Math.sin((j-H)*(2*Math.PI)/k)+1}n.easeOutElastic=V;function T(N,P=.65){const k=1-P;if(N===0||N===1)return N;const j=N*2,H=j-1,K=k/(2*Math.PI)*Math.asin(1);return j<1?-.5*(Math.pow(2,10*H)*Math.sin((H-K)*(2*Math.PI)/k)):Math.pow(2,-10*H)*Math.sin((H-K)*(2*Math.PI)/k)*.5+1}n.easeInOutElastic=T;function D(N){const P=N/1;if(P<1/2.75)return 7.5625*P*P;if(P<2/2.75){const k=P-.5454545454545454;return 7.5625*k*k+.75}if(P<2.5/2.75){const k=P-.8181818181818182;return 7.5625*k*k+.9375}{const k=P-.9545454545454546;return 7.5625*k*k+.984375}}n.easeOutBounce=D;function I(N){return 1-D(1-N)}n.easeInBounce=I;function B(N){return N<.5?I(N*2)*.5:D(N*2-1)*.5+.5}n.easeInOutBounce=B}(tr||(tr={}));var nr;(function(n){n.number=(e,t)=>{const s=t-e;return r=>e+s*r},n.object=(e,t)=>{const s=Object.keys(e);return r=>{const i={};for(let o=s.length-1;o!==-1;o-=1){const a=s[o];i[a]=e[a]+(t[a]-e[a])*r}return i}},n.unit=(e,t)=>{const s=/(-?[0-9]*.[0-9]*)(px|em|cm|mm|in|pt|pc|%)/,r=s.exec(e),i=s.exec(t),o=i?i[1]:"",a=r?+r[1]:0,c=i?+i[1]:0,u=o.indexOf("."),d=u>0?o[1].length-u-1:0,f=c-a,h=r?r[2]:"";return p=>(a+f*p).toFixed(d)+h},n.color=(e,t)=>{const s=parseInt(e.slice(1),16),r=parseInt(t.slice(1),16),i=s&255,o=(r&255)-i,a=s&65280,c=(r&65280)-a,u=s&16711680,d=(r&16711680)-u;return f=>{const h=i+o*f&255,p=a+c*f&65280,g=u+d*f&16711680;return`#${(1<<24|h|p|g).toString(16).slice(1)}`}}})(nr||(nr={}));const co=[];function Wr(n,e){const t=co.find(s=>s.name===n);if(!(t&&(t.loadTimes+=1,t.loadTimes>1))&&!ms.isApplyingHMR()){const s=document.createElement("style");s.setAttribute("type","text/css"),s.textContent=e;const r=document.querySelector("head");r&&r.insertBefore(s,r.firstChild),co.push({name:n,loadTimes:1,styleElement:s})}}function Yr(n){const e=co.findIndex(t=>t.name===n);if(e>-1){const t=co[e];if(t.loadTimes-=1,t.loadTimes>0)return;let s=t.styleElement;s&&s.parentNode&&s.parentNode.removeChild(s),s=null,co.splice(e,1)}}var ye;(function(n){function e(s){return 180*s/Math.PI%360}n.toDeg=e,n.toRad=function(s,r=!1){return(r?s:s%360)*Math.PI/180};function t(s){return s%360+(s<0?360:0)}n.normalize=t})(ye||(ye={}));var Ce;(function(n){function e(a,c=0){return Number.isInteger(a)?a:+a.toFixed(c)}n.round=e;function t(a,c){let u,d;if(c==null?(d=a??1,u=0):(d=c,u=a??0),d<u){const f=u;u=d,d=f}return Math.floor(Math.random()*(d-u+1)+u)}n.random=t;function s(a,c,u){return Number.isNaN(a)?NaN:Number.isNaN(c)||Number.isNaN(u)?0:c<u?a<c?c:a>u?u:a:a<u?u:a>c?c:a}n.clamp=s;function r(a,c){return c*Math.round(a/c)}n.snapToGrid=r;function i(a,c){return c!=null&&a!=null&&c.x>=a.x&&c.x<=a.x+a.width&&c.y>=a.y&&c.y<=a.y+a.height}n.containsPoint=i;function o(a,c){const u=a.x-c.x,d=a.y-c.y;return u*u+d*d}n.squaredLength=o})(Ce||(Ce={}));class xs{valueOf(){return this.toJSON()}toString(){return JSON.stringify(this.toJSON())}}class M extends xs{constructor(e,t){super(),this.x=e??0,this.y=t??0}round(e=0){return this.x=Ce.round(this.x,e),this.y=Ce.round(this.y,e),this}add(e,t){const s=M.create(e,t);return this.x+=s.x,this.y+=s.y,this}update(e,t){const s=M.create(e,t);return this.x=s.x,this.y=s.y,this}translate(e,t){const s=M.create(e,t);return this.x+=s.x,this.y+=s.y,this}rotate(e,t){const s=M.rotate(this,e,t);return this.x=s.x,this.y=s.y,this}scale(e,t,s=new M){const r=M.create(s);return this.x=r.x+e*(this.x-r.x),this.y=r.y+t*(this.y-r.y),this}closest(e){if(e.length===1)return M.create(e[0]);let t=null,s=1/0;return e.forEach(r=>{const i=this.squaredDistance(r);i<s&&(t=r,s=i)}),t?M.create(t):null}distance(e){return Math.sqrt(this.squaredDistance(e))}squaredDistance(e){const t=M.create(e),s=this.x-t.x,r=this.y-t.y;return s*s+r*r}manhattanDistance(e){const t=M.create(e);return Math.abs(t.x-this.x)+Math.abs(t.y-this.y)}magnitude(){return Math.sqrt(this.x*this.x+this.y*this.y)||.01}theta(e=new M){const t=M.create(e),s=-(t.y-this.y),r=t.x-this.x;let i=Math.atan2(s,r);return i<0&&(i=2*Math.PI+i),180*i/Math.PI}angleBetween(e,t){if(this.equals(e)||this.equals(t))return NaN;let s=this.theta(t)-this.theta(e);return s<0&&(s+=360),s}vectorAngle(e){return new M(0,0).angleBetween(this,e)}toPolar(e){return this.update(M.toPolar(this,e)),this}changeInAngle(e,t,s=new M){return this.clone().translate(-e,-t).theta(s)-this.theta(s)}adhereToRect(e){return Ce.containsPoint(e,this)||(this.x=Math.min(Math.max(this.x,e.x),e.x+e.width),this.y=Math.min(Math.max(this.y,e.y),e.y+e.height)),this}bearing(e){const t=M.create(e),s=ye.toRad(this.y),r=ye.toRad(t.y),i=this.x,o=t.x,a=ye.toRad(o-i),c=Math.sin(a)*Math.cos(r),u=Math.cos(s)*Math.sin(r)-Math.sin(s)*Math.cos(r)*Math.cos(a),d=ye.toDeg(Math.atan2(c,u)),f=["NE","E","SE","S","SW","W","NW","N"];let h=d-22.5;return h<0&&(h+=360),h=parseInt(h/45,10),f[h]}cross(e,t){if(e!=null&&t!=null){const s=M.create(e),r=M.create(t);return(r.x-this.x)*(s.y-this.y)-(r.y-this.y)*(s.x-this.x)}return NaN}dot(e){const t=M.create(e);return this.x*t.x+this.y*t.y}diff(e,t){if(typeof e=="number")return new M(this.x-e,this.y-t);const s=M.create(e);return new M(this.x-s.x,this.y-s.y)}lerp(e,t){const s=M.create(e);return new M((1-t)*this.x+t*s.x,(1-t)*this.y+t*s.y)}normalize(e=1){const t=e/this.magnitude();return this.scale(t,t)}move(e,t){const s=M.create(e),r=ye.toRad(s.theta(this));return this.translate(Math.cos(r)*t,-Math.sin(r)*t)}reflection(e){return M.create(e).move(this,this.distance(e))}snapToGrid(e,t){return this.x=Ce.snapToGrid(this.x,e),this.y=Ce.snapToGrid(this.y,t??e),this}equals(e){const t=M.create(e);return t!=null&&t.x===this.x&&t.y===this.y}clone(){return M.clone(this)}toJSON(){return M.toJSON(this)}serialize(){return`${this.x} ${this.y}`}}(function(n){function e(t){return t!=null&&t instanceof n}n.isPoint=e})(M||(M={})),function(n){function e(s){return s!=null&&typeof s=="object"&&typeof s.x=="number"&&typeof s.y=="number"}n.isPointLike=e;function t(s){return s!=null&&Array.isArray(s)&&s.length===2&&typeof s[0]=="number"&&typeof s[1]=="number"}n.isPointData=t}(M||(M={})),function(n){function e(f,h){return f==null||typeof f=="number"?new n(f,h):t(f)}n.create=e;function t(f){return n.isPoint(f)?new n(f.x,f.y):Array.isArray(f)?new n(f[0],f[1]):new n(f.x,f.y)}n.clone=t;function s(f){return n.isPoint(f)?{x:f.x,y:f.y}:Array.isArray(f)?{x:f[0],y:f[1]}:{x:f.x,y:f.y}}n.toJSON=s;function r(f,h,p=new n){let g=Math.abs(f*Math.cos(h)),m=Math.abs(f*Math.sin(h));const y=t(p),b=ye.normalize(ye.toDeg(h));return b<90?m=-m:b<180?(g=-g,m=-m):b<270&&(g=-g),new n(y.x+g,y.y+m)}n.fromPolar=r;function i(f,h=new n){const p=t(f),g=t(h),m=p.x-g.x,y=p.y-g.y;return new n(Math.sqrt(m*m+y*y),ye.toRad(g.theta(p)))}n.toPolar=i;function o(f,h){return f===h?!0:f!=null&&h!=null?f.x===h.x&&f.y===h.y:!1}n.equals=o;function a(f,h){if(f==null&&h!=null||f!=null&&h==null||f!=null&&h!=null&&f.length!==h.length)return!1;if(f!=null&&h!=null){for(let p=0,g=f.length;p<g;p+=1)if(!o(f[p],h[p]))return!1}return!0}n.equalPoints=a;function c(f,h,p,g){return new n(Ce.random(f,h),Ce.random(p,g))}n.random=c;function u(f,h,p){const g=ye.toRad(ye.normalize(-h)),m=Math.sin(g),y=Math.cos(g);return d(f,y,m,p)}n.rotate=u;function d(f,h,p,g=new n){const m=t(f),y=t(g),b=m.x-y.x,w=m.y-y.y,x=b*h-w*p,v=w*h+b*p;return new n(x+y.x,v+y.y)}n.rotateEx=d}(M||(M={}));class U extends xs{get left(){return this.x}get top(){return this.y}get right(){return this.x+this.width}get bottom(){return this.y+this.height}get origin(){return new M(this.x,this.y)}get topLeft(){return new M(this.x,this.y)}get topCenter(){return new M(this.x+this.width/2,this.y)}get topRight(){return new M(this.x+this.width,this.y)}get center(){return new M(this.x+this.width/2,this.y+this.height/2)}get bottomLeft(){return new M(this.x,this.y+this.height)}get bottomCenter(){return new M(this.x+this.width/2,this.y+this.height)}get bottomRight(){return new M(this.x+this.width,this.y+this.height)}get corner(){return new M(this.x+this.width,this.y+this.height)}get rightMiddle(){return new M(this.x+this.width,this.y+this.height/2)}get leftMiddle(){return new M(this.x,this.y+this.height/2)}get topLine(){return new Y(this.topLeft,this.topRight)}get rightLine(){return new Y(this.topRight,this.bottomRight)}get bottomLine(){return new Y(this.bottomLeft,this.bottomRight)}get leftLine(){return new Y(this.topLeft,this.bottomLeft)}constructor(e,t,s,r){super(),this.x=e??0,this.y=t??0,this.width=s??0,this.height=r??0}getOrigin(){return this.origin}getTopLeft(){return this.topLeft}getTopCenter(){return this.topCenter}getTopRight(){return this.topRight}getCenter(){return this.center}getCenterX(){return this.x+this.width/2}getCenterY(){return this.y+this.height/2}getBottomLeft(){return this.bottomLeft}getBottomCenter(){return this.bottomCenter}getBottomRight(){return this.bottomRight}getCorner(){return this.corner}getRightMiddle(){return this.rightMiddle}getLeftMiddle(){return this.leftMiddle}getTopLine(){return this.topLine}getRightLine(){return this.rightLine}getBottomLine(){return this.bottomLine}getLeftLine(){return this.leftLine}bbox(e){if(!e)return this.clone();const t=ye.toRad(e),s=Math.abs(Math.sin(t)),r=Math.abs(Math.cos(t)),i=this.width*r+this.height*s,o=this.width*s+this.height*r;return new U(this.x+(this.width-i)/2,this.y+(this.height-o)/2,i,o)}round(e=0){return this.x=Ce.round(this.x,e),this.y=Ce.round(this.y,e),this.width=Ce.round(this.width,e),this.height=Ce.round(this.height,e),this}add(e,t,s,r){const i=U.create(e,t,s,r),o=Math.min(this.x,i.x),a=Math.min(this.y,i.y),c=Math.max(this.x+this.width,i.x+i.width),u=Math.max(this.y+this.height,i.y+i.height);return this.x=o,this.y=a,this.width=c-o,this.height=u-a,this}update(e,t,s,r){const i=U.create(e,t,s,r);return this.x=i.x,this.y=i.y,this.width=i.width,this.height=i.height,this}inflate(e,t){const s=e,r=t??e;return this.x-=s,this.y-=r,this.width+=2*s,this.height+=2*r,this}snapToGrid(e,t){const s=this.origin.snapToGrid(e,t),r=this.corner.snapToGrid(e,t);return this.x=s.x,this.y=s.y,this.width=r.x-s.x,this.height=r.y-s.y,this}translate(e,t){const s=M.create(e,t);return this.x+=s.x,this.y+=s.y,this}scale(e,t,s=new M){const r=this.origin.scale(e,t,s);return this.x=r.x,this.y=r.y,this.width*=e,this.height*=t,this}rotate(e,t=this.getCenter()){if(e!==0){const s=ye.toRad(e),r=Math.cos(s),i=Math.sin(s);let o=this.getOrigin(),a=this.getTopRight(),c=this.getBottomRight(),u=this.getBottomLeft();o=M.rotateEx(o,r,i,t),a=M.rotateEx(a,r,i,t),c=M.rotateEx(c,r,i,t),u=M.rotateEx(u,r,i,t);const d=new U(o.x,o.y,0,0);d.add(a.x,a.y,0,0),d.add(c.x,c.y,0,0),d.add(u.x,u.y,0,0),this.update(d)}return this}rotate90(){const e=(this.width-this.height)/2;this.x+=e,this.y-=e;const t=this.width;return this.width=this.height,this.height=t,this}moveAndExpand(e){const t=U.clone(e);return this.x+=t.x||0,this.y+=t.y||0,this.width+=t.width||0,this.height+=t.height||0,this}getMaxScaleToFit(e,t=this.center){const s=U.clone(e),r=t.x,i=t.y;let o=1/0,a=1/0,c=1/0,u=1/0,d=1/0,f=1/0,h=1/0,p=1/0;const g=s.topLeft;g.x<r&&(o=(this.x-r)/(g.x-r)),g.y<i&&(d=(this.y-i)/(g.y-i));const m=s.bottomRight;m.x>r&&(a=(this.x+this.width-r)/(m.x-r)),m.y>i&&(f=(this.y+this.height-i)/(m.y-i));const y=s.topRight;y.x>r&&(c=(this.x+this.width-r)/(y.x-r)),y.y<i&&(h=(this.y-i)/(y.y-i));const b=s.bottomLeft;return b.x<r&&(u=(this.x-r)/(b.x-r)),b.y>i&&(p=(this.y+this.height-i)/(b.y-i)),{sx:Math.min(o,a,c,u),sy:Math.min(d,f,h,p)}}getMaxUniformScaleToFit(e,t=this.center){const s=this.getMaxScaleToFit(e,t);return Math.min(s.sx,s.sy)}containsPoint(e,t){return Ce.containsPoint(this,M.create(e,t))}containsRect(e,t,s,r){const i=U.create(e,t,s,r),o=this.x,a=this.y,c=this.width,u=this.height,d=i.x,f=i.y,h=i.width,p=i.height;return c===0||u===0||h===0||p===0?!1:d>=o&&f>=a&&d+h<=o+c&&f+p<=a+u}intersectsWithLine(e){const t=[this.topLine,this.rightLine,this.bottomLine,this.leftLine],s=[],r=[];return t.forEach(i=>{const o=e.intersectsWithLine(i);o!==null&&r.indexOf(o.toString())<0&&(s.push(o),r.push(o.toString()))}),s.length>0?s:null}intersectsWithLineFromCenterToPoint(e,t){const s=M.clone(e),r=this.center;let i=null;t!=null&&t!==0&&s.rotate(t,r);const o=[this.topLine,this.rightLine,this.bottomLine,this.leftLine],a=new Y(r,s);for(let c=o.length-1;c>=0;c-=1){const u=o[c].intersectsWithLine(a);if(u!==null){i=u;break}}return i&&t!=null&&t!==0&&i.rotate(-t,r),i}intersectsWithRect(e,t,s,r){const i=U.create(e,t,s,r);if(!this.isIntersectWithRect(i))return null;const o=this.origin,a=this.corner,c=i.origin,u=i.corner,d=Math.max(o.x,c.x),f=Math.max(o.y,c.y);return new U(d,f,Math.min(a.x,u.x)-d,Math.min(a.y,u.y)-f)}isIntersectWithRect(e,t,s,r){const i=U.create(e,t,s,r),o=this.origin,a=this.corner,c=i.origin,u=i.corner;return!(u.x<=o.x||u.y<=o.y||c.x>=a.x||c.y>=a.y)}normalize(){let e=this.x,t=this.y,s=this.width,r=this.height;return this.width<0&&(e=this.x+this.width,s=-this.width),this.height<0&&(t=this.y+this.height,r=-this.height),this.x=e,this.y=t,this.width=s,this.height=r,this}union(e){const t=U.clone(e),s=this.origin,r=this.corner,i=t.origin,o=t.corner,a=Math.min(s.x,i.x),c=Math.min(s.y,i.y),u=Math.max(r.x,o.x),d=Math.max(r.y,o.y);return new U(a,c,u-a,d-c)}getNearestSideToPoint(e){const t=M.clone(e),s=t.x-this.x,r=this.x+this.width-t.x,i=t.y-this.y,o=this.y+this.height-t.y;let a=s,c="left";return r<a&&(a=r,c="right"),i<a&&(a=i,c="top"),o<a&&(c="bottom"),c}getNearestPointToPoint(e){const t=M.clone(e);if(this.containsPoint(t)){const s=this.getNearestSideToPoint(t);if(s==="left")return new M(this.x,t.y);if(s==="top")return new M(t.x,this.y);if(s==="right")return new M(this.x+this.width,t.y);if(s==="bottom")return new M(t.x,this.y+this.height)}return t.adhereToRect(this)}equals(e){return e!=null&&e.x===this.x&&e.y===this.y&&e.width===this.width&&e.height===this.height}clone(){return new U(this.x,this.y,this.width,this.height)}toJSON(){return{x:this.x,y:this.y,width:this.width,height:this.height}}serialize(){return`${this.x} ${this.y} ${this.width} ${this.height}`}}(function(n){function e(t){return t!=null&&t instanceof n}n.isRectangle=e})(U||(U={})),function(n){function e(t){return t!=null&&typeof t=="object"&&typeof t.x=="number"&&typeof t.y=="number"&&typeof t.width=="number"&&typeof t.height=="number"}n.isRectangleLike=e}(U||(U={})),function(n){function e(o,a,c,u){return o==null||typeof o=="number"?new n(o,a,c,u):t(o)}n.create=e;function t(o){return n.isRectangle(o)?o.clone():Array.isArray(o)?new n(o[0],o[1],o[2],o[3]):new n(o.x,o.y,o.width,o.height)}n.clone=t;function s(o){return new n(o.x-o.a,o.y-o.b,2*o.a,2*o.b)}n.fromEllipse=s;function r(o){return new n(0,0,o.width,o.height)}n.fromSize=r;function i(o,a){return new n(o.x,o.y,a.width,a.height)}n.fromPositionAndSize=i}(U||(U={}));class Y extends xs{get center(){return new M((this.start.x+this.end.x)/2,(this.start.y+this.end.y)/2)}constructor(e,t,s,r){super(),typeof e=="number"&&typeof t=="number"?(this.start=new M(e,t),this.end=new M(s,r)):(this.start=M.create(e),this.end=M.create(t))}getCenter(){return this.center}round(e=0){return this.start.round(e),this.end.round(e),this}translate(e,t){return typeof e=="number"?(this.start.translate(e,t),this.end.translate(e,t)):(this.start.translate(e),this.end.translate(e)),this}rotate(e,t){return this.start.rotate(e,t),this.end.rotate(e,t),this}scale(e,t,s){return this.start.scale(e,t,s),this.end.scale(e,t,s),this}length(){return Math.sqrt(this.squaredLength())}squaredLength(){const e=this.start.x-this.end.x,t=this.start.y-this.end.y;return e*e+t*t}setLength(e){const t=this.length();if(!t)return this;const s=e/t;return this.scale(s,s,this.start)}parallel(e){const t=this.clone();if(!t.isDifferentiable())return t;const{start:s,end:r}=t,i=s.clone().rotate(270,r),o=r.clone().rotate(90,s);return s.move(o,e),r.move(i,e),t}vector(){return new M(this.end.x-this.start.x,this.end.y-this.start.y)}angle(){const e=new M(this.start.x+1,this.start.y);return this.start.angleBetween(this.end,e)}bbox(){const e=Math.min(this.start.x,this.end.x),t=Math.min(this.start.y,this.end.y),s=Math.max(this.start.x,this.end.x),r=Math.max(this.start.y,this.end.y);return new U(e,t,s-e,r-t)}bearing(){return this.start.bearing(this.end)}closestPoint(e){return this.pointAt(this.closestPointNormalizedLength(e))}closestPointLength(e){return this.closestPointNormalizedLength(e)*this.length()}closestPointTangent(e){return this.tangentAt(this.closestPointNormalizedLength(e))}closestPointNormalizedLength(e){const t=this.vector().dot(new Y(this.start,e).vector()),s=Math.min(1,Math.max(0,t/this.squaredLength()));return Number.isNaN(s)?0:s}pointAt(e){const t=this.start,s=this.end;return e<=0?t.clone():e>=1?s.clone():t.lerp(s,e)}pointAtLength(e){const t=this.start,s=this.end;let r=!0;e<0&&(r=!1,e=-e);const i=this.length();if(e>=i)return r?s.clone():t.clone();const o=(r?e:i-e)/i;return this.pointAt(o)}divideAt(e){const t=this.pointAt(e);return[new Y(this.start,t),new Y(t,this.end)]}divideAtLength(e){const t=this.pointAtLength(e);return[new Y(this.start,t),new Y(t,this.end)]}containsPoint(e){const t=this.start,s=this.end;if(t.cross(e,s)!==0)return!1;const r=this.length();return!(new Y(t,e).length()>r||new Y(e,s).length()>r)}intersect(e,t){const s=e.intersectsWithLine(this,t);return s?Array.isArray(s)?s:[s]:null}intersectsWithLine(e){const t=new M(this.end.x-this.start.x,this.end.y-this.start.y),s=new M(e.end.x-e.start.x,e.end.y-e.start.y),r=t.x*s.y-t.y*s.x,i=new M(e.start.x-this.start.x,e.start.y-this.start.y),o=i.x*s.y-i.y*s.x,a=i.x*t.y-i.y*t.x;if(r===0||o*r<0||a*r<0)return null;if(r>0){if(o>r||a>r)return null}else if(o<r||a<r)return null;return new M(this.start.x+o*t.x/r,this.start.y+o*t.y/r)}isDifferentiable(){return!this.start.equals(this.end)}pointOffset(e){const t=M.clone(e),s=this.start,r=this.end;return((r.x-s.x)*(t.y-s.y)-(r.y-s.y)*(t.x-s.x))/this.length()}pointSquaredDistance(e,t){const s=M.create(e,t);return this.closestPoint(s).squaredDistance(s)}pointDistance(e,t){const s=M.create(e,t);return this.closestPoint(s).distance(s)}tangentAt(e){if(!this.isDifferentiable())return null;const t=this.start,s=this.end,r=this.pointAt(e),i=new Y(t,s);return i.translate(r.x-t.x,r.y-t.y),i}tangentAtLength(e){if(!this.isDifferentiable())return null;const t=this.start,s=this.end,r=this.pointAtLength(e),i=new Y(t,s);return i.translate(r.x-t.x,r.y-t.y),i}relativeCcw(e,t){const s=M.create(e,t);let r=s.x-this.start.x,i=s.y-this.start.y;const o=this.end.x-this.start.x,a=this.end.y-this.start.y;let c=r*a-i*o;return c===0&&(c=r*o+i*a,c>0&&(r-=o,i-=a,c=r*o+i*a,c<0&&(c=0))),c<0?-1:c>0?1:0}equals(e){return e!=null&&this.start.x===e.start.x&&this.start.y===e.start.y&&this.end.x===e.end.x&&this.end.y===e.end.y}clone(){return new Y(this.start,this.end)}toJSON(){return{start:this.start.toJSON(),end:this.end.toJSON()}}serialize(){return[this.start.serialize(),this.end.serialize()].join(" ")}}(function(n){function e(t){return t!=null&&t instanceof n}n.isLine=e})(Y||(Y={}));class mn extends xs{get center(){return new M(this.x,this.y)}constructor(e,t,s,r){super(),this.x=e??0,this.y=t??0,this.a=s??0,this.b=r??0}bbox(){return U.fromEllipse(this)}getCenter(){return this.center}inflate(e,t){const s=e,r=t??e;return this.a+=2*s,this.b+=2*r,this}normalizedDistance(e,t){const s=M.create(e,t),r=s.x-this.x,i=s.y-this.y,o=this.a,a=this.b;return r*r/(o*o)+i*i/(a*a)}containsPoint(e,t){return this.normalizedDistance(e,t)<=1}intersectsWithLine(e){const t=[],s=this.a,r=this.b,i=e.start,o=e.end,a=e.vector(),c=i.diff(new M(this.x,this.y)),u=new M(a.x/(s*s),a.y/(r*r)),d=new M(c.x/(s*s),c.y/(r*r)),f=a.dot(u),h=a.dot(d),p=c.dot(d)-1,g=h*h-f*p;if(g<0)return null;if(g>0){const m=Math.sqrt(g),y=(-h-m)/f,b=(-h+m)/f;if((y<0||y>1)&&(b<0||b>1))return null;y>=0&&y<=1&&t.push(i.lerp(o,y)),b>=0&&b<=1&&t.push(i.lerp(o,b))}else{const m=-h/f;if(m>=0&&m<=1)t.push(i.lerp(o,m));else return null}return t}intersectsWithLineFromCenterToPoint(e,t=0){const s=M.clone(e);t&&s.rotate(t,this.getCenter());const r=s.x-this.x,i=s.y-this.y;let o;if(r===0)return o=this.bbox().getNearestPointToPoint(s),t?o.rotate(-t,this.getCenter()):o;const a=i/r,c=a*a,u=this.a*this.a,d=this.b*this.b;let f=Math.sqrt(1/(1/u+c/d));f=r<0?-f:f;const h=a*f;return o=new M(this.x+f,this.y+h),t?o.rotate(-t,this.getCenter()):o}tangentTheta(e){const t=M.clone(e),s=t.x,r=t.y,i=this.a,o=this.b,a=this.bbox().center,c=a.x,u=a.y,d=30,f=s>a.x+i/2,h=s<a.x-i/2;let p,g;return f||h?(g=s>a.x?r-d:r+d,p=i*i/(s-c)-i*i*(r-u)*(g-u)/(o*o*(s-c))+c):(p=r>a.y?s+d:s-d,g=o*o/(r-u)-o*o*(s-c)*(p-c)/(i*i*(r-u))+u),new M(p,g).theta(t)}scale(e,t){return this.a*=e,this.b*=t,this}rotate(e,t){const s=U.fromEllipse(this);s.rotate(e,t);const r=mn.fromRect(s);return this.a=r.a,this.b=r.b,this.x=r.x,this.y=r.y,this}translate(e,t){const s=M.create(e,t);return this.x+=s.x,this.y+=s.y,this}equals(e){return e!=null&&e.x===this.x&&e.y===this.y&&e.a===this.a&&e.b===this.b}clone(){return new mn(this.x,this.y,this.a,this.b)}toJSON(){return{x:this.x,y:this.y,a:this.a,b:this.b}}serialize(){return`${this.x} ${this.y} ${this.a} ${this.b}`}}(function(n){function e(t){return t!=null&&t instanceof n}n.isEllipse=e})(mn||(mn={})),function(n){function e(r,i,o,a){return r==null||typeof r=="number"?new n(r,i,o,a):t(r)}n.create=e;function t(r){return n.isEllipse(r)?r.clone():Array.isArray(r)?new n(r[0],r[1],r[2],r[3]):new n(r.x,r.y,r.a,r.b)}n.parse=t;function s(r){const i=r.center;return new n(i.x,i.y,r.width/2,r.height/2)}n.fromRect=s}(mn||(mn={}));const SR=new RegExp("^[\\s\\dLMCZz,.]*$");function ER(n){return typeof n!="string"?!1:SR.test(n)}function ad(n,e){return(n%e+e)%e}function OR(n,e,t,s,r){const i=[],o=n[n.length-1],a=e!=null&&e>0,c=e||0;if(s&&a){n=n.slice();const f=n[0],h=new M(o.x+(f.x-o.x)/2,o.y+(f.y-o.y)/2);n.splice(0,0,h)}let u=n[0],d=1;for(t?i.push("M",u.x,u.y):i.push("L",u.x,u.y);d<(s?n.length:n.length-1);){let f=n[ad(d,n.length)],h=u.x-f.x,p=u.y-f.y;if(a&&(h!==0||p!==0)&&(r==null||r.indexOf(d-1)<0)){let g=Math.sqrt(h*h+p*p);const m=h*Math.min(c,g/2)/g,y=p*Math.min(c,g/2)/g,b=f.x+m,w=f.y+y;i.push("L",b,w);let x=n[ad(d+1,n.length)];for(;d<n.length-2&&Math.round(x.x-f.x)===0&&Math.round(x.y-f.y)===0;)x=n[ad(d+2,n.length)],d+=1;h=x.x-f.x,p=x.y-f.y,g=Math.max(1,Math.sqrt(h*h+p*p));const v=h*Math.min(c,g/2)/g,C=p*Math.min(c,g/2)/g,E=f.x+v,S=f.y+C;i.push("Q",f.x,f.y,E,S),f=new M(E,S)}else i.push("L",f.x,f.y);u=f,d+=1}return s?i.push("Z"):i.push("L",o.x,o.y),i.map(f=>typeof f=="string"?f:+f.toFixed(3)).join(" ")}function Uy(n,e={}){const t=[];return n&&n.length&&n.forEach(s=>{Array.isArray(s)?t.push({x:s[0],y:s[1]}):t.push({x:s.x,y:s.y})}),OR(t,e.round,e.initialMove==null||e.initialMove,e.close,e.exclude)}function ol(n,e,t,s,r=0,i=0,o=0,a,c){if(t===0||s===0)return[];a-=n,c-=e,t=Math.abs(t),s=Math.abs(s);const u=-a/2,d=-c/2,f=Math.cos(r*Math.PI/180),h=Math.sin(r*Math.PI/180),p=f*u+h*d,g=-1*h*u+f*d,m=p*p,y=g*g,b=t*t,w=s*s,x=m/b+y/w;let v;if(x>1)t=Math.sqrt(x)*t,s=Math.sqrt(x)*s,v=0;else{let ee=1;i===o&&(ee=-1),v=ee*Math.sqrt((b*w-b*y-w*m)/(b*y+w*m))}const C=v*t*g/s,E=-1*v*s*p/t,S=f*C-h*E+a/2,O=h*C+f*E+c/2;let A=Math.atan2((g-E)/s,(p-C)/t)-Math.atan2(0,1),V=A>=0?A:2*Math.PI+A;A=Math.atan2((-g-E)/s,(-p-C)/t)-Math.atan2((g-E)/s,(p-C)/t);let T=A>=0?A:2*Math.PI+A;o===0&&T>0?T-=2*Math.PI:o!==0&&T<0&&(T+=2*Math.PI);const D=T*2/Math.PI,I=Math.ceil(D<0?-1*D:D),B=T/I,N=8/3*Math.sin(B/4)*Math.sin(B/4)/Math.sin(B/2),P=f*t,k=f*s,j=h*t,H=h*s;let K=Math.cos(V),R=Math.sin(V),_=-N*(P*R+H*K),z=-N*(j*R-k*K),Z=0,X=0;const re=[];for(let ee=0;ee<I;ee+=1){V+=B,K=Math.cos(V),R=Math.sin(V),Z=P*K-H*R+S,X=j*K+k*R+O;const pe=-N*(P*R+H*K),te=-N*(j*R-k*K),le=ee*6;re[le]=Number(_+n),re[le+1]=Number(z+e),re[le+2]=Number(Z-pe+n),re[le+3]=Number(X-te+e),re[le+4]=Number(Z+n),re[le+5]=Number(X+e),_=Z+pe,z=X+te}return re.map(ee=>+ee.toFixed(2))}function MR(n,e,t,s,r=0,i=0,o=0,a,c){const u=[],d=ol(n,e,t,s,r,i,o,a,c);if(d!=null)for(let f=0,h=d.length;f<h;f+=6)u.push("C",d[f],d[f+1],d[f+2],d[f+3],d[f+4],d[f+5]);return u.join(" ")}class ze extends xs{get start(){return this.points[0]||null}get end(){return this.points[this.points.length-1]||null}constructor(e){if(super(),e!=null){if(typeof e=="string")return ze.parse(e);this.points=e.map(t=>M.create(t))}else this.points=[]}scale(e,t,s=new M){return this.points.forEach(r=>r.scale(e,t,s)),this}rotate(e,t){return this.points.forEach(s=>s.rotate(e,t)),this}translate(e,t){const s=M.create(e,t);return this.points.forEach(r=>r.translate(s.x,s.y)),this}round(e=0){return this.points.forEach(t=>t.round(e)),this}bbox(){if(this.points.length===0)return new U;let e=1/0,t=-1/0,s=1/0,r=-1/0;const i=this.points;for(let o=0,a=i.length;o<a;o+=1){const c=i[o],u=c.x,d=c.y;u<e&&(e=u),u>t&&(t=u),d<s&&(s=d),d>r&&(r=d)}return new U(e,s,t-e,r-s)}closestPoint(e){const t=this.closestPointLength(e);return this.pointAtLength(t)}closestPointLength(e){const t=this.points,s=t.length;if(s===0||s===1)return 0;let r=0,i=0,o=1/0;for(let a=0,c=s-1;a<c;a+=1){const u=new Y(t[a],t[a+1]),d=u.length(),f=u.closestPointNormalizedLength(e),p=u.pointAt(f).squaredDistance(e);p<o&&(o=p,i=r+f*d),r+=d}return i}closestPointNormalizedLength(e){const t=this.length();return t===0?0:this.closestPointLength(e)/t}closestPointTangent(e){const t=this.closestPointLength(e);return this.tangentAtLength(t)}containsPoint(e){if(this.points.length===0)return!1;const t=M.clone(e),s=t.x,r=t.y,i=this.points,o=i.length;let a=o-1,c=0;for(let u=0;u<o;u+=1){const d=i[a],f=i[u];if(t.equals(d))return!0;const h=new Y(d,f);if(h.containsPoint(e))return!0;if(r<=d.y&&r>f.y||r>d.y&&r<=f.y){const p=d.x-s>f.x-s?d.x-s:f.x-s;if(p>=0){const g=new M(s+p,r),m=new Y(e,g);h.intersectsWithLine(m)&&(c+=1)}}a=u}return c%2===1}intersectsWithLine(e){const t=[];for(let s=0,r=this.points.length-1;s<r;s+=1){const i=this.points[s],o=this.points[s+1],a=e.intersectsWithLine(new Y(i,o));a&&t.push(a)}return t.length>0?t:null}isDifferentiable(){for(let e=0,t=this.points.length-1;e<t;e+=1){const s=this.points[e],r=this.points[e+1];if(new Y(s,r).isDifferentiable())return!0}return!1}length(){let e=0;for(let t=0,s=this.points.length-1;t<s;t+=1){const r=this.points[t],i=this.points[t+1];e+=r.distance(i)}return e}pointAt(e){const t=this.points,s=t.length;if(s===0)return null;if(s===1||e<=0)return t[0].clone();if(e>=1)return t[s-1].clone();const i=this.length()*e;return this.pointAtLength(i)}pointAtLength(e){const t=this.points,s=t.length;if(s===0)return null;if(s===1)return t[0].clone();let r=!0;e<0&&(r=!1,e=-e);let i=0;for(let a=0,c=s-1;a<c;a+=1){const u=r?a:c-1-a,d=t[u],f=t[u+1],h=new Y(d,f),p=d.distance(f);if(e<=i+p)return h.pointAtLength((r?1:-1)*(e-i));i+=p}return(r?t[s-1]:t[0]).clone()}tangentAt(e){const s=this.points.length;if(s===0||s===1)return null;e<0&&(e=0),e>1&&(e=1);const i=this.length()*e;return this.tangentAtLength(i)}tangentAtLength(e){const t=this.points,s=t.length;if(s===0||s===1)return null;let r=!0;e<0&&(r=!1,e=-e);let i,o=0;for(let a=0,c=s-1;a<c;a+=1){const u=r?a:c-1-a,d=t[u],f=t[u+1],h=new Y(d,f),p=d.distance(f);if(h.isDifferentiable()){if(e<=o+p)return h.tangentAtLength((r?1:-1)*(e-o));i=h}o+=p}if(i){const a=r?1:0;return i.tangentAt(a)}return null}simplify(e={}){const t=this.points;if(t.length<3)return this;const s=e.threshold||0;let r=0;for(;t[r+2];){const i=r,o=r+1,a=r+2,c=t[i],u=t[o],d=t[a];new Y(c,d).closestPoint(u).distance(u)<=s?t.splice(o,1):r+=1}return this}toHull(){const e=this.points,t=e.length;if(t===0)return new ze;let s=e[0];for(let h=1;h<t;h+=1)(e[h].y<s.y||e[h].y===s.y&&e[h].x>s.x)&&(s=e[h]);const r=[];for(let h=0;h<t;h+=1){let p=s.theta(e[h]);p===0&&(p=360),r.push([e[h],h,p])}if(r.sort((h,p)=>{let g=h[2]-p[2];return g===0&&(g=p[1]-h[1]),g}),r.length>2){const h=r[r.length-1];r.unshift(h)}const i={},o=[],a=h=>`${h[0].toString()}@${h[1]}`;for(;r.length!==0;){const h=r.pop(),p=h[0];if(i[a(h)])continue;let g=!1;for(;!g;)if(o.length<2)o.push(h),g=!0;else{const m=o.pop(),y=m[0],b=o.pop(),w=b[0],x=w.cross(y,p);if(x<0)o.push(b),o.push(m),o.push(h),g=!0;else if(x===0){const C=y.angleBetween(w,p);Math.abs(C-180)<1e-10||y.equals(p)||w.equals(y)?(i[a(m)]=y,o.push(b)):Math.abs((C+1)%360-1)<1e-10&&(o.push(b),r.push(m))}else i[a(m)]=y,o.push(b)}}o.length>2&&o.pop();let c,u=-1;for(let h=0,p=o.length;h<p;h+=1){const g=o[h][1];(c===void 0||g<c)&&(c=g,u=h)}let d=[];if(u>0){const h=o.slice(u),p=o.slice(0,u);d=h.concat(p)}else d=o;const f=[];for(let h=0,p=d.length;h<p;h+=1)f.push(d[h][0]);return new ze(f)}equals(e){return e==null||e.points.length!==this.points.length?!1:e.points.every((t,s)=>t.equals(this.points[s]))}clone(){return new ze(this.points.map(e=>e.clone()))}toJSON(){return this.points.map(e=>e.toJSON())}serialize(){return this.points.map(e=>`${e.serialize()}`).join(" ")}}(function(n){function e(t){return t!=null&&t instanceof n}n.isPolyline=e})(ze||(ze={})),function(n){function e(t){const s=t.trim();if(s==="")return new n;const r=[],i=s.split(/\s*,\s*|\s+/);for(let o=0,a=i.length;o<a;o+=2)r.push({x:+i[o],y:+i[o+1]});return new n(r)}n.parse=e}(ze||(ze={}));class Be extends xs{constructor(e,t,s,r){super(),this.PRECISION=3,this.start=M.create(e),this.controlPoint1=M.create(t),this.controlPoint2=M.create(s),this.end=M.create(r)}bbox(){const e=this.start,t=this.controlPoint1,s=this.controlPoint2,r=this.end,i=e.x,o=e.y,a=t.x,c=t.y,u=s.x,d=s.y,f=r.x,h=r.y,p=[],g=[[],[]];let m,y,b,w,x,v,C,E;for(let P=0;P<2;P+=1){if(P===0?(y=6*i-12*a+6*u,m=-3*i+9*a-9*u+3*f,b=3*a-3*i):(y=6*o-12*c+6*d,m=-3*o+9*c-9*d+3*h,b=3*c-3*o),Math.abs(m)<1e-12){if(Math.abs(y)<1e-12)continue;w=-b/y,w>0&&w<1&&p.push(w);continue}C=y*y-4*b*m,E=Math.sqrt(C),!(C<0)&&(x=(-y+E)/(2*m),x>0&&x<1&&p.push(x),v=(-y-E)/(2*m),v>0&&v<1&&p.push(v))}let S,O,A,V=p.length;const T=V;for(;V;)V-=1,w=p[V],A=1-w,S=A*A*A*i+3*A*A*w*a+3*A*w*w*u+w*w*w*f,g[0][V]=S,O=A*A*A*o+3*A*A*w*c+3*A*w*w*d+w*w*w*h,g[1][V]=O;p[T]=0,p[T+1]=1,g[0][T]=i,g[1][T]=o,g[0][T+1]=f,g[1][T+1]=h,p.length=T+2,g[0].length=T+2,g[1].length=T+2;const D=Math.min.apply(null,g[0]),I=Math.min.apply(null,g[1]),B=Math.max.apply(null,g[0]),N=Math.max.apply(null,g[1]);return new U(D,I,B-D,N-I)}closestPoint(e,t={}){return this.pointAtT(this.closestPointT(e,t))}closestPointLength(e,t={}){const s=this.getOptions(t);return this.lengthAtT(this.closestPointT(e,s),s)}closestPointNormalizedLength(e,t={}){const s=this.getOptions(t),r=this.closestPointLength(e,s);if(!r)return 0;const i=this.length(s);return i===0?0:r/i}closestPointT(e,t={}){const s=this.getPrecision(t),r=this.getDivisions(t),i=Math.pow(10,-s);let o=null,a=0,c=0,u=0,d=0,f=0,h=null;const p=r.length;let g=p>0?1/p:0;for(r.forEach((m,y)=>{const b=m.start.distance(e),w=m.end.distance(e),x=b+w;(h==null||x<h)&&(o=m,a=y*g,c=(y+1)*g,u=b,d=w,h=x,f=m.endpointDistance())});;){const m=u?Math.abs(u-d)/u:0,y=d!=null?Math.abs(u-d)/d:0,b=m<i||y<i,w=u?u<f*i:!0,x=d?d<f*i:!0;if(b||(w||x))return u<=d?a:c;const C=o.divide(.5);g/=2;const E=C[0].start.distance(e),S=C[0].end.distance(e),O=E+S,A=C[1].start.distance(e),V=C[1].end.distance(e),T=A+V;O<=T?(o=C[0],c-=g,u=E,d=S):(o=C[1],a+=g,u=A,d=V)}}closestPointTangent(e,t={}){return this.tangentAtT(this.closestPointT(e,t))}containsPoint(e,t={}){return this.toPolyline(t).containsPoint(e)}divideAt(e,t={}){if(e<=0)return this.divideAtT(0);if(e>=1)return this.divideAtT(1);const s=this.tAt(e,t);return this.divideAtT(s)}divideAtLength(e,t={}){const s=this.tAtLength(e,t);return this.divideAtT(s)}divide(e){return this.divideAtT(e)}divideAtT(e){const t=this.start,s=this.controlPoint1,r=this.controlPoint2,i=this.end;if(e<=0)return[new Be(t,t,t,t),new Be(t,s,r,i)];if(e>=1)return[new Be(t,s,r,i),new Be(i,i,i,i)];const o=this.getSkeletonPoints(e),a=o.startControlPoint1,c=o.startControlPoint2,u=o.divider,d=o.dividerControlPoint1,f=o.dividerControlPoint2;return[new Be(t,a,c,u),new Be(u,d,f,i)]}endpointDistance(){return this.start.distance(this.end)}getSkeletonPoints(e){const t=this.start,s=this.controlPoint1,r=this.controlPoint2,i=this.end;if(e<=0)return{startControlPoint1:t.clone(),startControlPoint2:t.clone(),divider:t.clone(),dividerControlPoint1:s.clone(),dividerControlPoint2:r.clone()};if(e>=1)return{startControlPoint1:s.clone(),startControlPoint2:r.clone(),divider:i.clone(),dividerControlPoint1:i.clone(),dividerControlPoint2:i.clone()};const o=new Y(t,s).pointAt(e),a=new Y(s,r).pointAt(e),c=new Y(r,i).pointAt(e),u=new Y(o,a).pointAt(e),d=new Y(a,c).pointAt(e),f=new Y(u,d).pointAt(e);return{startControlPoint1:o,startControlPoint2:u,divider:f,dividerControlPoint1:d,dividerControlPoint2:c}}getSubdivisions(e={}){const t=this.getPrecision(e);let s=[new Be(this.start,this.controlPoint1,this.controlPoint2,this.end)];if(t===0)return s;let r=this.endpointDistance();const i=Math.pow(10,-t);let o=0;for(;;){o+=1;const a=[];s.forEach(d=>{const f=d.divide(.5);a.push(f[0],f[1])});const c=a.reduce((d,f)=>d+f.endpointDistance(),0),u=c!==0?(c-r)/c:0;if(o>1&&u<i)return a;s=a,r=c}}length(e={}){return this.getDivisions(e).reduce((s,r)=>s+r.endpointDistance(),0)}lengthAtT(e,t={}){if(e<=0)return 0;const s=t.precision===void 0?this.PRECISION:t.precision;return this.divide(e)[0].length({precision:s})}pointAt(e,t={}){if(e<=0)return this.start.clone();if(e>=1)return this.end.clone();const s=this.tAt(e,t);return this.pointAtT(s)}pointAtLength(e,t={}){const s=this.tAtLength(e,t);return this.pointAtT(s)}pointAtT(e){return e<=0?this.start.clone():e>=1?this.end.clone():this.getSkeletonPoints(e).divider}isDifferentiable(){const e=this.start,t=this.controlPoint1,s=this.controlPoint2,r=this.end;return!(e.equals(t)&&t.equals(s)&&s.equals(r))}tangentAt(e,t={}){if(!this.isDifferentiable())return null;e<0?e=0:e>1&&(e=1);const s=this.tAt(e,t);return this.tangentAtT(s)}tangentAtLength(e,t={}){if(!this.isDifferentiable())return null;const s=this.tAtLength(e,t);return this.tangentAtT(s)}tangentAtT(e){if(!this.isDifferentiable())return null;e<0&&(e=0),e>1&&(e=1);const t=this.getSkeletonPoints(e),s=t.startControlPoint2,r=t.dividerControlPoint1,i=t.divider,o=new Y(s,r);return o.translate(i.x-s.x,i.y-s.y),o}getPrecision(e={}){return e.precision==null?this.PRECISION:e.precision}getDivisions(e={}){if(e.subdivisions!=null)return e.subdivisions;const t=this.getPrecision(e);return this.getSubdivisions({precision:t})}getOptions(e={}){const t=this.getPrecision(e),s=this.getDivisions(e);return{precision:t,subdivisions:s}}tAt(e,t={}){if(e<=0)return 0;if(e>=1)return 1;const s=this.getOptions(t),i=this.length(s)*e;return this.tAtLength(i,s)}tAtLength(e,t={}){let s=!0;e<0&&(s=!1,e=-e);const r=this.getPrecision(t),i=this.getDivisions(t),o={precision:r,subdivisions:i};let a=null,c,u,d=0,f=0,h=0;const p=i.length;let g=p>0?1/p:0;for(let b=0;b<p;b+=1){const w=s?b:p-1-b,x=i[b],v=x.endpointDistance();if(e<=h+v){a=x,c=w*g,u=(w+1)*g,d=s?e-h:v+h-e,f=s?v+h-e:e-h;break}h+=v}if(a==null)return s?1:0;const m=this.length(o),y=Math.pow(10,-r);for(;;){let b;if(b=m!==0?d/m:0,b<y)return c;if(b=m!==0?f/m:0,b<y)return u;let w,x;const v=a.divide(.5);g/=2;const C=v[0].endpointDistance(),E=v[1].endpointDistance();d<=C?(a=v[0],u-=g,w=d,x=C-w):(a=v[1],c+=g,w=d-C,x=E-w),d=w,f=x}}toPoints(e={}){const t=this.getDivisions(e),s=[t[0].start.clone()];return t.forEach(r=>s.push(r.end.clone())),s}toPolyline(e={}){return new ze(this.toPoints(e))}scale(e,t,s){return this.start.scale(e,t,s),this.controlPoint1.scale(e,t,s),this.controlPoint2.scale(e,t,s),this.end.scale(e,t,s),this}rotate(e,t){return this.start.rotate(e,t),this.controlPoint1.rotate(e,t),this.controlPoint2.rotate(e,t),this.end.rotate(e,t),this}translate(e,t){return typeof e=="number"?(this.start.translate(e,t),this.controlPoint1.translate(e,t),this.controlPoint2.translate(e,t),this.end.translate(e,t)):(this.start.translate(e),this.controlPoint1.translate(e),this.controlPoint2.translate(e),this.end.translate(e)),this}equals(e){return e!=null&&this.start.equals(e.start)&&this.controlPoint1.equals(e.controlPoint1)&&this.controlPoint2.equals(e.controlPoint2)&&this.end.equals(e.end)}clone(){return new Be(this.start,this.controlPoint1,this.controlPoint2,this.end)}toJSON(){return{start:this.start.toJSON(),controlPoint1:this.controlPoint1.toJSON(),controlPoint2:this.controlPoint2.toJSON(),end:this.end.toJSON()}}serialize(){return[this.start.serialize(),this.controlPoint1.serialize(),this.controlPoint2.serialize(),this.end.serialize()].join(" ")}}(function(n){function e(t){return t!=null&&t instanceof n}n.isCurve=e})(Be||(Be={})),function(n){function e(r){const i=r.length,o=[],a=[];let c=2;o[0]=r[0]/c;for(let u=1;u<i;u+=1)a[u]=1/c,c=(u<i-1?4:3.5)-a[u],o[u]=(r[u]-o[u-1])/c;for(let u=1;u<i;u+=1)o[i-u-1]-=a[i-u]*o[i-u];return o}function t(r){const i=r.map(h=>M.clone(h)),o=[],a=[],c=i.length-1;if(c===1)return o[0]=new M((2*i[0].x+i[1].x)/3,(2*i[0].y+i[1].y)/3),a[0]=new M(2*o[0].x-i[0].x,2*o[0].y-i[0].y),[o,a];const u=[];for(let h=1;h<c-1;h+=1)u[h]=4*i[h].x+2*i[h+1].x;u[0]=i[0].x+2*i[1].x,u[c-1]=(8*i[c-1].x+i[c].x)/2;const d=e(u);for(let h=1;h<c-1;h+=1)u[h]=4*i[h].y+2*i[h+1].y;u[0]=i[0].y+2*i[1].y,u[c-1]=(8*i[c-1].y+i[c].y)/2;const f=e(u);for(let h=0;h<c;h+=1)o.push(new M(d[h],f[h])),h<c-1?a.push(new M(2*i[h+1].x-d[h+1],2*i[h+1].y-f[h+1])):a.push(new M((i[c].x+d[c-1])/2,(i[c].y+f[c-1])/2));return[o,a]}function s(r){if(r==null||Array.isArray(r)&&r.length<2)throw new Error("At least 2 points are required");const i=t(r),o=[];for(let a=0,c=i[0].length;a<c;a+=1){const u=new M(i[0][a].x,i[0][a].y),d=new M(i[1][a].x,i[1][a].y);o.push(new n(r[a],u,d,r[a+1]))}return o}n.throughPoints=s}(Be||(Be={}));class al extends xs{constructor(){super(...arguments),this.isVisible=!0,this.isSegment=!0,this.isSubpathStart=!1}get end(){return this.endPoint}get start(){if(this.previousSegment==null)throw new Error("Missing previous segment. (This segment cannot be the first segment of a path, or segment has not yet been added to a path.)");return this.previousSegment.end}closestPointT(e,t){if(this.closestPointNormalizedLength)return this.closestPointNormalizedLength(e);throw new Error("Neither `closestPointT` nor `closestPointNormalizedLength` method is implemented.")}lengthAtT(e,t){if(e<=0)return 0;const s=this.length();return e>=1?s:s*e}divideAtT(e){if(this.divideAt)return this.divideAt(e);throw new Error("Neither `divideAtT` nor `divideAt` method is implemented.")}pointAtT(e){if(this.pointAt)return this.pointAt(e);throw new Error("Neither `pointAtT` nor `pointAt` method is implemented.")}tangentAtT(e){if(this.tangentAt)return this.tangentAt(e);throw new Error("Neither `tangentAtT` nor `tangentAt` method is implemented.")}}class gt extends al{constructor(e,t){super(),Y.isLine(e)?this.endPoint=e.end.clone().round(2):this.endPoint=M.create(e,t).round(2)}get type(){return"L"}get line(){return new Y(this.start,this.end)}bbox(){return this.line.bbox()}closestPoint(e){return this.line.closestPoint(e)}closestPointLength(e){return this.line.closestPointLength(e)}closestPointNormalizedLength(e){return this.line.closestPointNormalizedLength(e)}closestPointTangent(e){return this.line.closestPointTangent(e)}length(){return this.line.length()}divideAt(e){const t=this.line.divideAt(e);return[new gt(t[0]),new gt(t[1])]}divideAtLength(e){const t=this.line.divideAtLength(e);return[new gt(t[0]),new gt(t[1])]}getSubdivisions(){return[]}pointAt(e){return this.line.pointAt(e)}pointAtLength(e){return this.line.pointAtLength(e)}tangentAt(e){return this.line.tangentAt(e)}tangentAtLength(e){return this.line.tangentAtLength(e)}isDifferentiable(){return this.previousSegment==null?!1:!this.start.equals(this.end)}clone(){return new gt(this.end)}scale(e,t,s){return this.end.scale(e,t,s),this}rotate(e,t){return this.end.rotate(e,t),this}translate(e,t){return typeof e=="number"?this.end.translate(e,t):this.end.translate(e),this}equals(e){return this.type===e.type&&this.start.equals(e.start)&&this.end.equals(e.end)}toJSON(){return{type:this.type,start:this.start.toJSON(),end:this.end.toJSON()}}serialize(){const e=this.end;return`${this.type} ${e.x} ${e.y}`}}(function(n){function e(...t){const s=t.length,r=t[0];if(Y.isLine(r))return new n(r);if(M.isPointLike(r))return s===1?new n(r):t.map(o=>new n(o));if(s===2)return new n(+t[0],+t[1]);const i=[];for(let o=0;o<s;o+=2){const a=+t[o],c=+t[o+1];i.push(new n(a,c))}return i}n.create=e})(gt||(gt={}));class qr extends al{get end(){if(!this.subpathStartSegment)throw new Error("Missing subpath start segment. (This segment needs a subpath start segment (e.g. MoveTo), or segment has not yet been added to a path.)");return this.subpathStartSegment.end}get type(){return"Z"}get line(){return new Y(this.start,this.end)}bbox(){return this.line.bbox()}closestPoint(e){return this.line.closestPoint(e)}closestPointLength(e){return this.line.closestPointLength(e)}closestPointNormalizedLength(e){return this.line.closestPointNormalizedLength(e)}closestPointTangent(e){return this.line.closestPointTangent(e)}length(){return this.line.length()}divideAt(e){const t=this.line.divideAt(e);return[t[1].isDifferentiable()?new gt(t[0]):this.clone(),new gt(t[1])]}divideAtLength(e){const t=this.line.divideAtLength(e);return[t[1].isDifferentiable()?new gt(t[0]):this.clone(),new gt(t[1])]}getSubdivisions(){return[]}pointAt(e){return this.line.pointAt(e)}pointAtLength(e){return this.line.pointAtLength(e)}tangentAt(e){return this.line.tangentAt(e)}tangentAtLength(e){return this.line.tangentAtLength(e)}isDifferentiable(){return!this.previousSegment||!this.subpathStartSegment?!1:!this.start.equals(this.end)}scale(){return this}rotate(){return this}translate(){return this}equals(e){return this.type===e.type&&this.start.equals(e.start)&&this.end.equals(e.end)}clone(){return new qr}toJSON(){return{type:this.type,start:this.start.toJSON(),end:this.end.toJSON()}}serialize(){return this.type}}(function(n){function e(){return new n}n.create=e})(qr||(qr={}));class Xr extends al{constructor(e,t){super(),this.isVisible=!1,this.isSubpathStart=!0,Y.isLine(e)||Be.isCurve(e)?this.endPoint=e.end.clone().round(2):this.endPoint=M.create(e,t).round(2)}get start(){throw new Error("Illegal access. Moveto segments should not need a start property.")}get type(){return"M"}bbox(){return null}closestPoint(){return this.end.clone()}closestPointLength(){return 0}closestPointNormalizedLength(){return 0}closestPointT(){return 1}closestPointTangent(){return null}length(){return 0}lengthAtT(){return 0}divideAt(){return[this.clone(),this.clone()]}divideAtLength(){return[this.clone(),this.clone()]}getSubdivisions(){return[]}pointAt(){return this.end.clone()}pointAtLength(){return this.end.clone()}pointAtT(){return this.end.clone()}tangentAt(){return null}tangentAtLength(){return null}tangentAtT(){return null}isDifferentiable(){return!1}scale(e,t,s){return this.end.scale(e,t,s),this}rotate(e,t){return this.end.rotate(e,t),this}translate(e,t){return typeof e=="number"?this.end.translate(e,t):this.end.translate(e),this}clone(){return new Xr(this.end)}equals(e){return this.type===e.type&&this.end.equals(e.end)}toJSON(){return{type:this.type,end:this.end.toJSON()}}serialize(){const e=this.end;return`${this.type} ${e.x} ${e.y}`}}(function(n){function e(...t){const s=t.length,r=t[0];if(Y.isLine(r))return new n(r);if(Be.isCurve(r))return new n(r);if(M.isPointLike(r)){if(s===1)return new n(r);const o=[];for(let a=0;a<s;a+=1)a===0?o.push(new n(t[a])):o.push(new gt(t[a]));return o}if(s===2)return new n(+t[0],+t[1]);const i=[];for(let o=0;o<s;o+=2){const a=+t[o],c=+t[o+1];o===0?i.push(new n(a,c)):i.push(new gt(a,c))}return i}n.create=e})(Xr||(Xr={}));class Yt extends al{constructor(e,t,s,r,i,o){super(),Be.isCurve(e)?(this.controlPoint1=e.controlPoint1.clone().round(2),this.controlPoint2=e.controlPoint2.clone().round(2),this.endPoint=e.end.clone().round(2)):typeof e=="number"?(this.controlPoint1=new M(e,t).round(2),this.controlPoint2=new M(s,r).round(2),this.endPoint=new M(i,o).round(2)):(this.controlPoint1=M.create(e).round(2),this.controlPoint2=M.create(t).round(2),this.endPoint=M.create(s).round(2))}get type(){return"C"}get curve(){return new Be(this.start,this.controlPoint1,this.controlPoint2,this.end)}bbox(){return this.curve.bbox()}closestPoint(e){return this.curve.closestPoint(e)}closestPointLength(e){return this.curve.closestPointLength(e)}closestPointNormalizedLength(e){return this.curve.closestPointNormalizedLength(e)}closestPointTangent(e){return this.curve.closestPointTangent(e)}length(){return this.curve.length()}divideAt(e,t={}){const s=this.curve.divideAt(e,t);return[new Yt(s[0]),new Yt(s[1])]}divideAtLength(e,t={}){const s=this.curve.divideAtLength(e,t);return[new Yt(s[0]),new Yt(s[1])]}divideAtT(e){const t=this.curve.divideAtT(e);return[new Yt(t[0]),new Yt(t[1])]}getSubdivisions(){return[]}pointAt(e){return this.curve.pointAt(e)}pointAtLength(e){return this.curve.pointAtLength(e)}tangentAt(e){return this.curve.tangentAt(e)}tangentAtLength(e){return this.curve.tangentAtLength(e)}isDifferentiable(){if(!this.previousSegment)return!1;const e=this.start,t=this.controlPoint1,s=this.controlPoint2,r=this.end;return!(e.equals(t)&&t.equals(s)&&s.equals(r))}scale(e,t,s){return this.controlPoint1.scale(e,t,s),this.controlPoint2.scale(e,t,s),this.end.scale(e,t,s),this}rotate(e,t){return this.controlPoint1.rotate(e,t),this.controlPoint2.rotate(e,t),this.end.rotate(e,t),this}translate(e,t){return typeof e=="number"?(this.controlPoint1.translate(e,t),this.controlPoint2.translate(e,t),this.end.translate(e,t)):(this.controlPoint1.translate(e),this.controlPoint2.translate(e),this.end.translate(e)),this}equals(e){return this.start.equals(e.start)&&this.end.equals(e.end)&&this.controlPoint1.equals(e.controlPoint1)&&this.controlPoint2.equals(e.controlPoint2)}clone(){return new Yt(this.controlPoint1,this.controlPoint2,this.end)}toJSON(){return{type:this.type,start:this.start.toJSON(),controlPoint1:this.controlPoint1.toJSON(),controlPoint2:this.controlPoint2.toJSON(),end:this.end.toJSON()}}serialize(){const e=this.controlPoint1,t=this.controlPoint2,s=this.end;return[this.type,e.x,e.y,t.x,t.y,s.x,s.y].join(" ")}}(function(n){function e(...t){const s=t.length,r=t[0];if(Be.isCurve(r))return new n(r);if(M.isPointLike(r)){if(s===3)return new n(t[0],t[1],t[2]);const o=[];for(let a=0;a<s;a+=3)o.push(new n(t[a],t[a+1],t[a+2]));return o}if(s===6)return new n(t[0],t[1],t[2],t[3],t[4],t[5]);const i=[];for(let o=0;o<s;o+=6)i.push(new n(t[o],t[o+1],t[o+2],t[o+3],t[o+4],t[o+5]));return i}n.create=e})(Yt||(Yt={}));function ll(n,e,t){return{x:n*Math.cos(t)-e*Math.sin(t),y:n*Math.sin(t)+e*Math.cos(t)}}function Hy(n,e,t,s,r,i){const o=.3333333333333333,a=2/3;return[o*n+a*t,o*e+a*s,o*r+a*t,o*i+a*s,r,i]}function Gy(n,e,t,s,r,i,o,a,c,u){const d=Math.PI*120/180,f=Math.PI/180*(+r||0);let h=[],p,g,m,y,b;if(u)g=u[0],m=u[1],y=u[2],b=u[3];else{p=ll(n,e,-f),n=p.x,e=p.y,p=ll(a,c,-f),a=p.x,c=p.y;const B=(n-a)/2,N=(e-c)/2;let P=B*B/(t*t)+N*N/(s*s);P>1&&(P=Math.sqrt(P),t=P*t,s=P*s);const k=t*t,j=s*s,H=(i===o?-1:1)*Math.sqrt(Math.abs((k*j-k*N*N-j*B*B)/(k*N*N+j*B*B)));y=H*t*N/s+(n+a)/2,b=H*-s*B/t+(e+c)/2,g=Math.asin((e-b)/s),m=Math.asin((c-b)/s),g=n<y?Math.PI-g:g,m=a<y?Math.PI-m:m,g<0&&(g=Math.PI*2+g),m<0&&(m=Math.PI*2+m),o&&g>m&&(g-=Math.PI*2),!o&&m>g&&(m-=Math.PI*2)}let w=m-g;if(Math.abs(w)>d){const B=m,N=a,P=c;m=g+d*(o&&m>g?1:-1),a=y+t*Math.cos(m),c=b+s*Math.sin(m),h=Gy(a,c,t,s,r,0,o,N,P,[m,B,y,b])}w=m-g;const x=Math.cos(g),v=Math.sin(g),C=Math.cos(m),E=Math.sin(m),S=Math.tan(w/4),O=4/3*(t*S),A=4/3*(s*S),V=[n,e],T=[n+O*v,e-A*x],D=[a+O*E,c-A*C],I=[a,c];if(T[0]=2*V[0]-T[0],T[1]=2*V[1]-T[1],u)return[T,D,I].concat(h);{h=[T,D,I].concat(h).join().split(",");const B=[],N=h.length;for(let P=0;P<N;P+=1)B[P]=P%2?ll(+h[P-1],+h[P],f).y:ll(+h[P],+h[P+1],f).x;return B}}function PR(n){if(!n)return null;const e=`
|
|
41
41
|
\v\f\r \u2028\u2029`,t=new RegExp(`([a-z])[${e},]*((-?\\d*\\.?\\d*(?:e[\\-+]?\\d+)?[${e}]*,?[${e}]*)+)`,"ig"),s=new RegExp(`(-?\\d*\\.?\\d*(?:e[\\-+]?\\d+)?)[${e}]*,?[${e}]*`,"ig"),r={a:7,c:6,h:1,l:2,m:2,q:4,s:4,t:2,v:1,z:0},i=[];return n.replace(t,(o,a,c)=>{const u=[];let d=a.toLowerCase();c.replace(s,(h,p)=>(p&&u.push(+p),h)),d==="m"&&u.length>2&&(i.push([a,...u.splice(0,2)]),d="l",a=a==="m"?"l":"L");const f=r[d];for(;u.length>=f&&(i.push([a,...u.splice(0,f)]),!!f););return o}),i}function NR(n){const e=PR(n);if(!e||!e.length)return[["M",0,0]];let t=0,s=0,r=0,i=0;const o=[];for(let a=0,c=e.length;a<c;a+=1){const u=[];o.push(u);const d=e[a],f=d[0];if(f!==f.toUpperCase())switch(u[0]=f.toUpperCase(),u[0]){case"A":u[1]=d[1],u[2]=d[2],u[3]=d[3],u[4]=d[4],u[5]=d[5],u[6]=+d[6]+t,u[7]=+d[7]+s;break;case"V":u[1]=+d[1]+s;break;case"H":u[1]=+d[1]+t;break;case"M":r=+d[1]+t,i=+d[2]+s;for(let h=1,p=d.length;h<p;h+=1)u[h]=+d[h]+(h%2?t:s);break;default:for(let h=1,p=d.length;h<p;h+=1)u[h]=+d[h]+(h%2?t:s);break}else for(let h=0,p=d.length;h<p;h+=1)u[h]=d[h];switch(u[0]){case"Z":t=+r,s=+i;break;case"H":t=u[1];break;case"V":s=u[1];break;case"M":r=u[u.length-2],i=u[u.length-1],t=u[u.length-2],s=u[u.length-1];break;default:t=u[u.length-2],s=u[u.length-1];break}}return o}function AR(n){const e=NR(n),t={x:0,y:0,bx:0,by:0,X:0,Y:0,qx:null,qy:null};function s(c,u,d){let f,h;if(!c)return["C",u.x,u.y,u.x,u.y,u.x,u.y];switch(c[0]in{T:1,Q:1}||(u.qx=null,u.qy=null),c[0]){case"M":u.X=c[1],u.Y=c[2];break;case"A":return parseFloat(c[1])===0||parseFloat(c[2])===0?["L",c[6],c[7]]:["C"].concat(Gy.apply(0,[u.x,u.y].concat(c.slice(1))));case"S":return d==="C"||d==="S"?(f=u.x*2-u.bx,h=u.y*2-u.by):(f=u.x,h=u.y),["C",f,h].concat(c.slice(1));case"T":return d==="Q"||d==="T"?(u.qx=u.x*2-u.qx,u.qy=u.y*2-u.qy):(u.qx=u.x,u.qy=u.y),["C"].concat(Hy(u.x,u.y,u.qx,u.qy,c[1],c[2]));case"Q":return u.qx=c[1],u.qy=c[2],["C"].concat(Hy(u.x,u.y,c[1],c[2],c[3],c[4]));case"H":return["L"].concat(c[1],u.y);case"V":return["L"].concat(u.x,c[1])}return c}function r(c,u){if(c[u].length>7){c[u].shift();const d=c[u];for(;d.length;)i[u]="A",u+=1,c.splice(u,0,["C"].concat(d.splice(0,6)));c.splice(u,1),a=e.length}}const i=[];let o="",a=e.length;for(let c=0;c<a;c+=1){let u="";e[c]&&(u=e[c][0]),u!=="C"&&(i[c]=u,c>0&&(o=i[c-1])),e[c]=s(e[c],t,o),i[c]!=="A"&&u==="C"&&(i[c]="C"),r(e,c);const d=e[c],f=d.length;t.x=d[f-2],t.y=d[f-1],t.bx=parseFloat(d[f-4])||t.x,t.by=parseFloat(d[f-3])||t.y}return(!e[0][0]||e[0][0]!=="M")&&e.unshift(["M",0,0]),e}function _R(n){return AR(n).map(e=>e.map(t=>typeof t=="string"?t:Ce.round(t,2))).join(",").split(",").join(" ")}class se extends xs{constructor(e){if(super(),this.PRECISION=3,this.segments=[],Array.isArray(e))if(Y.isLine(e[0])||Be.isCurve(e[0])){let t=null;e.forEach((r,i)=>{i===0&&this.appendSegment(se.createSegment("M",r.start)),t!=null&&!t.end.equals(r.start)&&this.appendSegment(se.createSegment("M",r.start)),Y.isLine(r)?this.appendSegment(se.createSegment("L",r.end)):Be.isCurve(r)&&this.appendSegment(se.createSegment("C",r.controlPoint1,r.controlPoint2,r.end)),t=r})}else e.forEach(s=>{s.isSegment&&this.appendSegment(s)});else e!=null&&(Y.isLine(e)?(this.appendSegment(se.createSegment("M",e.start)),this.appendSegment(se.createSegment("L",e.end))):Be.isCurve(e)?(this.appendSegment(se.createSegment("M",e.start)),this.appendSegment(se.createSegment("C",e.controlPoint1,e.controlPoint2,e.end))):ze.isPolyline(e)?e.points&&e.points.length&&e.points.forEach((t,s)=>{const r=s===0?se.createSegment("M",t):se.createSegment("L",t);this.appendSegment(r)}):e.isSegment&&this.appendSegment(e))}get start(){const e=this.segments,t=e.length;if(t===0)return null;for(let s=0;s<t;s+=1){const r=e[s];if(r.isVisible)return r.start}return e[t-1].end}get end(){const e=this.segments,t=e.length;if(t===0)return null;for(let s=t-1;s>=0;s-=1){const r=e[s];if(r.isVisible)return r.end}return e[t-1].end}moveTo(...e){return this.appendSegment(Xr.create.call(null,...e))}lineTo(...e){return this.appendSegment(gt.create.call(null,...e))}curveTo(...e){return this.appendSegment(Yt.create.call(null,...e))}arcTo(e,t,s,r,i,o,a){const c=this.end||new M,u=typeof o=="number"?ol(c.x,c.y,e,t,s,r,i,o,a):ol(c.x,c.y,e,t,s,r,i,o.x,o.y);if(u!=null)for(let d=0,f=u.length;d<f;d+=6)this.curveTo(u[d],u[d+1],u[d+2],u[d+3],u[d+4],u[d+5]);return this}quadTo(e,t,s,r){const i=this.end||new M,o=["M",i.x,i.y];if(typeof e=="number")o.push("Q",e,t,s,r);else{const c=t;o.push("Q",e.x,e.y,c.x,c.y)}const a=se.parse(o.join(" "));return this.appendSegment(a.segments.slice(1)),this}close(){return this.appendSegment(qr.create())}drawPoints(e,t={}){const s=Uy(e,t),r=se.parse(s);r&&r.segments&&this.appendSegment(r.segments)}bbox(){const e=this.segments,t=e.length;if(t===0)return null;let s;for(let i=0;i<t;i+=1){const o=e[i];if(o.isVisible){const a=o.bbox();a!=null&&(s=s?s.union(a):a)}}if(s!=null)return s;const r=e[t-1];return new U(r.end.x,r.end.y,0,0)}appendSegment(e){const t=this.segments.length;let s=t!==0?this.segments[t-1]:null,r;const i=null;if(Array.isArray(e))for(let o=0,a=e.length;o<a;o+=1){const c=e[o];r=this.prepareSegment(c,s,i),this.segments.push(r),s=r}else e!=null&&e.isSegment&&(r=this.prepareSegment(e,s,i),this.segments.push(r));return this}insertSegment(e,t){const s=this.segments.length;if(e<0&&(e=s+e+1),e>s||e<0)throw new Error("Index out of range.");let r,i=null,o=null;if(s!==0&&(e>=1?(i=this.segments[e-1],o=i.nextSegment):(i=null,o=this.segments[0])),!Array.isArray(t))r=this.prepareSegment(t,i,o),this.segments.splice(e,0,r);else for(let a=0,c=t.length;a<c;a+=1){const u=t[a];r=this.prepareSegment(u,i,o),this.segments.splice(e+a,0,r),i=r}return this}removeSegment(e){const t=this.fixIndex(e),s=this.segments.splice(t,1)[0],r=s.previousSegment,i=s.nextSegment;return r&&(r.nextSegment=i),i&&(i.previousSegment=r),s.isSubpathStart&&i&&this.updateSubpathStartSegment(i),s}replaceSegment(e,t){const s=this.fixIndex(e);let r;const i=this.segments[s];let o=i.previousSegment;const a=i.nextSegment;let c=i.isSubpathStart;if(!Array.isArray(t))r=this.prepareSegment(t,o,a),this.segments.splice(s,1,r),c&&r.isSubpathStart&&(c=!1);else{this.segments.splice(e,1);for(let u=0,d=t.length;u<d;u+=1){const f=t[u];r=this.prepareSegment(f,o,a),this.segments.splice(e+u,0,r),o=r,c&&r.isSubpathStart&&(c=!1)}}c&&a&&this.updateSubpathStartSegment(a)}getSegment(e){const t=this.fixIndex(e);return this.segments[t]}fixIndex(e){const t=this.segments.length;if(t===0)throw new Error("Path has no segments.");let s=e;for(;s<0;)s=t+s;if(s>=t||s<0)throw new Error("Index out of range.");return s}segmentAt(e,t={}){const s=this.segmentIndexAt(e,t);return s?this.getSegment(s):null}segmentAtLength(e,t={}){const s=this.segmentIndexAtLength(e,t);return s?this.getSegment(s):null}segmentIndexAt(e,t={}){if(this.segments.length===0)return null;const s=Ce.clamp(e,0,1),r=this.getOptions(t),o=this.length(r)*s;return this.segmentIndexAtLength(o,r)}segmentIndexAtLength(e,t={}){const s=this.segments.length;if(s===0)return null;let r=!0;e<0&&(r=!1,e=-e);const i=this.getPrecision(t),o=this.getSubdivisions(t);let a=0,c=null;for(let u=0;u<s;u+=1){const d=r?u:s-1-u,f=this.segments[d],h=o[d],p=f.length({precision:i,subdivisions:h});if(f.isVisible){if(e<=a+p)return d;c=d}a+=p}return c}getSegmentSubdivisions(e={}){const t=this.getPrecision(e),s=[];for(let r=0,i=this.segments.length;r<i;r+=1){const a=this.segments[r].getSubdivisions({precision:t});s.push(a)}return s}updateSubpathStartSegment(e){let t=e.previousSegment,s=e;for(;s&&!s.isSubpathStart;)t!=null?s.subpathStartSegment=t.subpathStartSegment:s.subpathStartSegment=null,t=s,s=s.nextSegment}prepareSegment(e,t,s){e.previousSegment=t,e.nextSegment=s,t!=null&&(t.nextSegment=e),s!=null&&(s.previousSegment=e);let r=e;return e.isSubpathStart&&(e.subpathStartSegment=e,r=s),r!=null&&this.updateSubpathStartSegment(r),e}closestPoint(e,t={}){const s=this.closestPointT(e,t);return s?this.pointAtT(s):null}closestPointLength(e,t={}){const s=this.getOptions(t),r=this.closestPointT(e,s);return r?this.lengthAtT(r,s):0}closestPointNormalizedLength(e,t={}){const s=this.getOptions(t),r=this.closestPointLength(e,s);if(r===0)return 0;const i=this.length(s);return i===0?0:r/i}closestPointT(e,t={}){if(this.segments.length===0)return null;const s=this.getPrecision(t),r=this.getSubdivisions(t);let i,o=1/0;for(let a=0,c=this.segments.length;a<c;a+=1){const u=this.segments[a],d=r[a];if(u.isVisible){const f=u.closestPointT(e,{precision:s,subdivisions:d}),h=u.pointAtT(f),p=Ce.squaredLength(h,e);p<o&&(i={segmentIndex:a,value:f},o=p)}}return i||{segmentIndex:this.segments.length-1,value:1}}closestPointTangent(e,t={}){if(this.segments.length===0)return null;const s=this.getPrecision(t),r=this.getSubdivisions(t);let i,o=1/0;for(let a=0,c=this.segments.length;a<c;a+=1){const u=this.segments[a],d=r[a];if(u.isDifferentiable()){const f=u.closestPointT(e,{precision:s,subdivisions:d}),h=u.pointAtT(f),p=Ce.squaredLength(h,e);p<o&&(i=u.tangentAtT(f),o=p)}}return i||null}containsPoint(e,t={}){const s=this.toPolylines(t);if(!s)return!1;let r=0;for(let i=0,o=s.length;i<o;i+=1)s[i].containsPoint(e)&&(r+=1);return r%2===1}pointAt(e,t={}){if(this.segments.length===0)return null;if(e<=0)return this.start.clone();if(e>=1)return this.end.clone();const s=this.getOptions(t),i=this.length(s)*e;return this.pointAtLength(i,s)}pointAtLength(e,t={}){if(this.segments.length===0)return null;if(e===0)return this.start.clone();let s=!0;e<0&&(s=!1,e=-e);const r=this.getPrecision(t),i=this.getSubdivisions(t);let o,a=0;for(let u=0,d=this.segments.length;u<d;u+=1){const f=s?u:d-1-u,h=this.segments[f],p=i[f],g=h.length({precision:r,subdivisions:p});if(h.isVisible){if(e<=a+g)return h.pointAtLength((s?1:-1)*(e-a),{precision:r,subdivisions:p});o=h}a+=g}return o?s?o.end:o.start:this.segments[this.segments.length-1].end.clone()}pointAtT(e){const t=this.segments,s=t.length;if(s===0)return null;const r=e.segmentIndex;if(r<0)return t[0].pointAtT(0);if(r>=s)return t[s-1].pointAtT(1);const i=Ce.clamp(e.value,0,1);return t[r].pointAtT(i)}divideAt(e,t={}){if(this.segments.length===0)return null;const s=Ce.clamp(e,0,1),r=this.getOptions(t),o=this.length(r)*s;return this.divideAtLength(o,r)}divideAtLength(e,t={}){if(this.segments.length===0)return null;let s=!0;e<0&&(s=!1,e=-e);const r=this.getPrecision(t),i=this.getSubdivisions(t);let o=0,a,c,u,d,f;for(let C=0,E=this.segments.length;C<E;C+=1){const S=s?C:E-1-C,O=this.getSegment(S),A=i[S],V={precision:r,subdivisions:A},T=O.length(V);if(O.isDifferentiable()&&(u=O,d=S,e<=o+T)){c=S,a=O.divideAtLength((s?1:-1)*(e-o),V);break}o+=T}if(!u)return null;a||(c=d,f=s?1:0,a=u.divideAtT(f));const h=this.clone(),p=c;h.replaceSegment(p,a);const g=p;let m=p+1,y=p+2;a[0].isDifferentiable()||(h.removeSegment(g),m-=1,y-=1);const b=h.getSegment(m).start;h.insertSegment(m,se.createSegment("M",b)),y+=1,a[1].isDifferentiable()||(h.removeSegment(y-1),y-=1);const w=y-g-1;for(let C=y,E=h.segments.length;C<E;C+=1){const S=this.getSegment(C-w),O=h.getSegment(C);if(O.type==="Z"&&!S.subpathStartSegment.end.equals(O.subpathStartSegment.end)){const A=se.createSegment("L",S.end);h.replaceSegment(C,A)}}const x=new se(h.segments.slice(0,m)),v=new se(h.segments.slice(m));return[x,v]}intersectsWithLine(e,t={}){const s=this.toPolylines(t);if(s==null)return null;let r=null;for(let i=0,o=s.length;i<o;i+=1){const a=s[i],c=e.intersect(a);c&&(r==null&&(r=[]),Array.isArray(c)?r.push(...c):r.push(c))}return r}isDifferentiable(){for(let e=0,t=this.segments.length;e<t;e+=1)if(this.segments[e].isDifferentiable())return!0;return!1}isValid(){const e=this.segments;return e.length===0||e[0].type==="M"}length(e={}){if(this.segments.length===0)return 0;const t=this.getSubdivisions(e);let s=0;for(let r=0,i=this.segments.length;r<i;r+=1){const o=this.segments[r],a=t[r];s+=o.length({subdivisions:a})}return s}lengthAtT(e,t={}){const s=this.segments.length;if(s===0)return 0;let r=e.segmentIndex;if(r<0)return 0;let i=Ce.clamp(e.value,0,1);r>=s&&(r=s-1,i=1);const o=this.getPrecision(t),a=this.getSubdivisions(t);let c=0;for(let f=0;f<r;f+=1){const h=this.segments[f],p=a[f];c+=h.length({precision:o,subdivisions:p})}const u=this.segments[r],d=a[r];return c+=u.lengthAtT(i,{precision:o,subdivisions:d}),c}tangentAt(e,t={}){if(this.segments.length===0)return null;const s=Ce.clamp(e,0,1),r=this.getOptions(t),o=this.length(r)*s;return this.tangentAtLength(o,r)}tangentAtLength(e,t={}){if(this.segments.length===0)return null;let s=!0;e<0&&(s=!1,e=-e);const r=this.getPrecision(t),i=this.getSubdivisions(t);let o,a=0;for(let c=0,u=this.segments.length;c<u;c+=1){const d=s?c:u-1-c,f=this.segments[d],h=i[d],p=f.length({precision:r,subdivisions:h});if(f.isDifferentiable()){if(e<=a+p)return f.tangentAtLength((s?1:-1)*(e-a),{precision:r,subdivisions:h});o=f}a+=p}if(o){const c=s?1:0;return o.tangentAtT(c)}return null}tangentAtT(e){const t=this.segments.length;if(t===0)return null;const s=e.segmentIndex;if(s<0)return this.segments[0].tangentAtT(0);if(s>=t)return this.segments[t-1].tangentAtT(1);const r=Ce.clamp(e.value,0,1);return this.segments[s].tangentAtT(r)}getPrecision(e={}){return e.precision==null?this.PRECISION:e.precision}getSubdivisions(e={}){if(e.segmentSubdivisions==null){const t=this.getPrecision(e);return this.getSegmentSubdivisions({precision:t})}return e.segmentSubdivisions}getOptions(e={}){const t=this.getPrecision(e),s=this.getSubdivisions(e);return{precision:t,segmentSubdivisions:s}}toPoints(e={}){const t=this.segments,s=t.length;if(s===0)return null;const r=this.getSubdivisions(e),i=[];let o=[];for(let a=0;a<s;a+=1){const c=t[a];if(c.isVisible){const u=r[a];u.length>0?u.forEach(d=>o.push(d.start)):o.push(c.start)}else o.length>0&&(o.push(t[a-1].end),i.push(o),o=[])}return o.length>0&&(o.push(this.end),i.push(o)),i}toPolylines(e={}){const t=this.toPoints(e);return t?t.map(s=>new ze(s)):null}scale(e,t,s){return this.segments.forEach(r=>r.scale(e,t,s)),this}rotate(e,t){return this.segments.forEach(s=>s.rotate(e,t)),this}translate(e,t){return typeof e=="number"?this.segments.forEach(s=>s.translate(e,t)):this.segments.forEach(s=>s.translate(e)),this}clone(){const e=new se;return this.segments.forEach(t=>e.appendSegment(t.clone())),e}equals(e){if(e==null)return!1;const t=this.segments,s=e.segments,r=t.length;if(s.length!==r)return!1;for(let i=0;i<r;i+=1){const o=t[i],a=s[i];if(o.type!==a.type||!o.equals(a))return!1}return!0}toJSON(){return this.segments.map(e=>e.toJSON())}serialize(){if(!this.isValid())throw new Error("Invalid path segments.");return this.segments.map(e=>e.serialize()).join(" ")}toString(){return this.serialize()}}(function(n){function e(t){return t!=null&&t instanceof n}n.isPath=e})(se||(se={})),function(n){function e(s){if(!s)return new n;const r=new n,i=/(?:[a-zA-Z] *)(?:(?:-?\d+(?:\.\d+)?(?:e[-+]?\d+)? *,? *)|(?:-?\.\d+ *,? *))+|(?:[a-zA-Z] *)(?! |\d|-|\.)/g,o=n.normalize(s).match(i);if(o!=null)for(let a=0,c=o.length;a<c;a+=1){const u=o[a],d=/(?:[a-zA-Z])|(?:(?:-?\d+(?:\.\d+)?(?:e[-+]?\d+)?))|(?:(?:-?\.\d+))/g,f=u.match(d);if(f!=null){const h=f[0],p=f.slice(1).map(m=>+m),g=t.call(null,h,...p);r.appendSegment(g)}}return r}n.parse=e;function t(s,...r){if(s==="M")return Xr.create.call(null,...r);if(s==="L")return gt.create.call(null,...r);if(s==="C")return Yt.create.call(null,...r);if(s==="z"||s==="Z")return qr.create();throw new Error(`Invalid path segment type "${s}"`)}n.createSegment=t}(se||(se={})),function(n){n.normalize=_R,n.isValid=ER,n.drawArc=MR,n.drawPoints=Uy,n.arcToCurves=ol}(se||(se={}));class Fe{constructor(e){this.options=Object.assign({},e),this.data=this.options.data||{},this.register=this.register.bind(this),this.unregister=this.unregister.bind(this)}get names(){return Object.keys(this.data)}register(e,t,s=!1){if(typeof e=="object"){Object.entries(e).forEach(([o,a])=>{this.register(o,a,t)});return}this.exist(e)&&!s&&!ms.isApplyingHMR()&&this.onDuplicated(e);const r=this.options.process,i=r?ne(r,this,e,t):t;return this.data[e]=i,i}unregister(e){const t=e?this.data[e]:null;return delete this.data[e],t}get(e){return e?this.data[e]:null}exist(e){return e?this.data[e]!=null:!1}onDuplicated(e){try{throw this.options.onConflict&&ne(this.options.onConflict,this,e),new Error(`${aa(this.options.type)} with name '${e}' already registered.`)}catch(t){throw t}}onNotFound(e,t){throw new Error(this.getSpellingSuggestion(e,t))}getSpellingSuggestion(e,t){const s=this.getSpellingSuggestionForName(e),r=t?`${t} ${NP(this.options.type)}`:this.options.type;return`${aa(r)} with name '${e}' does not exist.${s?` Did you mean '${s}'?`:""}`}getSpellingSuggestionForName(e){return _D(e,Object.keys(this.data),t=>t)}}(function(n){function e(t){return new n(t)}n.create=e})(Fe||(Fe={}));const TR=Object.freeze(Object.defineProperty({__proto__:null,dot:{color:"#aaaaaa",thickness:1,markup:"rect",update(n,e){const t=e.thickness*e.sx,s=e.thickness*e.sy;fe(n,{width:t,height:s,rx:t,ry:s,fill:e.color})}},doubleMesh:[{color:"rgba(224,224,224,1)",thickness:1,markup:"path",update(n,e){let t;const s=e.width,r=e.height,i=e.thickness;s-i>=0&&r-i>=0?t=["M",s,0,"H0 M0 0 V0",r].join(" "):t="M 0 0 0 0",fe(n,{d:t,stroke:e.color,"stroke-width":e.thickness})}},{color:"rgba(224,224,224,0.2)",thickness:3,factor:4,markup:"path",update(n,e){let t;const s=e.factor||1,r=e.width*s,i=e.height*s,o=e.thickness;r-o>=0&&i-o>=0?t=["M",r,0,"H0 M0 0 V0",i].join(" "):t="M 0 0 0 0",e.width=r,e.height=i,fe(n,{d:t,stroke:e.color,"stroke-width":e.thickness})}}],fixedDot:{color:"#aaaaaa",thickness:1,markup:"rect",update(n,e){const t=e.sx<=1?e.thickness*e.sx:e.thickness;fe(n,{width:t,height:t,rx:t,ry:t,fill:e.color})}},mesh:{color:"rgba(224,224,224,1)",thickness:1,markup:"path",update(n,e){let t;const s=e.width,r=e.height,i=e.thickness;s-i>=0&&r-i>=0?t=["M",s,0,"H0 M0 0 V0",r].join(" "):t="M 0 0 0 0",fe(n,{d:t,stroke:e.color,"stroke-width":e.thickness})}}},Symbol.toStringTag,{value:"Module"}));class vs{constructor(){this.patterns={},this.root=oe.create(Qa(),{width:"100%",height:"100%"},[gn("defs")]).node}add(e,t){const s=this.root.childNodes[0];s&&s.appendChild(t),this.patterns[e]=t,oe.create("rect",{width:"100%",height:"100%",fill:`url(#${e})`}).appendTo(this.root)}get(e){return this.patterns[e]}has(e){return this.patterns[e]!=null}}(function(n){n.presets=TR,n.registry=Fe.create({type:"grid"}),n.registry.register(n.presets,!0)})(vs||(vs={}));const Wy=function(n){const e=document.createElement("canvas"),t=n.width,s=n.height;e.width=t*2,e.height=s;const r=e.getContext("2d");return r.drawImage(n,0,0,t,s),r.translate(2*t,0),r.scale(-1,1),r.drawImage(n,0,0,t,s),e},Yy=function(n){const e=document.createElement("canvas"),t=n.width,s=n.height;e.width=t,e.height=s*2;const r=e.getContext("2d");return r.drawImage(n,0,0,t,s),r.translate(0,2*s),r.scale(1,-1),r.drawImage(n,0,0,t,s),e},qy=function(n){const e=document.createElement("canvas"),t=n.width,s=n.height;e.width=2*t,e.height=2*s;const r=e.getContext("2d");return r.drawImage(n,0,0,t,s),r.setTransform(-1,0,0,-1,e.width,e.height),r.drawImage(n,0,0,t,s),r.setTransform(-1,0,0,1,e.width,0),r.drawImage(n,0,0,t,s),r.setTransform(1,0,0,-1,0,e.height),r.drawImage(n,0,0,t,s),e},kR=Object.freeze(Object.defineProperty({__proto__:null,flipX:Wy,flipXY:qy,flipY:Yy,watermark:function(n,e){const t=n.width,s=n.height,r=document.createElement("canvas");r.width=t*3,r.height=s*3;const i=r.getContext("2d"),o=e.angle!=null?-e.angle:-20,a=ye.toRad(o),c=r.width/4,u=r.height/4;for(let d=0;d<4;d+=1)for(let f=0;f<4;f+=1)(d+f)%2>0&&(i.setTransform(1,0,0,1,(2*d-1)*c,(2*f-1)*u),i.rotate(a),i.drawImage(n,-t/2,-s/2,t,s));return r}},Symbol.toStringTag,{value:"Module"}));var uo;(function(n){n.presets=Object.assign({},kR),n.presets["flip-x"]=Wy,n.presets["flip-y"]=Yy,n.presets["flip-xy"]=qy,n.registry=Fe.create({type:"background pattern"}),n.registry.register(n.presets,!0)})(uo||(uo={}));function ld(n,e){return n??e}function ot(n,e){return n!=null&&Number.isFinite(n)?n:e}function VR(n={}){const e=ld(n.color,"blue"),t=ot(n.width,1),s=ot(n.margin,2),r=ot(n.opacity,1),i=s,o=s+t;return`
|
|
@@ -739,4 +739,4 @@ usage: app.provide(ZINDEX_INJECTION_KEY, { current: 0 })`),{initialZIndex:s,curr
|
|
|
739
739
|
font-size: 12px;
|
|
740
740
|
background: 0 0;
|
|
741
741
|
}
|
|
742
|
-
`;var Mj=function(n,e,t,s){var r=arguments.length,i=r<3?e:s===null?s=Object.getOwnPropertyDescriptor(e,t):s,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(n,e,t,s);else for(var a=n.length-1;a>=0;a--)(o=n[a])&&(i=(r<3?o(i):r>3?o(e,t,i):o(e,t))||i);return r>3&&i&&Object.defineProperty(e,t,i),i};class gi extends be{get targetScroller(){return this.options.target.getPlugin("scroller")}get targetGraph(){return this.options.target}get targetModel(){return this.targetGraph.model}constructor(e={}){super(),this.name="stencil",Wr(this.name,Oj),this.graphs={},this.groups={},this.options=Object.assign(Object.assign({},gi.defaultOptions),e),this.init()}init(){this.dnd=new Ts(this.options),this.onSearch=vp(this.onSearch,200),this.initContainer(),this.initSearch(),this.initContent(),this.initGroups(),this.setTitle(),this.startListening()}load(e,t){return Array.isArray(e)?this.loadGroup(e,t):this.options.groups&&Object.keys(this.options.groups).forEach(s=>{e[s]&&this.loadGroup(e[s],s)}),this}unload(e,t){return Array.isArray(e)?this.loadGroup(e,t,!0):this.options.groups&&Object.keys(this.options.groups).forEach(s=>{e[s]&&this.loadGroup(e[s],s,!0)}),this}toggleGroup(e){return this.isGroupCollapsed(e)?this.expandGroup(e):this.collapseGroup(e),this}collapseGroup(e){if(this.isGroupCollapsable(e)){const t=this.groups[e];t&&!this.isGroupCollapsed(e)&&(this.trigger("group:collapse",{name:e}),J(t,"collapsed"))}return this}expandGroup(e){if(this.isGroupCollapsable(e)){const t=this.groups[e];t&&this.isGroupCollapsed(e)&&(this.trigger("group:expand",{name:e}),Re(t,"collapsed"))}return this}isGroupCollapsable(e){const t=this.groups[e];return Pn(t,"collapsable")}isGroupCollapsed(e){const t=this.groups[e];return t&&Pn(t,"collapsed")}collapseGroups(){return Object.keys(this.groups).forEach(e=>this.collapseGroup(e)),this}expandGroups(){return Object.keys(this.groups).forEach(e=>this.expandGroup(e)),this}resizeGroup(e,t){const s=this.graphs[e];return s&&s.resize(t.width,t.height),this}addGroup(e){const t=Array.isArray(e)?e:[e];this.options.groups?this.options.groups.push(...t):this.options.groups=t,t.forEach(s=>this.initGroup(s))}removeGroup(e){const t=Array.isArray(e)?e:[e];this.options.groups&&(this.options.groups=this.options.groups.filter(s=>!t.includes(s.name)),t.forEach(s=>{const r=this.graphs[s];this.unregisterGraphEvents(r),r.dispose(),delete this.graphs[s];const i=this.groups[s];Gt(i),delete this.groups[s]}))}initContainer(){this.container=document.createElement("div"),J(this.container,this.prefixClassName(Mt.base)),fe(this.container,"data-not-found-text",this.options.notFoundText||"No matches found")}initContent(){this.content=document.createElement("div"),J(this.content,this.prefixClassName(Mt.content)),bs(this.content,this.container)}initSearch(){this.options.search&&(J(this.container,"searchable"),Rt(this.container,this.renderSearch()))}initGroup(e){const t=this.options.stencilGraphOptions||{},s=document.createElement("div");J(s,this.prefixClassName(Mt.group)),fe(s,"data-name",e.name),(e.collapsable==null&&this.options.collapsable||e.collapsable!==!1)&&J(s,"collapsable"),pn(s,"collapsed",e.collapsed===!0);const r=document.createElement("h3");J(r,this.prefixClassName(Mt.groupTitle)),r.innerHTML=e.title||e.name;const i=document.createElement("div");J(i,this.prefixClassName(Mt.groupContent));const o=e.graphOptions,a=new $(Object.assign(Object.assign(Object.assign({},t),o),{container:document.createElement("div"),model:t.model||new et,width:e.graphWidth||this.options.stencilGraphWidth,height:e.graphHeight||this.options.stencilGraphHeight,interacting:!1,preventDefaultBlankAction:!1}));this.registerGraphEvents(a),Rt(i,a.container),Rt(s,[r,i]),bs(s,this.content),this.groups[e.name]=s,this.graphs[e.name]=a}initGroups(){if(this.clearGroups(),this.setCollapsableState(),this.options.groups&&this.options.groups.length)this.options.groups.forEach(e=>{this.initGroup(e)});else{const e=this.options.stencilGraphOptions||{},t=new $(Object.assign(Object.assign({},e),{container:document.createElement("div"),model:e.model||new et,width:this.options.stencilGraphWidth,height:this.options.stencilGraphHeight,interacting:!1,preventDefaultBlankAction:!1}));Rt(this.content,t.container),this.graphs[Co.defaultGroupName]=t}}setCollapsableState(){this.options.collapsable=this.options.collapsable&&this.options.groups&&this.options.groups.some(e=>e.collapsable!==!1),this.options.collapsable?(J(this.container,"collapsable"),this.options.groups&&this.options.groups.every(t=>t.collapsed||t.collapsable===!1)?J(this.container,"collapsed"):Re(this.container,"collapsed")):Re(this.container,"collapsable")}setTitle(){const e=document.createElement("div");J(e,this.prefixClassName(Mt.title)),e.innerHTML=this.options.title,bs(e,this.container)}renderSearch(){const e=document.createElement("div");J(e,this.prefixClassName(Mt.search));const t=document.createElement("input");return fe(t,{type:"search",placeholder:this.options.placeholder||"Search"}),J(t,this.prefixClassName(Mt.searchText)),Rt(e,t),e}startListening(){const e=this.prefixClassName(Mt.title),t=this.prefixClassName(Mt.searchText),s=this.prefixClassName(Mt.groupTitle);this.delegateEvents({[`click .${e}`]:"onTitleClick",[`touchstart .${e}`]:"onTitleClick",[`click .${s}`]:"onGroupTitleClick",[`touchstart .${s}`]:"onGroupTitleClick",[`input .${t}`]:"onSearch",[`focusin .${t}`]:"onSearchFocusIn",[`focusout .${t}`]:"onSearchFocusOut"})}stopListening(){this.undelegateEvents()}registerGraphEvents(e){e.on("cell:mousedown",this.onDragStart,this)}unregisterGraphEvents(e){e.off("cell:mousedown",this.onDragStart,this)}loadGroup(e,t,s){const r=this.getModel(t);if(r){const c=e.map(u=>He.isNode(u)?u:He.create(u));s===!0?r.removeCells(c):r.resetCells(c)}const i=this.getGroup(t);let o=this.options.stencilGraphHeight;i&&i.graphHeight!=null&&(o=i.graphHeight);const a=i&&i.layout||this.options.layout;if(a&&r&&ne(a,this,r,i),!o){const c=this.getGraph(t);c.fitToContent({minWidth:c.options.width,gridHeight:1,padding:i&&i.graphPadding||this.options.stencilGraphPadding||10})}return this}onDragStart(e){const{e:t,node:s}=e,r=this.getGroupByNode(s);r&&r.nodeMovable===!1||this.dnd.start(s,t)}filter(e,t){const s=Object.keys(this.graphs).reduce((r,i)=>{const o=this.graphs[i],a=i===Co.defaultGroupName?null:i,c=o.model.getNodes().filter(h=>{let p=!1;typeof t=="function"?p=ne(t,this,h,e,a,this):typeof t=="boolean"?p=t:p=this.isCellMatched(h,e,t,e.toLowerCase()!==e);const g=o.renderer.findViewByCell(h);return g&&pn(g.container,"unmatched",!p),p}),u=c.length>0,d=this.options,f=new et;return f.resetCells(c),d.layout&&ne(d.layout,this,f,this.getGroup(i)),this.groups[i]&&pn(this.groups[i],"unmatched",!u),o.fitToContent({gridWidth:1,gridHeight:1,padding:d.stencilGraphPadding||10}),r||u},!1);pn(this.container,"not-found",!s)}isCellMatched(e,t,s,r){return t&&s?Object.keys(s).some(i=>{if(i==="*"||e.shape===i){const o=s[i];return typeof o=="boolean"?o:(Array.isArray(o)?o:[o]).some(c=>{let u=e.getPropByPath(c);return u!=null?(u=`${u}`,r||(u=u.toLowerCase()),u.indexOf(t)>=0):!1})}return!1}):!0}onSearch(e){this.filter(e.target.value,this.options.search)}onSearchFocusIn(){J(this.container,"is-focused")}onSearchFocusOut(){Re(this.container,"is-focused")}onTitleClick(){this.options.collapsable&&(pn(this.container,"collapsed"),Pn(this.container,"collapsed")?this.collapseGroups():this.expandGroups())}onGroupTitleClick(e){const t=e.target.closest(`.${this.prefixClassName(Mt.group)}`);t&&this.toggleGroup(fe(t,"data-name")||"");const s=Object.keys(this.groups).every(r=>{const i=this.getGroup(r),o=this.groups[r];return i&&i.collapsable===!1||Pn(o,"collapsed")});pn(this.container,"collapsed",s)}getModel(e){const t=this.getGraph(e);return t?t.model:null}getGraph(e){return this.graphs[e||Co.defaultGroupName]}getGroup(e){const t=this.options.groups;return e!=null&&t&&t.length?t.find(s=>s.name===e):null}getGroupByNode(e){const t=this.options.groups;return t?t.find(s=>{const r=this.getModel(s.name);return r?r.has(e.id):!1}):null}clearGroups(){Object.keys(this.graphs).forEach(e=>{const t=this.graphs[e];this.unregisterGraphEvents(t),t.dispose()}),Object.keys(this.groups).forEach(e=>{const t=this.groups[e];Gt(t)}),this.graphs={},this.groups={}}onRemove(){this.clearGroups(),this.dnd.remove(),this.stopListening(),this.undelegateDocumentEvents()}dispose(){this.remove(),Yr(this.name)}}Mj([be.dispose()],gi.prototype,"dispose",null),function(n){n.defaultOptions=Object.assign({stencilGraphWidth:200,stencilGraphHeight:800,title:"Stencil",collapsable:!1,placeholder:"Search",notFoundText:"No matches found",layout(e,t){const s={columnWidth:this.options.stencilGraphWidth/2-10,columns:2,rowHeight:80,resizeToFit:!1,dx:10,dy:10};Ej(e,Object.assign(Object.assign(Object.assign({},s),this.options.layoutOptions),t?t.layoutOptions:{}))}},Ts.defaults)}(gi||(gi={}));var Mt;(function(n){n.base="widget-stencil",n.title=`${n.base}-title`,n.search=`${n.base}-search`,n.searchText=`${n.search}-text`,n.content=`${n.base}-content`,n.group=`${n.base}-group`,n.groupTitle=`${n.group}-title`,n.groupContent=`${n.group}-content`})(Mt||(Mt={}));var Co;(function(n){n.defaultGroupName="__default__"})(Co||(Co={})),$.prototype.toSVG=function(n,e){const t=this.getPlugin("export");t&&t.toSVG(n,e)},$.prototype.toPNG=function(n,e){const t=this.getPlugin("export");t&&t.toPNG(n,e)},$.prototype.toJPEG=function(n,e){const t=this.getPlugin("export");t&&t.toJPEG(n,e)},$.prototype.exportPNG=function(n,e){const t=this.getPlugin("export");t&&t.exportPNG(n,e)},$.prototype.exportJPEG=function(n,e){const t=this.getPlugin("export");t&&t.exportJPEG(n,e)},$.prototype.exportSVG=function(n,e){const t=this.getPlugin("export");t&&t.exportSVG(n,e)};var Pj=function(n,e,t,s){var r=arguments.length,i=r<3?e:s===null?s=Object.getOwnPropertyDescriptor(e,t):s,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(n,e,t,s);else for(var a=n.length-1;a>=0;a--)(o=n[a])&&(i=(r<3?o(i):r>3?o(e,t,i):o(e,t))||i);return r>3&&i&&Object.defineProperty(e,t,i),i};class g0 extends ke{constructor(){super(),this.name="export"}get view(){return this.graph.view}init(e){this.graph=e}exportPNG(e="chart",t={}){this.toPNG(s=>{Ks.downloadDataUri(s,e)},t)}exportJPEG(e="chart",t={}){this.toPNG(s=>{Ks.downloadDataUri(s,e)},t)}exportSVG(e="chart",t={}){this.toSVG(s=>{Ks.downloadDataUri(Ks.svgToDataUrl(s),e)},t)}toSVG(e,t={}){this.notify("before:export",t);const s=this.view.svg,r=oe.create(s).clone();let i=r.node;const o=r.findOne(`.${this.view.prefixClassName("graph-svg-stage")}`),a=t.viewBox||this.graph.graphToLocal(this.graph.getContentBBox()),c=t.preserveDimensions;if(c){const f=typeof c=="boolean"?a:c;r.attr({width:f.width,height:f.height})}if(r.removeAttribute("style").attr("viewBox",[a.x,a.y,a.width,a.height].join(" ")),o.removeAttribute("transform"),t.copyStyles!==!1){const f=s.ownerDocument,h=Array.from(s.querySelectorAll("*")),p=Array.from(i.querySelectorAll("*")),g=f.styleSheets.length,m=[];for(let w=g-1;w>=0;w-=1)m[w]=f.styleSheets[w],f.styleSheets[w].disabled=!0;const y={};h.forEach((w,x)=>{const v=window.getComputedStyle(w,null),C={};Object.keys(v).forEach(E=>{C[E]=v.getPropertyValue(E)}),y[x]=C}),g!==f.styleSheets.length&&m.forEach((w,x)=>{f.styleSheets[x]=w});for(let w=0;w<g;w+=1)f.styleSheets[w].disabled=!1;const b={};h.forEach((w,x)=>{const v=window.getComputedStyle(w,null),C=y[x],E={};Object.keys(v).forEach(S=>{!Lc(S)&&v.getPropertyValue(S)!==C[S]&&(E[S]=v.getPropertyValue(S))}),b[x]=E}),p.forEach((w,x)=>{Xe(w,b[x])})}const u=t.stylesheet;if(typeof u=="string"){const f=s.ownerDocument.implementation.createDocument(null,"xml",null).createCDATASection(u);r.prepend(oe.create("style",{type:"text/css"},[f]))}const d=()=>{const f=t.beforeSerialize;if(typeof f=="function"){const p=ne(f,this.graph,i);p instanceof SVGSVGElement&&(i=p)}const h=new XMLSerializer().serializeToString(i).replace(/ /g," ");this.notify("after:export",t),e(h)};if(t.serializeImages){const f=r.find("image").map(h=>new Promise(p=>{const g=h.attr("xlink:href")||h.attr("href");Ks.imageToDataUri(g,(m,y)=>{!m&&y&&h.attr("xlink:href",y),p()})}));Promise.all(f).then(d)}else d()}toDataURL(e,t){let s=t.viewBox||this.graph.getContentBBox();const r=gs(t.padding);t.width&&t.height&&(r.left+r.right>=t.width&&(r.left=r.right=0),r.top+r.bottom>=t.height&&(r.top=r.bottom=0));const i=new U(-r.left,-r.top,r.left+r.right,r.top+r.bottom);if(t.width&&t.height){const d=s.width+r.left+r.right,f=s.height+r.top+r.bottom;i.scale(d/t.width,f/t.height)}s=U.create(s).moveAndExpand(i);const o=typeof t.width=="number"&&typeof t.height=="number"?{width:t.width,height:t.height}:s;let a=t.ratio?parseFloat(t.ratio):1;(!Number.isFinite(a)||a===0)&&(a=1);const c={width:Math.max(Math.round(o.width*a),1),height:Math.max(Math.round(o.height*a),1)};{const d=document.createElement("canvas"),f=d.getContext("2d");d.width=c.width,d.height=c.height;const h=c.width-1,p=c.height-1;f.fillStyle="rgb(1,1,1)",f.fillRect(h,p,1,1);const g=f.getImageData(h,p,1,1).data;if(g[0]!==1||g[1]!==1||g[2]!==1)throw new Error("size exceeded")}const u=new Image;u.onload=()=>{const d=document.createElement("canvas");d.width=c.width,d.height=c.height;const f=d.getContext("2d");f.fillStyle=t.backgroundColor||"white",f.fillRect(0,0,c.width,c.height);try{f.drawImage(u,0,0,c.width,c.height);const h=d.toDataURL(t.type,t.quality);e(h)}catch{}},this.toSVG(d=>{u.src=`data:image/svg+xml,${encodeURIComponent(d)}`},Object.assign(Object.assign({},t),{viewBox:s,serializeImages:!0,preserveDimensions:Object.assign({},c)}))}toPNG(e,t={}){this.toDataURL(e,Object.assign(Object.assign({},t),{type:"image/png"}))}toJPEG(e,t={}){this.toDataURL(e,Object.assign(Object.assign({},t),{type:"image/jpeg"}))}notify(e,t){this.trigger(e,t),this.graph.trigger(e,t)}dispose(){this.off()}}Pj([ke.dispose()],g0.prototype,"dispose",null);const Nj={class:"control-box"},Aj=Dt({__name:"index",props:{payload:Object},setup(n){const e=n,t=l.ref("3"),s=l.ref([]),r=()=>{s.value=JSON.parse(JSON.stringify(e.payload.getPorts().map(u=>({id:u.id,attrs:u.attrs,args:{x:Number(u.args.x.replace("%","")),y:Number(u.args.y.replace("%",""))}}))))},i=()=>{const u=Du;u.attrs.text.text=`${e.payload.getPorts().length+1}`,u.args.x="50%",u.args.y="50%",e.payload.addPorts([{group:"ports",...u}]),r()},o=()=>{$r("#drawing-board",!0)},a=(u,d,f)=>{e.payload.portProp(u,"args/"+d,f+"%"),r()},c=u=>{e.payload.removePort(u),r()};return l.onMounted(()=>{r()}),(u,d)=>{const f=l.resolveComponent("el-button"),h=l.resolveComponent("el-table-column"),p=l.resolveComponent("el-slider"),g=l.resolveComponent("el-icon"),m=l.resolveComponent("el-table"),y=l.resolveComponent("el-collapse-item"),b=l.resolveComponent("el-collapse");return l.openBlock(),l.createElementBlock("div",Nj,[l.createVNode(b,{modelValue:t.value,"onUpdate:modelValue":d[0]||(d[0]=w=>t.value=w),accordion:""},{default:l.withCtx(()=>[l.createVNode(y,{title:"连接桩设置",name:"3"},{default:l.withCtx(()=>[l.createVNode(f,{type:"primary",onClick:i,size:"small"},{default:l.withCtx(()=>d[1]||(d[1]=[l.createTextVNode("添加连接桩")])),_:1}),l.createVNode(f,{type:"primary",onClick:o,size:"small"},{default:l.withCtx(()=>d[2]||(d[2]=[l.createTextVNode("显示连接桩")])),_:1}),l.createVNode(m,{data:s.value,border:"",size:"small",style:{"margin-top":"10px"}},{default:l.withCtx(()=>[l.createVNode(h,{label:"ID",width:"50",align:"center"},{default:l.withCtx(({row:w})=>[l.createTextVNode(l.toDisplayString(w.attrs.text.text),1)]),_:1}),l.createVNode(h,{label:"x",width:"100",align:"center"},{default:l.withCtx(({row:w})=>[l.createVNode(p,{modelValue:w.args.x,"onUpdate:modelValue":x=>w.args.x=x,min:0,max:100,step:1,onInput:x=>a(w.id,"x",x)},null,8,["modelValue","onUpdate:modelValue","onInput"])]),_:1}),l.createVNode(h,{label:"y",width:"100",align:"center"},{default:l.withCtx(({row:w})=>[l.createVNode(p,{modelValue:w.args.y,"onUpdate:modelValue":x=>w.args.y=x,min:0,max:100,step:1,onInput:x=>a(w.id,"y",x)},null,8,["modelValue","onUpdate:modelValue","onInput"])]),_:1}),l.createVNode(h,{label:"操作",width:"70",align:"center"},{default:l.withCtx(({row:w})=>[l.createVNode(f,{type:"danger",size:"small",onClick:x=>c(w.id)},{default:l.withCtx(()=>[l.createVNode(g,null,{default:l.withCtx(()=>[l.createVNode(l.unref(Jm))]),_:1})]),_:2},1032,["onClick"])]),_:1})]),_:1},8,["data"])]),_:1})]),_:1},8,["modelValue"])])}}},[["__scopeId","data-v-b280098c"]]),m0=[{shape:"rect",width:60,height:5,attrs:{body:{fill:"#ffffff",stroke:"#ffffff",strokeWidth:0}},data:{type:"base-shape"}},{shape:"rect",width:60,height:20,attrs:{body:{fill:"#ffffff",stroke:"#ffffff",strokeWidth:1}},data:{type:"base-shape",label:"母线"}},{shape:"circle",width:40,height:40,attrs:{body:{fill:"#ffffff",stroke:"#ffffff",strokeWidth:1}},data:{type:"base-shape"}},{shape:"ellipse",width:60,height:40,attrs:{body:{fill:"#ffffff",stroke:"#ffffff"}},data:{type:"base-shape"}}],y0={groups:{ports:{position:"absolute",args:{x:0,y:0},attrs:{circle:{magnet:!0,stroke:"#8f8f8f",r:4}},label:{position:"top"}}}},_j={style:{width:"100%",height:"100%",position:"relative"}},Tj={key:0,class:"spinner"},_d=Object.assign({name:"wiring-diagram-preview"},{__name:"index",props:{id:{type:String,default:""},background:{type:Object,default:()=>({})},grid:{type:Object,default:()=>({})},data:{type:Object,default:()=>({})}},setup(n){const e=n,t=l.ref(),s=()=>{window.__x6_instances__=[];const C=document.getElementById("preview-container");t.value=new $({container:C,autoResize:!0,panning:!0,mousewheel:!0,connecting:{router:"orth",connectionPoint:{name:"anchor"},anchor:"center"},interacting:{nodeMovable:!1,magnetConnectable:!1,edgeMovable:!1,edgeLabelMovable:!1,arrowheadMovable:!1,vertexMovable:!1,vertexAddable:!1,vertexDeletable:!1}}),window.__x6_instances__.push(C),t.value.on("blank:dblclick",()=>{h()}),t.value.on("render:done",()=>{$r("#preview-container",!1),w()})},r=async()=>{let C,E,S;if(e.id){const O=await Wm(e.id);C=(O==null?void 0:O.background)||qa,E=(O==null?void 0:O.grid)||Xa,S=(O==null?void 0:O.dt)||{cells:[]}}else C=e.background,E={},S=e.data;t.value.drawBackground(C),t.value.drawGrid(E),t.value.fromJSON(S),d()},i=l.ref(null),o=l.ref([]),a=l.ref([]),c=l.ref(!1),u=l.ref(!1),d=()=>{o.value=t.value.getCells().filter(C=>{var E,S,O;return((E=C==null?void 0:C.data)==null?void 0:E.type)==="text"||((S=C==null?void 0:C.data)==null?void 0:S.type)==="pipe"||((O=C==null?void 0:C.data)==null?void 0:O.type)==="arrow"}),o.value.forEach(C=>{var E,S;(S=(E=C==null?void 0:C.data)==null?void 0:E.fields)!=null&&S.length&&a.value.push({id:C==null?void 0:C.id,fields:C==null?void 0:C.data.fields})}),h()},f=l.ref(!0),h=async()=>{if(u.value=!0,!a.value.length){u.value=!1;return}if(!f.value){Ye.warning("数据正在更新中,请稍后再试");return}i.value&&clearInterval(i.value),f.value=!1,console.log("字段数据",a.value),await p(a.value),!c.value&&(i.value=setTimeout(()=>{h()},1e4))},p=async(C,E=0)=>{let S=5;if(!c.value)if(C.length>E*S){const O=C.slice(E*S,E*S+S);console.log("批次:",E,"数据:",O),E++,g(await oD(O)),await p(C,E)}else u.value=!1,f.value=!0},g=C=>{C==null||C.forEach(E=>{var O,A,V;const S=t.value.getCellById(E.id);S.data.type==="text"&&(S.label=m(S.data.content,E.fields)),S.data.type==="pipe"&&(console.log("管道详情",S,(O=E.fields)==null?void 0:O[0].value),y(S,(A=E.fields)==null?void 0:A[0].value)),S.data.type==="arrow"&&b(S,(V=E.fields)==null?void 0:V[0].value)})},m=(C,E)=>{let S=0;return C.replace(Nl,()=>{const O=E.find(A=>A.index===S);return S++,O?O.value:d0})},y=(C,E)=>{if(!C.data.isCondition)return!1;for(let S=0;S<C.data.condition.length;S++)if(Number(E)>C.data.condition[S].min&&Number(E)<=C.data.condition[S].max)return C.attr("line2/style/animation",u0(C.data.condition[S].direction)),!1},b=(C,E)=>{if(console.log(C,E),!C.data.isCondition)return!1;for(let S=0;S<C.data.condition.length;S++)if(Number(E)>C.data.condition[S].min&&Number(E)<=C.data.condition[S].max)return C.attr("arrow/style/animation",C.data.condition[S].animation===or?"flashing 2s infinite linear":""),C.attr("arrow/d",C.data.condition[S].direction===pi?Ka:qm),C.attr("arrow/display",C.data.condition[S].display),!1},w=()=>{t.value.zoomToFit({maxScale:1.4,padding:20})},x=l.shallowRef(),v=()=>{new ResizeObserver(()=>{w()}).observe(x.value)};return l.onMounted(()=>{c.value=!1,s(),r(),v()}),l.onUnmounted(()=>{c.value=!0,clearInterval(i.value)}),(C,E)=>(l.openBlock(),l.createElementBlock("div",_j,[l.createElementVNode("div",{id:"preview-container",ref_key:"previewRef",ref:x,onDblclick:w},null,544),u.value?(l.openBlock(),l.createElementBlock("div",Tj,E[0]||(E[0]=[l.createElementVNode("div",{class:"spinner1"},null,-1)]))):l.createCommentVNode("",!0)]))}}),kj={class:"form-container"},Vj={class:"footer"},Dj=Dt({__name:"group-form",props:{payload:{type:Object,default:()=>({})}},emits:["close"],setup(n,{emit:e}){const t=n,s=e,r=l.reactive({groupName:"",sort:1,isShow:1}),i=l.reactive({groupName:[{required:!0,message:"请输入分组名称",trigger:"blur"},{min:1,max:20,message:"长度在 1 到 20 个字符",trigger:"blur"}],sort:[{required:!0,message:"请输入排序",trigger:"blur"},{type:"number",message:"排序必须为数字值"}],isShow:[{required:!0,message:"请选择是否显示",trigger:"change"}]}),o=l.ref(),a=()=>{console.log(r),o.value.validate(u=>{if(u)r.id?Ya("/custom/updateGroup",r).then(d=>{d!=null&&d.isOk?(Ye.success("保存成功"),s("close",!0)):Ye.error((d==null?void 0:d.msg)||"保存失败")}):Ya("/custom/saveGroup",r).then(d=>{d!=null&&d.isOk?(Ye.success("保存成功"),s("close",!0)):Ye.error((d==null?void 0:d.msg)||"保存失败")});else return!1})},c=()=>{s("close",!1)};return l.onMounted(()=>{var u;(u=t.payload)!=null&&u.id&&(r.id=t.payload.id,r.groupName=t.payload.groupName,r.sort=t.payload.sort,r.isShow=t.payload.isShow)}),(u,d)=>{const f=l.resolveComponent("el-input"),h=l.resolveComponent("el-form-item"),p=l.resolveComponent("el-input-number"),g=l.resolveComponent("el-switch"),m=l.resolveComponent("el-button"),y=l.resolveComponent("el-form");return l.openBlock(),l.createElementBlock("div",kj,[l.createVNode(y,{ref_key:"form",ref:o,model:r,rules:i,"label-width":"90px","label-suffix":":"},{default:l.withCtx(()=>[l.createVNode(h,{label:"分组名称",prop:"groupName"},{default:l.withCtx(()=>[l.createVNode(f,{modelValue:r.groupName,"onUpdate:modelValue":d[0]||(d[0]=b=>r.groupName=b),placeholder:"请输入分组名称",clearable:""},null,8,["modelValue"])]),_:1}),l.createVNode(h,{label:"排序",prop:"sort"},{default:l.withCtx(()=>[l.createVNode(p,{modelValue:r.sort,"onUpdate:modelValue":d[1]||(d[1]=b=>r.sort=b),min:0,max:999,step:1,"controls-position":"right"},null,8,["modelValue"])]),_:1}),l.createVNode(h,{label:"是否显示",prop:"isShow"},{default:l.withCtx(()=>[l.createVNode(g,{modelValue:r.isShow,"onUpdate:modelValue":d[2]||(d[2]=b=>r.isShow=b),"active-value":1,"inactive-value":0,"active-color":"#13ce66","inactive-color":"#ff4949"},null,8,["modelValue"])]),_:1}),l.createElementVNode("div",Vj,[l.createVNode(m,{type:"primary",onClick:a},{default:l.withCtx(()=>d[3]||(d[3]=[l.createTextVNode("保存")])),_:1}),l.createVNode(m,{onClick:c},{default:l.withCtx(()=>d[4]||(d[4]=[l.createTextVNode("取消")])),_:1})])]),_:1},8,["model","rules"])])}}},[["__scopeId","data-v-807a2ed3"]]),Rj={class:"form-container"},Lj={class:"footer"},Ij=Dt({__name:"image-form",props:{payload:{type:Object,default:()=>({})}},emits:["close"],setup(n,{emit:e}){const t=e,s=n,r=l.shallowRef(null),i=l.reactive({groupId:"",id:"",imageName:"",sort:0,isShow:1,imageUrl:""}),o={imageName:[{required:!0,message:"请输入图片名称",trigger:"blur"},{min:1,max:20,message:"长度在 1 到 20 个字符",trigger:"blur"}],sort:[{required:!0,message:"请输入排序",trigger:"blur"},{type:"number",message:"排序必须为数字值"}]},a=l.ref(""),c=f=>{if(f.raw.type.indexOf("image")===-1){Ye.error("请上传图片格式的文件");return}const h=new FormData;h.append("file",f.raw),iD("/file/fileUpload",h).then(p=>{p!=null&&p.isOk?Se.isSunOs?(a.value=p==null?void 0:p.data,i.imageUrl=p==null?void 0:p.data):(a.value=Yn.defaults.baseURL+"/upload/"+(p==null?void 0:p.data),i.imageUrl=p==null?void 0:p.data):Ye.error((p==null?void 0:p.msg)||"上传失败")})},u=()=>{console.log(i),r.value.validate(f=>{if(f)Ya("/custom/savePicture",i).then(h=>{h!=null&&h.isOk?(Ye.success("保存成功"),t("close",!0)):Ye.error((h==null?void 0:h.msg)||"保存失败")});else return!1})},d=()=>{t("close",!1)};return l.onMounted(()=>{var f;(f=s.payload)!=null&&f.id&&(i.id=s.payload.id,i.imageName=s.payload.imageName,i.sort=s.payload.sort,i.isShow=s.payload.isShow,i.imageUrl=Ad(s.payload.imageUrl),a.value=i.imageUrl),i.groupId=s.payload.groupId}),(f,h)=>{const p=l.resolveComponent("el-input"),g=l.resolveComponent("el-form-item"),m=l.resolveComponent("el-input-number"),y=l.resolveComponent("el-switch"),b=l.resolveComponent("el-image"),w=l.resolveComponent("el-icon"),x=l.resolveComponent("el-upload"),v=l.resolveComponent("el-button"),C=l.resolveComponent("el-form");return l.openBlock(),l.createElementBlock("div",Rj,[l.createVNode(C,{ref_key:"form",ref:r,model:i,rules:o,"label-width":"90px","label-suffix":":"},{default:l.withCtx(()=>[l.createVNode(g,{label:"图片名称",prop:"imageName"},{default:l.withCtx(()=>[l.createVNode(p,{modelValue:i.imageName,"onUpdate:modelValue":h[0]||(h[0]=E=>i.imageName=E),placeholder:"请输入图片名称"},null,8,["modelValue"])]),_:1}),l.createVNode(g,{label:"排序",prop:"sort"},{default:l.withCtx(()=>[l.createVNode(m,{modelValue:i.sort,"onUpdate:modelValue":h[1]||(h[1]=E=>i.sort=E),min:0,max:999,step:1,"controls-position":"right"},null,8,["modelValue"])]),_:1}),l.createVNode(g,{label:"是否显示",prop:"isShow"},{default:l.withCtx(()=>[l.createVNode(y,{modelValue:i.isShow,"onUpdate:modelValue":h[2]||(h[2]=E=>i.isShow=E),"active-value":1,"inactive-value":0,"active-color":"#13ce66","inactive-color":"#ff4949"},null,8,["modelValue"])]),_:1}),l.createVNode(g,{label:"上传",prop:"image"},{default:l.withCtx(()=>[l.createVNode(x,{action:"","list-type":"picture",class:"avatar-uploader","show-file-list":!1,"on-change":c,"auto-upload":!1},{default:l.withCtx(()=>[a.value?(l.openBlock(),l.createBlock(b,{key:0,src:a.value,fit:"cover",style:{width:"64px",height:"64px"}},null,8,["src"])):(l.openBlock(),l.createBlock(w,{key:1,class:"avatar-uploader-icon"},{default:l.withCtx(()=>[l.createVNode(l.unref(bD))]),_:1}))]),_:1})]),_:1}),l.createElementVNode("div",Lj,[l.createVNode(v,{type:"primary",onClick:u},{default:l.withCtx(()=>h[3]||(h[3]=[l.createTextVNode("保存")])),_:1}),l.createVNode(v,{onClick:d},{default:l.withCtx(()=>h[4]||(h[4]=[l.createTextVNode("取消")])),_:1})])]),_:1},8,["model"])])}}},[["__scopeId","data-v-4e42911d"]]),Bj={class:"form-container"},jj={style:{padding:"0 10px",display:"flex","flex-direction":"column",gap:"5px","align-items":"flex-start"}},$j=["src"],zj=Dt({__name:"image-management",setup(n){const e=l.reactive({items:[]}),t=()=>{Js("/custom/groupList").then(h=>{e.items=h.data})},s=l.reactive({show:!1,title:"新增图片分组",payload:null}),r=()=>{s.show=!0,s.title="新增图片分组",s.payload=null},i=h=>{s.show=!0,s.title="编辑图片分组",s.payload={id:h.id,groupName:h.groupName,sort:h.sort,isShow:h.isShow}},o=h=>{(Se.isSunOs?Js:Gm)("/custom/removeGroup/"+h).then(g=>{g.code===200?(Ye.success("删除成功"),t()):Ye.error(g.msg||"删除失败")})},a=l.reactive({show:!1,title:"新增图片",payload:null}),c=h=>{a.show=!0,a.title="新增图片",a.payload={groupId:h}},u=h=>{a.show=!0,a.title="编辑图片",a.payload={id:h.id,groupId:h.groupId,imageName:h.imageName,sort:h.sort,isShow:h.isShow,imageUrl:h.imageUrl}},d=h=>{(Se.isSunOs?Js:Gm)("/custom/removePicture/"+h).then(g=>{g.code===200?(Ye.success("删除成功"),t()):Ye.error(g.msg||"删除失败")})},f=h=>{s.show=!1,a.show=!1,h&&t()};return l.onMounted(()=>{t()}),(h,p)=>{const g=l.resolveComponent("el-button"),m=l.resolveComponent("el-table-column"),y=l.resolveComponent("el-table"),b=l.resolveComponent("el-dialog");return l.openBlock(),l.createElementBlock("div",Bj,[l.createVNode(g,{type:"primary",onClick:r,size:"small"},{default:l.withCtx(()=>p[2]||(p[2]=[l.createTextVNode("新增图片分组")])),_:1}),l.createVNode(y,{data:e.items,border:"",height:"500"},{default:l.withCtx(()=>[l.createVNode(m,{type:"expand"},{default:l.withCtx(w=>[l.createElementVNode("div",jj,[l.createVNode(g,{type:"primary",size:"small",onClick:x=>c(w.row.id)},{default:l.withCtx(()=>p[3]||(p[3]=[l.createTextVNode("新增图片")])),_:2},1032,["onClick"]),l.createVNode(y,{data:w.row.pictureList,border:"",size:"small"},{default:l.withCtx(()=>[l.createVNode(m,{label:"名称",prop:"imageName",align:"center"}),l.createVNode(m,{label:"图片",prop:"imageUrl",align:"center"},{default:l.withCtx(x=>[l.createElementVNode("img",{src:l.unref(Se.isSunOs)?x.row.imageUrl:l.unref(Ad)(x.row.imageUrl),alt:"",style:{width:"64px",height:"64px"}},null,8,$j)]),_:1}),l.createVNode(m,{label:"排序",prop:"sort",align:"center"}),l.createVNode(m,{label:"是否显示",prop:"isShow",align:"center"},{default:l.withCtx(x=>[l.createTextVNode(l.toDisplayString(x.row.isShow===1?"是":"否"),1)]),_:1}),l.createVNode(m,{label:"操作",align:"center"},{default:l.withCtx(x=>[l.createVNode(g,{type:"primary",size:"small",onClick:v=>u(x.row)},{default:l.withCtx(()=>p[4]||(p[4]=[l.createTextVNode("编辑 ")])),_:2},1032,["onClick"]),l.createVNode(g,{type:"danger",size:"small",onClick:v=>d(x.row.id)},{default:l.withCtx(()=>p[5]||(p[5]=[l.createTextVNode("删除 ")])),_:2},1032,["onClick"])]),_:1})]),_:2},1032,["data"])])]),_:1}),l.createVNode(m,{label:"分组名称",prop:"groupName",align:"center"}),l.createVNode(m,{label:"排序",prop:"sort",align:"center"}),l.createVNode(m,{label:"是否显示",prop:"isShow",align:"center"},{default:l.withCtx(w=>[l.createTextVNode(l.toDisplayString(w.row.isShow===1?"是":"否"),1)]),_:1}),l.createVNode(m,{label:"操作",align:"center"},{default:l.withCtx(w=>[l.createVNode(g,{type:"primary",size:"small",onClick:x=>i(w.row)},{default:l.withCtx(()=>p[6]||(p[6]=[l.createTextVNode("编辑")])),_:2},1032,["onClick"]),l.createVNode(g,{type:"danger",size:"small",onClick:x=>o(w.row.id)},{default:l.withCtx(()=>p[7]||(p[7]=[l.createTextVNode("删除")])),_:2},1032,["onClick"])]),_:1})]),_:1},8,["data"]),l.createVNode(b,{modelValue:s.show,"onUpdate:modelValue":p[0]||(p[0]=w=>s.show=w),title:s.title,width:"300","close-on-click-modal":!1,"close-on-press-escape":!1},{default:l.withCtx(()=>[s.show?(l.openBlock(),l.createBlock(Dj,{key:0,payload:s.payload,onClose:f},null,8,["payload"])):l.createCommentVNode("",!0)]),_:1},8,["modelValue","title"]),l.createVNode(b,{modelValue:a.show,"onUpdate:modelValue":p[1]||(p[1]=w=>a.show=w),title:a.title,width:"300","close-on-click-modal":!1,"close-on-press-escape":!1},{default:l.withCtx(()=>[a.show?(l.openBlock(),l.createBlock(Ij,{key:0,payload:a.payload,onClose:f},null,8,["payload"])):l.createCommentVNode("",!0)]),_:1},8,["modelValue","title"])])}}},[["__scopeId","data-v-721437e3"]]),Fj={class:"page-container"},Uj={class:"tool-bar"},Hj={class:"action"},Gj={class:"el-dropdown-link"},Wj={class:"action",style:{"margin-right":"50px"}},Yj={class:"board"},qj={class:"drawing-board-box"},Xj={id:"controls"},Jj={key:0,class:"controls-label"},Kj={style:{width:"100%",height:"100%",background:"black"}},b0=Dt(Object.assign({name:"editor"},{__name:"index",props:{id:{type:String,default:""},itemId:{type:String,default:""}},emits:["getJson"],setup(n,{emit:e}){const t=n,s=l.ref(),r=l.reactive({label:"",component:l.shallowRef(null)}),i=l.ref(null),o=l.ref(null),a=()=>{window.__x6_instances__=[];const I=document.getElementById("drawing-board");s.value=new $({container:I,autoResize:!0,panning:!0,mousewheel:!0,connecting:{snap:!0,allowEdge:!0,highlight:!0,router:"orth",connectionPoint:{name:"anchor"},anchor:"center",createEdge(){return s.value.createEdge({inherit:"edge",...Qe,data:{type:c0()},zIndex:0})}}}),window.__x6_instances__.push(s.value),s.value.use(L3()),s.value.use(I3()),s.value.use(B3()),s.value.use(j3()),s.value.use(z3()),s.value.use(F3()),s.value.bindKey(["delete","backspace"],()=>{U3(s.value)}),s.value.bindKey(["ctrl+c","cmd + c"],()=>{H3(s.value)}),s.value.bindKey(["ctrl+v","cmd + v"],()=>{G3(s.value)}),s.value.bindKey(["ctrl+z","cmd + z"],()=>{W3(s.value)}),s.value.bindKey(["ctrl+y","cmd + y"],()=>{Y3(s.value)});let B=null;s.value.on("edge:click",({cell:N})=>{o.value=N,r.component=p0,r.label="线段属性",i.value=Nd()}),s.value.on("edge:mouseenter",({cell:N})=>{clearTimeout(B),N.toFront(),q3(N)}),s.value.on("edge:mouseleave",({cell:N})=>{B=setTimeout(()=>{N.toBack(),N.removeTools()},300)}),s.value.on("node:mouseenter",()=>{$r("#drawing-board",!0)}),s.value.on("node:mouseleave",()=>{$r("#drawing-board",!1)}),s.value.use(new g0),s.value.on("blank:click",({e:N,x:P,y:k})=>{o.value=s,r.component=dD,r.label="画布属性",i.value=Nd()}),s.value.on("cell:click",({cell:N})=>{var P,k;if(o.value=N,i.value=Nd(),((P=N.data)==null?void 0:P.type)==="text"){r.component=h0,r.label="文本属性";return}if(((k=N.data)==null?void 0:k.type)==="base-shape"){r.component=h0,r.label="基础图形属性";return}if((N==null?void 0:N.shape)==="edge"){r.component=p0,r.label="连线属性";return}if((N==null?void 0:N.shape)==="image"){r.component=Aj,r.label="图片属性";return}r.component=null,r.label=null}),s.value.on("render:done",()=>{$r("#drawing-board",!1),g()})},c=l.ref(),u=()=>{c.value=new gi({target:s.value,...aD,groups:[{name:"基础组件",graphPadding:30}],search(N,P){var k;return((k=N.label)==null?void 0:k.indexOf(P))!==-1},placeholder:"搜索",notFoundText:"未找到匹配项",getDragNode:N=>{const P=N.clone({keepId:!0});return P.label!=="文本"&&(P.label=""),P}});const I=s.value.createNode({...lD}),B=m0.map(N=>(N.ports=y0,s.value.createNode(N)));c.value.load([I,...B],"基础组件"),Js("/custom/groupList").then(N=>{const P=(N==null?void 0:N.data)||[];P==null||P.forEach(k=>{c.value.addGroup({name:k==null?void 0:k.groupName,graphPadding:30});const j=k==null?void 0:k.pictureList.map(H=>{const K={shape:"image",imageUrl:Se.isSunOs?H==null?void 0:H.imageUrl:Ad(H==null?void 0:H.imageUrl),ports:y0,width:64,height:64,label:H.imageName};return s.value.createNode(K)});c.value.load(j,k==null?void 0:k.groupName),document.getElementById("stencil").appendChild(c.value.container)})}).finally(()=>{setTimeout(()=>{const N=c.value.container,P=N.querySelectorAll(".x6-node"),k=m0.length;N.addEventListener("mouseenter",j,!0),N.addEventListener("mouseleave",H,!0),P.forEach((K,R)=>{const _=R>k,z=K.querySelector("text");_&&z&&(Object.assign(z.style,{display:"none",fontSize:"12px",fill:"#ffffff"}),z.setAttribute("x","0%"),z.setAttribute("y","40"),K.style.position="relative",K.style.cursor="pointer")});function j(K){const R=K.target.closest(".x6-node");if(R){const _=Array.from(P).indexOf(R),z=R.querySelector("text");_>k&&z&&(z.style.display="block")}}function H(K){const R=K.target.closest(".x6-node");if(R){const _=Array.from(P).indexOf(R),z=R.querySelector("text");_>k&&z&&(z.style.display="none")}}return()=>{N.removeEventListener("mouseenter",j,!0),N.removeEventListener("mouseleave",H,!0)}},200)})},d=I=>{switch(I){case"snapLine":s.value.isSnaplineEnabled()?(s.value.disableSnapline(),Ye.warning("关闭对齐线")):(s.value.enableSnapline(),Ye.success("开启对齐线"));break;case"select":s.value.isSelectionEnabled()?(s.value.disableSelection(),Ye.warning("关闭框选")):(s.value.enableSelection(),Ye.success("开启框选"));break;case"drawLine":p();break;case"adaptive":g();break;case"shortcuts":y();break;case"image":w();break;case"clear":x();break;case"export":v();break}},f=l.ref(!1),h=l.ref(null),p=()=>{f.value=!0;const I=new Date;s.value.startBatch(I),s.value.disablePanning(),s.value.once("blank:mousedown",({e:B,x:N,y:P})=>{f.value&&(h.value=s.value.addEdge({source:{x:N,y:P},target:{x:N,y:P},...Qe,data:{type:c0(),isConnector:!1},zIndex:0}))}),s.value.on("blank:mousemove",({e:B,x:N,y:P})=>{f.value&&h.value.setTarget({x:N,y:P})}),s.value.on("blank:mouseup",({e:B,x:N,y:P})=>{f.value=!1,s.value.enablePanning(),s.value.stopBatch(I)})},g=()=>{s.value.zoomToFit({maxScale:1,padding:20})},m=l.reactive({show:!1}),y=()=>{m.show=!0},b=l.reactive({show:!1}),w=()=>{b.show=!0},x=()=>{s.value.clearCells(),s.value.drawBackground(qa),s.value.drawGrid(Xa),Ye.success("清空成功")},v=()=>{const I=W().format("YYYYMMDDHHmmss");s.value.exportPNG(I,{padding:10,quality:1,backgroundColor:s.value.options.background.color})},C=e,E=l.reactive({show:!1,background:null,grid:null,data:null}),S=()=>{E.background=s.value.options.background,E.grid=s.value.options.grid,E.data=s.value.toJSON(),E.show=!0},O=()=>{E.show=!1},A=()=>{C("getJson",{background:s.value.options.background,grid:s.value.options.grid,data:s.value.toJSON()})},V=async()=>{if(!t.id){s.value.drawBackground(qa),s.value.drawGrid(Xa),s.value.fromJSON({cells:[]});return}const I=await Wm(t.id);s.value.drawBackground((I==null?void 0:I.background)||qa),s.value.drawGrid((I==null?void 0:I.grid)||Xa),s.value.fromJSON((I==null?void 0:I.data)||{cells:[]})},T=l.shallowRef(null),D=()=>{new ResizeObserver(()=>{g()}).observe(T.value)};return l.onMounted(()=>{a(),u(),V(),D()}),(I,B)=>{const N=l.resolveComponent("el-icon"),P=l.resolveComponent("el-button"),k=l.resolveComponent("el-dropdown-item"),j=l.resolveComponent("el-dropdown-menu"),H=l.resolveComponent("el-dropdown"),K=l.resolveComponent("el-scrollbar"),R=l.resolveComponent("el-dialog"),_=l.resolveComponent("el-drawer");return l.openBlock(),l.createElementBlock("div",Fj,[l.createElementVNode("div",Uj,[l.createElementVNode("div",Hj,[l.createVNode(H,{onCommand:d},{dropdown:l.withCtx(()=>[l.createVNode(j,null,{default:l.withCtx(()=>[l.createVNode(k,{command:"snapLine"},{default:l.withCtx(()=>B[4]||(B[4]=[l.createTextVNode("对齐线")])),_:1}),l.createVNode(k,{command:"select"},{default:l.withCtx(()=>B[5]||(B[5]=[l.createTextVNode("框选")])),_:1}),l.createVNode(k,{command:"drawLine"},{default:l.withCtx(()=>B[6]||(B[6]=[l.createTextVNode("绘制直线")])),_:1}),l.createVNode(k,{command:"adaptive"},{default:l.withCtx(()=>B[7]||(B[7]=[l.createTextVNode("视图自适应")])),_:1}),l.createVNode(k,{command:"shortcuts"},{default:l.withCtx(()=>B[8]||(B[8]=[l.createTextVNode("查看快捷键")])),_:1}),l.createVNode(k,{command:"image"},{default:l.withCtx(()=>B[9]||(B[9]=[l.createTextVNode("图片管理")])),_:1}),l.createVNode(k,{command:"clear"},{default:l.withCtx(()=>B[10]||(B[10]=[l.createTextVNode("清空画布")])),_:1}),l.createVNode(k,{command:"export"},{default:l.withCtx(()=>B[11]||(B[11]=[l.createTextVNode("导出成图片")])),_:1})]),_:1})]),default:l.withCtx(()=>[l.createElementVNode("span",Gj,[l.createVNode(P,{size:"small",text:""},{default:l.withCtx(()=>[B[3]||(B[3]=l.createTextVNode("工具 ")),l.createVNode(N,null,{default:l.withCtx(()=>[l.createVNode(l.unref(fD))]),_:1})]),_:1})])]),_:1})]),l.createElementVNode("div",Wj,[l.createVNode(l.unref(Jg),{content:"预览",placement:"bottom"},{default:l.withCtx(()=>[l.createVNode(P,{size:"small",icon:l.unref(xD),onClick:S},null,8,["icon"])]),_:1}),l.createVNode(l.unref(Jg),{content:"保存",placement:"bottom"},{default:l.withCtx(()=>[l.createVNode(P,{size:"small",icon:l.unref(mD),onClick:A},null,8,["icon"])]),_:1})])]),l.createElementVNode("div",Yj,[B[12]||(B[12]=l.createElementVNode("div",{id:"stencil"},null,-1)),l.createElementVNode("div",qj,[l.createElementVNode("div",{id:"drawing-board",ref_key:"drawBoard",ref:T},null,512)]),l.createElementVNode("div",Xj,[r.label?(l.openBlock(),l.createElementBlock("div",Jj,l.toDisplayString(r.label),1)):l.createCommentVNode("",!0),l.createVNode(K,null,{default:l.withCtx(()=>[(l.openBlock(),l.createBlock(l.resolveDynamicComponent(r.component),{graph:s.value,payload:o.value,key:i.value,itemId:t.itemId},null,8,["graph","payload","itemId"]))]),_:1})])]),l.createVNode(R,{modelValue:m.show,"onUpdate:modelValue":B[0]||(B[0]=z=>m.show=z),width:"400px",title:"快捷键","close-on-click-modal":!1,"close-on-press-escape":!1},{default:l.withCtx(()=>[l.createVNode(vj)]),_:1},8,["modelValue"]),l.createVNode(R,{modelValue:b.show,"onUpdate:modelValue":B[1]||(B[1]=z=>b.show=z),width:"800px",title:"图片管理","close-on-click-modal":!1,"close-on-press-escape":!1},{default:l.withCtx(()=>[l.createVNode(zj)]),_:1},8,["modelValue"]),l.createVNode(_,{class:"no-border-drawer",modelValue:E.show,"onUpdate:modelValue":B[2]||(B[2]=z=>E.show=z),onClose:O,title:"预览",direction:"ttb",size:"100%"},{default:l.withCtx(()=>[l.createElementVNode("div",Kj,[E.show?(l.openBlock(),l.createBlock(_d,{key:0,background:E.background,grid:E.grid,data:E.data},null,8,["background","grid","data"])):l.createCommentVNode("",!0)])]),_:1},8,["modelValue"])])}}}),[["__scopeId","data-v-f7388854"]]),Zj=[b0,_d],w0=n=>{Zj.forEach(e=>{n.component(e.name,e)})};typeof window<"u"&&window.Vue&&w0(window.Vue),Se.isSunOs=!1;const Qj=n=>{Se.isSunOs=n},e$={install:w0};Se.WiringDiagramEditor=b0,Se.WiringDiagramPreview=_d,Se.default=e$,Se.setBaseURL=sD,Se.setIsSunOs=Qj,Se.setToken=rD,Object.defineProperties(Se,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
|
742
|
+
`;var Mj=function(n,e,t,s){var r=arguments.length,i=r<3?e:s===null?s=Object.getOwnPropertyDescriptor(e,t):s,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(n,e,t,s);else for(var a=n.length-1;a>=0;a--)(o=n[a])&&(i=(r<3?o(i):r>3?o(e,t,i):o(e,t))||i);return r>3&&i&&Object.defineProperty(e,t,i),i};class gi extends be{get targetScroller(){return this.options.target.getPlugin("scroller")}get targetGraph(){return this.options.target}get targetModel(){return this.targetGraph.model}constructor(e={}){super(),this.name="stencil",Wr(this.name,Oj),this.graphs={},this.groups={},this.options=Object.assign(Object.assign({},gi.defaultOptions),e),this.init()}init(){this.dnd=new Ts(this.options),this.onSearch=vp(this.onSearch,200),this.initContainer(),this.initSearch(),this.initContent(),this.initGroups(),this.setTitle(),this.startListening()}load(e,t){return Array.isArray(e)?this.loadGroup(e,t):this.options.groups&&Object.keys(this.options.groups).forEach(s=>{e[s]&&this.loadGroup(e[s],s)}),this}unload(e,t){return Array.isArray(e)?this.loadGroup(e,t,!0):this.options.groups&&Object.keys(this.options.groups).forEach(s=>{e[s]&&this.loadGroup(e[s],s,!0)}),this}toggleGroup(e){return this.isGroupCollapsed(e)?this.expandGroup(e):this.collapseGroup(e),this}collapseGroup(e){if(this.isGroupCollapsable(e)){const t=this.groups[e];t&&!this.isGroupCollapsed(e)&&(this.trigger("group:collapse",{name:e}),J(t,"collapsed"))}return this}expandGroup(e){if(this.isGroupCollapsable(e)){const t=this.groups[e];t&&this.isGroupCollapsed(e)&&(this.trigger("group:expand",{name:e}),Re(t,"collapsed"))}return this}isGroupCollapsable(e){const t=this.groups[e];return Pn(t,"collapsable")}isGroupCollapsed(e){const t=this.groups[e];return t&&Pn(t,"collapsed")}collapseGroups(){return Object.keys(this.groups).forEach(e=>this.collapseGroup(e)),this}expandGroups(){return Object.keys(this.groups).forEach(e=>this.expandGroup(e)),this}resizeGroup(e,t){const s=this.graphs[e];return s&&s.resize(t.width,t.height),this}addGroup(e){const t=Array.isArray(e)?e:[e];this.options.groups?this.options.groups.push(...t):this.options.groups=t,t.forEach(s=>this.initGroup(s))}removeGroup(e){const t=Array.isArray(e)?e:[e];this.options.groups&&(this.options.groups=this.options.groups.filter(s=>!t.includes(s.name)),t.forEach(s=>{const r=this.graphs[s];this.unregisterGraphEvents(r),r.dispose(),delete this.graphs[s];const i=this.groups[s];Gt(i),delete this.groups[s]}))}initContainer(){this.container=document.createElement("div"),J(this.container,this.prefixClassName(Mt.base)),fe(this.container,"data-not-found-text",this.options.notFoundText||"No matches found")}initContent(){this.content=document.createElement("div"),J(this.content,this.prefixClassName(Mt.content)),bs(this.content,this.container)}initSearch(){this.options.search&&(J(this.container,"searchable"),Rt(this.container,this.renderSearch()))}initGroup(e){const t=this.options.stencilGraphOptions||{},s=document.createElement("div");J(s,this.prefixClassName(Mt.group)),fe(s,"data-name",e.name),(e.collapsable==null&&this.options.collapsable||e.collapsable!==!1)&&J(s,"collapsable"),pn(s,"collapsed",e.collapsed===!0);const r=document.createElement("h3");J(r,this.prefixClassName(Mt.groupTitle)),r.innerHTML=e.title||e.name;const i=document.createElement("div");J(i,this.prefixClassName(Mt.groupContent));const o=e.graphOptions,a=new $(Object.assign(Object.assign(Object.assign({},t),o),{container:document.createElement("div"),model:t.model||new et,width:e.graphWidth||this.options.stencilGraphWidth,height:e.graphHeight||this.options.stencilGraphHeight,interacting:!1,preventDefaultBlankAction:!1}));this.registerGraphEvents(a),Rt(i,a.container),Rt(s,[r,i]),bs(s,this.content),this.groups[e.name]=s,this.graphs[e.name]=a}initGroups(){if(this.clearGroups(),this.setCollapsableState(),this.options.groups&&this.options.groups.length)this.options.groups.forEach(e=>{this.initGroup(e)});else{const e=this.options.stencilGraphOptions||{},t=new $(Object.assign(Object.assign({},e),{container:document.createElement("div"),model:e.model||new et,width:this.options.stencilGraphWidth,height:this.options.stencilGraphHeight,interacting:!1,preventDefaultBlankAction:!1}));Rt(this.content,t.container),this.graphs[Co.defaultGroupName]=t}}setCollapsableState(){this.options.collapsable=this.options.collapsable&&this.options.groups&&this.options.groups.some(e=>e.collapsable!==!1),this.options.collapsable?(J(this.container,"collapsable"),this.options.groups&&this.options.groups.every(t=>t.collapsed||t.collapsable===!1)?J(this.container,"collapsed"):Re(this.container,"collapsed")):Re(this.container,"collapsable")}setTitle(){const e=document.createElement("div");J(e,this.prefixClassName(Mt.title)),e.innerHTML=this.options.title,bs(e,this.container)}renderSearch(){const e=document.createElement("div");J(e,this.prefixClassName(Mt.search));const t=document.createElement("input");return fe(t,{type:"search",placeholder:this.options.placeholder||"Search"}),J(t,this.prefixClassName(Mt.searchText)),Rt(e,t),e}startListening(){const e=this.prefixClassName(Mt.title),t=this.prefixClassName(Mt.searchText),s=this.prefixClassName(Mt.groupTitle);this.delegateEvents({[`click .${e}`]:"onTitleClick",[`touchstart .${e}`]:"onTitleClick",[`click .${s}`]:"onGroupTitleClick",[`touchstart .${s}`]:"onGroupTitleClick",[`input .${t}`]:"onSearch",[`focusin .${t}`]:"onSearchFocusIn",[`focusout .${t}`]:"onSearchFocusOut"})}stopListening(){this.undelegateEvents()}registerGraphEvents(e){e.on("cell:mousedown",this.onDragStart,this)}unregisterGraphEvents(e){e.off("cell:mousedown",this.onDragStart,this)}loadGroup(e,t,s){const r=this.getModel(t);if(r){const c=e.map(u=>He.isNode(u)?u:He.create(u));s===!0?r.removeCells(c):r.resetCells(c)}const i=this.getGroup(t);let o=this.options.stencilGraphHeight;i&&i.graphHeight!=null&&(o=i.graphHeight);const a=i&&i.layout||this.options.layout;if(a&&r&&ne(a,this,r,i),!o){const c=this.getGraph(t);c.fitToContent({minWidth:c.options.width,gridHeight:1,padding:i&&i.graphPadding||this.options.stencilGraphPadding||10})}return this}onDragStart(e){const{e:t,node:s}=e,r=this.getGroupByNode(s);r&&r.nodeMovable===!1||this.dnd.start(s,t)}filter(e,t){const s=Object.keys(this.graphs).reduce((r,i)=>{const o=this.graphs[i],a=i===Co.defaultGroupName?null:i,c=o.model.getNodes().filter(h=>{let p=!1;typeof t=="function"?p=ne(t,this,h,e,a,this):typeof t=="boolean"?p=t:p=this.isCellMatched(h,e,t,e.toLowerCase()!==e);const g=o.renderer.findViewByCell(h);return g&&pn(g.container,"unmatched",!p),p}),u=c.length>0,d=this.options,f=new et;return f.resetCells(c),d.layout&&ne(d.layout,this,f,this.getGroup(i)),this.groups[i]&&pn(this.groups[i],"unmatched",!u),o.fitToContent({gridWidth:1,gridHeight:1,padding:d.stencilGraphPadding||10}),r||u},!1);pn(this.container,"not-found",!s)}isCellMatched(e,t,s,r){return t&&s?Object.keys(s).some(i=>{if(i==="*"||e.shape===i){const o=s[i];return typeof o=="boolean"?o:(Array.isArray(o)?o:[o]).some(c=>{let u=e.getPropByPath(c);return u!=null?(u=`${u}`,r||(u=u.toLowerCase()),u.indexOf(t)>=0):!1})}return!1}):!0}onSearch(e){this.filter(e.target.value,this.options.search)}onSearchFocusIn(){J(this.container,"is-focused")}onSearchFocusOut(){Re(this.container,"is-focused")}onTitleClick(){this.options.collapsable&&(pn(this.container,"collapsed"),Pn(this.container,"collapsed")?this.collapseGroups():this.expandGroups())}onGroupTitleClick(e){const t=e.target.closest(`.${this.prefixClassName(Mt.group)}`);t&&this.toggleGroup(fe(t,"data-name")||"");const s=Object.keys(this.groups).every(r=>{const i=this.getGroup(r),o=this.groups[r];return i&&i.collapsable===!1||Pn(o,"collapsed")});pn(this.container,"collapsed",s)}getModel(e){const t=this.getGraph(e);return t?t.model:null}getGraph(e){return this.graphs[e||Co.defaultGroupName]}getGroup(e){const t=this.options.groups;return e!=null&&t&&t.length?t.find(s=>s.name===e):null}getGroupByNode(e){const t=this.options.groups;return t?t.find(s=>{const r=this.getModel(s.name);return r?r.has(e.id):!1}):null}clearGroups(){Object.keys(this.graphs).forEach(e=>{const t=this.graphs[e];this.unregisterGraphEvents(t),t.dispose()}),Object.keys(this.groups).forEach(e=>{const t=this.groups[e];Gt(t)}),this.graphs={},this.groups={}}onRemove(){this.clearGroups(),this.dnd.remove(),this.stopListening(),this.undelegateDocumentEvents()}dispose(){this.remove(),Yr(this.name)}}Mj([be.dispose()],gi.prototype,"dispose",null),function(n){n.defaultOptions=Object.assign({stencilGraphWidth:200,stencilGraphHeight:800,title:"Stencil",collapsable:!1,placeholder:"Search",notFoundText:"No matches found",layout(e,t){const s={columnWidth:this.options.stencilGraphWidth/2-10,columns:2,rowHeight:80,resizeToFit:!1,dx:10,dy:10};Ej(e,Object.assign(Object.assign(Object.assign({},s),this.options.layoutOptions),t?t.layoutOptions:{}))}},Ts.defaults)}(gi||(gi={}));var Mt;(function(n){n.base="widget-stencil",n.title=`${n.base}-title`,n.search=`${n.base}-search`,n.searchText=`${n.search}-text`,n.content=`${n.base}-content`,n.group=`${n.base}-group`,n.groupTitle=`${n.group}-title`,n.groupContent=`${n.group}-content`})(Mt||(Mt={}));var Co;(function(n){n.defaultGroupName="__default__"})(Co||(Co={})),$.prototype.toSVG=function(n,e){const t=this.getPlugin("export");t&&t.toSVG(n,e)},$.prototype.toPNG=function(n,e){const t=this.getPlugin("export");t&&t.toPNG(n,e)},$.prototype.toJPEG=function(n,e){const t=this.getPlugin("export");t&&t.toJPEG(n,e)},$.prototype.exportPNG=function(n,e){const t=this.getPlugin("export");t&&t.exportPNG(n,e)},$.prototype.exportJPEG=function(n,e){const t=this.getPlugin("export");t&&t.exportJPEG(n,e)},$.prototype.exportSVG=function(n,e){const t=this.getPlugin("export");t&&t.exportSVG(n,e)};var Pj=function(n,e,t,s){var r=arguments.length,i=r<3?e:s===null?s=Object.getOwnPropertyDescriptor(e,t):s,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(n,e,t,s);else for(var a=n.length-1;a>=0;a--)(o=n[a])&&(i=(r<3?o(i):r>3?o(e,t,i):o(e,t))||i);return r>3&&i&&Object.defineProperty(e,t,i),i};class g0 extends ke{constructor(){super(),this.name="export"}get view(){return this.graph.view}init(e){this.graph=e}exportPNG(e="chart",t={}){this.toPNG(s=>{Ks.downloadDataUri(s,e)},t)}exportJPEG(e="chart",t={}){this.toPNG(s=>{Ks.downloadDataUri(s,e)},t)}exportSVG(e="chart",t={}){this.toSVG(s=>{Ks.downloadDataUri(Ks.svgToDataUrl(s),e)},t)}toSVG(e,t={}){this.notify("before:export",t);const s=this.view.svg,r=oe.create(s).clone();let i=r.node;const o=r.findOne(`.${this.view.prefixClassName("graph-svg-stage")}`),a=t.viewBox||this.graph.graphToLocal(this.graph.getContentBBox()),c=t.preserveDimensions;if(c){const f=typeof c=="boolean"?a:c;r.attr({width:f.width,height:f.height})}if(r.removeAttribute("style").attr("viewBox",[a.x,a.y,a.width,a.height].join(" ")),o.removeAttribute("transform"),t.copyStyles!==!1){const f=s.ownerDocument,h=Array.from(s.querySelectorAll("*")),p=Array.from(i.querySelectorAll("*")),g=f.styleSheets.length,m=[];for(let w=g-1;w>=0;w-=1)m[w]=f.styleSheets[w],f.styleSheets[w].disabled=!0;const y={};h.forEach((w,x)=>{const v=window.getComputedStyle(w,null),C={};Object.keys(v).forEach(E=>{C[E]=v.getPropertyValue(E)}),y[x]=C}),g!==f.styleSheets.length&&m.forEach((w,x)=>{f.styleSheets[x]=w});for(let w=0;w<g;w+=1)f.styleSheets[w].disabled=!1;const b={};h.forEach((w,x)=>{const v=window.getComputedStyle(w,null),C=y[x],E={};Object.keys(v).forEach(S=>{!Lc(S)&&v.getPropertyValue(S)!==C[S]&&(E[S]=v.getPropertyValue(S))}),b[x]=E}),p.forEach((w,x)=>{Xe(w,b[x])})}const u=t.stylesheet;if(typeof u=="string"){const f=s.ownerDocument.implementation.createDocument(null,"xml",null).createCDATASection(u);r.prepend(oe.create("style",{type:"text/css"},[f]))}const d=()=>{const f=t.beforeSerialize;if(typeof f=="function"){const p=ne(f,this.graph,i);p instanceof SVGSVGElement&&(i=p)}const h=new XMLSerializer().serializeToString(i).replace(/ /g," ");this.notify("after:export",t),e(h)};if(t.serializeImages){const f=r.find("image").map(h=>new Promise(p=>{const g=h.attr("xlink:href")||h.attr("href");Ks.imageToDataUri(g,(m,y)=>{!m&&y&&h.attr("xlink:href",y),p()})}));Promise.all(f).then(d)}else d()}toDataURL(e,t){let s=t.viewBox||this.graph.getContentBBox();const r=gs(t.padding);t.width&&t.height&&(r.left+r.right>=t.width&&(r.left=r.right=0),r.top+r.bottom>=t.height&&(r.top=r.bottom=0));const i=new U(-r.left,-r.top,r.left+r.right,r.top+r.bottom);if(t.width&&t.height){const d=s.width+r.left+r.right,f=s.height+r.top+r.bottom;i.scale(d/t.width,f/t.height)}s=U.create(s).moveAndExpand(i);const o=typeof t.width=="number"&&typeof t.height=="number"?{width:t.width,height:t.height}:s;let a=t.ratio?parseFloat(t.ratio):1;(!Number.isFinite(a)||a===0)&&(a=1);const c={width:Math.max(Math.round(o.width*a),1),height:Math.max(Math.round(o.height*a),1)};{const d=document.createElement("canvas"),f=d.getContext("2d");d.width=c.width,d.height=c.height;const h=c.width-1,p=c.height-1;f.fillStyle="rgb(1,1,1)",f.fillRect(h,p,1,1);const g=f.getImageData(h,p,1,1).data;if(g[0]!==1||g[1]!==1||g[2]!==1)throw new Error("size exceeded")}const u=new Image;u.onload=()=>{const d=document.createElement("canvas");d.width=c.width,d.height=c.height;const f=d.getContext("2d");f.fillStyle=t.backgroundColor||"white",f.fillRect(0,0,c.width,c.height);try{f.drawImage(u,0,0,c.width,c.height);const h=d.toDataURL(t.type,t.quality);e(h)}catch{}},this.toSVG(d=>{u.src=`data:image/svg+xml,${encodeURIComponent(d)}`},Object.assign(Object.assign({},t),{viewBox:s,serializeImages:!0,preserveDimensions:Object.assign({},c)}))}toPNG(e,t={}){this.toDataURL(e,Object.assign(Object.assign({},t),{type:"image/png"}))}toJPEG(e,t={}){this.toDataURL(e,Object.assign(Object.assign({},t),{type:"image/jpeg"}))}notify(e,t){this.trigger(e,t),this.graph.trigger(e,t)}dispose(){this.off()}}Pj([ke.dispose()],g0.prototype,"dispose",null);const Nj={class:"control-box"},Aj=Dt({__name:"index",props:{payload:Object},setup(n){const e=n,t=l.ref("3"),s=l.ref([]),r=()=>{s.value=JSON.parse(JSON.stringify(e.payload.getPorts().map(u=>({id:u.id,attrs:u.attrs,args:{x:Number(u.args.x.replace("%","")),y:Number(u.args.y.replace("%",""))}}))))},i=()=>{const u=Du;u.attrs.text.text=`${e.payload.getPorts().length+1}`,u.args.x="50%",u.args.y="50%",e.payload.addPorts([{group:"ports",...u}]),r()},o=()=>{$r("#drawing-board",!0)},a=(u,d,f)=>{e.payload.portProp(u,"args/"+d,f+"%"),r()},c=u=>{e.payload.removePort(u),r()};return l.onMounted(()=>{r()}),(u,d)=>{const f=l.resolveComponent("el-button"),h=l.resolveComponent("el-table-column"),p=l.resolveComponent("el-slider"),g=l.resolveComponent("el-icon"),m=l.resolveComponent("el-table"),y=l.resolveComponent("el-collapse-item"),b=l.resolveComponent("el-collapse");return l.openBlock(),l.createElementBlock("div",Nj,[l.createVNode(b,{modelValue:t.value,"onUpdate:modelValue":d[0]||(d[0]=w=>t.value=w),accordion:""},{default:l.withCtx(()=>[l.createVNode(y,{title:"连接桩设置",name:"3"},{default:l.withCtx(()=>[l.createVNode(f,{type:"primary",onClick:i,size:"small"},{default:l.withCtx(()=>d[1]||(d[1]=[l.createTextVNode("添加连接桩")])),_:1}),l.createVNode(f,{type:"primary",onClick:o,size:"small"},{default:l.withCtx(()=>d[2]||(d[2]=[l.createTextVNode("显示连接桩")])),_:1}),l.createVNode(m,{data:s.value,border:"",size:"small",style:{"margin-top":"10px"}},{default:l.withCtx(()=>[l.createVNode(h,{label:"ID",width:"50",align:"center"},{default:l.withCtx(({row:w})=>[l.createTextVNode(l.toDisplayString(w.attrs.text.text),1)]),_:1}),l.createVNode(h,{label:"x",width:"100",align:"center"},{default:l.withCtx(({row:w})=>[l.createVNode(p,{modelValue:w.args.x,"onUpdate:modelValue":x=>w.args.x=x,min:0,max:100,step:1,onInput:x=>a(w.id,"x",x)},null,8,["modelValue","onUpdate:modelValue","onInput"])]),_:1}),l.createVNode(h,{label:"y",width:"100",align:"center"},{default:l.withCtx(({row:w})=>[l.createVNode(p,{modelValue:w.args.y,"onUpdate:modelValue":x=>w.args.y=x,min:0,max:100,step:1,onInput:x=>a(w.id,"y",x)},null,8,["modelValue","onUpdate:modelValue","onInput"])]),_:1}),l.createVNode(h,{label:"操作",width:"70",align:"center"},{default:l.withCtx(({row:w})=>[l.createVNode(f,{type:"danger",size:"small",onClick:x=>c(w.id)},{default:l.withCtx(()=>[l.createVNode(g,null,{default:l.withCtx(()=>[l.createVNode(l.unref(Jm))]),_:1})]),_:2},1032,["onClick"])]),_:1})]),_:1},8,["data"])]),_:1})]),_:1},8,["modelValue"])])}}},[["__scopeId","data-v-b280098c"]]),m0=[{shape:"rect",width:60,height:5,attrs:{body:{fill:"#ffffff",stroke:"#ffffff",strokeWidth:0}},data:{type:"base-shape"}},{shape:"rect",width:60,height:20,attrs:{body:{fill:"#ffffff",stroke:"#ffffff",strokeWidth:1}},data:{type:"base-shape",label:"母线"}},{shape:"circle",width:40,height:40,attrs:{body:{fill:"#ffffff",stroke:"#ffffff",strokeWidth:1}},data:{type:"base-shape"}},{shape:"ellipse",width:60,height:40,attrs:{body:{fill:"#ffffff",stroke:"#ffffff"}},data:{type:"base-shape"}}],y0={groups:{ports:{position:"absolute",args:{x:0,y:0},attrs:{circle:{magnet:!0,stroke:"#8f8f8f",r:4}},label:{position:"top"}}}},_j={style:{width:"100%",height:"100%",position:"relative"}},Tj={key:0,class:"spinner"},_d=Object.assign({name:"wiring-diagram-preview"},{__name:"index",props:{id:{type:String,default:""},background:{type:Object,default:()=>({})},grid:{type:Object,default:()=>({})},data:{type:Object,default:()=>({})}},setup(n){const e=n,t=l.ref(),s=()=>{window.__x6_instances__=[];const C=document.getElementById("preview-container");t.value=new $({container:C,autoResize:!0,panning:!0,mousewheel:!0,connecting:{router:"orth",connectionPoint:{name:"anchor"},anchor:"center"},interacting:{nodeMovable:!1,magnetConnectable:!1,edgeMovable:!1,edgeLabelMovable:!1,arrowheadMovable:!1,vertexMovable:!1,vertexAddable:!1,vertexDeletable:!1}}),window.__x6_instances__.push(C),t.value.on("blank:dblclick",()=>{h()}),t.value.on("render:done",()=>{$r("#preview-container",!1),w()})},r=async()=>{let C,E,S;if(e.id){const O=await Wm(e.id);C=(O==null?void 0:O.background)||qa,E=(O==null?void 0:O.grid)||Xa,S=(O==null?void 0:O.data)||{cells:[]}}else C=e.background,E={},S=e.data;t.value.drawBackground(C),t.value.drawGrid(E),t.value.fromJSON(S),d()},i=l.ref(null),o=l.ref([]),a=l.ref([]),c=l.ref(!1),u=l.ref(!1),d=()=>{o.value=t.value.getCells().filter(C=>{var E,S,O;return((E=C==null?void 0:C.data)==null?void 0:E.type)==="text"||((S=C==null?void 0:C.data)==null?void 0:S.type)==="pipe"||((O=C==null?void 0:C.data)==null?void 0:O.type)==="arrow"}),o.value.forEach(C=>{var E,S;(S=(E=C==null?void 0:C.data)==null?void 0:E.fields)!=null&&S.length&&a.value.push({id:C==null?void 0:C.id,fields:C==null?void 0:C.data.fields})}),h()},f=l.ref(!0),h=async()=>{if(u.value=!0,!a.value.length){u.value=!1;return}if(!f.value){Ye.warning("数据正在更新中,请稍后再试");return}i.value&&clearInterval(i.value),f.value=!1,console.log("字段数据",a.value),await p(a.value),!c.value&&(i.value=setTimeout(()=>{h()},1e4))},p=async(C,E=0)=>{let S=5;if(!c.value)if(C.length>E*S){const O=C.slice(E*S,E*S+S);console.log("批次:",E,"数据:",O),E++,g(await oD(O)),await p(C,E)}else u.value=!1,f.value=!0},g=C=>{C==null||C.forEach(E=>{var O,A,V;const S=t.value.getCellById(E.id);S.data.type==="text"&&(S.label=m(S.data.content,E.fields)),S.data.type==="pipe"&&(console.log("管道详情",S,(O=E.fields)==null?void 0:O[0].value),y(S,(A=E.fields)==null?void 0:A[0].value)),S.data.type==="arrow"&&b(S,(V=E.fields)==null?void 0:V[0].value)})},m=(C,E)=>{let S=0;return C.replace(Nl,()=>{const O=E.find(A=>A.index===S);return S++,O?O.value:d0})},y=(C,E)=>{if(!C.data.isCondition)return!1;for(let S=0;S<C.data.condition.length;S++)if(Number(E)>C.data.condition[S].min&&Number(E)<=C.data.condition[S].max)return C.attr("line2/style/animation",u0(C.data.condition[S].direction)),!1},b=(C,E)=>{if(console.log(C,E),!C.data.isCondition)return!1;for(let S=0;S<C.data.condition.length;S++)if(Number(E)>C.data.condition[S].min&&Number(E)<=C.data.condition[S].max)return C.attr("arrow/style/animation",C.data.condition[S].animation===or?"flashing 2s infinite linear":""),C.attr("arrow/d",C.data.condition[S].direction===pi?Ka:qm),C.attr("arrow/display",C.data.condition[S].display),!1},w=()=>{t.value.zoomToFit({maxScale:1.4,padding:20})},x=l.shallowRef(),v=()=>{new ResizeObserver(()=>{w()}).observe(x.value)};return l.onMounted(()=>{c.value=!1,s(),r(),v()}),l.onUnmounted(()=>{c.value=!0,clearInterval(i.value)}),(C,E)=>(l.openBlock(),l.createElementBlock("div",_j,[l.createElementVNode("div",{id:"preview-container",ref_key:"previewRef",ref:x,onDblclick:w},null,544),u.value?(l.openBlock(),l.createElementBlock("div",Tj,E[0]||(E[0]=[l.createElementVNode("div",{class:"spinner1"},null,-1)]))):l.createCommentVNode("",!0)]))}}),kj={class:"form-container"},Vj={class:"footer"},Dj=Dt({__name:"group-form",props:{payload:{type:Object,default:()=>({})}},emits:["close"],setup(n,{emit:e}){const t=n,s=e,r=l.reactive({groupName:"",sort:1,isShow:1}),i=l.reactive({groupName:[{required:!0,message:"请输入分组名称",trigger:"blur"},{min:1,max:20,message:"长度在 1 到 20 个字符",trigger:"blur"}],sort:[{required:!0,message:"请输入排序",trigger:"blur"},{type:"number",message:"排序必须为数字值"}],isShow:[{required:!0,message:"请选择是否显示",trigger:"change"}]}),o=l.ref(),a=()=>{console.log(r),o.value.validate(u=>{if(u)r.id?Ya("/custom/updateGroup",r).then(d=>{d!=null&&d.isOk?(Ye.success("保存成功"),s("close",!0)):Ye.error((d==null?void 0:d.msg)||"保存失败")}):Ya("/custom/saveGroup",r).then(d=>{d!=null&&d.isOk?(Ye.success("保存成功"),s("close",!0)):Ye.error((d==null?void 0:d.msg)||"保存失败")});else return!1})},c=()=>{s("close",!1)};return l.onMounted(()=>{var u;(u=t.payload)!=null&&u.id&&(r.id=t.payload.id,r.groupName=t.payload.groupName,r.sort=t.payload.sort,r.isShow=t.payload.isShow)}),(u,d)=>{const f=l.resolveComponent("el-input"),h=l.resolveComponent("el-form-item"),p=l.resolveComponent("el-input-number"),g=l.resolveComponent("el-switch"),m=l.resolveComponent("el-button"),y=l.resolveComponent("el-form");return l.openBlock(),l.createElementBlock("div",kj,[l.createVNode(y,{ref_key:"form",ref:o,model:r,rules:i,"label-width":"90px","label-suffix":":"},{default:l.withCtx(()=>[l.createVNode(h,{label:"分组名称",prop:"groupName"},{default:l.withCtx(()=>[l.createVNode(f,{modelValue:r.groupName,"onUpdate:modelValue":d[0]||(d[0]=b=>r.groupName=b),placeholder:"请输入分组名称",clearable:""},null,8,["modelValue"])]),_:1}),l.createVNode(h,{label:"排序",prop:"sort"},{default:l.withCtx(()=>[l.createVNode(p,{modelValue:r.sort,"onUpdate:modelValue":d[1]||(d[1]=b=>r.sort=b),min:0,max:999,step:1,"controls-position":"right"},null,8,["modelValue"])]),_:1}),l.createVNode(h,{label:"是否显示",prop:"isShow"},{default:l.withCtx(()=>[l.createVNode(g,{modelValue:r.isShow,"onUpdate:modelValue":d[2]||(d[2]=b=>r.isShow=b),"active-value":1,"inactive-value":0,"active-color":"#13ce66","inactive-color":"#ff4949"},null,8,["modelValue"])]),_:1}),l.createElementVNode("div",Vj,[l.createVNode(m,{type:"primary",onClick:a},{default:l.withCtx(()=>d[3]||(d[3]=[l.createTextVNode("保存")])),_:1}),l.createVNode(m,{onClick:c},{default:l.withCtx(()=>d[4]||(d[4]=[l.createTextVNode("取消")])),_:1})])]),_:1},8,["model","rules"])])}}},[["__scopeId","data-v-807a2ed3"]]),Rj={class:"form-container"},Lj={class:"footer"},Ij=Dt({__name:"image-form",props:{payload:{type:Object,default:()=>({})}},emits:["close"],setup(n,{emit:e}){const t=e,s=n,r=l.shallowRef(null),i=l.reactive({groupId:"",id:"",imageName:"",sort:0,isShow:1,imageUrl:""}),o={imageName:[{required:!0,message:"请输入图片名称",trigger:"blur"},{min:1,max:20,message:"长度在 1 到 20 个字符",trigger:"blur"}],sort:[{required:!0,message:"请输入排序",trigger:"blur"},{type:"number",message:"排序必须为数字值"}]},a=l.ref(""),c=f=>{if(f.raw.type.indexOf("image")===-1){Ye.error("请上传图片格式的文件");return}const h=new FormData;h.append("file",f.raw),iD("/file/fileUpload",h).then(p=>{p!=null&&p.isOk?Se.isSunOs?(a.value=p==null?void 0:p.data,i.imageUrl=p==null?void 0:p.data):(a.value=Yn.defaults.baseURL+"/upload/"+(p==null?void 0:p.data),i.imageUrl=p==null?void 0:p.data):Ye.error((p==null?void 0:p.msg)||"上传失败")})},u=()=>{console.log(i),r.value.validate(f=>{if(f)Ya("/custom/savePicture",i).then(h=>{h!=null&&h.isOk?(Ye.success("保存成功"),t("close",!0)):Ye.error((h==null?void 0:h.msg)||"保存失败")});else return!1})},d=()=>{t("close",!1)};return l.onMounted(()=>{var f;(f=s.payload)!=null&&f.id&&(i.id=s.payload.id,i.imageName=s.payload.imageName,i.sort=s.payload.sort,i.isShow=s.payload.isShow,i.imageUrl=Ad(s.payload.imageUrl),a.value=i.imageUrl),i.groupId=s.payload.groupId}),(f,h)=>{const p=l.resolveComponent("el-input"),g=l.resolveComponent("el-form-item"),m=l.resolveComponent("el-input-number"),y=l.resolveComponent("el-switch"),b=l.resolveComponent("el-image"),w=l.resolveComponent("el-icon"),x=l.resolveComponent("el-upload"),v=l.resolveComponent("el-button"),C=l.resolveComponent("el-form");return l.openBlock(),l.createElementBlock("div",Rj,[l.createVNode(C,{ref_key:"form",ref:r,model:i,rules:o,"label-width":"90px","label-suffix":":"},{default:l.withCtx(()=>[l.createVNode(g,{label:"图片名称",prop:"imageName"},{default:l.withCtx(()=>[l.createVNode(p,{modelValue:i.imageName,"onUpdate:modelValue":h[0]||(h[0]=E=>i.imageName=E),placeholder:"请输入图片名称"},null,8,["modelValue"])]),_:1}),l.createVNode(g,{label:"排序",prop:"sort"},{default:l.withCtx(()=>[l.createVNode(m,{modelValue:i.sort,"onUpdate:modelValue":h[1]||(h[1]=E=>i.sort=E),min:0,max:999,step:1,"controls-position":"right"},null,8,["modelValue"])]),_:1}),l.createVNode(g,{label:"是否显示",prop:"isShow"},{default:l.withCtx(()=>[l.createVNode(y,{modelValue:i.isShow,"onUpdate:modelValue":h[2]||(h[2]=E=>i.isShow=E),"active-value":1,"inactive-value":0,"active-color":"#13ce66","inactive-color":"#ff4949"},null,8,["modelValue"])]),_:1}),l.createVNode(g,{label:"上传",prop:"image"},{default:l.withCtx(()=>[l.createVNode(x,{action:"","list-type":"picture",class:"avatar-uploader","show-file-list":!1,"on-change":c,"auto-upload":!1},{default:l.withCtx(()=>[a.value?(l.openBlock(),l.createBlock(b,{key:0,src:a.value,fit:"cover",style:{width:"64px",height:"64px"}},null,8,["src"])):(l.openBlock(),l.createBlock(w,{key:1,class:"avatar-uploader-icon"},{default:l.withCtx(()=>[l.createVNode(l.unref(bD))]),_:1}))]),_:1})]),_:1}),l.createElementVNode("div",Lj,[l.createVNode(v,{type:"primary",onClick:u},{default:l.withCtx(()=>h[3]||(h[3]=[l.createTextVNode("保存")])),_:1}),l.createVNode(v,{onClick:d},{default:l.withCtx(()=>h[4]||(h[4]=[l.createTextVNode("取消")])),_:1})])]),_:1},8,["model"])])}}},[["__scopeId","data-v-4e42911d"]]),Bj={class:"form-container"},jj={style:{padding:"0 10px",display:"flex","flex-direction":"column",gap:"5px","align-items":"flex-start"}},$j=["src"],zj=Dt({__name:"image-management",setup(n){const e=l.reactive({items:[]}),t=()=>{Js("/custom/groupList").then(h=>{e.items=h.data})},s=l.reactive({show:!1,title:"新增图片分组",payload:null}),r=()=>{s.show=!0,s.title="新增图片分组",s.payload=null},i=h=>{s.show=!0,s.title="编辑图片分组",s.payload={id:h.id,groupName:h.groupName,sort:h.sort,isShow:h.isShow}},o=h=>{(Se.isSunOs?Js:Gm)("/custom/removeGroup/"+h).then(g=>{g.code===200?(Ye.success("删除成功"),t()):Ye.error(g.msg||"删除失败")})},a=l.reactive({show:!1,title:"新增图片",payload:null}),c=h=>{a.show=!0,a.title="新增图片",a.payload={groupId:h}},u=h=>{a.show=!0,a.title="编辑图片",a.payload={id:h.id,groupId:h.groupId,imageName:h.imageName,sort:h.sort,isShow:h.isShow,imageUrl:h.imageUrl}},d=h=>{(Se.isSunOs?Js:Gm)("/custom/removePicture/"+h).then(g=>{g.code===200?(Ye.success("删除成功"),t()):Ye.error(g.msg||"删除失败")})},f=h=>{s.show=!1,a.show=!1,h&&t()};return l.onMounted(()=>{t()}),(h,p)=>{const g=l.resolveComponent("el-button"),m=l.resolveComponent("el-table-column"),y=l.resolveComponent("el-table"),b=l.resolveComponent("el-dialog");return l.openBlock(),l.createElementBlock("div",Bj,[l.createVNode(g,{type:"primary",onClick:r,size:"small"},{default:l.withCtx(()=>p[2]||(p[2]=[l.createTextVNode("新增图片分组")])),_:1}),l.createVNode(y,{data:e.items,border:"",height:"500"},{default:l.withCtx(()=>[l.createVNode(m,{type:"expand"},{default:l.withCtx(w=>[l.createElementVNode("div",jj,[l.createVNode(g,{type:"primary",size:"small",onClick:x=>c(w.row.id)},{default:l.withCtx(()=>p[3]||(p[3]=[l.createTextVNode("新增图片")])),_:2},1032,["onClick"]),l.createVNode(y,{data:w.row.pictureList,border:"",size:"small"},{default:l.withCtx(()=>[l.createVNode(m,{label:"名称",prop:"imageName",align:"center"}),l.createVNode(m,{label:"图片",prop:"imageUrl",align:"center"},{default:l.withCtx(x=>[l.createElementVNode("img",{src:l.unref(Se.isSunOs)?x.row.imageUrl:l.unref(Ad)(x.row.imageUrl),alt:"",style:{width:"64px",height:"64px"}},null,8,$j)]),_:1}),l.createVNode(m,{label:"排序",prop:"sort",align:"center"}),l.createVNode(m,{label:"是否显示",prop:"isShow",align:"center"},{default:l.withCtx(x=>[l.createTextVNode(l.toDisplayString(x.row.isShow===1?"是":"否"),1)]),_:1}),l.createVNode(m,{label:"操作",align:"center"},{default:l.withCtx(x=>[l.createVNode(g,{type:"primary",size:"small",onClick:v=>u(x.row)},{default:l.withCtx(()=>p[4]||(p[4]=[l.createTextVNode("编辑 ")])),_:2},1032,["onClick"]),l.createVNode(g,{type:"danger",size:"small",onClick:v=>d(x.row.id)},{default:l.withCtx(()=>p[5]||(p[5]=[l.createTextVNode("删除 ")])),_:2},1032,["onClick"])]),_:1})]),_:2},1032,["data"])])]),_:1}),l.createVNode(m,{label:"分组名称",prop:"groupName",align:"center"}),l.createVNode(m,{label:"排序",prop:"sort",align:"center"}),l.createVNode(m,{label:"是否显示",prop:"isShow",align:"center"},{default:l.withCtx(w=>[l.createTextVNode(l.toDisplayString(w.row.isShow===1?"是":"否"),1)]),_:1}),l.createVNode(m,{label:"操作",align:"center"},{default:l.withCtx(w=>[l.createVNode(g,{type:"primary",size:"small",onClick:x=>i(w.row)},{default:l.withCtx(()=>p[6]||(p[6]=[l.createTextVNode("编辑")])),_:2},1032,["onClick"]),l.createVNode(g,{type:"danger",size:"small",onClick:x=>o(w.row.id)},{default:l.withCtx(()=>p[7]||(p[7]=[l.createTextVNode("删除")])),_:2},1032,["onClick"])]),_:1})]),_:1},8,["data"]),l.createVNode(b,{modelValue:s.show,"onUpdate:modelValue":p[0]||(p[0]=w=>s.show=w),title:s.title,width:"300","close-on-click-modal":!1,"close-on-press-escape":!1},{default:l.withCtx(()=>[s.show?(l.openBlock(),l.createBlock(Dj,{key:0,payload:s.payload,onClose:f},null,8,["payload"])):l.createCommentVNode("",!0)]),_:1},8,["modelValue","title"]),l.createVNode(b,{modelValue:a.show,"onUpdate:modelValue":p[1]||(p[1]=w=>a.show=w),title:a.title,width:"300","close-on-click-modal":!1,"close-on-press-escape":!1},{default:l.withCtx(()=>[a.show?(l.openBlock(),l.createBlock(Ij,{key:0,payload:a.payload,onClose:f},null,8,["payload"])):l.createCommentVNode("",!0)]),_:1},8,["modelValue","title"])])}}},[["__scopeId","data-v-721437e3"]]),Fj={class:"page-container"},Uj={class:"tool-bar"},Hj={class:"action"},Gj={class:"el-dropdown-link"},Wj={class:"action",style:{"margin-right":"50px"}},Yj={class:"board"},qj={class:"drawing-board-box"},Xj={id:"controls"},Jj={key:0,class:"controls-label"},Kj={style:{width:"100%",height:"100%",background:"black"}},b0=Dt(Object.assign({name:"editor"},{__name:"index",props:{id:{type:String,default:""},itemId:{type:String,default:""}},emits:["getJson"],setup(n,{emit:e}){const t=n,s=l.ref(),r=l.reactive({label:"",component:l.shallowRef(null)}),i=l.ref(null),o=l.ref(null),a=()=>{window.__x6_instances__=[];const I=document.getElementById("drawing-board");s.value=new $({container:I,autoResize:!0,panning:!0,mousewheel:!0,connecting:{snap:!0,allowEdge:!0,highlight:!0,router:"orth",connectionPoint:{name:"anchor"},anchor:"center",createEdge(){return s.value.createEdge({inherit:"edge",...Qe,data:{type:c0()},zIndex:0})}}}),window.__x6_instances__.push(s.value),s.value.use(L3()),s.value.use(I3()),s.value.use(B3()),s.value.use(j3()),s.value.use(z3()),s.value.use(F3()),s.value.bindKey(["delete","backspace"],()=>{U3(s.value)}),s.value.bindKey(["ctrl+c","cmd + c"],()=>{H3(s.value)}),s.value.bindKey(["ctrl+v","cmd + v"],()=>{G3(s.value)}),s.value.bindKey(["ctrl+z","cmd + z"],()=>{W3(s.value)}),s.value.bindKey(["ctrl+y","cmd + y"],()=>{Y3(s.value)});let B=null;s.value.on("edge:click",({cell:N})=>{o.value=N,r.component=p0,r.label="线段属性",i.value=Nd()}),s.value.on("edge:mouseenter",({cell:N})=>{clearTimeout(B),N.toFront(),q3(N)}),s.value.on("edge:mouseleave",({cell:N})=>{B=setTimeout(()=>{N.toBack(),N.removeTools()},300)}),s.value.on("node:mouseenter",()=>{$r("#drawing-board",!0)}),s.value.on("node:mouseleave",()=>{$r("#drawing-board",!1)}),s.value.use(new g0),s.value.on("blank:click",({e:N,x:P,y:k})=>{o.value=s,r.component=dD,r.label="画布属性",i.value=Nd()}),s.value.on("cell:click",({cell:N})=>{var P,k;if(o.value=N,i.value=Nd(),((P=N.data)==null?void 0:P.type)==="text"){r.component=h0,r.label="文本属性";return}if(((k=N.data)==null?void 0:k.type)==="base-shape"){r.component=h0,r.label="基础图形属性";return}if((N==null?void 0:N.shape)==="edge"){r.component=p0,r.label="连线属性";return}if((N==null?void 0:N.shape)==="image"){r.component=Aj,r.label="图片属性";return}r.component=null,r.label=null}),s.value.on("render:done",()=>{$r("#drawing-board",!1),g()})},c=l.ref(),u=()=>{c.value=new gi({target:s.value,...aD,groups:[{name:"基础组件",graphPadding:30}],search(N,P){var k;return((k=N.label)==null?void 0:k.indexOf(P))!==-1},placeholder:"搜索",notFoundText:"未找到匹配项",getDragNode:N=>{const P=N.clone({keepId:!0});return P.label!=="文本"&&(P.label=""),P}});const I=s.value.createNode({...lD}),B=m0.map(N=>(N.ports=y0,s.value.createNode(N)));c.value.load([I,...B],"基础组件"),Js("/custom/groupList").then(N=>{const P=(N==null?void 0:N.data)||[];P==null||P.forEach(k=>{c.value.addGroup({name:k==null?void 0:k.groupName,graphPadding:30});const j=k==null?void 0:k.pictureList.map(H=>{const K={shape:"image",imageUrl:Se.isSunOs?H==null?void 0:H.imageUrl:Ad(H==null?void 0:H.imageUrl),ports:y0,width:64,height:64,label:H.imageName};return s.value.createNode(K)});c.value.load(j,k==null?void 0:k.groupName),document.getElementById("stencil").appendChild(c.value.container)})}).finally(()=>{setTimeout(()=>{const N=c.value.container,P=N.querySelectorAll(".x6-node"),k=m0.length;N.addEventListener("mouseenter",j,!0),N.addEventListener("mouseleave",H,!0),P.forEach((K,R)=>{const _=R>k,z=K.querySelector("text");_&&z&&(Object.assign(z.style,{display:"none",fontSize:"12px",fill:"#ffffff"}),z.setAttribute("x","0%"),z.setAttribute("y","40"),K.style.position="relative",K.style.cursor="pointer")});function j(K){const R=K.target.closest(".x6-node");if(R){const _=Array.from(P).indexOf(R),z=R.querySelector("text");_>k&&z&&(z.style.display="block")}}function H(K){const R=K.target.closest(".x6-node");if(R){const _=Array.from(P).indexOf(R),z=R.querySelector("text");_>k&&z&&(z.style.display="none")}}return()=>{N.removeEventListener("mouseenter",j,!0),N.removeEventListener("mouseleave",H,!0)}},200)})},d=I=>{switch(I){case"snapLine":s.value.isSnaplineEnabled()?(s.value.disableSnapline(),Ye.warning("关闭对齐线")):(s.value.enableSnapline(),Ye.success("开启对齐线"));break;case"select":s.value.isSelectionEnabled()?(s.value.disableSelection(),Ye.warning("关闭框选")):(s.value.enableSelection(),Ye.success("开启框选"));break;case"drawLine":p();break;case"adaptive":g();break;case"shortcuts":y();break;case"image":w();break;case"clear":x();break;case"export":v();break}},f=l.ref(!1),h=l.ref(null),p=()=>{f.value=!0;const I=new Date;s.value.startBatch(I),s.value.disablePanning(),s.value.once("blank:mousedown",({e:B,x:N,y:P})=>{f.value&&(h.value=s.value.addEdge({source:{x:N,y:P},target:{x:N,y:P},...Qe,data:{type:c0(),isConnector:!1},zIndex:0}))}),s.value.on("blank:mousemove",({e:B,x:N,y:P})=>{f.value&&h.value.setTarget({x:N,y:P})}),s.value.on("blank:mouseup",({e:B,x:N,y:P})=>{f.value=!1,s.value.enablePanning(),s.value.stopBatch(I)})},g=()=>{s.value.zoomToFit({maxScale:1,padding:20})},m=l.reactive({show:!1}),y=()=>{m.show=!0},b=l.reactive({show:!1}),w=()=>{b.show=!0},x=()=>{s.value.clearCells(),s.value.drawBackground(qa),s.value.drawGrid(Xa),Ye.success("清空成功")},v=()=>{const I=W().format("YYYYMMDDHHmmss");s.value.exportPNG(I,{padding:10,quality:1,backgroundColor:s.value.options.background.color})},C=e,E=l.reactive({show:!1,background:null,grid:null,data:null}),S=()=>{E.background=s.value.options.background,E.grid=s.value.options.grid,E.data=s.value.toJSON(),E.show=!0},O=()=>{E.show=!1},A=()=>{C("getJson",{background:s.value.options.background,grid:s.value.options.grid,data:s.value.toJSON()})},V=async()=>{if(!t.id){s.value.drawBackground(qa),s.value.drawGrid(Xa),s.value.fromJSON({cells:[]});return}const I=await Wm(t.id);s.value.drawBackground((I==null?void 0:I.background)||qa),s.value.drawGrid((I==null?void 0:I.grid)||Xa),s.value.fromJSON((I==null?void 0:I.data)||{cells:[]})},T=l.shallowRef(null),D=()=>{new ResizeObserver(()=>{g()}).observe(T.value)};return l.onMounted(()=>{a(),u(),V(),D()}),(I,B)=>{const N=l.resolveComponent("el-icon"),P=l.resolveComponent("el-button"),k=l.resolveComponent("el-dropdown-item"),j=l.resolveComponent("el-dropdown-menu"),H=l.resolveComponent("el-dropdown"),K=l.resolveComponent("el-scrollbar"),R=l.resolveComponent("el-dialog"),_=l.resolveComponent("el-drawer");return l.openBlock(),l.createElementBlock("div",Fj,[l.createElementVNode("div",Uj,[l.createElementVNode("div",Hj,[l.createVNode(H,{onCommand:d},{dropdown:l.withCtx(()=>[l.createVNode(j,null,{default:l.withCtx(()=>[l.createVNode(k,{command:"snapLine"},{default:l.withCtx(()=>B[4]||(B[4]=[l.createTextVNode("对齐线")])),_:1}),l.createVNode(k,{command:"select"},{default:l.withCtx(()=>B[5]||(B[5]=[l.createTextVNode("框选")])),_:1}),l.createVNode(k,{command:"drawLine"},{default:l.withCtx(()=>B[6]||(B[6]=[l.createTextVNode("绘制直线")])),_:1}),l.createVNode(k,{command:"adaptive"},{default:l.withCtx(()=>B[7]||(B[7]=[l.createTextVNode("视图自适应")])),_:1}),l.createVNode(k,{command:"shortcuts"},{default:l.withCtx(()=>B[8]||(B[8]=[l.createTextVNode("查看快捷键")])),_:1}),l.createVNode(k,{command:"image"},{default:l.withCtx(()=>B[9]||(B[9]=[l.createTextVNode("图片管理")])),_:1}),l.createVNode(k,{command:"clear"},{default:l.withCtx(()=>B[10]||(B[10]=[l.createTextVNode("清空画布")])),_:1}),l.createVNode(k,{command:"export"},{default:l.withCtx(()=>B[11]||(B[11]=[l.createTextVNode("导出成图片")])),_:1})]),_:1})]),default:l.withCtx(()=>[l.createElementVNode("span",Gj,[l.createVNode(P,{size:"small",text:""},{default:l.withCtx(()=>[B[3]||(B[3]=l.createTextVNode("工具 ")),l.createVNode(N,null,{default:l.withCtx(()=>[l.createVNode(l.unref(fD))]),_:1})]),_:1})])]),_:1})]),l.createElementVNode("div",Wj,[l.createVNode(l.unref(Jg),{content:"预览",placement:"bottom"},{default:l.withCtx(()=>[l.createVNode(P,{size:"small",icon:l.unref(xD),onClick:S},null,8,["icon"])]),_:1}),l.createVNode(l.unref(Jg),{content:"保存",placement:"bottom"},{default:l.withCtx(()=>[l.createVNode(P,{size:"small",icon:l.unref(mD),onClick:A},null,8,["icon"])]),_:1})])]),l.createElementVNode("div",Yj,[B[12]||(B[12]=l.createElementVNode("div",{id:"stencil"},null,-1)),l.createElementVNode("div",qj,[l.createElementVNode("div",{id:"drawing-board",ref_key:"drawBoard",ref:T},null,512)]),l.createElementVNode("div",Xj,[r.label?(l.openBlock(),l.createElementBlock("div",Jj,l.toDisplayString(r.label),1)):l.createCommentVNode("",!0),l.createVNode(K,null,{default:l.withCtx(()=>[(l.openBlock(),l.createBlock(l.resolveDynamicComponent(r.component),{graph:s.value,payload:o.value,key:i.value,itemId:t.itemId},null,8,["graph","payload","itemId"]))]),_:1})])]),l.createVNode(R,{modelValue:m.show,"onUpdate:modelValue":B[0]||(B[0]=z=>m.show=z),width:"400px",title:"快捷键","close-on-click-modal":!1,"close-on-press-escape":!1},{default:l.withCtx(()=>[l.createVNode(vj)]),_:1},8,["modelValue"]),l.createVNode(R,{modelValue:b.show,"onUpdate:modelValue":B[1]||(B[1]=z=>b.show=z),width:"800px",title:"图片管理","close-on-click-modal":!1,"close-on-press-escape":!1},{default:l.withCtx(()=>[l.createVNode(zj)]),_:1},8,["modelValue"]),l.createVNode(_,{class:"no-border-drawer",modelValue:E.show,"onUpdate:modelValue":B[2]||(B[2]=z=>E.show=z),onClose:O,title:"预览",direction:"ttb",size:"100%"},{default:l.withCtx(()=>[l.createElementVNode("div",Kj,[E.show?(l.openBlock(),l.createBlock(_d,{key:0,background:E.background,grid:E.grid,data:E.data},null,8,["background","grid","data"])):l.createCommentVNode("",!0)])]),_:1},8,["modelValue"])])}}}),[["__scopeId","data-v-f7388854"]]),Zj=[b0,_d],w0=n=>{Zj.forEach(e=>{n.component(e.name,e)})};typeof window<"u"&&window.Vue&&w0(window.Vue),Se.isSunOs=!1;const Qj=n=>{Se.isSunOs=n},e$={install:w0};Se.WiringDiagramEditor=b0,Se.WiringDiagramPreview=_d,Se.default=e$,Se.setBaseURL=sD,Se.setIsSunOs=Qj,Se.setToken=rD,Object.defineProperties(Se,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
package/package.json
CHANGED
|
@@ -29,7 +29,7 @@ export const showPorts = (div, show) => {
|
|
|
29
29
|
* @returns {Promise<unknown>}
|
|
30
30
|
*/
|
|
31
31
|
export const getDeviceList = (itemId) => {
|
|
32
|
-
return get('/custom/deviceList', {
|
|
32
|
+
return get('/custom/deviceList', {itemIds: itemId}).then(res => {
|
|
33
33
|
if (res?.isOk) {
|
|
34
34
|
return res.data
|
|
35
35
|
}
|
|
@@ -105,7 +105,7 @@ const renderData = async () => {
|
|
|
105
105
|
const options = await getData(props.id)
|
|
106
106
|
background = options?.background || backgroundOptions;
|
|
107
107
|
grid = options?.grid || gridOptions;
|
|
108
|
-
data = options?.
|
|
108
|
+
data = options?.data || {cells: []};
|
|
109
109
|
} else {
|
|
110
110
|
background = props.background;
|
|
111
111
|
grid = {};
|