vue-wiring-diagram 1.0.8 → 1.0.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/style.css +1 -1
- package/dist/vue-wiring-diagram.es.js +14 -12
- package/dist/vue-wiring-diagram.umd.js +2 -2
- package/package.json +1 -1
- package/packages/components/common.js +2 -2
- package/packages/components/editor/index.vue +3 -7
- package/packages/components/image-control/image-form.vue +3 -3
|
@@ -31,7 +31,7 @@ usage: app.provide(ZINDEX_INJECTION_KEY, { current: 0 })`),{initialZIndex:s,curr
|
|
|
31
31
|
`)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...e){const s=new this(t);return e.forEach(r=>s.set(r)),s}static accessor(t){const s=(this[dm]=this[dm]={accessors:{}}).accessors,r=this.prototype;function i(o){const a=Gi(o);s[a]||(uD(r,o),s[a]=!0)}return R.isArray(t)?t.forEach(i):i(t),this}}Se.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),R.reduceDescriptors(Se.prototype,({value:n},t)=>{let e=t[0].toUpperCase()+t.slice(1);return{get:()=>n,set(s){this[e]=s}}}),R.freezeMethods(Se);function gu(n,t){const e=this||Ui,s=t||e,r=Se.from(s.headers);let i=s.data;return R.forEach(n,function(a){i=a.call(e,i,r.normalize(),t?t.status:void 0)}),r.normalize(),i}function fm(n){return!!(n&&n.__CANCEL__)}function Dr(n,t,e){at.call(this,n??"canceled",at.ERR_CANCELED,t,e),this.name="CanceledError"}R.inherits(Dr,at,{__CANCEL__:!0});function gm(n,t,e){const s=e.config.validateStatus;!e.status||!s||s(e.status)?n(e):t(new at("Request failed with status code "+e.status,[at.ERR_BAD_REQUEST,at.ERR_BAD_RESPONSE][Math.floor(e.status/100)-4],e.config,e.request,e))}function hD(n){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(n);return t&&t[1]||""}function dD(n,t){n=n||10;const e=new Array(n),s=new Array(n);let r=0,i=0,o;return t=t!==void 0?t:1e3,function(l){const u=Date.now(),h=s[i];o||(o=u),e[r]=l,s[r]=u;let f=i,d=0;for(;f!==r;)d+=e[f++],f=f%n;if(r=(r+1)%n,r===i&&(i=(i+1)%n),u-o<t)return;const g=h&&u-h;return g?Math.round(d*1e3/g):void 0}}function fD(n,t){let e=0,s=1e3/t,r,i;const o=(u,h=Date.now())=>{e=h,r=null,i&&(clearTimeout(i),i=null),n.apply(null,u)};return[(...u)=>{const h=Date.now(),f=h-e;f>=s?o(u,h):(r=u,i||(i=setTimeout(()=>{i=null,o(r)},s-f)))},()=>r&&o(r)]}const Ba=(n,t,e=3)=>{let s=0;const r=dD(50,250);return fD(i=>{const o=i.loaded,a=i.lengthComputable?i.total:void 0,l=o-s,u=r(l),h=o<=a;s=o;const f={loaded:o,total:a,progress:a?o/a:void 0,bytes:l,rate:u||void 0,estimated:u&&a&&h?(a-o)/u:void 0,event:i,lengthComputable:a!=null,[t?"download":"upload"]:!0};n(f)},e)},pm=(n,t)=>{const e=n!=null;return[s=>t[0]({lengthComputable:e,total:n,loaded:s}),t[1]]},mm=n=>(...t)=>R.asap(()=>n(...t)),gD=Ce.hasStandardBrowserEnv?function(){const t=Ce.navigator&&/(msie|trident)/i.test(Ce.navigator.userAgent),e=document.createElement("a");let s;function r(i){let o=i;return t&&(e.setAttribute("href",o),o=e.href),e.setAttribute("href",o),{href:e.href,protocol:e.protocol?e.protocol.replace(/:$/,""):"",host:e.host,search:e.search?e.search.replace(/^\?/,""):"",hash:e.hash?e.hash.replace(/^#/,""):"",hostname:e.hostname,port:e.port,pathname:e.pathname.charAt(0)==="/"?e.pathname:"/"+e.pathname}}return s=r(window.location.href),function(o){const a=R.isString(o)?r(o):o;return a.protocol===s.protocol&&a.host===s.host}}():function(){return function(){return!0}}(),pD=Ce.hasStandardBrowserEnv?{write(n,t,e,s,r,i){const o=[n+"="+encodeURIComponent(t)];R.isNumber(e)&&o.push("expires="+new Date(e).toGMTString()),R.isString(s)&&o.push("path="+s),R.isString(r)&&o.push("domain="+r),i===!0&&o.push("secure"),document.cookie=o.join("; ")},read(n){const t=document.cookie.match(new RegExp("(^|;\\s*)("+n+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(n){this.write(n,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function mD(n){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(n)}function yD(n,t){return t?n.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):n}function ym(n,t){return n&&!mD(t)?yD(n,t):t}const bm=n=>n instanceof Se?{...n}:n;function Gs(n,t){t=t||{};const e={};function s(u,h,f){return R.isPlainObject(u)&&R.isPlainObject(h)?R.merge.call({caseless:f},u,h):R.isPlainObject(h)?R.merge({},h):R.isArray(h)?h.slice():h}function r(u,h,f){if(R.isUndefined(h)){if(!R.isUndefined(u))return s(void 0,u,f)}else return s(u,h,f)}function i(u,h){if(!R.isUndefined(h))return s(void 0,h)}function o(u,h){if(R.isUndefined(h)){if(!R.isUndefined(u))return s(void 0,u)}else return s(void 0,h)}function a(u,h,f){if(f in t)return s(u,h);if(f in n)return s(void 0,u)}const l={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,h)=>r(bm(u),bm(h),!0)};return R.forEach(Object.keys(Object.assign({},n,t)),function(h){const f=l[h]||r,d=f(n[h],t[h],h);R.isUndefined(d)&&f!==a||(e[h]=d)}),e}const wm=n=>{const t=Gs({},n);let{data:e,withXSRFToken:s,xsrfHeaderName:r,xsrfCookieName:i,headers:o,auth:a}=t;t.headers=o=Se.from(o),t.url=lm(ym(t.baseURL,t.url),n.params,n.paramsSerializer),a&&o.set("Authorization","Basic "+btoa((a.username||"")+":"+(a.password?unescape(encodeURIComponent(a.password)):"")));let l;if(R.isFormData(e)){if(Ce.hasStandardBrowserEnv||Ce.hasStandardBrowserWebWorkerEnv)o.setContentType(void 0);else if((l=o.getContentType())!==!1){const[u,...h]=l?l.split(";").map(f=>f.trim()).filter(Boolean):[];o.setContentType([u||"multipart/form-data",...h].join("; "))}}if(Ce.hasStandardBrowserEnv&&(s&&R.isFunction(s)&&(s=s(t)),s||s!==!1&&gD(t.url))){const u=r&&i&&pD.read(i);u&&o.set(r,u)}return t},bD=typeof XMLHttpRequest<"u"&&function(n){return new Promise(function(e,s){const r=wm(n);let i=r.data;const o=Se.from(r.headers).normalize();let{responseType:a,onUploadProgress:l,onDownloadProgress:u}=r,h,f,d,g,p;function m(){g&&g(),p&&p(),r.cancelToken&&r.cancelToken.unsubscribe(h),r.signal&&r.signal.removeEventListener("abort",h)}let y=new XMLHttpRequest;y.open(r.method.toUpperCase(),r.url,!0),y.timeout=r.timeout;function b(){if(!y)return;const x=Se.from("getAllResponseHeaders"in y&&y.getAllResponseHeaders()),S={data:!a||a==="text"||a==="json"?y.responseText:y.response,status:y.status,statusText:y.statusText,headers:x,config:n,request:y};gm(function(C){e(C),m()},function(C){s(C),m()},S),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 at("Request aborted",at.ECONNABORTED,n,y)),y=null)},y.onerror=function(){s(new at("Network Error",at.ERR_NETWORK,n,y)),y=null},y.ontimeout=function(){let v=r.timeout?"timeout of "+r.timeout+"ms exceeded":"timeout exceeded";const S=r.transitional||um;r.timeoutErrorMessage&&(v=r.timeoutErrorMessage),s(new at(v,S.clarifyTimeoutError?at.ETIMEDOUT:at.ECONNABORTED,n,y)),y=null},i===void 0&&o.setContentType(null),"setRequestHeader"in y&&R.forEach(o.toJSON(),function(v,S){y.setRequestHeader(S,v)}),R.isUndefined(r.withCredentials)||(y.withCredentials=!!r.withCredentials),a&&a!=="json"&&(y.responseType=r.responseType),u&&([d,p]=Ba(u,!0),y.addEventListener("progress",d)),l&&y.upload&&([f,g]=Ba(l),y.upload.addEventListener("progress",f),y.upload.addEventListener("loadend",g)),(r.cancelToken||r.signal)&&(h=x=>{y&&(s(!x||x.type?new Dr(null,n,y):x),y.abort(),y=null)},r.cancelToken&&r.cancelToken.subscribe(h),r.signal&&(r.signal.aborted?h():r.signal.addEventListener("abort",h)));const w=hD(r.url);if(w&&Ce.protocols.indexOf(w)===-1){s(new at("Unsupported protocol "+w+":",at.ERR_BAD_REQUEST,n));return}y.send(i||null)})},wD=(n,t)=>{const{length:e}=n=n?n.filter(Boolean):[];if(t||e){let s=new AbortController,r;const i=function(u){if(!r){r=!0,a();const h=u instanceof Error?u:this.reason;s.abort(h instanceof at?h:new Dr(h instanceof Error?h.message:h))}};let o=t&&setTimeout(()=>{o=null,i(new at(`timeout ${t} of ms exceeded`,at.ETIMEDOUT))},t);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:l}=s;return l.unsubscribe=()=>R.asap(a),l}},xD=function*(n,t){let e=n.byteLength;if(e<t){yield n;return}let s=0,r;for(;s<e;)r=s+t,yield n.slice(s,r),s=r},vD=async function*(n,t){for await(const e of CD(n))yield*xD(e,t)},CD=async function*(n){if(n[Symbol.asyncIterator]){yield*n;return}const t=n.getReader();try{for(;;){const{done:e,value:s}=await t.read();if(e)break;yield s}}finally{await t.cancel()}},xm=(n,t,e,s)=>{const r=vD(n,t);let i=0,o,a=l=>{o||(o=!0,s&&s(l))};return new ReadableStream({async pull(l){try{const{done:u,value:h}=await r.next();if(u){a(),l.close();return}let f=h.byteLength;if(e){let d=i+=f;e(d)}l.enqueue(new Uint8Array(h))}catch(u){throw a(u),u}},cancel(l){return a(l),r.return()}},{highWaterMark:2})},Va=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",vm=Va&&typeof ReadableStream=="function",SD=Va&&(typeof TextEncoder=="function"?(n=>t=>n.encode(t))(new TextEncoder):async n=>new Uint8Array(await new Response(n).arrayBuffer())),Cm=(n,...t)=>{try{return!!n(...t)}catch{return!1}},ED=vm&&Cm(()=>{let n=!1;const t=new Request(Ce.origin,{body:new ReadableStream,method:"POST",get duplex(){return n=!0,"half"}}).headers.has("Content-Type");return n&&!t}),Sm=64*1024,pu=vm&&Cm(()=>R.isReadableStream(new Response("").body)),ja={stream:pu&&(n=>n.body)};Va&&(n=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!ja[t]&&(ja[t]=R.isFunction(n[t])?e=>e[t]():(e,s)=>{throw new at(`Response type '${t}' is not supported`,at.ERR_NOT_SUPPORT,s)})})})(new Response);const OD=async n=>{if(n==null)return 0;if(R.isBlob(n))return n.size;if(R.isSpecCompliantForm(n))return(await new Request(Ce.origin,{method:"POST",body:n}).arrayBuffer()).byteLength;if(R.isArrayBufferView(n)||R.isArrayBuffer(n))return n.byteLength;if(R.isURLSearchParams(n)&&(n=n+""),R.isString(n))return(await SD(n)).byteLength},MD=async(n,t)=>{const e=R.toFiniteNumber(n.getContentLength());return e??OD(t)},mu={http:Wk,xhr:bD,fetch:Va&&(async n=>{let{url:t,method:e,data:s,signal:r,cancelToken:i,timeout:o,onDownloadProgress:a,onUploadProgress:l,responseType:u,headers:h,withCredentials:f="same-origin",fetchOptions:d}=wm(n);u=u?(u+"").toLowerCase():"text";let g=wD([r,i&&i.toAbortSignal()],o),p;const m=g&&g.unsubscribe&&(()=>{g.unsubscribe()});let y;try{if(l&&ED&&e!=="get"&&e!=="head"&&(y=await MD(h,s))!==0){let S=new Request(t,{method:"POST",body:s,duplex:"half"}),E;if(R.isFormData(s)&&(E=S.headers.get("content-type"))&&h.setContentType(E),S.body){const[C,M]=pm(y,Ba(mm(l)));s=xm(S.body,Sm,C,M)}}R.isString(f)||(f=f?"include":"omit");const b="credentials"in Request.prototype;p=new Request(t,{...d,signal:g,method:e.toUpperCase(),headers:h.normalize().toJSON(),body:s,duplex:"half",credentials:b?f:void 0});let w=await fetch(p);const x=pu&&(u==="stream"||u==="response");if(pu&&(a||x&&m)){const S={};["status","statusText","headers"].forEach(T=>{S[T]=w[T]});const E=R.toFiniteNumber(w.headers.get("content-length")),[C,M]=a&&pm(E,Ba(mm(a),!0))||[];w=new Response(xm(w.body,Sm,C,()=>{M&&M(),m&&m()}),S)}u=u||"text";let v=await ja[R.findKey(ja,u)||"text"](w,n);return!x&&m&&m(),await new Promise((S,E)=>{gm(S,E,{data:v,headers:Se.from(w.headers),status:w.status,statusText:w.statusText,config:n,request:p})})}catch(b){throw m&&m(),b&&b.name==="TypeError"&&/fetch/i.test(b.message)?Object.assign(new at("Network Error",at.ERR_NETWORK,n,p),{cause:b.cause||b}):at.from(b,b&&b.code,n,p)}})};R.forEach(mu,(n,t)=>{if(n){try{Object.defineProperty(n,"name",{value:t})}catch{}Object.defineProperty(n,"adapterName",{value:t})}});const Em=n=>`- ${n}`,PD=n=>R.isFunction(n)||n===null||n===!1,Om={getAdapter:n=>{n=R.isArray(n)?n:[n];const{length:t}=n;let e,s;const r={};for(let i=0;i<t;i++){e=n[i];let o;if(s=e,!PD(e)&&(s=mu[(o=String(e)).toLowerCase()],s===void 0))throw new at(`Unknown adapter '${o}'`);if(s)break;r[o||"#"+i]=s}if(!s){const i=Object.entries(r).map(([a,l])=>`adapter ${a} `+(l===!1?"is not supported by the environment":"is not available in the build"));let o=t?i.length>1?`since :
|
|
32
32
|
`+i.map(Em).join(`
|
|
33
33
|
`):" "+Em(i[0]):"as no adapter specified";throw new at("There is no suitable adapter to dispatch the request "+o,"ERR_NOT_SUPPORT")}return s},adapters:mu};function yu(n){if(n.cancelToken&&n.cancelToken.throwIfRequested(),n.signal&&n.signal.aborted)throw new Dr(null,n)}function Mm(n){return yu(n),n.headers=Se.from(n.headers),n.data=gu.call(n,n.transformRequest),["post","put","patch"].indexOf(n.method)!==-1&&n.headers.setContentType("application/x-www-form-urlencoded",!1),Om.getAdapter(n.adapter||Ui.adapter)(n).then(function(s){return yu(n),s.data=gu.call(n,n.transformResponse,s),s.headers=Se.from(s.headers),s},function(s){return fm(s)||(yu(n),s&&s.response&&(s.response.data=gu.call(n,n.transformResponse,s.response),s.response.headers=Se.from(s.response.headers))),Promise.reject(s)})}const Pm="1.7.7",bu={};["object","boolean","number","function","string","symbol"].forEach((n,t)=>{bu[n]=function(s){return typeof s===n||"a"+(t<1?"n ":" ")+n}});const Am={};bu.transitional=function(t,e,s){function r(i,o){return"[Axios v"+Pm+"] Transitional option '"+i+"'"+o+(s?". "+s:"")}return(i,o,a)=>{if(t===!1)throw new at(r(o," has been removed"+(e?" in "+e:"")),at.ERR_DEPRECATED);return e&&!Am[o]&&(Am[o]=!0,console.warn(r(o," has been deprecated since v"+e+" and will be removed in the near future"))),t?t(i,o,a):!0}};function AD(n,t,e){if(typeof n!="object")throw new at("options must be an object",at.ERR_BAD_OPTION_VALUE);const s=Object.keys(n);let r=s.length;for(;r-- >0;){const i=s[r],o=t[i];if(o){const a=n[i],l=a===void 0||o(a,i,n);if(l!==!0)throw new at("option "+i+" must be "+l,at.ERR_BAD_OPTION_VALUE);continue}if(e!==!0)throw new at("Unknown option "+i,at.ERR_BAD_OPTION)}}const wu={assertOptions:AD,validators:bu},us=wu.validators;class Ys{constructor(t){this.defaults=t,this.interceptors={request:new cm,response:new cm}}async request(t,e){try{return await this._request(t,e)}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+=`
|
|
34
|
-
`+i):s.stack=i}catch{}}throw s}}_request(t,e){typeof t=="string"?(e=e||{},e.url=t):e=t||{},e=Gs(this.defaults,e);const{transitional:s,paramsSerializer:r,headers:i}=e;s!==void 0&&wu.assertOptions(s,{silentJSONParsing:us.transitional(us.boolean),forcedJSONParsing:us.transitional(us.boolean),clarifyTimeoutError:us.transitional(us.boolean)},!1),r!=null&&(R.isFunction(r)?e.paramsSerializer={serialize:r}:wu.assertOptions(r,{encode:us.function,serialize:us.function},!0)),e.method=(e.method||this.defaults.method||"get").toLowerCase();let o=i&&R.merge(i.common,i[e.method]);i&&R.forEach(["delete","get","head","post","put","patch","common"],p=>{delete i[p]}),e.headers=Se.concat(o,i);const a=[];let l=!0;this.interceptors.request.forEach(function(m){typeof m.runWhen=="function"&&m.runWhen(e)===!1||(l=l&&m.synchronous,a.unshift(m.fulfilled,m.rejected))});const u=[];this.interceptors.response.forEach(function(m){u.push(m.fulfilled,m.rejected)});let h,f=0,d;if(!l){const p=[Mm.bind(this),void 0];for(p.unshift.apply(p,a),p.push.apply(p,u),d=p.length,h=Promise.resolve(e);f<d;)h=h.then(p[f++],p[f++]);return h}d=a.length;let g=e;for(f=0;f<d;){const p=a[f++],m=a[f++];try{g=p(g)}catch(y){m.call(this,y);break}}try{h=Mm.call(this,g)}catch(p){return Promise.reject(p)}for(f=0,d=u.length;f<d;)h=h.then(u[f++],u[f++]);return h}getUri(t){t=Gs(this.defaults,t);const e=ym(t.baseURL,t.url);return lm(e,t.params,t.paramsSerializer)}}R.forEach(["delete","get","head","options"],function(t){Ys.prototype[t]=function(e,s){return this.request(Gs(s||{},{method:t,url:e,data:(s||{}).data}))}}),R.forEach(["post","put","patch"],function(t){function e(s){return function(i,o,a){return this.request(Gs(a||{},{method:t,headers:s?{"Content-Type":"multipart/form-data"}:{},url:i,data:o}))}}Ys.prototype[t]=e(),Ys.prototype[t+"Form"]=e(!0)});class xu{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let e;this.promise=new Promise(function(i){e=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},t(function(i,o,a){s.reason||(s.reason=new Dr(i,o,a),e(s.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const e=this._listeners.indexOf(t);e!==-1&&this._listeners.splice(e,1)}toAbortSignal(){const t=new AbortController,e=s=>{t.abort(s)};return this.subscribe(e),t.signal.unsubscribe=()=>this.unsubscribe(e),t.signal}static source(){let t;return{token:new xu(function(r){t=r}),cancel:t}}}function TD(n){return function(e){return n.apply(null,e)}}function ND(n){return R.isObject(n)&&n.isAxiosError===!0}const vu={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(vu).forEach(([n,t])=>{vu[t]=n});function Tm(n){const t=new Ys(n),e=Yp(Ys.prototype.request,t);return R.extend(e,Ys.prototype,t,{allOwnKeys:!0}),R.extend(e,t,null,{allOwnKeys:!0}),e.create=function(r){return Tm(Gs(n,r))},e}const Wt=Tm(Ui);Wt.Axios=Ys,Wt.CanceledError=Dr,Wt.CancelToken=xu,Wt.isCancel=fm,Wt.VERSION=Pm,Wt.toFormData=Ia,Wt.AxiosError=at,Wt.Cancel=Wt.CanceledError,Wt.all=function(t){return Promise.all(t)},Wt.spread=TD,Wt.isAxiosError=ND,Wt.mergeConfig=Gs,Wt.AxiosHeaders=Se,Wt.formToJSON=n=>hm(R.isHTMLForm(n)?new FormData(n):n),Wt.getAdapter=Om.getAdapter,Wt.HttpStatusCode=vu,Wt.default=Wt;const hs=Wt.create({baseURL:"http://localhost:8001",timeout:1e4,headers:{"Content-Type":"application/json"}}),_D=n=>{hs.defaults.baseURL=n},kD=n=>{hs.interceptors.request.use(t=>{if(n)return t.headers.token=n,t},t=>Promise.reject(t))};hs.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 Yi=(n,t={})=>hs.get(n,{params:t}),$a=(n,t={})=>hs.post(n,t),Nm=(n,t={})=>hs.delete(n,{params:t}),DD=(n,t={})=>hs.post(n,t,{headers:{"Content-Type":"multipart/form-data"}}),Wi=(n,t)=>{const e=document.querySelector(n),s=e.querySelectorAll(".x6-port-body"),r=e.querySelectorAll(".x6-port-label");for(let i=0,o=s.length;i<o;i+=1)s[i].style.visibility=t?"visible":"hidden";for(let i=0,o=r.length;i<o;i+=1)r[i].style.visibility=t?"visible":"hidden"},_m=()=>Yi("/cny/template/selectOne",{id:36}).then(n=>{if(n!=null&&n.isOk){const t=JSON.parse(n.data.remark);return{background:t.background,grid:t.grid,data:t.data}}else Bt.error((n==null?void 0:n.msg)||"获取失败")}),RD=n=>$a("/cny/custom/arrRealData",n).then(t=>{if(t!=null&&t.isOk)return t.data;Bt.error((t==null?void 0:t.msg)||"获取失败")}),km={color:"#000000"},Dm={size:10,visible:!1,type:"doubleMesh",args:[{color:"#282828",thickness:1},{color:"#363636",thickness:2,factor:4}]},ID={stencilGraphWidth:300,stencilGraphHeight:0,layoutOptions:{columns:3,columnWidth:70,resizeToFit:!0}},za={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:"文本",field:[]},ports:{groups:{ports:{portOption:za}}}},Cu={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}},ports:{groups:{ports:{portOption:za}}}},Gn=(n,t)=>{const e=n.__vccOpts||n;for(const[s,r]of t)e[s]=r;return e},BD={class:"control"},VD={class:"row-column"},jD=Gn({__name:"index",props:{payload:Object},setup(n){var d,g,p,m,y,b,w,x,v,S,E,C,M,T,k,_,D,N,V,A,P;const t=n;console.log(t.payload.value.options.grid);const e=c.ref(((d=t.payload.value.options.background)==null?void 0:d.color)||null),s=c.ref(((p=(g=t.payload.value.options)==null?void 0:g.grid)==null?void 0:p.visible)||null),r=c.ref(((y=(m=t.payload.value.options)==null?void 0:m.grid)==null?void 0:y.size)||10),i=c.ref(((v=(x=(w=(b=t.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=c.ref(((M=(C=(E=(S=t.payload.value.options)==null?void 0:S.grid)==null?void 0:E.args)==null?void 0:C[0])==null?void 0:M.thickness)||1),a=c.ref(((D=(_=(k=(T=t.payload.value.options)==null?void 0:T.grid)==null?void 0:k.args)==null?void 0:_[1])==null?void 0:D.color)||null),l=c.ref(((P=(A=(V=(N=t.payload.value.options)==null?void 0:N.grid)==null?void 0:V.args)==null?void 0:A[1])==null?void 0:P.thickness)||1),u=c.ref("1"),h=L=>{t.payload.value.drawBackground({color:L})},f=()=>{t.payload.value.drawGrid({visible:s.value,size:r.value,type:"doubleMesh",args:[{color:i.value,thickness:o.value},{color:a.value,thickness:l.value}]})};return(L,j)=>{const Y=c.resolveComponent("el-col"),ot=c.resolveComponent("el-color-picker"),F=c.resolveComponent("el-row"),H=c.resolveComponent("el-switch"),B=c.resolveComponent("el-input-number"),K=c.resolveComponent("el-collapse-item"),nt=c.resolveComponent("el-collapse");return c.openBlock(),c.createElementBlock("div",BD,[c.createVNode(nt,{modelValue:u.value,"onUpdate:modelValue":j[7]||(j[7]=rt=>u.value=rt),accordion:""},{default:c.withCtx(()=>[c.createVNode(K,{title:"基础属性",name:"1"},{default:c.withCtx(()=>[c.createElementVNode("div",VD,[c.createVNode(F,{gutter:20},{default:c.withCtx(()=>[c.createVNode(Y,{span:12},{default:c.withCtx(()=>j[8]||(j[8]=[c.createElementVNode("div",{class:"row-label"},"背景色",-1)])),_:1}),c.createVNode(Y,{span:12},{default:c.withCtx(()=>[c.createVNode(ot,{modelValue:e.value,"onUpdate:modelValue":j[0]||(j[0]=rt=>e.value=rt),size:"small","show-alpha":"",onChange:h},null,8,["modelValue"])]),_:1})]),_:1}),c.createVNode(F,{gutter:20},{default:c.withCtx(()=>[c.createVNode(Y,{span:12},{default:c.withCtx(()=>j[9]||(j[9]=[c.createElementVNode("div",{class:"row-label"},"网格",-1)])),_:1}),c.createVNode(Y,{span:12},{default:c.withCtx(()=>[c.createVNode(H,{modelValue:s.value,"onUpdate:modelValue":j[1]||(j[1]=rt=>s.value=rt),"active-value":!0,"inactive-value":!1,size:"small",onChange:f},null,8,["modelValue"])]),_:1})]),_:1}),c.createVNode(F,{gutter:20},{default:c.withCtx(()=>[c.createVNode(Y,{span:12},{default:c.withCtx(()=>j[10]||(j[10]=[c.createElementVNode("div",{class:"row-label"},"网格大小",-1)])),_:1}),c.createVNode(Y,{span:12},{default:c.withCtx(()=>[c.createVNode(B,{modelValue:r.value,"onUpdate:modelValue":j[2]||(j[2]=rt=>r.value=rt),min:1,max:20,size:"small","controls-position":"right",onChange:f},null,8,["modelValue"])]),_:1})]),_:1}),c.createVNode(F,{gutter:20},{default:c.withCtx(()=>[c.createVNode(Y,{span:12},{default:c.withCtx(()=>j[11]||(j[11]=[c.createElementVNode("div",{class:"row-label"},"主网格颜色",-1)])),_:1}),c.createVNode(Y,{span:12},{default:c.withCtx(()=>[c.createVNode(ot,{modelValue:i.value,"onUpdate:modelValue":j[3]||(j[3]=rt=>i.value=rt),size:"small","show-alpha":"",onChange:f},null,8,["modelValue"])]),_:1})]),_:1}),c.createVNode(F,{gutter:20},{default:c.withCtx(()=>[c.createVNode(Y,{span:12},{default:c.withCtx(()=>j[12]||(j[12]=[c.createElementVNode("div",{class:"row-label"},"次网格颜色",-1)])),_:1}),c.createVNode(Y,{span:12},{default:c.withCtx(()=>[c.createVNode(ot,{modelValue:a.value,"onUpdate:modelValue":j[4]||(j[4]=rt=>a.value=rt),size:"small","show-alpha":"",onChange:f},null,8,["modelValue"])]),_:1})]),_:1}),c.createVNode(F,{gutter:20},{default:c.withCtx(()=>[c.createVNode(Y,{span:12},{default:c.withCtx(()=>j[13]||(j[13]=[c.createElementVNode("div",{class:"row-label"},"主网格粗细",-1)])),_:1}),c.createVNode(Y,{span:12},{default:c.withCtx(()=>[c.createVNode(B,{modelValue:o.value,"onUpdate:modelValue":j[5]||(j[5]=rt=>o.value=rt),min:.5,max:10,size:"small","controls-position":"right",onChange:f},null,8,["modelValue"])]),_:1})]),_:1}),c.createVNode(F,{gutter:20},{default:c.withCtx(()=>[c.createVNode(Y,{span:12},{default:c.withCtx(()=>j[14]||(j[14]=[c.createElementVNode("div",{class:"row-label"},"次网格粗细",-1)])),_:1}),c.createVNode(Y,{span:12},{default:c.withCtx(()=>[c.createVNode(B,{modelValue:l.value,"onUpdate:modelValue":j[6]||(j[6]=rt=>l.value=rt),min:.5,max:10,size:"small","controls-position":"right",onChange:f},null,8,["modelValue"])]),_:1})]),_:1})])]),_:1})]),_:1},8,["modelValue"])])}}},[["__scopeId","data-v-270b8aa5"]]),$D={class:"control"},zD={class:"row-column"},FD={class:"row-column"},Rm=Gn(Object.assign({name:"text-control"},{__name:"index",props:{payload:Object},setup(n){var j,Y,ot,F;const t=n,e=c.ref((j=t.payload.attrs.label)!=null&&j.textAnchor?"0":"1"),s=c.ref([]),r=c.ref([]),i=()=>{Yi("/cny/custom/deviceList").then(H=>{s.value=H.data})},o=c.ref();let a=c.reactive({});const l=()=>{a=s.value.find(H=>H.deviceCode===o.value),a&&u()},u=()=>{Yi("/cny/custom/monitorInfo",{deviceCode:a.deviceCode,fieldType:1}).then(H=>{r.value=H.data})},h=/\$\{(.*?)\}/g,f=H=>H.replace(h,"--"),d=H=>{iu.confirm(`是否确定要添加${a.deviceName}-${H.name}?
|
|
34
|
+
`+i):s.stack=i}catch{}}throw s}}_request(t,e){typeof t=="string"?(e=e||{},e.url=t):e=t||{},e=Gs(this.defaults,e);const{transitional:s,paramsSerializer:r,headers:i}=e;s!==void 0&&wu.assertOptions(s,{silentJSONParsing:us.transitional(us.boolean),forcedJSONParsing:us.transitional(us.boolean),clarifyTimeoutError:us.transitional(us.boolean)},!1),r!=null&&(R.isFunction(r)?e.paramsSerializer={serialize:r}:wu.assertOptions(r,{encode:us.function,serialize:us.function},!0)),e.method=(e.method||this.defaults.method||"get").toLowerCase();let o=i&&R.merge(i.common,i[e.method]);i&&R.forEach(["delete","get","head","post","put","patch","common"],p=>{delete i[p]}),e.headers=Se.concat(o,i);const a=[];let l=!0;this.interceptors.request.forEach(function(m){typeof m.runWhen=="function"&&m.runWhen(e)===!1||(l=l&&m.synchronous,a.unshift(m.fulfilled,m.rejected))});const u=[];this.interceptors.response.forEach(function(m){u.push(m.fulfilled,m.rejected)});let h,f=0,d;if(!l){const p=[Mm.bind(this),void 0];for(p.unshift.apply(p,a),p.push.apply(p,u),d=p.length,h=Promise.resolve(e);f<d;)h=h.then(p[f++],p[f++]);return h}d=a.length;let g=e;for(f=0;f<d;){const p=a[f++],m=a[f++];try{g=p(g)}catch(y){m.call(this,y);break}}try{h=Mm.call(this,g)}catch(p){return Promise.reject(p)}for(f=0,d=u.length;f<d;)h=h.then(u[f++],u[f++]);return h}getUri(t){t=Gs(this.defaults,t);const e=ym(t.baseURL,t.url);return lm(e,t.params,t.paramsSerializer)}}R.forEach(["delete","get","head","options"],function(t){Ys.prototype[t]=function(e,s){return this.request(Gs(s||{},{method:t,url:e,data:(s||{}).data}))}}),R.forEach(["post","put","patch"],function(t){function e(s){return function(i,o,a){return this.request(Gs(a||{},{method:t,headers:s?{"Content-Type":"multipart/form-data"}:{},url:i,data:o}))}}Ys.prototype[t]=e(),Ys.prototype[t+"Form"]=e(!0)});class xu{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let e;this.promise=new Promise(function(i){e=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},t(function(i,o,a){s.reason||(s.reason=new Dr(i,o,a),e(s.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const e=this._listeners.indexOf(t);e!==-1&&this._listeners.splice(e,1)}toAbortSignal(){const t=new AbortController,e=s=>{t.abort(s)};return this.subscribe(e),t.signal.unsubscribe=()=>this.unsubscribe(e),t.signal}static source(){let t;return{token:new xu(function(r){t=r}),cancel:t}}}function TD(n){return function(e){return n.apply(null,e)}}function ND(n){return R.isObject(n)&&n.isAxiosError===!0}const vu={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(vu).forEach(([n,t])=>{vu[t]=n});function Tm(n){const t=new Ys(n),e=Yp(Ys.prototype.request,t);return R.extend(e,Ys.prototype,t,{allOwnKeys:!0}),R.extend(e,t,null,{allOwnKeys:!0}),e.create=function(r){return Tm(Gs(n,r))},e}const Wt=Tm(Ui);Wt.Axios=Ys,Wt.CanceledError=Dr,Wt.CancelToken=xu,Wt.isCancel=fm,Wt.VERSION=Pm,Wt.toFormData=Ia,Wt.AxiosError=at,Wt.Cancel=Wt.CanceledError,Wt.all=function(t){return Promise.all(t)},Wt.spread=TD,Wt.isAxiosError=ND,Wt.mergeConfig=Gs,Wt.AxiosHeaders=Se,Wt.formToJSON=n=>hm(R.isHTMLForm(n)?new FormData(n):n),Wt.getAdapter=Om.getAdapter,Wt.HttpStatusCode=vu,Wt.default=Wt;const hs=Wt.create({baseURL:"http://localhost:8001",timeout:1e4,headers:{"Content-Type":"application/json"}}),_D=n=>{hs.defaults.baseURL=n},kD=n=>{hs.interceptors.request.use(t=>{if(n)return t.headers.token=n,t},t=>Promise.reject(t))};hs.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 Yi=(n,t={})=>hs.get(n,{params:t}),$a=(n,t={})=>hs.post(n,t),Nm=(n,t={})=>hs.delete(n,{params:t}),DD=(n,t={})=>hs.post(n,t,{headers:{"Content-Type":"multipart/form-data"}}),Wi=(n,t)=>{const e=document.querySelector(n),s=e.querySelectorAll(".x6-port-body"),r=e.querySelectorAll(".x6-port-label");for(let i=0,o=s.length;i<o;i+=1)s[i].style.visibility=t?"visible":"hidden";for(let i=0,o=r.length;i<o;i+=1)r[i].style.visibility=t?"visible":"hidden"},_m=n=>Yi("/cny/template/selectOne",{id:n}).then(t=>{if(t!=null&&t.isOk){const e=JSON.parse(t.data.remark);return{background:e.background,grid:e.grid,data:e.data}}else Bt.error((t==null?void 0:t.msg)||"获取失败")}),RD=n=>$a("/cny/custom/arrRealData",n).then(t=>{if(t!=null&&t.isOk)return t.data;Bt.error((t==null?void 0:t.msg)||"获取失败")}),km={color:"#000000"},Dm={size:10,visible:!1,type:"doubleMesh",args:[{color:"#282828",thickness:1},{color:"#363636",thickness:2,factor:4}]},ID={stencilGraphWidth:300,stencilGraphHeight:0,layoutOptions:{columns:3,columnWidth:70,resizeToFit:!0}},za={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:"文本",field:[]},ports:{groups:{ports:{portOption:za}}}},Cu={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}},ports:{groups:{ports:{portOption:za}}}},Gn=(n,t)=>{const e=n.__vccOpts||n;for(const[s,r]of t)e[s]=r;return e},BD={class:"control"},VD={class:"row-column"},jD=Gn({__name:"index",props:{payload:Object},setup(n){var d,g,p,m,y,b,w,x,v,S,E,C,M,T,k,_,D,N,V,A,P;const t=n;console.log(t.payload.value.options.grid);const e=c.ref(((d=t.payload.value.options.background)==null?void 0:d.color)||null),s=c.ref(((p=(g=t.payload.value.options)==null?void 0:g.grid)==null?void 0:p.visible)||null),r=c.ref(((y=(m=t.payload.value.options)==null?void 0:m.grid)==null?void 0:y.size)||10),i=c.ref(((v=(x=(w=(b=t.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=c.ref(((M=(C=(E=(S=t.payload.value.options)==null?void 0:S.grid)==null?void 0:E.args)==null?void 0:C[0])==null?void 0:M.thickness)||1),a=c.ref(((D=(_=(k=(T=t.payload.value.options)==null?void 0:T.grid)==null?void 0:k.args)==null?void 0:_[1])==null?void 0:D.color)||null),l=c.ref(((P=(A=(V=(N=t.payload.value.options)==null?void 0:N.grid)==null?void 0:V.args)==null?void 0:A[1])==null?void 0:P.thickness)||1),u=c.ref("1"),h=L=>{t.payload.value.drawBackground({color:L})},f=()=>{t.payload.value.drawGrid({visible:s.value,size:r.value,type:"doubleMesh",args:[{color:i.value,thickness:o.value},{color:a.value,thickness:l.value}]})};return(L,j)=>{const Y=c.resolveComponent("el-col"),ot=c.resolveComponent("el-color-picker"),F=c.resolveComponent("el-row"),H=c.resolveComponent("el-switch"),B=c.resolveComponent("el-input-number"),K=c.resolveComponent("el-collapse-item"),nt=c.resolveComponent("el-collapse");return c.openBlock(),c.createElementBlock("div",BD,[c.createVNode(nt,{modelValue:u.value,"onUpdate:modelValue":j[7]||(j[7]=rt=>u.value=rt),accordion:""},{default:c.withCtx(()=>[c.createVNode(K,{title:"基础属性",name:"1"},{default:c.withCtx(()=>[c.createElementVNode("div",VD,[c.createVNode(F,{gutter:20},{default:c.withCtx(()=>[c.createVNode(Y,{span:12},{default:c.withCtx(()=>j[8]||(j[8]=[c.createElementVNode("div",{class:"row-label"},"背景色",-1)])),_:1}),c.createVNode(Y,{span:12},{default:c.withCtx(()=>[c.createVNode(ot,{modelValue:e.value,"onUpdate:modelValue":j[0]||(j[0]=rt=>e.value=rt),size:"small","show-alpha":"",onChange:h},null,8,["modelValue"])]),_:1})]),_:1}),c.createVNode(F,{gutter:20},{default:c.withCtx(()=>[c.createVNode(Y,{span:12},{default:c.withCtx(()=>j[9]||(j[9]=[c.createElementVNode("div",{class:"row-label"},"网格",-1)])),_:1}),c.createVNode(Y,{span:12},{default:c.withCtx(()=>[c.createVNode(H,{modelValue:s.value,"onUpdate:modelValue":j[1]||(j[1]=rt=>s.value=rt),"active-value":!0,"inactive-value":!1,size:"small",onChange:f},null,8,["modelValue"])]),_:1})]),_:1}),c.createVNode(F,{gutter:20},{default:c.withCtx(()=>[c.createVNode(Y,{span:12},{default:c.withCtx(()=>j[10]||(j[10]=[c.createElementVNode("div",{class:"row-label"},"网格大小",-1)])),_:1}),c.createVNode(Y,{span:12},{default:c.withCtx(()=>[c.createVNode(B,{modelValue:r.value,"onUpdate:modelValue":j[2]||(j[2]=rt=>r.value=rt),min:1,max:20,size:"small","controls-position":"right",onChange:f},null,8,["modelValue"])]),_:1})]),_:1}),c.createVNode(F,{gutter:20},{default:c.withCtx(()=>[c.createVNode(Y,{span:12},{default:c.withCtx(()=>j[11]||(j[11]=[c.createElementVNode("div",{class:"row-label"},"主网格颜色",-1)])),_:1}),c.createVNode(Y,{span:12},{default:c.withCtx(()=>[c.createVNode(ot,{modelValue:i.value,"onUpdate:modelValue":j[3]||(j[3]=rt=>i.value=rt),size:"small","show-alpha":"",onChange:f},null,8,["modelValue"])]),_:1})]),_:1}),c.createVNode(F,{gutter:20},{default:c.withCtx(()=>[c.createVNode(Y,{span:12},{default:c.withCtx(()=>j[12]||(j[12]=[c.createElementVNode("div",{class:"row-label"},"次网格颜色",-1)])),_:1}),c.createVNode(Y,{span:12},{default:c.withCtx(()=>[c.createVNode(ot,{modelValue:a.value,"onUpdate:modelValue":j[4]||(j[4]=rt=>a.value=rt),size:"small","show-alpha":"",onChange:f},null,8,["modelValue"])]),_:1})]),_:1}),c.createVNode(F,{gutter:20},{default:c.withCtx(()=>[c.createVNode(Y,{span:12},{default:c.withCtx(()=>j[13]||(j[13]=[c.createElementVNode("div",{class:"row-label"},"主网格粗细",-1)])),_:1}),c.createVNode(Y,{span:12},{default:c.withCtx(()=>[c.createVNode(B,{modelValue:o.value,"onUpdate:modelValue":j[5]||(j[5]=rt=>o.value=rt),min:.5,max:10,size:"small","controls-position":"right",onChange:f},null,8,["modelValue"])]),_:1})]),_:1}),c.createVNode(F,{gutter:20},{default:c.withCtx(()=>[c.createVNode(Y,{span:12},{default:c.withCtx(()=>j[14]||(j[14]=[c.createElementVNode("div",{class:"row-label"},"次网格粗细",-1)])),_:1}),c.createVNode(Y,{span:12},{default:c.withCtx(()=>[c.createVNode(B,{modelValue:l.value,"onUpdate:modelValue":j[6]||(j[6]=rt=>l.value=rt),min:.5,max:10,size:"small","controls-position":"right",onChange:f},null,8,["modelValue"])]),_:1})]),_:1})])]),_:1})]),_:1},8,["modelValue"])])}}},[["__scopeId","data-v-270b8aa5"]]),$D={class:"control"},zD={class:"row-column"},FD={class:"row-column"},Rm=Gn(Object.assign({name:"text-control"},{__name:"index",props:{payload:Object},setup(n){var j,Y,ot,F;const t=n,e=c.ref((j=t.payload.attrs.label)!=null&&j.textAnchor?"0":"1"),s=c.ref([]),r=c.ref([]),i=()=>{Yi("/cny/custom/deviceList").then(H=>{s.value=H.data})},o=c.ref();let a=c.reactive({});const l=()=>{a=s.value.find(H=>H.deviceCode===o.value),a&&u()},u=()=>{Yi("/cny/custom/monitorInfo",{deviceCode:a.deviceCode,fieldType:1}).then(H=>{r.value=H.data})},h=/\$\{(.*?)\}/g,f=H=>H.replace(h,"--"),d=H=>{iu.confirm(`是否确定要添加${a.deviceName}-${H.name}?
|
|
35
35
|
添加后为:--${H.unit??""}`,"提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(()=>{const B=H.unit??"",K=t.payload.data.content;t.payload.data.content=g.value=K+"${"+a.deviceName+"."+H.name+"}"+B;const nt=K.match(h),rt=(nt==null?void 0:nt.length)||0;t.payload.data.field.push({index:rt,deviceName:a.deviceName,deviceCode:a.deviceCode,field:H.dataField}),t.payload.label=f(t.payload.data.content),console.log("label:",t.payload.label,"content:",t.payload.data.content,"field:",t.payload.data.field)})},g=c.ref(t.payload.data.content||null),p=c.ref(t.payload.attrs.body.fill||null),m=c.ref(t.payload.attrs.body.stroke||null),y=c.ref(t.payload.attrs.body.strokeWidth||null),b=c.ref(t.payload.attrs.body.rx||null),w=c.ref(t.payload.attrs.body.ry||null),x=c.ref(t.payload.attrs.text.fill||null),v=c.ref(t.payload.attrs.text.fontSize||null),S=c.ref(((Y=t.payload.attrs.label)==null?void 0:Y.textAnchor)||null),E=c.ref(((ot=t.payload.attrs.label)==null?void 0:ot.x)||null),C=c.ref(((F=t.payload.attrs.label)==null?void 0:F.y)||null),M=()=>{t.payload.attr("body/fill",p.value),t.payload.attr("body/stroke",m.value),t.payload.attr("body/strokeWidth",y.value),t.payload.attr("body/rx",b.value),t.payload.attr("body/ry",w.value),t.payload.attr("text/fill",x.value),t.payload.attr("text/fontSize",v.value),t.payload.attr("label/textAnchor",S.value),t.payload.attr("label/x",E.value),t.payload.attr("label/y",C.value)},T=c.ref(null),k=()=>{if(t.payload.data.content.length>g.value.length&&t.payload.data.content.endsWith("}")){const H=t.payload.data.content.match(h);if(H){const B=H.length-1;t.payload.data.field.splice(B,1),g.value=t.payload.data.content.substring(0,t.payload.data.content.lastIndexOf("${"))}}t.payload.data.content=g.value,t.payload.label=f(g.value)},_=()=>{if(T.value){const H=T.value.$refs.textarea;H.focus();const B=g.value.length;H.setSelectionRange(B,B)}},D=c.ref([]),N=()=>{D.value=JSON.parse(JSON.stringify(t.payload.getPorts().map(H=>({id:H.id,attrs:H.attrs,args:{x:Number(H.args.x.replace("%","")),y:Number(H.args.y.replace("%",""))}}))))},V=()=>{const H=za;H.attrs.text.text=`${t.payload.getPorts().length+1}`,H.args.x="50%",H.args.y="50%",t.payload.addPorts([{group:"ports",...H}]),N()},A=()=>{Wi("#drawing-board",!0)},P=(H,B,K)=>{t.payload.portProp(H,"args/"+B,K+"%"),N()},L=H=>{t.payload.removePort(H),N()};return c.onMounted(()=>{N(),i(),document.addEventListener("selectionchange",()=>{document.activeElement.tagName==="TEXTAREA"&&_()})}),(H,B)=>{const K=c.resolveComponent("el-input"),nt=c.resolveComponent("el-alert"),rt=c.resolveComponent("el-option"),et=c.resolveComponent("el-select"),ft=c.resolveComponent("el-table-column"),ge=c.resolveComponent("el-table"),St=c.resolveComponent("el-collapse-item"),xt=c.resolveComponent("el-col"),An=c.resolveComponent("el-color-picker"),pe=c.resolveComponent("el-row"),dn=c.resolveComponent("el-input-number"),Ts=c.resolveComponent("el-button"),Ns=c.resolveComponent("el-slider"),ai=c.resolveComponent("el-icon"),li=c.resolveComponent("el-collapse");return c.openBlock(),c.createElementBlock("div",$D,[c.createVNode(li,{modelValue:e.value,"onUpdate:modelValue":B[12]||(B[12]=st=>e.value=st),accordion:""},{default:c.withCtx(()=>[n.payload.data.type==="text"?(c.openBlock(),c.createBlock(St,{key:0,title:"文本内容",name:"0"},{default:c.withCtx(()=>[c.createVNode(K,{ref_key:"inputRef",ref:T,type:"textarea",modelValue:g.value,"onUpdate:modelValue":B[0]||(B[0]=st=>g.value=st),onInput:k,onFocus:_,rows:10},null,8,["modelValue"]),c.createVNode(nt,{type:"info",title:"提示",description:"请先选择设备,再选择字段,最后点击确定按钮,即可绑定设备数据。绑定完成后会由 $<> 进行包裹!",style:{"margin-top":"20px"}}),c.createVNode(et,{modelValue:o.value,"onUpdate:modelValue":B[1]||(B[1]=st=>o.value=st),placeholder:"请选择设备",onChange:l,filterable:"",clearable:"",style:{"margin-top":"20px"}},{default:c.withCtx(()=>[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(s.value,st=>(c.openBlock(),c.createBlock(rt,{key:st.deviceCode,label:st.deviceName,value:st.deviceCode},null,8,["label","value"]))),128))]),_:1},8,["modelValue"]),c.createVNode(ge,{data:r.value,border:"",style:{"margin-top":"20px"},size:"small",height:"500",onRowClick:d},{default:c.withCtx(()=>[c.createVNode(ft,{type:"index",label:"序号",width:"50",align:"center"}),c.createVNode(ft,{prop:"name",label:"字段名称","show-overflow-tooltip":""}),c.createVNode(ft,{prop:"dataField",label:"字段编码","show-overflow-tooltip":""}),c.createVNode(ft,{prop:"unit",label:"单位",width:"50"})]),_:1},8,["data"])]),_:1})):c.createCommentVNode("",!0),c.createVNode(St,{title:"图形设置",name:"1"},{default:c.withCtx(()=>[c.createElementVNode("div",zD,[c.createVNode(pe,{gutter:20},{default:c.withCtx(()=>[c.createVNode(xt,{span:12},{default:c.withCtx(()=>B[13]||(B[13]=[c.createElementVNode("div",{class:"row-label"},"背景颜色",-1)])),_:1}),c.createVNode(xt,{span:12},{default:c.withCtx(()=>[c.createVNode(An,{modelValue:p.value,"onUpdate:modelValue":B[2]||(B[2]=st=>p.value=st),"show-alpha":!0,size:"small",onChange:M},null,8,["modelValue"])]),_:1})]),_:1}),c.createVNode(pe,{gutter:20},{default:c.withCtx(()=>[c.createVNode(xt,{span:12},{default:c.withCtx(()=>B[14]||(B[14]=[c.createElementVNode("div",{class:"row-label"},"边框颜色",-1)])),_:1}),c.createVNode(xt,{span:12},{default:c.withCtx(()=>[c.createVNode(An,{modelValue:m.value,"onUpdate:modelValue":B[3]||(B[3]=st=>m.value=st),"show-alpha":!0,size:"small",onChange:M},null,8,["modelValue"])]),_:1})]),_:1}),c.createVNode(pe,{gutter:20},{default:c.withCtx(()=>[c.createVNode(xt,{span:12},{default:c.withCtx(()=>B[15]||(B[15]=[c.createElementVNode("div",{class:"row-label"},"边框宽度",-1)])),_:1}),c.createVNode(xt,{span:12},{default:c.withCtx(()=>[c.createVNode(dn,{modelValue:y.value,"onUpdate:modelValue":B[4]||(B[4]=st=>y.value=st),size:"small","controls-position":"right",onChange:M,min:0,max:10,step:1},null,8,["modelValue"])]),_:1})]),_:1}),c.createVNode(pe,{gutter:20},{default:c.withCtx(()=>[c.createVNode(xt,{span:12},{default:c.withCtx(()=>B[16]||(B[16]=[c.createElementVNode("div",{class:"row-label"},"背景圆角rx",-1)])),_:1}),c.createVNode(xt,{span:12},{default:c.withCtx(()=>[c.createVNode(dn,{modelValue:b.value,"onUpdate:modelValue":B[5]||(B[5]=st=>b.value=st),size:"small","controls-position":"right",onChange:M,min:0,max:50,step:1},null,8,["modelValue"])]),_:1})]),_:1}),c.createVNode(pe,{gutter:20},{default:c.withCtx(()=>[c.createVNode(xt,{span:12},{default:c.withCtx(()=>B[17]||(B[17]=[c.createElementVNode("div",{class:"row-label"},"背景圆角ry",-1)])),_:1}),c.createVNode(xt,{span:12},{default:c.withCtx(()=>[c.createVNode(dn,{modelValue:w.value,"onUpdate:modelValue":B[6]||(B[6]=st=>w.value=st),size:"small","controls-position":"right",onChange:M,min:0,max:50,step:1},null,8,["modelValue"])]),_:1})]),_:1})])]),_:1}),n.payload.data.type==="text"?(c.openBlock(),c.createBlock(St,{key:1,title:"文字设置",name:"2"},{default:c.withCtx(()=>[c.createElementVNode("div",FD,[c.createVNode(pe,{gutter:20},{default:c.withCtx(()=>[c.createVNode(xt,{span:12},{default:c.withCtx(()=>B[18]||(B[18]=[c.createElementVNode("div",{class:"row-label"},"字体颜色",-1)])),_:1}),c.createVNode(xt,{span:12},{default:c.withCtx(()=>[c.createVNode(An,{modelValue:x.value,"onUpdate:modelValue":B[7]||(B[7]=st=>x.value=st),"show-alpha":!0,size:"small",onChange:M},null,8,["modelValue"])]),_:1})]),_:1}),c.createVNode(pe,{gutter:20},{default:c.withCtx(()=>[c.createVNode(xt,{span:12},{default:c.withCtx(()=>B[19]||(B[19]=[c.createElementVNode("div",{class:"row-label"},"字体大小",-1)])),_:1}),c.createVNode(xt,{span:12},{default:c.withCtx(()=>[c.createVNode(dn,{modelValue:v.value,"onUpdate:modelValue":B[8]||(B[8]=st=>v.value=st),size:"small","controls-position":"right",onChange:M,min:12,max:48,step:2},null,8,["modelValue"])]),_:1})]),_:1}),c.createVNode(pe,{gutter:20},{default:c.withCtx(()=>[c.createVNode(xt,{span:12},{default:c.withCtx(()=>B[20]||(B[20]=[c.createElementVNode("div",{class:"row-label"},"对齐方式",-1)])),_:1}),c.createVNode(xt,{span:12},{default:c.withCtx(()=>[c.createVNode(et,{modelValue:S.value,"onUpdate:modelValue":B[9]||(B[9]=st=>S.value=st),size:"small",onChange:M},{default:c.withCtx(()=>[(c.openBlock(),c.createElementBlock(c.Fragment,null,c.renderList(["start","middle","end"],st=>c.createVNode(rt,{key:st,label:st,value:st},null,8,["label","value"])),64))]),_:1},8,["modelValue"])]),_:1})]),_:1}),c.createVNode(pe,{gutter:20},{default:c.withCtx(()=>[c.createVNode(xt,{span:12},{default:c.withCtx(()=>B[21]||(B[21]=[c.createElementVNode("div",{class:"row-label"},"x轴偏移",-1)])),_:1}),c.createVNode(xt,{span:12},{default:c.withCtx(()=>[c.createVNode(dn,{modelValue:E.value,"onUpdate:modelValue":B[10]||(B[10]=st=>E.value=st),size:"small","controls-position":"right",onChange:M,min:0,max:100,step:1},null,8,["modelValue"])]),_:1})]),_:1}),c.createVNode(pe,{gutter:20},{default:c.withCtx(()=>[c.createVNode(xt,{span:12},{default:c.withCtx(()=>B[22]||(B[22]=[c.createElementVNode("div",{class:"row-label"},"y轴偏移",-1)])),_:1}),c.createVNode(xt,{span:12},{default:c.withCtx(()=>[c.createVNode(dn,{modelValue:C.value,"onUpdate:modelValue":B[11]||(B[11]=st=>C.value=st),size:"small","controls-position":"right",onChange:M,min:0,max:100,step:1},null,8,["modelValue"])]),_:1})]),_:1})])]),_:1})):c.createCommentVNode("",!0),c.createVNode(St,{title:"连接桩设置",name:"3"},{default:c.withCtx(()=>[c.createVNode(Ts,{type:"primary",onClick:V,size:"small"},{default:c.withCtx(()=>B[23]||(B[23]=[c.createTextVNode("添加连接桩")])),_:1}),c.createVNode(Ts,{type:"primary",onClick:A,size:"small"},{default:c.withCtx(()=>B[24]||(B[24]=[c.createTextVNode("显示连接桩")])),_:1}),c.createVNode(ge,{data:D.value,border:"",size:"small",style:{"margin-top":"10px"}},{default:c.withCtx(()=>[c.createVNode(ft,{label:"ID",width:"50",align:"center"},{default:c.withCtx(({row:st})=>[c.createTextVNode(c.toDisplayString(st.attrs.text.text),1)]),_:1}),c.createVNode(ft,{label:"x",width:"100",align:"center"},{default:c.withCtx(({row:st})=>[c.createVNode(Ns,{modelValue:st.args.x,"onUpdate:modelValue":ie=>st.args.x=ie,min:0,max:100,step:1,onInput:ie=>P(st.id,"x",ie)},null,8,["modelValue","onUpdate:modelValue","onInput"])]),_:1}),c.createVNode(ft,{label:"y",width:"100",align:"center"},{default:c.withCtx(({row:st})=>[c.createVNode(Ns,{modelValue:st.args.y,"onUpdate:modelValue":ie=>st.args.y=ie,min:0,max:100,step:1,onInput:ie=>P(st.id,"y",ie)},null,8,["modelValue","onUpdate:modelValue","onInput"])]),_:1}),c.createVNode(ft,{label:"操作",align:"center"},{default:c.withCtx(({row:st})=>[c.createVNode(Ts,{type:"danger",size:"small",onClick:ie=>L(st.id)},{default:c.withCtx(()=>[c.createVNode(ai,null,{default:c.withCtx(()=>[c.createVNode(c.unref(xg))]),_:1})]),_:2},1032,["onClick"])]),_:1})]),_:1},8,["data"])]),_:1})]),_:1},8,["modelValue"])])}}}),[["__scopeId","data-v-764721f9"]]),HD={class:"container"},UD={class:"row-column"},GD={class:"row-column"},YD={class:"row-column"},WD=Gn({__name:"index",props:{payload:Object},setup(n){var l,u,h,f;const t=n,e=c.ref(t.payload.attrs.line.stroke),s=c.reactive({name:((l=t.payload.attrs.line.sourceMarker)==null?void 0:l.name)??null,args:((u=t.payload.attrs.line.sourceMarker)==null?void 0:u.args)??{}}),r=c.reactive({name:((h=t.payload.attrs.line.targetMarker)==null?void 0:h.name)??null,args:((f=t.payload.attrs.line.targetMarker)==null?void 0:f.args)??{}}),i=[{label:"Block",value:"block"},{label:"Classic",value:"classic"},{label:"Diamond",value:"diamond"},{label:"Cross",value:"cross"},{label:"Async",value:"async"},{label:"Circle",value:"circle"},{label:"CirclePlus",value:"circlePlus"},{label:"Ellipse",value:"ellipse"}],o=c.ref("0"),a=()=>{t.payload.attr("line/stroke",e.value),t.payload.attr("line/sourceMarker/name",s.name),t.payload.attr("line/sourceMarker/args",s.args),t.payload.attr("line/targetMarker/name",r.name),t.payload.attr("line/targetMarker/args",r.args),Cu.line=t.payload.attrs.line};return(d,g)=>{const p=c.resolveComponent("el-col"),m=c.resolveComponent("el-color-picker"),y=c.resolveComponent("el-row"),b=c.resolveComponent("el-collapse-item"),w=c.resolveComponent("el-option"),x=c.resolveComponent("el-select"),v=c.resolveComponent("el-input-number"),S=c.resolveComponent("el-collapse");return c.openBlock(),c.createElementBlock("div",HD,[c.createVNode(S,{modelValue:o.value,"onUpdate:modelValue":g[9]||(g[9]=E=>o.value=E),accordion:""},{default:c.withCtx(()=>[c.createVNode(b,{title:"线段设置",name:"0"},{default:c.withCtx(()=>[c.createElementVNode("div",UD,[c.createVNode(y,{gutter:20},{default:c.withCtx(()=>[c.createVNode(p,{span:12},{default:c.withCtx(()=>g[10]||(g[10]=[c.createElementVNode("div",{class:"row-label"},"颜色",-1)])),_:1}),c.createVNode(p,{span:12},{default:c.withCtx(()=>[c.createVNode(m,{modelValue:e.value,"onUpdate:modelValue":g[0]||(g[0]=E=>e.value=E),"show-alpha":!0,size:"small",onChange:a},null,8,["modelValue"])]),_:1})]),_:1})])]),_:1}),c.createVNode(b,{title:"箭头1设置",name:"1"},{default:c.withCtx(()=>[c.createElementVNode("div",GD,[c.createVNode(y,{gutter:20},{default:c.withCtx(()=>[c.createVNode(p,{span:12},{default:c.withCtx(()=>g[11]||(g[11]=[c.createElementVNode("div",{class:"row-label"},"类型",-1)])),_:1}),c.createVNode(p,{span:12},{default:c.withCtx(()=>[c.createVNode(x,{modelValue:s.name,"onUpdate:modelValue":g[1]||(g[1]=E=>s.name=E),placeholder:"请选择箭头类型",clearable:"",size:"small",onChange:a},{default:c.withCtx(()=>[(c.openBlock(),c.createElementBlock(c.Fragment,null,c.renderList(i,E=>c.createVNode(w,{key:E.value,label:E.label,value:E.value},null,8,["label","value"])),64))]),_:1},8,["modelValue"])]),_:1})]),_:1}),c.createVNode(y,{gutter:20},{default:c.withCtx(()=>[c.createVNode(p,{span:12},{default:c.withCtx(()=>g[12]||(g[12]=[c.createElementVNode("div",{class:"row-label"},"宽",-1)])),_:1}),c.createVNode(p,{span:12},{default:c.withCtx(()=>[c.createVNode(v,{modelValue:s.args.width,"onUpdate:modelValue":g[2]||(g[2]=E=>s.args.width=E),size:"small","controls-position":"right",onChange:a,min:0,max:10,step:1},null,8,["modelValue"])]),_:1})]),_:1}),c.createVNode(y,{gutter:20},{default:c.withCtx(()=>[c.createVNode(p,{span:12},{default:c.withCtx(()=>g[13]||(g[13]=[c.createElementVNode("div",{class:"row-label"},"高",-1)])),_:1}),c.createVNode(p,{span:12},{default:c.withCtx(()=>[c.createVNode(v,{modelValue:s.args.height,"onUpdate:modelValue":g[3]||(g[3]=E=>s.args.height=E),size:"small","controls-position":"right",onChange:a,min:0,max:10,step:1},null,8,["modelValue"])]),_:1})]),_:1}),c.createVNode(y,{gutter:20},{default:c.withCtx(()=>[c.createVNode(p,{span:12},{default:c.withCtx(()=>g[14]||(g[14]=[c.createElementVNode("div",{class:"row-label"},"偏移",-1)])),_:1}),c.createVNode(p,{span:12},{default:c.withCtx(()=>[c.createVNode(v,{modelValue:s.args.offset,"onUpdate:modelValue":g[4]||(g[4]=E=>s.args.offset=E),size:"small","controls-position":"right",onChange:a,min:0,max:10,step:1},null,8,["modelValue"])]),_:1})]),_:1})])]),_:1}),c.createVNode(b,{title:"箭头2设置",name:"2"},{default:c.withCtx(()=>[c.createElementVNode("div",YD,[c.createVNode(y,{gutter:20},{default:c.withCtx(()=>[c.createVNode(p,{span:12},{default:c.withCtx(()=>g[15]||(g[15]=[c.createElementVNode("div",{class:"row-label"},"类型",-1)])),_:1}),c.createVNode(p,{span:12},{default:c.withCtx(()=>[c.createVNode(x,{modelValue:r.name,"onUpdate:modelValue":g[5]||(g[5]=E=>r.name=E),placeholder:"请选择箭头类型",clearable:"",size:"small",onChange:a},{default:c.withCtx(()=>[(c.openBlock(),c.createElementBlock(c.Fragment,null,c.renderList(i,E=>c.createVNode(w,{key:E.value,label:E.label,value:E.value},null,8,["label","value"])),64))]),_:1},8,["modelValue"])]),_:1})]),_:1}),c.createVNode(y,{gutter:20},{default:c.withCtx(()=>[c.createVNode(p,{span:12},{default:c.withCtx(()=>g[16]||(g[16]=[c.createElementVNode("div",{class:"row-label"},"宽",-1)])),_:1}),c.createVNode(p,{span:12},{default:c.withCtx(()=>[c.createVNode(v,{modelValue:r.args.width,"onUpdate:modelValue":g[6]||(g[6]=E=>r.args.width=E),size:"small","controls-position":"right",onChange:a,min:0,max:10,step:1},null,8,["modelValue"])]),_:1})]),_:1}),c.createVNode(y,{gutter:20},{default:c.withCtx(()=>[c.createVNode(p,{span:12},{default:c.withCtx(()=>g[17]||(g[17]=[c.createElementVNode("div",{class:"row-label"},"高",-1)])),_:1}),c.createVNode(p,{span:12},{default:c.withCtx(()=>[c.createVNode(v,{modelValue:r.args.height,"onUpdate:modelValue":g[7]||(g[7]=E=>r.args.height=E),size:"small","controls-position":"right",onChange:a,min:0,max:10,step:1},null,8,["modelValue"])]),_:1})]),_:1}),c.createVNode(y,{gutter:20},{default:c.withCtx(()=>[c.createVNode(p,{span:12},{default:c.withCtx(()=>g[18]||(g[18]=[c.createElementVNode("div",{class:"row-label"},"偏移",-1)])),_:1}),c.createVNode(p,{span:12},{default:c.withCtx(()=>[c.createVNode(v,{modelValue:r.args.offset,"onUpdate:modelValue":g[8]||(g[8]=E=>r.args.offset=E),size:"small","controls-position":"right",onChange:a,min:0,max:10,step:1},null,8,["modelValue"])]),_:1})]),_:1})])]),_:1})]),_:1},8,["modelValue"])])}}},[["__scopeId","data-v-19905aaf"]]),qD={class:"form-container"},JD=Gn({__name:"Shortcuts",setup(n){const t=c.ref([{name:"复制",windowsKey:"Ctrl + C",macKey:"Command + C"},{name:"粘贴",windowsKey:"Ctrl + V",macKey:"Command + V"},{name:"撤销",windowsKey:"Ctrl + Z",macKey:"Command + Z"},{name:"重做",windowsKey:"Ctrl + Y",macKey:"Command + Y"},{name:"框选",windowsKey:"Alt + LMB",macKey:"option + LMB"},{name:"多选",windowsKey:"Alt + LMB",macKey:"Command + LMB"}]);return(e,s)=>{const r=c.resolveComponent("el-table-column"),i=c.resolveComponent("el-table");return c.openBlock(),c.createElementBlock("div",qD,[c.createVNode(i,{data:t.value,size:"small",border:""},{default:c.withCtx(()=>[c.createVNode(r,{prop:"name",label:"名称"}),c.createVNode(r,{prop:"windowsKey",label:"windows"}),c.createVNode(r,{prop:"macKey",label:"mac"})]),_:1},8,["data"])])}}},[["__scopeId","data-v-99982d47"]]);typeof window=="object"&&window.NodeList&&!NodeList.prototype.forEach&&(NodeList.prototype.forEach=Array.prototype.forEach),typeof window<"u"&&function(n){n.forEach(t=>{Object.prototype.hasOwnProperty.call(t,"append")||Object.defineProperty(t,"append",{configurable:!0,enumerable:!0,writable:!0,value(...e){const s=document.createDocumentFragment();e.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 ye{get disposed(){return this._disposed===!0}dispose(){this._disposed=!0}}(function(n){function t(){return(e,s,r)=>{const i=r.value,o=e.__proto__;r.value=function(...a){this.disposed||(i.call(this,...a),o.dispose.call(this))}}}n.dispose=t})(ye||(ye={}));class Im{constructor(){this.isDisposed=!1,this.items=new Set}get disposed(){return this.isDisposed}dispose(){this.isDisposed||(this.isDisposed=!0,this.items.forEach(t=>{t.dispose()}),this.items.clear())}contains(t){return this.items.has(t)}add(t){this.items.add(t)}remove(t){this.items.delete(t)}clear(){this.items.clear()}}(function(n){function t(e){const s=new n;return e.forEach(r=>{s.add(r)}),s}n.from=t})(Im||(Im={}));function Lm(n,t,e){if(e)switch(e.length){case 0:return n.call(t);case 1:return n.call(t,e[0]);case 2:return n.call(t,e[0],e[1]);case 3:return n.call(t,e[0],e[1],e[2]);case 4:return n.call(t,e[0],e[1],e[2],e[3]);case 5:return n.call(t,e[0],e[1],e[2],e[3],e[4]);case 6:return n.call(t,e[0],e[1],e[2],e[3],e[4],e[5]);default:return n.apply(t,e)}return n.call(t)}function X(n,t,...e){return Lm(n,t,e)}function XD(n){return typeof n=="object"&&n.then&&typeof n.then=="function"}function Su(n){return n!=null&&(n instanceof Promise||XD(n))}function Eu(...n){const t=[];if(n.forEach(s=>{Array.isArray(s)?t.push(...s):t.push(s)}),t.some(s=>Su(s))){const s=t.map(r=>Su(r)?r:Promise.resolve(r!==!1));return Promise.all(s).then(r=>r.reduce((i,o)=>o!==!1&&i,!0))}return t.every(s=>s!==!1)}function KD(...n){const t=Eu(n);return typeof t=="boolean"?Promise.resolve(t):t}function Ou(n,t){const e=[];for(let s=0;s<n.length;s+=2){const r=n[s],i=n[s+1],o=Array.isArray(t)?t:[t],a=Lm(r,i,o);e.push(a)}return Eu(e)}class ZD{constructor(){this.listeners={}}on(t,e,s){return e==null?this:(this.listeners[t]||(this.listeners[t]=[]),this.listeners[t].push(e,s),this)}once(t,e,s){const r=(...i)=>(this.off(t,r),Ou([e,s],i));return this.on(t,r,this)}off(t,e,s){if(!(t||e||s))return this.listeners={},this;const r=this.listeners;return(t?[t]:Object.keys(r)).forEach(o=>{const a=r[o];if(a){if(!(e||s)){delete r[o];return}for(let l=a.length-2;l>=0;l-=2)e&&a[l]!==e||s&&a[l+1]!==s||a.splice(l,2)}}),this}trigger(t,...e){let s=!0;if(t!=="*"){const i=this.listeners[t];i!=null&&(s=Ou([...i],e))}const r=this.listeners["*"];return r!=null?Eu([s,Ou([...r],[t,...e])]):s}emit(t,...e){return this.trigger(t,...e)}}function QD(n,...t){t.forEach(e=>{Object.getOwnPropertyNames(e.prototype).forEach(s=>{s!=="constructor"&&Object.defineProperty(n.prototype,s,Object.getOwnPropertyDescriptor(e.prototype,s))})})}const tR=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(const e in t)Object.prototype.hasOwnProperty.call(t,e)&&(n[e]=t[e])};function eR(n,t){tR(n,t);function e(){this.constructor=n}n.prototype=t===null?Object.create(t):(e.prototype=t.prototype,new e)}class nR{}const sR=/^\s*class\s+/.test(`${nR}`)||/^\s*class\s*\{/.test(`${class{}}`);function Mu(n,t){let e;return sR?e=class extends t{}:(e=function(){return t.apply(this,arguments)},eR(e,t)),Object.defineProperty(e,"name",{value:n}),e}function Bm(n){return n==="__proto__"}function Pu(n,t,e="/"){let s;const r=Array.isArray(t)?t:t.split(e);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 Rr(n,t,e,s="/"){const r=Array.isArray(t)?t:t.split(s),i=r.pop();if(i&&!Bm(i)){let o=n;r.forEach(a=>{Bm(a)||(o[a]==null&&(o[a]={}),o=o[a])}),o[i]=e}return n}function Vm(n,t,e="/"){const s=Array.isArray(t)?t.slice():t.split(e),r=s.pop();if(r)if(s.length>0){const i=Pu(n,s);i&&delete i[r]}else delete n[r];return n}var rR=function(n,t,e,s){var r=arguments.length,i=r<3?t:s===null?s=Object.getOwnPropertyDescriptor(t,e):s,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(n,t,e,s);else for(var a=n.length-1;a>=0;a--)(o=n[a])&&(i=(r<3?o(i):r>3?o(t,e,i):o(t,e))||i);return r>3&&i&&Object.defineProperty(t,e,i),i};class Nt extends ZD{dispose(){this.off()}}rR([ye.dispose()],Nt.prototype,"dispose",null),function(n){n.dispose=ye.dispose}(Nt||(Nt={})),QD(Nt,ye);const jm=n=>{const t=Object.create(null);return e=>t[e]||(t[e]=n(e))},$m=jm(n=>n.replace(/\B([A-Z])/g,"-$1").toLowerCase()),Au=jm(n=>S2(na(n)).replace(/ /g,""));function Tu(n){let t=2166136261,e=!1,s=n;for(let r=0,i=s.length;r<i;r+=1){let o=s.charCodeAt(r);o>127&&!e&&(s=unescape(encodeURIComponent(s)),o=s.charCodeAt(r),e=!0),t^=o,t+=(t<<1)+(t<<4)+(t<<7)+(t<<8)+(t<<24)}return t>>>0}function Fa(){let n="";const t="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx";for(let e=0,s=t.length;e<s;e+=1){const r=t[e],i=Math.random()*16|0,o=r==="x"?i:r==="y"?i&3|8:r;n+=o.toString(16)}return n}function iR(n,t,e){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 l of t){const u=e(l);if(u!==void 0&&Math.abs(u.length-a.length)<=s){const h=u.toLowerCase();if(h===a){if(u===n)continue;return l}if(o||u.length<3)continue;const f=oR(a,h,r-1);if(f===void 0)continue;f<3?(o=!0,i=l):(r=f,i=l)}}return i}function oR(n,t,e){let s=new Array(t.length+1),r=new Array(t.length+1);const i=e+1;for(let a=0;a<=t.length;a+=1)s[a]=a;for(let a=1;a<=n.length;a+=1){const l=n.charCodeAt(a-1),u=a>e?a-e:1,h=t.length>e+a?e+a:t.length;r[0]=a;let f=a;for(let g=1;g<u;g+=1)r[g]=i;for(let g=u;g<=h;g+=1){const p=l===t.charCodeAt(g-1)?s[g-1]:Math.min(s[g]+1,r[g-1]+1,s[g-1]+2);r[g]=p,f=Math.min(f,p)}for(let g=h+1;g<=t.length;g+=1)r[g]=i;if(f>e)return;const d=s;s=r,r=d}const o=s[t.length];return o>e?void 0:o}function Yn(n){return typeof n=="string"&&n.slice(-1)==="%"}function an(n,t){if(n==null)return 0;let e;if(typeof n=="string"){if(e=parseFloat(n),Yn(n)&&(e/=100,Number.isFinite(e)))return e*t}else e=n;return Number.isFinite(e)?e>0&&e<1?e*t:e:0}function ds(n){if(typeof n=="object"){let e=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=e=n.horizontal),n.left!=null&&Number.isFinite(n.left)&&(e=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:e}}let t=0;return n!=null&&Number.isFinite(n)&&(t=n),{top:t,right:t,bottom:t,left:t}}let Nu=!1,zm=!1,Fm=!1,Hm=!1,Um=!1,Gm=!1,Ym=!1,Wm=!1,qm=!1,Jm=!1,Xm=!1,Km=!1,Zm=!1,Qm=!1,ty=!1,ey=!1;if(typeof navigator=="object"){const n=navigator.userAgent;Nu=n.indexOf("Macintosh")>=0,zm=!!n.match(/(iPad|iPhone|iPod)/g),Fm=n.indexOf("Windows")>=0,Hm=n.indexOf("MSIE")>=0,Um=!!n.match(/Trident\/7\./),Gm=!!n.match(/Edge\//),Ym=n.indexOf("Mozilla/")>=0&&n.indexOf("MSIE")<0&&n.indexOf("Edge/")<0,qm=n.indexOf("Chrome/")>=0&&n.indexOf("Edge/")<0,Jm=n.indexOf("Opera/")>=0||n.indexOf("OPR/")>=0,Xm=n.indexOf("Firefox/")>=0,Km=n.indexOf("AppleWebKit/")>=0&&n.indexOf("Chrome/")<0&&n.indexOf("Edge/")<0,typeof document=="object"&&(ey=!document.createElementNS||`${document.createElementNS("http://www.w3.org/2000/svg","foreignObject")}`!="[object SVGForeignObjectElement]"||n.indexOf("Opera/")>=0)}if(typeof window=="object"&&(Wm=window.chrome!=null&&window.chrome.app!=null&&window.chrome.app.runtime!=null,Qm=window.PointerEvent!=null&&!Nu),typeof document=="object"){Zm="ontouchstart"in document.documentElement;try{const n=Object.defineProperty({},"passive",{get(){ty=!0}}),t=document.createElement("div");t.addEventListener&&t.addEventListener("click",()=>{},n)}catch{}}var fs;(function(n){n.IS_MAC=Nu,n.IS_IOS=zm,n.IS_WINDOWS=Fm,n.IS_IE=Hm,n.IS_IE11=Um,n.IS_EDGE=Gm,n.IS_NETSCAPE=Ym,n.IS_CHROME_APP=Wm,n.IS_CHROME=qm,n.IS_OPERA=Jm,n.IS_FIREFOX=Xm,n.IS_SAFARI=Km,n.SUPPORT_TOUCH=Zm,n.SUPPORT_POINTER=Qm,n.SUPPORT_PASSIVE=ty,n.NO_FOREIGNOBJECT=ey,n.SUPPORT_FOREIGNOBJECT=!n.NO_FOREIGNOBJECT})(fs||(fs={})),function(n){function t(){const i=window.module;return i!=null&&i.hot!=null&&i.hot.status!=null?i.hot.status():"unkonwn"}n.getHMRStatus=t;function e(){return t()==="apply"}n.isApplyingHMR=e;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 l=a in o;return l||(o.setAttribute(a,"return;"),l=typeof o[a]=="function"),l}n.isEventSupported=r}(fs||(fs={}));const _u=/[\t\r\n\f]/g,ku=/\S+/g,Ir=n=>` ${n} `;function Lr(n){return n&&n.getAttribute&&n.getAttribute("class")||""}function Sn(n,t){if(n==null||t==null)return!1;const e=Ir(Lr(n)),s=Ir(t);return n.nodeType===1?e.replace(_u," ").includes(s):!1}function J(n,t){if(!(n==null||t==null)){if(typeof t=="function")return J(n,t(Lr(n)));if(typeof t=="string"&&n.nodeType===1){const e=t.match(ku)||[],s=Ir(Lr(n)).replace(_u," ");let r=e.reduce((i,o)=>i.indexOf(Ir(o))<0?`${i}${o} `:i,s);r=r.trim(),s!==r&&n.setAttribute("class",r)}}}function Dt(n,t){if(n!=null){if(typeof t=="function")return Dt(n,t(Lr(n)));if((!t||typeof t=="string")&&n.nodeType===1){const e=(t||"").match(ku)||[],s=Ir(Lr(n)).replace(_u," ");let r=e.reduce((i,o)=>{const a=Ir(o);return i.indexOf(a)>-1?i.replace(a," "):i},s);r=t?r.trim():"",s!==r&&n.setAttribute("class",r)}}}function ln(n,t,e){if(!(n==null||t==null)){if(e!=null&&typeof t=="string"){e?J(n,t):Dt(n,t);return}if(typeof t=="function")return ln(n,t(Lr(n),e),e);typeof t=="string"&&(t.match(ku)||[]).forEach(r=>{Sn(n,r)?Dt(n,r):J(n,r)})}}let ny=0;function aR(){return ny+=1,`v${ny}`}function Du(n){return(n.id==null||n.id==="")&&(n.id=aR()),n.id}function gs(n){return n==null?!1:typeof n.getScreenCTM=="function"&&n instanceof SVGElement}const ee={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"},sy="1.1";function ry(n,t=document){return t.createElement(n)}function Ru(n,t=ee.xhtml,e=document){return e.createElementNS(t,n)}function cn(n,t=document){return Ru(n,ee.svg,t)}function Ha(n){if(n){const e=`<svg xmlns="${ee.svg}" xmlns:xlink="${ee.xlink}" version="${sy}">${n}</svg>`,{documentElement:s}=lR(e,{async:!1});return s}const t=document.createElementNS(ee.svg,"svg");return t.setAttributeNS(ee.xmlns,"xmlns:xlink",ee.xlink),t.setAttribute("version",sy),t}function lR(n,t={}){let e;try{const s=new DOMParser;if(t.async!=null){const r=s;r.async=t.async}e=s.parseFromString(n,t.mimeType||"text/xml")}catch{e=void 0}if(!e||e.getElementsByTagName("parsererror").length)throw new Error(`Invalid XML: ${n}`);return e}function cR(n,t=!0){const e=n.nodeName;return t?e.toLowerCase():e.toUpperCase()}function Iu(n){let t=0,e=n.previousSibling;for(;e;)e.nodeType===1&&(t+=1),e=e.previousSibling;return t}function uR(n,t){return n.querySelectorAll(t)}function hR(n,t){return n.querySelector(t)}function iy(n,t,e){const s=n.ownerSVGElement;let r=n.parentNode;for(;r&&r!==e&&r!==s;){if(Sn(r,t))return r;r=r.parentNode}return null}function Lu(n,t){const e=t&&t.parentNode;return n===e||!!(e&&e.nodeType===1&&n.compareDocumentPosition(e)&16)}function ze(n){n&&(Array.isArray(n)?n:[n]).forEach(e=>{e.parentNode&&e.parentNode.removeChild(e)})}function qi(n){for(;n.firstChild;)n.removeChild(n.firstChild)}function Ne(n,t){(Array.isArray(t)?t:[t]).forEach(s=>{s!=null&&n.appendChild(s)})}function oy(n,t){const e=n.firstChild;return e?Bu(e,t):Ne(n,t)}function Bu(n,t){const e=n.parentNode;e&&(Array.isArray(t)?t:[t]).forEach(r=>{r!=null&&e.insertBefore(r,n)})}function ps(n,t){t!=null&&t.appendChild(n)}function ay(n){try{return n instanceof HTMLElement}catch{return typeof n=="object"&&n.nodeType===1&&typeof n.style=="object"&&typeof n.ownerDocument=="object"}}function dR(n,t){const e=[];let s=n.firstChild;for(;s;s=s.nextSibling)s.nodeType===1&&(!t||Sn(s,t))&&e.push(s);return e}const ly=["viewBox","attributeName","attributeType","repeatCount","textLength","lengthAdjust","gradientUnits"];function fR(n,t){return n.getAttribute(t)}function Vu(n,t){const e=uy(t);e.ns?n.hasAttributeNS(e.ns,e.local)&&n.removeAttributeNS(e.ns,e.local):n.hasAttribute(t)&&n.removeAttribute(t)}function ju(n,t,e){if(e==null)return Vu(n,t);const s=uy(t);s.ns&&typeof e=="string"?n.setAttributeNS(s.ns,t,e):t==="id"?n.id=`${e}`:n.setAttribute(t,`${e}`)}function cy(n,t){Object.keys(t).forEach(e=>{ju(n,e,t[e])})}function ut(n,t,e){if(t==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 t=="string"&&e===void 0)return n.getAttribute(t);typeof t=="object"?cy(n,t):ju(n,t,e)}function uy(n){if(n.indexOf(":")!==-1){const t=n.split(":");return{ns:ee[t[0]],local:t[1]}}return{ns:null,local:n}}function Ji(n){const t={};return Object.keys(n).forEach(e=>{const s=ly.includes(e)?e:$m(e);t[s]=n[e]}),t}function Ua(n){const t={};return n.split(";").forEach(s=>{const r=s.trim();if(r){const i=r.split("=");i.length&&(t[i[0].trim()]=i[1]?i[1].trim():"")}}),t}function $u(n,t){return Object.keys(t).forEach(e=>{if(e==="class")n[e]=n[e]?`${n[e]} ${t[e]}`:t[e];else if(e==="style"){const s=typeof n[e]=="object",r=typeof t[e]=="object";let i,o;s&&r?(i=n[e],o=t[e]):s?(i=n[e],o=Ua(t[e])):r?(i=Ua(n[e]),o=t[e]):(i=Ua(n[e]),o=Ua(t[e])),n[e]=$u(i,o)}else n[e]=t[e]}),n}function gR(n,t,e={}){const s=e.offset||0,r=[],i=[];let o,a,l=null;for(let u=0;u<n.length;u+=1){o=i[u]=n[u];for(let h=0,f=t.length;h<f;h+=1){const d=t[h],g=d.start+s,p=d.end+s;u>=g&&u<p&&(typeof o=="string"?o=i[u]={t:n[u],attrs:d.attrs}:o.attrs=$u($u({},o.attrs),d.attrs),e.includeAnnotationIndices&&(o.annotations==null&&(o.annotations=[]),o.annotations.push(h)))}a=i[u-1],a?Lt(o)&&Lt(a)?(l=l,JSON.stringify(o.attrs)===JSON.stringify(a.attrs)?l.t+=o.t:(r.push(l),l=o)):Lt(o)||Lt(a)?(l=l,r.push(l),l=o):l=(l||"")+o:l=o}return l!=null&&r.push(l),r}function pR(n){return n.replace(/ /g," ")}var Ws;(function(n){function t(u){const h="data:";return u.substr(0,h.length)===h}n.isDataUrl=t;function e(u,h){if(!u||t(u)){setTimeout(()=>h(null,u));return}const f=()=>{h(new Error(`Failed to load image: ${u}`))},d=window.FileReader?p=>{if(p.status===200){const m=new FileReader;m.onload=y=>{const b=y.target.result;h(null,b)},m.onerror=f,m.readAsDataURL(p.response)}else f()}:p=>{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(p.status===200){let y=u.split(".").pop()||"png";y==="svg"&&(y="svg+xml");const b=`data:image/${y};base64,`,w=new Uint8Array(p.response),x=b+btoa(m(w));h(null,x)}else f()},g=new XMLHttpRequest;g.responseType=window.FileReader?"blob":"arraybuffer",g.open("GET",u,!0),g.addEventListener("error",f),g.addEventListener("load",()=>d(g)),g.send()}n.imageToDataUri=e;function s(u){let h=u.replace(/\s/g,"");h=decodeURIComponent(h);const f=h.indexOf(","),d=h.slice(0,f),g=d.split(":")[1].split(";")[0],p=h.slice(f+1);let m;d.indexOf("base64")>=0?m=atob(p):m=unescape(encodeURIComponent(p));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:g})}n.dataUriToBlob=s;function r(u,h){const f=window.navigator.msSaveBlob;if(f)f(u,h);else{const d=window.URL.createObjectURL(u),g=document.createElement("a");g.href=d,g.download=h,document.body.appendChild(g),g.click(),document.body.removeChild(g),window.URL.revokeObjectURL(d)}}n.downloadBlob=r;function i(u,h){const f=s(u);r(f,h)}n.downloadDataUri=i;function o(u){const h=u.match(/<svg[^>]*viewBox\s*=\s*(["']?)(.+?)\1[^>]*>/i);return h&&h[2]?h[2].replace(/\s+/," ").split(" "):null}function a(u){const h=parseFloat(u);return Number.isNaN(h)?null:h}function l(u,h={}){let f=null;const d=x=>(f==null&&(f=o(u)),f!=null?a(f[x]):null),g=x=>{const v=u.match(x);return v&&v[2]?a(v[2]):null};let p=h.width;if(p==null&&(p=g(/<svg[^>]*width\s*=\s*(["']?)(.+?)\1[^>]*>/i)),p==null&&(p=d(2)),p==null)throw new Error("Can not parse width from svg string");let m=h.height;if(m==null&&(m=g(/<svg[^>]*height\s*=\s*(["']?)(.+?)\1[^>]*>/i)),m==null&&(m=d(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=l})(Ws||(Ws={}));let qs;const mR={px(n){return n},mm(n){return qs*n},cm(n){return qs*n*10},in(n){return qs*n*25.4},pt(n){return qs*(25.4*n/72)},pc(n){return qs*(25.4*n/6)}};var hy;(function(n){function t(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 l=o.getBoundingClientRect(),u={width:l.width||0,height:l.height||0};return document.body.removeChild(o),u}n.measure=t;function e(s,r){qs==null&&(qs=t("1","1","mm").width);const i=r?mR[r]:null;return i?i(s):s}n.toPx=e})(hy||(hy={}));const yR=/-(.)/g;function bR(n){return n.replace(yR,(t,e)=>e.toUpperCase())}const zu={},dy=["webkit","ms","moz","o"],fy=typeof document<"u"?document.createElement("div").style:{};function wR(n){for(let t=0;t<dy.length;t+=1){const e=dy[t]+n;if(e in fy)return e}return null}function xR(n){const t=bR(n);if(zu[t]==null){const e=t.charAt(0).toUpperCase()+t.slice(1);zu[t]=t in fy?t:wR(e)}return zu[t]}function gy(n,t){const e=n.ownerDocument&&n.ownerDocument.defaultView&&n.ownerDocument.defaultView.opener?n.ownerDocument.defaultView.getComputedStyle(n,null):window.getComputedStyle(n,null);return e&&t?e.getPropertyValue(t)||e[t]:e}const vR={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 CR(n){return/^--/.test(n)}function SR(n,t,e){const s=window.getComputedStyle(n,null);return e?s.getPropertyValue(t)||void 0:s[t]||n.style[t]}function ER(n,t){return!vR[n]&&typeof t=="number"?`${t}px`:t}function qt(n,t,e){if(typeof t=="string"){const s=CR(t);if(s||(t=xR(t)),e===void 0)return SR(n,t,s);s||(e=ER(t,e));const r=n.style;s?r.setProperty(t,e):r[t]=e;return}for(const s in t)qt(n,s,t[s])}const Ga=new WeakMap;function py(n,t){const e=na(t),s=Ga.get(n);if(s)return s[e]}function OR(n,t,e){const s=na(t),r=Ga.get(n);r?r[s]=e:Ga.set(n,{[s]:e})}function Js(n,t,e){if(!t){const s={};return Object.keys(Ga).forEach(r=>{s[r]=py(n,r)}),s}if(typeof t=="string"){if(e===void 0)return py(n,t);OR(n,t,e);return}for(const s in t)Js(n,s,t[s])}class tt{get[Symbol.toStringTag](){return tt.toStringTag}get type(){return this.node.nodeName}get id(){return this.node.id}set id(t){this.node.id=t}constructor(t,e,s){if(!t)throw new TypeError("Invalid element to create vector");let r;if(tt.isVector(t))r=t.node;else if(typeof t=="string")if(t.toLowerCase()==="svg")r=Ha();else if(t[0]==="<"){const i=Ha(t);r=document.importNode(i.firstChild,!0)}else r=document.createElementNS(ee.svg,t);else r=t;this.node=r,e&&this.setAttributes(e),s&&this.append(s)}transform(t,e){return t==null?Vr(this.node):(Vr(this.node,t,e),this)}translate(t,e=0,s={}){return t==null?Ey(this.node):(Ey(this.node,t,e,s),this)}rotate(t,e,s,r={}){return t==null?Uu(this.node):(Uu(this.node,t,e,s,r),this)}scale(t,e){return t==null?Gu(this.node):(Gu(this.node,t,e),this)}getTransformToElement(t){const e=tt.toNode(t);return Qi(this.node,e)}removeAttribute(t){return Vu(this.node,t),this}getAttribute(t){return fR(this.node,t)}setAttribute(t,e){return ju(this.node,t,e),this}setAttributes(t){return cy(this.node,t),this}attr(t,e){return t==null?ut(this.node):typeof t=="string"&&e===void 0?ut(this.node,t):(typeof t=="object"?ut(this.node,t):ut(this.node,t,e),this)}svg(){return this.node instanceof SVGSVGElement?this:tt.create(this.node.ownerSVGElement)}defs(){const t=this.svg()||this,e=t.node.getElementsByTagName("defs")[0];return e?tt.create(e):tt.create("defs").appendTo(t)}text(t,e={}){return yy(this.node,t,e),this}tagName(){return cR(this.node)}clone(){return tt.create(this.node.cloneNode(!0))}remove(){return ze(this.node),this}empty(){return qi(this.node),this}append(t){return Ne(this.node,tt.toNodes(t)),this}appendTo(t){return ps(this.node,tt.isVector(t)?t.node:t),this}prepend(t){return oy(this.node,tt.toNodes(t)),this}before(t){return Bu(this.node,tt.toNodes(t)),this}replace(t){return this.node.parentNode&&this.node.parentNode.replaceChild(tt.toNode(t),this.node),tt.create(t)}first(){return this.node.firstChild?tt.create(this.node.firstChild):null}last(){return this.node.lastChild?tt.create(this.node.lastChild):null}get(t){const e=this.node.childNodes[t];return e?tt.create(e):null}indexOf(t){return Array.prototype.slice.call(this.node.childNodes).indexOf(tt.toNode(t))}find(t){const e=[],s=uR(this.node,t);if(s)for(let r=0,i=s.length;r<i;r+=1)e.push(tt.create(s[r]));return e}findOne(t){const e=hR(this.node,t);return e?tt.create(e):null}findParentByClass(t,e){const s=iy(this.node,t,e);return s?tt.create(s):null}matches(t){const e=this.node;this.node.matches;const s=e.matches||e.matchesSelector||e.msMatchesSelector||e.mozMatchesSelector||e.webkitMatchesSelector||e.oMatchesSelector||null;return s&&s.call(e,t)}contains(t){return Lu(this.node,tt.isVector(t)?t.node:t)}wrap(t){const e=tt.create(t),s=this.node.parentNode;return s!=null&&s.insertBefore(e.node,this.node),e.append(this)}parent(t){let e=this;if(e.node.parentNode==null)return null;if(e=tt.create(e.node.parentNode),t==null)return e;do if(typeof t=="string"?e.matches(t):e instanceof t)return e;while(e=tt.create(e.node.parentNode));return e}children(){const t=this.node.childNodes,e=[];for(let s=0;s<t.length;s+=1)t[s].nodeType===1&&e.push(tt.create(t[s]));return e}eachChild(t,e){const s=this.children();for(let r=0,i=s.length;r<i;r+=1)t.call(s[r],s[r],r,s),e&&s[r].eachChild(t,e);return this}index(){return Iu(this.node)}hasClass(t){return Sn(this.node,t)}addClass(t){return J(this.node,t),this}removeClass(t){return Dt(this.node,t),this}toggleClass(t,e){return ln(this.node,t,e),this}toLocalPoint(t,e){return GR(this.node,t,e)}sample(t=1){return this.node instanceof SVGPathElement?TR(this.node,t):[]}toPath(){return tt.create(LR(this.node))}toPathData(){return Cy(this.node)}}(function(n){n.toStringTag=`X6.${n.name}`;function t(o){if(o==null)return!1;if(o instanceof n)return!0;const a=o[Symbol.toStringTag],l=o;return(a==null||a===n.toStringTag)&&l.node instanceof SVGElement&&typeof l.sample=="function"&&typeof l.toPath=="function"}n.isVector=t;function e(o,a,l){return new n(o,a,l)}n.create=e;function s(o){if(o[0]==="<"){const a=Ha(o),l=[];for(let u=0,h=a.childNodes.length;u<h;u+=1){const f=a.childNodes[u];l.push(e(document.importNode(f,!0)))}return l}return[e(o)]}n.createVectors=s;function r(o){return t(o)?o.node:o}n.toNode=r;function i(o){return Array.isArray(o)?o.map(a=>r(a)):[r(o)]}n.toNodes=i})(tt||(tt={}));function MR(n,t){const e=tt.create(t),s=tt.create("textPath"),r=n.d;if(r&&n["xlink:href"]===void 0){const i=tt.create("path").attr("d",r).appendTo(e.defs());s.attr("xlink:href",`#${i.id}`)}return typeof n=="object"&&s.attr(n),s.node}function PR(n,t,e){const s=e.eol,r=e.baseSize,i=e.lineHeight;let o=0,a;const l={},u=t.length-1;for(let h=0;h<=u;h+=1){let f=t[h],d=null;if(typeof f=="object"){const g=f.attrs,p=tt.create("tspan",g);a=p.node;let m=f.t;s&&h===u&&(m+=s),a.textContent=m;const y=g.class;y&&p.addClass(y),e.includeAnnotationIndices&&p.attr("annotations",f.annotations.join(",")),d=parseFloat(g["font-size"]),d===void 0&&(d=r),d&&d>o&&(o=d)}else s&&h===u&&(f+=s),a=document.createTextNode(f||" "),r&&r>o&&(o=r);n.appendChild(a)}return o&&(l.maxFontSize=o),i?l.lineHeight=i:o&&(l.lineHeight=o*1.2),l}const my=/em$/;function Ya(n,t){const e=parseFloat(n);return my.test(n)?e*t:e}function AR(n,t,e,s){if(!Array.isArray(t))return 0;const r=t.length;if(!r)return 0;let i=t[0];const o=Ya(i.maxFontSize,e)||e;let a=0;const l=Ya(s,e);for(let f=1;f<r;f+=1){i=t[f];const d=Ya(i.lineHeight,e)||l;a+=d}const u=Ya(i.maxFontSize,e)||e;let h;switch(n){case"middle":h=o/2-.15*u-a/2;break;case"bottom":h=-(.25*u)-a;break;case"top":default:h=.8*o;break}return h}function yy(n,t,e={}){t=pR(t);const s=e.eol;let r=e.textPath;const i=e.textVerticalAnchor,o=i==="middle"||i==="bottom"||i==="top";let a=e.x;a===void 0&&(a=n.getAttribute("x")||0);const l=e.includeAnnotationIndices;let u=e.annotations;u&&!Array.isArray(u)&&(u=[u]);const h=e.lineHeight,f=h==="auto",d=f?"1.5em":h||"1em";let g=!0;const p=n.childNodes;if(p.length===1){const T=p[0];T&&T.tagName.toUpperCase()==="TITLE"&&(g=!1)}g&&qi(n),ut(n,{"xml:space":"preserve",display:t||e.displayEmpty?null:"none"});const m=ut(n,"font-size");let y=parseFloat(m);y||(y=16,(o||u)&&!m&&ut(n,"font-size",`${y}`));let b;r?(typeof r=="string"&&(r={d:r}),b=MR(r,n)):b=document.createDocumentFragment();let w,x=0,v;const S=t.split(`
|
|
36
36
|
`),E=[],C=S.length-1;for(let T=0;T<=C;T+=1){w=d;let k="v-line";const _=cn("tspan");let D,N=S[T];if(N)if(u){const V=gR(N,u,{offset:-x,includeAnnotationIndices:l});D=PR(_,V,{eol:T!==C&&s,baseSize:y,lineHeight:f?null:d,includeAnnotationIndices:l});const A=D.lineHeight;A&&f&&T!==0&&(w=A),T===0&&(v=D.maxFontSize*.8)}else s&&T!==C&&(N+=s),_.textContent=N;else{_.textContent="-",k+=" v-empty-line";const V=_.style;V.fillOpacity=0,V.strokeOpacity=0,u&&(D={})}D&&E.push(D),T>0&&_.setAttribute("dy",w),(T>0||r)&&_.setAttribute("x",a),_.className.baseVal=k,b.appendChild(_),x+=N.length+1}if(o)if(u)w=AR(i,E,y,d);else if(i==="top")w="0.8em";else{let T;switch(C>0?(T=parseFloat(d)||1,T*=C,my.test(d)||(T/=y)):T=0,i){case"middle":w=`${.3-T/2}em`;break;case"bottom":w=`${-T-.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 Xi(n,t={}){const e=document.createElement("canvas").getContext("2d");if(!n)return{width:0};const s=[],r=t["font-size"]?`${parseFloat(t["font-size"])}px`:"14px";return s.push(t["font-style"]||"normal"),s.push(t["font-variant"]||"normal"),s.push(t["font-weight"]||400),s.push(r),s.push(t["font-family"]||"sans-serif"),e.font=s.join(" "),e.measureText(n)}function by(n,t,e,s={}){if(t>=e)return[n,""];const r=n.length,i={};let o=Math.round(t/e*r-1);for(o<0&&(o=0);o>=0&&o<r;){const a=n.slice(0,o),l=i[a]||Xi(a,s).width,u=n.slice(0,o+1),h=i[u]||Xi(u,s).width;if(i[a]=l,i[u]=h,l>t)o-=1;else if(h<=t)o+=1;else break}return[n.slice(0,o),n.slice(o)]}function wy(n,t,e={},s={}){const r=t.width,i=t.height,o=s.eol||`
|
|
37
37
|
`,a=e.fontSize||14,l=e.lineHeight?parseFloat(e.lineHeight):Math.ceil(a*1.4),u=Math.floor(i/l);if(n.indexOf(o)>-1){const y=Fa(),b=[];return n.split(o).map(w=>{const x=wy(w,Object.assign(Object.assign({},t),{height:Number.MAX_SAFE_INTEGER}),e,Object.assign(Object.assign({},s),{eol:y}));x&&b.push(...x.split(y))}),b.slice(0,u).join(o)}const{width:h}=Xi(n,e);if(h<r)return n;const f=[];let d=n,g=h,p=s.ellipsis,m=0;p&&(typeof p!="string"&&(p="…"),m=Xi(p,e).width);for(let y=0;y<u;y+=1)if(g>r)if(y===u-1){const[w]=by(d,r-m,g,e);f.push(p?`${w}${p}`:w)}else{const[w,x]=by(d,r,g,e);f.push(w),d=x,g=Xi(d,e).width}else{f.push(d);break}return f.join(o)}const Fu=.551784;function ae(n,t,e=NaN){const s=n.getAttribute(t);if(s==null)return e;const r=parseFloat(s);return Number.isNaN(r)?e:r}function TR(n,t=1){const e=n.getTotalLength(),s=[];let r=0,i;for(;r<e;)i=n.getPointAtLength(r),s.push({distance:r,x:i.x,y:i.y}),r+=t;return s}function NR(n){return["M",ae(n,"x1"),ae(n,"y1"),"L",ae(n,"x2"),ae(n,"y2")].join(" ")}function _R(n){const t=Wa(n);return t.length===0?null:`${xy(t)} Z`}function kR(n){const t=Wa(n);return t.length===0?null:xy(t)}function xy(n){return`M ${n.map(e=>`${e.x} ${e.y}`).join(" L")}`}function Wa(n){const t=[],e=n.points;if(e)for(let s=0,r=e.numberOfItems;s<r;s+=1)t.push(e.getItem(s));return t}function DR(n){const t=ae(n,"cx",0),e=ae(n,"cy",0),s=ae(n,"r"),r=s*Fu;return["M",t,e-s,"C",t+r,e-s,t+s,e-r,t+s,e,"C",t+s,e+r,t+r,e+s,t,e+s,"C",t-r,e+s,t-s,e+r,t-s,e,"C",t-s,e-r,t-r,e-s,t,e-s,"Z"].join(" ")}function RR(n){const t=ae(n,"cx",0),e=ae(n,"cy",0),s=ae(n,"rx"),r=ae(n,"ry")||s,i=s*Fu,o=r*Fu;return["M",t,e-r,"C",t+i,e-r,t+s,e-o,t+s,e,"C",t+s,e+o,t+i,e+r,t,e+r,"C",t-i,e+r,t-s,e+o,t-s,e,"C",t-s,e-o,t-i,e-r,t,e-r,"Z"].join(" ")}function IR(n){return vy({x:ae(n,"x",0),y:ae(n,"y",0),width:ae(n,"width",0),height:ae(n,"height",0),rx:ae(n,"rx",0),ry:ae(n,"ry",0)})}function vy(n){let t;const e=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),l=Math.min(n.ry||n["top-ry"]||0,i/2),u=Math.min(n.ry||n["bottom-ry"]||0,i/2);return o||a||l||u?t=["M",e,s+l,"v",i-l-u,"a",a,u,0,0,0,a,u,"h",r-2*a,"a",a,u,0,0,0,a,-u,"v",-(i-u-l),"a",o,l,0,0,0,-o,-l,"h",-(r-2*o),"a",o,l,0,0,0,-o,l,"Z"]:t=["M",e,s,"H",e+r,"V",s+i,"H",e,"V",s,"Z"],t.join(" ")}function LR(n){const t=cn("path");ut(t,ut(n));const e=Cy(n);return e&&t.setAttribute("d",e),t}function Cy(n){const t=n.tagName.toLowerCase();switch(t){case"path":return n.getAttribute("d");case"line":return NR(n);case"polygon":return _R(n);case"polyline":return kR(n);case"ellipse":return RR(n);case"circle":return DR(n);case"rect":return IR(n)}throw new Error(`"${t}" cannot be converted to svg path element.`)}const BR=/(\w+)\(([^,)]+),?([^)]+)?\)/gi,Sy=/[ ,]+/,VR=/^(\w+)\((.*)\)/;function jR(n,t){const s=cn("svg").createSVGPoint();return s.x=n,s.y=t,s}function ne(n){const e=cn("svg").createSVGMatrix();if(n!=null){const s=n,r=e;for(const i in s)r[i]=s[i]}return e}function Ki(n){const t=cn("svg");return n!=null?(n instanceof DOMMatrix||(n=ne(n)),t.createSVGTransformFromMatrix(n)):t.createSVGTransform()}function Zi(n){let t=ne();const e=n!=null&&n.match(BR);if(!e)return t;for(let s=0,r=e.length;s<r;s+=1){const o=e[s].match(VR);if(o){let a,l,u,h,f,d=ne();const g=o[2].split(Sy);switch(o[1].toLowerCase()){case"scale":a=parseFloat(g[0]),l=g[1]===void 0?a:parseFloat(g[1]),d=d.scaleNonUniform(a,l);break;case"translate":u=parseFloat(g[0]),h=parseFloat(g[1]),d=d.translate(u,h);break;case"rotate":f=parseFloat(g[0]),u=parseFloat(g[1])||0,h=parseFloat(g[2])||0,u!==0||h!==0?d=d.translate(u,h).rotate(f).translate(-u,-h):d=d.rotate(f);break;case"skewx":f=parseFloat(g[0]),d=d.skewX(f);break;case"skewy":f=parseFloat(g[0]),d=d.skewY(f);break;case"matrix":d.a=parseFloat(g[0]),d.b=parseFloat(g[1]),d.c=parseFloat(g[2]),d.d=parseFloat(g[3]),d.e=parseFloat(g[4]),d.f=parseFloat(g[5]);break;default:continue}t=t.multiply(d)}}return t}function Br(n){const t=n||{},e=t.a!=null?t.a:1,s=t.b!=null?t.b:0,r=t.c!=null?t.c:0,i=t.d!=null?t.d:1,o=t.e!=null?t.e:0,a=t.f!=null?t.f:0;return`matrix(${e},${s},${r},${i},${o},${a})`}function qa(n){let t,e,s;if(n){const i=Sy;if(n.trim().indexOf("matrix")>=0){const o=Zi(n),a=$R(o);t=[a.translateX,a.translateY],e=[a.rotation],s=[a.scaleX,a.scaleY];const l=[];(t[0]!==0||t[1]!==0)&&l.push(`translate(${t.join(",")})`),(s[0]!==1||s[1]!==1)&&l.push(`scale(${s.join(",")})`),e[0]!==0&&l.push(`rotate(${e[0]})`),n=l.join(" ")}else{const o=n.match(/translate\((.*?)\)/);o&&(t=o[1].split(i));const a=n.match(/rotate\((.*?)\)/);a&&(e=a[1].split(i));const l=n.match(/scale\((.*?)\)/);l&&(s=l[1].split(i))}}const r=s&&s[0]?parseFloat(s[0]):1;return{raw:n||"",translation:{tx:t&&t[0]?parseInt(t[0],10):0,ty:t&&t[1]?parseInt(t[1],10):0},rotation:{angle:e&&e[0]?parseInt(e[0],10):0,cx:e&&e[1]?parseInt(e[1],10):void 0,cy:e&&e[2]?parseInt(e[2],10):void 0},scale:{sx:r,sy:s&&s[1]?parseFloat(s[1]):r}}}function Hu(n,t){const e=t.x*n.a+t.y*n.c+0,s=t.x*n.b+t.y*n.d+0;return{x:e,y:s}}function $R(n){const t=Hu(n,{x:0,y:1}),e=Hu(n,{x:1,y:0}),s=180/Math.PI*Math.atan2(t.y,t.x)-90,r=180/Math.PI*Math.atan2(e.y,e.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 zR(n){let t,e,s,r;return n?(t=n.a==null?1:n.a,r=n.d==null?1:n.d,e=n.b,s=n.c):t=r=1,{sx:e?Math.sqrt(t*t+e*e):t,sy:s?Math.sqrt(s*s+r*r):r}}function FR(n){let t={x:0,y:1};n&&(t=Hu(n,t));const e=180*Math.atan2(t.y,t.x)/Math.PI%360-90;return{angle:e%360+(e<0?360:0)}}function HR(n){return{tx:n&&n.e||0,ty:n&&n.f||0}}function Vr(n,t,e={}){if(t==null)return Zi(ut(n,"transform"));if(e.absolute){n.setAttribute("transform",Br(t));return}const s=n.transform,r=Ki(t);s.baseVal.appendItem(r)}function Ey(n,t,e=0,s={}){let r=ut(n,"transform");const i=qa(r);if(t==null)return i.translation;r=i.raw,r=r.replace(/translate\([^)]*\)/g,"").trim();const o=s.absolute?t:i.translation.tx+t,a=s.absolute?e:i.translation.ty+e,l=`translate(${o},${a})`;n.setAttribute("transform",`${l} ${r}`.trim())}function Uu(n,t,e,s,r={}){let i=ut(n,"transform");const o=qa(i);if(t==null)return o.rotation;i=o.raw,i=i.replace(/rotate\([^)]*\)/g,"").trim(),t%=360;const a=r.absolute?t:o.rotation.angle+t,l=e!=null&&s!=null?`,${e},${s}`:"",u=`rotate(${a}${l})`;n.setAttribute("transform",`${i} ${u}`.trim())}function Gu(n,t,e){let s=ut(n,"transform");const r=qa(s);if(t==null)return r.scale;e=e??t,s=r.raw,s=s.replace(/scale\([^)]*\)/g,"").trim();const i=`scale(${t},${e})`;n.setAttribute("transform",`${s} ${i}`.trim())}function Qi(n,t){if(gs(t)&&gs(n)){const e=t.getScreenCTM(),s=n.getScreenCTM();if(e&&s)return e.inverse().multiply(s)}return ne()}function UR(n,t){let e=ne();if(gs(t)&&gs(n)){let s=n;const r=[];for(;s&&s!==t;){const i=s.getAttribute("transform")||null,o=Zi(i);r.push(o),s=s.parentNode}r.reverse().forEach(i=>{e=e.multiply(i)})}return e}function GR(n,t,e){const s=n instanceof SVGSVGElement?n:n.ownerSVGElement,r=s.createSVGPoint();r.x=t,r.y=e;try{const i=s.getScreenCTM(),o=r.matrixTransform(i.inverse()),a=Qi(n,s).inverse();return o.matrixTransform(a)}catch{return r}}var Fe;(function(n){const t={};function e(i){return t[i]||{}}n.get=e;function s(i,o){t[i]=o}n.register=s;function r(i){delete t[i]}n.unregister=r})(Fe||(Fe={}));var Xs;(function(n){const t=new WeakMap;function e(i){return t.has(i)||t.set(i,{events:Object.create(null)}),t.get(i)}n.ensure=e;function s(i){return t.get(i)}n.get=s;function r(i){return t.delete(i)}n.remove=r})(Xs||(Xs={}));var it;(function(n){n.returnTrue=()=>!0,n.returnFalse=()=>!1;function t(r){r.stopPropagation()}n.stopPropagationCallback=t;function e(r,i,o){r.addEventListener!=null&&r.addEventListener(i,o)}n.addEventListener=e;function s(r,i,o){r.removeEventListener!=null&&r.removeEventListener(i,o)}n.removeEventListener=s})(it||(it={})),function(n){const t=/[^\x20\t\r\n\f]+/g,e=/^([^.]*)(?:\.(.+)|)/;function s(a){return(a||"").match(t)||[""]}n.splitType=s;function r(a){const l=e.exec(a)||[];return{originType:l[1]?l[1].trim():l[1],namespaces:l[2]?l[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,l){if(l){const u=a;return u.querySelector!=null&&u.querySelector(l)!=null}return!0}n.isValidSelector=o}(it||(it={})),function(n){let t=0;const e=new WeakMap;function s(a){return e.has(a)||(e.set(a,t),t+=1),e.get(a)}n.ensureHandlerId=s;function r(a){return e.get(a)}n.getHandlerId=r;function i(a){return e.delete(a)}n.removeHandlerId=i;function o(a,l){return e.set(a,l)}n.setHandlerId=o}(it||(it={})),function(n){function t(e,s){const r=[],i=Xs.get(e),o=i&&i.events&&i.events[s.type],a=o&&o.handlers||[],l=o?o.delegateCount:0;if(l>0&&!(s.type==="click"&&typeof s.button=="number"&&s.button>=1)){for(let u=s.target;u!==e;u=u.parentNode||e)if(u.nodeType===1&&!(s.type==="click"&&u.disabled===!0)){const h=[],f={};for(let d=0;d<l;d+=1){const g=a[d],p=g.selector;if(p!=null&&f[p]==null){const m=e,y=[];m.querySelectorAll(p).forEach(b=>{y.push(b)}),f[p]=y.includes(u)}f[p]&&h.push(g)}h.length&&r.push({elem:u,handlers:h})}}return l<a.length&&r.push({elem:e,handlers:a.slice(l)}),r}n.getHandlerQueue=t}(it||(it={})),function(n){function t(e){return e!=null&&e===e.window}n.isWindow=t}(it||(it={})),function(n){function t(e,s){const r=e.nodeType===9?e.documentElement:e,i=s&&s.parentNode;return e===i||!!(i&&i.nodeType===1&&(r.contains?r.contains(i):e.compareDocumentPosition&&e.compareDocumentPosition(i)&16))}n.contains=t}(it||(it={}));class En{constructor(t,e){this.isDefaultPrevented=it.returnFalse,this.isPropagationStopped=it.returnFalse,this.isImmediatePropagationStopped=it.returnFalse,this.isSimulated=!1,this.preventDefault=()=>{const s=this.originalEvent;this.isDefaultPrevented=it.returnTrue,s&&!this.isSimulated&&s.preventDefault()},this.stopPropagation=()=>{const s=this.originalEvent;this.isPropagationStopped=it.returnTrue,s&&!this.isSimulated&&s.stopPropagation()},this.stopImmediatePropagation=()=>{const s=this.originalEvent;this.isImmediatePropagationStopped=it.returnTrue,s&&!this.isSimulated&&s.stopImmediatePropagation(),this.stopPropagation()},typeof t=="string"?this.type=t:t.type&&(this.originalEvent=t,this.type=t.type,this.isDefaultPrevented=t.defaultPrevented?it.returnTrue:it.returnFalse,this.target=t.target,this.currentTarget=t.currentTarget,this.relatedTarget=t.relatedTarget,this.timeStamp=t.timeStamp),e&&Object.assign(this,e),this.timeStamp||(this.timeStamp=Date.now())}}(function(n){function t(e){return e instanceof n?e:new n(e)}n.create=t})(En||(En={})),function(n){function t(e,s){Object.defineProperty(n.prototype,e,{enumerable:!0,configurable:!0,get:typeof s=="function"?function(){if(this.originalEvent)return s(this.originalEvent)}:function(){if(this.originalEvent)return this.originalEvent[e]},set(r){Object.defineProperty(this,e,{enumerable:!0,configurable:!0,writable:!0,value:r})}})}n.addProperty=t}(En||(En={})),function(n){const t={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(t).forEach(e=>n.addProperty(e,t[e]))}(En||(En={})),function(n){Fe.register("load",{noBubble:!0})}(),function(n){Fe.register("beforeunload",{postDispatch(t,e){e.result!==void 0&&e.originalEvent&&(e.originalEvent.returnValue=e.result)}})}(),function(n){Fe.register("mouseenter",{delegateType:"mouseover",bindType:"mouseover",handle(t,e){let s;const r=e.relatedTarget,i=e.handleObj;return(!r||r!==t&&!it.contains(t,r))&&(e.type=i.originType,s=i.handler.call(t,e),e.type="mouseover"),s}}),Fe.register("mouseleave",{delegateType:"mouseout",bindType:"mouseout",handle(t,e){let s;const r=e.relatedTarget,i=e.handleObj;return(!r||r!==t&&!it.contains(t,r))&&(e.type=i.originType,s=i.handler.call(t,e),e.type="mouseout"),s}})}();var YR=function(n,t){var e={};for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&t.indexOf(s)<0&&(e[s]=n[s]);if(n!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,s=Object.getOwnPropertySymbols(n);r<s.length;r++)t.indexOf(s[r])<0&&Object.prototype.propertyIsEnumerable.call(n,s[r])&&(e[s[r]]=n[s[r]]);return e},to;(function(n){let t;function e(o,a,l,u,h){if(!it.isValidTarget(o))return;let f;if(typeof l!="function"){const{handler:m,selector:y}=l,b=YR(l,["handler","selector"]);l=m,h=y,f=b}const d=Xs.ensure(o);let g=d.handler;g==null&&(g=d.handler=function(m,...y){return t!==m.type?r(o,m,...y):void 0});const p=it.ensureHandlerId(l);it.splitType(a).forEach(m=>{const{originType:y,namespaces:b}=it.normalizeType(m);if(!y)return;let w=y,x=Fe.get(w);w=(h?x.delegateType:x.bindType)||w,x=Fe.get(w);const v=Object.assign({type:w,originType:y,data:u,selector:h,guid:p,handler:l,namespace:b.join(".")},f),S=d.events;let E=S[w];E||(E=S[w]={handlers:[],delegateCount:0},(!x.setup||x.setup(o,u,b,g)===!1)&&it.addEventListener(o,w,g)),x.add&&(it.removeHandlerId(v.handler),x.add(o,v),it.setHandlerId(v.handler,p)),h?(E.handlers.splice(E.delegateCount,0,v),E.delegateCount+=1):E.handlers.push(v)})}n.on=e;function s(o,a,l,u,h){const f=Xs.get(o);if(!f)return;const d=f.events;d&&(it.splitType(a).forEach(g=>{const{originType:p,namespaces:m}=it.normalizeType(g);if(!p){Object.keys(d).forEach(S=>{s(o,S+g,l,u,!0)});return}let y=p;const b=Fe.get(y);y=(u?b.delegateType:b.bindType)||y;const w=d[y];if(!w)return;const x=m.length>0?new RegExp(`(^|\\.)${m.join("\\.(?:.*\\.|)")}(\\.|$)`):null,v=w.handlers.length;for(let S=w.handlers.length-1;S>=0;S-=1){const E=w.handlers[S];(h||p===E.originType)&&(!l||it.getHandlerId(l)===E.guid)&&(x==null||E.namespace&&x.test(E.namespace))&&(u==null||u===E.selector||u==="**"&&E.selector)&&(w.handlers.splice(S,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)&&it.removeEventListener(o,y,f.handler),delete d[y])}),Object.keys(d).length===0&&Xs.remove(o))}n.off=s;function r(o,a,...l){const u=En.create(a);u.delegateTarget=o;const h=Fe.get(u.type);if(h.preDispatch&&h.preDispatch(o,u)===!1)return;const f=it.getHandlerQueue(o,u);for(let d=0,g=f.length;d<g&&!u.isPropagationStopped();d+=1){const p=f[d];u.currentTarget=p.elem;for(let m=0,y=p.handlers.length;m<y&&!u.isImmediatePropagationStopped();m+=1){const b=p.handlers[m];if(u.rnamespace==null||b.namespace&&u.rnamespace.test(b.namespace)){u.handleObj=b,u.data=b.data;const w=Fe.get(b.originType).handle,x=w?w(p.elem,u,...l):b.handler.call(p.elem,u,...l);x!==void 0&&(u.result=x,x===!1&&(u.preventDefault(),u.stopPropagation()))}}}return h.postDispatch&&h.postDispatch(o,u),u.result}n.dispatch=r;function i(o,a,l,u){let h=o,f=typeof o=="string"?o:o.type,d=typeof o=="string"||h.namespace==null?[]:h.namespace.split(".");const g=l;if(g.nodeType===3||g.nodeType===8)return;f.indexOf(".")>-1&&(d=f.split("."),f=d.shift(),d.sort());const p=f.indexOf(":")<0&&`on${f}`;h=o instanceof En?o:new En(f,typeof o=="object"?o:null),h.namespace=d.join("."),h.rnamespace=h.namespace?new RegExp(`(^|\\.)${d.join("\\.(?:.*\\.|)")}(\\.|$)`):null,h.result=void 0,h.target||(h.target=g);const m=[h];Array.isArray(a)?m.push(...a):m.push(a);const y=Fe.get(f);if(!u&&y.trigger&&y.trigger(g,h,a)===!1)return;let b;const w=[g];if(!u&&!y.noBubble&&!it.isWindow(g)){b=y.delegateType||f;let v=g,S=g.parentNode;for(;S!=null;)w.push(S),v=S,S=S.parentNode;const E=g.ownerDocument||document;if(v===E){const C=v.defaultView||v.parentWindow||window;w.push(C)}}let x=g;for(let v=0,S=w.length;v<S&&!h.isPropagationStopped();v+=1){const E=w[v];x=E,h.type=v>1?b:y.bindType||f;const C=Xs.get(E);C&&C.events[h.type]&&C.handler&&C.handler.call(E,...m);const M=p&&E[p]||null;M&&it.isValidTarget(E)&&(h.result=M.call(E,...m),h.result===!1&&h.preventDefault())}if(h.type=f,!u&&!h.isDefaultPrevented()){const v=y.preventDefault;if((v==null||v(w.pop(),h,a)===!1)&&it.isValidTarget(g)&&p&&typeof g[f]=="function"&&!it.isWindow(g)){const S=g[p];S&&(g[p]=null),t=f,h.isPropagationStopped()&&x.addEventListener(f,it.stopPropagationCallback),g[f](),h.isPropagationStopped()&&x.removeEventListener(f,it.stopPropagationCallback),t=void 0,S&&(g[p]=S)}}return h.result}n.trigger=i})(to||(to={}));var le;(function(n){function t(i,o,a,l,u){return eo.on(i,o,a,l,u),i}n.on=t;function e(i,o,a,l,u){return eo.on(i,o,a,l,u,!0),i}n.once=e;function s(i,o,a,l){return eo.off(i,o,a,l),i}n.off=s;function r(i,o,a,l){return to.trigger(o,a,i,l),i}n.trigger=r})(le||(le={}));var eo;(function(n){function t(s,r,i,o,a,l){if(typeof r=="object"){typeof i!="string"&&(o=o||i,i=void 0),Object.keys(r).forEach(u=>t(s,u,i,o,r[u],l));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=it.returnFalse;else if(!a)return;if(l){const u=a;a=function(h,...f){return n.off(s,h),u.call(this,h,...f)},it.setHandlerId(a,it.ensureHandlerId(u))}to.on(s,r,a,o,i)}n.on=t;function e(s,r,i,o){const a=r;if(a&&a.preventDefault!=null&&a.handleObj!=null){const l=a.handleObj;e(a.delegateTarget,l.namespace?`${l.originType}.${l.namespace}`:l.originType,l.selector,l.handler);return}if(typeof r=="object"){const l=r;Object.keys(l).forEach(u=>e(s,u,i,l[u]));return}(i===!1||typeof i=="function")&&(o=i,i=void 0),o===!1&&(o=it.returnFalse),to.off(s,r,o,i)}n.off=e})(eo||(eo={}));class Oy{constructor(t,e,s){this.animationFrameId=0,this.deltaX=0,this.deltaY=0,this.eventName=fs.isEventSupported("wheel")?"wheel":"mousewheel",this.target=t,this.onWheelCallback=e,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(t){if(this.onWheelGuard!=null&&!this.onWheelGuard(t))return;this.deltaX+=t.deltaX,this.deltaY+=t.deltaY,t.preventDefault();let e;(this.deltaX!==0||this.deltaY!==0)&&(t.stopPropagation(),e=!0),e===!0&&this.animationFrameId===0&&(this.animationFrameId=requestAnimationFrame(()=>{this.didWheel(t)}))}didWheel(t){this.animationFrameId=0,this.onWheelCallback(t,this.deltaX,this.deltaY),this.deltaX=0,this.deltaY=0}}function Yu(n){const t=n.getBoundingClientRect(),e=n.ownerDocument.defaultView;return{top:t.top+e.pageYOffset,left:t.left+e.pageXOffset}}function WR(n){return n.getBoundingClientRect().width}function qR(n){return n.getBoundingClientRect().height}function My(n,t=60){let e=null;return(...s)=>{e&&clearTimeout(e),e=window.setTimeout(()=>{n.apply(this,s)},t)}}function JR(n){let t=null,e=[];const s=()=>{if(getComputedStyle(n).position==="static"){const u=n.style;u.position="relative"}const l=document.createElement("object");return l.onload=()=>{l.contentDocument.defaultView.addEventListener("resize",r),r()},l.style.display="block",l.style.position="absolute",l.style.top="0",l.style.left="0",l.style.height="100%",l.style.width="100%",l.style.overflow="hidden",l.style.pointerEvents="none",l.style.zIndex="-1",l.style.opacity="0",l.setAttribute("tabindex","-1"),l.type="text/html",n.appendChild(l),l.data="about:blank",l},r=My(()=>{e.forEach(l=>l(n))}),i=l=>{t||(t=s()),e.indexOf(l)===-1&&e.push(l)},o=()=>{t&&t.parentNode&&(t.contentDocument&&t.contentDocument.defaultView.removeEventListener("resize",r),t.parentNode.removeChild(t),t=null,e=[])};return{element:n,bind:i,destroy:o,unbind:l=>{const u=e.indexOf(l);u!==-1&&e.splice(u,1),e.length===0&&t&&o()}}}function XR(n){let t=null,e=[];const s=My(()=>{e.forEach(l=>{l(n)})}),r=()=>{const l=new ResizeObserver(s);return l.observe(n),s(),l},i=l=>{t||(t=r()),e.indexOf(l)===-1&&e.push(l)},o=()=>{t&&(t.disconnect(),e=[],t=null)};return{element:n,bind:i,destroy:o,unbind:l=>{const u=e.indexOf(l);u!==-1&&e.splice(u,1),e.length===0&&t&&o()}}}const KR=typeof ResizeObserver<"u"?XR:JR;var Ja;(function(n){const t=new WeakMap;function e(r){let i=t.get(r);return i||(i=KR(r),t.set(r,i),i)}function s(r){r.destroy(),t.delete(r.element)}n.bind=(r,i)=>{const o=e(r);return o.bind(i),()=>o.unbind(i)},n.clear=r=>{const i=e(r);s(i)}})(Ja||(Ja={}));class no{constructor(t={}){this.comparator=t.comparator||no.defaultComparator,this.index={},this.data=t.data||[],this.heapify()}isEmpty(){return this.data.length===0}insert(t,e,s){const r={priority:t,value:e},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(t,e){const s=this.index[t];if(typeof s>"u")throw new Error(`Node with id '${t}' was not found in the heap.`);const r=this.data,i=r[s].priority,o=this.comparator(e,i);o<0?(r[s].priority=e,this.bubbleUp(s)):o>0&&(r[s].priority=e,this.bubbleDown(s))}remove(){const t=this.data,e=t[0],s=t.pop();return e.id&&delete this.index[e.id],t.length>0&&(t[0]=s,s.id&&(this.index[s.id]=0),this.bubbleDown(0)),e?e.value:null}heapify(){for(let t=0;t<this.data.length;t+=1)this.bubbleUp(t)}bubbleUp(t){const e=this.data;let s,r,i=t;for(;i>0&&(r=i-1>>>1,this.comparator(e[i].priority,e[r].priority)<0);){s=e[r],e[r]=e[i];let o=e[i].id;o!=null&&(this.index[o]=r),e[i]=s,o=e[i].id,o!=null&&(this.index[o]=i),i=r}}bubbleDown(t){const e=this.data,s=e.length-1;let r=t;for(;;){const i=(r<<1)+1,o=i+1;let a=r;if(i<=s&&this.comparator(e[i].priority,e[a].priority)<0&&(a=i),o<=s&&this.comparator(e[o].priority,e[a].priority)<0&&(a=o),a!==r){const l=e[a];e[a]=e[r];let u=e[r].id;u!=null&&(this.index[u]=a),e[r]=l,u=e[r].id,u!=null&&(this.index[u]=r),r=a}else break}}}(function(n){n.defaultComparator=(t,e)=>t-e})(no||(no={}));var Wu;(function(n){function t(e,s,r=(i,o)=>1){const i={},o={},a={},l=new no;for(i[s]=0,Object.keys(e).forEach(u=>{u!==s&&(i[u]=1/0),l.insert(i[u],u,u)});!l.isEmpty();){const u=l.remove();a[u]=!0;const h=e[u]||[];for(let f=0;f<h.length;f+=1){const d=h[f];if(!a[d]){const g=i[u]+r(u,d);g<i[d]&&(i[d]=g,o[d]=u,l.updatePriority(d,g))}}}return o}n.run=t})(Wu||(Wu={}));class Wn{constructor(t,e,s,r){if(t==null)return this.set(255,255,255,1);if(typeof t=="number")return this.set(t,e,s,r);if(typeof t=="string")return Wn.fromString(t)||this;if(Array.isArray(t))return this.set(t);this.set(t.r,t.g,t.b,t.a==null?1:t.a)}blend(t,e,s){this.set(t.r+(e.r-t.r)*s,t.g+(e.g-t.g)*s,t.b+(e.b-t.b)*s,t.a+(e.a-t.a)*s)}lighten(t){const e=Wn.lighten(this.toArray(),t);this.r=e[0],this.g=e[1],this.b=e[2],this.a=e[3]}darken(t){this.lighten(-t)}set(t,e,s,r){const i=Array.isArray(t)?t[0]:t,o=Array.isArray(t)?t[1]:e,a=Array.isArray(t)?t[2]:s,l=Array.isArray(t)?t[3]:r;return this.r=Math.round(we(i,0,255)),this.g=Math.round(we(o,0,255)),this.b=Math.round(we(a,0,255)),this.a=l==null?1:we(l,0,1),this}toHex(){return`#${["r","g","b"].map(e=>{const s=this[e].toString(16);return s.length<2?`0${s}`:s}).join("")}`}toRGBA(){return this.toArray()}toHSLA(){return Wn.rgba2hsla(this.r,this.g,this.b,this.a)}toCSS(t){const e=`${this.r},${this.g},${this.b},`;return t?`rgb(${e})`:`rgba(${e},${this.a})`}toGrey(){return Wn.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 t(x){return new n(x)}n.fromArray=t;function e(x){return new n([...p(x),1])}n.fromHex=e;function s(x){const v=x.toLowerCase().match(/^rgba?\(([\s.,0-9]+)\)/);if(v){const S=v[1].split(/\s*,\s*/).map(E=>parseInt(E,10));return new n(S)}return null}n.fromRGBA=s;function r(x,v,S){S<0&&++S,S>1&&--S;const E=6*S;return E<1?x+(v-x)*E:2*S<1?v:3*S<2?x+(v-x)*(2/3-S)*6:x}function i(x){const v=x.toLowerCase().match(/^hsla?\(([\s.,0-9]+)\)/);if(v){const S=v[2].split(/\s*,\s*/),E=(parseFloat(S[0])%360+360)%360/360,C=parseFloat(S[1])/100,M=parseFloat(S[2])/100,T=S[3]==null?1:parseInt(S[3],10);return new n(u(E,C,M,T))}return null}n.fromHSLA=i;function o(x){if(x.startsWith("#"))return e(x);if(x.startsWith("rgb"))return s(x);const v=n.named[x];return v?e(v):i(x)}n.fromString=o;function a(x,v){return n.fromArray([x,x,x,v])}n.makeGrey=a;function l(x,v,S,E){const C=Array.isArray(x)?x[0]:x,M=Array.isArray(x)?x[1]:v,T=Array.isArray(x)?x[2]:S,k=Array.isArray(x)?x[3]:E,_=Math.max(C,M,T),D=Math.min(C,M,T),N=(_+D)/2;let V=0,A=0;if(D!==_){const P=_-D;switch(A=N>.5?P/(2-_-D):P/(_+D),_){case C:V=(M-T)/P+(M<T?6:0);break;case M:V=(T-C)/P+2;break;case T:V=(C-M)/P+4;break}V/=6}return[V,A,N,k??1]}n.rgba2hsla=l;function u(x,v,S,E){const C=Array.isArray(x)?x[0]:x,M=Array.isArray(x)?x[1]:v,T=Array.isArray(x)?x[2]:S,k=Array.isArray(x)?x[3]:E,_=T<=.5?T*(M+1):T+M-T*M,D=2*T-_;return[r(D,_,C+1/3)*256,r(D,_,C)*256,r(D,_,C-1/3)*256,k??1]}n.hsla2rgba=u;function h(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=h;function f(){const x="0123456789ABCDEF";let v="#";for(let S=0;S<6;S+=1)v+=x[Math.floor(Math.random()*16)];return v}n.randomHex=f;function d(x){return h(x).toString()}n.randomRGBA=d;function g(x,v){if(typeof x=="string"){const T=x[0]==="#",[k,_,D]=p(x);return v?k*.299+_*.587+D*.114>186?"#000000":"#ffffff":`${T?"#":""}${m(255-k,255-_,255-D)}`}const S=x[0],E=x[1],C=x[2],M=x[3];return v?S*.299+E*.587+C*.114>186?[0,0,0,M]:[255,255,255,M]:[255-S,255-E,255-C,M]}n.invert=g;function p(x){const v=x.indexOf("#")===0?x:`#${x}`;let S=+`0x${v.substr(1)}`;if(!(v.length===4||v.length===7)||Number.isNaN(S))throw new Error("Invalid hex color.");const E=v.length===4?4:8,C=(1<<E)-1,M=["b","g","r"].map(()=>{const T=S&C;return S>>=E,E===4?17*T:T});return[M[2],M[1],M[0]]}function m(x,v,S){const E=C=>C.length<2?`0${C}`:C;return`${E(x.toString(16))}${E(v.toString(16))}${E(S.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 C=x[0]==="#",M=parseInt(C?x.substr(1):x,16),T=we((M>>16)+v,0,255),k=we((M>>8&255)+v,0,255),_=we((M&255)+v,0,255);return`${C?"#":""}${(_|k<<8|T<<16).toString(16)}`}const S=m(x[0],x[1],x[2]),E=p(w(S,v));return[E[0],E[1],E[2],x[3]]}})(Wn||(Wn={})),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"}}(Wn||(Wn={}));class qu{constructor(){this.clear()}clear(){this.map=new WeakMap,this.arr=[]}has(t){return this.map.has(t)}get(t){return this.map.get(t)}set(t,e){this.map.set(t,e),this.arr.push(t)}delete(t){const e=this.arr.indexOf(t);e>=0&&this.arr.splice(e,1);const s=this.map.get(t);return this.map.delete(t),s}each(t){this.arr.forEach(e=>{const s=this.map.get(e);t(s,e)})}dispose(){this.clear()}}var ms;(function(n){function t(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=t;function e(r,i){if(r!=null&&i!=null){const o=t(r),a=t(i),l=o.or.sort(),u=a.or.sort(),h=o.and.sort(),f=a.and.sort(),d=(g,p)=>g.length===p.length&&(g.length===0||g.every((m,y)=>m===p[y]));return d(l,u)&&d(h,f)}return r==null&&i==null}n.equals=e;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:l}=t(i),u=h=>{const f=`${h.toLowerCase()}Key`;return r[f]===!0};return a.some(h=>u(h))&&l.every(h=>u(h))}n.isMatch=s})(ms||(ms={}));var Ks;(function(n){n.linear=t=>t,n.quad=t=>t*t,n.cubic=t=>t*t*t,n.inout=t=>{if(t<=0)return 0;if(t>=1)return 1;const e=t*t,s=e*t;return 4*(t<.5?s:3*(t-e)+s-.75)},n.exponential=t=>Math.pow(2,10*(t-1)),n.bounce=t=>{for(let e=0,s=1;;e+=s,s/=2)if(t>=(7-4*e)/11){const r=(11-6*e-11*t)/4;return-r*r+s*s}}})(Ks||(Ks={})),function(n){n.decorators={reverse(t){return e=>1-t(1-e)},reflect(t){return e=>.5*(e<.5?t(2*e):2-t(2-2*e))},clamp(t,e=0,s=1){return r=>{const i=t(r);return i<e?e:i>s?s:i}},back(t=1.70158){return e=>e*e*((t+1)*e-t)},elastic(t=1.5){return e=>Math.pow(2,10*(e-1))*Math.cos(20*Math.PI*t/3*e)}}}(Ks||(Ks={})),function(n){function t(A){return-1*Math.cos(A*(Math.PI/2))+1}n.easeInSine=t;function e(A){return Math.sin(A*(Math.PI/2))}n.easeOutSine=e;function s(A){return-.5*(Math.cos(Math.PI*A)-1)}n.easeInOutSine=s;function r(A){return A*A}n.easeInQuad=r;function i(A){return A*(2-A)}n.easeOutQuad=i;function o(A){return A<.5?2*A*A:-1+(4-2*A)*A}n.easeInOutQuad=o;function a(A){return A*A*A}n.easeInCubic=a;function l(A){const P=A-1;return P*P*P+1}n.easeOutCubic=l;function u(A){return A<.5?4*A*A*A:(A-1)*(2*A-2)*(2*A-2)+1}n.easeInOutCubic=u;function h(A){return A*A*A*A}n.easeInQuart=h;function f(A){const P=A-1;return 1-P*P*P*P}n.easeOutQuart=f;function d(A){const P=A-1;return A<.5?8*A*A*A*A:1-8*P*P*P*P}n.easeInOutQuart=d;function g(A){return A*A*A*A*A}n.easeInQuint=g;function p(A){const P=A-1;return 1+P*P*P*P*P}n.easeOutQuint=p;function m(A){const P=A-1;return A<.5?16*A*A*A*A*A:1+16*P*P*P*P*P}n.easeInOutQuint=m;function y(A){return A===0?0:Math.pow(2,10*(A-1))}n.easeInExpo=y;function b(A){return A===1?1:-Math.pow(2,-10*A)+1}n.easeOutExpo=b;function w(A){if(A===0||A===1)return A;const P=A*2,L=P-1;return P<1?.5*Math.pow(2,10*L):.5*(-Math.pow(2,-10*L)+2)}n.easeInOutExpo=w;function x(A){const P=A/1;return-1*(Math.sqrt(1-P*A)-1)}n.easeInCirc=x;function v(A){const P=A-1;return Math.sqrt(1-P*P)}n.easeOutCirc=v;function S(A){const P=A*2,L=P-2;return P<1?-.5*(Math.sqrt(1-P*P)-1):.5*(Math.sqrt(1-L*L)+1)}n.easeInOutCirc=S;function E(A,P=1.70158){return A*A*((P+1)*A-P)}n.easeInBack=E;function C(A,P=1.70158){const L=A/1-1;return L*L*((P+1)*L+P)+1}n.easeOutBack=C;function M(A,P=1.70158){const L=A*2,j=L-2,Y=P*1.525;return L<1?.5*L*L*((Y+1)*L-Y):.5*(j*j*((Y+1)*j+Y)+2)}n.easeInOutBack=M;function T(A,P=.7){if(A===0||A===1)return A;const j=A/1-1,Y=1-P,ot=Y/(2*Math.PI)*Math.asin(1);return-(Math.pow(2,10*j)*Math.sin((j-ot)*(2*Math.PI)/Y))}n.easeInElastic=T;function k(A,P=.7){const L=1-P,j=A*2;if(A===0||A===1)return A;const Y=L/(2*Math.PI)*Math.asin(1);return Math.pow(2,-10*j)*Math.sin((j-Y)*(2*Math.PI)/L)+1}n.easeOutElastic=k;function _(A,P=.65){const L=1-P;if(A===0||A===1)return A;const j=A*2,Y=j-1,ot=L/(2*Math.PI)*Math.asin(1);return j<1?-.5*(Math.pow(2,10*Y)*Math.sin((Y-ot)*(2*Math.PI)/L)):Math.pow(2,-10*Y)*Math.sin((Y-ot)*(2*Math.PI)/L)*.5+1}n.easeInOutElastic=_;function D(A){const P=A/1;if(P<1/2.75)return 7.5625*P*P;if(P<2/2.75){const L=P-.5454545454545454;return 7.5625*L*L+.75}if(P<2.5/2.75){const L=P-.8181818181818182;return 7.5625*L*L+.9375}{const L=P-.9545454545454546;return 7.5625*L*L+.984375}}n.easeOutBounce=D;function N(A){return 1-D(1-A)}n.easeInBounce=N;function V(A){return A<.5?N(A*2)*.5:D(A*2-1)*.5+.5}n.easeInOutBounce=V}(Ks||(Ks={}));var Zs;(function(n){n.number=(t,e)=>{const s=e-t;return r=>t+s*r},n.object=(t,e)=>{const s=Object.keys(t);return r=>{const i={};for(let o=s.length-1;o!==-1;o-=1){const a=s[o];i[a]=t[a]+(e[a]-t[a])*r}return i}},n.unit=(t,e)=>{const s=/(-?[0-9]*.[0-9]*)(px|em|cm|mm|in|pt|pc|%)/,r=s.exec(t),i=s.exec(e),o=i?i[1]:"",a=r?+r[1]:0,l=i?+i[1]:0,u=o.indexOf("."),h=u>0?o[1].length-u-1:0,f=l-a,d=r?r[2]:"";return g=>(a+f*g).toFixed(h)+d},n.color=(t,e)=>{const s=parseInt(t.slice(1),16),r=parseInt(e.slice(1),16),i=s&255,o=(r&255)-i,a=s&65280,l=(r&65280)-a,u=s&16711680,h=(r&16711680)-u;return f=>{const d=i+o*f&255,g=a+l*f&65280,p=u+h*f&16711680;return`#${(1<<24|d|g|p).toString(16).slice(1)}`}}})(Zs||(Zs={}));const so=[];function jr(n,t){const e=so.find(s=>s.name===n);if(!(e&&(e.loadTimes+=1,e.loadTimes>1))&&!fs.isApplyingHMR()){const s=document.createElement("style");s.setAttribute("type","text/css"),s.textContent=t;const r=document.querySelector("head");r&&r.insertBefore(s,r.firstChild),so.push({name:n,loadTimes:1,styleElement:s})}}function $r(n){const t=so.findIndex(e=>e.name===n);if(t>-1){const e=so[t];if(e.loadTimes-=1,e.loadTimes>0)return;let s=e.styleElement;s&&s.parentNode&&s.parentNode.removeChild(s),s=null,so.splice(t,1)}}var gt;(function(n){function t(s){return 180*s/Math.PI%360}n.toDeg=t,n.toRad=function(s,r=!1){return(r?s:s%360)*Math.PI/180};function e(s){return s%360+(s<0?360:0)}n.normalize=e})(gt||(gt={}));var wt;(function(n){function t(a,l=0){return Number.isInteger(a)?a:+a.toFixed(l)}n.round=t;function e(a,l){let u,h;if(l==null?(h=a??1,u=0):(h=l,u=a??0),h<u){const f=u;u=h,h=f}return Math.floor(Math.random()*(h-u+1)+u)}n.random=e;function s(a,l,u){return Number.isNaN(a)?NaN:Number.isNaN(l)||Number.isNaN(u)?0:l<u?a<l?l:a>u?u:a:a<u?u:a>l?l:a}n.clamp=s;function r(a,l){return l*Math.round(a/l)}n.snapToGrid=r;function i(a,l){return l!=null&&a!=null&&l.x>=a.x&&l.x<=a.x+a.width&&l.y>=a.y&&l.y<=a.y+a.height}n.containsPoint=i;function o(a,l){const u=a.x-l.x,h=a.y-l.y;return u*u+h*h}n.squaredLength=o})(wt||(wt={}));class ys{valueOf(){return this.toJSON()}toString(){return JSON.stringify(this.toJSON())}}class O extends ys{constructor(t,e){super(),this.x=t??0,this.y=e??0}round(t=0){return this.x=wt.round(this.x,t),this.y=wt.round(this.y,t),this}add(t,e){const s=O.create(t,e);return this.x+=s.x,this.y+=s.y,this}update(t,e){const s=O.create(t,e);return this.x=s.x,this.y=s.y,this}translate(t,e){const s=O.create(t,e);return this.x+=s.x,this.y+=s.y,this}rotate(t,e){const s=O.rotate(this,t,e);return this.x=s.x,this.y=s.y,this}scale(t,e,s=new O){const r=O.create(s);return this.x=r.x+t*(this.x-r.x),this.y=r.y+e*(this.y-r.y),this}closest(t){if(t.length===1)return O.create(t[0]);let e=null,s=1/0;return t.forEach(r=>{const i=this.squaredDistance(r);i<s&&(e=r,s=i)}),e?O.create(e):null}distance(t){return Math.sqrt(this.squaredDistance(t))}squaredDistance(t){const e=O.create(t),s=this.x-e.x,r=this.y-e.y;return s*s+r*r}manhattanDistance(t){const e=O.create(t);return Math.abs(e.x-this.x)+Math.abs(e.y-this.y)}magnitude(){return Math.sqrt(this.x*this.x+this.y*this.y)||.01}theta(t=new O){const e=O.create(t),s=-(e.y-this.y),r=e.x-this.x;let i=Math.atan2(s,r);return i<0&&(i=2*Math.PI+i),180*i/Math.PI}angleBetween(t,e){if(this.equals(t)||this.equals(e))return NaN;let s=this.theta(e)-this.theta(t);return s<0&&(s+=360),s}vectorAngle(t){return new O(0,0).angleBetween(this,t)}toPolar(t){return this.update(O.toPolar(this,t)),this}changeInAngle(t,e,s=new O){return this.clone().translate(-t,-e).theta(s)-this.theta(s)}adhereToRect(t){return wt.containsPoint(t,this)||(this.x=Math.min(Math.max(this.x,t.x),t.x+t.width),this.y=Math.min(Math.max(this.y,t.y),t.y+t.height)),this}bearing(t){const e=O.create(t),s=gt.toRad(this.y),r=gt.toRad(e.y),i=this.x,o=e.x,a=gt.toRad(o-i),l=Math.sin(a)*Math.cos(r),u=Math.cos(s)*Math.sin(r)-Math.sin(s)*Math.cos(r)*Math.cos(a),h=gt.toDeg(Math.atan2(l,u)),f=["NE","E","SE","S","SW","W","NW","N"];let d=h-22.5;return d<0&&(d+=360),d=parseInt(d/45,10),f[d]}cross(t,e){if(t!=null&&e!=null){const s=O.create(t),r=O.create(e);return(r.x-this.x)*(s.y-this.y)-(r.y-this.y)*(s.x-this.x)}return NaN}dot(t){const e=O.create(t);return this.x*e.x+this.y*e.y}diff(t,e){if(typeof t=="number")return new O(this.x-t,this.y-e);const s=O.create(t);return new O(this.x-s.x,this.y-s.y)}lerp(t,e){const s=O.create(t);return new O((1-e)*this.x+e*s.x,(1-e)*this.y+e*s.y)}normalize(t=1){const e=t/this.magnitude();return this.scale(e,e)}move(t,e){const s=O.create(t),r=gt.toRad(s.theta(this));return this.translate(Math.cos(r)*e,-Math.sin(r)*e)}reflection(t){return O.create(t).move(this,this.distance(t))}snapToGrid(t,e){return this.x=wt.snapToGrid(this.x,t),this.y=wt.snapToGrid(this.y,e??t),this}equals(t){const e=O.create(t);return e!=null&&e.x===this.x&&e.y===this.y}clone(){return O.clone(this)}toJSON(){return O.toJSON(this)}serialize(){return`${this.x} ${this.y}`}}(function(n){function t(e){return e!=null&&e instanceof n}n.isPoint=t})(O||(O={})),function(n){function t(s){return s!=null&&typeof s=="object"&&typeof s.x=="number"&&typeof s.y=="number"}n.isPointLike=t;function e(s){return s!=null&&Array.isArray(s)&&s.length===2&&typeof s[0]=="number"&&typeof s[1]=="number"}n.isPointData=e}(O||(O={})),function(n){function t(f,d){return f==null||typeof f=="number"?new n(f,d):e(f)}n.create=t;function e(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=e;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,d,g=new n){let p=Math.abs(f*Math.cos(d)),m=Math.abs(f*Math.sin(d));const y=e(g),b=gt.normalize(gt.toDeg(d));return b<90?m=-m:b<180?(p=-p,m=-m):b<270&&(p=-p),new n(y.x+p,y.y+m)}n.fromPolar=r;function i(f,d=new n){const g=e(f),p=e(d),m=g.x-p.x,y=g.y-p.y;return new n(Math.sqrt(m*m+y*y),gt.toRad(p.theta(g)))}n.toPolar=i;function o(f,d){return f===d?!0:f!=null&&d!=null?f.x===d.x&&f.y===d.y:!1}n.equals=o;function a(f,d){if(f==null&&d!=null||f!=null&&d==null||f!=null&&d!=null&&f.length!==d.length)return!1;if(f!=null&&d!=null){for(let g=0,p=f.length;g<p;g+=1)if(!o(f[g],d[g]))return!1}return!0}n.equalPoints=a;function l(f,d,g,p){return new n(wt.random(f,d),wt.random(g,p))}n.random=l;function u(f,d,g){const p=gt.toRad(gt.normalize(-d)),m=Math.sin(p),y=Math.cos(p);return h(f,y,m,g)}n.rotate=u;function h(f,d,g,p=new n){const m=e(f),y=e(p),b=m.x-y.x,w=m.y-y.y,x=b*d-w*g,v=w*d+b*g;return new n(x+y.x,v+y.y)}n.rotateEx=h}(O||(O={}));class z extends ys{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 O(this.x,this.y)}get topLeft(){return new O(this.x,this.y)}get topCenter(){return new O(this.x+this.width/2,this.y)}get topRight(){return new O(this.x+this.width,this.y)}get center(){return new O(this.x+this.width/2,this.y+this.height/2)}get bottomLeft(){return new O(this.x,this.y+this.height)}get bottomCenter(){return new O(this.x+this.width/2,this.y+this.height)}get bottomRight(){return new O(this.x+this.width,this.y+this.height)}get corner(){return new O(this.x+this.width,this.y+this.height)}get rightMiddle(){return new O(this.x+this.width,this.y+this.height/2)}get leftMiddle(){return new O(this.x,this.y+this.height/2)}get topLine(){return new W(this.topLeft,this.topRight)}get rightLine(){return new W(this.topRight,this.bottomRight)}get bottomLine(){return new W(this.bottomLeft,this.bottomRight)}get leftLine(){return new W(this.topLeft,this.bottomLeft)}constructor(t,e,s,r){super(),this.x=t??0,this.y=e??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(t){if(!t)return this.clone();const e=gt.toRad(t),s=Math.abs(Math.sin(e)),r=Math.abs(Math.cos(e)),i=this.width*r+this.height*s,o=this.width*s+this.height*r;return new z(this.x+(this.width-i)/2,this.y+(this.height-o)/2,i,o)}round(t=0){return this.x=wt.round(this.x,t),this.y=wt.round(this.y,t),this.width=wt.round(this.width,t),this.height=wt.round(this.height,t),this}add(t,e,s,r){const i=z.create(t,e,s,r),o=Math.min(this.x,i.x),a=Math.min(this.y,i.y),l=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=l-o,this.height=u-a,this}update(t,e,s,r){const i=z.create(t,e,s,r);return this.x=i.x,this.y=i.y,this.width=i.width,this.height=i.height,this}inflate(t,e){const s=t,r=e??t;return this.x-=s,this.y-=r,this.width+=2*s,this.height+=2*r,this}snapToGrid(t,e){const s=this.origin.snapToGrid(t,e),r=this.corner.snapToGrid(t,e);return this.x=s.x,this.y=s.y,this.width=r.x-s.x,this.height=r.y-s.y,this}translate(t,e){const s=O.create(t,e);return this.x+=s.x,this.y+=s.y,this}scale(t,e,s=new O){const r=this.origin.scale(t,e,s);return this.x=r.x,this.y=r.y,this.width*=t,this.height*=e,this}rotate(t,e=this.getCenter()){if(t!==0){const s=gt.toRad(t),r=Math.cos(s),i=Math.sin(s);let o=this.getOrigin(),a=this.getTopRight(),l=this.getBottomRight(),u=this.getBottomLeft();o=O.rotateEx(o,r,i,e),a=O.rotateEx(a,r,i,e),l=O.rotateEx(l,r,i,e),u=O.rotateEx(u,r,i,e);const h=new z(o.x,o.y,0,0);h.add(a.x,a.y,0,0),h.add(l.x,l.y,0,0),h.add(u.x,u.y,0,0),this.update(h)}return this}rotate90(){const t=(this.width-this.height)/2;this.x+=t,this.y-=t;const e=this.width;return this.width=this.height,this.height=e,this}moveAndExpand(t){const e=z.clone(t);return this.x+=e.x||0,this.y+=e.y||0,this.width+=e.width||0,this.height+=e.height||0,this}getMaxScaleToFit(t,e=this.center){const s=z.clone(t),r=e.x,i=e.y;let o=1/0,a=1/0,l=1/0,u=1/0,h=1/0,f=1/0,d=1/0,g=1/0;const p=s.topLeft;p.x<r&&(o=(this.x-r)/(p.x-r)),p.y<i&&(h=(this.y-i)/(p.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&&(l=(this.x+this.width-r)/(y.x-r)),y.y<i&&(d=(this.y-i)/(y.y-i));const b=s.bottomLeft;return b.x<r&&(u=(this.x-r)/(b.x-r)),b.y>i&&(g=(this.y+this.height-i)/(b.y-i)),{sx:Math.min(o,a,l,u),sy:Math.min(h,f,d,g)}}getMaxUniformScaleToFit(t,e=this.center){const s=this.getMaxScaleToFit(t,e);return Math.min(s.sx,s.sy)}containsPoint(t,e){return wt.containsPoint(this,O.create(t,e))}containsRect(t,e,s,r){const i=z.create(t,e,s,r),o=this.x,a=this.y,l=this.width,u=this.height,h=i.x,f=i.y,d=i.width,g=i.height;return l===0||u===0||d===0||g===0?!1:h>=o&&f>=a&&h+d<=o+l&&f+g<=a+u}intersectsWithLine(t){const e=[this.topLine,this.rightLine,this.bottomLine,this.leftLine],s=[],r=[];return e.forEach(i=>{const o=t.intersectsWithLine(i);o!==null&&r.indexOf(o.toString())<0&&(s.push(o),r.push(o.toString()))}),s.length>0?s:null}intersectsWithLineFromCenterToPoint(t,e){const s=O.clone(t),r=this.center;let i=null;e!=null&&e!==0&&s.rotate(e,r);const o=[this.topLine,this.rightLine,this.bottomLine,this.leftLine],a=new W(r,s);for(let l=o.length-1;l>=0;l-=1){const u=o[l].intersectsWithLine(a);if(u!==null){i=u;break}}return i&&e!=null&&e!==0&&i.rotate(-e,r),i}intersectsWithRect(t,e,s,r){const i=z.create(t,e,s,r);if(!this.isIntersectWithRect(i))return null;const o=this.origin,a=this.corner,l=i.origin,u=i.corner,h=Math.max(o.x,l.x),f=Math.max(o.y,l.y);return new z(h,f,Math.min(a.x,u.x)-h,Math.min(a.y,u.y)-f)}isIntersectWithRect(t,e,s,r){const i=z.create(t,e,s,r),o=this.origin,a=this.corner,l=i.origin,u=i.corner;return!(u.x<=o.x||u.y<=o.y||l.x>=a.x||l.y>=a.y)}normalize(){let t=this.x,e=this.y,s=this.width,r=this.height;return this.width<0&&(t=this.x+this.width,s=-this.width),this.height<0&&(e=this.y+this.height,r=-this.height),this.x=t,this.y=e,this.width=s,this.height=r,this}union(t){const e=z.clone(t),s=this.origin,r=this.corner,i=e.origin,o=e.corner,a=Math.min(s.x,i.x),l=Math.min(s.y,i.y),u=Math.max(r.x,o.x),h=Math.max(r.y,o.y);return new z(a,l,u-a,h-l)}getNearestSideToPoint(t){const e=O.clone(t),s=e.x-this.x,r=this.x+this.width-e.x,i=e.y-this.y,o=this.y+this.height-e.y;let a=s,l="left";return r<a&&(a=r,l="right"),i<a&&(a=i,l="top"),o<a&&(l="bottom"),l}getNearestPointToPoint(t){const e=O.clone(t);if(this.containsPoint(e)){const s=this.getNearestSideToPoint(e);if(s==="left")return new O(this.x,e.y);if(s==="top")return new O(e.x,this.y);if(s==="right")return new O(this.x+this.width,e.y);if(s==="bottom")return new O(e.x,this.y+this.height)}return e.adhereToRect(this)}equals(t){return t!=null&&t.x===this.x&&t.y===this.y&&t.width===this.width&&t.height===this.height}clone(){return new z(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 t(e){return e!=null&&e instanceof n}n.isRectangle=t})(z||(z={})),function(n){function t(e){return e!=null&&typeof e=="object"&&typeof e.x=="number"&&typeof e.y=="number"&&typeof e.width=="number"&&typeof e.height=="number"}n.isRectangleLike=t}(z||(z={})),function(n){function t(o,a,l,u){return o==null||typeof o=="number"?new n(o,a,l,u):e(o)}n.create=t;function e(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=e;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}(z||(z={}));class W extends ys{get center(){return new O((this.start.x+this.end.x)/2,(this.start.y+this.end.y)/2)}constructor(t,e,s,r){super(),typeof t=="number"&&typeof e=="number"?(this.start=new O(t,e),this.end=new O(s,r)):(this.start=O.create(t),this.end=O.create(e))}getCenter(){return this.center}round(t=0){return this.start.round(t),this.end.round(t),this}translate(t,e){return typeof t=="number"?(this.start.translate(t,e),this.end.translate(t,e)):(this.start.translate(t),this.end.translate(t)),this}rotate(t,e){return this.start.rotate(t,e),this.end.rotate(t,e),this}scale(t,e,s){return this.start.scale(t,e,s),this.end.scale(t,e,s),this}length(){return Math.sqrt(this.squaredLength())}squaredLength(){const t=this.start.x-this.end.x,e=this.start.y-this.end.y;return t*t+e*e}setLength(t){const e=this.length();if(!e)return this;const s=t/e;return this.scale(s,s,this.start)}parallel(t){const e=this.clone();if(!e.isDifferentiable())return e;const{start:s,end:r}=e,i=s.clone().rotate(270,r),o=r.clone().rotate(90,s);return s.move(o,t),r.move(i,t),e}vector(){return new O(this.end.x-this.start.x,this.end.y-this.start.y)}angle(){const t=new O(this.start.x+1,this.start.y);return this.start.angleBetween(this.end,t)}bbox(){const t=Math.min(this.start.x,this.end.x),e=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 z(t,e,s-t,r-e)}bearing(){return this.start.bearing(this.end)}closestPoint(t){return this.pointAt(this.closestPointNormalizedLength(t))}closestPointLength(t){return this.closestPointNormalizedLength(t)*this.length()}closestPointTangent(t){return this.tangentAt(this.closestPointNormalizedLength(t))}closestPointNormalizedLength(t){const e=this.vector().dot(new W(this.start,t).vector()),s=Math.min(1,Math.max(0,e/this.squaredLength()));return Number.isNaN(s)?0:s}pointAt(t){const e=this.start,s=this.end;return t<=0?e.clone():t>=1?s.clone():e.lerp(s,t)}pointAtLength(t){const e=this.start,s=this.end;let r=!0;t<0&&(r=!1,t=-t);const i=this.length();if(t>=i)return r?s.clone():e.clone();const o=(r?t:i-t)/i;return this.pointAt(o)}divideAt(t){const e=this.pointAt(t);return[new W(this.start,e),new W(e,this.end)]}divideAtLength(t){const e=this.pointAtLength(t);return[new W(this.start,e),new W(e,this.end)]}containsPoint(t){const e=this.start,s=this.end;if(e.cross(t,s)!==0)return!1;const r=this.length();return!(new W(e,t).length()>r||new W(t,s).length()>r)}intersect(t,e){const s=t.intersectsWithLine(this,e);return s?Array.isArray(s)?s:[s]:null}intersectsWithLine(t){const e=new O(this.end.x-this.start.x,this.end.y-this.start.y),s=new O(t.end.x-t.start.x,t.end.y-t.start.y),r=e.x*s.y-e.y*s.x,i=new O(t.start.x-this.start.x,t.start.y-this.start.y),o=i.x*s.y-i.y*s.x,a=i.x*e.y-i.y*e.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 O(this.start.x+o*e.x/r,this.start.y+o*e.y/r)}isDifferentiable(){return!this.start.equals(this.end)}pointOffset(t){const e=O.clone(t),s=this.start,r=this.end;return((r.x-s.x)*(e.y-s.y)-(r.y-s.y)*(e.x-s.x))/this.length()}pointSquaredDistance(t,e){const s=O.create(t,e);return this.closestPoint(s).squaredDistance(s)}pointDistance(t,e){const s=O.create(t,e);return this.closestPoint(s).distance(s)}tangentAt(t){if(!this.isDifferentiable())return null;const e=this.start,s=this.end,r=this.pointAt(t),i=new W(e,s);return i.translate(r.x-e.x,r.y-e.y),i}tangentAtLength(t){if(!this.isDifferentiable())return null;const e=this.start,s=this.end,r=this.pointAtLength(t),i=new W(e,s);return i.translate(r.x-e.x,r.y-e.y),i}relativeCcw(t,e){const s=O.create(t,e);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 l=r*a-i*o;return l===0&&(l=r*o+i*a,l>0&&(r-=o,i-=a,l=r*o+i*a,l<0&&(l=0))),l<0?-1:l>0?1:0}equals(t){return t!=null&&this.start.x===t.start.x&&this.start.y===t.start.y&&this.end.x===t.end.x&&this.end.y===t.end.y}clone(){return new W(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 t(e){return e!=null&&e instanceof n}n.isLine=t})(W||(W={}));class un extends ys{get center(){return new O(this.x,this.y)}constructor(t,e,s,r){super(),this.x=t??0,this.y=e??0,this.a=s??0,this.b=r??0}bbox(){return z.fromEllipse(this)}getCenter(){return this.center}inflate(t,e){const s=t,r=e??t;return this.a+=2*s,this.b+=2*r,this}normalizedDistance(t,e){const s=O.create(t,e),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(t,e){return this.normalizedDistance(t,e)<=1}intersectsWithLine(t){const e=[],s=this.a,r=this.b,i=t.start,o=t.end,a=t.vector(),l=i.diff(new O(this.x,this.y)),u=new O(a.x/(s*s),a.y/(r*r)),h=new O(l.x/(s*s),l.y/(r*r)),f=a.dot(u),d=a.dot(h),g=l.dot(h)-1,p=d*d-f*g;if(p<0)return null;if(p>0){const m=Math.sqrt(p),y=(-d-m)/f,b=(-d+m)/f;if((y<0||y>1)&&(b<0||b>1))return null;y>=0&&y<=1&&e.push(i.lerp(o,y)),b>=0&&b<=1&&e.push(i.lerp(o,b))}else{const m=-d/f;if(m>=0&&m<=1)e.push(i.lerp(o,m));else return null}return e}intersectsWithLineFromCenterToPoint(t,e=0){const s=O.clone(t);e&&s.rotate(e,this.getCenter());const r=s.x-this.x,i=s.y-this.y;let o;if(r===0)return o=this.bbox().getNearestPointToPoint(s),e?o.rotate(-e,this.getCenter()):o;const a=i/r,l=a*a,u=this.a*this.a,h=this.b*this.b;let f=Math.sqrt(1/(1/u+l/h));f=r<0?-f:f;const d=a*f;return o=new O(this.x+f,this.y+d),e?o.rotate(-e,this.getCenter()):o}tangentTheta(t){const e=O.clone(t),s=e.x,r=e.y,i=this.a,o=this.b,a=this.bbox().center,l=a.x,u=a.y,h=30,f=s>a.x+i/2,d=s<a.x-i/2;let g,p;return f||d?(p=s>a.x?r-h:r+h,g=i*i/(s-l)-i*i*(r-u)*(p-u)/(o*o*(s-l))+l):(g=r>a.y?s+h:s-h,p=o*o/(r-u)-o*o*(s-l)*(g-l)/(i*i*(r-u))+u),new O(g,p).theta(e)}scale(t,e){return this.a*=t,this.b*=e,this}rotate(t,e){const s=z.fromEllipse(this);s.rotate(t,e);const r=un.fromRect(s);return this.a=r.a,this.b=r.b,this.x=r.x,this.y=r.y,this}translate(t,e){const s=O.create(t,e);return this.x+=s.x,this.y+=s.y,this}equals(t){return t!=null&&t.x===this.x&&t.y===this.y&&t.a===this.a&&t.b===this.b}clone(){return new un(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 t(e){return e!=null&&e instanceof n}n.isEllipse=t})(un||(un={})),function(n){function t(r,i,o,a){return r==null||typeof r=="number"?new n(r,i,o,a):e(r)}n.create=t;function e(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=e;function s(r){const i=r.center;return new n(i.x,i.y,r.width/2,r.height/2)}n.fromRect=s}(un||(un={}));const ZR=new RegExp("^[\\s\\dLMCZz,.]*$");function QR(n){return typeof n!="string"?!1:ZR.test(n)}function Ju(n,t){return(n%t+t)%t}function tI(n,t,e,s,r){const i=[],o=n[n.length-1],a=t!=null&&t>0,l=t||0;if(s&&a){n=n.slice();const f=n[0],d=new O(o.x+(f.x-o.x)/2,o.y+(f.y-o.y)/2);n.splice(0,0,d)}let u=n[0],h=1;for(e?i.push("M",u.x,u.y):i.push("L",u.x,u.y);h<(s?n.length:n.length-1);){let f=n[Ju(h,n.length)],d=u.x-f.x,g=u.y-f.y;if(a&&(d!==0||g!==0)&&(r==null||r.indexOf(h-1)<0)){let p=Math.sqrt(d*d+g*g);const m=d*Math.min(l,p/2)/p,y=g*Math.min(l,p/2)/p,b=f.x+m,w=f.y+y;i.push("L",b,w);let x=n[Ju(h+1,n.length)];for(;h<n.length-2&&Math.round(x.x-f.x)===0&&Math.round(x.y-f.y)===0;)x=n[Ju(h+2,n.length)],h+=1;d=x.x-f.x,g=x.y-f.y,p=Math.max(1,Math.sqrt(d*d+g*g));const v=d*Math.min(l,p/2)/p,S=g*Math.min(l,p/2)/p,E=f.x+v,C=f.y+S;i.push("Q",f.x,f.y,E,C),f=new O(E,C)}else i.push("L",f.x,f.y);u=f,h+=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 Py(n,t={}){const e=[];return n&&n.length&&n.forEach(s=>{Array.isArray(s)?e.push({x:s[0],y:s[1]}):e.push({x:s.x,y:s.y})}),tI(e,t.round,t.initialMove==null||t.initialMove,t.close,t.exclude)}function Xa(n,t,e,s,r=0,i=0,o=0,a,l){if(e===0||s===0)return[];a-=n,l-=t,e=Math.abs(e),s=Math.abs(s);const u=-a/2,h=-l/2,f=Math.cos(r*Math.PI/180),d=Math.sin(r*Math.PI/180),g=f*u+d*h,p=-1*d*u+f*h,m=g*g,y=p*p,b=e*e,w=s*s,x=m/b+y/w;let v;if(x>1)e=Math.sqrt(x)*e,s=Math.sqrt(x)*s,v=0;else{let et=1;i===o&&(et=-1),v=et*Math.sqrt((b*w-b*y-w*m)/(b*y+w*m))}const S=v*e*p/s,E=-1*v*s*g/e,C=f*S-d*E+a/2,M=d*S+f*E+l/2;let T=Math.atan2((p-E)/s,(g-S)/e)-Math.atan2(0,1),k=T>=0?T:2*Math.PI+T;T=Math.atan2((-p-E)/s,(-g-S)/e)-Math.atan2((p-E)/s,(g-S)/e);let _=T>=0?T:2*Math.PI+T;o===0&&_>0?_-=2*Math.PI:o!==0&&_<0&&(_+=2*Math.PI);const D=_*2/Math.PI,N=Math.ceil(D<0?-1*D:D),V=_/N,A=8/3*Math.sin(V/4)*Math.sin(V/4)/Math.sin(V/2),P=f*e,L=f*s,j=d*e,Y=d*s;let ot=Math.cos(k),F=Math.sin(k),H=-A*(P*F+Y*ot),B=-A*(j*F-L*ot),K=0,nt=0;const rt=[];for(let et=0;et<N;et+=1){k+=V,ot=Math.cos(k),F=Math.sin(k),K=P*ot-Y*F+C,nt=j*ot+L*F+M;const ft=-A*(P*F+Y*ot),ge=-A*(j*F-L*ot),St=et*6;rt[St]=Number(H+n),rt[St+1]=Number(B+t),rt[St+2]=Number(K-ft+n),rt[St+3]=Number(nt-ge+t),rt[St+4]=Number(K+n),rt[St+5]=Number(nt+t),H=K+ft,B=nt+ge}return rt.map(et=>+et.toFixed(2))}function eI(n,t,e,s,r=0,i=0,o=0,a,l){const u=[],h=Xa(n,t,e,s,r,i,o,a,l);if(h!=null)for(let f=0,d=h.length;f<d;f+=6)u.push("C",h[f],h[f+1],h[f+2],h[f+3],h[f+4],h[f+5]);return u.join(" ")}class zt extends ys{get start(){return this.points[0]||null}get end(){return this.points[this.points.length-1]||null}constructor(t){if(super(),t!=null){if(typeof t=="string")return zt.parse(t);this.points=t.map(e=>O.create(e))}else this.points=[]}scale(t,e,s=new O){return this.points.forEach(r=>r.scale(t,e,s)),this}rotate(t,e){return this.points.forEach(s=>s.rotate(t,e)),this}translate(t,e){const s=O.create(t,e);return this.points.forEach(r=>r.translate(s.x,s.y)),this}round(t=0){return this.points.forEach(e=>e.round(t)),this}bbox(){if(this.points.length===0)return new z;let t=1/0,e=-1/0,s=1/0,r=-1/0;const i=this.points;for(let o=0,a=i.length;o<a;o+=1){const l=i[o],u=l.x,h=l.y;u<t&&(t=u),u>e&&(e=u),h<s&&(s=h),h>r&&(r=h)}return new z(t,s,e-t,r-s)}closestPoint(t){const e=this.closestPointLength(t);return this.pointAtLength(e)}closestPointLength(t){const e=this.points,s=e.length;if(s===0||s===1)return 0;let r=0,i=0,o=1/0;for(let a=0,l=s-1;a<l;a+=1){const u=new W(e[a],e[a+1]),h=u.length(),f=u.closestPointNormalizedLength(t),g=u.pointAt(f).squaredDistance(t);g<o&&(o=g,i=r+f*h),r+=h}return i}closestPointNormalizedLength(t){const e=this.length();return e===0?0:this.closestPointLength(t)/e}closestPointTangent(t){const e=this.closestPointLength(t);return this.tangentAtLength(e)}containsPoint(t){if(this.points.length===0)return!1;const e=O.clone(t),s=e.x,r=e.y,i=this.points,o=i.length;let a=o-1,l=0;for(let u=0;u<o;u+=1){const h=i[a],f=i[u];if(e.equals(h))return!0;const d=new W(h,f);if(d.containsPoint(t))return!0;if(r<=h.y&&r>f.y||r>h.y&&r<=f.y){const g=h.x-s>f.x-s?h.x-s:f.x-s;if(g>=0){const p=new O(s+g,r),m=new W(t,p);d.intersectsWithLine(m)&&(l+=1)}}a=u}return l%2===1}intersectsWithLine(t){const e=[];for(let s=0,r=this.points.length-1;s<r;s+=1){const i=this.points[s],o=this.points[s+1],a=t.intersectsWithLine(new W(i,o));a&&e.push(a)}return e.length>0?e:null}isDifferentiable(){for(let t=0,e=this.points.length-1;t<e;t+=1){const s=this.points[t],r=this.points[t+1];if(new W(s,r).isDifferentiable())return!0}return!1}length(){let t=0;for(let e=0,s=this.points.length-1;e<s;e+=1){const r=this.points[e],i=this.points[e+1];t+=r.distance(i)}return t}pointAt(t){const e=this.points,s=e.length;if(s===0)return null;if(s===1||t<=0)return e[0].clone();if(t>=1)return e[s-1].clone();const i=this.length()*t;return this.pointAtLength(i)}pointAtLength(t){const e=this.points,s=e.length;if(s===0)return null;if(s===1)return e[0].clone();let r=!0;t<0&&(r=!1,t=-t);let i=0;for(let a=0,l=s-1;a<l;a+=1){const u=r?a:l-1-a,h=e[u],f=e[u+1],d=new W(h,f),g=h.distance(f);if(t<=i+g)return d.pointAtLength((r?1:-1)*(t-i));i+=g}return(r?e[s-1]:e[0]).clone()}tangentAt(t){const s=this.points.length;if(s===0||s===1)return null;t<0&&(t=0),t>1&&(t=1);const i=this.length()*t;return this.tangentAtLength(i)}tangentAtLength(t){const e=this.points,s=e.length;if(s===0||s===1)return null;let r=!0;t<0&&(r=!1,t=-t);let i,o=0;for(let a=0,l=s-1;a<l;a+=1){const u=r?a:l-1-a,h=e[u],f=e[u+1],d=new W(h,f),g=h.distance(f);if(d.isDifferentiable()){if(t<=o+g)return d.tangentAtLength((r?1:-1)*(t-o));i=d}o+=g}if(i){const a=r?1:0;return i.tangentAt(a)}return null}simplify(t={}){const e=this.points;if(e.length<3)return this;const s=t.threshold||0;let r=0;for(;e[r+2];){const i=r,o=r+1,a=r+2,l=e[i],u=e[o],h=e[a];new W(l,h).closestPoint(u).distance(u)<=s?e.splice(o,1):r+=1}return this}toHull(){const t=this.points,e=t.length;if(e===0)return new zt;let s=t[0];for(let d=1;d<e;d+=1)(t[d].y<s.y||t[d].y===s.y&&t[d].x>s.x)&&(s=t[d]);const r=[];for(let d=0;d<e;d+=1){let g=s.theta(t[d]);g===0&&(g=360),r.push([t[d],d,g])}if(r.sort((d,g)=>{let p=d[2]-g[2];return p===0&&(p=g[1]-d[1]),p}),r.length>2){const d=r[r.length-1];r.unshift(d)}const i={},o=[],a=d=>`${d[0].toString()}@${d[1]}`;for(;r.length!==0;){const d=r.pop(),g=d[0];if(i[a(d)])continue;let p=!1;for(;!p;)if(o.length<2)o.push(d),p=!0;else{const m=o.pop(),y=m[0],b=o.pop(),w=b[0],x=w.cross(y,g);if(x<0)o.push(b),o.push(m),o.push(d),p=!0;else if(x===0){const S=y.angleBetween(w,g);Math.abs(S-180)<1e-10||y.equals(g)||w.equals(y)?(i[a(m)]=y,o.push(b)):Math.abs((S+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 l,u=-1;for(let d=0,g=o.length;d<g;d+=1){const p=o[d][1];(l===void 0||p<l)&&(l=p,u=d)}let h=[];if(u>0){const d=o.slice(u),g=o.slice(0,u);h=d.concat(g)}else h=o;const f=[];for(let d=0,g=h.length;d<g;d+=1)f.push(h[d][0]);return new zt(f)}equals(t){return t==null||t.points.length!==this.points.length?!1:t.points.every((e,s)=>e.equals(this.points[s]))}clone(){return new zt(this.points.map(t=>t.clone()))}toJSON(){return this.points.map(t=>t.toJSON())}serialize(){return this.points.map(t=>`${t.serialize()}`).join(" ")}}(function(n){function t(e){return e!=null&&e instanceof n}n.isPolyline=t})(zt||(zt={})),function(n){function t(e){const s=e.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=t}(zt||(zt={}));class Vt extends ys{constructor(t,e,s,r){super(),this.PRECISION=3,this.start=O.create(t),this.controlPoint1=O.create(e),this.controlPoint2=O.create(s),this.end=O.create(r)}bbox(){const t=this.start,e=this.controlPoint1,s=this.controlPoint2,r=this.end,i=t.x,o=t.y,a=e.x,l=e.y,u=s.x,h=s.y,f=r.x,d=r.y,g=[],p=[[],[]];let m,y,b,w,x,v,S,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*l+6*h,m=-3*o+9*l-9*h+3*d,b=3*l-3*o),Math.abs(m)<1e-12){if(Math.abs(y)<1e-12)continue;w=-b/y,w>0&&w<1&&g.push(w);continue}S=y*y-4*b*m,E=Math.sqrt(S),!(S<0)&&(x=(-y+E)/(2*m),x>0&&x<1&&g.push(x),v=(-y-E)/(2*m),v>0&&v<1&&g.push(v))}let C,M,T,k=g.length;const _=k;for(;k;)k-=1,w=g[k],T=1-w,C=T*T*T*i+3*T*T*w*a+3*T*w*w*u+w*w*w*f,p[0][k]=C,M=T*T*T*o+3*T*T*w*l+3*T*w*w*h+w*w*w*d,p[1][k]=M;g[_]=0,g[_+1]=1,p[0][_]=i,p[1][_]=o,p[0][_+1]=f,p[1][_+1]=d,g.length=_+2,p[0].length=_+2,p[1].length=_+2;const D=Math.min.apply(null,p[0]),N=Math.min.apply(null,p[1]),V=Math.max.apply(null,p[0]),A=Math.max.apply(null,p[1]);return new z(D,N,V-D,A-N)}closestPoint(t,e={}){return this.pointAtT(this.closestPointT(t,e))}closestPointLength(t,e={}){const s=this.getOptions(e);return this.lengthAtT(this.closestPointT(t,s),s)}closestPointNormalizedLength(t,e={}){const s=this.getOptions(e),r=this.closestPointLength(t,s);if(!r)return 0;const i=this.length(s);return i===0?0:r/i}closestPointT(t,e={}){const s=this.getPrecision(e),r=this.getDivisions(e),i=Math.pow(10,-s);let o=null,a=0,l=0,u=0,h=0,f=0,d=null;const g=r.length;let p=g>0?1/g:0;for(r.forEach((m,y)=>{const b=m.start.distance(t),w=m.end.distance(t),x=b+w;(d==null||x<d)&&(o=m,a=y*p,l=(y+1)*p,u=b,h=w,d=x,f=m.endpointDistance())});;){const m=u?Math.abs(u-h)/u:0,y=h!=null?Math.abs(u-h)/h:0,b=m<i||y<i,w=u?u<f*i:!0,x=h?h<f*i:!0;if(b||(w||x))return u<=h?a:l;const S=o.divide(.5);p/=2;const E=S[0].start.distance(t),C=S[0].end.distance(t),M=E+C,T=S[1].start.distance(t),k=S[1].end.distance(t),_=T+k;M<=_?(o=S[0],l-=p,u=E,h=C):(o=S[1],a+=p,u=T,h=k)}}closestPointTangent(t,e={}){return this.tangentAtT(this.closestPointT(t,e))}containsPoint(t,e={}){return this.toPolyline(e).containsPoint(t)}divideAt(t,e={}){if(t<=0)return this.divideAtT(0);if(t>=1)return this.divideAtT(1);const s=this.tAt(t,e);return this.divideAtT(s)}divideAtLength(t,e={}){const s=this.tAtLength(t,e);return this.divideAtT(s)}divide(t){return this.divideAtT(t)}divideAtT(t){const e=this.start,s=this.controlPoint1,r=this.controlPoint2,i=this.end;if(t<=0)return[new Vt(e,e,e,e),new Vt(e,s,r,i)];if(t>=1)return[new Vt(e,s,r,i),new Vt(i,i,i,i)];const o=this.getSkeletonPoints(t),a=o.startControlPoint1,l=o.startControlPoint2,u=o.divider,h=o.dividerControlPoint1,f=o.dividerControlPoint2;return[new Vt(e,a,l,u),new Vt(u,h,f,i)]}endpointDistance(){return this.start.distance(this.end)}getSkeletonPoints(t){const e=this.start,s=this.controlPoint1,r=this.controlPoint2,i=this.end;if(t<=0)return{startControlPoint1:e.clone(),startControlPoint2:e.clone(),divider:e.clone(),dividerControlPoint1:s.clone(),dividerControlPoint2:r.clone()};if(t>=1)return{startControlPoint1:s.clone(),startControlPoint2:r.clone(),divider:i.clone(),dividerControlPoint1:i.clone(),dividerControlPoint2:i.clone()};const o=new W(e,s).pointAt(t),a=new W(s,r).pointAt(t),l=new W(r,i).pointAt(t),u=new W(o,a).pointAt(t),h=new W(a,l).pointAt(t),f=new W(u,h).pointAt(t);return{startControlPoint1:o,startControlPoint2:u,divider:f,dividerControlPoint1:h,dividerControlPoint2:l}}getSubdivisions(t={}){const e=this.getPrecision(t);let s=[new Vt(this.start,this.controlPoint1,this.controlPoint2,this.end)];if(e===0)return s;let r=this.endpointDistance();const i=Math.pow(10,-e);let o=0;for(;;){o+=1;const a=[];s.forEach(h=>{const f=h.divide(.5);a.push(f[0],f[1])});const l=a.reduce((h,f)=>h+f.endpointDistance(),0),u=l!==0?(l-r)/l:0;if(o>1&&u<i)return a;s=a,r=l}}length(t={}){return this.getDivisions(t).reduce((s,r)=>s+r.endpointDistance(),0)}lengthAtT(t,e={}){if(t<=0)return 0;const s=e.precision===void 0?this.PRECISION:e.precision;return this.divide(t)[0].length({precision:s})}pointAt(t,e={}){if(t<=0)return this.start.clone();if(t>=1)return this.end.clone();const s=this.tAt(t,e);return this.pointAtT(s)}pointAtLength(t,e={}){const s=this.tAtLength(t,e);return this.pointAtT(s)}pointAtT(t){return t<=0?this.start.clone():t>=1?this.end.clone():this.getSkeletonPoints(t).divider}isDifferentiable(){const t=this.start,e=this.controlPoint1,s=this.controlPoint2,r=this.end;return!(t.equals(e)&&e.equals(s)&&s.equals(r))}tangentAt(t,e={}){if(!this.isDifferentiable())return null;t<0?t=0:t>1&&(t=1);const s=this.tAt(t,e);return this.tangentAtT(s)}tangentAtLength(t,e={}){if(!this.isDifferentiable())return null;const s=this.tAtLength(t,e);return this.tangentAtT(s)}tangentAtT(t){if(!this.isDifferentiable())return null;t<0&&(t=0),t>1&&(t=1);const e=this.getSkeletonPoints(t),s=e.startControlPoint2,r=e.dividerControlPoint1,i=e.divider,o=new W(s,r);return o.translate(i.x-s.x,i.y-s.y),o}getPrecision(t={}){return t.precision==null?this.PRECISION:t.precision}getDivisions(t={}){if(t.subdivisions!=null)return t.subdivisions;const e=this.getPrecision(t);return this.getSubdivisions({precision:e})}getOptions(t={}){const e=this.getPrecision(t),s=this.getDivisions(t);return{precision:e,subdivisions:s}}tAt(t,e={}){if(t<=0)return 0;if(t>=1)return 1;const s=this.getOptions(e),i=this.length(s)*t;return this.tAtLength(i,s)}tAtLength(t,e={}){let s=!0;t<0&&(s=!1,t=-t);const r=this.getPrecision(e),i=this.getDivisions(e),o={precision:r,subdivisions:i};let a=null,l,u,h=0,f=0,d=0;const g=i.length;let p=g>0?1/g:0;for(let b=0;b<g;b+=1){const w=s?b:g-1-b,x=i[b],v=x.endpointDistance();if(t<=d+v){a=x,l=w*p,u=(w+1)*p,h=s?t-d:v+d-t,f=s?v+d-t:t-d;break}d+=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?h/m:0,b<y)return l;if(b=m!==0?f/m:0,b<y)return u;let w,x;const v=a.divide(.5);p/=2;const S=v[0].endpointDistance(),E=v[1].endpointDistance();h<=S?(a=v[0],u-=p,w=h,x=S-w):(a=v[1],l+=p,w=h-S,x=E-w),h=w,f=x}}toPoints(t={}){const e=this.getDivisions(t),s=[e[0].start.clone()];return e.forEach(r=>s.push(r.end.clone())),s}toPolyline(t={}){return new zt(this.toPoints(t))}scale(t,e,s){return this.start.scale(t,e,s),this.controlPoint1.scale(t,e,s),this.controlPoint2.scale(t,e,s),this.end.scale(t,e,s),this}rotate(t,e){return this.start.rotate(t,e),this.controlPoint1.rotate(t,e),this.controlPoint2.rotate(t,e),this.end.rotate(t,e),this}translate(t,e){return typeof t=="number"?(this.start.translate(t,e),this.controlPoint1.translate(t,e),this.controlPoint2.translate(t,e),this.end.translate(t,e)):(this.start.translate(t),this.controlPoint1.translate(t),this.controlPoint2.translate(t),this.end.translate(t)),this}equals(t){return t!=null&&this.start.equals(t.start)&&this.controlPoint1.equals(t.controlPoint1)&&this.controlPoint2.equals(t.controlPoint2)&&this.end.equals(t.end)}clone(){return new Vt(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 t(e){return e!=null&&e instanceof n}n.isCurve=t})(Vt||(Vt={})),function(n){function t(r){const i=r.length,o=[],a=[];let l=2;o[0]=r[0]/l;for(let u=1;u<i;u+=1)a[u]=1/l,l=(u<i-1?4:3.5)-a[u],o[u]=(r[u]-o[u-1])/l;for(let u=1;u<i;u+=1)o[i-u-1]-=a[i-u]*o[i-u];return o}function e(r){const i=r.map(d=>O.clone(d)),o=[],a=[],l=i.length-1;if(l===1)return o[0]=new O((2*i[0].x+i[1].x)/3,(2*i[0].y+i[1].y)/3),a[0]=new O(2*o[0].x-i[0].x,2*o[0].y-i[0].y),[o,a];const u=[];for(let d=1;d<l-1;d+=1)u[d]=4*i[d].x+2*i[d+1].x;u[0]=i[0].x+2*i[1].x,u[l-1]=(8*i[l-1].x+i[l].x)/2;const h=t(u);for(let d=1;d<l-1;d+=1)u[d]=4*i[d].y+2*i[d+1].y;u[0]=i[0].y+2*i[1].y,u[l-1]=(8*i[l-1].y+i[l].y)/2;const f=t(u);for(let d=0;d<l;d+=1)o.push(new O(h[d],f[d])),d<l-1?a.push(new O(2*i[d+1].x-h[d+1],2*i[d+1].y-f[d+1])):a.push(new O((i[l].x+h[l-1])/2,(i[l].y+f[l-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=e(r),o=[];for(let a=0,l=i[0].length;a<l;a+=1){const u=new O(i[0][a].x,i[0][a].y),h=new O(i[1][a].x,i[1][a].y);o.push(new n(r[a],u,h,r[a+1]))}return o}n.throughPoints=s}(Vt||(Vt={}));class Ka extends ys{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(t,e){if(this.closestPointNormalizedLength)return this.closestPointNormalizedLength(t);throw new Error("Neither `closestPointT` nor `closestPointNormalizedLength` method is implemented.")}lengthAtT(t,e){if(t<=0)return 0;const s=this.length();return t>=1?s:s*t}divideAtT(t){if(this.divideAt)return this.divideAt(t);throw new Error("Neither `divideAtT` nor `divideAt` method is implemented.")}pointAtT(t){if(this.pointAt)return this.pointAt(t);throw new Error("Neither `pointAtT` nor `pointAt` method is implemented.")}tangentAtT(t){if(this.tangentAt)return this.tangentAt(t);throw new Error("Neither `tangentAtT` nor `tangentAt` method is implemented.")}}class fe extends Ka{constructor(t,e){super(),W.isLine(t)?this.endPoint=t.end.clone().round(2):this.endPoint=O.create(t,e).round(2)}get type(){return"L"}get line(){return new W(this.start,this.end)}bbox(){return this.line.bbox()}closestPoint(t){return this.line.closestPoint(t)}closestPointLength(t){return this.line.closestPointLength(t)}closestPointNormalizedLength(t){return this.line.closestPointNormalizedLength(t)}closestPointTangent(t){return this.line.closestPointTangent(t)}length(){return this.line.length()}divideAt(t){const e=this.line.divideAt(t);return[new fe(e[0]),new fe(e[1])]}divideAtLength(t){const e=this.line.divideAtLength(t);return[new fe(e[0]),new fe(e[1])]}getSubdivisions(){return[]}pointAt(t){return this.line.pointAt(t)}pointAtLength(t){return this.line.pointAtLength(t)}tangentAt(t){return this.line.tangentAt(t)}tangentAtLength(t){return this.line.tangentAtLength(t)}isDifferentiable(){return this.previousSegment==null?!1:!this.start.equals(this.end)}clone(){return new fe(this.end)}scale(t,e,s){return this.end.scale(t,e,s),this}rotate(t,e){return this.end.rotate(t,e),this}translate(t,e){return typeof t=="number"?this.end.translate(t,e):this.end.translate(t),this}equals(t){return this.type===t.type&&this.start.equals(t.start)&&this.end.equals(t.end)}toJSON(){return{type:this.type,start:this.start.toJSON(),end:this.end.toJSON()}}serialize(){const t=this.end;return`${this.type} ${t.x} ${t.y}`}}(function(n){function t(...e){const s=e.length,r=e[0];if(W.isLine(r))return new n(r);if(O.isPointLike(r))return s===1?new n(r):e.map(o=>new n(o));if(s===2)return new n(+e[0],+e[1]);const i=[];for(let o=0;o<s;o+=2){const a=+e[o],l=+e[o+1];i.push(new n(a,l))}return i}n.create=t})(fe||(fe={}));class zr extends Ka{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 W(this.start,this.end)}bbox(){return this.line.bbox()}closestPoint(t){return this.line.closestPoint(t)}closestPointLength(t){return this.line.closestPointLength(t)}closestPointNormalizedLength(t){return this.line.closestPointNormalizedLength(t)}closestPointTangent(t){return this.line.closestPointTangent(t)}length(){return this.line.length()}divideAt(t){const e=this.line.divideAt(t);return[e[1].isDifferentiable()?new fe(e[0]):this.clone(),new fe(e[1])]}divideAtLength(t){const e=this.line.divideAtLength(t);return[e[1].isDifferentiable()?new fe(e[0]):this.clone(),new fe(e[1])]}getSubdivisions(){return[]}pointAt(t){return this.line.pointAt(t)}pointAtLength(t){return this.line.pointAtLength(t)}tangentAt(t){return this.line.tangentAt(t)}tangentAtLength(t){return this.line.tangentAtLength(t)}isDifferentiable(){return!this.previousSegment||!this.subpathStartSegment?!1:!this.start.equals(this.end)}scale(){return this}rotate(){return this}translate(){return this}equals(t){return this.type===t.type&&this.start.equals(t.start)&&this.end.equals(t.end)}clone(){return new zr}toJSON(){return{type:this.type,start:this.start.toJSON(),end:this.end.toJSON()}}serialize(){return this.type}}(function(n){function t(){return new n}n.create=t})(zr||(zr={}));class Fr extends Ka{constructor(t,e){super(),this.isVisible=!1,this.isSubpathStart=!0,W.isLine(t)||Vt.isCurve(t)?this.endPoint=t.end.clone().round(2):this.endPoint=O.create(t,e).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(t,e,s){return this.end.scale(t,e,s),this}rotate(t,e){return this.end.rotate(t,e),this}translate(t,e){return typeof t=="number"?this.end.translate(t,e):this.end.translate(t),this}clone(){return new Fr(this.end)}equals(t){return this.type===t.type&&this.end.equals(t.end)}toJSON(){return{type:this.type,end:this.end.toJSON()}}serialize(){const t=this.end;return`${this.type} ${t.x} ${t.y}`}}(function(n){function t(...e){const s=e.length,r=e[0];if(W.isLine(r))return new n(r);if(Vt.isCurve(r))return new n(r);if(O.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(e[a])):o.push(new fe(e[a]));return o}if(s===2)return new n(+e[0],+e[1]);const i=[];for(let o=0;o<s;o+=2){const a=+e[o],l=+e[o+1];o===0?i.push(new n(a,l)):i.push(new fe(a,l))}return i}n.create=t})(Fr||(Fr={}));class He extends Ka{constructor(t,e,s,r,i,o){super(),Vt.isCurve(t)?(this.controlPoint1=t.controlPoint1.clone().round(2),this.controlPoint2=t.controlPoint2.clone().round(2),this.endPoint=t.end.clone().round(2)):typeof t=="number"?(this.controlPoint1=new O(t,e).round(2),this.controlPoint2=new O(s,r).round(2),this.endPoint=new O(i,o).round(2)):(this.controlPoint1=O.create(t).round(2),this.controlPoint2=O.create(e).round(2),this.endPoint=O.create(s).round(2))}get type(){return"C"}get curve(){return new Vt(this.start,this.controlPoint1,this.controlPoint2,this.end)}bbox(){return this.curve.bbox()}closestPoint(t){return this.curve.closestPoint(t)}closestPointLength(t){return this.curve.closestPointLength(t)}closestPointNormalizedLength(t){return this.curve.closestPointNormalizedLength(t)}closestPointTangent(t){return this.curve.closestPointTangent(t)}length(){return this.curve.length()}divideAt(t,e={}){const s=this.curve.divideAt(t,e);return[new He(s[0]),new He(s[1])]}divideAtLength(t,e={}){const s=this.curve.divideAtLength(t,e);return[new He(s[0]),new He(s[1])]}divideAtT(t){const e=this.curve.divideAtT(t);return[new He(e[0]),new He(e[1])]}getSubdivisions(){return[]}pointAt(t){return this.curve.pointAt(t)}pointAtLength(t){return this.curve.pointAtLength(t)}tangentAt(t){return this.curve.tangentAt(t)}tangentAtLength(t){return this.curve.tangentAtLength(t)}isDifferentiable(){if(!this.previousSegment)return!1;const t=this.start,e=this.controlPoint1,s=this.controlPoint2,r=this.end;return!(t.equals(e)&&e.equals(s)&&s.equals(r))}scale(t,e,s){return this.controlPoint1.scale(t,e,s),this.controlPoint2.scale(t,e,s),this.end.scale(t,e,s),this}rotate(t,e){return this.controlPoint1.rotate(t,e),this.controlPoint2.rotate(t,e),this.end.rotate(t,e),this}translate(t,e){return typeof t=="number"?(this.controlPoint1.translate(t,e),this.controlPoint2.translate(t,e),this.end.translate(t,e)):(this.controlPoint1.translate(t),this.controlPoint2.translate(t),this.end.translate(t)),this}equals(t){return this.start.equals(t.start)&&this.end.equals(t.end)&&this.controlPoint1.equals(t.controlPoint1)&&this.controlPoint2.equals(t.controlPoint2)}clone(){return new He(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 t=this.controlPoint1,e=this.controlPoint2,s=this.end;return[this.type,t.x,t.y,e.x,e.y,s.x,s.y].join(" ")}}(function(n){function t(...e){const s=e.length,r=e[0];if(Vt.isCurve(r))return new n(r);if(O.isPointLike(r)){if(s===3)return new n(e[0],e[1],e[2]);const o=[];for(let a=0;a<s;a+=3)o.push(new n(e[a],e[a+1],e[a+2]));return o}if(s===6)return new n(e[0],e[1],e[2],e[3],e[4],e[5]);const i=[];for(let o=0;o<s;o+=6)i.push(new n(e[o],e[o+1],e[o+2],e[o+3],e[o+4],e[o+5]));return i}n.create=t})(He||(He={}));function Za(n,t,e){return{x:n*Math.cos(e)-t*Math.sin(e),y:n*Math.sin(e)+t*Math.cos(e)}}function Ay(n,t,e,s,r,i){const o=.3333333333333333,a=2/3;return[o*n+a*e,o*t+a*s,o*r+a*e,o*i+a*s,r,i]}function Ty(n,t,e,s,r,i,o,a,l,u){const h=Math.PI*120/180,f=Math.PI/180*(+r||0);let d=[],g,p,m,y,b;if(u)p=u[0],m=u[1],y=u[2],b=u[3];else{g=Za(n,t,-f),n=g.x,t=g.y,g=Za(a,l,-f),a=g.x,l=g.y;const V=(n-a)/2,A=(t-l)/2;let P=V*V/(e*e)+A*A/(s*s);P>1&&(P=Math.sqrt(P),e=P*e,s=P*s);const L=e*e,j=s*s,Y=(i===o?-1:1)*Math.sqrt(Math.abs((L*j-L*A*A-j*V*V)/(L*A*A+j*V*V)));y=Y*e*A/s+(n+a)/2,b=Y*-s*V/e+(t+l)/2,p=Math.asin((t-b)/s),m=Math.asin((l-b)/s),p=n<y?Math.PI-p:p,m=a<y?Math.PI-m:m,p<0&&(p=Math.PI*2+p),m<0&&(m=Math.PI*2+m),o&&p>m&&(p-=Math.PI*2),!o&&m>p&&(m-=Math.PI*2)}let w=m-p;if(Math.abs(w)>h){const V=m,A=a,P=l;m=p+h*(o&&m>p?1:-1),a=y+e*Math.cos(m),l=b+s*Math.sin(m),d=Ty(a,l,e,s,r,0,o,A,P,[m,V,y,b])}w=m-p;const x=Math.cos(p),v=Math.sin(p),S=Math.cos(m),E=Math.sin(m),C=Math.tan(w/4),M=4/3*(e*C),T=4/3*(s*C),k=[n,t],_=[n+M*v,t-T*x],D=[a+M*E,l-T*S],N=[a,l];if(_[0]=2*k[0]-_[0],_[1]=2*k[1]-_[1],u)return[_,D,N].concat(d);{d=[_,D,N].concat(d).join().split(",");const V=[],A=d.length;for(let P=0;P<A;P+=1)V[P]=P%2?Za(+d[P-1],+d[P],f).y:Za(+d[P],+d[P+1],f).x;return V}}function nI(n){if(!n)return null;const t=`
|
|
@@ -735,4 +735,4 @@ usage: app.provide(ZINDEX_INJECTION_KEY, { current: 0 })`),{initialZIndex:s,curr
|
|
|
735
735
|
font-size: 10px;
|
|
736
736
|
background-color: #6a6b8a;
|
|
737
737
|
}
|
|
738
|
-
`;I.prototype.isSelectionEnabled=function(){const n=this.getPlugin("selection");return n?n.isEnabled():!1},I.prototype.enableSelection=function(){const n=this.getPlugin("selection");return n&&n.enable(),this},I.prototype.disableSelection=function(){const n=this.getPlugin("selection");return n&&n.disable(),this},I.prototype.toggleSelection=function(n){const t=this.getPlugin("selection");return t&&t.toggleEnabled(n),this},I.prototype.isMultipleSelection=function(){const n=this.getPlugin("selection");return n?n.isMultipleSelection():!1},I.prototype.enableMultipleSelection=function(){const n=this.getPlugin("selection");return n&&n.enableMultipleSelection(),this},I.prototype.disableMultipleSelection=function(){const n=this.getPlugin("selection");return n&&n.disableMultipleSelection(),this},I.prototype.toggleMultipleSelection=function(n){const t=this.getPlugin("selection");return t&&t.toggleMultipleSelection(n),this},I.prototype.isSelectionMovable=function(){const n=this.getPlugin("selection");return n?n.isSelectionMovable():!1},I.prototype.enableSelectionMovable=function(){const n=this.getPlugin("selection");return n&&n.enableSelectionMovable(),this},I.prototype.disableSelectionMovable=function(){const n=this.getPlugin("selection");return n&&n.disableSelectionMovable(),this},I.prototype.toggleSelectionMovable=function(n){const t=this.getPlugin("selection");return t&&t.toggleSelectionMovable(n),this},I.prototype.isRubberbandEnabled=function(){const n=this.getPlugin("selection");return n?n.isRubberbandEnabled():!1},I.prototype.enableRubberband=function(){const n=this.getPlugin("selection");return n&&n.enableRubberband(),this},I.prototype.disableRubberband=function(){const n=this.getPlugin("selection");return n&&n.disableRubberband(),this},I.prototype.toggleRubberband=function(n){const t=this.getPlugin("selection");return t&&t.toggleRubberband(n),this},I.prototype.isStrictRubberband=function(){const n=this.getPlugin("selection");return n?n.isStrictRubberband():!1},I.prototype.enableStrictRubberband=function(){const n=this.getPlugin("selection");return n&&n.enableStrictRubberband(),this},I.prototype.disableStrictRubberband=function(){const n=this.getPlugin("selection");return n&&n.disableStrictRubberband(),this},I.prototype.toggleStrictRubberband=function(n){const t=this.getPlugin("selection");return t&&t.toggleStrictRubberband(n),this},I.prototype.setRubberbandModifiers=function(n){const t=this.getPlugin("selection");return t&&t.setRubberbandModifiers(n),this},I.prototype.setSelectionFilter=function(n){const t=this.getPlugin("selection");return t&&t.setSelectionFilter(n),this},I.prototype.setSelectionDisplayContent=function(n){const t=this.getPlugin("selection");return t&&t.setSelectionDisplayContent(n),this},I.prototype.isSelectionEmpty=function(){const n=this.getPlugin("selection");return n?n.isEmpty():!0},I.prototype.cleanSelection=function(n){const t=this.getPlugin("selection");return t&&t.clean(n),this},I.prototype.resetSelection=function(n,t){const e=this.getPlugin("selection");return e&&e.reset(n,t),this},I.prototype.getSelectedCells=function(){const n=this.getPlugin("selection");return n?n.getSelectedCells():[]},I.prototype.getSelectedCellCount=function(){const n=this.getPlugin("selection");return n?n.getSelectedCellCount():0},I.prototype.isSelected=function(n){const t=this.getPlugin("selection");return t?t.isSelected(n):!1},I.prototype.select=function(n,t){const e=this.getPlugin("selection");return e&&e.select(n,t),this},I.prototype.unselect=function(n,t){const e=this.getPlugin("selection");return e&&e.unselect(n,t),this};var fj=function(n,t,e,s){var r=arguments.length,i=r<3?t:s===null?s=Object.getOwnPropertyDescriptor(t,e):s,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(n,t,e,s);else for(var a=n.length-1;a>=0;a--)(o=n[a])&&(i=(r<3?o(i):r>3?o(t,e,i):o(t,e))||i);return r>3&&i&&Object.defineProperty(t,e,i),i};class ii extends Nt{get rubberbandDisabled(){return this.options.enabled!==!0||this.options.rubberband!==!0}get disabled(){return this.options.enabled!==!0}get length(){return this.selectionImpl.length}get cells(){return this.selectionImpl.cells}constructor(t={}){super(),this.name="selection",this.movedMap=new WeakMap,this.unselectMap=new WeakMap,this.options=Object.assign(Object.assign({enabled:!0},ii.defaultOptions),t),jr(this.name,dj)}init(t){this.graph=t,this.selectionImpl=new Ub(Object.assign(Object.assign({},this.options),{graph:t})),this.setup(),this.startListening()}isEnabled(){return!this.disabled}enable(){this.disabled&&(this.options.enabled=!0)}disable(){this.disabled||(this.options.enabled=!1)}toggleEnabled(t){return t!=null?t!==this.isEnabled()&&(t?this.enable():this.disable()):this.isEnabled()?this.disable():this.enable(),this}isMultipleSelection(){return this.isMultiple()}enableMultipleSelection(){return this.enableMultiple(),this}disableMultipleSelection(){return this.disableMultiple(),this}toggleMultipleSelection(t){return t!=null?t!==this.isMultipleSelection()&&(t?this.enableMultipleSelection():this.disableMultipleSelection()):this.isMultipleSelection()?this.disableMultipleSelection():this.enableMultipleSelection(),this}isSelectionMovable(){return this.options.movable!==!1}enableSelectionMovable(){return this.selectionImpl.options.movable=!0,this}disableSelectionMovable(){return this.selectionImpl.options.movable=!1,this}toggleSelectionMovable(t){return t!=null?t!==this.isSelectionMovable()&&(t?this.enableSelectionMovable():this.disableSelectionMovable()):this.isSelectionMovable()?this.disableSelectionMovable():this.enableSelectionMovable(),this}isRubberbandEnabled(){return!this.rubberbandDisabled}enableRubberband(){return this.rubberbandDisabled&&(this.options.rubberband=!0),this}disableRubberband(){return this.rubberbandDisabled||(this.options.rubberband=!1),this}toggleRubberband(t){return t!=null?t!==this.isRubberbandEnabled()&&(t?this.enableRubberband():this.disableRubberband()):this.isRubberbandEnabled()?this.disableRubberband():this.enableRubberband(),this}isStrictRubberband(){return this.selectionImpl.options.strict===!0}enableStrictRubberband(){return this.selectionImpl.options.strict=!0,this}disableStrictRubberband(){return this.selectionImpl.options.strict=!1,this}toggleStrictRubberband(t){return t!=null?t!==this.isStrictRubberband()&&(t?this.enableStrictRubberband():this.disableStrictRubberband()):this.isStrictRubberband()?this.disableStrictRubberband():this.enableStrictRubberband(),this}setRubberbandModifiers(t){this.setModifiers(t)}setSelectionFilter(t){return this.setFilter(t),this}setSelectionDisplayContent(t){return this.setContent(t),this}isEmpty(){return this.length<=0}clean(t={}){return this.selectionImpl.clean(t),this}reset(t,e={}){return this.selectionImpl.reset(t?this.getCells(t):[],e),this}getSelectedCells(){return this.cells}getSelectedCellCount(){return this.length}isSelected(t){return this.selectionImpl.isSelected(t)}select(t,e={}){const s=this.getCells(t);return s.length&&(this.isMultiple()?this.selectionImpl.select(s,e):this.reset(s.slice(0,1),e)),this}unselect(t,e={}){return this.selectionImpl.unselect(this.getCells(t),e),this}setup(){this.selectionImpl.on("*",(t,e)=>{this.trigger(t,e),this.graph.trigger(t,e)})}startListening(){this.graph.on("blank:mousedown",this.onBlankMouseDown,this),this.graph.on("blank:click",this.onBlankClick,this),this.graph.on("cell:mousemove",this.onCellMouseMove,this),this.graph.on("cell:mouseup",this.onCellMouseUp,this),this.selectionImpl.on("box:mousedown",this.onBoxMouseDown,this)}stopListening(){this.graph.off("blank:mousedown",this.onBlankMouseDown,this),this.graph.off("blank:click",this.onBlankClick,this),this.graph.off("cell:mousemove",this.onCellMouseMove,this),this.graph.off("cell:mouseup",this.onCellMouseUp,this),this.selectionImpl.off("box:mousedown",this.onBoxMouseDown,this)}onBlankMouseDown({e:t}){if(!this.allowBlankMouseDown(t))return;const e=this.graph.panning.allowPanning(t,!0),s=this.graph.getPlugin("scroller"),r=s&&s.allowPanning(t,!0);(this.allowRubberband(t,!0)||this.allowRubberband(t)&&!r&&!e)&&this.startRubberband(t)}allowBlankMouseDown(t){const e=this.options.eventTypes;return(e==null?void 0:e.includes("leftMouseDown"))&&t.button===0||(e==null?void 0:e.includes("mouseWheelDown"))&&t.button===1}onBlankClick(){this.clean()}allowRubberband(t,e){return!this.rubberbandDisabled&&ms.isMatch(t,this.options.modifiers,e)}allowMultipleSelection(t){return this.isMultiple()&&ms.isMatch(t,this.options.multipleSelectionModifiers)}onCellMouseMove({cell:t}){this.movedMap.set(t,!0)}onCellMouseUp({e:t,cell:e}){const s=this.options;let r=this.disabled;!r&&this.movedMap.has(e)&&(r=s.selectCellOnMoved===!1,r||(r=s.selectNodeOnMoved===!1&&e.isNode()),r||(r=s.selectEdgeOnMoved===!1&&e.isEdge())),r||(this.allowMultipleSelection(t)?this.unselectMap.has(e)?this.unselectMap.delete(e):this.isSelected(e)?this.unselect(e):this.select(e):this.reset(e)),this.movedMap.delete(e)}onBoxMouseDown({e:t,cell:e}){this.disabled||this.allowMultipleSelection(t)&&(this.unselect(e),this.unselectMap.set(e,!0))}getCells(t){return(Array.isArray(t)?t:[t]).map(e=>typeof e=="string"?this.graph.getCellById(e):e).filter(e=>e!=null)}startRubberband(t){return this.rubberbandDisabled||this.selectionImpl.startSelecting(t),this}isMultiple(){return this.options.multiple!==!1}enableMultiple(){return this.options.multiple=!0,this}disableMultiple(){return this.options.multiple=!1,this}setModifiers(t){return this.options.modifiers=t,this}setContent(t){return this.selectionImpl.setContent(t),this}setFilter(t){return this.selectionImpl.setFilter(t),this}dispose(){this.stopListening(),this.off(),this.selectionImpl.dispose(),$r(this.name)}}fj([Nt.dispose()],ii.prototype,"dispose",null),function(n){n.defaultOptions={rubberband:!1,rubberNode:!0,rubberEdge:!1,pointerEvents:"auto",multiple:!0,multipleSelectionModifiers:["ctrl","meta"],movable:!0,strict:!1,selectCellOnMoved:!1,selectNodeOnMoved:!1,selectEdgeOnMoved:!1,following:!0,content:null,eventTypes:["leftMouseDown","mouseWheelDown"]}}(ii||(ii={})),I.prototype.isHistoryEnabled=function(){const n=this.getPlugin("history");return n?n.isEnabled():!1},I.prototype.enableHistory=function(){const n=this.getPlugin("history");return n&&n.enable(),this},I.prototype.disableHistory=function(){const n=this.getPlugin("history");return n&&n.disable(),this},I.prototype.toggleHistory=function(n){const t=this.getPlugin("history");return t&&t.toggleEnabled(n),this},I.prototype.undo=function(n){const t=this.getPlugin("history");return t&&t.undo(n),this},I.prototype.redo=function(n){const t=this.getPlugin("history");return t&&t.redo(n),this},I.prototype.undoAndCancel=function(n){const t=this.getPlugin("history");return t&&t.cancel(n),this},I.prototype.canUndo=function(){const n=this.getPlugin("history");return n?n.canUndo():!1},I.prototype.canRedo=function(){const n=this.getPlugin("history");return n?n.canRedo():!1},I.prototype.cleanHistory=function(n){const t=this.getPlugin("history");return t&&t.clean(n),this},I.prototype.getHistoryStackSize=function(){return this.getPlugin("history").getSize()},I.prototype.getUndoStackSize=function(){return this.getPlugin("history").getUndoSize()},I.prototype.getRedoStackSize=function(){return this.getPlugin("history").getRedoSize()},I.prototype.getUndoRemainSize=function(){return this.getPlugin("history").getUndoRemainSize()};var Gb=function(n,t,e,s){var r=arguments.length,i=r<3?t:s===null?s=Object.getOwnPropertyDescriptor(t,e):s,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(n,t,e,s);else for(var a=n.length-1;a>=0;a--)(o=n[a])&&(i=(r<3?o(i):r>3?o(t,e,i):o(t,e))||i);return r>3&&i&&Object.defineProperty(t,e,i),i};class oi extends Nt{constructor(t={}){super(),this.name="history",this.batchCommands=null,this.batchLevel=0,this.lastBatchIndex=-1,this.freezed=!1,this.stackSize=0,this.handlers=[];const{stackSize:e=0}=t;this.stackSize=e,this.options=It.getOptions(t),this.validator=new oi.Validator({history:this,cancelInvalid:this.options.cancelInvalid})}init(t){this.graph=t,this.model=this.graph.model,this.clean(),this.startListening()}isEnabled(){return!this.disabled}enable(){this.disabled&&(this.options.enabled=!0)}disable(){this.disabled||(this.options.enabled=!1)}toggleEnabled(t){return t!=null?t!==this.isEnabled()&&(t?this.enable():this.disable()):this.isEnabled()?this.disable():this.enable(),this}undo(t={}){if(!this.disabled){const e=this.undoStack.pop();e&&(this.revertCommand(e,t),this.redoStack.push(e),this.notify("undo",e,t))}return this}redo(t={}){if(!this.disabled){const e=this.redoStack.pop();e&&(this.applyCommand(e,t),this.undoStackPush(e),this.notify("redo",e,t))}return this}cancel(t={}){if(!this.disabled){const e=this.undoStack.pop();e&&(this.revertCommand(e,t),this.redoStack=[],this.notify("cancel",e,t))}return this}getSize(){return this.stackSize}getUndoRemainSize(){const t=this.undoStack.length;return this.stackSize-t}getUndoSize(){return this.undoStack.length}getRedoSize(){return this.redoStack.length}canUndo(){return!this.disabled&&this.undoStack.length>0}canRedo(){return!this.disabled&&this.redoStack.length>0}clean(t={}){return this.undoStack=[],this.redoStack=[],this.notify("clean",null,t),this}get disabled(){return this.options.enabled!==!0}validate(t,...e){return this.validator.validate(t,...e),this}startListening(){this.model.on("batch:start",this.initBatchCommand,this),this.model.on("batch:stop",this.storeBatchCommand,this),this.options.eventNames&&this.options.eventNames.forEach((t,e)=>{this.handlers[e]=this.addCommand.bind(this,t),this.model.on(t,this.handlers[e])}),this.validator.on("invalid",t=>this.trigger("invalid",t))}stopListening(){this.model.off("batch:start",this.initBatchCommand,this),this.model.off("batch:stop",this.storeBatchCommand,this),this.options.eventNames&&(this.options.eventNames.forEach((t,e)=>{this.model.off(t,this.handlers[e])}),this.handlers.length=0),this.validator.off("invalid")}createCommand(t){return{batch:t?t.batch:!1,data:{}}}revertCommand(t,e){this.freezed=!0;const s=Array.isArray(t)?It.sortBatchCommands(t):[t];for(let r=s.length-1;r>=0;r-=1){const i=s[r],o=Object.assign(Object.assign({},e),Mc(i.options,this.options.revertOptionsList||[]));this.executeCommand(i,!0,o)}this.freezed=!1}applyCommand(t,e){this.freezed=!0;const s=Array.isArray(t)?It.sortBatchCommands(t):[t];for(let r=0;r<s.length;r+=1){const i=s[r],o=Object.assign(Object.assign({},e),Mc(i.options,this.options.applyOptionsList||[]));this.executeCommand(i,!1,o)}this.freezed=!1}executeCommand(t,e,s){const r=this.model,i=r.getCell(t.data.id),o=t.event;if(It.isAddEvent(o)&&e||It.isRemoveEvent(o)&&!e)i&&i.remove(s);else if(It.isAddEvent(o)&&!e||It.isRemoveEvent(o)&&e){const a=t.data;a.node?r.addNode(a.props,s):a.edge&&r.addEdge(a.props,s)}else if(It.isChangeEvent(o)){const a=t.data,l=a.key;if(l&&i){const u=e?a.prev[l]:a.next[l];a.key==="attrs"&&this.ensureUndefinedAttrs(u,e?a.next[l]:a.prev[l])&&(s.dirty=!0),i.prop(l,u,s)}}else{const a=this.options.executeCommand;a&&X(a,this,t,e,s)}}addCommand(t,e){if(this.freezed||this.disabled)return;const s=e,r=s.options||{};if(r.dryrun||It.isAddEvent(t)&&this.options.ignoreAdd||It.isRemoveEvent(t)&&this.options.ignoreRemove||It.isChangeEvent(t)&&this.options.ignoreChange)return;const i=this.options.beforeAddCommand;if(i!=null&&X(i,this,t,e)===!1)return;t==="cell:change:*"&&(t=`cell:change:${s.key}`);const o=s.cell,a=Zt.isModel(o);let l;if(this.batchCommands){l=this.batchCommands[Math.max(this.lastBatchIndex,0)];const h=a&&!l.modelChange||l.data.id!==o.id,f=l.event!==t;if(this.lastBatchIndex>=0&&(h||f)){const d=this.batchCommands.findIndex(g=>(a&&g.modelChange||g.data.id===o.id)&&g.event===t);d<0||It.isAddEvent(t)||It.isRemoveEvent(t)?l=this.createCommand({batch:!0}):(l=this.batchCommands[d],this.batchCommands.splice(d,1)),this.batchCommands.push(l),this.lastBatchIndex=this.batchCommands.length-1}}else l=this.createCommand({batch:!1});if(It.isAddEvent(t)||It.isRemoveEvent(t)){const h=l.data;return l.event=t,l.options=r,h.id=o.id,h.props=Tt(o.toJSON()),o.isEdge()?h.edge=!0:o.isNode()&&(h.node=!0),this.push(l,r)}if(It.isChangeEvent(t)){const h=e.key,f=l.data;return(!l.batch||!l.event)&&(l.event=t,l.options=r,f.key=h,f.prev==null&&(f.prev={}),f.prev[h]=Tt(o.previous(h)),a?l.modelChange=!0:f.id=o.id),f.next==null&&(f.next={}),f.next[h]=Tt(o.prop(h)),this.push(l,r)}const u=this.options.afterAddCommand;u&&X(u,this,t,e,l),this.push(l,r)}initBatchCommand(t){this.freezed||(this.batchCommands?this.batchLevel+=1:(this.batchCommands=[this.createCommand({batch:!0})],this.batchLevel=0,this.lastBatchIndex=-1))}storeBatchCommand(t){if(!this.freezed)if(this.batchCommands&&this.batchLevel<=0){const e=this.filterBatchCommand(this.batchCommands);e.length>0&&(this.redoStack=[],this.undoStackPush(e),this.consolidateCommands(),this.notify("add",e,t)),this.batchCommands=null,this.lastBatchIndex=-1,this.batchLevel=0}else this.batchCommands&&this.batchLevel>0&&(this.batchLevel-=1)}filterBatchCommand(t){let e=t.slice();const s=[];for(;e.length>0;){const r=e.shift(),i=r.event,o=r.data.id;if(i!=null&&(o!=null||r.modelChange)){if(It.isAddEvent(i)){const a=e.findIndex(l=>It.isRemoveEvent(l.event)&&l.data.id===o);if(a>=0){e=e.filter((l,u)=>a<u||l.data.id!==o);continue}}else if(It.isRemoveEvent(i)){const a=e.findIndex(l=>It.isAddEvent(l.event)&&l.data.id===o);if(a>=0){e.splice(a,1);continue}}else if(It.isChangeEvent(i)){const a=r.data;if(wn(a.prev,a.next))continue}s.push(r)}}return s}notify(t,e,s){const r=e==null?null:Array.isArray(e)?e:[e];this.emit(t,{cmds:r,options:s}),this.graph.trigger(`history:${t}`,{cmds:r,options:s}),this.emit("change",{cmds:r,options:s}),this.graph.trigger("history:change",{cmds:r,options:s})}push(t,e){this.redoStack=[],t.batch?(this.lastBatchIndex=Math.max(this.lastBatchIndex,0),this.emit("batch",{cmd:t,options:e})):(this.undoStackPush(t),this.consolidateCommands(),this.notify("add",t,e))}consolidateCommands(){var t;const e=this.undoStack[this.undoStack.length-1],s=this.undoStack[this.undoStack.length-2];if(!Array.isArray(e))return;const r=new Set(e.map(o=>o.event));if(r.size!==2||!r.has("cell:change:parent")||!r.has("cell:change:children")||!e.every(o=>{var a;return o.batch&&((a=o.options)===null||a===void 0?void 0:a.ui)})||!Array.isArray(s)||s.length!==1)return;const i=s[0];i.event!=="cell:change:position"||!(!((t=i.options)===null||t===void 0)&&t.ui)||(s.push(...e),this.undoStack.pop())}undoStackPush(t){if(this.stackSize===0){this.undoStack.push(t);return}this.undoStack.length>=this.stackSize&&this.undoStack.shift(),this.undoStack.push(t)}ensureUndefinedAttrs(t,e){let s=!1;return t!==null&&e!==null&&typeof t=="object"&&typeof e=="object"&&Object.keys(e).forEach(r=>{t[r]===void 0&&e[r]!==void 0?(t[r]=void 0,s=!0):typeof t[r]=="object"&&typeof e[r]=="object"&&(s=this.ensureUndefinedAttrs(t[r],e[r]))}),s}dispose(){this.validator.dispose(),this.clean(),this.stopListening(),this.off()}}Gb([Nt.dispose()],oi.prototype,"dispose",null),function(n){class t extends Nt{constructor(s){super(),this.map={},this.command=s.history,this.cancelInvalid=s.cancelInvalid!==!1,this.command.on("add",this.onCommandAdded,this)}onCommandAdded({cmds:s}){return Array.isArray(s)?s.every(r=>this.isValidCommand(r)):this.isValidCommand(s)}isValidCommand(s){if(s.options&&s.options.validation===!1)return!0;const r=s.event&&this.map[s.event]||[];let i=null;return r.forEach(o=>{let a=0;const l=u=>{const h=o[a];a+=1;try{if(h)h(u,s,l);else{i=u;return}}catch(f){l(f)}};l(i)}),i?(this.cancelInvalid&&this.command.cancel(),this.emit("invalid",{err:i}),!1):!0}validate(s,...r){const i=Array.isArray(s)?s:s.split(/\s+/);return r.forEach(o=>{if(typeof o!="function")throw new Error(`${i.join(" ")} requires callback functions.`)}),i.forEach(o=>{this.map[o]==null&&(this.map[o]=[]),this.map[o].push(r)}),this}dispose(){this.command.off("add",this.onCommandAdded,this)}}Gb([Nt.dispose()],t.prototype,"dispose",null),n.Validator=t}(oi||(oi={}));var It;(function(n){function t(o){return o==="cell:added"}n.isAddEvent=t;function e(o){return o==="cell:removed"}n.isRemoveEvent=e;function s(o){return o!=null&&o.startsWith("cell:change:")}n.isChangeEvent=s;function r(o){const a=["cell:added","cell:removed","cell:change:*"],l=["batch:start","batch:stop"],u=o.eventNames?o.eventNames.filter(h=>!(n.isChangeEvent(h)||a.includes(h)||l.includes(h))):a;return Object.assign(Object.assign({enabled:!0},o),{eventNames:u,applyOptionsList:o.applyOptionsList||["propertyPath"],revertOptionsList:o.revertOptionsList||["propertyPath"]})}n.getOptions=r;function i(o){const a=[];for(let l=0,u=o.length;l<u;l+=1){const h=o[l];let f=null;if(n.isAddEvent(h.event)){const d=h.data.id;for(let g=0;g<l;g+=1)if(o[g].data.id===d){f=g;break}}f!==null?a.splice(f,0,h):a.push(h)}return a}n.sortBatchCommands=i})(It||(It={})),I.prototype.toSVG=function(n,t){const e=this.getPlugin("export");e&&e.toSVG(n,t)},I.prototype.toPNG=function(n,t){const e=this.getPlugin("export");e&&e.toPNG(n,t)},I.prototype.toJPEG=function(n,t){const e=this.getPlugin("export");e&&e.toJPEG(n,t)},I.prototype.exportPNG=function(n,t){const e=this.getPlugin("export");e&&e.exportPNG(n,t)},I.prototype.exportJPEG=function(n,t){const e=this.getPlugin("export");e&&e.exportJPEG(n,t)},I.prototype.exportSVG=function(n,t){const e=this.getPlugin("export");e&&e.exportSVG(n,t)};var gj=function(n,t,e,s){var r=arguments.length,i=r<3?t:s===null?s=Object.getOwnPropertyDescriptor(t,e):s,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(n,t,e,s);else for(var a=n.length-1;a>=0;a--)(o=n[a])&&(i=(r<3?o(i):r>3?o(t,e,i):o(t,e))||i);return r>3&&i&&Object.defineProperty(t,e,i),i};class Yb extends Nt{constructor(){super(),this.name="export"}get view(){return this.graph.view}init(t){this.graph=t}exportPNG(t="chart",e={}){this.toPNG(s=>{Ws.downloadDataUri(s,t)},e)}exportJPEG(t="chart",e={}){this.toPNG(s=>{Ws.downloadDataUri(s,t)},e)}exportSVG(t="chart",e={}){this.toSVG(s=>{Ws.downloadDataUri(Ws.svgToDataUrl(s),t)},e)}toSVG(t,e={}){this.notify("before:export",e);const s=this.view.svg,r=tt.create(s).clone();let i=r.node;const o=r.findOne(`.${this.view.prefixClassName("graph-svg-stage")}`),a=e.viewBox||this.graph.graphToLocal(this.graph.getContentBBox()),l=e.preserveDimensions;if(l){const f=typeof l=="boolean"?a:l;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"),e.copyStyles!==!1){const f=s.ownerDocument,d=Array.from(s.querySelectorAll("*")),g=Array.from(i.querySelectorAll("*")),p=f.styleSheets.length,m=[];for(let w=p-1;w>=0;w-=1)m[w]=f.styleSheets[w],f.styleSheets[w].disabled=!0;const y={};d.forEach((w,x)=>{const v=window.getComputedStyle(w,null),S={};Object.keys(v).forEach(E=>{S[E]=v.getPropertyValue(E)}),y[x]=S}),p!==f.styleSheets.length&&m.forEach((w,x)=>{f.styleSheets[x]=w});for(let w=0;w<p;w+=1)f.styleSheets[w].disabled=!1;const b={};d.forEach((w,x)=>{const v=window.getComputedStyle(w,null),S=y[x],E={};Object.keys(v).forEach(C=>{!Oc(C)&&v.getPropertyValue(C)!==S[C]&&(E[C]=v.getPropertyValue(C))}),b[x]=E}),g.forEach((w,x)=>{qt(w,b[x])})}const u=e.stylesheet;if(typeof u=="string"){const f=s.ownerDocument.implementation.createDocument(null,"xml",null).createCDATASection(u);r.prepend(tt.create("style",{type:"text/css"},[f]))}const h=()=>{const f=e.beforeSerialize;if(typeof f=="function"){const g=X(f,this.graph,i);g instanceof SVGSVGElement&&(i=g)}const d=new XMLSerializer().serializeToString(i).replace(/ /g," ");this.notify("after:export",e),t(d)};if(e.serializeImages){const f=r.find("image").map(d=>new Promise(g=>{const p=d.attr("xlink:href")||d.attr("href");Ws.imageToDataUri(p,(m,y)=>{!m&&y&&d.attr("xlink:href",y),g()})}));Promise.all(f).then(h)}else h()}toDataURL(t,e){let s=e.viewBox||this.graph.getContentBBox();const r=ds(e.padding);e.width&&e.height&&(r.left+r.right>=e.width&&(r.left=r.right=0),r.top+r.bottom>=e.height&&(r.top=r.bottom=0));const i=new z(-r.left,-r.top,r.left+r.right,r.top+r.bottom);if(e.width&&e.height){const h=s.width+r.left+r.right,f=s.height+r.top+r.bottom;i.scale(h/e.width,f/e.height)}s=z.create(s).moveAndExpand(i);const o=typeof e.width=="number"&&typeof e.height=="number"?{width:e.width,height:e.height}:s;let a=e.ratio?parseFloat(e.ratio):1;(!Number.isFinite(a)||a===0)&&(a=1);const l={width:Math.max(Math.round(o.width*a),1),height:Math.max(Math.round(o.height*a),1)};{const h=document.createElement("canvas"),f=h.getContext("2d");h.width=l.width,h.height=l.height;const d=l.width-1,g=l.height-1;f.fillStyle="rgb(1,1,1)",f.fillRect(d,g,1,1);const p=f.getImageData(d,g,1,1).data;if(p[0]!==1||p[1]!==1||p[2]!==1)throw new Error("size exceeded")}const u=new Image;u.onload=()=>{const h=document.createElement("canvas");h.width=l.width,h.height=l.height;const f=h.getContext("2d");f.fillStyle=e.backgroundColor||"white",f.fillRect(0,0,l.width,l.height);try{f.drawImage(u,0,0,l.width,l.height);const d=h.toDataURL(e.type,e.quality);t(d)}catch{}},this.toSVG(h=>{u.src=`data:image/svg+xml,${encodeURIComponent(h)}`},Object.assign(Object.assign({},e),{viewBox:s,serializeImages:!0,preserveDimensions:Object.assign({},l)}))}toPNG(t,e={}){this.toDataURL(t,Object.assign(Object.assign({},e),{type:"image/png"}))}toJPEG(t,e={}){this.toDataURL(t,Object.assign(Object.assign({},e),{type:"image/jpeg"}))}notify(t,e){this.trigger(t,e),this.graph.trigger(t,e)}dispose(){this.off()}}gj([Nt.dispose()],Yb.prototype,"dispose",null);const pj={class:"control-box"},mj=Gn({__name:"index",props:{payload:Object},setup(n){const t=n,e=c.ref("3"),s=c.ref([]),r=()=>{s.value=JSON.parse(JSON.stringify(t.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=za;u.attrs.text.text=`${t.payload.getPorts().length+1}`,u.args.x="50%",u.args.y="50%",t.payload.addPorts([{group:"ports",...u}]),r()},o=()=>{Wi("#drawing-board",!0)},a=(u,h,f)=>{t.payload.portProp(u,"args/"+h,f+"%"),r()},l=u=>{t.payload.removePort(u),r()};return c.onMounted(()=>{r()}),(u,h)=>{const f=c.resolveComponent("el-button"),d=c.resolveComponent("el-table-column"),g=c.resolveComponent("el-slider"),p=c.resolveComponent("el-icon"),m=c.resolveComponent("el-table"),y=c.resolveComponent("el-collapse-item"),b=c.resolveComponent("el-collapse");return c.openBlock(),c.createElementBlock("div",pj,[c.createVNode(b,{modelValue:e.value,"onUpdate:modelValue":h[0]||(h[0]=w=>e.value=w),accordion:""},{default:c.withCtx(()=>[c.createVNode(y,{title:"连接桩设置",name:"3"},{default:c.withCtx(()=>[c.createVNode(f,{type:"primary",onClick:i,size:"small"},{default:c.withCtx(()=>h[1]||(h[1]=[c.createTextVNode("添加连接桩")])),_:1}),c.createVNode(f,{type:"primary",onClick:o,size:"small"},{default:c.withCtx(()=>h[2]||(h[2]=[c.createTextVNode("显示连接桩")])),_:1}),c.createVNode(m,{data:s.value,border:"",size:"small",style:{"margin-top":"10px"}},{default:c.withCtx(()=>[c.createVNode(d,{label:"ID",width:"50",align:"center"},{default:c.withCtx(({row:w})=>[c.createTextVNode(c.toDisplayString(w.attrs.text.text),1)]),_:1}),c.createVNode(d,{label:"x",width:"100",align:"center"},{default:c.withCtx(({row:w})=>[c.createVNode(g,{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}),c.createVNode(d,{label:"y",width:"100",align:"center"},{default:c.withCtx(({row:w})=>[c.createVNode(g,{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}),c.createVNode(d,{label:"操作",width:"70",align:"center"},{default:c.withCtx(({row:w})=>[c.createVNode(f,{type:"danger",size:"small",onClick:x=>l(w.id)},{default:c.withCtx(()=>[c.createVNode(p,null,{default:c.withCtx(()=>[c.createVNode(c.unref(xg))]),_:1})]),_:2},1032,["onClick"])]),_:1})]),_:1},8,["data"])]),_:1})]),_:1},8,["modelValue"])])}}},[["__scopeId","data-v-b280098c"]]),yl=[{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"}}],Wb={groups:{ports:{position:"absolute",args:{x:0,y:0},attrs:{circle:{magnet:!0,stroke:"#8f8f8f",r:4}},label:{position:"top"}}}},dh=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 t=n,e=c.ref([]),s=c.ref(),r=()=>{const y=document.getElementById("preview-container");s.value=new I({container:y,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}}),s.value.on("blank:dblclick",()=>{h()})},i=async()=>{let y,b,w;if(t.id){const{background:x,grid:v,data:S}=await _m(t.id);y=x,b={},w=S}else y=t.background,b={},w=t.data;s.value.drawBackground(y),s.value.drawGrid(b),s.value.fromJSON(w),l()},o=c.ref(null),a=c.ref([]),l=()=>{a.value=f();const y=/\$\{(.*?)\}/g;a.value.forEach(b=>{if(!b.data||!b.data.field)return;const w=b.data.content.match(y);e.value.push(...b.data.field),w&&(b.matches=w)}),a&&h()},u=c.ref(!0),h=async()=>{if(!e.value.length)return;if(!u.value){Bt.warning("数据正在更新中,请稍后再试");return}o.value&&clearInterval(o.value),u.value=!1;const y=await RD(e.value);if(u.value=!0,!Array.isArray(y)||!y.length)return;let b=0;a.value.forEach((w,x)=>{if(!w.data||!w.data.field)return;if(w.matches){const S=x===0?0:b||0,E=b=S+w.data.field.length;w.label=d(w.data.content,y.slice(S,E))}}),o.value=setTimeout(()=>{h()},1e4)},f=()=>s.value.getNodes().filter(b=>{var w;return((w=b.data)==null?void 0:w.type)==="text"}),d=(y,b)=>{let w=0;return y.replace(/\$\{.*?\}/g,()=>w<b.length?b[w++]:"--")},g=()=>{s.value.zoomToFit({maxScale:1,padding:20})},p=c.shallowRef(),m=()=>{new ResizeObserver(()=>{g()}).observe(p.value)};return c.onMounted(()=>{r(),i(),setTimeout(()=>{Wi("#preview-container",!1),g()},100),m()}),c.onUnmounted(()=>{clearInterval(o.value)}),(y,b)=>(c.openBlock(),c.createElementBlock("div",{id:"preview-container",ref_key:"previewRef",ref:p,onDblclick:g},null,544))}}),yj={class:"form-container"},bj={class:"footer"},wj=Gn({__name:"group-form",props:{payload:{type:Object,default:()=>({})}},emits:["close"],setup(n,{emit:t}){const e=n,s=t,r=c.reactive({groupName:"",sort:1,isShow:1}),i=c.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=c.ref(),a=()=>{console.log(r),o.value.validate(u=>{if(u)r.id?$a("/cny/custom/updateGroup",r).then(h=>{h!=null&&h.isOk?(Bt.success("保存成功"),s("close",!0)):Bt.error((h==null?void 0:h.msg)||"保存失败")}):$a("/cny/custom/saveGroup",r).then(h=>{h!=null&&h.isOk?(Bt.success("保存成功"),s("close",!0)):Bt.error((h==null?void 0:h.msg)||"保存失败")});else return!1})},l=()=>{s("close",!1)};return c.onMounted(()=>{var u;(u=e.payload)!=null&&u.id&&(r.id=e.payload.id,r.groupName=e.payload.groupName,r.sort=e.payload.sort,r.isShow=e.payload.isShow)}),(u,h)=>{const f=c.resolveComponent("el-input"),d=c.resolveComponent("el-form-item"),g=c.resolveComponent("el-input-number"),p=c.resolveComponent("el-switch"),m=c.resolveComponent("el-button"),y=c.resolveComponent("el-form");return c.openBlock(),c.createElementBlock("div",yj,[c.createVNode(y,{ref_key:"form",ref:o,model:r,rules:i,"label-width":"90px","label-suffix":":"},{default:c.withCtx(()=>[c.createVNode(d,{label:"分组名称",prop:"groupName"},{default:c.withCtx(()=>[c.createVNode(f,{modelValue:r.groupName,"onUpdate:modelValue":h[0]||(h[0]=b=>r.groupName=b),placeholder:"请输入分组名称",clearable:""},null,8,["modelValue"])]),_:1}),c.createVNode(d,{label:"排序",prop:"sort"},{default:c.withCtx(()=>[c.createVNode(g,{modelValue:r.sort,"onUpdate:modelValue":h[1]||(h[1]=b=>r.sort=b),min:0,max:999,step:1,"controls-position":"right"},null,8,["modelValue"])]),_:1}),c.createVNode(d,{label:"是否显示",prop:"isShow"},{default:c.withCtx(()=>[c.createVNode(p,{modelValue:r.isShow,"onUpdate:modelValue":h[2]||(h[2]=b=>r.isShow=b),"active-value":1,"inactive-value":0,"active-color":"#13ce66","inactive-color":"#ff4949"},null,8,["modelValue"])]),_:1}),c.createElementVNode("div",bj,[c.createVNode(m,{type:"primary",onClick:a},{default:c.withCtx(()=>h[3]||(h[3]=[c.createTextVNode("保存")])),_:1}),c.createVNode(m,{onClick:l},{default:c.withCtx(()=>h[4]||(h[4]=[c.createTextVNode("取消")])),_:1})])]),_:1},8,["model","rules"])])}}},[["__scopeId","data-v-a2a7ce25"]]),xj={class:"form-container"},vj={class:"footer"},Cj=Gn({__name:"image-form",props:{payload:{type:Object,default:()=>({})}},emits:["close"],setup(n,{emit:t}){const e=t,s=n,r=c.shallowRef(null),i=c.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=c.ref(""),l=f=>{if(f.raw.type!=="image/svg+xml")return Bt.error("上传图片只能是 svg 格式!"),!1;const d=new FormData;d.append("file",f.raw),DD("/cny/file/fileUpload",d).then(g=>{g!=null&&g.isOk?(a.value=hs.defaults.baseURL+"/cny/upload/"+(g==null?void 0:g.data),i.imageUrl=g==null?void 0:g.data):Bt.error((g==null?void 0:g.msg)||"上传失败")})},u=()=>{console.log(i),r.value.validate(f=>{if(f)$a("/cny/custom/savePicture",i).then(d=>{d!=null&&d.isOk?(Bt.success("保存成功"),e("close",!0)):Bt.error((d==null?void 0:d.msg)||"保存失败")});else return!1})},h=()=>{e("close",!1)};return c.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=s.payload.imageUrl,a.value=i.imageUrl),i.groupId=s.payload.groupId}),(f,d)=>{const g=c.resolveComponent("el-input"),p=c.resolveComponent("el-form-item"),m=c.resolveComponent("el-input-number"),y=c.resolveComponent("el-switch"),b=c.resolveComponent("el-image"),w=c.resolveComponent("el-icon"),x=c.resolveComponent("el-upload"),v=c.resolveComponent("el-button"),S=c.resolveComponent("el-form");return c.openBlock(),c.createElementBlock("div",xj,[c.createVNode(S,{ref_key:"form",ref:r,model:i,rules:o,"label-width":"90px","label-suffix":":"},{default:c.withCtx(()=>[c.createVNode(p,{label:"图片名称",prop:"imageName"},{default:c.withCtx(()=>[c.createVNode(g,{modelValue:i.imageName,"onUpdate:modelValue":d[0]||(d[0]=E=>i.imageName=E),placeholder:"请输入图片名称"},null,8,["modelValue"])]),_:1}),c.createVNode(p,{label:"排序",prop:"sort"},{default:c.withCtx(()=>[c.createVNode(m,{modelValue:i.sort,"onUpdate:modelValue":d[1]||(d[1]=E=>i.sort=E),min:0,max:999,step:1,"controls-position":"right"},null,8,["modelValue"])]),_:1}),c.createVNode(p,{label:"是否显示",prop:"isShow"},{default:c.withCtx(()=>[c.createVNode(y,{modelValue:i.isShow,"onUpdate:modelValue":d[2]||(d[2]=E=>i.isShow=E),"active-value":1,"inactive-value":0,"active-color":"#13ce66","inactive-color":"#ff4949"},null,8,["modelValue"])]),_:1}),c.createVNode(p,{label:"上传",prop:"image"},{default:c.withCtx(()=>[c.createVNode(x,{action:"","list-type":"picture",class:"avatar-uploader","show-file-list":!1,"on-change":l,"auto-upload":!1},{default:c.withCtx(()=>[a.value?(c.openBlock(),c.createBlock(b,{key:0,src:a.value,fit:"cover",style:{width:"64px",height:"64px"}},null,8,["src"])):(c.openBlock(),c.createBlock(w,{key:1,class:"avatar-uploader-icon"},{default:c.withCtx(()=>[c.createVNode(c.unref(Z2))]),_:1}))]),_:1})]),_:1}),c.createElementVNode("div",vj,[c.createVNode(v,{type:"primary",onClick:u},{default:c.withCtx(()=>d[3]||(d[3]=[c.createTextVNode("保存")])),_:1}),c.createVNode(v,{onClick:h},{default:c.withCtx(()=>d[4]||(d[4]=[c.createTextVNode("取消")])),_:1})])]),_:1},8,["model"])])}}},[["__scopeId","data-v-73961934"]]),Sj={class:"form-container"},Ej={style:{padding:"0 10px",display:"flex","flex-direction":"column",gap:"5px","align-items":"flex-start"}},Oj=["src"],Mj=Gn({__name:"image-management",setup(n){const t=c.reactive({items:[]}),e=()=>{Yi("/cny/custom/groupList").then(d=>{t.items=d.data})},s=c.reactive({show:!1,title:"新增图片分组",payload:null}),r=()=>{s.show=!0,s.title="新增图片分组",s.payload=null},i=d=>{s.show=!0,s.title="编辑图片分组",s.payload={id:d.id,groupName:d.groupName,sort:d.sort,isShow:d.isShow}},o=d=>{iu.confirm("是否确定要删除该图片分组?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(()=>{Nm("/cny/custom/removeGroup/"+d).then(g=>{g.code===200?(Bt.success("删除成功"),e()):Bt.error(g.msg||"删除失败")})})},a=c.reactive({show:!1,title:"新增图片",payload:null}),l=d=>{a.show=!0,a.title="新增图片",a.payload={groupId:d}},u=d=>{a.show=!0,a.title="编辑图片",a.payload={id:d.id,groupId:d.groupId,imageName:d.imageName,sort:d.sort,isShow:d.isShow,imageUrl:d.imageUrl}},h=d=>{iu.confirm("是否确定要删除该图片?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(()=>{Nm("/cny/custom/removePicture/"+d).then(g=>{g.code===200?(Bt.success("删除成功"),e()):Bt.error(g.msg||"删除失败")})})},f=d=>{s.show=!1,a.show=!1,d&&e()};return c.onMounted(()=>{e()}),(d,g)=>{const p=c.resolveComponent("el-button"),m=c.resolveComponent("el-table-column"),y=c.resolveComponent("el-table"),b=c.resolveComponent("el-dialog");return c.openBlock(),c.createElementBlock("div",Sj,[c.createVNode(p,{type:"primary",onClick:r,size:"small"},{default:c.withCtx(()=>g[2]||(g[2]=[c.createTextVNode("新增图片分组")])),_:1}),c.createVNode(y,{data:t.items,border:"",height:"500"},{default:c.withCtx(()=>[c.createVNode(m,{type:"expand"},{default:c.withCtx(w=>[c.createElementVNode("div",Ej,[c.createVNode(p,{type:"primary",size:"small",onClick:x=>l(w.row.id)},{default:c.withCtx(()=>g[3]||(g[3]=[c.createTextVNode("新增图片")])),_:2},1032,["onClick"]),c.createVNode(y,{data:w.row.pictureList,border:"",size:"small"},{default:c.withCtx(()=>[c.createVNode(m,{label:"名称",prop:"imageName",align:"center"}),c.createVNode(m,{label:"图片",prop:"imageUrl",align:"center"},{default:c.withCtx(x=>[c.createElementVNode("img",{src:x.row.imageUrl,alt:"",style:{width:"64px",height:"64px"}},null,8,Oj)]),_:1}),c.createVNode(m,{label:"排序",prop:"sort",align:"center"}),c.createVNode(m,{label:"是否显示",prop:"isShow",align:"center"},{default:c.withCtx(x=>[c.createTextVNode(c.toDisplayString(x.row.isShow===1?"是":"否"),1)]),_:1}),c.createVNode(m,{label:"操作",align:"center"},{default:c.withCtx(x=>[c.createVNode(p,{type:"primary",size:"small",onClick:v=>u(x.row)},{default:c.withCtx(()=>g[4]||(g[4]=[c.createTextVNode("编辑")])),_:2},1032,["onClick"]),c.createVNode(p,{type:"danger",size:"small",onClick:v=>h(x.row.id)},{default:c.withCtx(()=>g[5]||(g[5]=[c.createTextVNode("删除")])),_:2},1032,["onClick"])]),_:1})]),_:2},1032,["data"])])]),_:1}),c.createVNode(m,{label:"分组名称",prop:"groupName",align:"center"}),c.createVNode(m,{label:"排序",prop:"sort",align:"center"}),c.createVNode(m,{label:"是否显示",prop:"isShow",align:"center"},{default:c.withCtx(w=>[c.createTextVNode(c.toDisplayString(w.row.isShow===1?"是":"否"),1)]),_:1}),c.createVNode(m,{label:"操作",align:"center"},{default:c.withCtx(w=>[c.createVNode(p,{type:"primary",size:"small",onClick:x=>i(w.row)},{default:c.withCtx(()=>g[6]||(g[6]=[c.createTextVNode("编辑")])),_:2},1032,["onClick"]),c.createVNode(p,{type:"danger",size:"small",onClick:x=>o(w.row.id)},{default:c.withCtx(()=>g[7]||(g[7]=[c.createTextVNode("删除")])),_:2},1032,["onClick"])]),_:1})]),_:1},8,["data"]),c.createVNode(b,{modelValue:s.show,"onUpdate:modelValue":g[0]||(g[0]=w=>s.show=w),title:s.title,width:"300","close-on-click-modal":!1,"close-on-press-escape":!1},{default:c.withCtx(()=>[s.show?(c.openBlock(),c.createBlock(wj,{key:0,payload:s.payload,onClose:f},null,8,["payload"])):c.createCommentVNode("",!0)]),_:1},8,["modelValue","title"]),c.createVNode(b,{modelValue:a.show,"onUpdate:modelValue":g[1]||(g[1]=w=>a.show=w),title:a.title,width:"300","close-on-click-modal":!1,"close-on-press-escape":!1},{default:c.withCtx(()=>[a.show?(c.openBlock(),c.createBlock(Cj,{key:0,payload:a.payload,onClose:f},null,8,["payload"])):c.createCommentVNode("",!0)]),_:1},8,["modelValue","title"])])}}},[["__scopeId","data-v-9338a78d"]]),Pj={class:"page-container"},Aj={class:"tool-bar"},Tj={class:"action"},Nj={class:"el-dropdown-link"},_j={class:"action",style:{"margin-right":"50px"}},kj={class:"board"},Dj={class:"drawing-board-box"},Rj={id:"controls"},Ij={key:0,class:"controls-label"},Lj={style:{width:"100%",height:"100%",background:"black"}},qb=Gn(Object.assign({name:"editor"},{__name:"index",props:{id:{type:String,default:""}},emits:["getJson"],setup(n,{emit:t}){const e=n,s=c.ref(),r=c.reactive({label:null,component:c.shallowRef(null)}),i=c.ref(null),o=c.ref(null),a=()=>{const D=document.getElementById("drawing-board");window.__x6_instances__=[],s.value=new I({container:D,autoResize:!0,panning:!0,mousewheel:!0,connecting:{router:"orth",connectionPoint:{name:"anchor"},anchor:"center",createEdge(){return s.value.createEdge({inherit:"edge",attrs:{...Cu},zIndex:0})}}}),window.__x6_instances__.push(s.value),s.value.use(new er({resizing:{enabled:!0,preserveAspectRatio:!1},rotating:!0})),s.value.use(new Hb),s.value.use(new $b),s.value.use(new zb({format(N){return N.replace(/\s/g,"").replace("cmd","command")}})),s.value.use(new oi),s.value.use(new ii({enabled:!0,multiple:!0,rubberband:!0,modifiers:["alt"],showNodeSelectionBox:!0})),s.value.bindKey(["delete","backspace"],()=>{const N=s.value.getSelectedCells();return N.length&&s.value.removeCells(N),!1}),s.value.bindKey(["ctrl+c","cmd + c"],()=>{const N=s.value.getSelectedCells();return N.length&&(s.value.copy(N),Bt.success("复制成功")),!1}),s.value.bindKey(["ctrl+v","cmd + v"],()=>{if(!s.value.isClipboardEmpty()){const N=s.value.paste({offset:32});s.value.cleanSelection(),s.value.select(N),Bt.success("粘贴成功")}return!1}),s.value.bindKey(["ctrl+z","cmd + z"],()=>(s.value.canUndo()&&s.value.undo(),!1)),s.value.bindKey(["ctrl+y","cmd + y"],()=>(s.value.canRedo()&&s.value.redo(),!1)),s.value.on("blank:click",({e:N,x:V,y:A})=>{o.value=s,r.component=jD,r.label="画布属性",i.value=G().valueOf()}),s.value.on("cell:click",({cell:N})=>{var V,A,P;if(console.log("cell:click",N,((V=N==null?void 0:N.data)==null?void 0:V.type)??(N==null?void 0:N.shape)),o.value=N,i.value=G().valueOf(),((A=N.data)==null?void 0:A.type)==="text"){r.component=Rm,r.label="文本属性";return}if(((P=N.data)==null?void 0:P.type)==="base-shape"){r.component=Rm,r.label="基础图形属性";return}if((N==null?void 0:N.shape)==="edge"){r.component=WD,r.label="连线属性";return}if((N==null?void 0:N.shape)==="image"){r.component=mj,r.label="图片属性";return}r.component=null,r.label=null}),s.value.on("edge:mouseenter",({cell:N})=>{N.addTools([{name:"vertices",args:{snapRadius:3,attrs:{r:3,fill:"#239edd",cursor:"move","stroke-width":0},modifiers:["alt"]}}])}),s.value.on("edge:mouseleave",({cell:N})=>{N.removeTools()}),s.value.on("node:mouseenter",()=>{Wi("#drawing-board",!0)}),s.value.on("node:mouseleave",()=>{Wi("#drawing-board",!1)}),s.value.use(new Yb)},l=c.ref(),u=()=>{l.value=new si({target:s.value,...ID,groups:[{name:"基础组件",graphPadding:30}],search(V,A){var P;return((P=V.label)==null?void 0:P.indexOf(A))!==-1},placeholder:"搜索",notFoundText:"未找到匹配项",getDragNode:V=>{const A=V.clone({keepId:!0});return A.label="",A},getDropNode:V=>V.clone({keepId:!0})});const D=s.value.createNode({...LD}),N=yl.map(V=>(V.ports=Wb,s.value.createNode(V)));l.value.load([D,...N],"基础组件"),Yi("/cny/custom/groupList").then(V=>{const A=(V==null?void 0:V.data)||[];A==null||A.forEach(P=>{l.value.addGroup({name:P==null?void 0:P.groupName,graphPadding:30});const L=P==null?void 0:P.pictureList.map(j=>{const Y={shape:"image",imageUrl:j==null?void 0:j.imageUrl,ports:Wb,width:64,height:64,label:j.imageName};return s.value.createNode(Y)});l.value.load(L,P==null?void 0:P.groupName),document.getElementById("stencil").appendChild(l.value.container)})}).finally(()=>{setTimeout(()=>{l.value.container.querySelectorAll(".x6-node").forEach((A,P)=>{if(P>yl.length){const L=A.querySelector("text");A.style.position="relative",L&&(L.style.display="none",L.setAttribute("x","0%"),L.setAttribute("y","30%"),L.style.fontSize="12px",L.style.fontWeight="bold",L.style.fill="#ffffff")}A.addEventListener("mouseenter",L=>{if(P>yl.length){const j=A.querySelector("text");j&&(j.style.display="block")}}),A.addEventListener("mouseleave",L=>{if(P>yl.length){const j=A.querySelector("text");j&&(j.style.display="none")}})})},20)})},h=D=>{switch(D){case"snapLine":s.value.isSnaplineEnabled()?(s.value.disableSnapline(),Bt.warning("关闭对齐线")):(s.value.enableSnapline(),Bt.success("开启对齐线"));break;case"select":s.value.isSelectionEnabled()?(s.value.disableSelection(),Bt.warning("关闭框选")):(s.value.enableSelection(),Bt.success("开启框选"));break;case"drawLine":g();break;case"adaptive":p();break;case"shortcuts":y();break;case"image":w();break;case"clear":x();break;case"export":v();break}},f=c.ref(!1),d=c.ref(null),g=()=>{f.value=!0;const D=new Date;s.value.startBatch(D),s.value.disablePanning(),s.value.once("blank:mousedown",({e:N,x:V,y:A})=>{f.value&&(d.value=s.value.addEdge({source:{x:V,y:A},target:{x:V,y:A},attrs:Cu,data:{type:"edge",isConnector:!1},zIndex:0}))}),s.value.on("blank:mousemove",({e:N,x:V,y:A})=>{f.value&&d.value.setTarget({x:V,y:A})}),s.value.on("blank:mouseup",({e:N,x:V,y:A})=>{f.value=!1,s.value.enablePanning(),s.value.stopBatch(D)})},p=()=>{s.value.zoomToFit({maxScale:1,padding:20})},m=c.reactive({show:!1}),y=()=>{m.show=!0},b=c.reactive({show:!1}),w=()=>{b.show=!0},x=()=>{s.value.clearCells(),s.value.drawBackground(km),s.value.drawGrid(Dm),Bt.success("清空成功")},v=()=>{const D=G().format("YYYYMMDDHHmmss");s.value.exportPNG(D,{padding:10,quality:1,backgroundColor:s.value.options.background.color})},S=t,E=c.reactive({show:!1,background:null,grid:null,data:null}),C=()=>{E.background=s.value.options.background,E.grid=s.value.options.grid,E.data=s.value.toJSON(),E.show=!0},M=()=>{S("getJson",{background:s.value.options.background,grid:s.value.options.grid,data:s.value.toJSON()})},T=async()=>{if(!e.id){s.value.drawBackground(km),s.value.drawGrid(Dm),s.value.fromJSON({cells:[]});return}const{background:D,grid:N,data:V}=await _m(e.id);s.value.drawBackground(D),s.value.drawGrid(N),s.value.fromJSON(V),p()},k=c.shallowRef(null),_=()=>{new ResizeObserver(()=>{p()}).observe(k.value)};return c.onMounted(()=>{a(),u(),T(),_()}),(D,N)=>{const V=c.resolveComponent("el-icon"),A=c.resolveComponent("el-button"),P=c.resolveComponent("el-dropdown-item"),L=c.resolveComponent("el-dropdown-menu"),j=c.resolveComponent("el-dropdown"),Y=c.resolveComponent("el-scrollbar"),ot=c.resolveComponent("el-dialog"),F=c.resolveComponent("el-drawer");return c.openBlock(),c.createElementBlock("div",Pj,[c.createElementVNode("div",Aj,[c.createElementVNode("div",Tj,[c.createVNode(j,{onCommand:h},{dropdown:c.withCtx(()=>[c.createVNode(L,null,{default:c.withCtx(()=>[c.createVNode(P,{command:"snapLine"},{default:c.withCtx(()=>N[4]||(N[4]=[c.createTextVNode("对齐线")])),_:1}),c.createVNode(P,{command:"select"},{default:c.withCtx(()=>N[5]||(N[5]=[c.createTextVNode("框选")])),_:1}),c.createVNode(P,{command:"drawLine"},{default:c.withCtx(()=>N[6]||(N[6]=[c.createTextVNode("绘制直线")])),_:1}),c.createVNode(P,{command:"adaptive"},{default:c.withCtx(()=>N[7]||(N[7]=[c.createTextVNode("视图自适应")])),_:1}),c.createVNode(P,{command:"shortcuts"},{default:c.withCtx(()=>N[8]||(N[8]=[c.createTextVNode("查看快捷键")])),_:1}),c.createVNode(P,{command:"image"},{default:c.withCtx(()=>N[9]||(N[9]=[c.createTextVNode("图片管理")])),_:1}),c.createVNode(P,{command:"clear"},{default:c.withCtx(()=>N[10]||(N[10]=[c.createTextVNode("清空画布")])),_:1}),c.createVNode(P,{command:"export"},{default:c.withCtx(()=>N[11]||(N[11]=[c.createTextVNode("导出成图片")])),_:1})]),_:1})]),default:c.withCtx(()=>[c.createElementVNode("span",Nj,[c.createVNode(A,{size:"small",text:""},{default:c.withCtx(()=>[N[3]||(N[3]=c.createTextVNode("工具 ")),c.createVNode(V,null,{default:c.withCtx(()=>[c.createVNode(c.unref(B2))]),_:1})]),_:1})])]),_:1})]),c.createElementVNode("div",_j,[c.createVNode(c.unref(Ip),{content:"预览",placement:"bottom"},{default:c.withCtx(()=>[c.createVNode(A,{size:"small",icon:c.unref(Sg),onClick:C},null,8,["icon"])]),_:1}),c.createVNode(c.unref(Ip),{content:"保存",placement:"bottom"},{default:c.withCtx(()=>[c.createVNode(A,{size:"small",icon:c.unref(Y2),onClick:M},null,8,["icon"])]),_:1})])]),c.createElementVNode("div",kj,[N[12]||(N[12]=c.createElementVNode("div",{id:"stencil"},null,-1)),c.createElementVNode("div",Dj,[c.createElementVNode("div",{id:"drawing-board",ref_key:"drawBoard",ref:k},null,512)]),c.createElementVNode("div",Rj,[r.label?(c.openBlock(),c.createElementBlock("div",Ij,c.toDisplayString(r.label),1)):c.createCommentVNode("",!0),c.createVNode(Y,null,{default:c.withCtx(()=>[(c.openBlock(),c.createBlock(c.resolveDynamicComponent(r.component),{graph:s.value,payload:o.value,key:i.value},null,8,["graph","payload"]))]),_:1})])]),c.createVNode(ot,{modelValue:m.show,"onUpdate:modelValue":N[0]||(N[0]=H=>m.show=H),width:"400px",title:"快捷键","close-on-click-modal":!1,"close-on-press-escape":!1},{default:c.withCtx(()=>[c.createVNode(JD)]),_:1},8,["modelValue"]),c.createVNode(ot,{modelValue:b.show,"onUpdate:modelValue":N[1]||(N[1]=H=>b.show=H),width:"800px",title:"图片管理","close-on-click-modal":!1,"close-on-press-escape":!1},{default:c.withCtx(()=>[c.createVNode(Mj)]),_:1},8,["modelValue"]),c.createVNode(F,{class:"no-border-drawer",modelValue:E.show,"onUpdate:modelValue":N[2]||(N[2]=H=>E.show=H),title:"预览",direction:"ttb",size:"100%"},{default:c.withCtx(()=>[c.createElementVNode("div",Lj,[E.show?(c.openBlock(),c.createBlock(dh,{key:0,background:E.background,grid:E.grid,data:E.data},null,8,["background","grid","data"])):c.createCommentVNode("",!0)])]),_:1},8,["modelValue"])])}}}),[["__scopeId","data-v-d5c1c90e"]]),Bj=[qb,dh],Jb=(n,t)=>{Bj.forEach(e=>{n.component(e.name,e)})};typeof window<"u"&&window.Vue&&Jb(window.Vue);const Vj={install:Jb};Rt.WiringDiagramEditor=qb,Rt.WiringDiagramPreview=dh,Rt.default=Vj,Rt.setBaseURL=_D,Rt.setToken=kD,Object.defineProperties(Rt,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
|
738
|
+
`;I.prototype.isSelectionEnabled=function(){const n=this.getPlugin("selection");return n?n.isEnabled():!1},I.prototype.enableSelection=function(){const n=this.getPlugin("selection");return n&&n.enable(),this},I.prototype.disableSelection=function(){const n=this.getPlugin("selection");return n&&n.disable(),this},I.prototype.toggleSelection=function(n){const t=this.getPlugin("selection");return t&&t.toggleEnabled(n),this},I.prototype.isMultipleSelection=function(){const n=this.getPlugin("selection");return n?n.isMultipleSelection():!1},I.prototype.enableMultipleSelection=function(){const n=this.getPlugin("selection");return n&&n.enableMultipleSelection(),this},I.prototype.disableMultipleSelection=function(){const n=this.getPlugin("selection");return n&&n.disableMultipleSelection(),this},I.prototype.toggleMultipleSelection=function(n){const t=this.getPlugin("selection");return t&&t.toggleMultipleSelection(n),this},I.prototype.isSelectionMovable=function(){const n=this.getPlugin("selection");return n?n.isSelectionMovable():!1},I.prototype.enableSelectionMovable=function(){const n=this.getPlugin("selection");return n&&n.enableSelectionMovable(),this},I.prototype.disableSelectionMovable=function(){const n=this.getPlugin("selection");return n&&n.disableSelectionMovable(),this},I.prototype.toggleSelectionMovable=function(n){const t=this.getPlugin("selection");return t&&t.toggleSelectionMovable(n),this},I.prototype.isRubberbandEnabled=function(){const n=this.getPlugin("selection");return n?n.isRubberbandEnabled():!1},I.prototype.enableRubberband=function(){const n=this.getPlugin("selection");return n&&n.enableRubberband(),this},I.prototype.disableRubberband=function(){const n=this.getPlugin("selection");return n&&n.disableRubberband(),this},I.prototype.toggleRubberband=function(n){const t=this.getPlugin("selection");return t&&t.toggleRubberband(n),this},I.prototype.isStrictRubberband=function(){const n=this.getPlugin("selection");return n?n.isStrictRubberband():!1},I.prototype.enableStrictRubberband=function(){const n=this.getPlugin("selection");return n&&n.enableStrictRubberband(),this},I.prototype.disableStrictRubberband=function(){const n=this.getPlugin("selection");return n&&n.disableStrictRubberband(),this},I.prototype.toggleStrictRubberband=function(n){const t=this.getPlugin("selection");return t&&t.toggleStrictRubberband(n),this},I.prototype.setRubberbandModifiers=function(n){const t=this.getPlugin("selection");return t&&t.setRubberbandModifiers(n),this},I.prototype.setSelectionFilter=function(n){const t=this.getPlugin("selection");return t&&t.setSelectionFilter(n),this},I.prototype.setSelectionDisplayContent=function(n){const t=this.getPlugin("selection");return t&&t.setSelectionDisplayContent(n),this},I.prototype.isSelectionEmpty=function(){const n=this.getPlugin("selection");return n?n.isEmpty():!0},I.prototype.cleanSelection=function(n){const t=this.getPlugin("selection");return t&&t.clean(n),this},I.prototype.resetSelection=function(n,t){const e=this.getPlugin("selection");return e&&e.reset(n,t),this},I.prototype.getSelectedCells=function(){const n=this.getPlugin("selection");return n?n.getSelectedCells():[]},I.prototype.getSelectedCellCount=function(){const n=this.getPlugin("selection");return n?n.getSelectedCellCount():0},I.prototype.isSelected=function(n){const t=this.getPlugin("selection");return t?t.isSelected(n):!1},I.prototype.select=function(n,t){const e=this.getPlugin("selection");return e&&e.select(n,t),this},I.prototype.unselect=function(n,t){const e=this.getPlugin("selection");return e&&e.unselect(n,t),this};var fj=function(n,t,e,s){var r=arguments.length,i=r<3?t:s===null?s=Object.getOwnPropertyDescriptor(t,e):s,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(n,t,e,s);else for(var a=n.length-1;a>=0;a--)(o=n[a])&&(i=(r<3?o(i):r>3?o(t,e,i):o(t,e))||i);return r>3&&i&&Object.defineProperty(t,e,i),i};class ii extends Nt{get rubberbandDisabled(){return this.options.enabled!==!0||this.options.rubberband!==!0}get disabled(){return this.options.enabled!==!0}get length(){return this.selectionImpl.length}get cells(){return this.selectionImpl.cells}constructor(t={}){super(),this.name="selection",this.movedMap=new WeakMap,this.unselectMap=new WeakMap,this.options=Object.assign(Object.assign({enabled:!0},ii.defaultOptions),t),jr(this.name,dj)}init(t){this.graph=t,this.selectionImpl=new Ub(Object.assign(Object.assign({},this.options),{graph:t})),this.setup(),this.startListening()}isEnabled(){return!this.disabled}enable(){this.disabled&&(this.options.enabled=!0)}disable(){this.disabled||(this.options.enabled=!1)}toggleEnabled(t){return t!=null?t!==this.isEnabled()&&(t?this.enable():this.disable()):this.isEnabled()?this.disable():this.enable(),this}isMultipleSelection(){return this.isMultiple()}enableMultipleSelection(){return this.enableMultiple(),this}disableMultipleSelection(){return this.disableMultiple(),this}toggleMultipleSelection(t){return t!=null?t!==this.isMultipleSelection()&&(t?this.enableMultipleSelection():this.disableMultipleSelection()):this.isMultipleSelection()?this.disableMultipleSelection():this.enableMultipleSelection(),this}isSelectionMovable(){return this.options.movable!==!1}enableSelectionMovable(){return this.selectionImpl.options.movable=!0,this}disableSelectionMovable(){return this.selectionImpl.options.movable=!1,this}toggleSelectionMovable(t){return t!=null?t!==this.isSelectionMovable()&&(t?this.enableSelectionMovable():this.disableSelectionMovable()):this.isSelectionMovable()?this.disableSelectionMovable():this.enableSelectionMovable(),this}isRubberbandEnabled(){return!this.rubberbandDisabled}enableRubberband(){return this.rubberbandDisabled&&(this.options.rubberband=!0),this}disableRubberband(){return this.rubberbandDisabled||(this.options.rubberband=!1),this}toggleRubberband(t){return t!=null?t!==this.isRubberbandEnabled()&&(t?this.enableRubberband():this.disableRubberband()):this.isRubberbandEnabled()?this.disableRubberband():this.enableRubberband(),this}isStrictRubberband(){return this.selectionImpl.options.strict===!0}enableStrictRubberband(){return this.selectionImpl.options.strict=!0,this}disableStrictRubberband(){return this.selectionImpl.options.strict=!1,this}toggleStrictRubberband(t){return t!=null?t!==this.isStrictRubberband()&&(t?this.enableStrictRubberband():this.disableStrictRubberband()):this.isStrictRubberband()?this.disableStrictRubberband():this.enableStrictRubberband(),this}setRubberbandModifiers(t){this.setModifiers(t)}setSelectionFilter(t){return this.setFilter(t),this}setSelectionDisplayContent(t){return this.setContent(t),this}isEmpty(){return this.length<=0}clean(t={}){return this.selectionImpl.clean(t),this}reset(t,e={}){return this.selectionImpl.reset(t?this.getCells(t):[],e),this}getSelectedCells(){return this.cells}getSelectedCellCount(){return this.length}isSelected(t){return this.selectionImpl.isSelected(t)}select(t,e={}){const s=this.getCells(t);return s.length&&(this.isMultiple()?this.selectionImpl.select(s,e):this.reset(s.slice(0,1),e)),this}unselect(t,e={}){return this.selectionImpl.unselect(this.getCells(t),e),this}setup(){this.selectionImpl.on("*",(t,e)=>{this.trigger(t,e),this.graph.trigger(t,e)})}startListening(){this.graph.on("blank:mousedown",this.onBlankMouseDown,this),this.graph.on("blank:click",this.onBlankClick,this),this.graph.on("cell:mousemove",this.onCellMouseMove,this),this.graph.on("cell:mouseup",this.onCellMouseUp,this),this.selectionImpl.on("box:mousedown",this.onBoxMouseDown,this)}stopListening(){this.graph.off("blank:mousedown",this.onBlankMouseDown,this),this.graph.off("blank:click",this.onBlankClick,this),this.graph.off("cell:mousemove",this.onCellMouseMove,this),this.graph.off("cell:mouseup",this.onCellMouseUp,this),this.selectionImpl.off("box:mousedown",this.onBoxMouseDown,this)}onBlankMouseDown({e:t}){if(!this.allowBlankMouseDown(t))return;const e=this.graph.panning.allowPanning(t,!0),s=this.graph.getPlugin("scroller"),r=s&&s.allowPanning(t,!0);(this.allowRubberband(t,!0)||this.allowRubberband(t)&&!r&&!e)&&this.startRubberband(t)}allowBlankMouseDown(t){const e=this.options.eventTypes;return(e==null?void 0:e.includes("leftMouseDown"))&&t.button===0||(e==null?void 0:e.includes("mouseWheelDown"))&&t.button===1}onBlankClick(){this.clean()}allowRubberband(t,e){return!this.rubberbandDisabled&&ms.isMatch(t,this.options.modifiers,e)}allowMultipleSelection(t){return this.isMultiple()&&ms.isMatch(t,this.options.multipleSelectionModifiers)}onCellMouseMove({cell:t}){this.movedMap.set(t,!0)}onCellMouseUp({e:t,cell:e}){const s=this.options;let r=this.disabled;!r&&this.movedMap.has(e)&&(r=s.selectCellOnMoved===!1,r||(r=s.selectNodeOnMoved===!1&&e.isNode()),r||(r=s.selectEdgeOnMoved===!1&&e.isEdge())),r||(this.allowMultipleSelection(t)?this.unselectMap.has(e)?this.unselectMap.delete(e):this.isSelected(e)?this.unselect(e):this.select(e):this.reset(e)),this.movedMap.delete(e)}onBoxMouseDown({e:t,cell:e}){this.disabled||this.allowMultipleSelection(t)&&(this.unselect(e),this.unselectMap.set(e,!0))}getCells(t){return(Array.isArray(t)?t:[t]).map(e=>typeof e=="string"?this.graph.getCellById(e):e).filter(e=>e!=null)}startRubberband(t){return this.rubberbandDisabled||this.selectionImpl.startSelecting(t),this}isMultiple(){return this.options.multiple!==!1}enableMultiple(){return this.options.multiple=!0,this}disableMultiple(){return this.options.multiple=!1,this}setModifiers(t){return this.options.modifiers=t,this}setContent(t){return this.selectionImpl.setContent(t),this}setFilter(t){return this.selectionImpl.setFilter(t),this}dispose(){this.stopListening(),this.off(),this.selectionImpl.dispose(),$r(this.name)}}fj([Nt.dispose()],ii.prototype,"dispose",null),function(n){n.defaultOptions={rubberband:!1,rubberNode:!0,rubberEdge:!1,pointerEvents:"auto",multiple:!0,multipleSelectionModifiers:["ctrl","meta"],movable:!0,strict:!1,selectCellOnMoved:!1,selectNodeOnMoved:!1,selectEdgeOnMoved:!1,following:!0,content:null,eventTypes:["leftMouseDown","mouseWheelDown"]}}(ii||(ii={})),I.prototype.isHistoryEnabled=function(){const n=this.getPlugin("history");return n?n.isEnabled():!1},I.prototype.enableHistory=function(){const n=this.getPlugin("history");return n&&n.enable(),this},I.prototype.disableHistory=function(){const n=this.getPlugin("history");return n&&n.disable(),this},I.prototype.toggleHistory=function(n){const t=this.getPlugin("history");return t&&t.toggleEnabled(n),this},I.prototype.undo=function(n){const t=this.getPlugin("history");return t&&t.undo(n),this},I.prototype.redo=function(n){const t=this.getPlugin("history");return t&&t.redo(n),this},I.prototype.undoAndCancel=function(n){const t=this.getPlugin("history");return t&&t.cancel(n),this},I.prototype.canUndo=function(){const n=this.getPlugin("history");return n?n.canUndo():!1},I.prototype.canRedo=function(){const n=this.getPlugin("history");return n?n.canRedo():!1},I.prototype.cleanHistory=function(n){const t=this.getPlugin("history");return t&&t.clean(n),this},I.prototype.getHistoryStackSize=function(){return this.getPlugin("history").getSize()},I.prototype.getUndoStackSize=function(){return this.getPlugin("history").getUndoSize()},I.prototype.getRedoStackSize=function(){return this.getPlugin("history").getRedoSize()},I.prototype.getUndoRemainSize=function(){return this.getPlugin("history").getUndoRemainSize()};var Gb=function(n,t,e,s){var r=arguments.length,i=r<3?t:s===null?s=Object.getOwnPropertyDescriptor(t,e):s,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(n,t,e,s);else for(var a=n.length-1;a>=0;a--)(o=n[a])&&(i=(r<3?o(i):r>3?o(t,e,i):o(t,e))||i);return r>3&&i&&Object.defineProperty(t,e,i),i};class oi extends Nt{constructor(t={}){super(),this.name="history",this.batchCommands=null,this.batchLevel=0,this.lastBatchIndex=-1,this.freezed=!1,this.stackSize=0,this.handlers=[];const{stackSize:e=0}=t;this.stackSize=e,this.options=It.getOptions(t),this.validator=new oi.Validator({history:this,cancelInvalid:this.options.cancelInvalid})}init(t){this.graph=t,this.model=this.graph.model,this.clean(),this.startListening()}isEnabled(){return!this.disabled}enable(){this.disabled&&(this.options.enabled=!0)}disable(){this.disabled||(this.options.enabled=!1)}toggleEnabled(t){return t!=null?t!==this.isEnabled()&&(t?this.enable():this.disable()):this.isEnabled()?this.disable():this.enable(),this}undo(t={}){if(!this.disabled){const e=this.undoStack.pop();e&&(this.revertCommand(e,t),this.redoStack.push(e),this.notify("undo",e,t))}return this}redo(t={}){if(!this.disabled){const e=this.redoStack.pop();e&&(this.applyCommand(e,t),this.undoStackPush(e),this.notify("redo",e,t))}return this}cancel(t={}){if(!this.disabled){const e=this.undoStack.pop();e&&(this.revertCommand(e,t),this.redoStack=[],this.notify("cancel",e,t))}return this}getSize(){return this.stackSize}getUndoRemainSize(){const t=this.undoStack.length;return this.stackSize-t}getUndoSize(){return this.undoStack.length}getRedoSize(){return this.redoStack.length}canUndo(){return!this.disabled&&this.undoStack.length>0}canRedo(){return!this.disabled&&this.redoStack.length>0}clean(t={}){return this.undoStack=[],this.redoStack=[],this.notify("clean",null,t),this}get disabled(){return this.options.enabled!==!0}validate(t,...e){return this.validator.validate(t,...e),this}startListening(){this.model.on("batch:start",this.initBatchCommand,this),this.model.on("batch:stop",this.storeBatchCommand,this),this.options.eventNames&&this.options.eventNames.forEach((t,e)=>{this.handlers[e]=this.addCommand.bind(this,t),this.model.on(t,this.handlers[e])}),this.validator.on("invalid",t=>this.trigger("invalid",t))}stopListening(){this.model.off("batch:start",this.initBatchCommand,this),this.model.off("batch:stop",this.storeBatchCommand,this),this.options.eventNames&&(this.options.eventNames.forEach((t,e)=>{this.model.off(t,this.handlers[e])}),this.handlers.length=0),this.validator.off("invalid")}createCommand(t){return{batch:t?t.batch:!1,data:{}}}revertCommand(t,e){this.freezed=!0;const s=Array.isArray(t)?It.sortBatchCommands(t):[t];for(let r=s.length-1;r>=0;r-=1){const i=s[r],o=Object.assign(Object.assign({},e),Mc(i.options,this.options.revertOptionsList||[]));this.executeCommand(i,!0,o)}this.freezed=!1}applyCommand(t,e){this.freezed=!0;const s=Array.isArray(t)?It.sortBatchCommands(t):[t];for(let r=0;r<s.length;r+=1){const i=s[r],o=Object.assign(Object.assign({},e),Mc(i.options,this.options.applyOptionsList||[]));this.executeCommand(i,!1,o)}this.freezed=!1}executeCommand(t,e,s){const r=this.model,i=r.getCell(t.data.id),o=t.event;if(It.isAddEvent(o)&&e||It.isRemoveEvent(o)&&!e)i&&i.remove(s);else if(It.isAddEvent(o)&&!e||It.isRemoveEvent(o)&&e){const a=t.data;a.node?r.addNode(a.props,s):a.edge&&r.addEdge(a.props,s)}else if(It.isChangeEvent(o)){const a=t.data,l=a.key;if(l&&i){const u=e?a.prev[l]:a.next[l];a.key==="attrs"&&this.ensureUndefinedAttrs(u,e?a.next[l]:a.prev[l])&&(s.dirty=!0),i.prop(l,u,s)}}else{const a=this.options.executeCommand;a&&X(a,this,t,e,s)}}addCommand(t,e){if(this.freezed||this.disabled)return;const s=e,r=s.options||{};if(r.dryrun||It.isAddEvent(t)&&this.options.ignoreAdd||It.isRemoveEvent(t)&&this.options.ignoreRemove||It.isChangeEvent(t)&&this.options.ignoreChange)return;const i=this.options.beforeAddCommand;if(i!=null&&X(i,this,t,e)===!1)return;t==="cell:change:*"&&(t=`cell:change:${s.key}`);const o=s.cell,a=Zt.isModel(o);let l;if(this.batchCommands){l=this.batchCommands[Math.max(this.lastBatchIndex,0)];const h=a&&!l.modelChange||l.data.id!==o.id,f=l.event!==t;if(this.lastBatchIndex>=0&&(h||f)){const d=this.batchCommands.findIndex(g=>(a&&g.modelChange||g.data.id===o.id)&&g.event===t);d<0||It.isAddEvent(t)||It.isRemoveEvent(t)?l=this.createCommand({batch:!0}):(l=this.batchCommands[d],this.batchCommands.splice(d,1)),this.batchCommands.push(l),this.lastBatchIndex=this.batchCommands.length-1}}else l=this.createCommand({batch:!1});if(It.isAddEvent(t)||It.isRemoveEvent(t)){const h=l.data;return l.event=t,l.options=r,h.id=o.id,h.props=Tt(o.toJSON()),o.isEdge()?h.edge=!0:o.isNode()&&(h.node=!0),this.push(l,r)}if(It.isChangeEvent(t)){const h=e.key,f=l.data;return(!l.batch||!l.event)&&(l.event=t,l.options=r,f.key=h,f.prev==null&&(f.prev={}),f.prev[h]=Tt(o.previous(h)),a?l.modelChange=!0:f.id=o.id),f.next==null&&(f.next={}),f.next[h]=Tt(o.prop(h)),this.push(l,r)}const u=this.options.afterAddCommand;u&&X(u,this,t,e,l),this.push(l,r)}initBatchCommand(t){this.freezed||(this.batchCommands?this.batchLevel+=1:(this.batchCommands=[this.createCommand({batch:!0})],this.batchLevel=0,this.lastBatchIndex=-1))}storeBatchCommand(t){if(!this.freezed)if(this.batchCommands&&this.batchLevel<=0){const e=this.filterBatchCommand(this.batchCommands);e.length>0&&(this.redoStack=[],this.undoStackPush(e),this.consolidateCommands(),this.notify("add",e,t)),this.batchCommands=null,this.lastBatchIndex=-1,this.batchLevel=0}else this.batchCommands&&this.batchLevel>0&&(this.batchLevel-=1)}filterBatchCommand(t){let e=t.slice();const s=[];for(;e.length>0;){const r=e.shift(),i=r.event,o=r.data.id;if(i!=null&&(o!=null||r.modelChange)){if(It.isAddEvent(i)){const a=e.findIndex(l=>It.isRemoveEvent(l.event)&&l.data.id===o);if(a>=0){e=e.filter((l,u)=>a<u||l.data.id!==o);continue}}else if(It.isRemoveEvent(i)){const a=e.findIndex(l=>It.isAddEvent(l.event)&&l.data.id===o);if(a>=0){e.splice(a,1);continue}}else if(It.isChangeEvent(i)){const a=r.data;if(wn(a.prev,a.next))continue}s.push(r)}}return s}notify(t,e,s){const r=e==null?null:Array.isArray(e)?e:[e];this.emit(t,{cmds:r,options:s}),this.graph.trigger(`history:${t}`,{cmds:r,options:s}),this.emit("change",{cmds:r,options:s}),this.graph.trigger("history:change",{cmds:r,options:s})}push(t,e){this.redoStack=[],t.batch?(this.lastBatchIndex=Math.max(this.lastBatchIndex,0),this.emit("batch",{cmd:t,options:e})):(this.undoStackPush(t),this.consolidateCommands(),this.notify("add",t,e))}consolidateCommands(){var t;const e=this.undoStack[this.undoStack.length-1],s=this.undoStack[this.undoStack.length-2];if(!Array.isArray(e))return;const r=new Set(e.map(o=>o.event));if(r.size!==2||!r.has("cell:change:parent")||!r.has("cell:change:children")||!e.every(o=>{var a;return o.batch&&((a=o.options)===null||a===void 0?void 0:a.ui)})||!Array.isArray(s)||s.length!==1)return;const i=s[0];i.event!=="cell:change:position"||!(!((t=i.options)===null||t===void 0)&&t.ui)||(s.push(...e),this.undoStack.pop())}undoStackPush(t){if(this.stackSize===0){this.undoStack.push(t);return}this.undoStack.length>=this.stackSize&&this.undoStack.shift(),this.undoStack.push(t)}ensureUndefinedAttrs(t,e){let s=!1;return t!==null&&e!==null&&typeof t=="object"&&typeof e=="object"&&Object.keys(e).forEach(r=>{t[r]===void 0&&e[r]!==void 0?(t[r]=void 0,s=!0):typeof t[r]=="object"&&typeof e[r]=="object"&&(s=this.ensureUndefinedAttrs(t[r],e[r]))}),s}dispose(){this.validator.dispose(),this.clean(),this.stopListening(),this.off()}}Gb([Nt.dispose()],oi.prototype,"dispose",null),function(n){class t extends Nt{constructor(s){super(),this.map={},this.command=s.history,this.cancelInvalid=s.cancelInvalid!==!1,this.command.on("add",this.onCommandAdded,this)}onCommandAdded({cmds:s}){return Array.isArray(s)?s.every(r=>this.isValidCommand(r)):this.isValidCommand(s)}isValidCommand(s){if(s.options&&s.options.validation===!1)return!0;const r=s.event&&this.map[s.event]||[];let i=null;return r.forEach(o=>{let a=0;const l=u=>{const h=o[a];a+=1;try{if(h)h(u,s,l);else{i=u;return}}catch(f){l(f)}};l(i)}),i?(this.cancelInvalid&&this.command.cancel(),this.emit("invalid",{err:i}),!1):!0}validate(s,...r){const i=Array.isArray(s)?s:s.split(/\s+/);return r.forEach(o=>{if(typeof o!="function")throw new Error(`${i.join(" ")} requires callback functions.`)}),i.forEach(o=>{this.map[o]==null&&(this.map[o]=[]),this.map[o].push(r)}),this}dispose(){this.command.off("add",this.onCommandAdded,this)}}Gb([Nt.dispose()],t.prototype,"dispose",null),n.Validator=t}(oi||(oi={}));var It;(function(n){function t(o){return o==="cell:added"}n.isAddEvent=t;function e(o){return o==="cell:removed"}n.isRemoveEvent=e;function s(o){return o!=null&&o.startsWith("cell:change:")}n.isChangeEvent=s;function r(o){const a=["cell:added","cell:removed","cell:change:*"],l=["batch:start","batch:stop"],u=o.eventNames?o.eventNames.filter(h=>!(n.isChangeEvent(h)||a.includes(h)||l.includes(h))):a;return Object.assign(Object.assign({enabled:!0},o),{eventNames:u,applyOptionsList:o.applyOptionsList||["propertyPath"],revertOptionsList:o.revertOptionsList||["propertyPath"]})}n.getOptions=r;function i(o){const a=[];for(let l=0,u=o.length;l<u;l+=1){const h=o[l];let f=null;if(n.isAddEvent(h.event)){const d=h.data.id;for(let g=0;g<l;g+=1)if(o[g].data.id===d){f=g;break}}f!==null?a.splice(f,0,h):a.push(h)}return a}n.sortBatchCommands=i})(It||(It={})),I.prototype.toSVG=function(n,t){const e=this.getPlugin("export");e&&e.toSVG(n,t)},I.prototype.toPNG=function(n,t){const e=this.getPlugin("export");e&&e.toPNG(n,t)},I.prototype.toJPEG=function(n,t){const e=this.getPlugin("export");e&&e.toJPEG(n,t)},I.prototype.exportPNG=function(n,t){const e=this.getPlugin("export");e&&e.exportPNG(n,t)},I.prototype.exportJPEG=function(n,t){const e=this.getPlugin("export");e&&e.exportJPEG(n,t)},I.prototype.exportSVG=function(n,t){const e=this.getPlugin("export");e&&e.exportSVG(n,t)};var gj=function(n,t,e,s){var r=arguments.length,i=r<3?t:s===null?s=Object.getOwnPropertyDescriptor(t,e):s,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(n,t,e,s);else for(var a=n.length-1;a>=0;a--)(o=n[a])&&(i=(r<3?o(i):r>3?o(t,e,i):o(t,e))||i);return r>3&&i&&Object.defineProperty(t,e,i),i};class Yb extends Nt{constructor(){super(),this.name="export"}get view(){return this.graph.view}init(t){this.graph=t}exportPNG(t="chart",e={}){this.toPNG(s=>{Ws.downloadDataUri(s,t)},e)}exportJPEG(t="chart",e={}){this.toPNG(s=>{Ws.downloadDataUri(s,t)},e)}exportSVG(t="chart",e={}){this.toSVG(s=>{Ws.downloadDataUri(Ws.svgToDataUrl(s),t)},e)}toSVG(t,e={}){this.notify("before:export",e);const s=this.view.svg,r=tt.create(s).clone();let i=r.node;const o=r.findOne(`.${this.view.prefixClassName("graph-svg-stage")}`),a=e.viewBox||this.graph.graphToLocal(this.graph.getContentBBox()),l=e.preserveDimensions;if(l){const f=typeof l=="boolean"?a:l;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"),e.copyStyles!==!1){const f=s.ownerDocument,d=Array.from(s.querySelectorAll("*")),g=Array.from(i.querySelectorAll("*")),p=f.styleSheets.length,m=[];for(let w=p-1;w>=0;w-=1)m[w]=f.styleSheets[w],f.styleSheets[w].disabled=!0;const y={};d.forEach((w,x)=>{const v=window.getComputedStyle(w,null),S={};Object.keys(v).forEach(E=>{S[E]=v.getPropertyValue(E)}),y[x]=S}),p!==f.styleSheets.length&&m.forEach((w,x)=>{f.styleSheets[x]=w});for(let w=0;w<p;w+=1)f.styleSheets[w].disabled=!1;const b={};d.forEach((w,x)=>{const v=window.getComputedStyle(w,null),S=y[x],E={};Object.keys(v).forEach(C=>{!Oc(C)&&v.getPropertyValue(C)!==S[C]&&(E[C]=v.getPropertyValue(C))}),b[x]=E}),g.forEach((w,x)=>{qt(w,b[x])})}const u=e.stylesheet;if(typeof u=="string"){const f=s.ownerDocument.implementation.createDocument(null,"xml",null).createCDATASection(u);r.prepend(tt.create("style",{type:"text/css"},[f]))}const h=()=>{const f=e.beforeSerialize;if(typeof f=="function"){const g=X(f,this.graph,i);g instanceof SVGSVGElement&&(i=g)}const d=new XMLSerializer().serializeToString(i).replace(/ /g," ");this.notify("after:export",e),t(d)};if(e.serializeImages){const f=r.find("image").map(d=>new Promise(g=>{const p=d.attr("xlink:href")||d.attr("href");Ws.imageToDataUri(p,(m,y)=>{!m&&y&&d.attr("xlink:href",y),g()})}));Promise.all(f).then(h)}else h()}toDataURL(t,e){let s=e.viewBox||this.graph.getContentBBox();const r=ds(e.padding);e.width&&e.height&&(r.left+r.right>=e.width&&(r.left=r.right=0),r.top+r.bottom>=e.height&&(r.top=r.bottom=0));const i=new z(-r.left,-r.top,r.left+r.right,r.top+r.bottom);if(e.width&&e.height){const h=s.width+r.left+r.right,f=s.height+r.top+r.bottom;i.scale(h/e.width,f/e.height)}s=z.create(s).moveAndExpand(i);const o=typeof e.width=="number"&&typeof e.height=="number"?{width:e.width,height:e.height}:s;let a=e.ratio?parseFloat(e.ratio):1;(!Number.isFinite(a)||a===0)&&(a=1);const l={width:Math.max(Math.round(o.width*a),1),height:Math.max(Math.round(o.height*a),1)};{const h=document.createElement("canvas"),f=h.getContext("2d");h.width=l.width,h.height=l.height;const d=l.width-1,g=l.height-1;f.fillStyle="rgb(1,1,1)",f.fillRect(d,g,1,1);const p=f.getImageData(d,g,1,1).data;if(p[0]!==1||p[1]!==1||p[2]!==1)throw new Error("size exceeded")}const u=new Image;u.onload=()=>{const h=document.createElement("canvas");h.width=l.width,h.height=l.height;const f=h.getContext("2d");f.fillStyle=e.backgroundColor||"white",f.fillRect(0,0,l.width,l.height);try{f.drawImage(u,0,0,l.width,l.height);const d=h.toDataURL(e.type,e.quality);t(d)}catch{}},this.toSVG(h=>{u.src=`data:image/svg+xml,${encodeURIComponent(h)}`},Object.assign(Object.assign({},e),{viewBox:s,serializeImages:!0,preserveDimensions:Object.assign({},l)}))}toPNG(t,e={}){this.toDataURL(t,Object.assign(Object.assign({},e),{type:"image/png"}))}toJPEG(t,e={}){this.toDataURL(t,Object.assign(Object.assign({},e),{type:"image/jpeg"}))}notify(t,e){this.trigger(t,e),this.graph.trigger(t,e)}dispose(){this.off()}}gj([Nt.dispose()],Yb.prototype,"dispose",null);const pj={class:"control-box"},mj=Gn({__name:"index",props:{payload:Object},setup(n){const t=n,e=c.ref("3"),s=c.ref([]),r=()=>{s.value=JSON.parse(JSON.stringify(t.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=za;u.attrs.text.text=`${t.payload.getPorts().length+1}`,u.args.x="50%",u.args.y="50%",t.payload.addPorts([{group:"ports",...u}]),r()},o=()=>{Wi("#drawing-board",!0)},a=(u,h,f)=>{t.payload.portProp(u,"args/"+h,f+"%"),r()},l=u=>{t.payload.removePort(u),r()};return c.onMounted(()=>{r()}),(u,h)=>{const f=c.resolveComponent("el-button"),d=c.resolveComponent("el-table-column"),g=c.resolveComponent("el-slider"),p=c.resolveComponent("el-icon"),m=c.resolveComponent("el-table"),y=c.resolveComponent("el-collapse-item"),b=c.resolveComponent("el-collapse");return c.openBlock(),c.createElementBlock("div",pj,[c.createVNode(b,{modelValue:e.value,"onUpdate:modelValue":h[0]||(h[0]=w=>e.value=w),accordion:""},{default:c.withCtx(()=>[c.createVNode(y,{title:"连接桩设置",name:"3"},{default:c.withCtx(()=>[c.createVNode(f,{type:"primary",onClick:i,size:"small"},{default:c.withCtx(()=>h[1]||(h[1]=[c.createTextVNode("添加连接桩")])),_:1}),c.createVNode(f,{type:"primary",onClick:o,size:"small"},{default:c.withCtx(()=>h[2]||(h[2]=[c.createTextVNode("显示连接桩")])),_:1}),c.createVNode(m,{data:s.value,border:"",size:"small",style:{"margin-top":"10px"}},{default:c.withCtx(()=>[c.createVNode(d,{label:"ID",width:"50",align:"center"},{default:c.withCtx(({row:w})=>[c.createTextVNode(c.toDisplayString(w.attrs.text.text),1)]),_:1}),c.createVNode(d,{label:"x",width:"100",align:"center"},{default:c.withCtx(({row:w})=>[c.createVNode(g,{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}),c.createVNode(d,{label:"y",width:"100",align:"center"},{default:c.withCtx(({row:w})=>[c.createVNode(g,{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}),c.createVNode(d,{label:"操作",width:"70",align:"center"},{default:c.withCtx(({row:w})=>[c.createVNode(f,{type:"danger",size:"small",onClick:x=>l(w.id)},{default:c.withCtx(()=>[c.createVNode(p,null,{default:c.withCtx(()=>[c.createVNode(c.unref(xg))]),_:1})]),_:2},1032,["onClick"])]),_:1})]),_:1},8,["data"])]),_:1})]),_:1},8,["modelValue"])])}}},[["__scopeId","data-v-b280098c"]]),yl=[{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"}}],Wb={groups:{ports:{position:"absolute",args:{x:0,y:0},attrs:{circle:{magnet:!0,stroke:"#8f8f8f",r:4}},label:{position:"top"}}}},dh=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 t=n,e=c.ref([]),s=c.ref(),r=()=>{const y=document.getElementById("preview-container");s.value=new I({container:y,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}}),s.value.on("blank:dblclick",()=>{h()})},i=async()=>{let y,b,w;if(t.id){const{background:x,grid:v,data:S}=await _m(t.id);y=x,b={},w=S}else y=t.background,b={},w=t.data;s.value.drawBackground(y),s.value.drawGrid(b),s.value.fromJSON(w),l()},o=c.ref(null),a=c.ref([]),l=()=>{a.value=f();const y=/\$\{(.*?)\}/g;a.value.forEach(b=>{if(!b.data||!b.data.field)return;const w=b.data.content.match(y);e.value.push(...b.data.field),w&&(b.matches=w)}),a&&h()},u=c.ref(!0),h=async()=>{if(!e.value.length)return;if(!u.value){Bt.warning("数据正在更新中,请稍后再试");return}o.value&&clearInterval(o.value),u.value=!1;const y=await RD(e.value);if(u.value=!0,!Array.isArray(y)||!y.length)return;let b=0;a.value.forEach((w,x)=>{if(!w.data||!w.data.field)return;if(w.matches){const S=x===0?0:b||0,E=b=S+w.data.field.length;w.label=d(w.data.content,y.slice(S,E))}}),o.value=setTimeout(()=>{h()},1e4)},f=()=>s.value.getNodes().filter(b=>{var w;return((w=b.data)==null?void 0:w.type)==="text"}),d=(y,b)=>{let w=0;return y.replace(/\$\{.*?\}/g,()=>w<b.length?b[w++]:"--")},g=()=>{s.value.zoomToFit({maxScale:1,padding:20})},p=c.shallowRef(),m=()=>{new ResizeObserver(()=>{g()}).observe(p.value)};return c.onMounted(()=>{r(),i(),setTimeout(()=>{Wi("#preview-container",!1),g()},100),m()}),c.onUnmounted(()=>{clearInterval(o.value)}),(y,b)=>(c.openBlock(),c.createElementBlock("div",{id:"preview-container",ref_key:"previewRef",ref:p,onDblclick:g},null,544))}}),yj={class:"form-container"},bj={class:"footer"},wj=Gn({__name:"group-form",props:{payload:{type:Object,default:()=>({})}},emits:["close"],setup(n,{emit:t}){const e=n,s=t,r=c.reactive({groupName:"",sort:1,isShow:1}),i=c.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=c.ref(),a=()=>{console.log(r),o.value.validate(u=>{if(u)r.id?$a("/cny/custom/updateGroup",r).then(h=>{h!=null&&h.isOk?(Bt.success("保存成功"),s("close",!0)):Bt.error((h==null?void 0:h.msg)||"保存失败")}):$a("/cny/custom/saveGroup",r).then(h=>{h!=null&&h.isOk?(Bt.success("保存成功"),s("close",!0)):Bt.error((h==null?void 0:h.msg)||"保存失败")});else return!1})},l=()=>{s("close",!1)};return c.onMounted(()=>{var u;(u=e.payload)!=null&&u.id&&(r.id=e.payload.id,r.groupName=e.payload.groupName,r.sort=e.payload.sort,r.isShow=e.payload.isShow)}),(u,h)=>{const f=c.resolveComponent("el-input"),d=c.resolveComponent("el-form-item"),g=c.resolveComponent("el-input-number"),p=c.resolveComponent("el-switch"),m=c.resolveComponent("el-button"),y=c.resolveComponent("el-form");return c.openBlock(),c.createElementBlock("div",yj,[c.createVNode(y,{ref_key:"form",ref:o,model:r,rules:i,"label-width":"90px","label-suffix":":"},{default:c.withCtx(()=>[c.createVNode(d,{label:"分组名称",prop:"groupName"},{default:c.withCtx(()=>[c.createVNode(f,{modelValue:r.groupName,"onUpdate:modelValue":h[0]||(h[0]=b=>r.groupName=b),placeholder:"请输入分组名称",clearable:""},null,8,["modelValue"])]),_:1}),c.createVNode(d,{label:"排序",prop:"sort"},{default:c.withCtx(()=>[c.createVNode(g,{modelValue:r.sort,"onUpdate:modelValue":h[1]||(h[1]=b=>r.sort=b),min:0,max:999,step:1,"controls-position":"right"},null,8,["modelValue"])]),_:1}),c.createVNode(d,{label:"是否显示",prop:"isShow"},{default:c.withCtx(()=>[c.createVNode(p,{modelValue:r.isShow,"onUpdate:modelValue":h[2]||(h[2]=b=>r.isShow=b),"active-value":1,"inactive-value":0,"active-color":"#13ce66","inactive-color":"#ff4949"},null,8,["modelValue"])]),_:1}),c.createElementVNode("div",bj,[c.createVNode(m,{type:"primary",onClick:a},{default:c.withCtx(()=>h[3]||(h[3]=[c.createTextVNode("保存")])),_:1}),c.createVNode(m,{onClick:l},{default:c.withCtx(()=>h[4]||(h[4]=[c.createTextVNode("取消")])),_:1})])]),_:1},8,["model","rules"])])}}},[["__scopeId","data-v-a2a7ce25"]]),xj={class:"form-container"},vj={class:"footer"},Cj=Gn({__name:"image-form",props:{payload:{type:Object,default:()=>({})}},emits:["close"],setup(n,{emit:t}){const e=t,s=n,r=c.shallowRef(null),i=c.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=c.ref(""),l=f=>{if(f.raw.type.indexOf("image")===-1){Bt.error("请上传图片格式的文件");return}const d=new FormData;d.append("file",f.raw),DD("/cny/file/fileUpload",d).then(g=>{g!=null&&g.isOk?(a.value=hs.defaults.baseURL+"/cny/upload/"+(g==null?void 0:g.data),i.imageUrl=g==null?void 0:g.data):Bt.error((g==null?void 0:g.msg)||"上传失败")})},u=()=>{console.log(i),r.value.validate(f=>{if(f)$a("/cny/custom/savePicture",i).then(d=>{d!=null&&d.isOk?(Bt.success("保存成功"),e("close",!0)):Bt.error((d==null?void 0:d.msg)||"保存失败")});else return!1})},h=()=>{e("close",!1)};return c.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=s.payload.imageUrl,a.value=i.imageUrl),i.groupId=s.payload.groupId}),(f,d)=>{const g=c.resolveComponent("el-input"),p=c.resolveComponent("el-form-item"),m=c.resolveComponent("el-input-number"),y=c.resolveComponent("el-switch"),b=c.resolveComponent("el-image"),w=c.resolveComponent("el-icon"),x=c.resolveComponent("el-upload"),v=c.resolveComponent("el-button"),S=c.resolveComponent("el-form");return c.openBlock(),c.createElementBlock("div",xj,[c.createVNode(S,{ref_key:"form",ref:r,model:i,rules:o,"label-width":"90px","label-suffix":":"},{default:c.withCtx(()=>[c.createVNode(p,{label:"图片名称",prop:"imageName"},{default:c.withCtx(()=>[c.createVNode(g,{modelValue:i.imageName,"onUpdate:modelValue":d[0]||(d[0]=E=>i.imageName=E),placeholder:"请输入图片名称"},null,8,["modelValue"])]),_:1}),c.createVNode(p,{label:"排序",prop:"sort"},{default:c.withCtx(()=>[c.createVNode(m,{modelValue:i.sort,"onUpdate:modelValue":d[1]||(d[1]=E=>i.sort=E),min:0,max:999,step:1,"controls-position":"right"},null,8,["modelValue"])]),_:1}),c.createVNode(p,{label:"是否显示",prop:"isShow"},{default:c.withCtx(()=>[c.createVNode(y,{modelValue:i.isShow,"onUpdate:modelValue":d[2]||(d[2]=E=>i.isShow=E),"active-value":1,"inactive-value":0,"active-color":"#13ce66","inactive-color":"#ff4949"},null,8,["modelValue"])]),_:1}),c.createVNode(p,{label:"上传",prop:"image"},{default:c.withCtx(()=>[c.createVNode(x,{action:"","list-type":"picture",class:"avatar-uploader","show-file-list":!1,"on-change":l,"auto-upload":!1},{default:c.withCtx(()=>[a.value?(c.openBlock(),c.createBlock(b,{key:0,src:a.value,fit:"cover",style:{width:"64px",height:"64px"}},null,8,["src"])):(c.openBlock(),c.createBlock(w,{key:1,class:"avatar-uploader-icon"},{default:c.withCtx(()=>[c.createVNode(c.unref(Z2))]),_:1}))]),_:1})]),_:1}),c.createElementVNode("div",vj,[c.createVNode(v,{type:"primary",onClick:u},{default:c.withCtx(()=>d[3]||(d[3]=[c.createTextVNode("保存")])),_:1}),c.createVNode(v,{onClick:h},{default:c.withCtx(()=>d[4]||(d[4]=[c.createTextVNode("取消")])),_:1})])]),_:1},8,["model"])])}}},[["__scopeId","data-v-c7d87a18"]]),Sj={class:"form-container"},Ej={style:{padding:"0 10px",display:"flex","flex-direction":"column",gap:"5px","align-items":"flex-start"}},Oj=["src"],Mj=Gn({__name:"image-management",setup(n){const t=c.reactive({items:[]}),e=()=>{Yi("/cny/custom/groupList").then(d=>{t.items=d.data})},s=c.reactive({show:!1,title:"新增图片分组",payload:null}),r=()=>{s.show=!0,s.title="新增图片分组",s.payload=null},i=d=>{s.show=!0,s.title="编辑图片分组",s.payload={id:d.id,groupName:d.groupName,sort:d.sort,isShow:d.isShow}},o=d=>{iu.confirm("是否确定要删除该图片分组?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(()=>{Nm("/cny/custom/removeGroup/"+d).then(g=>{g.code===200?(Bt.success("删除成功"),e()):Bt.error(g.msg||"删除失败")})})},a=c.reactive({show:!1,title:"新增图片",payload:null}),l=d=>{a.show=!0,a.title="新增图片",a.payload={groupId:d}},u=d=>{a.show=!0,a.title="编辑图片",a.payload={id:d.id,groupId:d.groupId,imageName:d.imageName,sort:d.sort,isShow:d.isShow,imageUrl:d.imageUrl}},h=d=>{iu.confirm("是否确定要删除该图片?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(()=>{Nm("/cny/custom/removePicture/"+d).then(g=>{g.code===200?(Bt.success("删除成功"),e()):Bt.error(g.msg||"删除失败")})})},f=d=>{s.show=!1,a.show=!1,d&&e()};return c.onMounted(()=>{e()}),(d,g)=>{const p=c.resolveComponent("el-button"),m=c.resolveComponent("el-table-column"),y=c.resolveComponent("el-table"),b=c.resolveComponent("el-dialog");return c.openBlock(),c.createElementBlock("div",Sj,[c.createVNode(p,{type:"primary",onClick:r,size:"small"},{default:c.withCtx(()=>g[2]||(g[2]=[c.createTextVNode("新增图片分组")])),_:1}),c.createVNode(y,{data:t.items,border:"",height:"500"},{default:c.withCtx(()=>[c.createVNode(m,{type:"expand"},{default:c.withCtx(w=>[c.createElementVNode("div",Ej,[c.createVNode(p,{type:"primary",size:"small",onClick:x=>l(w.row.id)},{default:c.withCtx(()=>g[3]||(g[3]=[c.createTextVNode("新增图片")])),_:2},1032,["onClick"]),c.createVNode(y,{data:w.row.pictureList,border:"",size:"small"},{default:c.withCtx(()=>[c.createVNode(m,{label:"名称",prop:"imageName",align:"center"}),c.createVNode(m,{label:"图片",prop:"imageUrl",align:"center"},{default:c.withCtx(x=>[c.createElementVNode("img",{src:x.row.imageUrl,alt:"",style:{width:"64px",height:"64px"}},null,8,Oj)]),_:1}),c.createVNode(m,{label:"排序",prop:"sort",align:"center"}),c.createVNode(m,{label:"是否显示",prop:"isShow",align:"center"},{default:c.withCtx(x=>[c.createTextVNode(c.toDisplayString(x.row.isShow===1?"是":"否"),1)]),_:1}),c.createVNode(m,{label:"操作",align:"center"},{default:c.withCtx(x=>[c.createVNode(p,{type:"primary",size:"small",onClick:v=>u(x.row)},{default:c.withCtx(()=>g[4]||(g[4]=[c.createTextVNode("编辑")])),_:2},1032,["onClick"]),c.createVNode(p,{type:"danger",size:"small",onClick:v=>h(x.row.id)},{default:c.withCtx(()=>g[5]||(g[5]=[c.createTextVNode("删除")])),_:2},1032,["onClick"])]),_:1})]),_:2},1032,["data"])])]),_:1}),c.createVNode(m,{label:"分组名称",prop:"groupName",align:"center"}),c.createVNode(m,{label:"排序",prop:"sort",align:"center"}),c.createVNode(m,{label:"是否显示",prop:"isShow",align:"center"},{default:c.withCtx(w=>[c.createTextVNode(c.toDisplayString(w.row.isShow===1?"是":"否"),1)]),_:1}),c.createVNode(m,{label:"操作",align:"center"},{default:c.withCtx(w=>[c.createVNode(p,{type:"primary",size:"small",onClick:x=>i(w.row)},{default:c.withCtx(()=>g[6]||(g[6]=[c.createTextVNode("编辑")])),_:2},1032,["onClick"]),c.createVNode(p,{type:"danger",size:"small",onClick:x=>o(w.row.id)},{default:c.withCtx(()=>g[7]||(g[7]=[c.createTextVNode("删除")])),_:2},1032,["onClick"])]),_:1})]),_:1},8,["data"]),c.createVNode(b,{modelValue:s.show,"onUpdate:modelValue":g[0]||(g[0]=w=>s.show=w),title:s.title,width:"300","close-on-click-modal":!1,"close-on-press-escape":!1},{default:c.withCtx(()=>[s.show?(c.openBlock(),c.createBlock(wj,{key:0,payload:s.payload,onClose:f},null,8,["payload"])):c.createCommentVNode("",!0)]),_:1},8,["modelValue","title"]),c.createVNode(b,{modelValue:a.show,"onUpdate:modelValue":g[1]||(g[1]=w=>a.show=w),title:a.title,width:"300","close-on-click-modal":!1,"close-on-press-escape":!1},{default:c.withCtx(()=>[a.show?(c.openBlock(),c.createBlock(Cj,{key:0,payload:a.payload,onClose:f},null,8,["payload"])):c.createCommentVNode("",!0)]),_:1},8,["modelValue","title"])])}}},[["__scopeId","data-v-9338a78d"]]),Pj={class:"page-container"},Aj={class:"tool-bar"},Tj={class:"action"},Nj={class:"el-dropdown-link"},_j={class:"action",style:{"margin-right":"50px"}},kj={class:"board"},Dj={class:"drawing-board-box"},Rj={id:"controls"},Ij={key:0,class:"controls-label"},Lj={style:{width:"100%",height:"100%",background:"black"}},qb=Gn(Object.assign({name:"editor"},{__name:"index",props:{id:{type:String,default:""}},emits:["getJson"],setup(n,{emit:t}){const e=n,s=c.ref(),r=c.reactive({label:null,component:c.shallowRef(null)}),i=c.ref(null),o=c.ref(null),a=()=>{const D=document.getElementById("drawing-board");window.__x6_instances__=[],s.value=new I({container:D,autoResize:!0,panning:!0,mousewheel:!0,connecting:{router:"orth",connectionPoint:{name:"anchor"},anchor:"center",createEdge(){return s.value.createEdge({inherit:"edge",attrs:{...Cu},zIndex:0})}}}),window.__x6_instances__.push(s.value),s.value.use(new er({resizing:{enabled:!0,preserveAspectRatio:!1},rotating:!0})),s.value.use(new Hb),s.value.use(new $b),s.value.use(new zb({format(N){return N.replace(/\s/g,"").replace("cmd","command")}})),s.value.use(new oi),s.value.use(new ii({enabled:!0,multiple:!0,rubberband:!0,modifiers:["alt"],showNodeSelectionBox:!0})),s.value.bindKey(["delete","backspace"],()=>{const N=s.value.getSelectedCells();return N.length&&s.value.removeCells(N),!1}),s.value.bindKey(["ctrl+c","cmd + c"],()=>{const N=s.value.getSelectedCells();return N.length&&(s.value.copy(N),Bt.success("复制成功")),!1}),s.value.bindKey(["ctrl+v","cmd + v"],()=>{if(!s.value.isClipboardEmpty()){const N=s.value.paste({offset:32});s.value.cleanSelection(),s.value.select(N),Bt.success("粘贴成功")}return!1}),s.value.bindKey(["ctrl+z","cmd + z"],()=>(s.value.canUndo()&&s.value.undo(),!1)),s.value.bindKey(["ctrl+y","cmd + y"],()=>(s.value.canRedo()&&s.value.redo(),!1)),s.value.on("blank:click",({e:N,x:V,y:A})=>{o.value=s,r.component=jD,r.label="画布属性",i.value=G().valueOf()}),s.value.on("cell:click",({cell:N})=>{var V,A,P;if(console.log("cell:click",N,((V=N==null?void 0:N.data)==null?void 0:V.type)??(N==null?void 0:N.shape)),o.value=N,i.value=G().valueOf(),((A=N.data)==null?void 0:A.type)==="text"){r.component=Rm,r.label="文本属性";return}if(((P=N.data)==null?void 0:P.type)==="base-shape"){r.component=Rm,r.label="基础图形属性";return}if((N==null?void 0:N.shape)==="edge"){r.component=WD,r.label="连线属性";return}if((N==null?void 0:N.shape)==="image"){r.component=mj,r.label="图片属性";return}r.component=null,r.label=null}),s.value.on("edge:mouseenter",({cell:N})=>{N.addTools([{name:"vertices",args:{snapRadius:3,attrs:{r:3,fill:"#239edd",cursor:"move","stroke-width":0},modifiers:["alt"]}}])}),s.value.on("edge:mouseleave",({cell:N})=>{N.removeTools()}),s.value.on("node:mouseenter",()=>{Wi("#drawing-board",!0)}),s.value.on("node:mouseleave",()=>{Wi("#drawing-board",!1)}),s.value.use(new Yb)},l=c.ref(),u=()=>{l.value=new si({target:s.value,...ID,groups:[{name:"基础组件",graphPadding:30}],search(V,A){var P;return((P=V.label)==null?void 0:P.indexOf(A))!==-1},placeholder:"搜索",notFoundText:"未找到匹配项",getDragNode:V=>{const A=V.clone({keepId:!0});return A.label!=="文本"&&(A.label=""),A},getDropNode:V=>V.clone({keepId:!0})});const D=s.value.createNode({...LD}),N=yl.map(V=>(V.ports=Wb,s.value.createNode(V)));l.value.load([D,...N],"基础组件"),Yi("/cny/custom/groupList").then(V=>{const A=(V==null?void 0:V.data)||[];A==null||A.forEach(P=>{l.value.addGroup({name:P==null?void 0:P.groupName,graphPadding:30});const L=P==null?void 0:P.pictureList.map(j=>{const Y={shape:"image",imageUrl:j==null?void 0:j.imageUrl,ports:Wb,width:64,height:64,label:j.imageName};return s.value.createNode(Y)});l.value.load(L,P==null?void 0:P.groupName),document.getElementById("stencil").appendChild(l.value.container)})}).finally(()=>{setTimeout(()=>{l.value.container.querySelectorAll(".x6-node").forEach((A,P)=>{if(P>yl.length){const L=A.querySelector("text");A.style.position="relative",L&&(L.style.display="none",L.setAttribute("x","0%"),L.setAttribute("y","30%"),L.style.fontSize="12px",L.style.fontWeight="bold",L.style.fill="#ffffff")}A.addEventListener("mouseenter",L=>{if(P>yl.length){const j=A.querySelector("text");j&&(j.style.display="block")}}),A.addEventListener("mouseleave",L=>{if(P>yl.length){const j=A.querySelector("text");j&&(j.style.display="none")}})})},20)})},h=D=>{switch(D){case"snapLine":s.value.isSnaplineEnabled()?(s.value.disableSnapline(),Bt.warning("关闭对齐线")):(s.value.enableSnapline(),Bt.success("开启对齐线"));break;case"select":s.value.isSelectionEnabled()?(s.value.disableSelection(),Bt.warning("关闭框选")):(s.value.enableSelection(),Bt.success("开启框选"));break;case"drawLine":g();break;case"adaptive":p();break;case"shortcuts":y();break;case"image":w();break;case"clear":x();break;case"export":v();break}},f=c.ref(!1),d=c.ref(null),g=()=>{f.value=!0;const D=new Date;s.value.startBatch(D),s.value.disablePanning(),s.value.once("blank:mousedown",({e:N,x:V,y:A})=>{f.value&&(d.value=s.value.addEdge({source:{x:V,y:A},target:{x:V,y:A},attrs:Cu,data:{type:"edge",isConnector:!1},zIndex:0}))}),s.value.on("blank:mousemove",({e:N,x:V,y:A})=>{f.value&&d.value.setTarget({x:V,y:A})}),s.value.on("blank:mouseup",({e:N,x:V,y:A})=>{f.value=!1,s.value.enablePanning(),s.value.stopBatch(D)})},p=()=>{s.value.zoomToFit({maxScale:1,padding:20})},m=c.reactive({show:!1}),y=()=>{m.show=!0},b=c.reactive({show:!1}),w=()=>{b.show=!0},x=()=>{s.value.clearCells(),s.value.drawBackground(km),s.value.drawGrid(Dm),Bt.success("清空成功")},v=()=>{const D=G().format("YYYYMMDDHHmmss");s.value.exportPNG(D,{padding:10,quality:1,backgroundColor:s.value.options.background.color})},S=t,E=c.reactive({show:!1,background:null,grid:null,data:null}),C=()=>{E.background=s.value.options.background,E.grid=s.value.options.grid,E.data=s.value.toJSON(),E.show=!0},M=()=>{S("getJson",{background:s.value.options.background,grid:s.value.options.grid,data:s.value.toJSON()})},T=async()=>{if(!e.id){s.value.drawBackground(km),s.value.drawGrid(Dm),s.value.fromJSON({cells:[]});return}const{background:D,grid:N,data:V}=await _m(e.id);s.value.drawBackground(D),s.value.drawGrid(N),s.value.fromJSON(V),p()},k=c.shallowRef(null),_=()=>{new ResizeObserver(()=>{p()}).observe(k.value)};return c.onMounted(()=>{a(),u(),T(),_()}),(D,N)=>{const V=c.resolveComponent("el-icon"),A=c.resolveComponent("el-button"),P=c.resolveComponent("el-dropdown-item"),L=c.resolveComponent("el-dropdown-menu"),j=c.resolveComponent("el-dropdown"),Y=c.resolveComponent("el-scrollbar"),ot=c.resolveComponent("el-dialog"),F=c.resolveComponent("el-drawer");return c.openBlock(),c.createElementBlock("div",Pj,[c.createElementVNode("div",Aj,[c.createElementVNode("div",Tj,[c.createVNode(j,{onCommand:h},{dropdown:c.withCtx(()=>[c.createVNode(L,null,{default:c.withCtx(()=>[c.createVNode(P,{command:"snapLine"},{default:c.withCtx(()=>N[4]||(N[4]=[c.createTextVNode("对齐线")])),_:1}),c.createVNode(P,{command:"select"},{default:c.withCtx(()=>N[5]||(N[5]=[c.createTextVNode("框选")])),_:1}),c.createVNode(P,{command:"drawLine"},{default:c.withCtx(()=>N[6]||(N[6]=[c.createTextVNode("绘制直线")])),_:1}),c.createVNode(P,{command:"adaptive"},{default:c.withCtx(()=>N[7]||(N[7]=[c.createTextVNode("视图自适应")])),_:1}),c.createVNode(P,{command:"shortcuts"},{default:c.withCtx(()=>N[8]||(N[8]=[c.createTextVNode("查看快捷键")])),_:1}),c.createVNode(P,{command:"image"},{default:c.withCtx(()=>N[9]||(N[9]=[c.createTextVNode("图片管理")])),_:1}),c.createVNode(P,{command:"clear"},{default:c.withCtx(()=>N[10]||(N[10]=[c.createTextVNode("清空画布")])),_:1}),c.createVNode(P,{command:"export"},{default:c.withCtx(()=>N[11]||(N[11]=[c.createTextVNode("导出成图片")])),_:1})]),_:1})]),default:c.withCtx(()=>[c.createElementVNode("span",Nj,[c.createVNode(A,{size:"small",text:""},{default:c.withCtx(()=>[N[3]||(N[3]=c.createTextVNode("工具 ")),c.createVNode(V,null,{default:c.withCtx(()=>[c.createVNode(c.unref(B2))]),_:1})]),_:1})])]),_:1})]),c.createElementVNode("div",_j,[c.createVNode(c.unref(Ip),{content:"预览",placement:"bottom"},{default:c.withCtx(()=>[c.createVNode(A,{size:"small",icon:c.unref(Sg),onClick:C},null,8,["icon"])]),_:1}),c.createVNode(c.unref(Ip),{content:"保存",placement:"bottom"},{default:c.withCtx(()=>[c.createVNode(A,{size:"small",icon:c.unref(Y2),onClick:M},null,8,["icon"])]),_:1})])]),c.createElementVNode("div",kj,[N[12]||(N[12]=c.createElementVNode("div",{id:"stencil"},null,-1)),c.createElementVNode("div",Dj,[c.createElementVNode("div",{id:"drawing-board",ref_key:"drawBoard",ref:k},null,512)]),c.createElementVNode("div",Rj,[r.label?(c.openBlock(),c.createElementBlock("div",Ij,c.toDisplayString(r.label),1)):c.createCommentVNode("",!0),c.createVNode(Y,null,{default:c.withCtx(()=>[(c.openBlock(),c.createBlock(c.resolveDynamicComponent(r.component),{graph:s.value,payload:o.value,key:i.value},null,8,["graph","payload"]))]),_:1})])]),c.createVNode(ot,{modelValue:m.show,"onUpdate:modelValue":N[0]||(N[0]=H=>m.show=H),width:"400px",title:"快捷键","close-on-click-modal":!1,"close-on-press-escape":!1},{default:c.withCtx(()=>[c.createVNode(JD)]),_:1},8,["modelValue"]),c.createVNode(ot,{modelValue:b.show,"onUpdate:modelValue":N[1]||(N[1]=H=>b.show=H),width:"800px",title:"图片管理","close-on-click-modal":!1,"close-on-press-escape":!1},{default:c.withCtx(()=>[c.createVNode(Mj)]),_:1},8,["modelValue"]),c.createVNode(F,{class:"no-border-drawer",modelValue:E.show,"onUpdate:modelValue":N[2]||(N[2]=H=>E.show=H),title:"预览",direction:"ttb",size:"100%"},{default:c.withCtx(()=>[c.createElementVNode("div",Lj,[E.show?(c.openBlock(),c.createBlock(dh,{key:0,background:E.background,grid:E.grid,data:E.data},null,8,["background","grid","data"])):c.createCommentVNode("",!0)])]),_:1},8,["modelValue"])])}}}),[["__scopeId","data-v-74192f25"]]),Bj=[qb,dh],Jb=(n,t)=>{Bj.forEach(e=>{n.component(e.name,e)})};typeof window<"u"&&window.Vue&&Jb(window.Vue);const Vj={install:Jb};Rt.WiringDiagramEditor=qb,Rt.WiringDiagramPreview=dh,Rt.default=Vj,Rt.setBaseURL=_D,Rt.setToken=kD,Object.defineProperties(Rt,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|