@highstate/designer 0.9.34 → 0.9.35

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.
Files changed (35) hide show
  1. package/.output/nitro.json +1 -1
  2. package/.output/public/_nuxt/3e_JDR0d.js +2 -0
  3. package/.output/public/_nuxt/{B-tzHMOR.js → B-Cq1MKr.js} +1 -1
  4. package/.output/public/_nuxt/{CGIsbOqt.js → B19ncWn1.js} +1 -1
  5. package/.output/public/_nuxt/{FQpR5TAR.js → BRwnrBzN.js} +1 -1
  6. package/.output/public/_nuxt/{yCy9iX43.js → BcautuHn.js} +1 -1
  7. package/.output/public/_nuxt/{CUlEAfaO.js → BlwLUHaY.js} +13 -13
  8. package/.output/public/_nuxt/{D2hOj9XC.js → BpWWYZTV.js} +1 -1
  9. package/.output/public/_nuxt/{CDPuLdqk.js → C1Xhrmo7.js} +1 -1
  10. package/.output/public/_nuxt/{BL-2dw2H.js → CD9Hkzj8.js} +1 -1
  11. package/.output/public/_nuxt/{DeCCkKCn.js → CHa34Mjf.js} +1 -1
  12. package/.output/public/_nuxt/{BuN5GOse.js → CL4a9rOt.js} +1 -1
  13. package/.output/public/_nuxt/{BkNdYhVU.js → CMqXSfVv.js} +1 -1
  14. package/.output/public/_nuxt/{B9QOj8at.js → CT0Qdh4h.js} +1 -1
  15. package/.output/public/_nuxt/{DA66NkQb.js → CTu4awv_.js} +1 -1
  16. package/.output/public/_nuxt/{D4I3CwV0.js → CiwR41uk.js} +1 -1
  17. package/.output/public/_nuxt/{UlOiG1et.js → ClBsnNkh.js} +1 -1
  18. package/.output/public/_nuxt/{Dqe2EjXB.js → CpoD4Tu0.js} +1 -1
  19. package/.output/public/_nuxt/{BKe7h20I.js → CsCYo3-3.js} +1 -1
  20. package/.output/public/_nuxt/{LPrTxMoA.js → D3nND01j.js} +1 -1
  21. package/.output/public/_nuxt/DXl8M135.js +1 -0
  22. package/.output/public/_nuxt/{CXRolcM8.js → DbpD4JwV.js} +1 -1
  23. package/.output/public/_nuxt/{RIDdiPVc.js → DpS7j0-i.js} +1 -1
  24. package/.output/public/_nuxt/{BIoksCZ6.js → I2KZJVps.js} +1 -1
  25. package/.output/public/_nuxt/{DizFB7BZ.js → K36O-msP.js} +1 -1
  26. package/.output/public/_nuxt/builds/latest.json +1 -1
  27. package/.output/public/_nuxt/builds/meta/99c50179-5a69-4365-b1b9-6ad27c64060b.json +1 -0
  28. package/.output/public/_nuxt/{Dn-R_Odm.js → e4IUZygv.js} +1 -1
  29. package/.output/public/_nuxt/{AV0MK5it.js → mzIiiUgI.js} +1 -1
  30. package/.output/server/index.mjs +423 -423
  31. package/.output/server/package.json +1 -1
  32. package/package.json +5 -5
  33. package/.output/public/_nuxt/BcoNctsL.js +0 -1
  34. package/.output/public/_nuxt/DmCOOqTD.js +0 -2
  35. package/.output/public/_nuxt/builds/meta/e078712d-664b-41c7-9aa8-b59330e10324.json +0 -1
@@ -1,4 +1,4 @@
1
- import{al as pe,am as ye,an as et,I as Ce,E as Ee,_ as Be}from"#entry";import{F as ae,r as Re,w as Ie,H as Te,L as F,W as D,a9 as vt,af as Pe,Z as Ae,_ as nt,G as k,$,X as H,a1 as Q,a_ as Ne,a3 as Mt,aD as Se,ai as _e,a0 as ve,a2 as Me,aE as be}from"./CJ9AjueP.js";const Le={"application/x-yaml":"devicon-plain:yaml"},qe={yaml:"devicon-plain:yaml",yml:"devicon-plain:yaml",zip:"devicon-plain:zip"};function De(e){const o=e.name.split(".").pop();return Le[e.contentType??""]??qe[o??""]??"mdi:file"}var j={},rt,bt;function Ue(){return bt||(bt=1,rt=function(){return typeof Promise=="function"&&Promise.prototype&&Promise.prototype.then}),rt}var ot={},U={},Lt;function V(){if(Lt)return U;Lt=1;let e;const o=[0,26,44,70,100,134,172,196,242,292,346,404,466,532,581,655,733,815,901,991,1085,1156,1258,1364,1474,1588,1706,1828,1921,2051,2185,2323,2465,2611,2761,2876,3034,3196,3362,3532,3706];return U.getSymbolSize=function(n){if(!n)throw new Error('"version" cannot be null or undefined');if(n<1||n>40)throw new Error('"version" should be in range from 1 to 40');return n*4+17},U.getSymbolTotalCodewords=function(n){return o[n]},U.getBCHDigit=function(i){let n=0;for(;i!==0;)n++,i>>>=1;return n},U.setToSJISFunction=function(n){if(typeof n!="function")throw new Error('"toSJISFunc" is not a valid function.');e=n},U.isKanjiModeEnabled=function(){return typeof e<"u"},U.toSJIS=function(n){return e(n)},U}var it={},qt;function At(){return qt||(qt=1,function(e){e.L={bit:1},e.M={bit:0},e.Q={bit:3},e.H={bit:2};function o(i){if(typeof i!="string")throw new Error("Param is not a string");switch(i.toLowerCase()){case"l":case"low":return e.L;case"m":case"medium":return e.M;case"q":case"quartile":return e.Q;case"h":case"high":return e.H;default:throw new Error("Unknown EC Level: "+i)}}e.isValid=function(n){return n&&typeof n.bit<"u"&&n.bit>=0&&n.bit<4},e.from=function(n,t){if(e.isValid(n))return n;try{return o(n)}catch{return t}}}(it)),it}var st,Dt;function Fe(){if(Dt)return st;Dt=1;function e(){this.buffer=[],this.length=0}return e.prototype={get:function(o){const i=Math.floor(o/8);return(this.buffer[i]>>>7-o%8&1)===1},put:function(o,i){for(let n=0;n<i;n++)this.putBit((o>>>i-n-1&1)===1)},getLengthInBits:function(){return this.length},putBit:function(o){const i=Math.floor(this.length/8);this.buffer.length<=i&&this.buffer.push(0),o&&(this.buffer[i]|=128>>>this.length%8),this.length++}},st=e,st}var at,Ut;function ke(){if(Ut)return at;Ut=1;function e(o){if(!o||o<1)throw new Error("BitMatrix size must be defined and greater than 0");this.size=o,this.data=new Uint8Array(o*o),this.reservedBit=new Uint8Array(o*o)}return e.prototype.set=function(o,i,n,t){const r=o*this.size+i;this.data[r]=n,t&&(this.reservedBit[r]=!0)},e.prototype.get=function(o,i){return this.data[o*this.size+i]},e.prototype.xor=function(o,i,n){this.data[o*this.size+i]^=n},e.prototype.isReserved=function(o,i){return this.reservedBit[o*this.size+i]},at=e,at}var ut={},Ft;function Ve(){return Ft||(Ft=1,function(e){const o=V().getSymbolSize;e.getRowColCoords=function(n){if(n===1)return[];const t=Math.floor(n/7)+2,r=o(n),s=r===145?26:Math.ceil((r-13)/(2*t-2))*2,a=[r-7];for(let u=1;u<t-1;u++)a[u]=a[u-1]-s;return a.push(6),a.reverse()},e.getPositions=function(n){const t=[],r=e.getRowColCoords(n),s=r.length;for(let a=0;a<s;a++)for(let u=0;u<s;u++)a===0&&u===0||a===0&&u===s-1||a===s-1&&u===0||t.push([r[a],r[u]]);return t}}(ut)),ut}var ct={},kt;function ze(){if(kt)return ct;kt=1;const e=V().getSymbolSize,o=7;return ct.getPositions=function(n){const t=e(n);return[[0,0],[t-o,0],[0,t-o]]},ct}var lt={},Vt;function Oe(){return Vt||(Vt=1,function(e){e.Patterns={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7};const o={N1:3,N2:3,N3:40,N4:10};e.isValid=function(t){return t!=null&&t!==""&&!isNaN(t)&&t>=0&&t<=7},e.from=function(t){return e.isValid(t)?parseInt(t,10):void 0},e.getPenaltyN1=function(t){const r=t.size;let s=0,a=0,u=0,c=null,d=null;for(let E=0;E<r;E++){a=u=0,c=d=null;for(let h=0;h<r;h++){let l=t.get(E,h);l===c?a++:(a>=5&&(s+=o.N1+(a-5)),c=l,a=1),l=t.get(h,E),l===d?u++:(u>=5&&(s+=o.N1+(u-5)),d=l,u=1)}a>=5&&(s+=o.N1+(a-5)),u>=5&&(s+=o.N1+(u-5))}return s},e.getPenaltyN2=function(t){const r=t.size;let s=0;for(let a=0;a<r-1;a++)for(let u=0;u<r-1;u++){const c=t.get(a,u)+t.get(a,u+1)+t.get(a+1,u)+t.get(a+1,u+1);(c===4||c===0)&&s++}return s*o.N2},e.getPenaltyN3=function(t){const r=t.size;let s=0,a=0,u=0;for(let c=0;c<r;c++){a=u=0;for(let d=0;d<r;d++)a=a<<1&2047|t.get(c,d),d>=10&&(a===1488||a===93)&&s++,u=u<<1&2047|t.get(d,c),d>=10&&(u===1488||u===93)&&s++}return s*o.N3},e.getPenaltyN4=function(t){let r=0;const s=t.data.length;for(let u=0;u<s;u++)r+=t.data[u];return Math.abs(Math.ceil(r*100/s/5)-10)*o.N4};function i(n,t,r){switch(n){case e.Patterns.PATTERN000:return(t+r)%2===0;case e.Patterns.PATTERN001:return t%2===0;case e.Patterns.PATTERN010:return r%3===0;case e.Patterns.PATTERN011:return(t+r)%3===0;case e.Patterns.PATTERN100:return(Math.floor(t/2)+Math.floor(r/3))%2===0;case e.Patterns.PATTERN101:return t*r%2+t*r%3===0;case e.Patterns.PATTERN110:return(t*r%2+t*r%3)%2===0;case e.Patterns.PATTERN111:return(t*r%3+(t+r)%2)%2===0;default:throw new Error("bad maskPattern:"+n)}}e.applyMask=function(t,r){const s=r.size;for(let a=0;a<s;a++)for(let u=0;u<s;u++)r.isReserved(u,a)||r.xor(u,a,i(t,u,a))},e.getBestMask=function(t,r){const s=Object.keys(e.Patterns).length;let a=0,u=1/0;for(let c=0;c<s;c++){r(c),e.applyMask(c,t);const d=e.getPenaltyN1(t)+e.getPenaltyN2(t)+e.getPenaltyN3(t)+e.getPenaltyN4(t);e.applyMask(c,t),d<u&&(u=d,a=c)}return a}}(lt)),lt}var G={},zt;function ue(){if(zt)return G;zt=1;const e=At(),o=[1,1,1,1,1,1,1,1,1,1,2,2,1,2,2,4,1,2,4,4,2,4,4,4,2,4,6,5,2,4,6,6,2,5,8,8,4,5,8,8,4,5,8,11,4,8,10,11,4,9,12,16,4,9,16,16,6,10,12,18,6,10,17,16,6,11,16,19,6,13,18,21,7,14,21,25,8,16,20,25,8,17,23,25,9,17,23,34,9,18,25,30,10,20,27,32,12,21,29,35,12,23,34,37,12,25,34,40,13,26,35,42,14,28,38,45,15,29,40,48,16,31,43,51,17,33,45,54,18,35,48,57,19,37,51,60,19,38,53,63,20,40,56,66,21,43,59,70,22,45,62,74,24,47,65,77,25,49,68,81],i=[7,10,13,17,10,16,22,28,15,26,36,44,20,36,52,64,26,48,72,88,36,64,96,112,40,72,108,130,48,88,132,156,60,110,160,192,72,130,192,224,80,150,224,264,96,176,260,308,104,198,288,352,120,216,320,384,132,240,360,432,144,280,408,480,168,308,448,532,180,338,504,588,196,364,546,650,224,416,600,700,224,442,644,750,252,476,690,816,270,504,750,900,300,560,810,960,312,588,870,1050,336,644,952,1110,360,700,1020,1200,390,728,1050,1260,420,784,1140,1350,450,812,1200,1440,480,868,1290,1530,510,924,1350,1620,540,980,1440,1710,570,1036,1530,1800,570,1064,1590,1890,600,1120,1680,1980,630,1204,1770,2100,660,1260,1860,2220,720,1316,1950,2310,750,1372,2040,2430];return G.getBlocksCount=function(t,r){switch(r){case e.L:return o[(t-1)*4+0];case e.M:return o[(t-1)*4+1];case e.Q:return o[(t-1)*4+2];case e.H:return o[(t-1)*4+3];default:return}},G.getTotalCodewordsCount=function(t,r){switch(r){case e.L:return i[(t-1)*4+0];case e.M:return i[(t-1)*4+1];case e.Q:return i[(t-1)*4+2];case e.H:return i[(t-1)*4+3];default:return}},G}var ft={},J={},Ot;function He(){if(Ot)return J;Ot=1;const e=new Uint8Array(512),o=new Uint8Array(256);return function(){let n=1;for(let t=0;t<255;t++)e[t]=n,o[n]=t,n<<=1,n&256&&(n^=285);for(let t=255;t<512;t++)e[t]=e[t-255]}(),J.log=function(n){if(n<1)throw new Error("log("+n+")");return o[n]},J.exp=function(n){return e[n]},J.mul=function(n,t){return n===0||t===0?0:e[o[n]+o[t]]},J}var Ht;function je(){return Ht||(Ht=1,function(e){const o=He();e.mul=function(n,t){const r=new Uint8Array(n.length+t.length-1);for(let s=0;s<n.length;s++)for(let a=0;a<t.length;a++)r[s+a]^=o.mul(n[s],t[a]);return r},e.mod=function(n,t){let r=new Uint8Array(n);for(;r.length-t.length>=0;){const s=r[0];for(let u=0;u<t.length;u++)r[u]^=o.mul(t[u],s);let a=0;for(;a<r.length&&r[a]===0;)a++;r=r.slice(a)}return r},e.generateECPolynomial=function(n){let t=new Uint8Array([1]);for(let r=0;r<n;r++)t=e.mul(t,new Uint8Array([1,o.exp(r)]));return t}}(ft)),ft}var dt,jt;function Ke(){if(jt)return dt;jt=1;const e=je();function o(i){this.genPoly=void 0,this.degree=i,this.degree&&this.initialize(this.degree)}return o.prototype.initialize=function(n){this.degree=n,this.genPoly=e.generateECPolynomial(this.degree)},o.prototype.encode=function(n){if(!this.genPoly)throw new Error("Encoder not initialized");const t=new Uint8Array(n.length+this.degree);t.set(n);const r=e.mod(t,this.genPoly),s=this.degree-r.length;if(s>0){const a=new Uint8Array(this.degree);return a.set(r,s),a}return r},dt=o,dt}var gt={},ht={},mt={},Kt;function ce(){return Kt||(Kt=1,mt.isValid=function(o){return!isNaN(o)&&o>=1&&o<=40}),mt}var M={},Jt;function le(){if(Jt)return M;Jt=1;const e="[0-9]+",o="[A-Z $%*+\\-./:]+";let i="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";i=i.replace(/u/g,"\\u");const n="(?:(?![A-Z0-9 $%*+\\-./:]|"+i+`)(?:.|[\r
1
+ import{am as pe,an as ye,ao as et,I as Ce,E as Ee,_ as Be}from"#entry";import{F as ae,r as Re,w as Ie,H as Te,L as F,W as D,a9 as vt,af as Pe,Z as Ae,_ as nt,G as k,$,X as H,a1 as Q,a_ as Ne,a3 as Mt,aD as Se,ai as _e,a0 as ve,a2 as Me,aE as be}from"./CJ9AjueP.js";const Le={"application/x-yaml":"devicon-plain:yaml"},qe={yaml:"devicon-plain:yaml",yml:"devicon-plain:yaml",zip:"devicon-plain:zip"};function De(e){const o=e.name.split(".").pop();return Le[e.contentType??""]??qe[o??""]??"mdi:file"}var j={},rt,bt;function Ue(){return bt||(bt=1,rt=function(){return typeof Promise=="function"&&Promise.prototype&&Promise.prototype.then}),rt}var ot={},U={},Lt;function V(){if(Lt)return U;Lt=1;let e;const o=[0,26,44,70,100,134,172,196,242,292,346,404,466,532,581,655,733,815,901,991,1085,1156,1258,1364,1474,1588,1706,1828,1921,2051,2185,2323,2465,2611,2761,2876,3034,3196,3362,3532,3706];return U.getSymbolSize=function(n){if(!n)throw new Error('"version" cannot be null or undefined');if(n<1||n>40)throw new Error('"version" should be in range from 1 to 40');return n*4+17},U.getSymbolTotalCodewords=function(n){return o[n]},U.getBCHDigit=function(i){let n=0;for(;i!==0;)n++,i>>>=1;return n},U.setToSJISFunction=function(n){if(typeof n!="function")throw new Error('"toSJISFunc" is not a valid function.');e=n},U.isKanjiModeEnabled=function(){return typeof e<"u"},U.toSJIS=function(n){return e(n)},U}var it={},qt;function At(){return qt||(qt=1,function(e){e.L={bit:1},e.M={bit:0},e.Q={bit:3},e.H={bit:2};function o(i){if(typeof i!="string")throw new Error("Param is not a string");switch(i.toLowerCase()){case"l":case"low":return e.L;case"m":case"medium":return e.M;case"q":case"quartile":return e.Q;case"h":case"high":return e.H;default:throw new Error("Unknown EC Level: "+i)}}e.isValid=function(n){return n&&typeof n.bit<"u"&&n.bit>=0&&n.bit<4},e.from=function(n,t){if(e.isValid(n))return n;try{return o(n)}catch{return t}}}(it)),it}var st,Dt;function Fe(){if(Dt)return st;Dt=1;function e(){this.buffer=[],this.length=0}return e.prototype={get:function(o){const i=Math.floor(o/8);return(this.buffer[i]>>>7-o%8&1)===1},put:function(o,i){for(let n=0;n<i;n++)this.putBit((o>>>i-n-1&1)===1)},getLengthInBits:function(){return this.length},putBit:function(o){const i=Math.floor(this.length/8);this.buffer.length<=i&&this.buffer.push(0),o&&(this.buffer[i]|=128>>>this.length%8),this.length++}},st=e,st}var at,Ut;function ke(){if(Ut)return at;Ut=1;function e(o){if(!o||o<1)throw new Error("BitMatrix size must be defined and greater than 0");this.size=o,this.data=new Uint8Array(o*o),this.reservedBit=new Uint8Array(o*o)}return e.prototype.set=function(o,i,n,t){const r=o*this.size+i;this.data[r]=n,t&&(this.reservedBit[r]=!0)},e.prototype.get=function(o,i){return this.data[o*this.size+i]},e.prototype.xor=function(o,i,n){this.data[o*this.size+i]^=n},e.prototype.isReserved=function(o,i){return this.reservedBit[o*this.size+i]},at=e,at}var ut={},Ft;function Ve(){return Ft||(Ft=1,function(e){const o=V().getSymbolSize;e.getRowColCoords=function(n){if(n===1)return[];const t=Math.floor(n/7)+2,r=o(n),s=r===145?26:Math.ceil((r-13)/(2*t-2))*2,a=[r-7];for(let u=1;u<t-1;u++)a[u]=a[u-1]-s;return a.push(6),a.reverse()},e.getPositions=function(n){const t=[],r=e.getRowColCoords(n),s=r.length;for(let a=0;a<s;a++)for(let u=0;u<s;u++)a===0&&u===0||a===0&&u===s-1||a===s-1&&u===0||t.push([r[a],r[u]]);return t}}(ut)),ut}var ct={},kt;function ze(){if(kt)return ct;kt=1;const e=V().getSymbolSize,o=7;return ct.getPositions=function(n){const t=e(n);return[[0,0],[t-o,0],[0,t-o]]},ct}var lt={},Vt;function Oe(){return Vt||(Vt=1,function(e){e.Patterns={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7};const o={N1:3,N2:3,N3:40,N4:10};e.isValid=function(t){return t!=null&&t!==""&&!isNaN(t)&&t>=0&&t<=7},e.from=function(t){return e.isValid(t)?parseInt(t,10):void 0},e.getPenaltyN1=function(t){const r=t.size;let s=0,a=0,u=0,c=null,d=null;for(let E=0;E<r;E++){a=u=0,c=d=null;for(let h=0;h<r;h++){let l=t.get(E,h);l===c?a++:(a>=5&&(s+=o.N1+(a-5)),c=l,a=1),l=t.get(h,E),l===d?u++:(u>=5&&(s+=o.N1+(u-5)),d=l,u=1)}a>=5&&(s+=o.N1+(a-5)),u>=5&&(s+=o.N1+(u-5))}return s},e.getPenaltyN2=function(t){const r=t.size;let s=0;for(let a=0;a<r-1;a++)for(let u=0;u<r-1;u++){const c=t.get(a,u)+t.get(a,u+1)+t.get(a+1,u)+t.get(a+1,u+1);(c===4||c===0)&&s++}return s*o.N2},e.getPenaltyN3=function(t){const r=t.size;let s=0,a=0,u=0;for(let c=0;c<r;c++){a=u=0;for(let d=0;d<r;d++)a=a<<1&2047|t.get(c,d),d>=10&&(a===1488||a===93)&&s++,u=u<<1&2047|t.get(d,c),d>=10&&(u===1488||u===93)&&s++}return s*o.N3},e.getPenaltyN4=function(t){let r=0;const s=t.data.length;for(let u=0;u<s;u++)r+=t.data[u];return Math.abs(Math.ceil(r*100/s/5)-10)*o.N4};function i(n,t,r){switch(n){case e.Patterns.PATTERN000:return(t+r)%2===0;case e.Patterns.PATTERN001:return t%2===0;case e.Patterns.PATTERN010:return r%3===0;case e.Patterns.PATTERN011:return(t+r)%3===0;case e.Patterns.PATTERN100:return(Math.floor(t/2)+Math.floor(r/3))%2===0;case e.Patterns.PATTERN101:return t*r%2+t*r%3===0;case e.Patterns.PATTERN110:return(t*r%2+t*r%3)%2===0;case e.Patterns.PATTERN111:return(t*r%3+(t+r)%2)%2===0;default:throw new Error("bad maskPattern:"+n)}}e.applyMask=function(t,r){const s=r.size;for(let a=0;a<s;a++)for(let u=0;u<s;u++)r.isReserved(u,a)||r.xor(u,a,i(t,u,a))},e.getBestMask=function(t,r){const s=Object.keys(e.Patterns).length;let a=0,u=1/0;for(let c=0;c<s;c++){r(c),e.applyMask(c,t);const d=e.getPenaltyN1(t)+e.getPenaltyN2(t)+e.getPenaltyN3(t)+e.getPenaltyN4(t);e.applyMask(c,t),d<u&&(u=d,a=c)}return a}}(lt)),lt}var G={},zt;function ue(){if(zt)return G;zt=1;const e=At(),o=[1,1,1,1,1,1,1,1,1,1,2,2,1,2,2,4,1,2,4,4,2,4,4,4,2,4,6,5,2,4,6,6,2,5,8,8,4,5,8,8,4,5,8,11,4,8,10,11,4,9,12,16,4,9,16,16,6,10,12,18,6,10,17,16,6,11,16,19,6,13,18,21,7,14,21,25,8,16,20,25,8,17,23,25,9,17,23,34,9,18,25,30,10,20,27,32,12,21,29,35,12,23,34,37,12,25,34,40,13,26,35,42,14,28,38,45,15,29,40,48,16,31,43,51,17,33,45,54,18,35,48,57,19,37,51,60,19,38,53,63,20,40,56,66,21,43,59,70,22,45,62,74,24,47,65,77,25,49,68,81],i=[7,10,13,17,10,16,22,28,15,26,36,44,20,36,52,64,26,48,72,88,36,64,96,112,40,72,108,130,48,88,132,156,60,110,160,192,72,130,192,224,80,150,224,264,96,176,260,308,104,198,288,352,120,216,320,384,132,240,360,432,144,280,408,480,168,308,448,532,180,338,504,588,196,364,546,650,224,416,600,700,224,442,644,750,252,476,690,816,270,504,750,900,300,560,810,960,312,588,870,1050,336,644,952,1110,360,700,1020,1200,390,728,1050,1260,420,784,1140,1350,450,812,1200,1440,480,868,1290,1530,510,924,1350,1620,540,980,1440,1710,570,1036,1530,1800,570,1064,1590,1890,600,1120,1680,1980,630,1204,1770,2100,660,1260,1860,2220,720,1316,1950,2310,750,1372,2040,2430];return G.getBlocksCount=function(t,r){switch(r){case e.L:return o[(t-1)*4+0];case e.M:return o[(t-1)*4+1];case e.Q:return o[(t-1)*4+2];case e.H:return o[(t-1)*4+3];default:return}},G.getTotalCodewordsCount=function(t,r){switch(r){case e.L:return i[(t-1)*4+0];case e.M:return i[(t-1)*4+1];case e.Q:return i[(t-1)*4+2];case e.H:return i[(t-1)*4+3];default:return}},G}var ft={},J={},Ot;function He(){if(Ot)return J;Ot=1;const e=new Uint8Array(512),o=new Uint8Array(256);return function(){let n=1;for(let t=0;t<255;t++)e[t]=n,o[n]=t,n<<=1,n&256&&(n^=285);for(let t=255;t<512;t++)e[t]=e[t-255]}(),J.log=function(n){if(n<1)throw new Error("log("+n+")");return o[n]},J.exp=function(n){return e[n]},J.mul=function(n,t){return n===0||t===0?0:e[o[n]+o[t]]},J}var Ht;function je(){return Ht||(Ht=1,function(e){const o=He();e.mul=function(n,t){const r=new Uint8Array(n.length+t.length-1);for(let s=0;s<n.length;s++)for(let a=0;a<t.length;a++)r[s+a]^=o.mul(n[s],t[a]);return r},e.mod=function(n,t){let r=new Uint8Array(n);for(;r.length-t.length>=0;){const s=r[0];for(let u=0;u<t.length;u++)r[u]^=o.mul(t[u],s);let a=0;for(;a<r.length&&r[a]===0;)a++;r=r.slice(a)}return r},e.generateECPolynomial=function(n){let t=new Uint8Array([1]);for(let r=0;r<n;r++)t=e.mul(t,new Uint8Array([1,o.exp(r)]));return t}}(ft)),ft}var dt,jt;function Ke(){if(jt)return dt;jt=1;const e=je();function o(i){this.genPoly=void 0,this.degree=i,this.degree&&this.initialize(this.degree)}return o.prototype.initialize=function(n){this.degree=n,this.genPoly=e.generateECPolynomial(this.degree)},o.prototype.encode=function(n){if(!this.genPoly)throw new Error("Encoder not initialized");const t=new Uint8Array(n.length+this.degree);t.set(n);const r=e.mod(t,this.genPoly),s=this.degree-r.length;if(s>0){const a=new Uint8Array(this.degree);return a.set(r,s),a}return r},dt=o,dt}var gt={},ht={},mt={},Kt;function ce(){return Kt||(Kt=1,mt.isValid=function(o){return!isNaN(o)&&o>=1&&o<=40}),mt}var M={},Jt;function le(){if(Jt)return M;Jt=1;const e="[0-9]+",o="[A-Z $%*+\\-./:]+";let i="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";i=i.replace(/u/g,"\\u");const n="(?:(?![A-Z0-9 $%*+\\-./:]|"+i+`)(?:.|[\r
2
2
  ]))+`;M.KANJI=new RegExp(i,"g"),M.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g"),M.BYTE=new RegExp(n,"g"),M.NUMERIC=new RegExp(e,"g"),M.ALPHANUMERIC=new RegExp(o,"g");const t=new RegExp("^"+i+"$"),r=new RegExp("^"+e+"$"),s=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");return M.testKanji=function(u){return t.test(u)},M.testNumeric=function(u){return r.test(u)},M.testAlphanumeric=function(u){return s.test(u)},M}var Yt;function z(){return Yt||(Yt=1,function(e){const o=ce(),i=le();e.NUMERIC={id:"Numeric",bit:1,ccBits:[10,12,14]},e.ALPHANUMERIC={id:"Alphanumeric",bit:2,ccBits:[9,11,13]},e.BYTE={id:"Byte",bit:4,ccBits:[8,16,16]},e.KANJI={id:"Kanji",bit:8,ccBits:[8,10,12]},e.MIXED={bit:-1},e.getCharCountIndicator=function(r,s){if(!r.ccBits)throw new Error("Invalid mode: "+r);if(!o.isValid(s))throw new Error("Invalid version: "+s);return s>=1&&s<10?r.ccBits[0]:s<27?r.ccBits[1]:r.ccBits[2]},e.getBestModeForData=function(r){return i.testNumeric(r)?e.NUMERIC:i.testAlphanumeric(r)?e.ALPHANUMERIC:i.testKanji(r)?e.KANJI:e.BYTE},e.toString=function(r){if(r&&r.id)return r.id;throw new Error("Invalid mode")},e.isValid=function(r){return r&&r.bit&&r.ccBits};function n(t){if(typeof t!="string")throw new Error("Param is not a string");switch(t.toLowerCase()){case"numeric":return e.NUMERIC;case"alphanumeric":return e.ALPHANUMERIC;case"kanji":return e.KANJI;case"byte":return e.BYTE;default:throw new Error("Unknown mode: "+t)}}e.from=function(r,s){if(e.isValid(r))return r;try{return n(r)}catch{return s}}}(ht)),ht}var $t;function Je(){return $t||($t=1,function(e){const o=V(),i=ue(),n=At(),t=z(),r=ce(),s=7973,a=o.getBCHDigit(s);function u(h,l,A){for(let N=1;N<=40;N++)if(l<=e.getCapacity(N,A,h))return N}function c(h,l){return t.getCharCountIndicator(h,l)+4}function d(h,l){let A=0;return h.forEach(function(N){const _=c(N.mode,l);A+=_+N.getBitsLength()}),A}function E(h,l){for(let A=1;A<=40;A++)if(d(h,A)<=e.getCapacity(A,l,t.MIXED))return A}e.from=function(l,A){return r.isValid(l)?parseInt(l,10):A},e.getCapacity=function(l,A,N){if(!r.isValid(l))throw new Error("Invalid QR Code version");typeof N>"u"&&(N=t.BYTE);const _=o.getSymbolTotalCodewords(l),I=i.getTotalCodewordsCount(l,A),S=(_-I)*8;if(N===t.MIXED)return S;const T=S-c(N,l);switch(N){case t.NUMERIC:return Math.floor(T/10*3);case t.ALPHANUMERIC:return Math.floor(T/11*2);case t.KANJI:return Math.floor(T/13);case t.BYTE:default:return Math.floor(T/8)}},e.getBestVersionForData=function(l,A){let N;const _=n.from(A,n.M);if(Array.isArray(l)){if(l.length>1)return E(l,_);if(l.length===0)return 1;N=l[0]}else N=l;return u(N.mode,N.getLength(),_)},e.getEncodedBits=function(l){if(!r.isValid(l)||l<7)throw new Error("Invalid QR Code version");let A=l<<12;for(;o.getBCHDigit(A)-a>=0;)A^=s<<o.getBCHDigit(A)-a;return l<<12|A}}(gt)),gt}var wt={},Qt;function Ye(){if(Qt)return wt;Qt=1;const e=V(),o=1335,i=21522,n=e.getBCHDigit(o);return wt.getEncodedBits=function(r,s){const a=r.bit<<3|s;let u=a<<10;for(;e.getBCHDigit(u)-n>=0;)u^=o<<e.getBCHDigit(u)-n;return(a<<10|u)^i},wt}var pt={},yt,Gt;function $e(){if(Gt)return yt;Gt=1;const e=z();function o(i){this.mode=e.NUMERIC,this.data=i.toString()}return o.getBitsLength=function(n){return 10*Math.floor(n/3)+(n%3?n%3*3+1:0)},o.prototype.getLength=function(){return this.data.length},o.prototype.getBitsLength=function(){return o.getBitsLength(this.data.length)},o.prototype.write=function(n){let t,r,s;for(t=0;t+3<=this.data.length;t+=3)r=this.data.substr(t,3),s=parseInt(r,10),n.put(s,10);const a=this.data.length-t;a>0&&(r=this.data.substr(t),s=parseInt(r,10),n.put(s,a*3+1))},yt=o,yt}var Ct,xt;function Qe(){if(xt)return Ct;xt=1;const e=z(),o=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"," ","$","%","*","+","-",".","/",":"];function i(n){this.mode=e.ALPHANUMERIC,this.data=n}return i.getBitsLength=function(t){return 11*Math.floor(t/2)+6*(t%2)},i.prototype.getLength=function(){return this.data.length},i.prototype.getBitsLength=function(){return i.getBitsLength(this.data.length)},i.prototype.write=function(t){let r;for(r=0;r+2<=this.data.length;r+=2){let s=o.indexOf(this.data[r])*45;s+=o.indexOf(this.data[r+1]),t.put(s,11)}this.data.length%2&&t.put(o.indexOf(this.data[r]),6)},Ct=i,Ct}var Et,Wt;function Ge(){if(Wt)return Et;Wt=1;const e=z();function o(i){this.mode=e.BYTE,typeof i=="string"?this.data=new TextEncoder().encode(i):this.data=new Uint8Array(i)}return o.getBitsLength=function(n){return n*8},o.prototype.getLength=function(){return this.data.length},o.prototype.getBitsLength=function(){return o.getBitsLength(this.data.length)},o.prototype.write=function(i){for(let n=0,t=this.data.length;n<t;n++)i.put(this.data[n],8)},Et=o,Et}var Bt,Xt;function xe(){if(Xt)return Bt;Xt=1;const e=z(),o=V();function i(n){this.mode=e.KANJI,this.data=n}return i.getBitsLength=function(t){return t*13},i.prototype.getLength=function(){return this.data.length},i.prototype.getBitsLength=function(){return i.getBitsLength(this.data.length)},i.prototype.write=function(n){let t;for(t=0;t<this.data.length;t++){let r=o.toSJIS(this.data[t]);if(r>=33088&&r<=40956)r-=33088;else if(r>=57408&&r<=60351)r-=49472;else throw new Error("Invalid SJIS character: "+this.data[t]+`
3
3
  Make sure your charset is UTF-8`);r=(r>>>8&255)*192+(r&255),n.put(r,13)}},Bt=i,Bt}var Rt={exports:{}},Zt;function We(){return Zt||(Zt=1,function(e){var o={single_source_shortest_paths:function(i,n,t){var r={},s={};s[n]=0;var a=o.PriorityQueue.make();a.push(n,0);for(var u,c,d,E,h,l,A,N,_;!a.empty();){u=a.pop(),c=u.value,E=u.cost,h=i[c]||{};for(d in h)h.hasOwnProperty(d)&&(l=h[d],A=E+l,N=s[d],_=typeof s[d]>"u",(_||N>A)&&(s[d]=A,a.push(d,A),r[d]=c))}if(typeof t<"u"&&typeof s[t]>"u"){var I=["Could not find a path from ",n," to ",t,"."].join("");throw new Error(I)}return r},extract_shortest_path_from_predecessor_list:function(i,n){for(var t=[],r=n;r;)t.push(r),i[r],r=i[r];return t.reverse(),t},find_path:function(i,n,t){var r=o.single_source_shortest_paths(i,n,t);return o.extract_shortest_path_from_predecessor_list(r,t)},PriorityQueue:{make:function(i){var n=o.PriorityQueue,t={},r;i=i||{};for(r in n)n.hasOwnProperty(r)&&(t[r]=n[r]);return t.queue=[],t.sorter=i.sorter||n.default_sorter,t},default_sorter:function(i,n){return i.cost-n.cost},push:function(i,n){var t={value:i,cost:n};this.queue.push(t),this.queue.sort(this.sorter)},pop:function(){return this.queue.shift()},empty:function(){return this.queue.length===0}}};e.exports=o}(Rt)),Rt.exports}var te;function Xe(){return te||(te=1,function(e){const o=z(),i=$e(),n=Qe(),t=Ge(),r=xe(),s=le(),a=V(),u=We();function c(I){return unescape(encodeURIComponent(I)).length}function d(I,S,T){const B=[];let v;for(;(v=I.exec(T))!==null;)B.push({data:v[0],index:v.index,mode:S,length:v[0].length});return B}function E(I){const S=d(s.NUMERIC,o.NUMERIC,I),T=d(s.ALPHANUMERIC,o.ALPHANUMERIC,I);let B,v;return a.isKanjiModeEnabled()?(B=d(s.BYTE,o.BYTE,I),v=d(s.KANJI,o.KANJI,I)):(B=d(s.BYTE_KANJI,o.BYTE,I),v=[]),S.concat(T,B,v).sort(function(y,p){return y.index-p.index}).map(function(y){return{data:y.data,mode:y.mode,length:y.length}})}function h(I,S){switch(S){case o.NUMERIC:return i.getBitsLength(I);case o.ALPHANUMERIC:return n.getBitsLength(I);case o.KANJI:return r.getBitsLength(I);case o.BYTE:return t.getBitsLength(I)}}function l(I){return I.reduce(function(S,T){const B=S.length-1>=0?S[S.length-1]:null;return B&&B.mode===T.mode?(S[S.length-1].data+=T.data,S):(S.push(T),S)},[])}function A(I){const S=[];for(let T=0;T<I.length;T++){const B=I[T];switch(B.mode){case o.NUMERIC:S.push([B,{data:B.data,mode:o.ALPHANUMERIC,length:B.length},{data:B.data,mode:o.BYTE,length:B.length}]);break;case o.ALPHANUMERIC:S.push([B,{data:B.data,mode:o.BYTE,length:B.length}]);break;case o.KANJI:S.push([B,{data:B.data,mode:o.BYTE,length:c(B.data)}]);break;case o.BYTE:S.push([{data:B.data,mode:o.BYTE,length:c(B.data)}])}}return S}function N(I,S){const T={},B={start:{}};let v=["start"];for(let g=0;g<I.length;g++){const y=I[g],p=[];for(let f=0;f<y.length;f++){const R=y[f],m=""+g+f;p.push(m),T[m]={node:R,lastCount:0},B[m]={};for(let C=0;C<v.length;C++){const w=v[C];T[w]&&T[w].node.mode===R.mode?(B[w][m]=h(T[w].lastCount+R.length,R.mode)-h(T[w].lastCount,R.mode),T[w].lastCount+=R.length):(T[w]&&(T[w].lastCount=R.length),B[w][m]=h(R.length,R.mode)+4+o.getCharCountIndicator(R.mode,S))}}v=p}for(let g=0;g<v.length;g++)B[v[g]].end=0;return{map:B,table:T}}function _(I,S){let T;const B=o.getBestModeForData(I);if(T=o.from(S,B),T!==o.BYTE&&T.bit<B.bit)throw new Error('"'+I+'" cannot be encoded with mode '+o.toString(T)+`.
4
4
  Suggested mode is: `+o.toString(B));switch(T===o.KANJI&&!a.isKanjiModeEnabled()&&(T=o.BYTE),T){case o.NUMERIC:return new i(I);case o.ALPHANUMERIC:return new n(I);case o.KANJI:return new r(I);case o.BYTE:return new t(I)}}e.fromArray=function(S){return S.reduce(function(T,B){return typeof B=="string"?T.push(_(B,null)):B.data&&T.push(_(B.data,B.mode)),T},[])},e.fromString=function(S,T){const B=E(S,a.isKanjiModeEnabled()),v=A(B),g=N(v,T),y=u.find_path(g.map,"start","end"),p=[];for(let f=1;f<y.length-1;f++)p.push(g.table[y[f]].node);return e.fromArray(l(p))},e.rawSplit=function(S){return e.fromArray(E(S,a.isKanjiModeEnabled()))}}(pt)),pt}var ee;function Ze(){if(ee)return ot;ee=1;const e=V(),o=At(),i=Fe(),n=ke(),t=Ve(),r=ze(),s=Oe(),a=ue(),u=Ke(),c=Je(),d=Ye(),E=z(),h=Xe();function l(g,y){const p=g.size,f=r.getPositions(y);for(let R=0;R<f.length;R++){const m=f[R][0],C=f[R][1];for(let w=-1;w<=7;w++)if(!(m+w<=-1||p<=m+w))for(let P=-1;P<=7;P++)C+P<=-1||p<=C+P||(w>=0&&w<=6&&(P===0||P===6)||P>=0&&P<=6&&(w===0||w===6)||w>=2&&w<=4&&P>=2&&P<=4?g.set(m+w,C+P,!0,!0):g.set(m+w,C+P,!1,!0))}}function A(g){const y=g.size;for(let p=8;p<y-8;p++){const f=p%2===0;g.set(p,6,f,!0),g.set(6,p,f,!0)}}function N(g,y){const p=t.getPositions(y);for(let f=0;f<p.length;f++){const R=p[f][0],m=p[f][1];for(let C=-2;C<=2;C++)for(let w=-2;w<=2;w++)C===-2||C===2||w===-2||w===2||C===0&&w===0?g.set(R+C,m+w,!0,!0):g.set(R+C,m+w,!1,!0)}}function _(g,y){const p=g.size,f=c.getEncodedBits(y);let R,m,C;for(let w=0;w<18;w++)R=Math.floor(w/3),m=w%3+p-8-3,C=(f>>w&1)===1,g.set(R,m,C,!0),g.set(m,R,C,!0)}function I(g,y,p){const f=g.size,R=d.getEncodedBits(y,p);let m,C;for(m=0;m<15;m++)C=(R>>m&1)===1,m<6?g.set(m,8,C,!0):m<8?g.set(m+1,8,C,!0):g.set(f-15+m,8,C,!0),m<8?g.set(8,f-m-1,C,!0):m<9?g.set(8,15-m-1+1,C,!0):g.set(8,15-m-1,C,!0);g.set(f-8,8,1,!0)}function S(g,y){const p=g.size;let f=-1,R=p-1,m=7,C=0;for(let w=p-1;w>0;w-=2)for(w===6&&w--;;){for(let P=0;P<2;P++)if(!g.isReserved(R,w-P)){let q=!1;C<y.length&&(q=(y[C]>>>m&1)===1),g.set(R,w-P,q),m--,m===-1&&(C++,m=7)}if(R+=f,R<0||p<=R){R-=f,f=-f;break}}}function T(g,y,p){const f=new i;p.forEach(function(P){f.put(P.mode.bit,4),f.put(P.getLength(),E.getCharCountIndicator(P.mode,g)),P.write(f)});const R=e.getSymbolTotalCodewords(g),m=a.getTotalCodewordsCount(g,y),C=(R-m)*8;for(f.getLengthInBits()+4<=C&&f.put(0,4);f.getLengthInBits()%8!==0;)f.putBit(0);const w=(C-f.getLengthInBits())/8;for(let P=0;P<w;P++)f.put(P%2?17:236,8);return B(f,g,y)}function B(g,y,p){const f=e.getSymbolTotalCodewords(y),R=a.getTotalCodewordsCount(y,p),m=f-R,C=a.getBlocksCount(y,p),w=f%C,P=C-w,q=Math.floor(f/C),K=Math.floor(m/C),he=K+1,Nt=q-K,me=new u(Nt);let W=0;const Y=new Array(C),St=new Array(C);let X=0;const we=new Uint8Array(g.buffer);for(let O=0;O<C;O++){const tt=O<P?K:he;Y[O]=we.slice(W,W+tt),St[O]=me.encode(Y[O]),W+=tt,X=Math.max(X,tt)}const Z=new Uint8Array(f);let _t=0,b,L;for(b=0;b<X;b++)for(L=0;L<C;L++)b<Y[L].length&&(Z[_t++]=Y[L][b]);for(b=0;b<Nt;b++)for(L=0;L<C;L++)Z[_t++]=St[L][b];return Z}function v(g,y,p,f){let R;if(Array.isArray(g))R=h.fromArray(g);else if(typeof g=="string"){let q=y;if(!q){const K=h.rawSplit(g);q=c.getBestVersionForData(K,p)}R=h.fromString(g,q||40)}else throw new Error("Invalid data");const m=c.getBestVersionForData(R,p);if(!m)throw new Error("The amount of data is too big to be stored in a QR Code");if(!y)y=m;else if(y<m)throw new Error(`
@@ -1 +1 @@
1
- import{aU as P}from"#entry";import{F,H as y,C as S,j as m,O as H,w as g,r as j,J as I,n as N}from"./CJ9AjueP.js";var T=Object.defineProperty,W=Object.defineProperties,z=Object.getOwnPropertyDescriptors,V=Object.getOwnPropertySymbols,A=Object.prototype.hasOwnProperty,B=Object.prototype.propertyIsEnumerable,b=(e,t,a)=>t in e?T(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a,h=(e,t)=>{for(var a in t||(t={}))A.call(t,a)&&b(e,a,t[a]);if(V)for(var a of V(t))B.call(t,a)&&b(e,a,t[a]);return e},J=(e,t)=>W(e,z(t));const _={wrapper:{display:"flex",position:"relative",textAlign:"initial"},fullWidth:{width:"100%"},hide:{display:"none"}};function q(e,t){const a=m(()=>{const{width:r,height:i}=e;return J(h({},_.wrapper),{width:r,height:i})}),l=m(()=>h(h({},_.fullWidth),!t.value&&_.hide));return{wrapperStyle:a,containerStyle:l}}function G(){const e=S(P.__getMonacoInstance()),t=j(!1);let a;return I(()=>{e.value||(a=P.init(),a.then(r=>e.value=r).catch(r=>{r?.type!=="cancelation"&&(t.value=!0,console.error("Monaco initialization error:",r))}))}),{monacoRef:e,unload:()=>a?.cancel(),isLoadFailed:t}}function $(e){return typeof e=="function"?e():e}function M(e){return e===void 0}function L(e,t,a,l){return K(e,l)||Q(e,t,a,l)}function K(e,t){return e.editor.getModel(U(e,t))}function Q(e,t,a,l){return e.editor.createModel(t,a,l?U(e,l):void 0)}function U(e,t){return e.Uri.parse(t)}var X=Object.defineProperty,E=Object.getOwnPropertySymbols,Y=Object.prototype.hasOwnProperty,Z=Object.prototype.propertyIsEnumerable,C=(e,t,a)=>t in e?X(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a,R=(e,t)=>{for(var a in t||(t={}))Y.call(t,a)&&C(e,a,t[a]);if(E)for(var a of E(t))Z.call(t,a)&&C(e,a,t[a]);return e};const ee={display:"flex",height:"100%",width:"100%",justifyContent:"center",alignItems:"center"};var ue=F({name:"VueMonacoEditor",model:{prop:"value",event:"update:value"},props:{defaultValue:String,defaultPath:String,defaultLanguage:String,value:String,language:String,path:String,theme:{type:String,default:"vs"},line:Number,options:{type:Object,default:()=>({})},overrideServices:{type:Object,default:()=>({})},saveViewState:{type:Boolean,default:!0},width:{type:[Number,String],default:"100%"},height:{type:[Number,String],default:"100%"},className:String},emits:["update:value","beforeMount","mount","change","validate"],setup(e,t){const a=new Map,l=S(null),{monacoRef:r,unload:i,isLoadFailed:o}=G(),{editorRef:n}=te(t,e,r,l),{disposeValidator:v}=ae(t,e,r,n),s=m(()=>!!r.value&&!!n.value),{wrapperStyle:d,containerStyle:O}=q(e,s);return H(()=>{var u,c;(u=v.value)==null||u.call(v),n.value?((c=n.value.getModel())==null||c.dispose(),n.value.dispose()):i()}),g([()=>e.path,()=>e.value,()=>e.language,()=>e.line],([u,c,p,f],[w,re,k,x])=>{if(s.value){if(u!==w){const D=L(r.value,c||e.defaultValue||"",p||e.defaultLanguage||"",u||e.defaultPath||"");e.saveViewState&&a.set(w,n.value.saveViewState()),n.value.setModel(D),e.saveViewState&&n.value.restoreViewState(a.get(u)),M(f)||n.value.revealLine(f);return}n.value.getValue()!==c&&n.value.setValue(c),p!==k&&r.value.editor.setModelLanguage(n.value.getModel(),p),!M(f)&&f!==x&&n.value.revealLine(f)}}),g(()=>e.options,u=>n.value&&n.value.updateOptions(u),{deep:!0}),g(()=>e.theme,u=>r.value&&r.value.editor.setTheme(u)),{containerRef:l,isEditorReady:s,isLoadFailed:o,wrapperStyle:d,containerStyle:O}},render(){const{$slots:e,isEditorReady:t,isLoadFailed:a,wrapperStyle:l,containerStyle:r,className:i}=this;return y("div",{style:l},[!t&&y("div",{style:ee},a?e.failure?$(e.failure):"load failed":e.default?$(e.default):"loading..."),y("div",{ref:"containerRef",key:"monaco_editor_container",style:r,class:i})])}});function te({emit:e},t,a,l){const r=S(null);I(()=>{const o=g(a,()=>{l.value&&a.value&&(N(()=>o()),i())},{immediate:!0})});function i(){var o;if(!l.value||!a.value||r.value)return;e("beforeMount",a.value);const n=t.path||t.defaultPath,v=L(a.value,t.value||t.defaultValue||"",t.language||t.defaultLanguage||"",n||"");r.value=a.value.editor.create(l.value,R({model:v,theme:t.theme,automaticLayout:!0,autoIndent:"brackets",formatOnPaste:!0,formatOnType:!0},t.options),t.overrideServices),(o=r.value)==null||o.onDidChangeModelContent(s=>{const d=r.value.getValue();d!==t.value&&(e("update:value",d),e("change",d,s))}),r.value&&!M(t.line)&&r.value.revealLine(t.line),e("mount",r.value,a.value)}return{editorRef:r}}function ae({emit:e},t,a,l){const r=j(null),i=g([a,l],()=>{if(a.value&&l.value){N(()=>i());const o=a.value.editor.onDidChangeMarkers(n=>{var v,s;const d=(s=(v=l.value)==null?void 0:v.getModel())==null?void 0:s.uri;if(d&&n.find(u=>u.path===d.path)){const u=a.value.editor.getModelMarkers({resource:d});e("validate",u)}});r.value=()=>o?.dispose()}});return{disposeValidator:r}}export{ue as V};
1
+ import{aV as P}from"#entry";import{F,H as y,C as S,j as m,O as H,w as g,r as j,J as I,n as N}from"./CJ9AjueP.js";var T=Object.defineProperty,W=Object.defineProperties,z=Object.getOwnPropertyDescriptors,V=Object.getOwnPropertySymbols,A=Object.prototype.hasOwnProperty,B=Object.prototype.propertyIsEnumerable,b=(e,t,a)=>t in e?T(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a,h=(e,t)=>{for(var a in t||(t={}))A.call(t,a)&&b(e,a,t[a]);if(V)for(var a of V(t))B.call(t,a)&&b(e,a,t[a]);return e},J=(e,t)=>W(e,z(t));const _={wrapper:{display:"flex",position:"relative",textAlign:"initial"},fullWidth:{width:"100%"},hide:{display:"none"}};function q(e,t){const a=m(()=>{const{width:r,height:i}=e;return J(h({},_.wrapper),{width:r,height:i})}),l=m(()=>h(h({},_.fullWidth),!t.value&&_.hide));return{wrapperStyle:a,containerStyle:l}}function G(){const e=S(P.__getMonacoInstance()),t=j(!1);let a;return I(()=>{e.value||(a=P.init(),a.then(r=>e.value=r).catch(r=>{r?.type!=="cancelation"&&(t.value=!0,console.error("Monaco initialization error:",r))}))}),{monacoRef:e,unload:()=>a?.cancel(),isLoadFailed:t}}function $(e){return typeof e=="function"?e():e}function M(e){return e===void 0}function L(e,t,a,l){return K(e,l)||Q(e,t,a,l)}function K(e,t){return e.editor.getModel(k(e,t))}function Q(e,t,a,l){return e.editor.createModel(t,a,l?k(e,l):void 0)}function k(e,t){return e.Uri.parse(t)}var X=Object.defineProperty,E=Object.getOwnPropertySymbols,Y=Object.prototype.hasOwnProperty,Z=Object.prototype.propertyIsEnumerable,C=(e,t,a)=>t in e?X(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a,R=(e,t)=>{for(var a in t||(t={}))Y.call(t,a)&&C(e,a,t[a]);if(E)for(var a of E(t))Z.call(t,a)&&C(e,a,t[a]);return e};const ee={display:"flex",height:"100%",width:"100%",justifyContent:"center",alignItems:"center"};var ue=F({name:"VueMonacoEditor",model:{prop:"value",event:"update:value"},props:{defaultValue:String,defaultPath:String,defaultLanguage:String,value:String,language:String,path:String,theme:{type:String,default:"vs"},line:Number,options:{type:Object,default:()=>({})},overrideServices:{type:Object,default:()=>({})},saveViewState:{type:Boolean,default:!0},width:{type:[Number,String],default:"100%"},height:{type:[Number,String],default:"100%"},className:String},emits:["update:value","beforeMount","mount","change","validate"],setup(e,t){const a=new Map,l=S(null),{monacoRef:r,unload:i,isLoadFailed:o}=G(),{editorRef:n}=te(t,e,r,l),{disposeValidator:v}=ae(t,e,r,n),s=m(()=>!!r.value&&!!n.value),{wrapperStyle:d,containerStyle:O}=q(e,s);return H(()=>{var u,c;(u=v.value)==null||u.call(v),n.value?((c=n.value.getModel())==null||c.dispose(),n.value.dispose()):i()}),g([()=>e.path,()=>e.value,()=>e.language,()=>e.line],([u,c,p,f],[w,re,U,x])=>{if(s.value){if(u!==w){const D=L(r.value,c||e.defaultValue||"",p||e.defaultLanguage||"",u||e.defaultPath||"");e.saveViewState&&a.set(w,n.value.saveViewState()),n.value.setModel(D),e.saveViewState&&n.value.restoreViewState(a.get(u)),M(f)||n.value.revealLine(f);return}n.value.getValue()!==c&&n.value.setValue(c),p!==U&&r.value.editor.setModelLanguage(n.value.getModel(),p),!M(f)&&f!==x&&n.value.revealLine(f)}}),g(()=>e.options,u=>n.value&&n.value.updateOptions(u),{deep:!0}),g(()=>e.theme,u=>r.value&&r.value.editor.setTheme(u)),{containerRef:l,isEditorReady:s,isLoadFailed:o,wrapperStyle:d,containerStyle:O}},render(){const{$slots:e,isEditorReady:t,isLoadFailed:a,wrapperStyle:l,containerStyle:r,className:i}=this;return y("div",{style:l},[!t&&y("div",{style:ee},a?e.failure?$(e.failure):"load failed":e.default?$(e.default):"loading..."),y("div",{ref:"containerRef",key:"monaco_editor_container",style:r,class:i})])}});function te({emit:e},t,a,l){const r=S(null);I(()=>{const o=g(a,()=>{l.value&&a.value&&(N(()=>o()),i())},{immediate:!0})});function i(){var o;if(!l.value||!a.value||r.value)return;e("beforeMount",a.value);const n=t.path||t.defaultPath,v=L(a.value,t.value||t.defaultValue||"",t.language||t.defaultLanguage||"",n||"");r.value=a.value.editor.create(l.value,R({model:v,theme:t.theme,automaticLayout:!0,autoIndent:"brackets",formatOnPaste:!0,formatOnType:!0},t.options),t.overrideServices),(o=r.value)==null||o.onDidChangeModelContent(s=>{const d=r.value.getValue();d!==t.value&&(e("update:value",d),e("change",d,s))}),r.value&&!M(t.line)&&r.value.revealLine(t.line),e("mount",r.value,a.value)}return{editorRef:r}}function ae({emit:e},t,a,l){const r=j(null),i=g([a,l],()=>{if(a.value&&l.value){N(()=>i());const o=a.value.editor.onDidChangeMarkers(n=>{var v,s;const d=(s=(v=l.value)==null?void 0:v.getModel())==null?void 0:s.uri;if(d&&n.find(u=>u.path===d.path)){const u=a.value.editor.getModelMarkers({resource:d});e("validate",u)}});r.value=()=>o?.dispose()}});return{disposeValidator:r}}export{ue as V};
@@ -1,4 +1,4 @@
1
- import{au as _t,av as vi,aw as kn,ax as yi,ay as Sn,az as wi,l as bi,_ as Q,aA as $n,aB as ot,aC as Dt,aD as Cn,aE as In,aF as ki,aG as Si,aH as Ze,aI as Ee,aJ as $i,aK as Ci,an as Ii,aL as Vn,aM as Vi,i as Mt,aN as Kt,aO as Ai,aP as Mi,ad as Ni,I as An,aQ as Mn,ap as Ei,aR as Ri,aS as zi,aT as Jt}from"#entry";import{F as x,j as O,L as z,W as g,a9 as D,af as ie,b4 as Oi,_ as B,aa as ke,Z as A,aE as Lt,G as p,a1 as S,X as V,ab as J,a0 as K,a2 as L,$ as W,ac as Ce,t as Fe,H as Nn,ae as Bi,a7 as En,r as He,q as Ti,a3 as j,i as Fi,ak as Ve,a8 as rt,a5 as Hi,I as Pi,b5 as _i,al as Oe,aT as Rn,aO as we,av as Ue,az as zn,b6 as Di,b7 as Li,aK as On,b8 as xi,w as Ui,a as Bn,aw as Tn,aA as be,ay as pt,ax as qi,b as Nt,aM as Fn,aC as gt,aD as Pe,ai as ne,n as at,aI as Xi,a$ as Yi,aH as Wi,aP as st,aS as Gi,aj as ji,aW as Ki}from"./CJ9AjueP.js";import{C as Zt,s as Ji,a as Hn,_ as Zi}from"./BDCIi1Fb.js";import"./BmhnSWN5.js";import{V as Qt}from"./UlOiG1et.js";import{I as Qi}from"./Cvl8iHT_.js";import{_ as eo}from"./DnodTinn.js";function to(e,t){let n=t.length-e.length;if(n===1){let[i,...o]=t;return Zt(i,{lazy:e,lazyArgs:o})}if(n===0){let i={lazy:e,lazyArgs:t};return Object.assign(o=>Zt(o,i),i)}throw new Error("Wrong number of arguments")}function no(...e){return to(io,e)}function io(){let e=new Set;return t=>e.has(t)?Ji:(e.add(t),{done:!1,hasNext:!0,next:t})}function oo(e,t,n){const i=Array.from({length:n},()=>[]),o=t,a=-(o*(n-1))/2,s=Array.from({length:n},(l,d)=>a+d*o),u=[];for(let l=0;l<e.length-1;l++){const d=e[l],f=e[l+1],m=f[0]-d[0],I=f[1]-d[1],$=Math.sqrt(m*m+I*I);let w=-I,y=m;$!==0&&(w/=$,y/=$),u.push({x:w,y})}function c(l,d,f,m){const I=l[0],$=l[1],w=d[0],y=d[1],C=f[0],R=f[1],T=m[0],H=m[1],P=(I-w)*(R-H)-($-y)*(C-T);if(P===0)return null;const _=((I-C)*(R-H)-($-R)*(C-T))/P;return[I+_*(w-I),$+_*(y-$)]}for(let l=0;l<n;l++)for(let d=0;d<e.length;d++){const f=e[d];let m=0,I=0;if(d===0)m=u[0].x*s[l],I=u[0].y*s[l];else if(d===e.length-1)m=u[u.length-1].x*s[l],I=u[u.length-1].y*s[l];else{const $=u[d-1],w=u[d],y=e[d-1],C=e[d+1],R=[y[0]+$.x*s[l],y[1]+$.y*s[l]],T=[f[0]+$.x*s[l],f[1]+$.y*s[l]],H=[f[0]+w.x*s[l],f[1]+w.y*s[l]],P=[C[0]+w.x*s[l],C[1]+w.y*s[l]],_=c(R,T,H,P);_?(m=_[0]-f[0],I=_[1]-f[1]):(m=($.x+w.x)/2*s[l],I=($.y+w.y)/2*s[l])}i[l].push(`${f[0]+m},${f[1]+I}`)}return i}const ro=["points","stroke"],ao=["points"],Ye=3,so=x({__name:"CustomEdge",props:{id:{},sourceNode:{},targetNode:{},source:{},target:{},type:{},label:{},style:{},selected:{type:Boolean},sourcePosition:{},targetPosition:{},sourceHandleId:{},targetHandleId:{},animated:{type:Boolean},updatable:{type:Boolean},markerStart:{},markerEnd:{},curvature:{},interactionWidth:{},data:{},events:{},labelStyle:{},labelShowBg:{type:Boolean},labelBgStyle:{},labelBgPadding:{},labelBgBorderRadius:{},sourceX:{},sourceY:{},targetX:{},targetY:{},inputResolverOutputs:{},components:{},entities:{}},setup(e){Oi(C=>({c5384110:Ye}));const t=_t(),{inputInstance:n,outputInstance:i,inputHub:o,outputHub:r,outputKey:a,inputKey:s,inputNodeType:u}=vi(t,{source:e.source,target:e.target,sourceHandle:e.sourceHandleId,targetHandle:e.targetHandleId}),c=O(()=>{if(u==="outputs"){const R=e.components[n.type].outputs[s];return{all:R?[R.type]:[]}}if(i&&n){const R=e.components[n.type].inputs[s];return{all:R?[R.type]:[]}}if(r&&n&&s)return{all:(kn(e.inputResolverOutputs,n.id)[s]??[]).map(R=>R.type)};if(r&&n)return{all:Sn(e.inputResolverOutputs,n.id).map(C=>C.type),visible:yi(e.inputResolverOutputs,n.id).map(C=>C.type)};if(i&&o){const R=e.components[i.type].outputs[a];return{all:R?[R.type]:[]}}if(r&&o)return{all:wi(e.inputResolverOutputs,r.id).flat().map(C=>C.type)};throw bi.error({msg:"unexpected connection in CustomEdge",inputInstance:n,outputInstance:i,inputHub:o,outputHub:r,outputKey:a,inputKey:s}),new Error("Invalid connection")}),l=O(()=>no(c.value.all).map(C=>e.entities[C])),d=O(()=>r?c.value.visible?c.value.visible.length===0:c.value.all.length===0:!1),f=O(()=>d.value?1:l.value.length),m=C=>d.value?"#9E9E9E":l.value[C%l.value.length].meta.color??"#607D8B",I=C=>d.value?!0:c.value.visible?c.value.visible.includes(l.value[C].type):!0,$=(C,R)=>C[0]===R[0]&&C[1]===R[1],w=O(()=>{if(!e.data.points)return[];const C=[e.sourceX,e.sourceY],R=[e.targetX,e.targetY],T=[...e.data.points];return(!T[0]||!$(T[0],C))&&T.unshift(C),(!T[T.length-1]||!$(T[T.length-1],R))&&T.push(R),oo(T,Ye,f.value)}),y=C=>{const T=1/f.value;return`-${C*T}s`};return(C,R)=>(g(),z(D,null,[(g(!0),z(D,null,ie(w.value,(T,H)=>(g(),z(D,{key:`static-${H}`},[I(H)?(g(),z("polyline",{key:0,points:T.join(" "),stroke:m(H),fill:"none","stroke-width":Ye,style:{opacity:"0.8"}},null,8,ro)):B("",!0)],64))),128)),(g(!0),z(D,null,ie(w.value,(T,H)=>(g(),z(D,{key:`highlight-${H}`},[I(H)?(g(),z("polyline",{key:0,points:T.join(" "),stroke:"white",fill:"none","stroke-width":Ye,class:"highlight-polyline animated-highlight",style:ke({animationDelay:y(H)})},null,12,ao)):B("",!0)],64))),128))],64))}}),lo=Q(so,[["__scopeId","data-v-4bf748bc"]]);function uo(e,t){const n={borderRadius:"4px",overflow:"visible"};switch(t){case"blueprint-valid":return{...n,opacity:"0.7",outline:"2px solid #4CAF50",backgroundColor:"rgba(76, 175, 80, 0.1)",boxShadow:"0 0 10px rgba(76, 175, 80, 0.3)"};case"blueprint-invalid":return{...n,opacity:"0.7",outline:"2px solid #F44336",backgroundColor:"rgba(244, 67, 54, 0.1)",boxShadow:"0 0 10px rgba(244, 67, 54, 0.3)"}}return e?{...n,outline:"2px solid #2196F3",boxShadow:"0 0 8px rgba(33, 150, 243, 0.4)"}:n}const co=x({__name:"HubCard",props:{selected:{type:Boolean},blueprintStatus:{}},setup(e){return(t,n)=>(g(),A(Lt,{variant:"flat",style:ke(p(uo)(t.selected,t.blueprintStatus)),color:"#2d2d2d"},{default:S(()=>[V(K,{class:"ma-2",size:74},{default:S(()=>n[0]||(n[0]=[L("mdi-router")])),_:1,__:[0]}),J(t.$slots,"default")]),_:3},8,["style"]))}}),fo=x({__name:"HubNodeHandle",props:{side:{},handleColor:{},isValidConnection:{type:Function}},setup(e){return(t,n)=>(g(),z(D,null,[V(p($n),{id:"",type:t.side==="left"?"target":"source",position:t.side==="left"?p(ot).Left:p(ot).Right,class:Ce(["handle",[t.side==="left"?"left-handle":"right-handle"]]),"is-valid-connection":t.isValidConnection},null,8,["type","position","class","is-valid-connection"]),W("div",{class:Ce(["handle-dot",[t.side==="left"?"handle-dot-left":"handle-dot-right"]]),style:ke({backgroundColor:t.handleColor})},null,6)],64))}}),en=Q(fo,[["__scopeId","data-v-1aff1180"]]),ho={class:"handles"},mo=x({__name:"HubNode",props:{hub:{},isValidConnection:{type:Function}},emits:["contextmenu"],setup(e,{emit:t}){const n=t,{vueFlowStore:i,selection:o}=Dt(),r=Cn(),a=O(()=>In(r.node,i));return(s,u)=>(g(),A(co,{class:"hub-card",selected:p(o).isNodeSelected(p(r).node),"blueprint-status":p(a),onContextmenu:u[0]||(u[0]=c=>n("contextmenu",c))},{default:S(()=>[J(s.$slots,"default",{},void 0,!0),W("div",ho,[V(en,{"handle-color":"#3F51B5",side:"left","is-valid-connection":s.isValidConnection},null,8,["is-valid-connection"]),V(en,{"handle-color":"#3F51B5",side:"right","is-valid-connection":s.isValidConnection},null,8,["is-valid-connection"])])]),_:3},8,["selected","blueprint-status"]))}}),Zl=Q(mo,[["__scopeId","data-v-79b30d7c"]]),po=x({__name:"SelectionRectangle",props:{selectionMode:{default:"add"},selectionArea:{}},setup(e){const t=O(()=>{if(!e.selectionArea)return;const n={left:e.selectionArea.x+"px",top:e.selectionArea.y+"px",width:e.selectionArea.width+"px",height:e.selectionArea.height+"px"};return e.selectionMode==="add"?{...n,border:"2px dashed #2196F3",background:"rgba(33, 150, 243, 0.1)"}:{...n,border:"2px dashed #F44336",background:"rgba(244, 67, 54, 0.1)"}});return(n,i)=>p(t)?(g(),z("div",{key:0,class:"selection-rectangle",style:ke(p(t))},null,4)):B("",!0)}}),go=Q(po,[["__scopeId","data-v-6118cbbb"]]);var he=(e=>(e.Lines="lines",e.Dots="dots",e))(he||{});const Pn=function({dimensions:e,size:t,color:n}){return Nn("path",{stroke:n,"stroke-width":t,d:`M${e[0]/2} 0 V${e[1]} M0 ${e[1]/2} H${e[0]}`})},_n=function({radius:e,color:t}){return Nn("circle",{cx:e,cy:e,r:e,fill:t})};he.Lines+"",he.Dots+"";const vo={[he.Dots]:"#81818a",[he.Lines]:"#eee"},yo=["id","x","y","width","height","patternTransform"],wo={key:2,height:"100",width:"100"},bo=["fill"],ko=["x","y","fill"],So={name:"Background",compatConfig:{MODE:3}},$o=x({...So,props:{id:{},variant:{default:()=>he.Dots},gap:{default:20},size:{default:1},lineWidth:{default:1},patternColor:{},color:{},bgColor:{},height:{default:100},width:{default:100},x:{default:0},y:{default:0},offset:{default:0}},setup(e){const{id:t,viewport:n}=_t(),i=O(()=>{const a=n.value.zoom,[s,u]=Array.isArray(e.gap)?e.gap:[e.gap,e.gap],c=[s*a||1,u*a||1],l=e.size*a,[d,f]=Array.isArray(e.offset)?e.offset:[e.offset,e.offset],m=[d*a||1+c[0]/2,f*a||1+c[1]/2];return{scaledGap:c,offset:m,size:l}}),o=Fe(()=>`pattern-${t}${e.id?`-${e.id}`:""}`),r=Fe(()=>e.color||e.patternColor||vo[e.variant||he.Dots]);return(a,s)=>(g(),z("svg",{class:"vue-flow__background vue-flow__container",style:ke({height:`${a.height>100?100:a.height}%`,width:`${a.width>100?100:a.width}%`})},[J(a.$slots,"pattern-container",{id:o.value},()=>[W("pattern",{id:o.value,x:p(n).x%i.value.scaledGap[0],y:p(n).y%i.value.scaledGap[1],width:i.value.scaledGap[0],height:i.value.scaledGap[1],patternTransform:`translate(-${i.value.offset[0]},-${i.value.offset[1]})`,patternUnits:"userSpaceOnUse"},[J(a.$slots,"pattern",{},()=>[a.variant===p(he).Lines?(g(),A(p(Pn),{key:0,size:a.lineWidth,color:r.value,dimensions:i.value.scaledGap},null,8,["size","color","dimensions"])):a.variant===p(he).Dots?(g(),A(p(_n),{key:1,color:r.value,radius:i.value.size/2},null,8,["color","radius"])):B("",!0),a.bgColor?(g(),z("svg",wo,[W("rect",{width:"100%",height:"100%",fill:a.bgColor},null,8,bo)])):B("",!0)])],8,yo)]),W("rect",{x:a.x,y:a.y,width:"100%",height:"100%",fill:`url(#${o.value})`},null,8,ko),J(a.$slots,"default",{id:o.value})],4))}});var Co={value:()=>{}};function xt(){for(var e=0,t=arguments.length,n={},i;e<t;++e){if(!(i=arguments[e]+"")||i in n||/[\s.]/.test(i))throw new Error("illegal type: "+i);n[i]=[]}return new Qe(n)}function Qe(e){this._=e}function Io(e,t){return e.trim().split(/^|\s+/).map(function(n){var i="",o=n.indexOf(".");if(o>=0&&(i=n.slice(o+1),n=n.slice(0,o)),n&&!t.hasOwnProperty(n))throw new Error("unknown type: "+n);return{type:n,name:i}})}Qe.prototype=xt.prototype={constructor:Qe,on:function(e,t){var n=this._,i=Io(e+"",n),o,r=-1,a=i.length;if(arguments.length<2){for(;++r<a;)if((o=(e=i[r]).type)&&(o=Vo(n[o],e.name)))return o;return}if(t!=null&&typeof t!="function")throw new Error("invalid callback: "+t);for(;++r<a;)if(o=(e=i[r]).type)n[o]=tn(n[o],e.name,t);else if(t==null)for(o in n)n[o]=tn(n[o],e.name,null);return this},copy:function(){var e={},t=this._;for(var n in t)e[n]=t[n].slice();return new Qe(e)},call:function(e,t){if((o=arguments.length-2)>0)for(var n=new Array(o),i=0,o,r;i<o;++i)n[i]=arguments[i+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(r=this._[e],i=0,o=r.length;i<o;++i)r[i].value.apply(t,n)},apply:function(e,t,n){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(var i=this._[e],o=0,r=i.length;o<r;++o)i[o].value.apply(t,n)}};function Vo(e,t){for(var n=0,i=e.length,o;n<i;++n)if((o=e[n]).name===t)return o.value}function tn(e,t,n){for(var i=0,o=e.length;i<o;++i)if(e[i].name===t){e[i]=Co,e=e.slice(0,i).concat(e.slice(i+1));break}return n!=null&&e.push({name:t,value:n}),e}var Et="http://www.w3.org/1999/xhtml";const nn={svg:"http://www.w3.org/2000/svg",xhtml:Et,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function vt(e){var t=e+="",n=t.indexOf(":");return n>=0&&(t=e.slice(0,n))!=="xmlns"&&(e=e.slice(n+1)),nn.hasOwnProperty(t)?{space:nn[t],local:e}:e}function Ao(e){return function(){var t=this.ownerDocument,n=this.namespaceURI;return n===Et&&t.documentElement.namespaceURI===Et?t.createElement(e):t.createElementNS(n,e)}}function Mo(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function Dn(e){var t=vt(e);return(t.local?Mo:Ao)(t)}function No(){}function Ut(e){return e==null?No:function(){return this.querySelector(e)}}function Eo(e){typeof e!="function"&&(e=Ut(e));for(var t=this._groups,n=t.length,i=new Array(n),o=0;o<n;++o)for(var r=t[o],a=r.length,s=i[o]=new Array(a),u,c,l=0;l<a;++l)(u=r[l])&&(c=e.call(u,u.__data__,l,r))&&("__data__"in u&&(c.__data__=u.__data__),s[l]=c);return new oe(i,this._parents)}function Ro(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function zo(){return[]}function Ln(e){return e==null?zo:function(){return this.querySelectorAll(e)}}function Oo(e){return function(){return Ro(e.apply(this,arguments))}}function Bo(e){typeof e=="function"?e=Oo(e):e=Ln(e);for(var t=this._groups,n=t.length,i=[],o=[],r=0;r<n;++r)for(var a=t[r],s=a.length,u,c=0;c<s;++c)(u=a[c])&&(i.push(e.call(u,u.__data__,c,a)),o.push(u));return new oe(i,o)}function xn(e){return function(){return this.matches(e)}}function Un(e){return function(t){return t.matches(e)}}var To=Array.prototype.find;function Fo(e){return function(){return To.call(this.children,e)}}function Ho(){return this.firstElementChild}function Po(e){return this.select(e==null?Ho:Fo(typeof e=="function"?e:Un(e)))}var _o=Array.prototype.filter;function Do(){return Array.from(this.children)}function Lo(e){return function(){return _o.call(this.children,e)}}function xo(e){return this.selectAll(e==null?Do:Lo(typeof e=="function"?e:Un(e)))}function Uo(e){typeof e!="function"&&(e=xn(e));for(var t=this._groups,n=t.length,i=new Array(n),o=0;o<n;++o)for(var r=t[o],a=r.length,s=i[o]=[],u,c=0;c<a;++c)(u=r[c])&&e.call(u,u.__data__,c,r)&&s.push(u);return new oe(i,this._parents)}function qn(e){return new Array(e.length)}function qo(){return new oe(this._enter||this._groups.map(qn),this._parents)}function lt(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}lt.prototype={constructor:lt,appendChild:function(e){return this._parent.insertBefore(e,this._next)},insertBefore:function(e,t){return this._parent.insertBefore(e,t)},querySelector:function(e){return this._parent.querySelector(e)},querySelectorAll:function(e){return this._parent.querySelectorAll(e)}};function Xo(e){return function(){return e}}function Yo(e,t,n,i,o,r){for(var a=0,s,u=t.length,c=r.length;a<c;++a)(s=t[a])?(s.__data__=r[a],i[a]=s):n[a]=new lt(e,r[a]);for(;a<u;++a)(s=t[a])&&(o[a]=s)}function Wo(e,t,n,i,o,r,a){var s,u,c=new Map,l=t.length,d=r.length,f=new Array(l),m;for(s=0;s<l;++s)(u=t[s])&&(f[s]=m=a.call(u,u.__data__,s,t)+"",c.has(m)?o[s]=u:c.set(m,u));for(s=0;s<d;++s)m=a.call(e,r[s],s,r)+"",(u=c.get(m))?(i[s]=u,u.__data__=r[s],c.delete(m)):n[s]=new lt(e,r[s]);for(s=0;s<l;++s)(u=t[s])&&c.get(f[s])===u&&(o[s]=u)}function Go(e){return e.__data__}function jo(e,t){if(!arguments.length)return Array.from(this,Go);var n=t?Wo:Yo,i=this._parents,o=this._groups;typeof e!="function"&&(e=Xo(e));for(var r=o.length,a=new Array(r),s=new Array(r),u=new Array(r),c=0;c<r;++c){var l=i[c],d=o[c],f=d.length,m=Ko(e.call(l,l&&l.__data__,c,i)),I=m.length,$=s[c]=new Array(I),w=a[c]=new Array(I),y=u[c]=new Array(f);n(l,d,$,w,y,m,t);for(var C=0,R=0,T,H;C<I;++C)if(T=$[C]){for(C>=R&&(R=C+1);!(H=w[R])&&++R<I;);T._next=H||null}}return a=new oe(a,i),a._enter=s,a._exit=u,a}function Ko(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function Jo(){return new oe(this._exit||this._groups.map(qn),this._parents)}function Zo(e,t,n){var i=this.enter(),o=this,r=this.exit();return typeof e=="function"?(i=e(i),i&&(i=i.selection())):i=i.append(e+""),t!=null&&(o=t(o),o&&(o=o.selection())),n==null?r.remove():n(r),i&&o?i.merge(o).order():o}function Qo(e){for(var t=e.selection?e.selection():e,n=this._groups,i=t._groups,o=n.length,r=i.length,a=Math.min(o,r),s=new Array(o),u=0;u<a;++u)for(var c=n[u],l=i[u],d=c.length,f=s[u]=new Array(d),m,I=0;I<d;++I)(m=c[I]||l[I])&&(f[I]=m);for(;u<o;++u)s[u]=n[u];return new oe(s,this._parents)}function er(){for(var e=this._groups,t=-1,n=e.length;++t<n;)for(var i=e[t],o=i.length-1,r=i[o],a;--o>=0;)(a=i[o])&&(r&&a.compareDocumentPosition(r)^4&&r.parentNode.insertBefore(a,r),r=a);return this}function tr(e){e||(e=nr);function t(d,f){return d&&f?e(d.__data__,f.__data__):!d-!f}for(var n=this._groups,i=n.length,o=new Array(i),r=0;r<i;++r){for(var a=n[r],s=a.length,u=o[r]=new Array(s),c,l=0;l<s;++l)(c=a[l])&&(u[l]=c);u.sort(t)}return new oe(o,this._parents).order()}function nr(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function ir(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function or(){return Array.from(this)}function rr(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var i=e[t],o=0,r=i.length;o<r;++o){var a=i[o];if(a)return a}return null}function ar(){let e=0;for(const t of this)++e;return e}function sr(){return!this.node()}function lr(e){for(var t=this._groups,n=0,i=t.length;n<i;++n)for(var o=t[n],r=0,a=o.length,s;r<a;++r)(s=o[r])&&e.call(s,s.__data__,r,o);return this}function ur(e){return function(){this.removeAttribute(e)}}function cr(e){return function(){this.removeAttributeNS(e.space,e.local)}}function dr(e,t){return function(){this.setAttribute(e,t)}}function fr(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function hr(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttribute(e):this.setAttribute(e,n)}}function mr(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,n)}}function pr(e,t){var n=vt(e);if(arguments.length<2){var i=this.node();return n.local?i.getAttributeNS(n.space,n.local):i.getAttribute(n)}return this.each((t==null?n.local?cr:ur:typeof t=="function"?n.local?mr:hr:n.local?fr:dr)(n,t))}function Xn(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function gr(e){return function(){this.style.removeProperty(e)}}function vr(e,t,n){return function(){this.style.setProperty(e,t,n)}}function yr(e,t,n){return function(){var i=t.apply(this,arguments);i==null?this.style.removeProperty(e):this.style.setProperty(e,i,n)}}function wr(e,t,n){return arguments.length>1?this.each((t==null?gr:typeof t=="function"?yr:vr)(e,t,n??"")):Me(this.node(),e)}function Me(e,t){return e.style.getPropertyValue(t)||Xn(e).getComputedStyle(e,null).getPropertyValue(t)}function br(e){return function(){delete this[e]}}function kr(e,t){return function(){this[e]=t}}function Sr(e,t){return function(){var n=t.apply(this,arguments);n==null?delete this[e]:this[e]=n}}function $r(e,t){return arguments.length>1?this.each((t==null?br:typeof t=="function"?Sr:kr)(e,t)):this.node()[e]}function Yn(e){return e.trim().split(/^|\s+/)}function qt(e){return e.classList||new Wn(e)}function Wn(e){this._node=e,this._names=Yn(e.getAttribute("class")||"")}Wn.prototype={add:function(e){var t=this._names.indexOf(e);t<0&&(this._names.push(e),this._node.setAttribute("class",this._names.join(" ")))},remove:function(e){var t=this._names.indexOf(e);t>=0&&(this._names.splice(t,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(e){return this._names.indexOf(e)>=0}};function Gn(e,t){for(var n=qt(e),i=-1,o=t.length;++i<o;)n.add(t[i])}function jn(e,t){for(var n=qt(e),i=-1,o=t.length;++i<o;)n.remove(t[i])}function Cr(e){return function(){Gn(this,e)}}function Ir(e){return function(){jn(this,e)}}function Vr(e,t){return function(){(t.apply(this,arguments)?Gn:jn)(this,e)}}function Ar(e,t){var n=Yn(e+"");if(arguments.length<2){for(var i=qt(this.node()),o=-1,r=n.length;++o<r;)if(!i.contains(n[o]))return!1;return!0}return this.each((typeof t=="function"?Vr:t?Cr:Ir)(n,t))}function Mr(){this.textContent=""}function Nr(e){return function(){this.textContent=e}}function Er(e){return function(){var t=e.apply(this,arguments);this.textContent=t??""}}function Rr(e){return arguments.length?this.each(e==null?Mr:(typeof e=="function"?Er:Nr)(e)):this.node().textContent}function zr(){this.innerHTML=""}function Or(e){return function(){this.innerHTML=e}}function Br(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t??""}}function Tr(e){return arguments.length?this.each(e==null?zr:(typeof e=="function"?Br:Or)(e)):this.node().innerHTML}function Fr(){this.nextSibling&&this.parentNode.appendChild(this)}function Hr(){return this.each(Fr)}function Pr(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function _r(){return this.each(Pr)}function Dr(e){var t=typeof e=="function"?e:Dn(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}function Lr(){return null}function xr(e,t){var n=typeof e=="function"?e:Dn(e),i=t==null?Lr:typeof t=="function"?t:Ut(t);return this.select(function(){return this.insertBefore(n.apply(this,arguments),i.apply(this,arguments)||null)})}function Ur(){var e=this.parentNode;e&&e.removeChild(this)}function qr(){return this.each(Ur)}function Xr(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function Yr(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function Wr(e){return this.select(e?Yr:Xr)}function Gr(e){return arguments.length?this.property("__data__",e):this.node().__data__}function jr(e){return function(t){e.call(this,t,this.__data__)}}function Kr(e){return e.trim().split(/^|\s+/).map(function(t){var n="",i=t.indexOf(".");return i>=0&&(n=t.slice(i+1),t=t.slice(0,i)),{type:t,name:n}})}function Jr(e){return function(){var t=this.__on;if(t){for(var n=0,i=-1,o=t.length,r;n<o;++n)r=t[n],(!e.type||r.type===e.type)&&r.name===e.name?this.removeEventListener(r.type,r.listener,r.options):t[++i]=r;++i?t.length=i:delete this.__on}}}function Zr(e,t,n){return function(){var i=this.__on,o,r=jr(t);if(i){for(var a=0,s=i.length;a<s;++a)if((o=i[a]).type===e.type&&o.name===e.name){this.removeEventListener(o.type,o.listener,o.options),this.addEventListener(o.type,o.listener=r,o.options=n),o.value=t;return}}this.addEventListener(e.type,r,n),o={type:e.type,name:e.name,value:t,listener:r,options:n},i?i.push(o):this.__on=[o]}}function Qr(e,t,n){var i=Kr(e+""),o,r=i.length,a;if(arguments.length<2){var s=this.node().__on;if(s){for(var u=0,c=s.length,l;u<c;++u)for(o=0,l=s[u];o<r;++o)if((a=i[o]).type===l.type&&a.name===l.name)return l.value}return}for(s=t?Zr:Jr,o=0;o<r;++o)this.each(s(i[o],t,n));return this}function Kn(e,t,n){var i=Xn(e),o=i.CustomEvent;typeof o=="function"?o=new o(t,n):(o=i.document.createEvent("Event"),n?(o.initEvent(t,n.bubbles,n.cancelable),o.detail=n.detail):o.initEvent(t,!1,!1)),e.dispatchEvent(o)}function ea(e,t){return function(){return Kn(this,e,t)}}function ta(e,t){return function(){return Kn(this,e,t.apply(this,arguments))}}function na(e,t){return this.each((typeof t=="function"?ta:ea)(e,t))}function*ia(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var i=e[t],o=0,r=i.length,a;o<r;++o)(a=i[o])&&(yield a)}var Jn=[null];function oe(e,t){this._groups=e,this._parents=t}function qe(){return new oe([[document.documentElement]],Jn)}function oa(){return this}oe.prototype=qe.prototype={constructor:oe,select:Eo,selectAll:Bo,selectChild:Po,selectChildren:xo,filter:Uo,data:jo,enter:qo,exit:Jo,join:Zo,merge:Qo,selection:oa,order:er,sort:tr,call:ir,nodes:or,node:rr,size:ar,empty:sr,each:lr,attr:pr,style:wr,property:$r,classed:Ar,text:Rr,html:Tr,raise:Hr,lower:_r,append:Dr,insert:xr,remove:qr,clone:Wr,datum:Gr,on:Qr,dispatch:na,[Symbol.iterator]:ia};function ye(e){return typeof e=="string"?new oe([[document.querySelector(e)]],[document.documentElement]):new oe([[e]],Jn)}function ra(e){let t;for(;t=e.sourceEvent;)e=t;return e}function ge(e,t){if(e=ra(e),t===void 0&&(t=e.currentTarget),t){var n=t.ownerSVGElement||t;if(n.createSVGPoint){var i=n.createSVGPoint();return i.x=e.clientX,i.y=e.clientY,i=i.matrixTransform(t.getScreenCTM().inverse()),[i.x,i.y]}if(t.getBoundingClientRect){var o=t.getBoundingClientRect();return[e.clientX-o.left-t.clientLeft,e.clientY-o.top-t.clientTop]}}return[e.pageX,e.pageY]}const Rt={capture:!0,passive:!1};function zt(e){e.preventDefault(),e.stopImmediatePropagation()}function aa(e){var t=e.document.documentElement,n=ye(e).on("dragstart.drag",zt,Rt);"onselectstart"in t?n.on("selectstart.drag",zt,Rt):(t.__noselect=t.style.MozUserSelect,t.style.MozUserSelect="none")}function sa(e,t){var n=e.document.documentElement,i=ye(e).on("dragstart.drag",null);t&&(i.on("click.drag",zt,Rt),setTimeout(function(){i.on("click.drag",null)},0)),"onselectstart"in n?i.on("selectstart.drag",null):(n.style.MozUserSelect=n.__noselect,delete n.__noselect)}function Xt(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function Zn(e,t){var n=Object.create(e.prototype);for(var i in t)n[i]=t[i];return n}function Xe(){}var _e=.7,ut=1/_e,Ae="\\s*([+-]?\\d+)\\s*",De="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",ue="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",la=/^#([0-9a-f]{3,8})$/,ua=new RegExp(`^rgb\\(${Ae},${Ae},${Ae}\\)$`),ca=new RegExp(`^rgb\\(${ue},${ue},${ue}\\)$`),da=new RegExp(`^rgba\\(${Ae},${Ae},${Ae},${De}\\)$`),fa=new RegExp(`^rgba\\(${ue},${ue},${ue},${De}\\)$`),ha=new RegExp(`^hsl\\(${De},${ue},${ue}\\)$`),ma=new RegExp(`^hsla\\(${De},${ue},${ue},${De}\\)$`),on={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};Xt(Xe,Le,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:rn,formatHex:rn,formatHex8:pa,formatHsl:ga,formatRgb:an,toString:an});function rn(){return this.rgb().formatHex()}function pa(){return this.rgb().formatHex8()}function ga(){return Qn(this).formatHsl()}function an(){return this.rgb().formatRgb()}function Le(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=la.exec(e))?(n=t[1].length,t=parseInt(t[1],16),n===6?sn(t):n===3?new Z(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?We(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?We(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=ua.exec(e))?new Z(t[1],t[2],t[3],1):(t=ca.exec(e))?new Z(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=da.exec(e))?We(t[1],t[2],t[3],t[4]):(t=fa.exec(e))?We(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=ha.exec(e))?cn(t[1],t[2]/100,t[3]/100,1):(t=ma.exec(e))?cn(t[1],t[2]/100,t[3]/100,t[4]):on.hasOwnProperty(e)?sn(on[e]):e==="transparent"?new Z(NaN,NaN,NaN,0):null}function sn(e){return new Z(e>>16&255,e>>8&255,e&255,1)}function We(e,t,n,i){return i<=0&&(e=t=n=NaN),new Z(e,t,n,i)}function va(e){return e instanceof Xe||(e=Le(e)),e?(e=e.rgb(),new Z(e.r,e.g,e.b,e.opacity)):new Z}function Ot(e,t,n,i){return arguments.length===1?va(e):new Z(e,t,n,i??1)}function Z(e,t,n,i){this.r=+e,this.g=+t,this.b=+n,this.opacity=+i}Xt(Z,Ot,Zn(Xe,{brighter(e){return e=e==null?ut:Math.pow(ut,e),new Z(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?_e:Math.pow(_e,e),new Z(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Z($e(this.r),$e(this.g),$e(this.b),ct(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:ln,formatHex:ln,formatHex8:ya,formatRgb:un,toString:un}));function ln(){return`#${Se(this.r)}${Se(this.g)}${Se(this.b)}`}function ya(){return`#${Se(this.r)}${Se(this.g)}${Se(this.b)}${Se((isNaN(this.opacity)?1:this.opacity)*255)}`}function un(){const e=ct(this.opacity);return`${e===1?"rgb(":"rgba("}${$e(this.r)}, ${$e(this.g)}, ${$e(this.b)}${e===1?")":`, ${e})`}`}function ct(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function $e(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Se(e){return e=$e(e),(e<16?"0":"")+e.toString(16)}function cn(e,t,n,i){return i<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new se(e,t,n,i)}function Qn(e){if(e instanceof se)return new se(e.h,e.s,e.l,e.opacity);if(e instanceof Xe||(e=Le(e)),!e)return new se;if(e instanceof se)return e;e=e.rgb();var t=e.r/255,n=e.g/255,i=e.b/255,o=Math.min(t,n,i),r=Math.max(t,n,i),a=NaN,s=r-o,u=(r+o)/2;return s?(t===r?a=(n-i)/s+(n<i)*6:n===r?a=(i-t)/s+2:a=(t-n)/s+4,s/=u<.5?r+o:2-r-o,a*=60):s=u>0&&u<1?0:a,new se(a,s,u,e.opacity)}function wa(e,t,n,i){return arguments.length===1?Qn(e):new se(e,t,n,i??1)}function se(e,t,n,i){this.h=+e,this.s=+t,this.l=+n,this.opacity=+i}Xt(se,wa,Zn(Xe,{brighter(e){return e=e==null?ut:Math.pow(ut,e),new se(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?_e:Math.pow(_e,e),new se(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,i=n+(n<.5?n:1-n)*t,o=2*n-i;return new Z(It(e>=240?e-240:e+120,o,i),It(e,o,i),It(e<120?e+240:e-120,o,i),this.opacity)},clamp(){return new se(dn(this.h),Ge(this.s),Ge(this.l),ct(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=ct(this.opacity);return`${e===1?"hsl(":"hsla("}${dn(this.h)}, ${Ge(this.s)*100}%, ${Ge(this.l)*100}%${e===1?")":`, ${e})`}`}}));function dn(e){return e=(e||0)%360,e<0?e+360:e}function Ge(e){return Math.max(0,Math.min(1,e||0))}function It(e,t,n){return(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)*255}const ei=e=>()=>e;function ba(e,t){return function(n){return e+n*t}}function ka(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(i){return Math.pow(e+i*t,n)}}function Sa(e){return(e=+e)==1?ti:function(t,n){return n-t?ka(t,n,e):ei(isNaN(t)?n:t)}}function ti(e,t){var n=t-e;return n?ba(e,n):ei(isNaN(e)?t:e)}const fn=function e(t){var n=Sa(t);function i(o,r){var a=n((o=Ot(o)).r,(r=Ot(r)).r),s=n(o.g,r.g),u=n(o.b,r.b),c=ti(o.opacity,r.opacity);return function(l){return o.r=a(l),o.g=s(l),o.b=u(l),o.opacity=c(l),o+""}}return i.gamma=e,i}(1);function ve(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}var Bt=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Vt=new RegExp(Bt.source,"g");function $a(e){return function(){return e}}function Ca(e){return function(t){return e(t)+""}}function Ia(e,t){var n=Bt.lastIndex=Vt.lastIndex=0,i,o,r,a=-1,s=[],u=[];for(e=e+"",t=t+"";(i=Bt.exec(e))&&(o=Vt.exec(t));)(r=o.index)>n&&(r=t.slice(n,r),s[a]?s[a]+=r:s[++a]=r),(i=i[0])===(o=o[0])?s[a]?s[a]+=o:s[++a]=o:(s[++a]=null,u.push({i:a,x:ve(i,o)})),n=Vt.lastIndex;return n<t.length&&(r=t.slice(n),s[a]?s[a]+=r:s[++a]=r),s.length<2?u[0]?Ca(u[0].x):$a(t):(t=u.length,function(c){for(var l=0,d;l<t;++l)s[(d=u[l]).i]=d.x(c);return s.join("")})}var hn=180/Math.PI,Tt={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function ni(e,t,n,i,o,r){var a,s,u;return(a=Math.sqrt(e*e+t*t))&&(e/=a,t/=a),(u=e*n+t*i)&&(n-=e*u,i-=t*u),(s=Math.sqrt(n*n+i*i))&&(n/=s,i/=s,u/=s),e*i<t*n&&(e=-e,t=-t,u=-u,a=-a),{translateX:o,translateY:r,rotate:Math.atan2(t,e)*hn,skewX:Math.atan(u)*hn,scaleX:a,scaleY:s}}var je;function Va(e){const t=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?Tt:ni(t.a,t.b,t.c,t.d,t.e,t.f)}function Aa(e){return e==null||(je||(je=document.createElementNS("http://www.w3.org/2000/svg","g")),je.setAttribute("transform",e),!(e=je.transform.baseVal.consolidate()))?Tt:(e=e.matrix,ni(e.a,e.b,e.c,e.d,e.e,e.f))}function ii(e,t,n,i){function o(c){return c.length?c.pop()+" ":""}function r(c,l,d,f,m,I){if(c!==d||l!==f){var $=m.push("translate(",null,t,null,n);I.push({i:$-4,x:ve(c,d)},{i:$-2,x:ve(l,f)})}else(d||f)&&m.push("translate("+d+t+f+n)}function a(c,l,d,f){c!==l?(c-l>180?l+=360:l-c>180&&(c+=360),f.push({i:d.push(o(d)+"rotate(",null,i)-2,x:ve(c,l)})):l&&d.push(o(d)+"rotate("+l+i)}function s(c,l,d,f){c!==l?f.push({i:d.push(o(d)+"skewX(",null,i)-2,x:ve(c,l)}):l&&d.push(o(d)+"skewX("+l+i)}function u(c,l,d,f,m,I){if(c!==d||l!==f){var $=m.push(o(m)+"scale(",null,",",null,")");I.push({i:$-4,x:ve(c,d)},{i:$-2,x:ve(l,f)})}else(d!==1||f!==1)&&m.push(o(m)+"scale("+d+","+f+")")}return function(c,l){var d=[],f=[];return c=e(c),l=e(l),r(c.translateX,c.translateY,l.translateX,l.translateY,d,f),a(c.rotate,l.rotate,d,f),s(c.skewX,l.skewX,d,f),u(c.scaleX,c.scaleY,l.scaleX,l.scaleY,d,f),c=l=null,function(m){for(var I=-1,$=f.length,w;++I<$;)d[(w=f[I]).i]=w.x(m);return d.join("")}}}var Ma=ii(Va,"px, ","px)","deg)"),Na=ii(Aa,", ",")",")"),Ea=1e-12;function mn(e){return((e=Math.exp(e))+1/e)/2}function Ra(e){return((e=Math.exp(e))-1/e)/2}function za(e){return((e=Math.exp(2*e))-1)/(e+1)}const Oa=function e(t,n,i){function o(r,a){var s=r[0],u=r[1],c=r[2],l=a[0],d=a[1],f=a[2],m=l-s,I=d-u,$=m*m+I*I,w,y;if($<Ea)y=Math.log(f/c)/t,w=function(_){return[s+_*m,u+_*I,c*Math.exp(t*_*y)]};else{var C=Math.sqrt($),R=(f*f-c*c+i*$)/(2*c*n*C),T=(f*f-c*c-i*$)/(2*f*n*C),H=Math.log(Math.sqrt(R*R+1)-R),P=Math.log(Math.sqrt(T*T+1)-T);y=(P-H)/t,w=function(_){var ee=_*y,de=mn(H),X=c/(n*C)*(de*za(t*ee+H)-Ra(H));return[s+X*m,u+X*I,c*de/mn(t*ee+H)]}}return w.duration=y*1e3*t/Math.SQRT2,w}return o.rho=function(r){var a=Math.max(.001,+r),s=a*a,u=s*s;return e(a,s,u)},o}(Math.SQRT2,2,4);var Ne=0,Be=0,Re=0,oi=1e3,dt,Te,ft=0,Ie=0,yt=0,xe=typeof performance=="object"&&performance.now?performance:Date,ri=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function Yt(){return Ie||(ri(Ba),Ie=xe.now()+yt)}function Ba(){Ie=0}function ht(){this._call=this._time=this._next=null}ht.prototype=ai.prototype={constructor:ht,restart:function(e,t,n){if(typeof e!="function")throw new TypeError("callback is not a function");n=(n==null?Yt():+n)+(t==null?0:+t),!this._next&&Te!==this&&(Te?Te._next=this:dt=this,Te=this),this._call=e,this._time=n,Ft()},stop:function(){this._call&&(this._call=null,this._time=1/0,Ft())}};function ai(e,t,n){var i=new ht;return i.restart(e,t,n),i}function Ta(){Yt(),++Ne;for(var e=dt,t;e;)(t=Ie-e._time)>=0&&e._call.call(void 0,t),e=e._next;--Ne}function pn(){Ie=(ft=xe.now())+yt,Ne=Be=0;try{Ta()}finally{Ne=0,Ha(),Ie=0}}function Fa(){var e=xe.now(),t=e-ft;t>oi&&(yt-=t,ft=e)}function Ha(){for(var e,t=dt,n,i=1/0;t;)t._call?(i>t._time&&(i=t._time),e=t,t=t._next):(n=t._next,t._next=null,t=e?e._next=n:dt=n);Te=e,Ft(i)}function Ft(e){if(!Ne){Be&&(Be=clearTimeout(Be));var t=e-Ie;t>24?(e<1/0&&(Be=setTimeout(pn,e-xe.now()-yt)),Re&&(Re=clearInterval(Re))):(Re||(ft=xe.now(),Re=setInterval(Fa,oi)),Ne=1,ri(pn))}}function gn(e,t,n){var i=new ht;return t=t==null?0:+t,i.restart(o=>{i.stop(),e(o+t)},t,n),i}var Pa=xt("start","end","cancel","interrupt"),_a=[],si=0,vn=1,Ht=2,et=3,yn=4,Pt=5,tt=6;function wt(e,t,n,i,o,r){var a=e.__transition;if(!a)e.__transition={};else if(n in a)return;Da(e,n,{name:t,index:i,group:o,on:Pa,tween:_a,time:r.time,delay:r.delay,duration:r.duration,ease:r.ease,timer:null,state:si})}function Wt(e,t){var n=le(e,t);if(n.state>si)throw new Error("too late; already scheduled");return n}function ce(e,t){var n=le(e,t);if(n.state>et)throw new Error("too late; already running");return n}function le(e,t){var n=e.__transition;if(!n||!(n=n[t]))throw new Error("transition not found");return n}function Da(e,t,n){var i=e.__transition,o;i[t]=n,n.timer=ai(r,0,n.time);function r(c){n.state=vn,n.timer.restart(a,n.delay,n.time),n.delay<=c&&a(c-n.delay)}function a(c){var l,d,f,m;if(n.state!==vn)return u();for(l in i)if(m=i[l],m.name===n.name){if(m.state===et)return gn(a);m.state===yn?(m.state=tt,m.timer.stop(),m.on.call("interrupt",e,e.__data__,m.index,m.group),delete i[l]):+l<t&&(m.state=tt,m.timer.stop(),m.on.call("cancel",e,e.__data__,m.index,m.group),delete i[l])}if(gn(function(){n.state===et&&(n.state=yn,n.timer.restart(s,n.delay,n.time),s(c))}),n.state=Ht,n.on.call("start",e,e.__data__,n.index,n.group),n.state===Ht){for(n.state=et,o=new Array(f=n.tween.length),l=0,d=-1;l<f;++l)(m=n.tween[l].value.call(e,e.__data__,n.index,n.group))&&(o[++d]=m);o.length=d+1}}function s(c){for(var l=c<n.duration?n.ease.call(null,c/n.duration):(n.timer.restart(u),n.state=Pt,1),d=-1,f=o.length;++d<f;)o[d].call(e,l);n.state===Pt&&(n.on.call("end",e,e.__data__,n.index,n.group),u())}function u(){n.state=tt,n.timer.stop(),delete i[t];for(var c in i)return;delete e.__transition}}function nt(e,t){var n=e.__transition,i,o,r=!0,a;if(n){t=t==null?null:t+"";for(a in n){if((i=n[a]).name!==t){r=!1;continue}o=i.state>Ht&&i.state<Pt,i.state=tt,i.timer.stop(),i.on.call(o?"interrupt":"cancel",e,e.__data__,i.index,i.group),delete n[a]}r&&delete e.__transition}}function La(e){return this.each(function(){nt(this,e)})}function xa(e,t){var n,i;return function(){var o=ce(this,e),r=o.tween;if(r!==n){i=n=r;for(var a=0,s=i.length;a<s;++a)if(i[a].name===t){i=i.slice(),i.splice(a,1);break}}o.tween=i}}function Ua(e,t,n){var i,o;if(typeof n!="function")throw new Error;return function(){var r=ce(this,e),a=r.tween;if(a!==i){o=(i=a).slice();for(var s={name:t,value:n},u=0,c=o.length;u<c;++u)if(o[u].name===t){o[u]=s;break}u===c&&o.push(s)}r.tween=o}}function qa(e,t){var n=this._id;if(e+="",arguments.length<2){for(var i=le(this.node(),n).tween,o=0,r=i.length,a;o<r;++o)if((a=i[o]).name===e)return a.value;return null}return this.each((t==null?xa:Ua)(n,e,t))}function Gt(e,t,n){var i=e._id;return e.each(function(){var o=ce(this,i);(o.value||(o.value={}))[t]=n.apply(this,arguments)}),function(o){return le(o,i).value[t]}}function li(e,t){var n;return(typeof t=="number"?ve:t instanceof Le?fn:(n=Le(t))?(t=n,fn):Ia)(e,t)}function Xa(e){return function(){this.removeAttribute(e)}}function Ya(e){return function(){this.removeAttributeNS(e.space,e.local)}}function Wa(e,t,n){var i,o=n+"",r;return function(){var a=this.getAttribute(e);return a===o?null:a===i?r:r=t(i=a,n)}}function Ga(e,t,n){var i,o=n+"",r;return function(){var a=this.getAttributeNS(e.space,e.local);return a===o?null:a===i?r:r=t(i=a,n)}}function ja(e,t,n){var i,o,r;return function(){var a,s=n(this),u;return s==null?void this.removeAttribute(e):(a=this.getAttribute(e),u=s+"",a===u?null:a===i&&u===o?r:(o=u,r=t(i=a,s)))}}function Ka(e,t,n){var i,o,r;return function(){var a,s=n(this),u;return s==null?void this.removeAttributeNS(e.space,e.local):(a=this.getAttributeNS(e.space,e.local),u=s+"",a===u?null:a===i&&u===o?r:(o=u,r=t(i=a,s)))}}function Ja(e,t){var n=vt(e),i=n==="transform"?Na:li;return this.attrTween(e,typeof t=="function"?(n.local?Ka:ja)(n,i,Gt(this,"attr."+e,t)):t==null?(n.local?Ya:Xa)(n):(n.local?Ga:Wa)(n,i,t))}function Za(e,t){return function(n){this.setAttribute(e,t.call(this,n))}}function Qa(e,t){return function(n){this.setAttributeNS(e.space,e.local,t.call(this,n))}}function es(e,t){var n,i;function o(){var r=t.apply(this,arguments);return r!==i&&(n=(i=r)&&Qa(e,r)),n}return o._value=t,o}function ts(e,t){var n,i;function o(){var r=t.apply(this,arguments);return r!==i&&(n=(i=r)&&Za(e,r)),n}return o._value=t,o}function ns(e,t){var n="attr."+e;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(t==null)return this.tween(n,null);if(typeof t!="function")throw new Error;var i=vt(e);return this.tween(n,(i.local?es:ts)(i,t))}function is(e,t){return function(){Wt(this,e).delay=+t.apply(this,arguments)}}function os(e,t){return t=+t,function(){Wt(this,e).delay=t}}function rs(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?is:os)(t,e)):le(this.node(),t).delay}function as(e,t){return function(){ce(this,e).duration=+t.apply(this,arguments)}}function ss(e,t){return t=+t,function(){ce(this,e).duration=t}}function ls(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?as:ss)(t,e)):le(this.node(),t).duration}function us(e,t){if(typeof t!="function")throw new Error;return function(){ce(this,e).ease=t}}function cs(e){var t=this._id;return arguments.length?this.each(us(t,e)):le(this.node(),t).ease}function ds(e,t){return function(){var n=t.apply(this,arguments);if(typeof n!="function")throw new Error;ce(this,e).ease=n}}function fs(e){if(typeof e!="function")throw new Error;return this.each(ds(this._id,e))}function hs(e){typeof e!="function"&&(e=xn(e));for(var t=this._groups,n=t.length,i=new Array(n),o=0;o<n;++o)for(var r=t[o],a=r.length,s=i[o]=[],u,c=0;c<a;++c)(u=r[c])&&e.call(u,u.__data__,c,r)&&s.push(u);return new pe(i,this._parents,this._name,this._id)}function ms(e){if(e._id!==this._id)throw new Error;for(var t=this._groups,n=e._groups,i=t.length,o=n.length,r=Math.min(i,o),a=new Array(i),s=0;s<r;++s)for(var u=t[s],c=n[s],l=u.length,d=a[s]=new Array(l),f,m=0;m<l;++m)(f=u[m]||c[m])&&(d[m]=f);for(;s<i;++s)a[s]=t[s];return new pe(a,this._parents,this._name,this._id)}function ps(e){return(e+"").trim().split(/^|\s+/).every(function(t){var n=t.indexOf(".");return n>=0&&(t=t.slice(0,n)),!t||t==="start"})}function gs(e,t,n){var i,o,r=ps(t)?Wt:ce;return function(){var a=r(this,e),s=a.on;s!==i&&(o=(i=s).copy()).on(t,n),a.on=o}}function vs(e,t){var n=this._id;return arguments.length<2?le(this.node(),n).on.on(e):this.each(gs(n,e,t))}function ys(e){return function(){var t=this.parentNode;for(var n in this.__transition)if(+n!==e)return;t&&t.removeChild(this)}}function ws(){return this.on("end.remove",ys(this._id))}function bs(e){var t=this._name,n=this._id;typeof e!="function"&&(e=Ut(e));for(var i=this._groups,o=i.length,r=new Array(o),a=0;a<o;++a)for(var s=i[a],u=s.length,c=r[a]=new Array(u),l,d,f=0;f<u;++f)(l=s[f])&&(d=e.call(l,l.__data__,f,s))&&("__data__"in l&&(d.__data__=l.__data__),c[f]=d,wt(c[f],t,n,f,c,le(l,n)));return new pe(r,this._parents,t,n)}function ks(e){var t=this._name,n=this._id;typeof e!="function"&&(e=Ln(e));for(var i=this._groups,o=i.length,r=[],a=[],s=0;s<o;++s)for(var u=i[s],c=u.length,l,d=0;d<c;++d)if(l=u[d]){for(var f=e.call(l,l.__data__,d,u),m,I=le(l,n),$=0,w=f.length;$<w;++$)(m=f[$])&&wt(m,t,n,$,f,I);r.push(f),a.push(l)}return new pe(r,a,t,n)}var Ss=qe.prototype.constructor;function $s(){return new Ss(this._groups,this._parents)}function Cs(e,t){var n,i,o;return function(){var r=Me(this,e),a=(this.style.removeProperty(e),Me(this,e));return r===a?null:r===n&&a===i?o:o=t(n=r,i=a)}}function ui(e){return function(){this.style.removeProperty(e)}}function Is(e,t,n){var i,o=n+"",r;return function(){var a=Me(this,e);return a===o?null:a===i?r:r=t(i=a,n)}}function Vs(e,t,n){var i,o,r;return function(){var a=Me(this,e),s=n(this),u=s+"";return s==null&&(u=s=(this.style.removeProperty(e),Me(this,e))),a===u?null:a===i&&u===o?r:(o=u,r=t(i=a,s))}}function As(e,t){var n,i,o,r="style."+t,a="end."+r,s;return function(){var u=ce(this,e),c=u.on,l=u.value[r]==null?s||(s=ui(t)):void 0;(c!==n||o!==l)&&(i=(n=c).copy()).on(a,o=l),u.on=i}}function Ms(e,t,n){var i=(e+="")=="transform"?Ma:li;return t==null?this.styleTween(e,Cs(e,i)).on("end.style."+e,ui(e)):typeof t=="function"?this.styleTween(e,Vs(e,i,Gt(this,"style."+e,t))).each(As(this._id,e)):this.styleTween(e,Is(e,i,t),n).on("end.style."+e,null)}function Ns(e,t,n){return function(i){this.style.setProperty(e,t.call(this,i),n)}}function Es(e,t,n){var i,o;function r(){var a=t.apply(this,arguments);return a!==o&&(i=(o=a)&&Ns(e,a,n)),i}return r._value=t,r}function Rs(e,t,n){var i="style."+(e+="");if(arguments.length<2)return(i=this.tween(i))&&i._value;if(t==null)return this.tween(i,null);if(typeof t!="function")throw new Error;return this.tween(i,Es(e,t,n??""))}function zs(e){return function(){this.textContent=e}}function Os(e){return function(){var t=e(this);this.textContent=t??""}}function Bs(e){return this.tween("text",typeof e=="function"?Os(Gt(this,"text",e)):zs(e==null?"":e+""))}function Ts(e){return function(t){this.textContent=e.call(this,t)}}function Fs(e){var t,n;function i(){var o=e.apply(this,arguments);return o!==n&&(t=(n=o)&&Ts(o)),t}return i._value=e,i}function Hs(e){var t="text";if(arguments.length<1)return(t=this.tween(t))&&t._value;if(e==null)return this.tween(t,null);if(typeof e!="function")throw new Error;return this.tween(t,Fs(e))}function Ps(){for(var e=this._name,t=this._id,n=ci(),i=this._groups,o=i.length,r=0;r<o;++r)for(var a=i[r],s=a.length,u,c=0;c<s;++c)if(u=a[c]){var l=le(u,t);wt(u,e,n,c,a,{time:l.time+l.delay+l.duration,delay:0,duration:l.duration,ease:l.ease})}return new pe(i,this._parents,e,n)}function _s(){var e,t,n=this,i=n._id,o=n.size();return new Promise(function(r,a){var s={value:a},u={value:function(){--o===0&&r()}};n.each(function(){var c=ce(this,i),l=c.on;l!==e&&(t=(e=l).copy(),t._.cancel.push(s),t._.interrupt.push(s),t._.end.push(u)),c.on=t}),o===0&&r()})}var Ds=0;function pe(e,t,n,i){this._groups=e,this._parents=t,this._name=n,this._id=i}function ci(){return++Ds}var fe=qe.prototype;pe.prototype={constructor:pe,select:bs,selectAll:ks,selectChild:fe.selectChild,selectChildren:fe.selectChildren,filter:hs,merge:ms,selection:$s,transition:Ps,call:fe.call,nodes:fe.nodes,node:fe.node,size:fe.size,empty:fe.empty,each:fe.each,on:vs,attr:Ja,attrTween:ns,style:Ms,styleTween:Rs,text:Bs,textTween:Hs,remove:ws,tween:qa,delay:rs,duration:ls,ease:cs,easeVarying:fs,end:_s,[Symbol.iterator]:fe[Symbol.iterator]};function Ls(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var xs={time:null,delay:0,duration:250,ease:Ls};function Us(e,t){for(var n;!(n=e.__transition)||!(n=n[t]);)if(!(e=e.parentNode))throw new Error(`transition ${t} not found`);return n}function qs(e){var t,n;e instanceof pe?(t=e._id,e=e._name):(t=ci(),(n=xs).time=Yt(),e=e==null?null:e+"");for(var i=this._groups,o=i.length,r=0;r<o;++r)for(var a=i[r],s=a.length,u,c=0;c<s;++c)(u=a[c])&&wt(u,e,t,c,a,n||Us(u,t));return new pe(i,this._parents,e,t)}qe.prototype.interrupt=La;qe.prototype.transition=qs;const Ke=e=>()=>e;function Xs(e,{sourceEvent:t,target:n,transform:i,dispatch:o}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},target:{value:n,enumerable:!0,configurable:!0},transform:{value:i,enumerable:!0,configurable:!0},_:{value:o}})}function me(e,t,n){this.k=e,this.x=t,this.y=n}me.prototype={constructor:me,scale:function(e){return e===1?this:new me(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new me(this.k,this.x+this.k*e,this.y+this.k*t)},apply:function(e){return[e[0]*this.k+this.x,e[1]*this.k+this.y]},applyX:function(e){return e*this.k+this.x},applyY:function(e){return e*this.k+this.y},invert:function(e){return[(e[0]-this.x)/this.k,(e[1]-this.y)/this.k]},invertX:function(e){return(e-this.x)/this.k},invertY:function(e){return(e-this.y)/this.k},rescaleX:function(e){return e.copy().domain(e.range().map(this.invertX,this).map(e.invert,e))},rescaleY:function(e){return e.copy().domain(e.range().map(this.invertY,this).map(e.invert,e))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var jt=new me(1,0,0);me.prototype;function At(e){e.stopImmediatePropagation()}function ze(e){e.preventDefault(),e.stopImmediatePropagation()}function Ys(e){return(!e.ctrlKey||e.type==="wheel")&&!e.button}function Ws(){var e=this;return e instanceof SVGElement?(e=e.ownerSVGElement||e,e.hasAttribute("viewBox")?(e=e.viewBox.baseVal,[[e.x,e.y],[e.x+e.width,e.y+e.height]]):[[0,0],[e.width.baseVal.value,e.height.baseVal.value]]):[[0,0],[e.clientWidth,e.clientHeight]]}function wn(){return this.__zoom||jt}function Gs(e){return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*(e.ctrlKey?10:1)}function js(){return navigator.maxTouchPoints||"ontouchstart"in this}function Ks(e,t,n){var i=e.invertX(t[0][0])-n[0][0],o=e.invertX(t[1][0])-n[1][0],r=e.invertY(t[0][1])-n[0][1],a=e.invertY(t[1][1])-n[1][1];return e.translate(o>i?(i+o)/2:Math.min(0,i)||Math.max(0,o),a>r?(r+a)/2:Math.min(0,r)||Math.max(0,a))}function Js(){var e=Ys,t=Ws,n=Ks,i=Gs,o=js,r=[0,1/0],a=[[-1/0,-1/0],[1/0,1/0]],s=250,u=Oa,c=xt("start","zoom","end"),l,d,f,m=500,I=150,$=0,w=10;function y(h){h.property("__zoom",wn).on("wheel.zoom",ee,{passive:!1}).on("mousedown.zoom",de).on("dblclick.zoom",X).filter(o).on("touchstart.zoom",kt).on("touchmove.zoom",St).on("touchend.zoom touchcancel.zoom",$t).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}y.transform=function(h,N,v,E){var b=h.selection?h.selection():h;b.property("__zoom",wn),h!==b?H(h,N,v,E):b.interrupt().each(function(){P(this,arguments).event(E).start().zoom(null,typeof N=="function"?N.apply(this,arguments):N).end()})},y.scaleBy=function(h,N,v,E){y.scaleTo(h,function(){var b=this.__zoom.k,M=typeof N=="function"?N.apply(this,arguments):N;return b*M},v,E)},y.scaleTo=function(h,N,v,E){y.transform(h,function(){var b=t.apply(this,arguments),M=this.__zoom,k=v==null?T(b):typeof v=="function"?v.apply(this,arguments):v,F=M.invert(k),U=typeof N=="function"?N.apply(this,arguments):N;return n(R(C(M,U),k,F),b,a)},v,E)},y.translateBy=function(h,N,v,E){y.transform(h,function(){return n(this.__zoom.translate(typeof N=="function"?N.apply(this,arguments):N,typeof v=="function"?v.apply(this,arguments):v),t.apply(this,arguments),a)},null,E)},y.translateTo=function(h,N,v,E,b){y.transform(h,function(){var M=t.apply(this,arguments),k=this.__zoom,F=E==null?T(M):typeof E=="function"?E.apply(this,arguments):E;return n(jt.translate(F[0],F[1]).scale(k.k).translate(typeof N=="function"?-N.apply(this,arguments):-N,typeof v=="function"?-v.apply(this,arguments):-v),M,a)},E,b)};function C(h,N){return N=Math.max(r[0],Math.min(r[1],N)),N===h.k?h:new me(N,h.x,h.y)}function R(h,N,v){var E=N[0]-v[0]*h.k,b=N[1]-v[1]*h.k;return E===h.x&&b===h.y?h:new me(h.k,E,b)}function T(h){return[(+h[0][0]+ +h[1][0])/2,(+h[0][1]+ +h[1][1])/2]}function H(h,N,v,E){h.on("start.zoom",function(){P(this,arguments).event(E).start()}).on("interrupt.zoom end.zoom",function(){P(this,arguments).event(E).end()}).tween("zoom",function(){var b=this,M=arguments,k=P(b,M).event(E),F=t.apply(b,M),U=v==null?T(F):typeof v=="function"?v.apply(b,M):v,Y=Math.max(F[1][0]-F[0][0],F[1][1]-F[0][1]),q=b.__zoom,G=typeof N=="function"?N.apply(b,M):N,re=u(q.invert(U).concat(Y/q.k),G.invert(U).concat(Y/G.k));return function(te){if(te===1)te=G;else{var ae=re(te),Ct=Y/ae[2];te=new me(Ct,U[0]-ae[0]*Ct,U[1]-ae[1]*Ct)}k.zoom(null,te)}})}function P(h,N,v){return!v&&h.__zooming||new _(h,N)}function _(h,N){this.that=h,this.args=N,this.active=0,this.sourceEvent=null,this.extent=t.apply(h,N),this.taps=0}_.prototype={event:function(h){return h&&(this.sourceEvent=h),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(h,N){return this.mouse&&h!=="mouse"&&(this.mouse[1]=N.invert(this.mouse[0])),this.touch0&&h!=="touch"&&(this.touch0[1]=N.invert(this.touch0[0])),this.touch1&&h!=="touch"&&(this.touch1[1]=N.invert(this.touch1[0])),this.that.__zoom=N,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(h){var N=ye(this.that).datum();c.call(h,this.that,new Xs(h,{sourceEvent:this.sourceEvent,target:y,transform:this.that.__zoom,dispatch:c}),N)}};function ee(h,...N){if(!e.apply(this,arguments))return;var v=P(this,N).event(h),E=this.__zoom,b=Math.max(r[0],Math.min(r[1],E.k*Math.pow(2,i.apply(this,arguments)))),M=ge(h);if(v.wheel)(v.mouse[0][0]!==M[0]||v.mouse[0][1]!==M[1])&&(v.mouse[1]=E.invert(v.mouse[0]=M)),clearTimeout(v.wheel);else{if(E.k===b)return;v.mouse=[M,E.invert(M)],nt(this),v.start()}ze(h),v.wheel=setTimeout(k,I),v.zoom("mouse",n(R(C(E,b),v.mouse[0],v.mouse[1]),v.extent,a));function k(){v.wheel=null,v.end()}}function de(h,...N){if(f||!e.apply(this,arguments))return;var v=h.currentTarget,E=P(this,N,!0).event(h),b=ye(h.view).on("mousemove.zoom",U,!0).on("mouseup.zoom",Y,!0),M=ge(h,v),k=h.clientX,F=h.clientY;aa(h.view),At(h),E.mouse=[M,this.__zoom.invert(M)],nt(this),E.start();function U(q){if(ze(q),!E.moved){var G=q.clientX-k,re=q.clientY-F;E.moved=G*G+re*re>$}E.event(q).zoom("mouse",n(R(E.that.__zoom,E.mouse[0]=ge(q,v),E.mouse[1]),E.extent,a))}function Y(q){b.on("mousemove.zoom mouseup.zoom",null),sa(q.view,E.moved),ze(q),E.event(q).end()}}function X(h,...N){if(e.apply(this,arguments)){var v=this.__zoom,E=ge(h.changedTouches?h.changedTouches[0]:h,this),b=v.invert(E),M=v.k*(h.shiftKey?.5:2),k=n(R(C(v,M),E,b),t.apply(this,N),a);ze(h),s>0?ye(this).transition().duration(s).call(H,k,E,h):ye(this).call(y.transform,k,E,h)}}function kt(h,...N){if(e.apply(this,arguments)){var v=h.touches,E=v.length,b=P(this,N,h.changedTouches.length===E).event(h),M,k,F,U;for(At(h),k=0;k<E;++k)F=v[k],U=ge(F,this),U=[U,this.__zoom.invert(U),F.identifier],b.touch0?!b.touch1&&b.touch0[2]!==U[2]&&(b.touch1=U,b.taps=0):(b.touch0=U,M=!0,b.taps=1+!!l);l&&(l=clearTimeout(l)),M&&(b.taps<2&&(d=U[0],l=setTimeout(function(){l=null},m)),nt(this),b.start())}}function St(h,...N){if(this.__zooming){var v=P(this,N).event(h),E=h.changedTouches,b=E.length,M,k,F,U;for(ze(h),M=0;M<b;++M)k=E[M],F=ge(k,this),v.touch0&&v.touch0[2]===k.identifier?v.touch0[0]=F:v.touch1&&v.touch1[2]===k.identifier&&(v.touch1[0]=F);if(k=v.that.__zoom,v.touch1){var Y=v.touch0[0],q=v.touch0[1],G=v.touch1[0],re=v.touch1[1],te=(te=G[0]-Y[0])*te+(te=G[1]-Y[1])*te,ae=(ae=re[0]-q[0])*ae+(ae=re[1]-q[1])*ae;k=C(k,Math.sqrt(te/ae)),F=[(Y[0]+G[0])/2,(Y[1]+G[1])/2],U=[(q[0]+re[0])/2,(q[1]+re[1])/2]}else if(v.touch0)F=v.touch0[0],U=v.touch0[1];else return;v.zoom("touch",n(R(k,F,U),v.extent,a))}}function $t(h,...N){if(this.__zooming){var v=P(this,N).event(h),E=h.changedTouches,b=E.length,M,k;for(At(h),f&&clearTimeout(f),f=setTimeout(function(){f=null},m),M=0;M<b;++M)k=E[M],v.touch0&&v.touch0[2]===k.identifier?delete v.touch0:v.touch1&&v.touch1[2]===k.identifier&&delete v.touch1;if(v.touch1&&!v.touch0&&(v.touch0=v.touch1,delete v.touch1),v.touch0)v.touch0[1]=this.__zoom.invert(v.touch0[0]);else if(v.end(),v.taps===2&&(k=ge(k,this),Math.hypot(d[0]-k[0],d[1]-k[1])<w)){var F=ye(this).on("dblclick.zoom");F&&F.apply(this,arguments)}}}return y.wheelDelta=function(h){return arguments.length?(i=typeof h=="function"?h:Ke(+h),y):i},y.filter=function(h){return arguments.length?(e=typeof h=="function"?h:Ke(!!h),y):e},y.touchable=function(h){return arguments.length?(o=typeof h=="function"?h:Ke(!!h),y):o},y.extent=function(h){return arguments.length?(t=typeof h=="function"?h:Ke([[+h[0][0],+h[0][1]],[+h[1][0],+h[1][1]]]),y):t},y.scaleExtent=function(h){return arguments.length?(r[0]=+h[0],r[1]=+h[1],y):[r[0],r[1]]},y.translateExtent=function(h){return arguments.length?(a[0][0]=+h[0][0],a[1][0]=+h[1][0],a[0][1]=+h[0][1],a[1][1]=+h[1][1],y):[[a[0][0],a[0][1]],[a[1][0],a[1][1]]]},y.constrain=function(h){return arguments.length?(n=h,y):n},y.duration=function(h){return arguments.length?(s=+h,y):s},y.interpolate=function(h){return arguments.length?(u=h,y):u},y.on=function(){var h=c.on.apply(c,arguments);return h===c?y:h},y.clickDistance=function(h){return arguments.length?($=(h=+h)*h,y):Math.sqrt($)},y.tapDistance=function(h){return arguments.length?(w=+h,y):w},y}const di=Symbol("MiniMapSlots"),Zs=["id","x","y","rx","ry","width","height","fill","stroke","stroke-width","shape-rendering"],Qs={name:"MiniMapNode",compatConfig:{MODE:3},inheritAttrs:!1},el=x({...Qs,props:{id:{},type:{},selected:{type:Boolean},dragging:{type:Boolean},position:{},dimensions:{},borderRadius:{},color:{},shapeRendering:{},strokeColor:{},strokeWidth:{},hidden:{type:Boolean}},emits:["click","dblclick","mouseenter","mousemove","mouseleave"],setup(e,{emit:t}){const n=e,i=Fi(di),o=En(),r=Fe(()=>o.style??{});function a(d){t("click",d)}function s(d){t("dblclick",d)}function u(d){t("mouseenter",d)}function c(d){t("mousemove",d)}function l(d){t("mouseleave",d)}return(d,f)=>!d.hidden&&d.dimensions.width!==0&&d.dimensions.height!==0?(g(),z(D,{key:0},[p(i)[`node-${n.type}`]?(g(),A(Hi(p(i)[`node-${n.type}`]),Ve(rt({key:0},{...n,...d.$attrs})),null,16)):(g(),z("rect",rt({key:1,id:d.id},d.$attrs,{class:["vue-flow__minimap-node",{selected:d.selected,dragging:d.dragging}],x:d.position.x,y:d.position.y,rx:d.borderRadius,ry:d.borderRadius,width:d.dimensions.width,height:d.dimensions.height,fill:d.color||r.value.background||r.value.backgroundColor,stroke:d.strokeColor,"stroke-width":d.strokeWidth,"shape-rendering":d.shapeRendering,onClick:a,onDblclick:s,onMouseenter:u,onMousemove:c,onMouseleave:l}),null,16,Zs))],64)):B("",!0)}}),tl=["width","height","viewBox","aria-labelledby"],nl=["id"],il=["d","fill","stroke","stroke-width"],ol={name:"MiniMap",compatConfig:{MODE:3}},rl=x({...ol,props:{nodeColor:{type:[String,Function],default:"#e2e2e2"},nodeStrokeColor:{type:[String,Function],default:"transparent"},nodeClassName:{type:[String,Function]},nodeBorderRadius:{default:5},nodeStrokeWidth:{default:2},maskColor:{default:"rgb(240, 240, 240, 0.6)"},maskStrokeColor:{default:"none"},maskStrokeWidth:{default:1},position:{default:"bottom-right"},pannable:{type:Boolean,default:!1},zoomable:{type:Boolean,default:!1},width:{},height:{},ariaLabel:{default:"Vue Flow mini map"},inversePan:{type:Boolean,default:!1},zoomStep:{default:10},offsetScale:{default:5},maskBorderRadius:{default:0}},emits:["click","nodeClick","nodeDblclick","nodeMouseenter","nodeMousemove","nodeMouseleave"],setup(e,{emit:t}){const n=Bi(),i=En(),o=200,r=150,{id:a,edges:s,viewport:u,translateExtent:c,dimensions:l,emits:d,d3Selection:f,d3Zoom:m,getNodesInitialized:I}=_t(),$=He();Pi(di,n);const w=Fe(()=>{var b;return e.width??((b=i.style)==null?void 0:b.width)??o}),y=Fe(()=>{var b;return e.height??((b=i.style)==null?void 0:b.height)??r}),C=typeof window>"u"||window.chrome?"crispEdges":"geometricPrecision",R=O(()=>typeof e.nodeColor=="string"?()=>e.nodeColor:e.nodeColor),T=O(()=>typeof e.nodeStrokeColor=="string"?()=>e.nodeStrokeColor:e.nodeStrokeColor),H=O(()=>typeof e.nodeClassName=="string"?()=>e.nodeClassName:typeof e.nodeClassName=="function"?e.nodeClassName:()=>""),P=O(()=>ki(I.value.filter(b=>!b.hidden))),_=O(()=>({x:-u.value.x/u.value.zoom,y:-u.value.y/u.value.zoom,width:l.value.width/u.value.zoom,height:l.value.height/u.value.zoom})),ee=O(()=>I.value&&I.value.length?Si(P.value,_.value):_.value),de=O(()=>{const b=ee.value.width/w.value,M=ee.value.height/y.value;return Math.max(b,M)}),X=O(()=>{const b=de.value*w.value,M=de.value*y.value,k=e.offsetScale*de.value;return{offset:k,x:ee.value.x-(b-ee.value.width)/2-k,y:ee.value.y-(M-ee.value.height)/2-k,width:b+k*2,height:M+k*2}}),kt=O(()=>!X.value.x||!X.value.y?"":`
1
+ import{av as _t,aw as vi,ax as kn,ay as yi,az as Sn,aA as wi,l as bi,_ as Q,aB as $n,aC as ot,aD as Dt,aE as Cn,aF as In,aG as ki,aH as Si,aI as Ze,aJ as Ee,aK as $i,aL as Ci,ao as Ii,aM as Vn,aN as Vi,i as Mt,aO as Kt,aP as Ai,aQ as Mi,ad as Ni,I as An,aR as Mn,aq as Ei,aS as Ri,aT as zi,aU as Jt}from"#entry";import{F as x,j as O,L as z,W as g,a9 as D,af as ie,b4 as Oi,_ as B,aa as ke,Z as A,aE as Lt,G as p,a1 as S,X as V,ab as J,a0 as K,a2 as L,$ as W,ac as Ce,t as Fe,H as Nn,ae as Bi,a7 as En,r as He,q as Ti,a3 as j,i as Fi,ak as Ve,a8 as rt,a5 as Hi,I as Pi,b5 as _i,al as Oe,aT as Rn,aO as we,av as Ue,az as zn,b6 as Di,b7 as Li,aK as On,b8 as xi,w as Ui,a as Bn,aw as Tn,aA as be,ay as pt,ax as qi,b as Nt,aM as Fn,aC as gt,aD as Pe,ai as ne,n as at,aI as Xi,a$ as Yi,aH as Wi,aP as st,aS as Gi,aj as ji,aW as Ki}from"./CJ9AjueP.js";import{C as Zt,s as Ji,a as Hn,_ as Zi}from"./BDCIi1Fb.js";import"./BmhnSWN5.js";import{V as Qt}from"./ClBsnNkh.js";import{I as Qi}from"./Cvl8iHT_.js";import{_ as eo}from"./DnodTinn.js";function to(e,t){let n=t.length-e.length;if(n===1){let[i,...o]=t;return Zt(i,{lazy:e,lazyArgs:o})}if(n===0){let i={lazy:e,lazyArgs:t};return Object.assign(o=>Zt(o,i),i)}throw new Error("Wrong number of arguments")}function no(...e){return to(io,e)}function io(){let e=new Set;return t=>e.has(t)?Ji:(e.add(t),{done:!1,hasNext:!0,next:t})}function oo(e,t,n){const i=Array.from({length:n},()=>[]),o=t,a=-(o*(n-1))/2,s=Array.from({length:n},(l,d)=>a+d*o),u=[];for(let l=0;l<e.length-1;l++){const d=e[l],f=e[l+1],m=f[0]-d[0],I=f[1]-d[1],$=Math.sqrt(m*m+I*I);let w=-I,y=m;$!==0&&(w/=$,y/=$),u.push({x:w,y})}function c(l,d,f,m){const I=l[0],$=l[1],w=d[0],y=d[1],C=f[0],R=f[1],T=m[0],H=m[1],P=(I-w)*(R-H)-($-y)*(C-T);if(P===0)return null;const _=((I-C)*(R-H)-($-R)*(C-T))/P;return[I+_*(w-I),$+_*(y-$)]}for(let l=0;l<n;l++)for(let d=0;d<e.length;d++){const f=e[d];let m=0,I=0;if(d===0)m=u[0].x*s[l],I=u[0].y*s[l];else if(d===e.length-1)m=u[u.length-1].x*s[l],I=u[u.length-1].y*s[l];else{const $=u[d-1],w=u[d],y=e[d-1],C=e[d+1],R=[y[0]+$.x*s[l],y[1]+$.y*s[l]],T=[f[0]+$.x*s[l],f[1]+$.y*s[l]],H=[f[0]+w.x*s[l],f[1]+w.y*s[l]],P=[C[0]+w.x*s[l],C[1]+w.y*s[l]],_=c(R,T,H,P);_?(m=_[0]-f[0],I=_[1]-f[1]):(m=($.x+w.x)/2*s[l],I=($.y+w.y)/2*s[l])}i[l].push(`${f[0]+m},${f[1]+I}`)}return i}const ro=["points","stroke"],ao=["points"],Ye=3,so=x({__name:"CustomEdge",props:{id:{},sourceNode:{},targetNode:{},source:{},target:{},type:{},label:{},style:{},selected:{type:Boolean},sourcePosition:{},targetPosition:{},sourceHandleId:{},targetHandleId:{},animated:{type:Boolean},updatable:{type:Boolean},markerStart:{},markerEnd:{},curvature:{},interactionWidth:{},data:{},events:{},labelStyle:{},labelShowBg:{type:Boolean},labelBgStyle:{},labelBgPadding:{},labelBgBorderRadius:{},sourceX:{},sourceY:{},targetX:{},targetY:{},inputResolverOutputs:{},components:{},entities:{}},setup(e){Oi(C=>({c5384110:Ye}));const t=_t(),{inputInstance:n,outputInstance:i,inputHub:o,outputHub:r,outputKey:a,inputKey:s,inputNodeType:u}=vi(t,{source:e.source,target:e.target,sourceHandle:e.sourceHandleId,targetHandle:e.targetHandleId}),c=O(()=>{if(u==="outputs"){const R=e.components[n.type].outputs[s];return{all:R?[R.type]:[]}}if(i&&n){const R=e.components[n.type].inputs[s];return{all:R?[R.type]:[]}}if(r&&n&&s)return{all:(kn(e.inputResolverOutputs,n.id)[s]??[]).map(R=>R.type)};if(r&&n)return{all:Sn(e.inputResolverOutputs,n.id).map(C=>C.type),visible:yi(e.inputResolverOutputs,n.id).map(C=>C.type)};if(i&&o){const R=e.components[i.type].outputs[a];return{all:R?[R.type]:[]}}if(r&&o)return{all:wi(e.inputResolverOutputs,r.id).flat().map(C=>C.type)};throw bi.error({msg:"unexpected connection in CustomEdge",inputInstance:n,outputInstance:i,inputHub:o,outputHub:r,outputKey:a,inputKey:s}),new Error("Invalid connection")}),l=O(()=>no(c.value.all).map(C=>e.entities[C])),d=O(()=>r?c.value.visible?c.value.visible.length===0:c.value.all.length===0:!1),f=O(()=>d.value?1:l.value.length),m=C=>d.value?"#9E9E9E":l.value[C%l.value.length].meta.color??"#607D8B",I=C=>d.value?!0:c.value.visible?c.value.visible.includes(l.value[C].type):!0,$=(C,R)=>C[0]===R[0]&&C[1]===R[1],w=O(()=>{if(!e.data.points)return[];const C=[e.sourceX,e.sourceY],R=[e.targetX,e.targetY],T=[...e.data.points];return(!T[0]||!$(T[0],C))&&T.unshift(C),(!T[T.length-1]||!$(T[T.length-1],R))&&T.push(R),oo(T,Ye,f.value)}),y=C=>{const T=1/f.value;return`-${C*T}s`};return(C,R)=>(g(),z(D,null,[(g(!0),z(D,null,ie(w.value,(T,H)=>(g(),z(D,{key:`static-${H}`},[I(H)?(g(),z("polyline",{key:0,points:T.join(" "),stroke:m(H),fill:"none","stroke-width":Ye,style:{opacity:"0.8"}},null,8,ro)):B("",!0)],64))),128)),(g(!0),z(D,null,ie(w.value,(T,H)=>(g(),z(D,{key:`highlight-${H}`},[I(H)?(g(),z("polyline",{key:0,points:T.join(" "),stroke:"white",fill:"none","stroke-width":Ye,class:"highlight-polyline animated-highlight",style:ke({animationDelay:y(H)})},null,12,ao)):B("",!0)],64))),128))],64))}}),lo=Q(so,[["__scopeId","data-v-4bf748bc"]]);function uo(e,t){const n={borderRadius:"4px",overflow:"visible"};switch(t){case"blueprint-valid":return{...n,opacity:"0.7",outline:"2px solid #4CAF50",backgroundColor:"rgba(76, 175, 80, 0.1)",boxShadow:"0 0 10px rgba(76, 175, 80, 0.3)"};case"blueprint-invalid":return{...n,opacity:"0.7",outline:"2px solid #F44336",backgroundColor:"rgba(244, 67, 54, 0.1)",boxShadow:"0 0 10px rgba(244, 67, 54, 0.3)"}}return e?{...n,outline:"2px solid #2196F3",boxShadow:"0 0 8px rgba(33, 150, 243, 0.4)"}:n}const co=x({__name:"HubCard",props:{selected:{type:Boolean},blueprintStatus:{}},setup(e){return(t,n)=>(g(),A(Lt,{variant:"flat",style:ke(p(uo)(t.selected,t.blueprintStatus)),color:"#2d2d2d"},{default:S(()=>[V(K,{class:"ma-2",size:74},{default:S(()=>n[0]||(n[0]=[L("mdi-router")])),_:1,__:[0]}),J(t.$slots,"default")]),_:3},8,["style"]))}}),fo=x({__name:"HubNodeHandle",props:{side:{},handleColor:{},isValidConnection:{type:Function}},setup(e){return(t,n)=>(g(),z(D,null,[V(p($n),{id:"",type:t.side==="left"?"target":"source",position:t.side==="left"?p(ot).Left:p(ot).Right,class:Ce(["handle",[t.side==="left"?"left-handle":"right-handle"]]),"is-valid-connection":t.isValidConnection},null,8,["type","position","class","is-valid-connection"]),W("div",{class:Ce(["handle-dot",[t.side==="left"?"handle-dot-left":"handle-dot-right"]]),style:ke({backgroundColor:t.handleColor})},null,6)],64))}}),en=Q(fo,[["__scopeId","data-v-1aff1180"]]),ho={class:"handles"},mo=x({__name:"HubNode",props:{hub:{},isValidConnection:{type:Function}},emits:["contextmenu"],setup(e,{emit:t}){const n=t,{vueFlowStore:i,selection:o}=Dt(),r=Cn(),a=O(()=>In(r.node,i));return(s,u)=>(g(),A(co,{class:"hub-card",selected:p(o).isNodeSelected(p(r).node),"blueprint-status":p(a),onContextmenu:u[0]||(u[0]=c=>n("contextmenu",c))},{default:S(()=>[J(s.$slots,"default",{},void 0,!0),W("div",ho,[V(en,{"handle-color":"#3F51B5",side:"left","is-valid-connection":s.isValidConnection},null,8,["is-valid-connection"]),V(en,{"handle-color":"#3F51B5",side:"right","is-valid-connection":s.isValidConnection},null,8,["is-valid-connection"])])]),_:3},8,["selected","blueprint-status"]))}}),Zl=Q(mo,[["__scopeId","data-v-79b30d7c"]]),po=x({__name:"SelectionRectangle",props:{selectionMode:{default:"add"},selectionArea:{}},setup(e){const t=O(()=>{if(!e.selectionArea)return;const n={left:e.selectionArea.x+"px",top:e.selectionArea.y+"px",width:e.selectionArea.width+"px",height:e.selectionArea.height+"px"};return e.selectionMode==="add"?{...n,border:"2px dashed #2196F3",background:"rgba(33, 150, 243, 0.1)"}:{...n,border:"2px dashed #F44336",background:"rgba(244, 67, 54, 0.1)"}});return(n,i)=>p(t)?(g(),z("div",{key:0,class:"selection-rectangle",style:ke(p(t))},null,4)):B("",!0)}}),go=Q(po,[["__scopeId","data-v-6118cbbb"]]);var he=(e=>(e.Lines="lines",e.Dots="dots",e))(he||{});const Pn=function({dimensions:e,size:t,color:n}){return Nn("path",{stroke:n,"stroke-width":t,d:`M${e[0]/2} 0 V${e[1]} M0 ${e[1]/2} H${e[0]}`})},_n=function({radius:e,color:t}){return Nn("circle",{cx:e,cy:e,r:e,fill:t})};he.Lines+"",he.Dots+"";const vo={[he.Dots]:"#81818a",[he.Lines]:"#eee"},yo=["id","x","y","width","height","patternTransform"],wo={key:2,height:"100",width:"100"},bo=["fill"],ko=["x","y","fill"],So={name:"Background",compatConfig:{MODE:3}},$o=x({...So,props:{id:{},variant:{default:()=>he.Dots},gap:{default:20},size:{default:1},lineWidth:{default:1},patternColor:{},color:{},bgColor:{},height:{default:100},width:{default:100},x:{default:0},y:{default:0},offset:{default:0}},setup(e){const{id:t,viewport:n}=_t(),i=O(()=>{const a=n.value.zoom,[s,u]=Array.isArray(e.gap)?e.gap:[e.gap,e.gap],c=[s*a||1,u*a||1],l=e.size*a,[d,f]=Array.isArray(e.offset)?e.offset:[e.offset,e.offset],m=[d*a||1+c[0]/2,f*a||1+c[1]/2];return{scaledGap:c,offset:m,size:l}}),o=Fe(()=>`pattern-${t}${e.id?`-${e.id}`:""}`),r=Fe(()=>e.color||e.patternColor||vo[e.variant||he.Dots]);return(a,s)=>(g(),z("svg",{class:"vue-flow__background vue-flow__container",style:ke({height:`${a.height>100?100:a.height}%`,width:`${a.width>100?100:a.width}%`})},[J(a.$slots,"pattern-container",{id:o.value},()=>[W("pattern",{id:o.value,x:p(n).x%i.value.scaledGap[0],y:p(n).y%i.value.scaledGap[1],width:i.value.scaledGap[0],height:i.value.scaledGap[1],patternTransform:`translate(-${i.value.offset[0]},-${i.value.offset[1]})`,patternUnits:"userSpaceOnUse"},[J(a.$slots,"pattern",{},()=>[a.variant===p(he).Lines?(g(),A(p(Pn),{key:0,size:a.lineWidth,color:r.value,dimensions:i.value.scaledGap},null,8,["size","color","dimensions"])):a.variant===p(he).Dots?(g(),A(p(_n),{key:1,color:r.value,radius:i.value.size/2},null,8,["color","radius"])):B("",!0),a.bgColor?(g(),z("svg",wo,[W("rect",{width:"100%",height:"100%",fill:a.bgColor},null,8,bo)])):B("",!0)])],8,yo)]),W("rect",{x:a.x,y:a.y,width:"100%",height:"100%",fill:`url(#${o.value})`},null,8,ko),J(a.$slots,"default",{id:o.value})],4))}});var Co={value:()=>{}};function xt(){for(var e=0,t=arguments.length,n={},i;e<t;++e){if(!(i=arguments[e]+"")||i in n||/[\s.]/.test(i))throw new Error("illegal type: "+i);n[i]=[]}return new Qe(n)}function Qe(e){this._=e}function Io(e,t){return e.trim().split(/^|\s+/).map(function(n){var i="",o=n.indexOf(".");if(o>=0&&(i=n.slice(o+1),n=n.slice(0,o)),n&&!t.hasOwnProperty(n))throw new Error("unknown type: "+n);return{type:n,name:i}})}Qe.prototype=xt.prototype={constructor:Qe,on:function(e,t){var n=this._,i=Io(e+"",n),o,r=-1,a=i.length;if(arguments.length<2){for(;++r<a;)if((o=(e=i[r]).type)&&(o=Vo(n[o],e.name)))return o;return}if(t!=null&&typeof t!="function")throw new Error("invalid callback: "+t);for(;++r<a;)if(o=(e=i[r]).type)n[o]=tn(n[o],e.name,t);else if(t==null)for(o in n)n[o]=tn(n[o],e.name,null);return this},copy:function(){var e={},t=this._;for(var n in t)e[n]=t[n].slice();return new Qe(e)},call:function(e,t){if((o=arguments.length-2)>0)for(var n=new Array(o),i=0,o,r;i<o;++i)n[i]=arguments[i+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(r=this._[e],i=0,o=r.length;i<o;++i)r[i].value.apply(t,n)},apply:function(e,t,n){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(var i=this._[e],o=0,r=i.length;o<r;++o)i[o].value.apply(t,n)}};function Vo(e,t){for(var n=0,i=e.length,o;n<i;++n)if((o=e[n]).name===t)return o.value}function tn(e,t,n){for(var i=0,o=e.length;i<o;++i)if(e[i].name===t){e[i]=Co,e=e.slice(0,i).concat(e.slice(i+1));break}return n!=null&&e.push({name:t,value:n}),e}var Et="http://www.w3.org/1999/xhtml";const nn={svg:"http://www.w3.org/2000/svg",xhtml:Et,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function vt(e){var t=e+="",n=t.indexOf(":");return n>=0&&(t=e.slice(0,n))!=="xmlns"&&(e=e.slice(n+1)),nn.hasOwnProperty(t)?{space:nn[t],local:e}:e}function Ao(e){return function(){var t=this.ownerDocument,n=this.namespaceURI;return n===Et&&t.documentElement.namespaceURI===Et?t.createElement(e):t.createElementNS(n,e)}}function Mo(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function Dn(e){var t=vt(e);return(t.local?Mo:Ao)(t)}function No(){}function Ut(e){return e==null?No:function(){return this.querySelector(e)}}function Eo(e){typeof e!="function"&&(e=Ut(e));for(var t=this._groups,n=t.length,i=new Array(n),o=0;o<n;++o)for(var r=t[o],a=r.length,s=i[o]=new Array(a),u,c,l=0;l<a;++l)(u=r[l])&&(c=e.call(u,u.__data__,l,r))&&("__data__"in u&&(c.__data__=u.__data__),s[l]=c);return new oe(i,this._parents)}function Ro(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function zo(){return[]}function Ln(e){return e==null?zo:function(){return this.querySelectorAll(e)}}function Oo(e){return function(){return Ro(e.apply(this,arguments))}}function Bo(e){typeof e=="function"?e=Oo(e):e=Ln(e);for(var t=this._groups,n=t.length,i=[],o=[],r=0;r<n;++r)for(var a=t[r],s=a.length,u,c=0;c<s;++c)(u=a[c])&&(i.push(e.call(u,u.__data__,c,a)),o.push(u));return new oe(i,o)}function xn(e){return function(){return this.matches(e)}}function Un(e){return function(t){return t.matches(e)}}var To=Array.prototype.find;function Fo(e){return function(){return To.call(this.children,e)}}function Ho(){return this.firstElementChild}function Po(e){return this.select(e==null?Ho:Fo(typeof e=="function"?e:Un(e)))}var _o=Array.prototype.filter;function Do(){return Array.from(this.children)}function Lo(e){return function(){return _o.call(this.children,e)}}function xo(e){return this.selectAll(e==null?Do:Lo(typeof e=="function"?e:Un(e)))}function Uo(e){typeof e!="function"&&(e=xn(e));for(var t=this._groups,n=t.length,i=new Array(n),o=0;o<n;++o)for(var r=t[o],a=r.length,s=i[o]=[],u,c=0;c<a;++c)(u=r[c])&&e.call(u,u.__data__,c,r)&&s.push(u);return new oe(i,this._parents)}function qn(e){return new Array(e.length)}function qo(){return new oe(this._enter||this._groups.map(qn),this._parents)}function lt(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}lt.prototype={constructor:lt,appendChild:function(e){return this._parent.insertBefore(e,this._next)},insertBefore:function(e,t){return this._parent.insertBefore(e,t)},querySelector:function(e){return this._parent.querySelector(e)},querySelectorAll:function(e){return this._parent.querySelectorAll(e)}};function Xo(e){return function(){return e}}function Yo(e,t,n,i,o,r){for(var a=0,s,u=t.length,c=r.length;a<c;++a)(s=t[a])?(s.__data__=r[a],i[a]=s):n[a]=new lt(e,r[a]);for(;a<u;++a)(s=t[a])&&(o[a]=s)}function Wo(e,t,n,i,o,r,a){var s,u,c=new Map,l=t.length,d=r.length,f=new Array(l),m;for(s=0;s<l;++s)(u=t[s])&&(f[s]=m=a.call(u,u.__data__,s,t)+"",c.has(m)?o[s]=u:c.set(m,u));for(s=0;s<d;++s)m=a.call(e,r[s],s,r)+"",(u=c.get(m))?(i[s]=u,u.__data__=r[s],c.delete(m)):n[s]=new lt(e,r[s]);for(s=0;s<l;++s)(u=t[s])&&c.get(f[s])===u&&(o[s]=u)}function Go(e){return e.__data__}function jo(e,t){if(!arguments.length)return Array.from(this,Go);var n=t?Wo:Yo,i=this._parents,o=this._groups;typeof e!="function"&&(e=Xo(e));for(var r=o.length,a=new Array(r),s=new Array(r),u=new Array(r),c=0;c<r;++c){var l=i[c],d=o[c],f=d.length,m=Ko(e.call(l,l&&l.__data__,c,i)),I=m.length,$=s[c]=new Array(I),w=a[c]=new Array(I),y=u[c]=new Array(f);n(l,d,$,w,y,m,t);for(var C=0,R=0,T,H;C<I;++C)if(T=$[C]){for(C>=R&&(R=C+1);!(H=w[R])&&++R<I;);T._next=H||null}}return a=new oe(a,i),a._enter=s,a._exit=u,a}function Ko(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function Jo(){return new oe(this._exit||this._groups.map(qn),this._parents)}function Zo(e,t,n){var i=this.enter(),o=this,r=this.exit();return typeof e=="function"?(i=e(i),i&&(i=i.selection())):i=i.append(e+""),t!=null&&(o=t(o),o&&(o=o.selection())),n==null?r.remove():n(r),i&&o?i.merge(o).order():o}function Qo(e){for(var t=e.selection?e.selection():e,n=this._groups,i=t._groups,o=n.length,r=i.length,a=Math.min(o,r),s=new Array(o),u=0;u<a;++u)for(var c=n[u],l=i[u],d=c.length,f=s[u]=new Array(d),m,I=0;I<d;++I)(m=c[I]||l[I])&&(f[I]=m);for(;u<o;++u)s[u]=n[u];return new oe(s,this._parents)}function er(){for(var e=this._groups,t=-1,n=e.length;++t<n;)for(var i=e[t],o=i.length-1,r=i[o],a;--o>=0;)(a=i[o])&&(r&&a.compareDocumentPosition(r)^4&&r.parentNode.insertBefore(a,r),r=a);return this}function tr(e){e||(e=nr);function t(d,f){return d&&f?e(d.__data__,f.__data__):!d-!f}for(var n=this._groups,i=n.length,o=new Array(i),r=0;r<i;++r){for(var a=n[r],s=a.length,u=o[r]=new Array(s),c,l=0;l<s;++l)(c=a[l])&&(u[l]=c);u.sort(t)}return new oe(o,this._parents).order()}function nr(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function ir(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function or(){return Array.from(this)}function rr(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var i=e[t],o=0,r=i.length;o<r;++o){var a=i[o];if(a)return a}return null}function ar(){let e=0;for(const t of this)++e;return e}function sr(){return!this.node()}function lr(e){for(var t=this._groups,n=0,i=t.length;n<i;++n)for(var o=t[n],r=0,a=o.length,s;r<a;++r)(s=o[r])&&e.call(s,s.__data__,r,o);return this}function ur(e){return function(){this.removeAttribute(e)}}function cr(e){return function(){this.removeAttributeNS(e.space,e.local)}}function dr(e,t){return function(){this.setAttribute(e,t)}}function fr(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function hr(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttribute(e):this.setAttribute(e,n)}}function mr(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,n)}}function pr(e,t){var n=vt(e);if(arguments.length<2){var i=this.node();return n.local?i.getAttributeNS(n.space,n.local):i.getAttribute(n)}return this.each((t==null?n.local?cr:ur:typeof t=="function"?n.local?mr:hr:n.local?fr:dr)(n,t))}function Xn(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function gr(e){return function(){this.style.removeProperty(e)}}function vr(e,t,n){return function(){this.style.setProperty(e,t,n)}}function yr(e,t,n){return function(){var i=t.apply(this,arguments);i==null?this.style.removeProperty(e):this.style.setProperty(e,i,n)}}function wr(e,t,n){return arguments.length>1?this.each((t==null?gr:typeof t=="function"?yr:vr)(e,t,n??"")):Me(this.node(),e)}function Me(e,t){return e.style.getPropertyValue(t)||Xn(e).getComputedStyle(e,null).getPropertyValue(t)}function br(e){return function(){delete this[e]}}function kr(e,t){return function(){this[e]=t}}function Sr(e,t){return function(){var n=t.apply(this,arguments);n==null?delete this[e]:this[e]=n}}function $r(e,t){return arguments.length>1?this.each((t==null?br:typeof t=="function"?Sr:kr)(e,t)):this.node()[e]}function Yn(e){return e.trim().split(/^|\s+/)}function qt(e){return e.classList||new Wn(e)}function Wn(e){this._node=e,this._names=Yn(e.getAttribute("class")||"")}Wn.prototype={add:function(e){var t=this._names.indexOf(e);t<0&&(this._names.push(e),this._node.setAttribute("class",this._names.join(" ")))},remove:function(e){var t=this._names.indexOf(e);t>=0&&(this._names.splice(t,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(e){return this._names.indexOf(e)>=0}};function Gn(e,t){for(var n=qt(e),i=-1,o=t.length;++i<o;)n.add(t[i])}function jn(e,t){for(var n=qt(e),i=-1,o=t.length;++i<o;)n.remove(t[i])}function Cr(e){return function(){Gn(this,e)}}function Ir(e){return function(){jn(this,e)}}function Vr(e,t){return function(){(t.apply(this,arguments)?Gn:jn)(this,e)}}function Ar(e,t){var n=Yn(e+"");if(arguments.length<2){for(var i=qt(this.node()),o=-1,r=n.length;++o<r;)if(!i.contains(n[o]))return!1;return!0}return this.each((typeof t=="function"?Vr:t?Cr:Ir)(n,t))}function Mr(){this.textContent=""}function Nr(e){return function(){this.textContent=e}}function Er(e){return function(){var t=e.apply(this,arguments);this.textContent=t??""}}function Rr(e){return arguments.length?this.each(e==null?Mr:(typeof e=="function"?Er:Nr)(e)):this.node().textContent}function zr(){this.innerHTML=""}function Or(e){return function(){this.innerHTML=e}}function Br(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t??""}}function Tr(e){return arguments.length?this.each(e==null?zr:(typeof e=="function"?Br:Or)(e)):this.node().innerHTML}function Fr(){this.nextSibling&&this.parentNode.appendChild(this)}function Hr(){return this.each(Fr)}function Pr(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function _r(){return this.each(Pr)}function Dr(e){var t=typeof e=="function"?e:Dn(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}function Lr(){return null}function xr(e,t){var n=typeof e=="function"?e:Dn(e),i=t==null?Lr:typeof t=="function"?t:Ut(t);return this.select(function(){return this.insertBefore(n.apply(this,arguments),i.apply(this,arguments)||null)})}function Ur(){var e=this.parentNode;e&&e.removeChild(this)}function qr(){return this.each(Ur)}function Xr(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function Yr(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function Wr(e){return this.select(e?Yr:Xr)}function Gr(e){return arguments.length?this.property("__data__",e):this.node().__data__}function jr(e){return function(t){e.call(this,t,this.__data__)}}function Kr(e){return e.trim().split(/^|\s+/).map(function(t){var n="",i=t.indexOf(".");return i>=0&&(n=t.slice(i+1),t=t.slice(0,i)),{type:t,name:n}})}function Jr(e){return function(){var t=this.__on;if(t){for(var n=0,i=-1,o=t.length,r;n<o;++n)r=t[n],(!e.type||r.type===e.type)&&r.name===e.name?this.removeEventListener(r.type,r.listener,r.options):t[++i]=r;++i?t.length=i:delete this.__on}}}function Zr(e,t,n){return function(){var i=this.__on,o,r=jr(t);if(i){for(var a=0,s=i.length;a<s;++a)if((o=i[a]).type===e.type&&o.name===e.name){this.removeEventListener(o.type,o.listener,o.options),this.addEventListener(o.type,o.listener=r,o.options=n),o.value=t;return}}this.addEventListener(e.type,r,n),o={type:e.type,name:e.name,value:t,listener:r,options:n},i?i.push(o):this.__on=[o]}}function Qr(e,t,n){var i=Kr(e+""),o,r=i.length,a;if(arguments.length<2){var s=this.node().__on;if(s){for(var u=0,c=s.length,l;u<c;++u)for(o=0,l=s[u];o<r;++o)if((a=i[o]).type===l.type&&a.name===l.name)return l.value}return}for(s=t?Zr:Jr,o=0;o<r;++o)this.each(s(i[o],t,n));return this}function Kn(e,t,n){var i=Xn(e),o=i.CustomEvent;typeof o=="function"?o=new o(t,n):(o=i.document.createEvent("Event"),n?(o.initEvent(t,n.bubbles,n.cancelable),o.detail=n.detail):o.initEvent(t,!1,!1)),e.dispatchEvent(o)}function ea(e,t){return function(){return Kn(this,e,t)}}function ta(e,t){return function(){return Kn(this,e,t.apply(this,arguments))}}function na(e,t){return this.each((typeof t=="function"?ta:ea)(e,t))}function*ia(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var i=e[t],o=0,r=i.length,a;o<r;++o)(a=i[o])&&(yield a)}var Jn=[null];function oe(e,t){this._groups=e,this._parents=t}function qe(){return new oe([[document.documentElement]],Jn)}function oa(){return this}oe.prototype=qe.prototype={constructor:oe,select:Eo,selectAll:Bo,selectChild:Po,selectChildren:xo,filter:Uo,data:jo,enter:qo,exit:Jo,join:Zo,merge:Qo,selection:oa,order:er,sort:tr,call:ir,nodes:or,node:rr,size:ar,empty:sr,each:lr,attr:pr,style:wr,property:$r,classed:Ar,text:Rr,html:Tr,raise:Hr,lower:_r,append:Dr,insert:xr,remove:qr,clone:Wr,datum:Gr,on:Qr,dispatch:na,[Symbol.iterator]:ia};function ye(e){return typeof e=="string"?new oe([[document.querySelector(e)]],[document.documentElement]):new oe([[e]],Jn)}function ra(e){let t;for(;t=e.sourceEvent;)e=t;return e}function ge(e,t){if(e=ra(e),t===void 0&&(t=e.currentTarget),t){var n=t.ownerSVGElement||t;if(n.createSVGPoint){var i=n.createSVGPoint();return i.x=e.clientX,i.y=e.clientY,i=i.matrixTransform(t.getScreenCTM().inverse()),[i.x,i.y]}if(t.getBoundingClientRect){var o=t.getBoundingClientRect();return[e.clientX-o.left-t.clientLeft,e.clientY-o.top-t.clientTop]}}return[e.pageX,e.pageY]}const Rt={capture:!0,passive:!1};function zt(e){e.preventDefault(),e.stopImmediatePropagation()}function aa(e){var t=e.document.documentElement,n=ye(e).on("dragstart.drag",zt,Rt);"onselectstart"in t?n.on("selectstart.drag",zt,Rt):(t.__noselect=t.style.MozUserSelect,t.style.MozUserSelect="none")}function sa(e,t){var n=e.document.documentElement,i=ye(e).on("dragstart.drag",null);t&&(i.on("click.drag",zt,Rt),setTimeout(function(){i.on("click.drag",null)},0)),"onselectstart"in n?i.on("selectstart.drag",null):(n.style.MozUserSelect=n.__noselect,delete n.__noselect)}function Xt(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function Zn(e,t){var n=Object.create(e.prototype);for(var i in t)n[i]=t[i];return n}function Xe(){}var _e=.7,ut=1/_e,Ae="\\s*([+-]?\\d+)\\s*",De="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",ue="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",la=/^#([0-9a-f]{3,8})$/,ua=new RegExp(`^rgb\\(${Ae},${Ae},${Ae}\\)$`),ca=new RegExp(`^rgb\\(${ue},${ue},${ue}\\)$`),da=new RegExp(`^rgba\\(${Ae},${Ae},${Ae},${De}\\)$`),fa=new RegExp(`^rgba\\(${ue},${ue},${ue},${De}\\)$`),ha=new RegExp(`^hsl\\(${De},${ue},${ue}\\)$`),ma=new RegExp(`^hsla\\(${De},${ue},${ue},${De}\\)$`),on={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};Xt(Xe,Le,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:rn,formatHex:rn,formatHex8:pa,formatHsl:ga,formatRgb:an,toString:an});function rn(){return this.rgb().formatHex()}function pa(){return this.rgb().formatHex8()}function ga(){return Qn(this).formatHsl()}function an(){return this.rgb().formatRgb()}function Le(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=la.exec(e))?(n=t[1].length,t=parseInt(t[1],16),n===6?sn(t):n===3?new Z(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?We(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?We(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=ua.exec(e))?new Z(t[1],t[2],t[3],1):(t=ca.exec(e))?new Z(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=da.exec(e))?We(t[1],t[2],t[3],t[4]):(t=fa.exec(e))?We(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=ha.exec(e))?cn(t[1],t[2]/100,t[3]/100,1):(t=ma.exec(e))?cn(t[1],t[2]/100,t[3]/100,t[4]):on.hasOwnProperty(e)?sn(on[e]):e==="transparent"?new Z(NaN,NaN,NaN,0):null}function sn(e){return new Z(e>>16&255,e>>8&255,e&255,1)}function We(e,t,n,i){return i<=0&&(e=t=n=NaN),new Z(e,t,n,i)}function va(e){return e instanceof Xe||(e=Le(e)),e?(e=e.rgb(),new Z(e.r,e.g,e.b,e.opacity)):new Z}function Ot(e,t,n,i){return arguments.length===1?va(e):new Z(e,t,n,i??1)}function Z(e,t,n,i){this.r=+e,this.g=+t,this.b=+n,this.opacity=+i}Xt(Z,Ot,Zn(Xe,{brighter(e){return e=e==null?ut:Math.pow(ut,e),new Z(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?_e:Math.pow(_e,e),new Z(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Z($e(this.r),$e(this.g),$e(this.b),ct(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:ln,formatHex:ln,formatHex8:ya,formatRgb:un,toString:un}));function ln(){return`#${Se(this.r)}${Se(this.g)}${Se(this.b)}`}function ya(){return`#${Se(this.r)}${Se(this.g)}${Se(this.b)}${Se((isNaN(this.opacity)?1:this.opacity)*255)}`}function un(){const e=ct(this.opacity);return`${e===1?"rgb(":"rgba("}${$e(this.r)}, ${$e(this.g)}, ${$e(this.b)}${e===1?")":`, ${e})`}`}function ct(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function $e(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Se(e){return e=$e(e),(e<16?"0":"")+e.toString(16)}function cn(e,t,n,i){return i<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new se(e,t,n,i)}function Qn(e){if(e instanceof se)return new se(e.h,e.s,e.l,e.opacity);if(e instanceof Xe||(e=Le(e)),!e)return new se;if(e instanceof se)return e;e=e.rgb();var t=e.r/255,n=e.g/255,i=e.b/255,o=Math.min(t,n,i),r=Math.max(t,n,i),a=NaN,s=r-o,u=(r+o)/2;return s?(t===r?a=(n-i)/s+(n<i)*6:n===r?a=(i-t)/s+2:a=(t-n)/s+4,s/=u<.5?r+o:2-r-o,a*=60):s=u>0&&u<1?0:a,new se(a,s,u,e.opacity)}function wa(e,t,n,i){return arguments.length===1?Qn(e):new se(e,t,n,i??1)}function se(e,t,n,i){this.h=+e,this.s=+t,this.l=+n,this.opacity=+i}Xt(se,wa,Zn(Xe,{brighter(e){return e=e==null?ut:Math.pow(ut,e),new se(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?_e:Math.pow(_e,e),new se(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,i=n+(n<.5?n:1-n)*t,o=2*n-i;return new Z(It(e>=240?e-240:e+120,o,i),It(e,o,i),It(e<120?e+240:e-120,o,i),this.opacity)},clamp(){return new se(dn(this.h),Ge(this.s),Ge(this.l),ct(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=ct(this.opacity);return`${e===1?"hsl(":"hsla("}${dn(this.h)}, ${Ge(this.s)*100}%, ${Ge(this.l)*100}%${e===1?")":`, ${e})`}`}}));function dn(e){return e=(e||0)%360,e<0?e+360:e}function Ge(e){return Math.max(0,Math.min(1,e||0))}function It(e,t,n){return(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)*255}const ei=e=>()=>e;function ba(e,t){return function(n){return e+n*t}}function ka(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(i){return Math.pow(e+i*t,n)}}function Sa(e){return(e=+e)==1?ti:function(t,n){return n-t?ka(t,n,e):ei(isNaN(t)?n:t)}}function ti(e,t){var n=t-e;return n?ba(e,n):ei(isNaN(e)?t:e)}const fn=function e(t){var n=Sa(t);function i(o,r){var a=n((o=Ot(o)).r,(r=Ot(r)).r),s=n(o.g,r.g),u=n(o.b,r.b),c=ti(o.opacity,r.opacity);return function(l){return o.r=a(l),o.g=s(l),o.b=u(l),o.opacity=c(l),o+""}}return i.gamma=e,i}(1);function ve(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}var Bt=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Vt=new RegExp(Bt.source,"g");function $a(e){return function(){return e}}function Ca(e){return function(t){return e(t)+""}}function Ia(e,t){var n=Bt.lastIndex=Vt.lastIndex=0,i,o,r,a=-1,s=[],u=[];for(e=e+"",t=t+"";(i=Bt.exec(e))&&(o=Vt.exec(t));)(r=o.index)>n&&(r=t.slice(n,r),s[a]?s[a]+=r:s[++a]=r),(i=i[0])===(o=o[0])?s[a]?s[a]+=o:s[++a]=o:(s[++a]=null,u.push({i:a,x:ve(i,o)})),n=Vt.lastIndex;return n<t.length&&(r=t.slice(n),s[a]?s[a]+=r:s[++a]=r),s.length<2?u[0]?Ca(u[0].x):$a(t):(t=u.length,function(c){for(var l=0,d;l<t;++l)s[(d=u[l]).i]=d.x(c);return s.join("")})}var hn=180/Math.PI,Tt={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function ni(e,t,n,i,o,r){var a,s,u;return(a=Math.sqrt(e*e+t*t))&&(e/=a,t/=a),(u=e*n+t*i)&&(n-=e*u,i-=t*u),(s=Math.sqrt(n*n+i*i))&&(n/=s,i/=s,u/=s),e*i<t*n&&(e=-e,t=-t,u=-u,a=-a),{translateX:o,translateY:r,rotate:Math.atan2(t,e)*hn,skewX:Math.atan(u)*hn,scaleX:a,scaleY:s}}var je;function Va(e){const t=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?Tt:ni(t.a,t.b,t.c,t.d,t.e,t.f)}function Aa(e){return e==null||(je||(je=document.createElementNS("http://www.w3.org/2000/svg","g")),je.setAttribute("transform",e),!(e=je.transform.baseVal.consolidate()))?Tt:(e=e.matrix,ni(e.a,e.b,e.c,e.d,e.e,e.f))}function ii(e,t,n,i){function o(c){return c.length?c.pop()+" ":""}function r(c,l,d,f,m,I){if(c!==d||l!==f){var $=m.push("translate(",null,t,null,n);I.push({i:$-4,x:ve(c,d)},{i:$-2,x:ve(l,f)})}else(d||f)&&m.push("translate("+d+t+f+n)}function a(c,l,d,f){c!==l?(c-l>180?l+=360:l-c>180&&(c+=360),f.push({i:d.push(o(d)+"rotate(",null,i)-2,x:ve(c,l)})):l&&d.push(o(d)+"rotate("+l+i)}function s(c,l,d,f){c!==l?f.push({i:d.push(o(d)+"skewX(",null,i)-2,x:ve(c,l)}):l&&d.push(o(d)+"skewX("+l+i)}function u(c,l,d,f,m,I){if(c!==d||l!==f){var $=m.push(o(m)+"scale(",null,",",null,")");I.push({i:$-4,x:ve(c,d)},{i:$-2,x:ve(l,f)})}else(d!==1||f!==1)&&m.push(o(m)+"scale("+d+","+f+")")}return function(c,l){var d=[],f=[];return c=e(c),l=e(l),r(c.translateX,c.translateY,l.translateX,l.translateY,d,f),a(c.rotate,l.rotate,d,f),s(c.skewX,l.skewX,d,f),u(c.scaleX,c.scaleY,l.scaleX,l.scaleY,d,f),c=l=null,function(m){for(var I=-1,$=f.length,w;++I<$;)d[(w=f[I]).i]=w.x(m);return d.join("")}}}var Ma=ii(Va,"px, ","px)","deg)"),Na=ii(Aa,", ",")",")"),Ea=1e-12;function mn(e){return((e=Math.exp(e))+1/e)/2}function Ra(e){return((e=Math.exp(e))-1/e)/2}function za(e){return((e=Math.exp(2*e))-1)/(e+1)}const Oa=function e(t,n,i){function o(r,a){var s=r[0],u=r[1],c=r[2],l=a[0],d=a[1],f=a[2],m=l-s,I=d-u,$=m*m+I*I,w,y;if($<Ea)y=Math.log(f/c)/t,w=function(_){return[s+_*m,u+_*I,c*Math.exp(t*_*y)]};else{var C=Math.sqrt($),R=(f*f-c*c+i*$)/(2*c*n*C),T=(f*f-c*c-i*$)/(2*f*n*C),H=Math.log(Math.sqrt(R*R+1)-R),P=Math.log(Math.sqrt(T*T+1)-T);y=(P-H)/t,w=function(_){var ee=_*y,de=mn(H),X=c/(n*C)*(de*za(t*ee+H)-Ra(H));return[s+X*m,u+X*I,c*de/mn(t*ee+H)]}}return w.duration=y*1e3*t/Math.SQRT2,w}return o.rho=function(r){var a=Math.max(.001,+r),s=a*a,u=s*s;return e(a,s,u)},o}(Math.SQRT2,2,4);var Ne=0,Be=0,Re=0,oi=1e3,dt,Te,ft=0,Ie=0,yt=0,xe=typeof performance=="object"&&performance.now?performance:Date,ri=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function Yt(){return Ie||(ri(Ba),Ie=xe.now()+yt)}function Ba(){Ie=0}function ht(){this._call=this._time=this._next=null}ht.prototype=ai.prototype={constructor:ht,restart:function(e,t,n){if(typeof e!="function")throw new TypeError("callback is not a function");n=(n==null?Yt():+n)+(t==null?0:+t),!this._next&&Te!==this&&(Te?Te._next=this:dt=this,Te=this),this._call=e,this._time=n,Ft()},stop:function(){this._call&&(this._call=null,this._time=1/0,Ft())}};function ai(e,t,n){var i=new ht;return i.restart(e,t,n),i}function Ta(){Yt(),++Ne;for(var e=dt,t;e;)(t=Ie-e._time)>=0&&e._call.call(void 0,t),e=e._next;--Ne}function pn(){Ie=(ft=xe.now())+yt,Ne=Be=0;try{Ta()}finally{Ne=0,Ha(),Ie=0}}function Fa(){var e=xe.now(),t=e-ft;t>oi&&(yt-=t,ft=e)}function Ha(){for(var e,t=dt,n,i=1/0;t;)t._call?(i>t._time&&(i=t._time),e=t,t=t._next):(n=t._next,t._next=null,t=e?e._next=n:dt=n);Te=e,Ft(i)}function Ft(e){if(!Ne){Be&&(Be=clearTimeout(Be));var t=e-Ie;t>24?(e<1/0&&(Be=setTimeout(pn,e-xe.now()-yt)),Re&&(Re=clearInterval(Re))):(Re||(ft=xe.now(),Re=setInterval(Fa,oi)),Ne=1,ri(pn))}}function gn(e,t,n){var i=new ht;return t=t==null?0:+t,i.restart(o=>{i.stop(),e(o+t)},t,n),i}var Pa=xt("start","end","cancel","interrupt"),_a=[],si=0,vn=1,Ht=2,et=3,yn=4,Pt=5,tt=6;function wt(e,t,n,i,o,r){var a=e.__transition;if(!a)e.__transition={};else if(n in a)return;Da(e,n,{name:t,index:i,group:o,on:Pa,tween:_a,time:r.time,delay:r.delay,duration:r.duration,ease:r.ease,timer:null,state:si})}function Wt(e,t){var n=le(e,t);if(n.state>si)throw new Error("too late; already scheduled");return n}function ce(e,t){var n=le(e,t);if(n.state>et)throw new Error("too late; already running");return n}function le(e,t){var n=e.__transition;if(!n||!(n=n[t]))throw new Error("transition not found");return n}function Da(e,t,n){var i=e.__transition,o;i[t]=n,n.timer=ai(r,0,n.time);function r(c){n.state=vn,n.timer.restart(a,n.delay,n.time),n.delay<=c&&a(c-n.delay)}function a(c){var l,d,f,m;if(n.state!==vn)return u();for(l in i)if(m=i[l],m.name===n.name){if(m.state===et)return gn(a);m.state===yn?(m.state=tt,m.timer.stop(),m.on.call("interrupt",e,e.__data__,m.index,m.group),delete i[l]):+l<t&&(m.state=tt,m.timer.stop(),m.on.call("cancel",e,e.__data__,m.index,m.group),delete i[l])}if(gn(function(){n.state===et&&(n.state=yn,n.timer.restart(s,n.delay,n.time),s(c))}),n.state=Ht,n.on.call("start",e,e.__data__,n.index,n.group),n.state===Ht){for(n.state=et,o=new Array(f=n.tween.length),l=0,d=-1;l<f;++l)(m=n.tween[l].value.call(e,e.__data__,n.index,n.group))&&(o[++d]=m);o.length=d+1}}function s(c){for(var l=c<n.duration?n.ease.call(null,c/n.duration):(n.timer.restart(u),n.state=Pt,1),d=-1,f=o.length;++d<f;)o[d].call(e,l);n.state===Pt&&(n.on.call("end",e,e.__data__,n.index,n.group),u())}function u(){n.state=tt,n.timer.stop(),delete i[t];for(var c in i)return;delete e.__transition}}function nt(e,t){var n=e.__transition,i,o,r=!0,a;if(n){t=t==null?null:t+"";for(a in n){if((i=n[a]).name!==t){r=!1;continue}o=i.state>Ht&&i.state<Pt,i.state=tt,i.timer.stop(),i.on.call(o?"interrupt":"cancel",e,e.__data__,i.index,i.group),delete n[a]}r&&delete e.__transition}}function La(e){return this.each(function(){nt(this,e)})}function xa(e,t){var n,i;return function(){var o=ce(this,e),r=o.tween;if(r!==n){i=n=r;for(var a=0,s=i.length;a<s;++a)if(i[a].name===t){i=i.slice(),i.splice(a,1);break}}o.tween=i}}function Ua(e,t,n){var i,o;if(typeof n!="function")throw new Error;return function(){var r=ce(this,e),a=r.tween;if(a!==i){o=(i=a).slice();for(var s={name:t,value:n},u=0,c=o.length;u<c;++u)if(o[u].name===t){o[u]=s;break}u===c&&o.push(s)}r.tween=o}}function qa(e,t){var n=this._id;if(e+="",arguments.length<2){for(var i=le(this.node(),n).tween,o=0,r=i.length,a;o<r;++o)if((a=i[o]).name===e)return a.value;return null}return this.each((t==null?xa:Ua)(n,e,t))}function Gt(e,t,n){var i=e._id;return e.each(function(){var o=ce(this,i);(o.value||(o.value={}))[t]=n.apply(this,arguments)}),function(o){return le(o,i).value[t]}}function li(e,t){var n;return(typeof t=="number"?ve:t instanceof Le?fn:(n=Le(t))?(t=n,fn):Ia)(e,t)}function Xa(e){return function(){this.removeAttribute(e)}}function Ya(e){return function(){this.removeAttributeNS(e.space,e.local)}}function Wa(e,t,n){var i,o=n+"",r;return function(){var a=this.getAttribute(e);return a===o?null:a===i?r:r=t(i=a,n)}}function Ga(e,t,n){var i,o=n+"",r;return function(){var a=this.getAttributeNS(e.space,e.local);return a===o?null:a===i?r:r=t(i=a,n)}}function ja(e,t,n){var i,o,r;return function(){var a,s=n(this),u;return s==null?void this.removeAttribute(e):(a=this.getAttribute(e),u=s+"",a===u?null:a===i&&u===o?r:(o=u,r=t(i=a,s)))}}function Ka(e,t,n){var i,o,r;return function(){var a,s=n(this),u;return s==null?void this.removeAttributeNS(e.space,e.local):(a=this.getAttributeNS(e.space,e.local),u=s+"",a===u?null:a===i&&u===o?r:(o=u,r=t(i=a,s)))}}function Ja(e,t){var n=vt(e),i=n==="transform"?Na:li;return this.attrTween(e,typeof t=="function"?(n.local?Ka:ja)(n,i,Gt(this,"attr."+e,t)):t==null?(n.local?Ya:Xa)(n):(n.local?Ga:Wa)(n,i,t))}function Za(e,t){return function(n){this.setAttribute(e,t.call(this,n))}}function Qa(e,t){return function(n){this.setAttributeNS(e.space,e.local,t.call(this,n))}}function es(e,t){var n,i;function o(){var r=t.apply(this,arguments);return r!==i&&(n=(i=r)&&Qa(e,r)),n}return o._value=t,o}function ts(e,t){var n,i;function o(){var r=t.apply(this,arguments);return r!==i&&(n=(i=r)&&Za(e,r)),n}return o._value=t,o}function ns(e,t){var n="attr."+e;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(t==null)return this.tween(n,null);if(typeof t!="function")throw new Error;var i=vt(e);return this.tween(n,(i.local?es:ts)(i,t))}function is(e,t){return function(){Wt(this,e).delay=+t.apply(this,arguments)}}function os(e,t){return t=+t,function(){Wt(this,e).delay=t}}function rs(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?is:os)(t,e)):le(this.node(),t).delay}function as(e,t){return function(){ce(this,e).duration=+t.apply(this,arguments)}}function ss(e,t){return t=+t,function(){ce(this,e).duration=t}}function ls(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?as:ss)(t,e)):le(this.node(),t).duration}function us(e,t){if(typeof t!="function")throw new Error;return function(){ce(this,e).ease=t}}function cs(e){var t=this._id;return arguments.length?this.each(us(t,e)):le(this.node(),t).ease}function ds(e,t){return function(){var n=t.apply(this,arguments);if(typeof n!="function")throw new Error;ce(this,e).ease=n}}function fs(e){if(typeof e!="function")throw new Error;return this.each(ds(this._id,e))}function hs(e){typeof e!="function"&&(e=xn(e));for(var t=this._groups,n=t.length,i=new Array(n),o=0;o<n;++o)for(var r=t[o],a=r.length,s=i[o]=[],u,c=0;c<a;++c)(u=r[c])&&e.call(u,u.__data__,c,r)&&s.push(u);return new pe(i,this._parents,this._name,this._id)}function ms(e){if(e._id!==this._id)throw new Error;for(var t=this._groups,n=e._groups,i=t.length,o=n.length,r=Math.min(i,o),a=new Array(i),s=0;s<r;++s)for(var u=t[s],c=n[s],l=u.length,d=a[s]=new Array(l),f,m=0;m<l;++m)(f=u[m]||c[m])&&(d[m]=f);for(;s<i;++s)a[s]=t[s];return new pe(a,this._parents,this._name,this._id)}function ps(e){return(e+"").trim().split(/^|\s+/).every(function(t){var n=t.indexOf(".");return n>=0&&(t=t.slice(0,n)),!t||t==="start"})}function gs(e,t,n){var i,o,r=ps(t)?Wt:ce;return function(){var a=r(this,e),s=a.on;s!==i&&(o=(i=s).copy()).on(t,n),a.on=o}}function vs(e,t){var n=this._id;return arguments.length<2?le(this.node(),n).on.on(e):this.each(gs(n,e,t))}function ys(e){return function(){var t=this.parentNode;for(var n in this.__transition)if(+n!==e)return;t&&t.removeChild(this)}}function ws(){return this.on("end.remove",ys(this._id))}function bs(e){var t=this._name,n=this._id;typeof e!="function"&&(e=Ut(e));for(var i=this._groups,o=i.length,r=new Array(o),a=0;a<o;++a)for(var s=i[a],u=s.length,c=r[a]=new Array(u),l,d,f=0;f<u;++f)(l=s[f])&&(d=e.call(l,l.__data__,f,s))&&("__data__"in l&&(d.__data__=l.__data__),c[f]=d,wt(c[f],t,n,f,c,le(l,n)));return new pe(r,this._parents,t,n)}function ks(e){var t=this._name,n=this._id;typeof e!="function"&&(e=Ln(e));for(var i=this._groups,o=i.length,r=[],a=[],s=0;s<o;++s)for(var u=i[s],c=u.length,l,d=0;d<c;++d)if(l=u[d]){for(var f=e.call(l,l.__data__,d,u),m,I=le(l,n),$=0,w=f.length;$<w;++$)(m=f[$])&&wt(m,t,n,$,f,I);r.push(f),a.push(l)}return new pe(r,a,t,n)}var Ss=qe.prototype.constructor;function $s(){return new Ss(this._groups,this._parents)}function Cs(e,t){var n,i,o;return function(){var r=Me(this,e),a=(this.style.removeProperty(e),Me(this,e));return r===a?null:r===n&&a===i?o:o=t(n=r,i=a)}}function ui(e){return function(){this.style.removeProperty(e)}}function Is(e,t,n){var i,o=n+"",r;return function(){var a=Me(this,e);return a===o?null:a===i?r:r=t(i=a,n)}}function Vs(e,t,n){var i,o,r;return function(){var a=Me(this,e),s=n(this),u=s+"";return s==null&&(u=s=(this.style.removeProperty(e),Me(this,e))),a===u?null:a===i&&u===o?r:(o=u,r=t(i=a,s))}}function As(e,t){var n,i,o,r="style."+t,a="end."+r,s;return function(){var u=ce(this,e),c=u.on,l=u.value[r]==null?s||(s=ui(t)):void 0;(c!==n||o!==l)&&(i=(n=c).copy()).on(a,o=l),u.on=i}}function Ms(e,t,n){var i=(e+="")=="transform"?Ma:li;return t==null?this.styleTween(e,Cs(e,i)).on("end.style."+e,ui(e)):typeof t=="function"?this.styleTween(e,Vs(e,i,Gt(this,"style."+e,t))).each(As(this._id,e)):this.styleTween(e,Is(e,i,t),n).on("end.style."+e,null)}function Ns(e,t,n){return function(i){this.style.setProperty(e,t.call(this,i),n)}}function Es(e,t,n){var i,o;function r(){var a=t.apply(this,arguments);return a!==o&&(i=(o=a)&&Ns(e,a,n)),i}return r._value=t,r}function Rs(e,t,n){var i="style."+(e+="");if(arguments.length<2)return(i=this.tween(i))&&i._value;if(t==null)return this.tween(i,null);if(typeof t!="function")throw new Error;return this.tween(i,Es(e,t,n??""))}function zs(e){return function(){this.textContent=e}}function Os(e){return function(){var t=e(this);this.textContent=t??""}}function Bs(e){return this.tween("text",typeof e=="function"?Os(Gt(this,"text",e)):zs(e==null?"":e+""))}function Ts(e){return function(t){this.textContent=e.call(this,t)}}function Fs(e){var t,n;function i(){var o=e.apply(this,arguments);return o!==n&&(t=(n=o)&&Ts(o)),t}return i._value=e,i}function Hs(e){var t="text";if(arguments.length<1)return(t=this.tween(t))&&t._value;if(e==null)return this.tween(t,null);if(typeof e!="function")throw new Error;return this.tween(t,Fs(e))}function Ps(){for(var e=this._name,t=this._id,n=ci(),i=this._groups,o=i.length,r=0;r<o;++r)for(var a=i[r],s=a.length,u,c=0;c<s;++c)if(u=a[c]){var l=le(u,t);wt(u,e,n,c,a,{time:l.time+l.delay+l.duration,delay:0,duration:l.duration,ease:l.ease})}return new pe(i,this._parents,e,n)}function _s(){var e,t,n=this,i=n._id,o=n.size();return new Promise(function(r,a){var s={value:a},u={value:function(){--o===0&&r()}};n.each(function(){var c=ce(this,i),l=c.on;l!==e&&(t=(e=l).copy(),t._.cancel.push(s),t._.interrupt.push(s),t._.end.push(u)),c.on=t}),o===0&&r()})}var Ds=0;function pe(e,t,n,i){this._groups=e,this._parents=t,this._name=n,this._id=i}function ci(){return++Ds}var fe=qe.prototype;pe.prototype={constructor:pe,select:bs,selectAll:ks,selectChild:fe.selectChild,selectChildren:fe.selectChildren,filter:hs,merge:ms,selection:$s,transition:Ps,call:fe.call,nodes:fe.nodes,node:fe.node,size:fe.size,empty:fe.empty,each:fe.each,on:vs,attr:Ja,attrTween:ns,style:Ms,styleTween:Rs,text:Bs,textTween:Hs,remove:ws,tween:qa,delay:rs,duration:ls,ease:cs,easeVarying:fs,end:_s,[Symbol.iterator]:fe[Symbol.iterator]};function Ls(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var xs={time:null,delay:0,duration:250,ease:Ls};function Us(e,t){for(var n;!(n=e.__transition)||!(n=n[t]);)if(!(e=e.parentNode))throw new Error(`transition ${t} not found`);return n}function qs(e){var t,n;e instanceof pe?(t=e._id,e=e._name):(t=ci(),(n=xs).time=Yt(),e=e==null?null:e+"");for(var i=this._groups,o=i.length,r=0;r<o;++r)for(var a=i[r],s=a.length,u,c=0;c<s;++c)(u=a[c])&&wt(u,e,t,c,a,n||Us(u,t));return new pe(i,this._parents,e,t)}qe.prototype.interrupt=La;qe.prototype.transition=qs;const Ke=e=>()=>e;function Xs(e,{sourceEvent:t,target:n,transform:i,dispatch:o}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},target:{value:n,enumerable:!0,configurable:!0},transform:{value:i,enumerable:!0,configurable:!0},_:{value:o}})}function me(e,t,n){this.k=e,this.x=t,this.y=n}me.prototype={constructor:me,scale:function(e){return e===1?this:new me(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new me(this.k,this.x+this.k*e,this.y+this.k*t)},apply:function(e){return[e[0]*this.k+this.x,e[1]*this.k+this.y]},applyX:function(e){return e*this.k+this.x},applyY:function(e){return e*this.k+this.y},invert:function(e){return[(e[0]-this.x)/this.k,(e[1]-this.y)/this.k]},invertX:function(e){return(e-this.x)/this.k},invertY:function(e){return(e-this.y)/this.k},rescaleX:function(e){return e.copy().domain(e.range().map(this.invertX,this).map(e.invert,e))},rescaleY:function(e){return e.copy().domain(e.range().map(this.invertY,this).map(e.invert,e))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var jt=new me(1,0,0);me.prototype;function At(e){e.stopImmediatePropagation()}function ze(e){e.preventDefault(),e.stopImmediatePropagation()}function Ys(e){return(!e.ctrlKey||e.type==="wheel")&&!e.button}function Ws(){var e=this;return e instanceof SVGElement?(e=e.ownerSVGElement||e,e.hasAttribute("viewBox")?(e=e.viewBox.baseVal,[[e.x,e.y],[e.x+e.width,e.y+e.height]]):[[0,0],[e.width.baseVal.value,e.height.baseVal.value]]):[[0,0],[e.clientWidth,e.clientHeight]]}function wn(){return this.__zoom||jt}function Gs(e){return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*(e.ctrlKey?10:1)}function js(){return navigator.maxTouchPoints||"ontouchstart"in this}function Ks(e,t,n){var i=e.invertX(t[0][0])-n[0][0],o=e.invertX(t[1][0])-n[1][0],r=e.invertY(t[0][1])-n[0][1],a=e.invertY(t[1][1])-n[1][1];return e.translate(o>i?(i+o)/2:Math.min(0,i)||Math.max(0,o),a>r?(r+a)/2:Math.min(0,r)||Math.max(0,a))}function Js(){var e=Ys,t=Ws,n=Ks,i=Gs,o=js,r=[0,1/0],a=[[-1/0,-1/0],[1/0,1/0]],s=250,u=Oa,c=xt("start","zoom","end"),l,d,f,m=500,I=150,$=0,w=10;function y(h){h.property("__zoom",wn).on("wheel.zoom",ee,{passive:!1}).on("mousedown.zoom",de).on("dblclick.zoom",X).filter(o).on("touchstart.zoom",kt).on("touchmove.zoom",St).on("touchend.zoom touchcancel.zoom",$t).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}y.transform=function(h,N,v,E){var b=h.selection?h.selection():h;b.property("__zoom",wn),h!==b?H(h,N,v,E):b.interrupt().each(function(){P(this,arguments).event(E).start().zoom(null,typeof N=="function"?N.apply(this,arguments):N).end()})},y.scaleBy=function(h,N,v,E){y.scaleTo(h,function(){var b=this.__zoom.k,M=typeof N=="function"?N.apply(this,arguments):N;return b*M},v,E)},y.scaleTo=function(h,N,v,E){y.transform(h,function(){var b=t.apply(this,arguments),M=this.__zoom,k=v==null?T(b):typeof v=="function"?v.apply(this,arguments):v,F=M.invert(k),U=typeof N=="function"?N.apply(this,arguments):N;return n(R(C(M,U),k,F),b,a)},v,E)},y.translateBy=function(h,N,v,E){y.transform(h,function(){return n(this.__zoom.translate(typeof N=="function"?N.apply(this,arguments):N,typeof v=="function"?v.apply(this,arguments):v),t.apply(this,arguments),a)},null,E)},y.translateTo=function(h,N,v,E,b){y.transform(h,function(){var M=t.apply(this,arguments),k=this.__zoom,F=E==null?T(M):typeof E=="function"?E.apply(this,arguments):E;return n(jt.translate(F[0],F[1]).scale(k.k).translate(typeof N=="function"?-N.apply(this,arguments):-N,typeof v=="function"?-v.apply(this,arguments):-v),M,a)},E,b)};function C(h,N){return N=Math.max(r[0],Math.min(r[1],N)),N===h.k?h:new me(N,h.x,h.y)}function R(h,N,v){var E=N[0]-v[0]*h.k,b=N[1]-v[1]*h.k;return E===h.x&&b===h.y?h:new me(h.k,E,b)}function T(h){return[(+h[0][0]+ +h[1][0])/2,(+h[0][1]+ +h[1][1])/2]}function H(h,N,v,E){h.on("start.zoom",function(){P(this,arguments).event(E).start()}).on("interrupt.zoom end.zoom",function(){P(this,arguments).event(E).end()}).tween("zoom",function(){var b=this,M=arguments,k=P(b,M).event(E),F=t.apply(b,M),U=v==null?T(F):typeof v=="function"?v.apply(b,M):v,Y=Math.max(F[1][0]-F[0][0],F[1][1]-F[0][1]),q=b.__zoom,G=typeof N=="function"?N.apply(b,M):N,re=u(q.invert(U).concat(Y/q.k),G.invert(U).concat(Y/G.k));return function(te){if(te===1)te=G;else{var ae=re(te),Ct=Y/ae[2];te=new me(Ct,U[0]-ae[0]*Ct,U[1]-ae[1]*Ct)}k.zoom(null,te)}})}function P(h,N,v){return!v&&h.__zooming||new _(h,N)}function _(h,N){this.that=h,this.args=N,this.active=0,this.sourceEvent=null,this.extent=t.apply(h,N),this.taps=0}_.prototype={event:function(h){return h&&(this.sourceEvent=h),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(h,N){return this.mouse&&h!=="mouse"&&(this.mouse[1]=N.invert(this.mouse[0])),this.touch0&&h!=="touch"&&(this.touch0[1]=N.invert(this.touch0[0])),this.touch1&&h!=="touch"&&(this.touch1[1]=N.invert(this.touch1[0])),this.that.__zoom=N,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(h){var N=ye(this.that).datum();c.call(h,this.that,new Xs(h,{sourceEvent:this.sourceEvent,target:y,transform:this.that.__zoom,dispatch:c}),N)}};function ee(h,...N){if(!e.apply(this,arguments))return;var v=P(this,N).event(h),E=this.__zoom,b=Math.max(r[0],Math.min(r[1],E.k*Math.pow(2,i.apply(this,arguments)))),M=ge(h);if(v.wheel)(v.mouse[0][0]!==M[0]||v.mouse[0][1]!==M[1])&&(v.mouse[1]=E.invert(v.mouse[0]=M)),clearTimeout(v.wheel);else{if(E.k===b)return;v.mouse=[M,E.invert(M)],nt(this),v.start()}ze(h),v.wheel=setTimeout(k,I),v.zoom("mouse",n(R(C(E,b),v.mouse[0],v.mouse[1]),v.extent,a));function k(){v.wheel=null,v.end()}}function de(h,...N){if(f||!e.apply(this,arguments))return;var v=h.currentTarget,E=P(this,N,!0).event(h),b=ye(h.view).on("mousemove.zoom",U,!0).on("mouseup.zoom",Y,!0),M=ge(h,v),k=h.clientX,F=h.clientY;aa(h.view),At(h),E.mouse=[M,this.__zoom.invert(M)],nt(this),E.start();function U(q){if(ze(q),!E.moved){var G=q.clientX-k,re=q.clientY-F;E.moved=G*G+re*re>$}E.event(q).zoom("mouse",n(R(E.that.__zoom,E.mouse[0]=ge(q,v),E.mouse[1]),E.extent,a))}function Y(q){b.on("mousemove.zoom mouseup.zoom",null),sa(q.view,E.moved),ze(q),E.event(q).end()}}function X(h,...N){if(e.apply(this,arguments)){var v=this.__zoom,E=ge(h.changedTouches?h.changedTouches[0]:h,this),b=v.invert(E),M=v.k*(h.shiftKey?.5:2),k=n(R(C(v,M),E,b),t.apply(this,N),a);ze(h),s>0?ye(this).transition().duration(s).call(H,k,E,h):ye(this).call(y.transform,k,E,h)}}function kt(h,...N){if(e.apply(this,arguments)){var v=h.touches,E=v.length,b=P(this,N,h.changedTouches.length===E).event(h),M,k,F,U;for(At(h),k=0;k<E;++k)F=v[k],U=ge(F,this),U=[U,this.__zoom.invert(U),F.identifier],b.touch0?!b.touch1&&b.touch0[2]!==U[2]&&(b.touch1=U,b.taps=0):(b.touch0=U,M=!0,b.taps=1+!!l);l&&(l=clearTimeout(l)),M&&(b.taps<2&&(d=U[0],l=setTimeout(function(){l=null},m)),nt(this),b.start())}}function St(h,...N){if(this.__zooming){var v=P(this,N).event(h),E=h.changedTouches,b=E.length,M,k,F,U;for(ze(h),M=0;M<b;++M)k=E[M],F=ge(k,this),v.touch0&&v.touch0[2]===k.identifier?v.touch0[0]=F:v.touch1&&v.touch1[2]===k.identifier&&(v.touch1[0]=F);if(k=v.that.__zoom,v.touch1){var Y=v.touch0[0],q=v.touch0[1],G=v.touch1[0],re=v.touch1[1],te=(te=G[0]-Y[0])*te+(te=G[1]-Y[1])*te,ae=(ae=re[0]-q[0])*ae+(ae=re[1]-q[1])*ae;k=C(k,Math.sqrt(te/ae)),F=[(Y[0]+G[0])/2,(Y[1]+G[1])/2],U=[(q[0]+re[0])/2,(q[1]+re[1])/2]}else if(v.touch0)F=v.touch0[0],U=v.touch0[1];else return;v.zoom("touch",n(R(k,F,U),v.extent,a))}}function $t(h,...N){if(this.__zooming){var v=P(this,N).event(h),E=h.changedTouches,b=E.length,M,k;for(At(h),f&&clearTimeout(f),f=setTimeout(function(){f=null},m),M=0;M<b;++M)k=E[M],v.touch0&&v.touch0[2]===k.identifier?delete v.touch0:v.touch1&&v.touch1[2]===k.identifier&&delete v.touch1;if(v.touch1&&!v.touch0&&(v.touch0=v.touch1,delete v.touch1),v.touch0)v.touch0[1]=this.__zoom.invert(v.touch0[0]);else if(v.end(),v.taps===2&&(k=ge(k,this),Math.hypot(d[0]-k[0],d[1]-k[1])<w)){var F=ye(this).on("dblclick.zoom");F&&F.apply(this,arguments)}}}return y.wheelDelta=function(h){return arguments.length?(i=typeof h=="function"?h:Ke(+h),y):i},y.filter=function(h){return arguments.length?(e=typeof h=="function"?h:Ke(!!h),y):e},y.touchable=function(h){return arguments.length?(o=typeof h=="function"?h:Ke(!!h),y):o},y.extent=function(h){return arguments.length?(t=typeof h=="function"?h:Ke([[+h[0][0],+h[0][1]],[+h[1][0],+h[1][1]]]),y):t},y.scaleExtent=function(h){return arguments.length?(r[0]=+h[0],r[1]=+h[1],y):[r[0],r[1]]},y.translateExtent=function(h){return arguments.length?(a[0][0]=+h[0][0],a[1][0]=+h[1][0],a[0][1]=+h[0][1],a[1][1]=+h[1][1],y):[[a[0][0],a[0][1]],[a[1][0],a[1][1]]]},y.constrain=function(h){return arguments.length?(n=h,y):n},y.duration=function(h){return arguments.length?(s=+h,y):s},y.interpolate=function(h){return arguments.length?(u=h,y):u},y.on=function(){var h=c.on.apply(c,arguments);return h===c?y:h},y.clickDistance=function(h){return arguments.length?($=(h=+h)*h,y):Math.sqrt($)},y.tapDistance=function(h){return arguments.length?(w=+h,y):w},y}const di=Symbol("MiniMapSlots"),Zs=["id","x","y","rx","ry","width","height","fill","stroke","stroke-width","shape-rendering"],Qs={name:"MiniMapNode",compatConfig:{MODE:3},inheritAttrs:!1},el=x({...Qs,props:{id:{},type:{},selected:{type:Boolean},dragging:{type:Boolean},position:{},dimensions:{},borderRadius:{},color:{},shapeRendering:{},strokeColor:{},strokeWidth:{},hidden:{type:Boolean}},emits:["click","dblclick","mouseenter","mousemove","mouseleave"],setup(e,{emit:t}){const n=e,i=Fi(di),o=En(),r=Fe(()=>o.style??{});function a(d){t("click",d)}function s(d){t("dblclick",d)}function u(d){t("mouseenter",d)}function c(d){t("mousemove",d)}function l(d){t("mouseleave",d)}return(d,f)=>!d.hidden&&d.dimensions.width!==0&&d.dimensions.height!==0?(g(),z(D,{key:0},[p(i)[`node-${n.type}`]?(g(),A(Hi(p(i)[`node-${n.type}`]),Ve(rt({key:0},{...n,...d.$attrs})),null,16)):(g(),z("rect",rt({key:1,id:d.id},d.$attrs,{class:["vue-flow__minimap-node",{selected:d.selected,dragging:d.dragging}],x:d.position.x,y:d.position.y,rx:d.borderRadius,ry:d.borderRadius,width:d.dimensions.width,height:d.dimensions.height,fill:d.color||r.value.background||r.value.backgroundColor,stroke:d.strokeColor,"stroke-width":d.strokeWidth,"shape-rendering":d.shapeRendering,onClick:a,onDblclick:s,onMouseenter:u,onMousemove:c,onMouseleave:l}),null,16,Zs))],64)):B("",!0)}}),tl=["width","height","viewBox","aria-labelledby"],nl=["id"],il=["d","fill","stroke","stroke-width"],ol={name:"MiniMap",compatConfig:{MODE:3}},rl=x({...ol,props:{nodeColor:{type:[String,Function],default:"#e2e2e2"},nodeStrokeColor:{type:[String,Function],default:"transparent"},nodeClassName:{type:[String,Function]},nodeBorderRadius:{default:5},nodeStrokeWidth:{default:2},maskColor:{default:"rgb(240, 240, 240, 0.6)"},maskStrokeColor:{default:"none"},maskStrokeWidth:{default:1},position:{default:"bottom-right"},pannable:{type:Boolean,default:!1},zoomable:{type:Boolean,default:!1},width:{},height:{},ariaLabel:{default:"Vue Flow mini map"},inversePan:{type:Boolean,default:!1},zoomStep:{default:10},offsetScale:{default:5},maskBorderRadius:{default:0}},emits:["click","nodeClick","nodeDblclick","nodeMouseenter","nodeMousemove","nodeMouseleave"],setup(e,{emit:t}){const n=Bi(),i=En(),o=200,r=150,{id:a,edges:s,viewport:u,translateExtent:c,dimensions:l,emits:d,d3Selection:f,d3Zoom:m,getNodesInitialized:I}=_t(),$=He();Pi(di,n);const w=Fe(()=>{var b;return e.width??((b=i.style)==null?void 0:b.width)??o}),y=Fe(()=>{var b;return e.height??((b=i.style)==null?void 0:b.height)??r}),C=typeof window>"u"||window.chrome?"crispEdges":"geometricPrecision",R=O(()=>typeof e.nodeColor=="string"?()=>e.nodeColor:e.nodeColor),T=O(()=>typeof e.nodeStrokeColor=="string"?()=>e.nodeStrokeColor:e.nodeStrokeColor),H=O(()=>typeof e.nodeClassName=="string"?()=>e.nodeClassName:typeof e.nodeClassName=="function"?e.nodeClassName:()=>""),P=O(()=>ki(I.value.filter(b=>!b.hidden))),_=O(()=>({x:-u.value.x/u.value.zoom,y:-u.value.y/u.value.zoom,width:l.value.width/u.value.zoom,height:l.value.height/u.value.zoom})),ee=O(()=>I.value&&I.value.length?Si(P.value,_.value):_.value),de=O(()=>{const b=ee.value.width/w.value,M=ee.value.height/y.value;return Math.max(b,M)}),X=O(()=>{const b=de.value*w.value,M=de.value*y.value,k=e.offsetScale*de.value;return{offset:k,x:ee.value.x-(b-ee.value.width)/2-k,y:ee.value.y-(M-ee.value.height)/2-k,width:b+k*2,height:M+k*2}}),kt=O(()=>!X.value.x||!X.value.y?"":`
2
2
  M${X.value.x-X.value.offset},${X.value.y-X.value.offset}
3
3
  h${X.value.width+X.value.offset*2}
4
4
  v${X.value.height+X.value.offset*2}
@@ -1,2 +1,2 @@
1
- import{ao as x,ap as C,aq as O,q as _,_ as $}from"#entry";import"./BmhnSWN5.js";import{_ as y}from"./DnodTinn.js";import{G as T}from"./CXRolcM8.js";import{F as V,u as j,O as B,Z as g,W as m,G as s,j as h,r as w,w as L,a$ as E,b as I,a1 as d,X as p,b0 as N,b1 as P,b2 as R,_ as W,b3 as q,$ as v,aa as b,ac as k,a3 as S,aP as z,a8 as H,L as U}from"./CJ9AjueP.js";const G={error:"alert-circle-outline",healthy:"heart",degraded:"heart-flash",down:"heart-broken",warning:"alert-octagon-outline",progressing:"progress-clock"},K={error:"error",degraded:"warning",down:"error",healthy:"success",warning:"warning",progressing:"warning"},D={cancelled:"close-circle-outline",destroyed:"trash-can-outline",refreshed:"check-circle-outline",updated:"check-circle-outline",skipped:"skip-next-circle-outline",failed:"alert-circle-outline",cancelling:"stop-circle-outline",pending:"clock-outline",destroying:"trash-can-outline",processing_triggers:"flash",previewing:"eye-outline",previewed:"eye-outline",refreshing:"refresh",updating:"sync"},M={updated:"success",cancelled:"warning",destroyed:"success",refreshed:"success",skipped:"",failed:"error",cancelling:"warning",pending:"",destroying:"error",processing_triggers:"primary",previewing:"secondary",previewed:"success",refreshing:"info",updating:"primary"},A={undeployed:"circle-outline",attempted:"clock-outline",deployed:"check-circle-outline",failed:"alert-circle-outline"},F={undeployed:"",attempted:"warning",deployed:"success",failed:"error"},X={error:"alert-circle-outline",evaluated:"check-circle-outline",evaluating:"cogs"},Z={error:"error",evaluated:"success",evaluating:"primary"};function J(e,r){return e.inputHash&&e.inputHash!==r?{name:"instance-state",title:"State",status:"changed",message:"The configuration of this instance or one of its dependencies has changed since the last operation.",icon:"not-equal-variant",color:"warning",important:!1,order:5}:{name:"instance-state",status:e.status,title:"State",message:`Instance is ${e.status}`,icon:A[e.status],color:F[e.status],order:5,important:!1}}function Q(){return{name:"instnace-state",status:"undeployed",title:"State",message:"Instance is not deployed",icon:"circle-outline",color:"",important:!1,order:5}}function Y(e,r){const t=e.lastOperationState;return{name:"operation",logs:!0,title:"Operation",status:t.status,icon:D[t.status],color:M[t.status],important:x(r?.status)||t.status==="failed"&&e.status!=="undeployed",order:10,progress:C(t.status)&&t.status!=="pending"&&t.currentResourceCount&&t.totalResourceCount?Math.round(t.currentResourceCount/t.totalResourceCount*100):void 0}}function ee(e){return{name:"evaluation",status:e.status,title:"Evaluation",message:e.message??"",icon:X[e.status],color:Z[e.status],important:e.status==="error",order:15}}function te(e){return e.status==="ok"?{name:"validation",status:"ok",title:"Validation",message:"Instance is valid",icon:"check-circle-outline",color:"success",important:!1,order:20}:{name:"validation",title:"Validation",status:"error",message:e.errorText,icon:"alert-circle-outline",color:"error",important:!0,order:20}}function ae(e){return{name:e.name,status:e.value,title:e.meta.title,message:e.message??"",icon:G[e.value]??"information-outline",customIcon:e.meta.icon,color:e.meta.iconColor??K[e.value]??"primary",important:e.value===O.Error,order:e.order??50}}function oe(e,r,t,i){const n=[];if(e&&e.status!=="undeployed"?n.push(J(e,t)):n.push(Q()),e?.lastOperationState&&n.push(Y(e,r)),e?.evaluationState&&n.push(ee(e.evaluationState)),i&&n.push(te(i)),e?.customStatuses)for(const u of e.customStatuses)n.push(ae(u));return n.sort((u,c)=>u.order-c.order)}const ne=V({__name:"InstanceStatusLogsTab",props:{operationState:{}},setup(e){const{projectStore:r}=_(),{$client:t}=j();let i=null;const n=c=>{const l=c.split(`
1
+ import{ap as x,aq as C,ar as O,q as _,_ as $}from"#entry";import"./BmhnSWN5.js";import{_ as y}from"./DnodTinn.js";import{G as T}from"./DbpD4JwV.js";import{F as V,u as j,O as B,Z as g,W as m,G as s,j as h,r as w,w as L,a$ as E,b as I,a1 as d,X as p,b0 as N,b1 as P,b2 as R,_ as W,b3 as q,$ as v,aa as b,ac as k,a3 as S,aP as z,a8 as H,L as U}from"./CJ9AjueP.js";const G={error:"alert-circle-outline",healthy:"heart",degraded:"heart-flash",down:"heart-broken",warning:"alert-octagon-outline",progressing:"progress-clock"},K={error:"error",degraded:"warning",down:"error",healthy:"success",warning:"warning",progressing:"warning"},D={cancelled:"close-circle-outline",destroyed:"trash-can-outline",refreshed:"check-circle-outline",updated:"check-circle-outline",skipped:"skip-next-circle-outline",failed:"alert-circle-outline",cancelling:"stop-circle-outline",pending:"clock-outline",destroying:"trash-can-outline",processing_triggers:"flash",previewing:"eye-outline",previewed:"eye-outline",refreshing:"refresh",updating:"sync"},M={updated:"success",cancelled:"warning",destroyed:"success",refreshed:"success",skipped:"",failed:"error",cancelling:"warning",pending:"",destroying:"error",processing_triggers:"primary",previewing:"secondary",previewed:"success",refreshing:"info",updating:"primary"},A={undeployed:"circle-outline",attempted:"clock-outline",deployed:"check-circle-outline",failed:"alert-circle-outline"},F={undeployed:"",attempted:"warning",deployed:"success",failed:"error"},X={error:"alert-circle-outline",evaluated:"check-circle-outline",evaluating:"cogs"},Z={error:"error",evaluated:"success",evaluating:"primary"};function J(e,r){return e.inputHash&&e.inputHash!==r?{name:"instance-state",title:"State",status:"changed",message:"The configuration of this instance or one of its dependencies has changed since the last operation.",icon:"not-equal-variant",color:"warning",important:!1,order:5}:{name:"instance-state",status:e.status,title:"State",message:`Instance is ${e.status}`,icon:A[e.status],color:F[e.status],order:5,important:!1}}function Q(){return{name:"instnace-state",status:"undeployed",title:"State",message:"Instance is not deployed",icon:"circle-outline",color:"",important:!1,order:5}}function Y(e,r){const t=e.lastOperationState;return{name:"operation",logs:!0,title:"Operation",status:t.status,icon:D[t.status],color:M[t.status],important:x(r?.status)||t.status==="failed"&&e.status!=="undeployed",order:10,progress:C(t.status)&&t.status!=="pending"&&t.currentResourceCount&&t.totalResourceCount?Math.round(t.currentResourceCount/t.totalResourceCount*100):void 0}}function ee(e){return{name:"evaluation",status:e.status,title:"Evaluation",message:e.message??"",icon:X[e.status],color:Z[e.status],important:e.status==="error",order:15}}function te(e){return e.status==="ok"?{name:"validation",status:"ok",title:"Validation",message:"Instance is valid",icon:"check-circle-outline",color:"success",important:!1,order:20}:{name:"validation",title:"Validation",status:"error",message:e.errorText,icon:"alert-circle-outline",color:"error",important:!0,order:20}}function ae(e){return{name:e.name,status:e.value,title:e.meta.title,message:e.message??"",icon:G[e.value]??"information-outline",customIcon:e.meta.icon,color:e.meta.iconColor??K[e.value]??"primary",important:e.value===O.Error,order:e.order??50}}function oe(e,r,t,i){const n=[];if(e&&e.status!=="undeployed"?n.push(J(e,t)):n.push(Q()),e?.lastOperationState&&n.push(Y(e,r)),e?.evaluationState&&n.push(ee(e.evaluationState)),i&&n.push(te(i)),e?.customStatuses)for(const u of e.customStatuses)n.push(ae(u));return n.sort((u,c)=>u.order-c.order)}const ne=V({__name:"InstanceStatusLogsTab",props:{operationState:{}},setup(e){const{projectStore:r}=_(),{$client:t}=j();let i=null;const n=c=>{const l=c.split(`
2
2
  `);for(const o of l)i.writeln(o)};if(C(e.operationState.status)){const{unsubscribe:c}=t.logs.watchInstanceLogs.subscribe({stateId:e.operationState.stateId,operationId:e.operationState.operationId},{onData:l=>{i&&n(l.content)}});B(c)}const u=async c=>{i=c;const l=await t.logs.getInstanceLogs.query({projectId:r.projectId,stateId:e.operationState.stateId,operationId:e.operationState.operationId});for(const o of l)n(o.content)};return(c,l)=>(m(),g(s(T),{class:"mt-2 mb-2",columns:80,rows:24,onLoad:u}))}}),se={key:0,class:"d-flex align-center justify-center",style:{width:"100%",height:"100%"}},re={class:"d-flex flex-column"},ie=V({__name:"InstanceStatusBadge",props:{state:{},operation:{},expectedInputHash:{},validationOutput:{}},setup(e){const r=h(()=>oe(e.state,e.operation,e.expectedInputHash,e.validationOutput)),t=h(()=>r.value.find(o=>o.important)??r.value[0]),i=w(t.value.name),n=w(!1);L([t,e.state],()=>{n.value||(i.value=t.value.name)},{immediate:!0});const u=o=>o.startsWith("#")?{}:{[`text-${o}`]:!0},c=o=>o.startsWith("#")?{color:o}:{},l=h(()=>t.value.progress!==void 0&&t.value.progress<100);return(o,f)=>(m(),g(E,{modelValue:s(n),"onUpdate:modelValue":f[1]||(f[1]=a=>I(n)?n.value=a:null),"open-on-hover":"","close-on-content-click":!1,location:"end"},{activator:d(({props:a})=>[p(z,H(a,{color:s(t).color,style:[{width:"44px"},{padding:s(l)?"0":void 0}],class:"status-chip"}),{default:d(()=>[s(l)?(m(),U("div",se,S(s(t).progress)+"% ",1)):(m(),g(s(y),{key:1,size:20,icon:`mdi-${s(t).icon}`,"custom-icon":s(t).customIcon},null,8,["icon","custom-icon"]))]),_:2},1040,["color","style"])]),default:d(()=>[p(N,{color:"black"},{default:d(()=>[p(P,{modelValue:s(i),"onUpdate:modelValue":f[0]||(f[0]=a=>I(i)?i.value=a:null),items:s(r)},{tab:d(({item:a})=>[p(q,{value:a.name},{default:d(()=>[p(s(y),{size:22,icon:`mdi-${a.icon}`,"custom-icon":a.customIcon,color:a.color,class:"mr-2"},null,8,["icon","custom-icon","color"]),v("div",re,[v("div",{class:k(["font-weight-bold text-start",u(a.color)]),style:b(c(a.color))},S(a.title),7),v("div",{class:k(["text-caption font-weight-bold text-start",u(a.color)]),style:b(c(a.color))},S(a.status),7)])]),_:2},1032,["value"])]),item:d(({item:a})=>[p(R,{value:a.name},{default:d(()=>[a.logs?o.state?.lastOperationState?.operationId?(m(),g(ne,{key:o.state.lastOperationState.operationId,"instance-id":o.state.id,operationState:o.state.lastOperationState},null,8,["instance-id","operationState"])):W("",!0):(m(),g(s(T),{key:0,class:"mt-2 mb-2",columns:80,rows:24,content:a.message},null,8,["content"]))]),_:2},1032,["value"])]),_:1},8,["modelValue","items"])]),_:1})]),_:1},8,["modelValue"]))}}),me=$(ie,[["__scopeId","data-v-eb35995d"]]);export{me as I};
@@ -1 +1 @@
1
- import{q as c,t as b,s as C,_ as I}from"#entry";import{_ as g,I as A}from"./CFtPCidf.js";import{S as k}from"./DkPrE8g-.js";import{D as w,a as x}from"./DtufO5Sm.js";import{_ as V}from"./RJCesp1_.js";import{_ as B}from"./D12QiTSl.js";import{_ as D}from"./Q0n-WHNk.js";import{P as N}from"./D4I3CwV0.js";import{F as S,aL as m,Z as f,W as _,a1 as s,G as e,X as i,_ as U,$ as v,a3 as j,aM as L,aE as $,a2 as h,aF as z,ay as T}from"./CJ9AjueP.js";import"./BmhnSWN5.js";import"./PZl7tHUC.js";import"./DnodTinn.js";import"./Dj-ZGW1B.js";import"./DpCgGkMV.js";import"./BOoETPDV.js";import"./ByQEjDj-.js";import"./D-IcYK3n.js";const E={class:"text-body-2"},F={class:"page-content-container"},M=S({__name:"[pageId]",props:{params:{}},async setup(p){let t,r;const{settingsStore:u}=c(),{projectStore:d}=c();d.initializing?([t,r]=m(()=>C(()=>d.initialized).toBe(!0)),await t,r(),d.addLibraryRoot()):([t,r]=m(()=>d.initialize1()),await t,r(),[t,r]=m(()=>d.initialize2()),await t,r());const a=([t,r]=m(()=>u.getPageDetails(p.params.pageId)),t=await t,r(),t);if(!a)throw b({statusCode:404,statusMessage:"Page not found"});const o=u.artifactsForPage(p.params.pageId);[t,r]=m(()=>o.load()),await t,r();const P=[{key:"pageId",label:"Page ID"},{key:"name",label:"Name"},{key:"serviceAccount",label:"Owner"},{key:"createdAt",label:"Created"},{key:"updatedAt",label:"Last Updated"}];return(y,n)=>(_(),f(e(w),null,{default:s(()=>[i(k,{meta:e(a).meta,"fallback-icon":"mdi-file-document-outline",title:e(a).meta.title||e(a).name||"Unnamed Page",description:e(a).meta.description},null,8,["meta","title","description"]),i(e(x),{title:"Page Details",items:P},{"item.pageId":s(()=>[i(e(A),{value:e(a).id},null,8,["value"])]),"item.name":s(()=>[v("div",E,j(e(a).name||"N/A"),1)]),"item.serviceAccount":s(()=>[i(e(B),{item:e(a)},null,8,["item"])]),"item.createdAt":s(()=>[i(e(g),{value:e(a).createdAt},null,8,["value"])]),"item.updatedAt":s(()=>[i(e(g),{value:e(a).updatedAt},null,8,["value"])]),_:1}),i(L,{elevation:0},{default:s(()=>[i(e(V),{title:"Artifacts",icon:"mdi-package-variant",count:e(o).data.value.total},{default:s(()=>[i(e(D),{search:e(o).search.value,"onUpdate:search":n[0]||(n[0]=l=>e(o).search.value=l),"sort-by":e(o).sortBy.value,"onUpdate:sortBy":n[1]||(n[1]=l=>e(o).sortBy.value=l),page:e(o).page.value,"onUpdate:page":n[2]||(n[2]=l=>e(o).page.value=l),"items-per-page":e(o).itemsPerPage.value,"onUpdate:itemsPerPage":n[3]||(n[3]=l=>e(o).itemsPerPage.value=l),"project-id":y.params.projectId,data:e(o).data.value,loading:e(o).isLoading.value,"hide-header":""},null,8,["search","sort-by","page","items-per-page","project-id","data","loading"])]),_:1},8,["count"])]),_:1}),e(a).content&&e(a).content.length>0?(_(),f($,{key:0,class:"content-card",color:"#2d2d2d","bg-color":"#1e1e1e"},{default:s(()=>[i(z,null,{default:s(()=>n[4]||(n[4]=[h("Page Content")])),_:1,__:[4]}),i(T,null,{default:s(()=>[v("div",F,[i(e(N),{content:e(a).content},null,8,["content"])])]),_:1})]),_:1})):U("",!0)]),_:1}))}}),se=I(M,[["__scopeId","data-v-a7e23b29"]]);export{se as default};
1
+ import{q as c,t as b,s as C,_ as I}from"#entry";import{_ as g,I as A}from"./CFtPCidf.js";import{S as k}from"./DkPrE8g-.js";import{D as w,a as x}from"./DtufO5Sm.js";import{_ as V}from"./RJCesp1_.js";import{_ as B}from"./D12QiTSl.js";import{_ as D}from"./Q0n-WHNk.js";import{P as N}from"./CiwR41uk.js";import{F as S,aL as m,Z as f,W as _,a1 as s,G as e,X as i,_ as U,$ as v,a3 as j,aM as L,aE as $,a2 as h,aF as z,ay as T}from"./CJ9AjueP.js";import"./BmhnSWN5.js";import"./PZl7tHUC.js";import"./DnodTinn.js";import"./Dj-ZGW1B.js";import"./DpCgGkMV.js";import"./BOoETPDV.js";import"./ByQEjDj-.js";import"./D-IcYK3n.js";const E={class:"text-body-2"},F={class:"page-content-container"},M=S({__name:"[pageId]",props:{params:{}},async setup(p){let t,r;const{settingsStore:u}=c(),{projectStore:d}=c();d.initializing?([t,r]=m(()=>C(()=>d.initialized).toBe(!0)),await t,r(),d.addLibraryRoot()):([t,r]=m(()=>d.initialize1()),await t,r(),[t,r]=m(()=>d.initialize2()),await t,r());const a=([t,r]=m(()=>u.getPageDetails(p.params.pageId)),t=await t,r(),t);if(!a)throw b({statusCode:404,statusMessage:"Page not found"});const o=u.artifactsForPage(p.params.pageId);[t,r]=m(()=>o.load()),await t,r();const P=[{key:"pageId",label:"Page ID"},{key:"name",label:"Name"},{key:"serviceAccount",label:"Owner"},{key:"createdAt",label:"Created"},{key:"updatedAt",label:"Last Updated"}];return(y,n)=>(_(),f(e(w),null,{default:s(()=>[i(k,{meta:e(a).meta,"fallback-icon":"mdi-file-document-outline",title:e(a).meta.title||e(a).name||"Unnamed Page",description:e(a).meta.description},null,8,["meta","title","description"]),i(e(x),{title:"Page Details",items:P},{"item.pageId":s(()=>[i(e(A),{value:e(a).id},null,8,["value"])]),"item.name":s(()=>[v("div",E,j(e(a).name||"N/A"),1)]),"item.serviceAccount":s(()=>[i(e(B),{item:e(a)},null,8,["item"])]),"item.createdAt":s(()=>[i(e(g),{value:e(a).createdAt},null,8,["value"])]),"item.updatedAt":s(()=>[i(e(g),{value:e(a).updatedAt},null,8,["value"])]),_:1}),i(L,{elevation:0},{default:s(()=>[i(e(V),{title:"Artifacts",icon:"mdi-package-variant",count:e(o).data.value.total},{default:s(()=>[i(e(D),{search:e(o).search.value,"onUpdate:search":n[0]||(n[0]=l=>e(o).search.value=l),"sort-by":e(o).sortBy.value,"onUpdate:sortBy":n[1]||(n[1]=l=>e(o).sortBy.value=l),page:e(o).page.value,"onUpdate:page":n[2]||(n[2]=l=>e(o).page.value=l),"items-per-page":e(o).itemsPerPage.value,"onUpdate:itemsPerPage":n[3]||(n[3]=l=>e(o).itemsPerPage.value=l),"project-id":y.params.projectId,data:e(o).data.value,loading:e(o).isLoading.value,"hide-header":""},null,8,["search","sort-by","page","items-per-page","project-id","data","loading"])]),_:1},8,["count"])]),_:1}),e(a).content&&e(a).content.length>0?(_(),f($,{key:0,class:"content-card",color:"#2d2d2d","bg-color":"#1e1e1e"},{default:s(()=>[i(z,null,{default:s(()=>n[4]||(n[4]=[h("Page Content")])),_:1,__:[4]}),i(T,null,{default:s(()=>[v("div",F,[i(e(N),{content:e(a).content},null,8,["content"])])]),_:1})]),_:1})):U("",!0)]),_:1}))}}),se=I(M,[["__scopeId","data-v-a7e23b29"]]);export{se as default};
@@ -0,0 +1 @@
1
+ import{q as j,aW as D,aX as E,aD as O,aY as H,aZ as W,z as A,A as G,B as q,s as X,_ as Y,k as Z}from"#entry";import"./BmhnSWN5.js";import{c as J,_ as K,a as Q,b as U}from"./CL4a9rOt.js";import{_ as ee,I as te,G as ne}from"./CpoD4Tu0.js";import{I as se}from"./CsCYo3-3.js";import{F as b,j as m,aW as oe,Z as g,W as y,G as e,a1 as v,X as S,u as ae,aL as h,J as ie,ak as z,al as V,_ as $,a8 as B,L as F,$ as N,a3 as re,aY as ce}from"./CJ9AjueP.js";import{_ as pe}from"./BDCIi1Fb.js";import{P as ue}from"./BpWWYZTV.js";import"./PZl7tHUC.js";import"./mzIiiUgI.js";import"./Cvl8iHT_.js";import"./CiwR41uk.js";import"./ClBsnNkh.js";import"./DnodTinn.js";import"./DbpD4JwV.js";import"./CD9Hkzj8.js";const de=b({__name:"CompositeInstanceInputNode",props:{id:{},type:{},selected:{type:Boolean},connectable:{type:[Boolean,Number,String,Function]},position:{},dimensions:{},label:{},isValidTargetPos:{type:Function},isValidSourcePos:{type:Function},parent:{},parentNodeId:{},dragging:{type:Boolean},resizing:{type:Boolean},zIndex:{},targetPosition:{},sourcePosition:{},dragHandle:{},data:{},events:{},instance:{}},setup(s){const t=j(),{instancesStore:n,libraryStore:a,stateStore:u,validationStore:c,operationsStore:o}=t,p=m(()=>u.instanceLocks.get(s.instance.id)),f=m(()=>a.library.components[s.instance.type]),i=m(()=>u.getInstanceState(s.instance.id)),C=oe("contextMenu");return(l,d)=>(y(),g(e(ee),{instance:l.instance,component:e(f),entities:e(a).library.entities,state:e(i),editable:e(n).instances.has(l.instance.id),"input-resolver-outputs":e(n).inputResolverOutputs,"input-resolver-dependent-map":e(n).inputResolverDependentMap,"io-type":"inputs","io-mirror":!0,"hide-show-composite":!0,"onSave:args":d[0]||(d[0]=(I,_,w)=>e(n).updateInstance(I,_,w)),"onOperation:launch":d[1]||(d[1]=I=>e(o).launchInstanceOperation(I,l.data.instance)),"onOperation:cancel":d[2]||(d[2]=I=>e(o).cancelInstanceOperation(e(i).lastOperationState.operationId,l.data.instance.id)),onContextmenu:d[3]||(d[3]=I=>e(C)?.showContextMenu(I))},{status:v(()=>[S(e(se),{state:e(i),"expected-input-hash":e(u).inputHashOutputs.get(l.instance.id)?.inputHash,"validation-output":e(c).validationOutputs.get(l.instance.id)},null,8,["state","expected-input-hash","validation-output"])]),default:v(()=>[S(e(J),{ref_key:"contextMenu",ref:C,stores:e(t),instance:l.instance,component:e(f),state:e(i),editable:!1,locked:!!e(p)},null,8,["stores","instance","component","state","locked"])]),_:1},8,["instance","component","entities","state","editable","input-resolver-outputs","input-resolver-dependent-map"]))}}),le=b({__name:"CompositeInstanceOutputNode",props:{id:{},type:{},selected:{type:Boolean},connectable:{type:[Boolean,Number,String,Function]},position:{},dimensions:{},label:{},isValidTargetPos:{type:Function},isValidSourcePos:{type:Function},parent:{},parentNodeId:{},dragging:{type:Boolean},resizing:{type:Boolean},zIndex:{},targetPosition:{},sourcePosition:{},dragHandle:{},data:{},events:{},instance:{}},setup(s){const{libraryStore:t}=j(),n=m(()=>t.library.components[s.instance.type]);return(a,u)=>(y(),g(e(pe),{component:e(n),subtitle:"Outputs",style:{overflow:"visible"}},{default:v(()=>[S(e(te),{instance:a.instance,component:e(n),entities:e(t).library.entities,type:"outputs",mirror:!0},null,8,["instance","component","entities"])]),_:1},8,["component"]))}}),M=D({name:"instance",getStoreId:(s,t,n)=>`projects/${s}/composites/${t}/${n}`,create:({storeId:s,id:[t,n,a],logger:u})=>E(s,()=>{const{vueFlowStore:c,nodeFactory:o,onNodesMoved:p}=O("instance",t,n,a),{$client:f}=ae(),{instancesStore:i,stateStore:C}=H(t),l=m(()=>C.stateIdToStateMap.get(n)),d=m(()=>{const r=l.value;return r?i.instances.get(r.instanceId):void 0}),I=async()=>{u.info({projectId:t},"initializing composite instance store");const r=await f.workspace.getCompositeViewport.query({projectId:t,stateId:n});r&&(c.defaultViewport.value=r),u.info({projectId:t,stateId:n},"composite instance store initialized")},_=()=>{const r=d.value;if(!r)throw new Error(`Virtual instance not found for state: ${n}`);const x=o.createNodeFromInstance(r,{type:"inputs"}),R=i.getInstanceChildren(r.id);if(o.createNodesForModels(R,[],{readonly:!0}),r.outputs&&Object.keys(r.outputs).length>0){o.createNodeFromInstance(r,{id:"outputs",type:"outputs",readonly:!0}),o.instanceIdToNodeIdMap.set(r.id,x.id);for(const[L,T]of Object.entries(r.outputs))for(const k of T){const P=i.instances.get(k.instanceId);P&&o.createEdgeForInstanceOutput(P,L,k)}}A(c).then(()=>G(c)).then(()=>c.fitView()).then(()=>q(c,p))},w=W(async r=>{await f.workspace.setCompositeViewport.mutate({projectId:t,stateId:n,viewport:r})},1e3);return c.onViewportChange(w),{initialize:I,placeNodes:_,stateId:n,instanceState:l,instance:d,version:a}})}),me=b({__name:"CompositeInstanceCanvas",async setup(s){let t,n;const{projectStore:a,instancesStore:u,libraryStore:c}=j(),o=M();return a.initializing?([t,n]=h(()=>X(()=>a.initialized).toBe(!0)),await t,n(),a.addLibraryRoot()):([t,n]=h(()=>a.initialize1()),await t,n(),[t,n]=h(()=>a.initialize2()),await t,n()),[t,n]=h(()=>o.initialize()),await t,n(),ie(o.placeNodes),(p,f)=>(y(),g(e(ne),{canvasId:["instance",e(a).projectId,e(o).stateId,e(o).version],components:e(c).library.components,entities:e(c).library.entities,"input-resolver-outputs":e(u).inputResolverOutputs,editable:""},{"node-instance":v(i=>[S(e(U),z(V(i)),null,16)]),"node-inputs":v(i=>[e(o).instance?(y(),g(de,B({key:0},i,{instance:e(o).instance}),null,16,["instance"])):$("",!0)]),"node-outputs":v(i=>[e(o).instance?(y(),g(le,B({key:0},i,{instance:e(o).instance,type:"outputs"}),null,16,["instance"])):$("",!0)]),"node-hub":v(i=>[S(e(Q),z(V(i)),null,16)]),"panel-bottom-left":v(()=>[S(e(K))]),_:1},8,["canvasId","components","entities","input-resolver-outputs"]))}}),ye=Y(me,[["__scopeId","data-v-2e3534bb"]]),fe=b({__name:"CompositeInstanceWrapper",props:{projectId:{},stateId:{},version:{}},setup(s){return O.ensureCreated("instance",s.projectId,s.stateId,s.version),M.ensureCreated(s.projectId,s.stateId,s.version),(t,n)=>(y(),g(ye,{"project-id":t.projectId,"state-id":t.stateId,version:t.version},null,8,["project-id","state-id","version"]))}}),ve={key:1,class:"d-flex justify-center align-center h-100"},Ie={class:"text-center"},ge={key:2,class:"d-flex justify-center align-center h-100"},Me=b({__name:"index",props:{params:{}},setup(s){const{instancesStore:t,stateStore:n}=Z(s.params.projectId),a=m(()=>n.stateIdToStateMap.get(s.params.stateId)),u=m(()=>{const p=a.value;return p?t.instances.get(p.instanceId):void 0}),c=m(()=>t.initializationPhase==="ready"&&n.initializationPhase==="ready"),o=m(()=>!!(a.value&&u.value));return(p,f)=>(y(),g(e(ue),{"project-id":p.params.projectId,"can-unlock":""},{default:v(()=>[e(c)&&e(o)?(y(),g(e(fe),{key:e(t).evaluationVersion,"project-id":p.params.projectId,"state-id":p.params.stateId,version:e(t).evaluationVersion},null,8,["project-id","state-id","version"])):e(c)?(y(),F("div",ve,[N("div",Ie,[f[0]||(f[0]=N("h3",null,"Instance state not found",-1)),N("p",null,"No instance state found for state ID: "+re(p.params.stateId),1)])])):(y(),F("div",ge,[S(ce,{indeterminate:"",color:"dark",size:"32"})]))]),_:1},8,["project-id"]))}});export{Me as default};
@@ -1,2 +1,2 @@
1
- import{ar as d,as as m,at as u,_ as f}from"#entry";import{F as w,aW as p,J as v,O as i,w as x,j as A,L as E,W as b}from"./CJ9AjueP.js";const g=w({__name:"GenericTerminal",props:{columns:{},rows:{},content:{}},emits:["load"],setup(n,{emit:l}){const a=p("terminalEl"),s=!n.columns||!n.rows,c=l;let e=null;return v(()=>{e=new d.Terminal({fontFamily:"monospace"});const t=new m.FitAddon,r=new u.WebglAddon;if(s?e.loadAddon(t):e.resize(n.columns,n.rows),e.loadAddon(r),e.open(a.value),s){t.fit();const o=new ResizeObserver(()=>{t.fit()});o.observe(a.value),i(()=>{o.disconnect()})}c("load",e),n.content!==void 0&&x(A(()=>n.content),o=>{e&&(e.clear(),e.write(o.replace(/\n/g,`\r
1
+ import{as as d,at as m,au as u,_ as f}from"#entry";import{F as w,aW as p,J as v,O as i,w as x,j as A,L as E,W as b}from"./CJ9AjueP.js";const g=w({__name:"GenericTerminal",props:{columns:{},rows:{},content:{}},emits:["load"],setup(n,{emit:l}){const a=p("terminalEl"),s=!n.columns||!n.rows,c=l;let e=null;return v(()=>{e=new d.Terminal({fontFamily:"monospace"});const t=new m.FitAddon,r=new u.WebglAddon;if(s?e.loadAddon(t):e.resize(n.columns,n.rows),e.loadAddon(r),e.open(a.value),s){t.fit();const o=new ResizeObserver(()=>{t.fit()});o.observe(a.value),i(()=>{o.disconnect()})}c("load",e),n.content!==void 0&&x(A(()=>n.content),o=>{e&&(e.clear(),e.write(o.replace(/\n/g,`\r
2
2
  `)))},{immediate:!0}),i(()=>{e?.dispose()})}),(t,r)=>(b(),E("div",{ref_key:"terminalEl",ref:a,class:"terminal-container"},null,512))}}),T=f(g,[["__scopeId","data-v-73718d9d"]]);export{T as G};
@@ -1,2 +1,2 @@
1
- import{q as I,k as f}from"#entry";import{F as p,u as j,O as g,Z as d,W as m,G as c,a1 as w,X as L}from"./CJ9AjueP.js";import{G as P}from"./CXRolcM8.js";import{P as b}from"./D2hOj9XC.js";import"./BmhnSWN5.js";import"./PZl7tHUC.js";import"./BL-2dw2H.js";const h=p({__name:"InstanceLogsPanel",props:{operationId:{},stateId:{}},setup(t){const{projectStore:o}=I(),{$client:n}=j();let r=null;const i=e=>{const a=e.split(`
1
+ import{q as I,k as f}from"#entry";import{F as p,u as j,O as g,Z as d,W as m,G as c,a1 as w,X as L}from"./CJ9AjueP.js";import{G as P}from"./DbpD4JwV.js";import{P as b}from"./BpWWYZTV.js";import"./BmhnSWN5.js";import"./PZl7tHUC.js";import"./CD9Hkzj8.js";const h=p({__name:"InstanceLogsPanel",props:{operationId:{},stateId:{}},setup(t){const{projectStore:o}=I(),{$client:n}=j();let r=null;const i=e=>{const a=e.split(`
2
2
  `);for(const s of a)r.writeln(s)},{unsubscribe:u}=n.logs.watchInstanceLogs.subscribe({operationId:t.operationId,stateId:t.stateId},{onData:e=>{r&&i(e.content)}});g(u);const l=async e=>{r=e;const a=await n.logs.getInstanceLogs.query({projectId:o.projectId,stateId:t.stateId,operationId:t.operationId});for(const s of a)i(s.content)};return(e,a)=>(m(),d(c(P),{onLoad:l}))}}),x=p({__name:"[stateId]",props:{params:{}},setup(t){return f(t.params.projectId),(o,n)=>(m(),d(c(b),{"project-id":o.params.projectId,"can-unlock":""},{default:w(()=>[L(c(h),{"operation-id":o.params.operationId,"state-id":o.params.stateId},null,8,["operation-id","state-id"])]),_:1},8,["project-id"]))}});export{x as default};
@@ -1 +1 @@
1
- import{k as A,_ as B,f as E,u as F,l as z,n as x}from"#entry";import{P as K}from"./D2hOj9XC.js";import{F as N,L as h,W as o,X as p,a1 as r,ab as M,C as U,w as R,j as G,$ as u,a9 as k,af as y,G as s,aA as w,_ as S,aK as X,aE as Z,ay as q,Z as m,a4 as H,a5 as $,ah as J,a0 as C,a2 as I,a3 as _,ac as V,ai as P}from"./CJ9AjueP.js";import"./BmhnSWN5.js";import"./PZl7tHUC.js";import"./BL-2dw2H.js";const O={class:"tab-wrapper"},Q=N({__name:"ProjectTabWrapper",props:{projectId:{}},setup(W){return A(W.projectId),(l,j)=>(o(),h("div",O,[p(K,{"project-id":l.projectId,"can-unlock":""},{default:r(()=>[M(l.$slots,"default",{},void 0,!0)]),_:3},8,["project-id"])]))}}),Y=B(Q,[["__scopeId","data-v-cbe63052"]]),ee={class:"data-settings-panel"},te={class:"panel-layout"},ae={class:"vertical-tabs"},se={class:"tab-section"},oe={class:"tab-label"},re={class:"tab-section"},ne={class:"tab-label"},ce={class:"tab-section"},le={class:"tab-label"},ie={class:"content-area"},de=N({__name:"settings",setup(W){const l=E(),j=F(),n=U(null);R(j.currentRoute,async t=>{t.path.startsWith("/settings/")&&(z.info({from:n.value?.path,to:t.path},"settings route changed"),n.value=t),t?.name==="settings"&&await f(i.value.beforeGlobalTabs[0])},{immediate:!0});const i=G(()=>{const b=j.getRoutes().filter(a=>a.path.startsWith("/settings/")&&a.path!=="/settings"&&a.meta?.tab),c=[],e=[];for(const a of b){const d=a.meta.tab;if(!d||!a.path.startsWith("/settings/"))continue;const T={name:a.name,icon:d.icon,label:d.label,order:d.order||50,isProjectTab:a.path.startsWith("/settings/projects/"),subpages:d.subpages??[]};T.isProjectTab?e.push(T):c.push(T)}c.sort((a,d)=>a.order-d.order),e.sort((a,d)=>a.order-d.order);const g=c.filter(a=>a.order<90),L=c.filter(a=>a.order>=90);return{beforeGlobalTabs:g,projectTabs:e,afterGlobalTabs:L}}),v=t=>n.value&&(t.name===n.value.name||t.subpages.includes(n.value.name)),D=G(()=>i.value.beforeGlobalTabs.find(v)||i.value.projectTabs.find(v)),f=async t=>{if(!t.isProjectTab){await x({name:t.name});return}await x({name:t.name,params:{projectId:l.focusedProjectId}})};return R(()=>l.focusedProjectId,async(t,b)=>{const c=j.currentRoute.value;!c||t===b&&c.path.startsWith("/settings/projects/")||!c.path.startsWith("/settings/")||(t&&i.value.projectTabs.length>0?await f(D.value??i.value.projectTabs[0]):!t&&c.path.startsWith("/settings/projects/")&&await f(i.value.beforeGlobalTabs[0]))}),(t,b)=>{const c=J("RouterView");return o(),h("div",ee,[u("div",te,[u("div",ae,[u("div",se,[(o(!0),h(k,null,y(s(i).beforeGlobalTabs,e=>(o(),m(P,{key:e.name,variant:"text",class:V(["tab-item",{active:v(e)}]),onClick:g=>f(e)},{default:r(()=>[p(C,{class:"tab-icon"},{default:r(()=>[I(_(e.icon),1)]),_:2},1024),u("span",oe,_(e.label),1)]),_:2},1032,["class","onClick"]))),128))]),p(w,{class:"section-divider"}),u("div",re,[p(X,{modelValue:s(l).focusedProjectId,"onUpdate:modelValue":b[0]||(b[0]=e=>s(l).focusedProjectId=e),items:s(l).projects,label:"Project","item-title":"meta.title","item-value":"id",variant:"outlined",density:"compact",class:"project-selector","prepend-inner-icon":"mdi-folder-outline",clearable:"","hide-details":""},null,8,["modelValue","items"]),s(l).focusedProjectId?(o(!0),h(k,{key:0},y(s(i).projectTabs,e=>(o(),m(P,{key:e.name,variant:"text",class:V(["tab-item",{active:v(e)}]),onClick:g=>f(e)},{default:r(()=>[p(C,{class:"tab-icon"},{default:r(()=>[I(_(e.icon),1)]),_:2},1024),u("span",ne,_(e.label),1)]),_:2},1032,["class","onClick"]))),128)):S("",!0)]),p(w,{class:"section-divider"}),u("div",ce,[(o(!0),h(k,null,y(s(i).afterGlobalTabs,e=>(o(),m(P,{key:e.name,variant:"text",class:V(["tab-item",{active:v(e)}]),onClick:g=>f(e)},{default:r(()=>[p(C,{class:"tab-icon"},{default:r(()=>[I(_(e.icon),1)]),_:2},1024),u("span",le,_(e.label),1)]),_:2},1032,["class","onClick"]))),128))])]),u("div",ie,[p(Z,{class:"content-card",variant:"flat"},{default:r(()=>[p(q,{class:"content-card-text"},{default:r(()=>[s(n)?(o(),m(c,{key:0,route:s(n)},{default:r(({Component:e})=>[s(n).params.projectId?(o(),m(H,{key:0},{default:r(()=>[(o(),m(s(Y),{"project-id":s(n).params.projectId,key:s(n).params.projectId},{default:r(()=>[(o(),m($(e),{params:s(n).params},null,8,["params"]))]),_:2},1032,["project-id"]))]),_:2},1024)):(o(),m($(e),{key:1}))]),_:1},8,["route"])):S("",!0)]),_:1})]),_:1})])])])}}}),ve=B(de,[["__scopeId","data-v-60d93a31"]]);export{ve as default};
1
+ import{k as A,_ as B,f as E,u as F,l as z,n as x}from"#entry";import{P as K}from"./BpWWYZTV.js";import{F as N,L as h,W as o,X as p,a1 as r,ab as M,C as U,w as R,j as G,$ as u,a9 as k,af as y,G as s,aA as w,_ as S,aK as X,aE as Z,ay as q,Z as m,a4 as H,a5 as $,ah as J,a0 as C,a2 as I,a3 as _,ac as V,ai as P}from"./CJ9AjueP.js";import"./BmhnSWN5.js";import"./PZl7tHUC.js";import"./CD9Hkzj8.js";const O={class:"tab-wrapper"},Q=N({__name:"ProjectTabWrapper",props:{projectId:{}},setup(W){return A(W.projectId),(l,j)=>(o(),h("div",O,[p(K,{"project-id":l.projectId,"can-unlock":""},{default:r(()=>[M(l.$slots,"default",{},void 0,!0)]),_:3},8,["project-id"])]))}}),Y=B(Q,[["__scopeId","data-v-cbe63052"]]),ee={class:"data-settings-panel"},te={class:"panel-layout"},ae={class:"vertical-tabs"},se={class:"tab-section"},oe={class:"tab-label"},re={class:"tab-section"},ne={class:"tab-label"},ce={class:"tab-section"},le={class:"tab-label"},ie={class:"content-area"},de=N({__name:"settings",setup(W){const l=E(),j=F(),n=U(null);R(j.currentRoute,async t=>{t.path.startsWith("/settings/")&&(z.info({from:n.value?.path,to:t.path},"settings route changed"),n.value=t),t?.name==="settings"&&await f(i.value.beforeGlobalTabs[0])},{immediate:!0});const i=G(()=>{const b=j.getRoutes().filter(a=>a.path.startsWith("/settings/")&&a.path!=="/settings"&&a.meta?.tab),c=[],e=[];for(const a of b){const d=a.meta.tab;if(!d||!a.path.startsWith("/settings/"))continue;const T={name:a.name,icon:d.icon,label:d.label,order:d.order||50,isProjectTab:a.path.startsWith("/settings/projects/"),subpages:d.subpages??[]};T.isProjectTab?e.push(T):c.push(T)}c.sort((a,d)=>a.order-d.order),e.sort((a,d)=>a.order-d.order);const g=c.filter(a=>a.order<90),L=c.filter(a=>a.order>=90);return{beforeGlobalTabs:g,projectTabs:e,afterGlobalTabs:L}}),v=t=>n.value&&(t.name===n.value.name||t.subpages.includes(n.value.name)),D=G(()=>i.value.beforeGlobalTabs.find(v)||i.value.projectTabs.find(v)),f=async t=>{if(!t.isProjectTab){await x({name:t.name});return}await x({name:t.name,params:{projectId:l.focusedProjectId}})};return R(()=>l.focusedProjectId,async(t,b)=>{const c=j.currentRoute.value;!c||t===b&&c.path.startsWith("/settings/projects/")||!c.path.startsWith("/settings/")||(t&&i.value.projectTabs.length>0?await f(D.value??i.value.projectTabs[0]):!t&&c.path.startsWith("/settings/projects/")&&await f(i.value.beforeGlobalTabs[0]))}),(t,b)=>{const c=J("RouterView");return o(),h("div",ee,[u("div",te,[u("div",ae,[u("div",se,[(o(!0),h(k,null,y(s(i).beforeGlobalTabs,e=>(o(),m(P,{key:e.name,variant:"text",class:V(["tab-item",{active:v(e)}]),onClick:g=>f(e)},{default:r(()=>[p(C,{class:"tab-icon"},{default:r(()=>[I(_(e.icon),1)]),_:2},1024),u("span",oe,_(e.label),1)]),_:2},1032,["class","onClick"]))),128))]),p(w,{class:"section-divider"}),u("div",re,[p(X,{modelValue:s(l).focusedProjectId,"onUpdate:modelValue":b[0]||(b[0]=e=>s(l).focusedProjectId=e),items:s(l).projects,label:"Project","item-title":"meta.title","item-value":"id",variant:"outlined",density:"compact",class:"project-selector","prepend-inner-icon":"mdi-folder-outline",clearable:"","hide-details":""},null,8,["modelValue","items"]),s(l).focusedProjectId?(o(!0),h(k,{key:0},y(s(i).projectTabs,e=>(o(),m(P,{key:e.name,variant:"text",class:V(["tab-item",{active:v(e)}]),onClick:g=>f(e)},{default:r(()=>[p(C,{class:"tab-icon"},{default:r(()=>[I(_(e.icon),1)]),_:2},1024),u("span",ne,_(e.label),1)]),_:2},1032,["class","onClick"]))),128)):S("",!0)]),p(w,{class:"section-divider"}),u("div",ce,[(o(!0),h(k,null,y(s(i).afterGlobalTabs,e=>(o(),m(P,{key:e.name,variant:"text",class:V(["tab-item",{active:v(e)}]),onClick:g=>f(e)},{default:r(()=>[p(C,{class:"tab-icon"},{default:r(()=>[I(_(e.icon),1)]),_:2},1024),u("span",le,_(e.label),1)]),_:2},1032,["class","onClick"]))),128))])]),u("div",ie,[p(Z,{class:"content-card",variant:"flat"},{default:r(()=>[p(q,{class:"content-card-text"},{default:r(()=>[s(n)?(o(),m(c,{key:0,route:s(n)},{default:r(({Component:e})=>[s(n).params.projectId?(o(),m(H,{key:0},{default:r(()=>[(o(),m(s(Y),{"project-id":s(n).params.projectId,key:s(n).params.projectId},{default:r(()=>[(o(),m($(e),{params:s(n).params},null,8,["params"]))]),_:2},1032,["project-id"]))]),_:2},1024)):(o(),m($(e),{key:1}))]),_:1},8,["route"])):S("",!0)]),_:1})]),_:1})])])])}}}),ve=B(de,[["__scopeId","data-v-60d93a31"]]);export{ve as default};