@gkd-kit/inspect 0.0.1741151084229 → 0.0.1741169152740

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 (42) hide show
  1. package/dist/assets/{ActionCard.vue_vue_type_script_setup_true_lang-wOjWHRWV.js → ActionCard.vue_vue_type_script_setup_true_lang-Cho9_1nr.js} +2 -2
  2. package/dist/assets/{ActionCard.vue_vue_type_script_setup_true_lang-wOjWHRWV.js.map → ActionCard.vue_vue_type_script_setup_true_lang-Cho9_1nr.js.map} +1 -1
  3. package/dist/assets/{DevicePage-zq4SPzqm.js → DevicePage-D_5Xh7j8.js} +2 -2
  4. package/dist/assets/{DevicePage-zq4SPzqm.js.map → DevicePage-D_5Xh7j8.js.map} +1 -1
  5. package/dist/assets/{HomePage-PJDIGxYT.js → HomePage-B4Fa0toa.js} +2 -2
  6. package/dist/assets/{HomePage-PJDIGxYT.js.map → HomePage-B4Fa0toa.js.map} +1 -1
  7. package/dist/assets/{ImportPage-BKzyAHm3.js → ImportPage-DQ3Q-Lvm.js} +2 -2
  8. package/dist/assets/{ImportPage-BKzyAHm3.js.map → ImportPage-DQ3Q-Lvm.js.map} +1 -1
  9. package/dist/assets/{Input-BlhW-0iT.js → Input-E7EHIMVH.js} +2 -2
  10. package/dist/assets/{Input-BlhW-0iT.js.map → Input-E7EHIMVH.js.map} +1 -1
  11. package/dist/assets/{SelectorPage-BSf-D1ZC.js → SelectorPage-DE3_5ql8.js} +2 -2
  12. package/dist/assets/{SelectorPage-BSf-D1ZC.js.map → SelectorPage-DE3_5ql8.js.map} +1 -1
  13. package/dist/assets/{SnapshotPage-DLiCCFD7.js → SnapshotPage-BaHDcwT7.js} +3 -3
  14. package/dist/assets/{SnapshotPage-DLiCCFD7.js.map → SnapshotPage-BaHDcwT7.js.map} +1 -1
  15. package/dist/assets/{SvgPage-DNwsi5IQ.js → SvgPage-9IYPSp4L.js} +2 -2
  16. package/dist/assets/{SvgPage-DNwsi5IQ.js.map → SvgPage-9IYPSp4L.js.map} +1 -1
  17. package/dist/assets/{_404Page-DKl5QJWl.js → _404Page-DxN-b8JR.js} +2 -2
  18. package/dist/assets/{_404Page-DKl5QJWl.js.map → _404Page-DxN-b8JR.js.map} +1 -1
  19. package/dist/assets/chunk-DEEGUgwa.js +3 -0
  20. package/dist/assets/{chunk-DW1WSbS8.js.map → chunk-DEEGUgwa.js.map} +1 -1
  21. package/dist/assets/{dayjs.min-D3epi8wv.js → dayjs.min-BF4lfA8v.js} +2 -2
  22. package/dist/assets/{dayjs.min-D3epi8wv.js.map → dayjs.min-BF4lfA8v.js.map} +1 -1
  23. package/dist/assets/{error-D7_zW9Z4.js → error-CrT8ojhU.js} +2 -2
  24. package/dist/assets/{error-D7_zW9Z4.js.map → error-CrT8ojhU.js.map} +1 -1
  25. package/dist/assets/{import-C09l0eiF.js → import-Ybrs0J5e.js} +2 -2
  26. package/dist/assets/{import-C09l0eiF.js.map → import-Ybrs0J5e.js.map} +1 -1
  27. package/dist/assets/{index-DsAwsuTp.js → index-B6Srfmbb.js} +3 -3
  28. package/dist/assets/{index-DsAwsuTp.js.map → index-B6Srfmbb.js.map} +1 -1
  29. package/dist/assets/{index-BjU8ME5p.js → index-BXr_m6qo.js} +84 -84
  30. package/dist/assets/index-BXr_m6qo.js.map +1 -0
  31. package/dist/assets/{jszip.min-B7XBd99U.js → jszip.min-DxKp9EYt.js} +2 -2
  32. package/dist/assets/{jszip.min-B7XBd99U.js.map → jszip.min-DxKp9EYt.js.map} +1 -1
  33. package/dist/assets/{node-Df056veg.js → node-BAwjROHH.js} +2 -2
  34. package/dist/assets/{node-Df056veg.js.map → node-BAwjROHH.js.map} +1 -1
  35. package/dist/assets/{snapshot-C4gf22SX.js → snapshot-DFpAGZTt.js} +2 -2
  36. package/dist/assets/{snapshot-C4gf22SX.js.map → snapshot-DFpAGZTt.js.map} +1 -1
  37. package/dist/assets/{table-D0mjYJfd.js → table-BkaaxLZl.js} +2 -2
  38. package/dist/assets/{table-D0mjYJfd.js.map → table-BkaaxLZl.js.map} +1 -1
  39. package/dist/index.html +3 -3
  40. package/package.json +1 -1
  41. package/dist/assets/chunk-DW1WSbS8.js +0 -3
  42. package/dist/assets/index-BjU8ME5p.js.map +0 -1
@@ -1,2 +1,2 @@
1
- import{S as I,A as z,a as B,_ as F,d as f}from"./index-DsAwsuTp.js";import{h as L,bM as V,bN as q,aK as E,aL as M,A as D,aS as H,q as p,G as K,H as h,I as r,J as a,K as s,F as i,L as c,S as U,Q as G,M as d,U as J,O as t,aF as O,T as x,R as P}from"./index-BjU8ME5p.js";import{N as Q,i as W}from"./node-Df056veg.js";import{_ as $}from"./Input-BlhW-0iT.js";const j={flex:"","items-center":"","gap-16px":"","pt-12px":"","px-12px":""},X={flex:"","flex-col":"","items-center":"","p-8px":"",text:"40px/52px"},Y={key:0,"overflow-x-scroll":"","scrollbar-hidden":""},Z={key:1,"whitespace-pre-wrap":""},ee={key:0},te={"bg-red":"",relative:""},oe={key:0},ne={key:1,"pl-20px":""},se={absolute:"","left-0":"","right-0":"","top--12px":"",flex:"","flex-col":"","items-center":"","animate-bounce":"","pointer-events-none":""},re={key:1},ae={key:0,"p-4px":"","bg-red-300":"",gkd_code:""},de=L({__name:"SelectorPage",setup(ie){V(),q();const k=E(),y=M(),T=()=>{const e=String(k.query.gkd||"");if(!e)return e;try{return f.decode(e)}catch{return m(""),""}},m=e=>{y.replace({query:{gkd:e?f.encode(e):void 0}})},u=D(T()),b=H(u,500),l=p(()=>(u.value&&b.value).trim());K(l,()=>{m(l.value)});const _=p(()=>{if(l.value)try{return I.Companion.parseAst(l.value)}catch(e){return e}}),g=p(()=>{if(_.value instanceof z)return _.value}),n=p(()=>{const e=_.value,o=l.value;if(e instanceof B)return{headText:o.substring(0,e.index),errorText:o.substring(e.index,e.index+1),tailText:o.substring(e.index+1),message:e.outMessage}});return(e,o)=>{const v=h("SvgIcon"),N=Q,R=h("RouterLink"),w=G,S=W,A=$;return a(),r(P,null,[s("div",j,[i(S,{placement:"right"},{trigger:c(()=>[i(w,{text:""},{icon:c(()=>[i(R,{to:"/",color:"inherit"},{default:c(()=>[i(N,{size:"24"},{default:c(()=>[i(v,{name:"home"})]),_:1})]),_:1})]),_:1})]),default:c(()=>[o[1]||(o[1]=U(" 回到首页 "))]),_:1}),o[2]||(o[2]=s("div",{flex:"","gap-16px":""},[s("div",{"text-18px":""},"测试选择器"),s("div",null,"语法高亮/错误解析")],-1))]),s("div",X,[i(A,{value:t(u),"onUpdate:value":o[0]||(o[0]=C=>J(u)?u.value=C:null),type:"textarea",placeholder:"请输入选择器",class:"gkd_code py-4px",style:{"--n-font-size":"20px","--n-line-height-textarea":"28px"},autosize:{minRows:3,maxRows:8}},null,8,["value"]),o[3]||(o[3]=s("div",{"h-20px":""},null,-1)),s("div",{"max-w-full":"","mb-8px":"","p-4px":"",gkd_code:"","transition-colors":"",class:O(t(n)?"bg-red-200":"bg-light-600")},[t(g)?(a(),r("div",Y,[i(F,{source:t(l),node:t(g)},null,8,["source","node"])])):t(n)?(a(),r("span",Z,[t(n).headText?(a(),r("span",ee,x(t(n).headText),1)):d("",!0),s("span",te,[t(n).errorText?(a(),r("span",oe,x(t(n).errorText),1)):(a(),r("span",ne)),s("div",se,[i(v,{name:"arrow",class:"text-18px color-dark"})])]),t(n).tailText?(a(),r("span",re,x(t(n).tailText),1)):d("",!0)])):d("",!0)],2),t(n)?(a(),r("div",ae,x(t(n).message),1)):d("",!0)])],64)}}});export{de as default};
2
- //# sourceMappingURL=SelectorPage-BSf-D1ZC.js.map
1
+ import{S as I,A as z,a as B,_ as F,d as f}from"./index-B6Srfmbb.js";import{h as L,bM as V,bN as q,aK as E,aL as M,A as D,aS as H,q as p,G as K,H as h,I as r,J as a,K as s,F as i,L as c,S as U,Q as G,M as d,U as J,O as t,aF as O,T as x,R as P}from"./index-BXr_m6qo.js";import{N as Q,i as W}from"./node-BAwjROHH.js";import{_ as $}from"./Input-E7EHIMVH.js";const j={flex:"","items-center":"","gap-16px":"","pt-12px":"","px-12px":""},X={flex:"","flex-col":"","items-center":"","p-8px":"",text:"40px/52px"},Y={key:0,"overflow-x-scroll":"","scrollbar-hidden":""},Z={key:1,"whitespace-pre-wrap":""},ee={key:0},te={"bg-red":"",relative:""},oe={key:0},ne={key:1,"pl-20px":""},se={absolute:"","left-0":"","right-0":"","top--12px":"",flex:"","flex-col":"","items-center":"","animate-bounce":"","pointer-events-none":""},re={key:1},ae={key:0,"p-4px":"","bg-red-300":"",gkd_code:""},de=L({__name:"SelectorPage",setup(ie){V(),q();const k=E(),y=M(),T=()=>{const e=String(k.query.gkd||"");if(!e)return e;try{return f.decode(e)}catch{return m(""),""}},m=e=>{y.replace({query:{gkd:e?f.encode(e):void 0}})},u=D(T()),b=H(u,500),l=p(()=>(u.value&&b.value).trim());K(l,()=>{m(l.value)});const _=p(()=>{if(l.value)try{return I.Companion.parseAst(l.value)}catch(e){return e}}),g=p(()=>{if(_.value instanceof z)return _.value}),n=p(()=>{const e=_.value,o=l.value;if(e instanceof B)return{headText:o.substring(0,e.index),errorText:o.substring(e.index,e.index+1),tailText:o.substring(e.index+1),message:e.outMessage}});return(e,o)=>{const v=h("SvgIcon"),N=Q,R=h("RouterLink"),w=G,S=W,A=$;return a(),r(P,null,[s("div",j,[i(S,{placement:"right"},{trigger:c(()=>[i(w,{text:""},{icon:c(()=>[i(R,{to:"/",color:"inherit"},{default:c(()=>[i(N,{size:"24"},{default:c(()=>[i(v,{name:"home"})]),_:1})]),_:1})]),_:1})]),default:c(()=>[o[1]||(o[1]=U(" 回到首页 "))]),_:1}),o[2]||(o[2]=s("div",{flex:"","gap-16px":""},[s("div",{"text-18px":""},"测试选择器"),s("div",null,"语法高亮/错误解析")],-1))]),s("div",X,[i(A,{value:t(u),"onUpdate:value":o[0]||(o[0]=C=>J(u)?u.value=C:null),type:"textarea",placeholder:"请输入选择器",class:"gkd_code py-4px",style:{"--n-font-size":"20px","--n-line-height-textarea":"28px"},autosize:{minRows:3,maxRows:8}},null,8,["value"]),o[3]||(o[3]=s("div",{"h-20px":""},null,-1)),s("div",{"max-w-full":"","mb-8px":"","p-4px":"",gkd_code:"","transition-colors":"",class:O(t(n)?"bg-red-200":"bg-light-600")},[t(g)?(a(),r("div",Y,[i(F,{source:t(l),node:t(g)},null,8,["source","node"])])):t(n)?(a(),r("span",Z,[t(n).headText?(a(),r("span",ee,x(t(n).headText),1)):d("",!0),s("span",te,[t(n).errorText?(a(),r("span",oe,x(t(n).errorText),1)):(a(),r("span",ne)),s("div",se,[i(v,{name:"arrow",class:"text-18px color-dark"})])]),t(n).tailText?(a(),r("span",re,x(t(n).tailText),1)):d("",!0)])):d("",!0)],2),t(n)?(a(),r("div",ae,x(t(n).message),1)):d("",!0)])],64)}}});export{de as default};
2
+ //# sourceMappingURL=SelectorPage-DE3_5ql8.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"SelectorPage-BSf-D1ZC.js","sources":["../../src/views/SelectorPage.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport SelectorText from '@/components/SelectorText.vue';\nimport { useAutoHeight, useAutoWidth } from '@/utils/others';\nimport {\n AstNode,\n Selector,\n GkdException,\n SyntaxException,\n} from '@gkd-kit/selector';\nimport * as base64url from 'universal-base64url';\n\nuseAutoHeight();\nuseAutoWidth();\n\nconst route = useRoute();\nconst router = useRouter();\n\nconst getTextFromRoute = () => {\n const t = String(route.query.gkd || '');\n if (!t) return t;\n try {\n return base64url.decode(t);\n } catch (e) {\n setTextToRoute('');\n return '';\n }\n};\nconst setTextToRoute = (t: string) => {\n router.replace({ query: { gkd: t ? base64url.encode(t) : undefined } });\n};\n\nconst inputText = shallowRef(getTextFromRoute());\nconst lazyText = useDebounce(inputText, 500);\nconst text = computed(() => {\n return (inputText.value && lazyText.value).trim();\n});\nwatch(text, () => {\n setTextToRoute(text.value);\n});\nconst result = computed(() => {\n if (!text.value) return;\n try {\n return Selector.Companion.parseAst(text.value);\n } catch (e) {\n return e as GkdException;\n }\n});\n\nconst ast = computed(() => {\n if (result.value instanceof AstNode) {\n return result.value;\n }\n return undefined;\n});\n\nconst error = computed(() => {\n const e = result.value;\n const t = text.value;\n if (e instanceof SyntaxException) {\n return {\n headText: t.substring(0, e.index),\n errorText: t.substring(e.index, e.index + 1),\n tailText: t.substring(e.index + 1),\n message: e.outMessage,\n };\n }\n return undefined;\n});\n</script>\n<template>\n <div flex items-center gap-16px pt-12px px-12px>\n <NTooltip placement=\"right\">\n <template #trigger>\n <NButton text>\n <template #icon>\n <RouterLink to=\"/\" color=\"inherit\">\n <NIcon size=\"24\">\n <SvgIcon name=\"home\" />\n </NIcon>\n </RouterLink>\n </template>\n </NButton>\n </template>\n 回到首页\n </NTooltip>\n <div flex gap-16px>\n <div text-18px>测试选择器</div>\n <div>语法高亮/错误解析</div>\n </div>\n </div>\n <div flex flex-col items-center p-8px text=\"40px/52px\">\n <NInput\n v-model:value=\"inputText\"\n type=\"textarea\"\n placeholder=\"请输入选择器\"\n class=\"gkd_code py-4px\"\n style=\"--n-font-size: 20px; --n-line-height-textarea: 28px\"\n :autosize=\"{\n minRows: 3,\n maxRows: 8,\n }\"\n />\n <div h-20px></div>\n <div\n max-w-full\n mb-8px\n p-4px\n gkd_code\n transition-colors\n :class=\"error ? `bg-red-200` : `bg-light-600`\"\n >\n <div v-if=\"ast\" overflow-x-scroll scrollbar-hidden>\n <SelectorText :source=\"text\" :node=\"ast\" />\n </div>\n <span v-else-if=\"error\" whitespace-pre-wrap>\n <span v-if=\"error.headText\">{{ error.headText }}</span>\n <span bg-red relative>\n <span v-if=\"error.errorText\">{{ error.errorText }}</span>\n <span v-else pl-20px></span>\n <div\n absolute\n left-0\n right-0\n top--12px\n flex\n flex-col\n items-center\n animate-bounce\n pointer-events-none\n >\n <SvgIcon name=\"arrow\" class=\"text-18px color-dark\" />\n </div>\n </span>\n <span v-if=\"error.tailText\">{{ error.tailText }}</span>\n </span>\n </div>\n <div v-if=\"error\" p-4px bg-red-300 gkd_code>\n {{ error.message }}\n </div>\n </div>\n</template>\n"],"names":["useAutoHeight","useAutoWidth","route","useRoute","router","useRouter","getTextFromRoute","t","base64url.decode","setTextToRoute","base64url.encode","inputText","shallowRef","lazyText","useDebounce","text","computed","watch","result","Selector","ast","AstNode","error","SyntaxException"],"mappings":"44BAWcA,EAAA,EACDC,EAAA,EAEb,MAAMC,EAAQC,EAAS,EACjBC,EAASC,EAAU,EAEnBC,EAAmB,IAAM,CAC7B,MAAMC,EAAI,OAAOL,EAAM,MAAM,KAAO,EAAE,EAClC,GAAA,CAACK,EAAU,OAAAA,EACX,GAAA,CACK,OAAAC,EAAAA,OAAiBD,CAAC,OACf,CACV,OAAAE,EAAe,EAAE,EACV,EAAA,CAEX,EACMA,EAAkBF,GAAc,CACpCH,EAAO,QAAQ,CAAE,MAAO,CAAE,IAAKG,EAAIG,EAAAA,OAAiBH,CAAC,EAAI,MAAU,EAAG,CACxE,EAEMI,EAAYC,EAAWN,GAAkB,EACzCO,EAAWC,EAAYH,EAAW,GAAG,EACrCI,EAAOC,EAAS,KACZL,EAAU,OAASE,EAAS,OAAO,KAAK,CACjD,EACDI,EAAMF,EAAM,IAAM,CAChBN,EAAeM,EAAK,KAAK,CAAA,CAC1B,EACK,MAAAG,EAASF,EAAS,IAAM,CACxB,GAACD,EAAK,MACN,GAAA,CACF,OAAOI,EAAS,UAAU,SAASJ,EAAK,KAAK,QACtC,EAAG,CACH,OAAA,CAAA,CACT,CACD,EAEKK,EAAMJ,EAAS,IAAM,CACrB,GAAAE,EAAO,iBAAiBG,EAC1B,OAAOH,EAAO,KAET,CACR,EAEKI,EAAQN,EAAS,IAAM,CAC3B,MAAM,EAAIE,EAAO,MACXX,EAAIQ,EAAK,MACf,GAAI,aAAaQ,EACR,MAAA,CACL,SAAUhB,EAAE,UAAU,EAAG,EAAE,KAAK,EAChC,UAAWA,EAAE,UAAU,EAAE,MAAO,EAAE,MAAQ,CAAC,EAC3C,SAAUA,EAAE,UAAU,EAAE,MAAQ,CAAC,EACjC,QAAS,EAAE,UACb,CAEK,CACR"}
1
+ {"version":3,"file":"SelectorPage-DE3_5ql8.js","sources":["../../src/views/SelectorPage.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport SelectorText from '@/components/SelectorText.vue';\nimport { useAutoHeight, useAutoWidth } from '@/utils/others';\nimport {\n AstNode,\n Selector,\n GkdException,\n SyntaxException,\n} from '@gkd-kit/selector';\nimport * as base64url from 'universal-base64url';\n\nuseAutoHeight();\nuseAutoWidth();\n\nconst route = useRoute();\nconst router = useRouter();\n\nconst getTextFromRoute = () => {\n const t = String(route.query.gkd || '');\n if (!t) return t;\n try {\n return base64url.decode(t);\n } catch (e) {\n setTextToRoute('');\n return '';\n }\n};\nconst setTextToRoute = (t: string) => {\n router.replace({ query: { gkd: t ? base64url.encode(t) : undefined } });\n};\n\nconst inputText = shallowRef(getTextFromRoute());\nconst lazyText = useDebounce(inputText, 500);\nconst text = computed(() => {\n return (inputText.value && lazyText.value).trim();\n});\nwatch(text, () => {\n setTextToRoute(text.value);\n});\nconst result = computed(() => {\n if (!text.value) return;\n try {\n return Selector.Companion.parseAst(text.value);\n } catch (e) {\n return e as GkdException;\n }\n});\n\nconst ast = computed(() => {\n if (result.value instanceof AstNode) {\n return result.value;\n }\n return undefined;\n});\n\nconst error = computed(() => {\n const e = result.value;\n const t = text.value;\n if (e instanceof SyntaxException) {\n return {\n headText: t.substring(0, e.index),\n errorText: t.substring(e.index, e.index + 1),\n tailText: t.substring(e.index + 1),\n message: e.outMessage,\n };\n }\n return undefined;\n});\n</script>\n<template>\n <div flex items-center gap-16px pt-12px px-12px>\n <NTooltip placement=\"right\">\n <template #trigger>\n <NButton text>\n <template #icon>\n <RouterLink to=\"/\" color=\"inherit\">\n <NIcon size=\"24\">\n <SvgIcon name=\"home\" />\n </NIcon>\n </RouterLink>\n </template>\n </NButton>\n </template>\n 回到首页\n </NTooltip>\n <div flex gap-16px>\n <div text-18px>测试选择器</div>\n <div>语法高亮/错误解析</div>\n </div>\n </div>\n <div flex flex-col items-center p-8px text=\"40px/52px\">\n <NInput\n v-model:value=\"inputText\"\n type=\"textarea\"\n placeholder=\"请输入选择器\"\n class=\"gkd_code py-4px\"\n style=\"--n-font-size: 20px; --n-line-height-textarea: 28px\"\n :autosize=\"{\n minRows: 3,\n maxRows: 8,\n }\"\n />\n <div h-20px></div>\n <div\n max-w-full\n mb-8px\n p-4px\n gkd_code\n transition-colors\n :class=\"error ? `bg-red-200` : `bg-light-600`\"\n >\n <div v-if=\"ast\" overflow-x-scroll scrollbar-hidden>\n <SelectorText :source=\"text\" :node=\"ast\" />\n </div>\n <span v-else-if=\"error\" whitespace-pre-wrap>\n <span v-if=\"error.headText\">{{ error.headText }}</span>\n <span bg-red relative>\n <span v-if=\"error.errorText\">{{ error.errorText }}</span>\n <span v-else pl-20px></span>\n <div\n absolute\n left-0\n right-0\n top--12px\n flex\n flex-col\n items-center\n animate-bounce\n pointer-events-none\n >\n <SvgIcon name=\"arrow\" class=\"text-18px color-dark\" />\n </div>\n </span>\n <span v-if=\"error.tailText\">{{ error.tailText }}</span>\n </span>\n </div>\n <div v-if=\"error\" p-4px bg-red-300 gkd_code>\n {{ error.message }}\n </div>\n </div>\n</template>\n"],"names":["useAutoHeight","useAutoWidth","route","useRoute","router","useRouter","getTextFromRoute","t","base64url.decode","setTextToRoute","base64url.encode","inputText","shallowRef","lazyText","useDebounce","text","computed","watch","result","Selector","ast","AstNode","error","SyntaxException"],"mappings":"44BAWcA,EAAA,EACDC,EAAA,EAEb,MAAMC,EAAQC,EAAS,EACjBC,EAASC,EAAU,EAEnBC,EAAmB,IAAM,CAC7B,MAAMC,EAAI,OAAOL,EAAM,MAAM,KAAO,EAAE,EAClC,GAAA,CAACK,EAAU,OAAAA,EACX,GAAA,CACK,OAAAC,EAAAA,OAAiBD,CAAC,OACf,CACV,OAAAE,EAAe,EAAE,EACV,EAAA,CAEX,EACMA,EAAkBF,GAAc,CACpCH,EAAO,QAAQ,CAAE,MAAO,CAAE,IAAKG,EAAIG,EAAAA,OAAiBH,CAAC,EAAI,MAAU,EAAG,CACxE,EAEMI,EAAYC,EAAWN,GAAkB,EACzCO,EAAWC,EAAYH,EAAW,GAAG,EACrCI,EAAOC,EAAS,KACZL,EAAU,OAASE,EAAS,OAAO,KAAK,CACjD,EACDI,EAAMF,EAAM,IAAM,CAChBN,EAAeM,EAAK,KAAK,CAAA,CAC1B,EACK,MAAAG,EAASF,EAAS,IAAM,CACxB,GAACD,EAAK,MACN,GAAA,CACF,OAAOI,EAAS,UAAU,SAASJ,EAAK,KAAK,QACtC,EAAG,CACH,OAAA,CAAA,CACT,CACD,EAEKK,EAAMJ,EAAS,IAAM,CACrB,GAAAE,EAAO,iBAAiBG,EAC1B,OAAOH,EAAO,KAET,CACR,EAEKI,EAAQN,EAAS,IAAM,CAC3B,MAAM,EAAIE,EAAO,MACXX,EAAIQ,EAAK,MACf,GAAI,aAAaQ,EACR,MAAA,CACL,SAAUhB,EAAE,UAAU,EAAG,EAAE,KAAK,EAChC,UAAWA,EAAE,UAAU,EAAE,MAAO,EAAE,MAAQ,CAAC,EAC3C,SAAUA,EAAE,UAAU,EAAE,MAAQ,CAAC,EACjC,QAAS,EAAE,UACb,CAEK,CACR"}
@@ -1,4 +1,4 @@
1
- var e3=Object.defineProperty;var Bx=r=>{throw TypeError(r)};var t3=(r,e,t)=>e in r?e3(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t;var Nt=(r,e,t)=>t3(r,typeof e!="symbol"?e+"":e,t),Qh=(r,e,t)=>e.has(r)||Bx("Cannot "+t);var Qr=(r,e,t)=>(Qh(r,e,"read from private field"),t?t.call(r):e.get(r)),ef=(r,e,t)=>e.has(r)?Bx("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(r):e.set(r,t),kc=(r,e,t,n)=>(Qh(r,e,"write to private field"),n?n.call(r,t):e.set(r,t),t),tf=(r,e,t)=>(Qh(r,e,"access private method"),t);import{t as n3,_ as ku,U as zx,p as Mu,w as r3,d as jx,F as nf,G as i3}from"./index-DsAwsuTp.js";import{S as rf,s as fC,a as a3,c as s3,b as o3,d as l3,e as c3,g as Ei,l as u3,f as d3,h as h3,i as ob,N as lb,j as Pl,k as po,m as $x,n as qx}from"./node-Df056veg.js";import{h as pt,k as ze,a as at,g as Si,f as ot,e as Qe,b as Ft,u as Jl,Z as f3,$ as Ql,a0 as cb,a1 as g3,d as ub,a2 as Yy,o as Xt,q as $e,p as dl,m as Os,x as db,a3 as hb,y as In,a4 as gC,a5 as vC,a6 as pC,a7 as v3,t as yt,a8 as Gx,a9 as p3,aa as m3,ab as er,ac as Cs,ad as y3,ae as mC,af as Gi,ag as b3,ah as x3,ai as w3,c as E3,aj as S3,ak as _3,al as k3,s as af,V as M3,am as sf,N as T3,l as O3,an as C3,B as xd,ao as N3,v as yC,i as A3,ap as of,aq as Wx,ar as Vx,w as Zo,D as ii,G as Mi,as as co,at as ec,au as bC,av as Mc,aw as fb,ax as uo,A as Tt,ay as Rl,I as jt,J as We,az as So,H as bs,K as Le,F as Ee,Q as Io,L as xe,aA as rn,M as Nn,O as se,R as oi,aB as ds,aC as Ri,aD as Ky,aE as P3,aF as Ll,aG as R3,C as gb,aH as xC,aI as L3,aJ as I3,aK as wC,aL as EC,z as D3,aM as SC,aN as F3,aO as Ns,aP as _i,T as vt,S as zt,aQ as B3,aR as z3,aS as j3,U as mo,aT as $3,aU as q3,P as G3,aV as lf,aW as xa,aX as Ux,W as W3,aY as Hx,aZ as cf,a_ as Yx}from"./index-BjU8ME5p.js";import{_ as V3}from"./_plugin-vue_export-helper-DlAUqK2U.js";import{e as U3,f as H3,g as Y3,_ as K3}from"./ActionCard.vue_vue_type_script_setup_true_lang-wOjWHRWV.js";import{a as X3,b as Z3,g as J3}from"./snapshot-C4gf22SX.js";import{h as ho,C as Q3,e as eI,V as tI,c as Kx,f as Xx,b as nI,N as Zx,u as rI,d as iI,a as _C,g as kC,i as aI,j as sI,_ as oI}from"./dayjs.min-D3epi8wv.js";import{l as MC,e as Jx,a as lI}from"./error-D7_zW9Z4.js";import{_ as TC}from"./Input-BlhW-0iT.js";import"./chunk-DW1WSbS8.js";function OC(r){return typeof r=="string"?`s-${r}`:`n-${r}`}function cI(){}function uI(r,e,t,n){for(var i=r.length,a=t+-1;++a<i;)if(e(r[a],a,r))return a;return-1}function dI(r){return r!==r}function hI(r,e,t){for(var n=t-1,i=r.length;++n<i;)if(r[n]===e)return n;return-1}function fI(r,e,t){return e===e?hI(r,e,t):uI(r,dI,t)}function gI(r,e){var t=r==null?0:r.length;return!!t&&fI(r,e,0)>-1}var vI=1/0,pI=rf&&1/fC(new rf([,-0]))[1]==vI?function(r){return new rf(r)}:cI,mI=200;function yI(r,e,t){var n=-1,i=gI,a=r.length,s=!0,o=[],l=o;if(a>=mI){var c=e?null:pI(r);if(c)return fC(c);s=!1,i=s3,l=new a3}else l=e?[]:o;e:for(;++n<a;){var u=r[n],d=e?e(u):u;if(u=u!==0?u:0,s&&d===d){for(var h=l.length;h--;)if(l[h]===d)continue e;e&&l.push(d),o.push(u)}else i(l,d,t)||(l!==o&&l.push(d),o.push(u))}return o}function bI(r,e){return r&&r.length?yI(r,o3(e)):[]}const xI=pt({name:"ChevronLeft",render(){return ze("svg",{viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},ze("path",{d:"M10.3536 3.14645C10.5488 3.34171 10.5488 3.65829 10.3536 3.85355L6.20711 8L10.3536 12.1464C10.5488 12.3417 10.5488 12.6583 10.3536 12.8536C10.1583 13.0488 9.84171 13.0488 9.64645 12.8536L5.14645 8.35355C4.95118 8.15829 4.95118 7.84171 5.14645 7.64645L9.64645 3.14645C9.84171 2.95118 10.1583 2.95118 10.3536 3.14645Z",fill:"currentColor"}))}}),wI=pt({name:"Switcher",render(){return ze("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32"},ze("path",{d:"M12 8l10 8l-10 8z"}))}}),nn="0!important",CC="-1px!important";function Hs(r){return ot(`${r}-type`,[Qe("& +",[at("button",{},[ot(`${r}-type`,[Ft("border",{borderLeftWidth:nn}),Ft("state-border",{left:CC})])])])])}function Ys(r){return ot(`${r}-type`,[Qe("& +",[at("button",[ot(`${r}-type`,[Ft("border",{borderTopWidth:nn}),Ft("state-border",{top:CC})])])])])}const EI=at("button-group",`
1
+ var e3=Object.defineProperty;var Bx=r=>{throw TypeError(r)};var t3=(r,e,t)=>e in r?e3(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t;var Nt=(r,e,t)=>t3(r,typeof e!="symbol"?e+"":e,t),Qh=(r,e,t)=>e.has(r)||Bx("Cannot "+t);var Qr=(r,e,t)=>(Qh(r,e,"read from private field"),t?t.call(r):e.get(r)),ef=(r,e,t)=>e.has(r)?Bx("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(r):e.set(r,t),kc=(r,e,t,n)=>(Qh(r,e,"write to private field"),n?n.call(r,t):e.set(r,t),t),tf=(r,e,t)=>(Qh(r,e,"access private method"),t);import{t as n3,_ as ku,U as zx,p as Mu,w as r3,d as jx,F as nf,G as i3}from"./index-B6Srfmbb.js";import{S as rf,s as fC,a as a3,c as s3,b as o3,d as l3,e as c3,g as Ei,l as u3,f as d3,h as h3,i as ob,N as lb,j as Pl,k as po,m as $x,n as qx}from"./node-BAwjROHH.js";import{h as pt,k as ze,a as at,g as Si,f as ot,e as Qe,b as Ft,u as Jl,Z as f3,$ as Ql,a0 as cb,a1 as g3,d as ub,a2 as Yy,o as Xt,q as $e,p as dl,m as Os,x as db,a3 as hb,y as In,a4 as gC,a5 as vC,a6 as pC,a7 as v3,t as yt,a8 as Gx,a9 as p3,aa as m3,ab as er,ac as Cs,ad as y3,ae as mC,af as Gi,ag as b3,ah as x3,ai as w3,c as E3,aj as S3,ak as _3,al as k3,s as af,V as M3,am as sf,N as T3,l as O3,an as C3,B as xd,ao as N3,v as yC,i as A3,ap as of,aq as Wx,ar as Vx,w as Zo,D as ii,G as Mi,as as co,at as ec,au as bC,av as Mc,aw as fb,ax as uo,A as Tt,ay as Rl,I as jt,J as We,az as So,H as bs,K as Le,F as Ee,Q as Io,L as xe,aA as rn,M as Nn,O as se,R as oi,aB as ds,aC as Ri,aD as Ky,aE as P3,aF as Ll,aG as R3,C as gb,aH as xC,aI as L3,aJ as I3,aK as wC,aL as EC,z as D3,aM as SC,aN as F3,aO as Ns,aP as _i,T as vt,S as zt,aQ as B3,aR as z3,aS as j3,U as mo,aT as $3,aU as q3,P as G3,aV as lf,aW as xa,aX as Ux,W as W3,aY as Hx,aZ as cf,a_ as Yx}from"./index-BXr_m6qo.js";import{_ as V3}from"./_plugin-vue_export-helper-DlAUqK2U.js";import{e as U3,f as H3,g as Y3,_ as K3}from"./ActionCard.vue_vue_type_script_setup_true_lang-Cho9_1nr.js";import{a as X3,b as Z3,g as J3}from"./snapshot-DFpAGZTt.js";import{h as ho,C as Q3,e as eI,V as tI,c as Kx,f as Xx,b as nI,N as Zx,u as rI,d as iI,a as _C,g as kC,i as aI,j as sI,_ as oI}from"./dayjs.min-BF4lfA8v.js";import{l as MC,e as Jx,a as lI}from"./error-CrT8ojhU.js";import{_ as TC}from"./Input-E7EHIMVH.js";import"./chunk-DEEGUgwa.js";function OC(r){return typeof r=="string"?`s-${r}`:`n-${r}`}function cI(){}function uI(r,e,t,n){for(var i=r.length,a=t+-1;++a<i;)if(e(r[a],a,r))return a;return-1}function dI(r){return r!==r}function hI(r,e,t){for(var n=t-1,i=r.length;++n<i;)if(r[n]===e)return n;return-1}function fI(r,e,t){return e===e?hI(r,e,t):uI(r,dI,t)}function gI(r,e){var t=r==null?0:r.length;return!!t&&fI(r,e,0)>-1}var vI=1/0,pI=rf&&1/fC(new rf([,-0]))[1]==vI?function(r){return new rf(r)}:cI,mI=200;function yI(r,e,t){var n=-1,i=gI,a=r.length,s=!0,o=[],l=o;if(a>=mI){var c=e?null:pI(r);if(c)return fC(c);s=!1,i=s3,l=new a3}else l=e?[]:o;e:for(;++n<a;){var u=r[n],d=e?e(u):u;if(u=u!==0?u:0,s&&d===d){for(var h=l.length;h--;)if(l[h]===d)continue e;e&&l.push(d),o.push(u)}else i(l,d,t)||(l!==o&&l.push(d),o.push(u))}return o}function bI(r,e){return r&&r.length?yI(r,o3(e)):[]}const xI=pt({name:"ChevronLeft",render(){return ze("svg",{viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},ze("path",{d:"M10.3536 3.14645C10.5488 3.34171 10.5488 3.65829 10.3536 3.85355L6.20711 8L10.3536 12.1464C10.5488 12.3417 10.5488 12.6583 10.3536 12.8536C10.1583 13.0488 9.84171 13.0488 9.64645 12.8536L5.14645 8.35355C4.95118 8.15829 4.95118 7.84171 5.14645 7.64645L9.64645 3.14645C9.84171 2.95118 10.1583 2.95118 10.3536 3.14645Z",fill:"currentColor"}))}}),wI=pt({name:"Switcher",render(){return ze("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32"},ze("path",{d:"M12 8l10 8l-10 8z"}))}}),nn="0!important",CC="-1px!important";function Hs(r){return ot(`${r}-type`,[Qe("& +",[at("button",{},[ot(`${r}-type`,[Ft("border",{borderLeftWidth:nn}),Ft("state-border",{left:CC})])])])])}function Ys(r){return ot(`${r}-type`,[Qe("& +",[at("button",[ot(`${r}-type`,[Ft("border",{borderTopWidth:nn}),Ft("state-border",{top:CC})])])])])}const EI=at("button-group",`
2
2
  flex-wrap: nowrap;
3
3
  display: inline-flex;
4
4
  position: relative;
@@ -339,7 +339,7 @@ ${n}`)}function o(R,T,S){return(R>=0&&S?` ${l(R,T-1)}`:l(R,T)).padEnd(T)}functio
339
339
  * @license
340
340
  * Copyright 2019 Google LLC
341
341
  * SPDX-License-Identifier: Apache-2.0
342
- */const BR=Symbol("Comlink.proxy"),wH=Symbol("Comlink.endpoint"),zR=Symbol("Comlink.releaseProxy"),Ty=Symbol("Comlink.finalizer"),Ru=Symbol("Comlink.thrown"),jR=r=>typeof r=="object"&&r!==null||typeof r=="function",EH={canHandle:r=>jR(r)&&r[BR],serialize(r){const{port1:e,port2:t}=new MessageChannel;return qR(r,e),[t,[t]]},deserialize(r){return r.start(),WR(r)}},SH={canHandle:r=>jR(r)&&Ru in r,serialize({value:r}){let e;return r instanceof Error?e={isError:!0,value:{message:r.message,name:r.name,stack:r.stack}}:e={isError:!1,value:r},[e,[]]},deserialize(r){throw r.isError?Object.assign(new Error(r.value.message),r.value):r.value}},$R=new Map([["proxy",EH],["throw",SH]]);function _H(r,e){for(const t of r)if(e===t||t==="*"||t instanceof RegExp&&t.test(e))return!0;return!1}function qR(r,e=globalThis,t=["*"]){e.addEventListener("message",function n(i){if(!i||!i.data)return;if(!_H(t,i.origin)){console.warn(`Invalid origin '${i.origin}' for comlink proxy`);return}const{id:a,type:s,path:o}=Object.assign({path:[]},i.data),l=(i.data.argumentList||[]).map(ss);let c;try{const u=o.slice(0,-1).reduce((h,f)=>h[f],r),d=o.reduce((h,f)=>h[f],r);switch(s){case"GET":c=d;break;case"SET":u[o.slice(-1)[0]]=ss(i.data.value),c=!0;break;case"APPLY":c=d.apply(u,l);break;case"CONSTRUCT":{const h=new d(...l);c=NH(h)}break;case"ENDPOINT":{const{port1:h,port2:f}=new MessageChannel;qR(r,f),c=CH(h,[h])}break;case"RELEASE":c=void 0;break;default:return}}catch(u){c={value:u,[Ru]:0}}Promise.resolve(c).catch(u=>({value:u,[Ru]:0})).then(u=>{const[d,h]=vd(u);e.postMessage(Object.assign(Object.assign({},d),{id:a}),h),s==="RELEASE"&&(e.removeEventListener("message",n),GR(e),Ty in r&&typeof r[Ty]=="function"&&r[Ty]())}).catch(u=>{const[d,h]=vd({value:new TypeError("Unserializable return value"),[Ru]:0});e.postMessage(Object.assign(Object.assign({},d),{id:a}),h)})}),e.start&&e.start()}function kH(r){return r.constructor.name==="MessagePort"}function GR(r){kH(r)&&r.close()}function WR(r,e){const t=new Map;return r.addEventListener("message",function(i){const{data:a}=i;if(!a||!a.id)return;const s=t.get(a.id);if(s)try{s(a)}finally{t.delete(a.id)}}),H1(r,t,[],e)}function vu(r){if(r)throw new Error("Proxy has been released and is not useable")}function VR(r){return oo(r,new Map,{type:"RELEASE"}).then(()=>{GR(r)})}const fd=new WeakMap,gd="FinalizationRegistry"in globalThis&&new FinalizationRegistry(r=>{const e=(fd.get(r)||0)-1;fd.set(r,e),e===0&&VR(r)});function MH(r,e){const t=(fd.get(e)||0)+1;fd.set(e,t),gd&&gd.register(r,e,r)}function TH(r){gd&&gd.unregister(r)}function H1(r,e,t=[],n=function(){}){let i=!1;const a=new Proxy(n,{get(s,o){if(vu(i),o===zR)return()=>{TH(a),VR(r),e.clear(),i=!0};if(o==="then"){if(t.length===0)return{then:()=>a};const l=oo(r,e,{type:"GET",path:t.map(c=>c.toString())}).then(ss);return l.then.bind(l)}return H1(r,e,[...t,o])},set(s,o,l){vu(i);const[c,u]=vd(l);return oo(r,e,{type:"SET",path:[...t,o].map(d=>d.toString()),value:c},u).then(ss)},apply(s,o,l){vu(i);const c=t[t.length-1];if(c===wH)return oo(r,e,{type:"ENDPOINT"}).then(ss);if(c==="bind")return H1(r,e,t.slice(0,-1));const[u,d]=WT(l);return oo(r,e,{type:"APPLY",path:t.map(h=>h.toString()),argumentList:u},d).then(ss)},construct(s,o){vu(i);const[l,c]=WT(o);return oo(r,e,{type:"CONSTRUCT",path:t.map(u=>u.toString()),argumentList:l},c).then(ss)}});return MH(a,r),a}function OH(r){return Array.prototype.concat.apply([],r)}function WT(r){const e=r.map(vd);return[e.map(t=>t[0]),OH(e.map(t=>t[1]))]}const UR=new WeakMap;function CH(r,e){return UR.set(r,e),r}function NH(r){return Object.assign(r,{[BR]:!0})}function vd(r){for(const[e,t]of $R)if(t.canHandle(r)){const[n,i]=t.serialize(r);return[{type:"HANDLER",name:e,value:n},i]}return[{type:"RAW",value:r},UR.get(r)||[]]}function ss(r){switch(r.type){case"HANDLER":return $R.get(r.name).deserialize(r.value);case"RAW":return r.value}}function oo(r,e,t,n){return new Promise(i=>{const a=AH();e.set(a,i),r.start&&r.start(),r.postMessage(Object.assign({id:a},t),n)})}function AH(){return new Array(4).fill(0).map(()=>Math.floor(Math.random()*Number.MAX_SAFE_INTEGER).toString(16)).join("-")}class PH extends Wd{constructor(e,t,n){super(),this.graph=e,this.layout=t,this.options=n,this.spawnWorker()}spawnWorker(){this.proxy=WR(new Worker(new URL("https://registry.npmmirror.com/@gkd-kit/inspect/0.0.1741151084229/files/dist/assets/worker-BZwDflls.js",import.meta.url),{type:"module"})),this.running&&(this.running=!1,this.execute())}execute(){var e;return rt(this,void 0,void 0,function*(){if(this.running)return this;this.running=!0;const t=this.layout.options,{onTick:n}=t,i=un(t,["onTick"]),a={};Object.keys(i).forEach(c=>{Ie(i[c])||(a[c]=i[c])});const s={layout:{id:this.layout.id,options:a,iterations:(e=this.options)===null||e===void 0?void 0:e.iterations},nodes:this.graph.getAllNodes(),edges:this.graph.getAllEdges()},o=new Float32Array([0]),[l]=yield this.proxy.calculateLayout(s,[o]);return l})}stop(){return this.running=!1,this.proxy.stopLayout(),this}kill(){this.proxy[zR]()}isRunning(){return this.running}}var RH=function(r,e,t,n){function i(a){return a instanceof t?a:new t(function(s){s(a)})}return new(t||(t=Promise))(function(a,s){function o(u){try{c(n.next(u))}catch(d){s(d)}}function l(u){try{c(n.throw(u))}catch(d){s(d)}}function c(u){u.done?a(u.value):i(u.value).then(o,l)}c((n=n.apply(r,e||[])).next())})};class xh extends Vd{constructor(){super(...arguments),this.id="fishbone"}getRoot(){const e=this.context.model.getRootsData();if(!(ki(e)||e.length>2))return e[0]}formatSize(e){const t=typeof e=="function"?e:()=>e;return n=>Ir(t(n))}doLayout(e,t){const{hGap:n,getRibSep:i,vGap:a,nodeSize:s,height:o}=t,{model:l}=this.context,c=this.formatSize(s);let u=c(e)[0]+i(e);const d=(b,w=0)=>{var E;return w+=n*((b.children||[]).length+1),(E=b.children)===null||E===void 0||E.forEach(_=>{var O;(O=l.getNodeLikeDatum(_).children)===null||O===void 0||O.forEach(N=>{const A=l.getNodeLikeDatum(N);w=d(A,w)})}),w},h=b=>{if(b.depth===1)return u;const w=l.getParentData(b.id,"tree");if(eo(b)){const E=l.getParentData(w.id,"tree"),_=p(b)-p(E);return h(w)+_*n/a}else{const E=(w.children||[]).indexOf(b.id),_=l.getNodeData((w.children||[]).slice(E));return f(w)-_.reduce((O,M)=>O+d(M),0)-c(w)[0]/2}},f=i1(b=>{if(Oy(b))return c(b)[0]/2;const w=l.getParentData(b.id,"tree");if(eo(b))return h(b)+d(b)+c(b)[0]/2;{const E=p(b)-p(w),_=n/a;return h(b)+E*_}},b=>b.id),g=b=>p(l.getParentData(b,"tree")),p=i1(b=>{if(Oy(b))return o/2;if(eo(b)){const w=l.getParentData(b.id,"tree"),E=w.children.indexOf(b.id);if(E===0)return g(w.id)+a;const _=l.getNodeLikeDatum(w.children[E-1]);if(ki(_.children))return p(_)+a;const O=l.getDescendantsData(_.id);return Math.max(...O.map(M=>eo(M)?g(M.id):p(M)))+a}else{if(ki(b.children))return g(b.id)+a;const w=l.getNodeLikeDatum(b.children.slice(-1)[0]);if(ki(w.children))return p(w)+a;const E=l.getDescendantsData(b.id).slice(-1)[0];return(eo(E)?g(E.id):p(E))+a}},b=>b.id);let v=0;const m={nodes:[],edges:[]},y=b=>{var w;(w=b.children)===null||w===void 0||w.forEach(N=>y(l.getNodeLikeDatum(N)));const E=p(b),_=f(b);if(m.nodes.push({id:b.id,x:_,y:E}),Oy(b))return;const O=l.getRelatedEdgesData(b.id,"in")[0],M=[h(b),eo(b)?E:g(b.id)];m.edges.push({id:te(O),controlPoints:[M],relatedNodeId:b.id}),v=Math.max(v,_+i(b)),b.depth===1&&(u=v)};return y(e),m}placeAlterative(e,t){const n=(t.children||[]).filter((o,l)=>l%2!==0);if(n.length===0)return e;const{model:i}=this.context,a=e.nodes.find(o=>o.id===t.id).y,s=o=>{const l=i.getAncestorsData(o,"tree");if(ki(l))return!1;const c=l.length===1?o:l[l.length-2].id;return n.includes(c)};e.nodes.forEach(o=>{s(o.id)&&(o.y=2*a-o.y)}),e.edges.forEach(o=>{s(o.relatedNodeId)&&(o.controlPoints=o.controlPoints.map(l=>[l[0],2*a-l[1]]))})}rightToLeft(e,t){return e.nodes.forEach(n=>n.x=t.width-n.x),e.edges.forEach(n=>{n.controlPoints=n.controlPoints.map(i=>[t.width-i[0],i[1]])}),e}execute(e,t){return RH(this,void 0,void 0,function*(){const n=Object.assign(Object.assign(Object.assign({},xh.defaultOptions),this.options),t),{direction:i,nodeSize:a}=n,s=this.getRoot();if(!s)return e;const o=this.formatSize(a);n.vGap||(n.vGap=Math.max(...(e.nodes||[]).map(h=>o(h)[1]))),n.hGap||(n.hGap=Math.max(...(e.nodes||[]).map(h=>o(h)[0])));let l=this.doLayout(s,n);this.placeAlterative(l,s),i==="RL"&&(l=this.rightToLeft(l,n));const{model:c}=this.context,u=[],d=[];return l.nodes.forEach(h=>{const{id:f,x:g,y:p}=h,v=c.getNodeLikeDatum(f);u.push(VT(v,{x:g,y:p}))}),l.edges.forEach(h=>{const{id:f,controlPoints:g}=h,p=c.getEdgeDatum(f);d.push(VT(p,{controlPoints:g}))}),{nodes:u,edges:d}})}}xh.defaultOptions={direction:"RL",getRibSep:()=>60};const VT=(r,e)=>Object.assign(Object.assign({},r),{style:Object.assign(Object.assign({},r.style||{}),e)}),Oy=r=>r.depth===0,eo=r=>(r.depth||(r.depth=0))%2===0;var LH=function(r,e,t,n){function i(a){return a instanceof t?a:new t(function(s){s(a)})}return new(t||(t=Promise))(function(a,s){function o(u){try{c(n.next(u))}catch(d){s(d)}}function l(u){try{c(n.throw(u))}catch(d){s(d)}}function c(u){u.done?a(u.value):i(u.value).then(o,l)}c((n=n.apply(r,e||[])).next())})};class wh extends Vd{constructor(){super(...arguments),this.id="snake"}formatSize(e,t){const n=typeof t=="function"?t:()=>t;return e.reduce((i,a)=>{const[s,o]=Ir(n(a))||[0,0];return[Math.max(i[0],s),Math.max(i[1],o)]},[0,0])}validate(e){const{nodes:t=[],edges:n=[]}=e,i={},a={},s={};t.forEach(h=>{i[h.id]=0,a[h.id]=0,s[h.id]=[]}),n.forEach(h=>{i[h.target]++,a[h.source]++,s[h.source].push(h.target)});const o=new Set,l=h=>{o.has(h)||(o.add(h),s[h].forEach(l))};if(l(t[0].id),o.size!==t.length)return!1;const c=t.filter(h=>i[h.id]===0),u=t.filter(h=>a[h.id]===0);return!(c.length!==1||u.length!==1||t.filter(h=>i[h.id]===1&&a[h.id]===1).length!==t.length-2)}execute(e,t){return LH(this,void 0,void 0,function*(){var n;if(!this.validate(e))return e;const{nodeSize:i,padding:a,sortBy:s,cols:o,colGap:l,rowGap:c,clockwise:u,width:d,height:h}=Object.assign({},wh.defaultOptions,this.options,t),[f,g,p,v]=Fi(a),m=this.formatSize(e.nodes||[],i),y=Math.ceil((e.nodes||[]).length/o);let b=l||(d-v-g-o*m[0])/(o-1),w=c||(h-f-p-y*m[1])/(y-1);return(w===1/0||w<0)&&(w=0),(b===1/0||b<0)&&(b=0),{nodes:((s?(n=e.nodes)===null||n===void 0?void 0:n.sort(s):IH(e))||[]).map((O,M)=>{const N=Math.floor(M/o),A=M%o,P=u?N%2===0?A:o-1-A:N%2===0?o-1-A:A,L=v+P*(m[0]+b)+m[0]/2,I=f+N*(m[1]+w)+m[1]/2;return{id:O.id,style:{x:L,y:I}}})}})}}wh.defaultOptions={padding:0,cols:5,clockwise:!0};function IH(r){const{nodes:e=[],edges:t=[]}=r,n={},i={};e.forEach(o=>{n[o.id]=0,i[o.id]=[]}),t.forEach(o=>{n[o.target]++,i[o.source].push(o.target)});const a=[],s=[];for(e.forEach(o=>{n[o.id]===0&&a.push(o.id)});a.length>0;){const o=a.shift(),l=e.find(c=>c.id===o);s.push(l),i[o].forEach(c=>{n[c]--,n[c]===0&&a.push(c)})}return s}const DH=["rgb(158, 1, 66)","rgb(213, 62, 79)","rgb(244, 109, 67)","rgb(253, 174, 97)","rgb(254, 224, 139)","rgb(255, 255, 191)","rgb(230, 245, 152)","rgb(171, 221, 164)","rgb(102, 194, 165)","rgb(50, 136, 189)","rgb(94, 79, 162)"],FH=["rgb(78, 121, 167)","rgb(242, 142, 44)","rgb(225, 87, 89)","rgb(118, 183, 178)","rgb(89, 161, 79)","rgb(237, 201, 73)","rgb(175, 122, 161)","rgb(255, 157, 167)","rgb(156, 117, 95)","rgb(186, 176, 171)"],BH=["rgb(255, 245, 235)","rgb(254, 230, 206)","rgb(253, 208, 162)","rgb(253, 174, 107)","rgb(253, 141, 60)","rgb(241, 105, 19)","rgb(217, 72, 1)","rgb(166, 54, 3)","rgb(127, 39, 4)"],zH=["rgb(247, 252, 245)","rgb(229, 245, 224)","rgb(199, 233, 192)","rgb(161, 217, 155)","rgb(116, 196, 118)","rgb(65, 171, 93)","rgb(35, 139, 69)","rgb(0, 109, 44)","rgb(0, 68, 27)"],jH=["rgb(247, 251, 255)","rgb(222, 235, 247)","rgb(198, 219, 239)","rgb(158, 202, 225)","rgb(107, 174, 214)","rgb(66, 146, 198)","rgb(33, 113, 181)","rgb(8, 81, 156)","rgb(8, 48, 107)"];class Zn extends Fb{}function Vo(r,e=!0,t){const n=document.createElement("div");return n.setAttribute("class",`g6-${r}`),Object.assign(n.style,{position:"absolute",display:"block"}),e&&Object.assign(n.style,{position:"unset",gridArea:"1 / 1 / 2 / 2",inset:"0px",height:"100%",width:"100%",overflow:"hidden",pointerEvents:"none"}),t&&Object.assign(n.style,t),n}function Y1(r,e="div",t={},n="",i=document.body){const a=document.getElementById(r);a&&a.remove();const s=document.createElement(e);return s.innerHTML=n,s.id=r,Object.assign(s.style,t),i.appendChild(s),s}var $H=function(r,e,t,n){function i(a){return a instanceof t?a:new t(function(s){s(a)})}return new(t||(t=Promise))(function(a,s){function o(u){try{c(n.next(u))}catch(d){s(d)}}function l(u){try{c(n.throw(u))}catch(d){s(d)}}function c(u){u.done?a(u.value):i(u.value).then(o,l)}c((n=n.apply(r,e||[])).next())})};class Eh extends Zn{constructor(e,t){super(e,Object.assign({},Eh.defaultOptions,t)),this.$element=Vo("background"),this.context.canvas.getContainer().prepend(this.$element),this.update(t)}update(e){const t=Object.create(null,{update:{get:()=>super.update}});return $H(this,void 0,void 0,function*(){t.update.call(this,e),Object.assign(this.$element.style,bb(this.options,["key","type"]))})}destroy(){super.destroy(),this.$element.remove()}}Eh.defaultOptions={transition:"background 0.5s",backgroundSize:"cover",zIndex:"-1"};function xx(r,e,t,n,i,a){const s=r,o=e,l=t-s,c=n-o;let u=i-s,d=a-o,h=u*l+d*c,f=0;h<=0?f=0:(u=l-u,d=c-d,h=u*l+d*c,h<=0?f=0:f=h*h/(l*l+c*c));const g=u*u+d*d-f;return g<0?0:g}function Pa(r,e,t,n){return(r-t)*(r-t)+(e-n)*(e-n)}function UT(r,e,t,n,i){return Pa(r,e,t,n)<i*i}function qH(r){if(!Number.isFinite(r))return t=>t;if(r===0)return Math.round;const e=Math.pow(10,r);return t=>Math.round(t*e)/e}function HR(r){const e=Math.min(r.x1,r.x2),t=Math.max(r.x1,r.x2),n=Math.min(r.y1,r.y2),i=Math.max(r.y1,r.y2);return{x:e,y:n,x2:t,y2:i,width:t-e,height:i-n}}class Fn{constructor(e,t,n,i){this.x1=e,this.y1=t,this.x2=n,this.y2=i}equals(e){return this.x1===e.x1&&this.y1===e.y1&&this.x2===e.x2&&this.y2===e.y2}draw(e){e.moveTo(this.x1,this.y1),e.lineTo(this.x2,this.y2)}toString(){return`Line(from=(${this.x1},${this.y1}),to=(${this.x2},${this.y2}))`}static from(e){return new Fn(e.x1,e.y1,e.x2,e.y2)}cuts(e,t){if(this.y1===this.y2||t<this.y1&&t<=this.y2||t>this.y1&&t>=this.y2||e>this.x1&&e>=this.x2)return!1;if(e<this.x1&&e<=this.x2)return!0;const n=this.x1+(t-this.y1)*(this.x2-this.x1)/(this.y2-this.y1);return e<=n}distSquare(e,t){return xx(this.x1,this.y1,this.x2,this.y2,e,t)}ptClose(e,t,n){if(this.x1<this.x2){if(e<this.x1-n||e>this.x2+n)return!1}else if(e<this.x2-n||e>this.x1+n)return!1;if(this.y1<this.y2){if(t<this.y1-n||t>this.y2+n)return!1}else if(t<this.y2-n||t>this.y1+n)return!1;return!0}}var ln;(function(r){r[r.POINT=1]="POINT",r[r.PARALLEL=2]="PARALLEL",r[r.COINCIDENT=3]="COINCIDENT",r[r.NONE=4]="NONE"})(ln||(ln={}));class Cy{constructor(e,t=0,n=0){this.state=e,this.x=t,this.y=n}}function pu(r,e){const t=(e.x2-e.x1)*(r.y1-e.y1)-(e.y2-e.y1)*(r.x1-e.x1),n=(r.x2-r.x1)*(r.y1-e.y1)-(r.y2-r.y1)*(r.x1-e.x1),i=(e.y2-e.y1)*(r.x2-r.x1)-(e.x2-e.x1)*(r.y2-r.y1);if(i){const a=t/i,s=n/i;return 0<=a&&a<=1&&0<=s&&s<=1?new Cy(ln.POINT,r.x1+a*(r.x2-r.x1),r.y1+a*(r.y2-r.y1)):new Cy(ln.NONE)}return new Cy(t===0||n===0?ln.COINCIDENT:ln.PARALLEL)}function YR(r,e){const t=(e.x2-e.x1)*(r.y1-e.y1)-(e.y2-e.y1)*(r.x1-e.x1),n=(r.x2-r.x1)*(r.y1-e.y1)-(r.y2-r.y1)*(r.x1-e.x1),i=(e.y2-e.y1)*(r.x2-r.x1)-(e.x2-e.x1)*(r.y2-r.y1);if(i){const a=t/i,s=n/i;if(0<=a&&a<=1&&0<=s&&s<=1)return a}return Number.POSITIVE_INFINITY}function GH(r,e){function t(i,a,s,o){let l=YR(e,new Fn(i,a,s,o));return l=Math.abs(l-.5),l>=0&&l<=1?1:0}let n=t(r.x,r.y,r.x2,r.y);return n+=t(r.x,r.y,r.x,r.y2),n>1||(n+=t(r.x,r.y2,r.x2,r.y2),n>1)?!0:(n+=t(r.x2,r.y,r.x2,r.y2),n>0)}var cn;(function(r){r[r.LEFT=0]="LEFT",r[r.TOP=1]="TOP",r[r.RIGHT=2]="RIGHT",r[r.BOTTOM=3]="BOTTOM"})(cn||(cn={}));function Lu(r,e,t){const n=new Set;return r.width<=0?(n.add(cn.LEFT),n.add(cn.RIGHT)):e<r.x?n.add(cn.LEFT):e>r.x+r.width&&n.add(cn.RIGHT),r.height<=0?(n.add(cn.TOP),n.add(cn.BOTTOM)):t<r.y?n.add(cn.TOP):t>r.y+r.height&&n.add(cn.BOTTOM),n}function KR(r,e){let t=e.x1,n=e.y1;const i=e.x2,a=e.y2,s=Array.from(Lu(r,i,a));if(s.length===0)return!0;let o=Lu(r,t,n);for(;o.size!==0;){for(const l of s)if(o.has(l))return!1;if(o.has(cn.RIGHT)||o.has(cn.LEFT)){let l=r.x;o.has(cn.RIGHT)&&(l+=r.width),n=n+(l-t)*(a-n)/(i-t),t=l}else{let l=r.y;o.has(cn.BOTTOM)&&(l+=r.height),t=t+(l-n)*(i-t)/(a-n),n=l}o=Lu(r,t,n)}return!0}function WH(r,e){let t=Number.POSITIVE_INFINITY,n=0;function i(a,s,o,l){let c=YR(e,new Fn(a,s,o,l));c=Math.abs(c-.5),c>=0&&c<=1&&(n++,c<t&&(t=c))}return i(r.x,r.y,r.x2,r.y),i(r.x,r.y,r.x,r.y2),n>1||(i(r.x,r.y2,r.x2,r.y2),n>1)?t:(i(r.x2,r.y,r.x2,r.y2),n===0?-1:t)}function VH(r,e){let t=0;const n=pu(r,new Fn(e.x,e.y,e.x2,e.y));t+=n.state===ln.POINT?1:0;const i=pu(r,new Fn(e.x,e.y,e.x,e.y2));t+=i.state===ln.POINT?1:0;const a=pu(r,new Fn(e.x,e.y2,e.x2,e.y2));t+=a.state===ln.POINT?1:0;const s=pu(r,new Fn(e.x2,e.y,e.x2,e.y2));return t+=s.state===ln.POINT?1:0,{top:n,left:i,bottom:a,right:s,count:t}}class tr{constructor(e,t,n,i){this.x=e,this.y=t,this.width=n,this.height=i}get x2(){return this.x+this.width}get y2(){return this.y+this.height}get cx(){return this.x+this.width/2}get cy(){return this.y+this.height/2}get radius(){return Math.max(this.width,this.height)/2}static from(e){return new tr(e.x,e.y,e.width,e.height)}equals(e){return this.x===e.x&&this.y===e.y&&this.width===e.width&&this.height===e.height}clone(){return new tr(this.x,this.y,this.width,this.height)}add(e){const t=Math.min(this.x,e.x),n=Math.min(this.y,e.y),i=Math.max(this.x2,e.x+e.width),a=Math.max(this.y2,e.y+e.height);this.x=t,this.y=n,this.width=i-t,this.height=a-n}addPoint(e){const t=Math.min(this.x,e.x),n=Math.min(this.y,e.y),i=Math.max(this.x2,e.x),a=Math.max(this.y2,e.y);this.x=t,this.y=n,this.width=i-t,this.height=a-n}toString(){return`Rectangle[x=${this.x}, y=${this.y}, w=${this.width}, h=${this.height}]`}draw(e){e.rect(this.x,this.y,this.width,this.height)}containsPt(e,t){return e>=this.x&&e<=this.x2&&t>=this.y&&t<=this.y2}get area(){return this.width*this.height}intersects(e){return this.area<=0||e.width<=0||e.height<=0?!1:e.x+e.width>this.x&&e.y+e.height>this.y&&e.x<this.x2&&e.y<this.y2}distSquare(e,t){if(this.containsPt(e,t))return 0;const n=Lu(this,e,t);return n.has(cn.TOP)?n.has(cn.LEFT)?Pa(e,t,this.x,this.y):n.has(cn.RIGHT)?Pa(e,t,this.x2,this.y):(this.y-t)*(this.y-t):n.has(cn.BOTTOM)?n.has(cn.LEFT)?Pa(e,t,this.x,this.y2):n.has(cn.RIGHT)?Pa(e,t,this.x2,this.y2):(t-this.y2)*(t-this.y2):n.has(cn.LEFT)?(this.x-e)*(this.x-e):n.has(cn.RIGHT)?(e-this.x2)*(e-this.x2):0}}function UH(r){if(r.length===0)return null;const e=r[0],t=new tr(e.x,e.y,0,0);for(const n of r)t.addPoint(n);return t}class pd{constructor(e,t,n){this.cx=e,this.cy=t,this.radius=n}get x(){return this.cx-this.radius}get x2(){return this.cx+this.radius}get width(){return this.radius*2}get y(){return this.cy-this.radius}get y2(){return this.cy+this.radius}get height(){return this.radius*2}static from(e){return new pd(e.cx,e.cy,e.radius)}containsPt(e,t){return Pa(this.cx,this.cy,e,t)<this.radius*this.radius}distSquare(e,t){const n=Pa(this.cx,this.cy,e,t);if(n<this.radius*this.radius)return 0;const i=Math.sqrt(n)-this.radius;return i*i}draw(e){e.ellipse(this.cx,this.cy,this.radius,this.radius,0,0,Math.PI*2)}}class ms{constructor(e,t=0,n=0,i=0,a=0,s=10,o=10,l=new Float32Array(Math.max(0,s*o)).fill(0)){this.pixelGroup=e,this.i=t,this.j=n,this.pixelX=i,this.pixelY=a,this.width=s,this.height=o,this.area=l}createSub(e,t){return new ms(this.pixelGroup,e.x,e.y,t.x,t.y,e.width,e.height)}static fromPixelRegion(e,t){return new ms(t,0,0,e.x,e.y,Math.ceil(e.width/t),Math.ceil(e.height/t))}copy(e,t){return new ms(this.pixelGroup,this.scaleX(t.x),this.scaleY(t.y),t.x,t.y,e.width,e.height,e.area)}boundX(e){return e<this.i?this.i:e>=this.width?this.width-1:e}boundY(e){return e<this.j?this.j:e>=this.height?this.height-1:e}scaleX(e){return this.boundX(Math.floor((e-this.pixelX)/this.pixelGroup))}scaleY(e){return this.boundY(Math.floor((e-this.pixelY)/this.pixelGroup))}scale(e){const t=this.scaleX(e.x),n=this.scaleY(e.y),i=this.boundX(Math.ceil((e.x+e.width-this.pixelX)/this.pixelGroup)),a=this.boundY(Math.ceil((e.y+e.height-this.pixelY)/this.pixelGroup)),s=i-t,o=a-n;return new tr(t,n,s,o)}invertScaleX(e){return Math.round(e*this.pixelGroup+this.pixelX)}invertScaleY(e){return Math.round(e*this.pixelGroup+this.pixelY)}addPadding(e,t){const n=Math.ceil(t/this.pixelGroup),i=this.boundX(e.x-n),a=this.boundY(e.y-n),s=this.boundX(e.x2+n),o=this.boundY(e.y2+n),l=s-i,c=o-a;return new tr(i,a,l,c)}get(e,t){return e<0||t<0||e>=this.width||t>=this.height?Number.NaN:this.area[e+t*this.width]}inc(e,t,n){e<0||t<0||e>=this.width||t>=this.height||(this.area[e+t*this.width]+=n)}set(e,t,n){e<0||t<0||e>=this.width||t>=this.height||(this.area[e+t*this.width]=n)}incArea(e,t){if(e.width<=0||e.height<=0||t===0)return;const n=this.width,i=e.width,a=Math.max(0,e.i),s=Math.max(0,e.j),o=Math.min(e.i+e.width,n),l=Math.min(e.j+e.height,this.height);if(!(l<=0||o<=0||a>=n||l>=this.height))for(let c=s;c<l;c++){const u=(c-e.j)*i,d=c*n;for(let h=a;h<o;h++){const f=e.area[h-e.i+u];f!==0&&(this.area[h+d]+=t*f)}}}fill(e){this.area.fill(e)}fillArea(e,t){const n=e.x+e.y*this.width;for(let i=0;i<e.height;i++){const a=n+i*this.width;this.area.fill(t,a,a+e.width)}}fillHorizontalLine(e,t,n,i){const a=e+t*this.width;this.area.fill(i,a,a+n)}fillVerticalLine(e,t,n,i){const a=e+t*this.width;for(let s=0;s<n;s++)this.area[a+s*this.width]=i}clear(){this.area.fill(0)}toString(){let e="";for(let t=0;t<this.height;t++){const n=t*this.width;for(let i=0;i<this.width;i++){const a=this.area[n+i];e+=a.toFixed(1).padStart(6),e+=" "}e+=`
342
+ */const BR=Symbol("Comlink.proxy"),wH=Symbol("Comlink.endpoint"),zR=Symbol("Comlink.releaseProxy"),Ty=Symbol("Comlink.finalizer"),Ru=Symbol("Comlink.thrown"),jR=r=>typeof r=="object"&&r!==null||typeof r=="function",EH={canHandle:r=>jR(r)&&r[BR],serialize(r){const{port1:e,port2:t}=new MessageChannel;return qR(r,e),[t,[t]]},deserialize(r){return r.start(),WR(r)}},SH={canHandle:r=>jR(r)&&Ru in r,serialize({value:r}){let e;return r instanceof Error?e={isError:!0,value:{message:r.message,name:r.name,stack:r.stack}}:e={isError:!1,value:r},[e,[]]},deserialize(r){throw r.isError?Object.assign(new Error(r.value.message),r.value):r.value}},$R=new Map([["proxy",EH],["throw",SH]]);function _H(r,e){for(const t of r)if(e===t||t==="*"||t instanceof RegExp&&t.test(e))return!0;return!1}function qR(r,e=globalThis,t=["*"]){e.addEventListener("message",function n(i){if(!i||!i.data)return;if(!_H(t,i.origin)){console.warn(`Invalid origin '${i.origin}' for comlink proxy`);return}const{id:a,type:s,path:o}=Object.assign({path:[]},i.data),l=(i.data.argumentList||[]).map(ss);let c;try{const u=o.slice(0,-1).reduce((h,f)=>h[f],r),d=o.reduce((h,f)=>h[f],r);switch(s){case"GET":c=d;break;case"SET":u[o.slice(-1)[0]]=ss(i.data.value),c=!0;break;case"APPLY":c=d.apply(u,l);break;case"CONSTRUCT":{const h=new d(...l);c=NH(h)}break;case"ENDPOINT":{const{port1:h,port2:f}=new MessageChannel;qR(r,f),c=CH(h,[h])}break;case"RELEASE":c=void 0;break;default:return}}catch(u){c={value:u,[Ru]:0}}Promise.resolve(c).catch(u=>({value:u,[Ru]:0})).then(u=>{const[d,h]=vd(u);e.postMessage(Object.assign(Object.assign({},d),{id:a}),h),s==="RELEASE"&&(e.removeEventListener("message",n),GR(e),Ty in r&&typeof r[Ty]=="function"&&r[Ty]())}).catch(u=>{const[d,h]=vd({value:new TypeError("Unserializable return value"),[Ru]:0});e.postMessage(Object.assign(Object.assign({},d),{id:a}),h)})}),e.start&&e.start()}function kH(r){return r.constructor.name==="MessagePort"}function GR(r){kH(r)&&r.close()}function WR(r,e){const t=new Map;return r.addEventListener("message",function(i){const{data:a}=i;if(!a||!a.id)return;const s=t.get(a.id);if(s)try{s(a)}finally{t.delete(a.id)}}),H1(r,t,[],e)}function vu(r){if(r)throw new Error("Proxy has been released and is not useable")}function VR(r){return oo(r,new Map,{type:"RELEASE"}).then(()=>{GR(r)})}const fd=new WeakMap,gd="FinalizationRegistry"in globalThis&&new FinalizationRegistry(r=>{const e=(fd.get(r)||0)-1;fd.set(r,e),e===0&&VR(r)});function MH(r,e){const t=(fd.get(e)||0)+1;fd.set(e,t),gd&&gd.register(r,e,r)}function TH(r){gd&&gd.unregister(r)}function H1(r,e,t=[],n=function(){}){let i=!1;const a=new Proxy(n,{get(s,o){if(vu(i),o===zR)return()=>{TH(a),VR(r),e.clear(),i=!0};if(o==="then"){if(t.length===0)return{then:()=>a};const l=oo(r,e,{type:"GET",path:t.map(c=>c.toString())}).then(ss);return l.then.bind(l)}return H1(r,e,[...t,o])},set(s,o,l){vu(i);const[c,u]=vd(l);return oo(r,e,{type:"SET",path:[...t,o].map(d=>d.toString()),value:c},u).then(ss)},apply(s,o,l){vu(i);const c=t[t.length-1];if(c===wH)return oo(r,e,{type:"ENDPOINT"}).then(ss);if(c==="bind")return H1(r,e,t.slice(0,-1));const[u,d]=WT(l);return oo(r,e,{type:"APPLY",path:t.map(h=>h.toString()),argumentList:u},d).then(ss)},construct(s,o){vu(i);const[l,c]=WT(o);return oo(r,e,{type:"CONSTRUCT",path:t.map(u=>u.toString()),argumentList:l},c).then(ss)}});return MH(a,r),a}function OH(r){return Array.prototype.concat.apply([],r)}function WT(r){const e=r.map(vd);return[e.map(t=>t[0]),OH(e.map(t=>t[1]))]}const UR=new WeakMap;function CH(r,e){return UR.set(r,e),r}function NH(r){return Object.assign(r,{[BR]:!0})}function vd(r){for(const[e,t]of $R)if(t.canHandle(r)){const[n,i]=t.serialize(r);return[{type:"HANDLER",name:e,value:n},i]}return[{type:"RAW",value:r},UR.get(r)||[]]}function ss(r){switch(r.type){case"HANDLER":return $R.get(r.name).deserialize(r.value);case"RAW":return r.value}}function oo(r,e,t,n){return new Promise(i=>{const a=AH();e.set(a,i),r.start&&r.start(),r.postMessage(Object.assign({id:a},t),n)})}function AH(){return new Array(4).fill(0).map(()=>Math.floor(Math.random()*Number.MAX_SAFE_INTEGER).toString(16)).join("-")}class PH extends Wd{constructor(e,t,n){super(),this.graph=e,this.layout=t,this.options=n,this.spawnWorker()}spawnWorker(){this.proxy=WR(new Worker(new URL("https://registry.npmmirror.com/@gkd-kit/inspect/0.0.1741169152740/files/dist/assets/worker-BZwDflls.js",import.meta.url),{type:"module"})),this.running&&(this.running=!1,this.execute())}execute(){var e;return rt(this,void 0,void 0,function*(){if(this.running)return this;this.running=!0;const t=this.layout.options,{onTick:n}=t,i=un(t,["onTick"]),a={};Object.keys(i).forEach(c=>{Ie(i[c])||(a[c]=i[c])});const s={layout:{id:this.layout.id,options:a,iterations:(e=this.options)===null||e===void 0?void 0:e.iterations},nodes:this.graph.getAllNodes(),edges:this.graph.getAllEdges()},o=new Float32Array([0]),[l]=yield this.proxy.calculateLayout(s,[o]);return l})}stop(){return this.running=!1,this.proxy.stopLayout(),this}kill(){this.proxy[zR]()}isRunning(){return this.running}}var RH=function(r,e,t,n){function i(a){return a instanceof t?a:new t(function(s){s(a)})}return new(t||(t=Promise))(function(a,s){function o(u){try{c(n.next(u))}catch(d){s(d)}}function l(u){try{c(n.throw(u))}catch(d){s(d)}}function c(u){u.done?a(u.value):i(u.value).then(o,l)}c((n=n.apply(r,e||[])).next())})};class xh extends Vd{constructor(){super(...arguments),this.id="fishbone"}getRoot(){const e=this.context.model.getRootsData();if(!(ki(e)||e.length>2))return e[0]}formatSize(e){const t=typeof e=="function"?e:()=>e;return n=>Ir(t(n))}doLayout(e,t){const{hGap:n,getRibSep:i,vGap:a,nodeSize:s,height:o}=t,{model:l}=this.context,c=this.formatSize(s);let u=c(e)[0]+i(e);const d=(b,w=0)=>{var E;return w+=n*((b.children||[]).length+1),(E=b.children)===null||E===void 0||E.forEach(_=>{var O;(O=l.getNodeLikeDatum(_).children)===null||O===void 0||O.forEach(N=>{const A=l.getNodeLikeDatum(N);w=d(A,w)})}),w},h=b=>{if(b.depth===1)return u;const w=l.getParentData(b.id,"tree");if(eo(b)){const E=l.getParentData(w.id,"tree"),_=p(b)-p(E);return h(w)+_*n/a}else{const E=(w.children||[]).indexOf(b.id),_=l.getNodeData((w.children||[]).slice(E));return f(w)-_.reduce((O,M)=>O+d(M),0)-c(w)[0]/2}},f=i1(b=>{if(Oy(b))return c(b)[0]/2;const w=l.getParentData(b.id,"tree");if(eo(b))return h(b)+d(b)+c(b)[0]/2;{const E=p(b)-p(w),_=n/a;return h(b)+E*_}},b=>b.id),g=b=>p(l.getParentData(b,"tree")),p=i1(b=>{if(Oy(b))return o/2;if(eo(b)){const w=l.getParentData(b.id,"tree"),E=w.children.indexOf(b.id);if(E===0)return g(w.id)+a;const _=l.getNodeLikeDatum(w.children[E-1]);if(ki(_.children))return p(_)+a;const O=l.getDescendantsData(_.id);return Math.max(...O.map(M=>eo(M)?g(M.id):p(M)))+a}else{if(ki(b.children))return g(b.id)+a;const w=l.getNodeLikeDatum(b.children.slice(-1)[0]);if(ki(w.children))return p(w)+a;const E=l.getDescendantsData(b.id).slice(-1)[0];return(eo(E)?g(E.id):p(E))+a}},b=>b.id);let v=0;const m={nodes:[],edges:[]},y=b=>{var w;(w=b.children)===null||w===void 0||w.forEach(N=>y(l.getNodeLikeDatum(N)));const E=p(b),_=f(b);if(m.nodes.push({id:b.id,x:_,y:E}),Oy(b))return;const O=l.getRelatedEdgesData(b.id,"in")[0],M=[h(b),eo(b)?E:g(b.id)];m.edges.push({id:te(O),controlPoints:[M],relatedNodeId:b.id}),v=Math.max(v,_+i(b)),b.depth===1&&(u=v)};return y(e),m}placeAlterative(e,t){const n=(t.children||[]).filter((o,l)=>l%2!==0);if(n.length===0)return e;const{model:i}=this.context,a=e.nodes.find(o=>o.id===t.id).y,s=o=>{const l=i.getAncestorsData(o,"tree");if(ki(l))return!1;const c=l.length===1?o:l[l.length-2].id;return n.includes(c)};e.nodes.forEach(o=>{s(o.id)&&(o.y=2*a-o.y)}),e.edges.forEach(o=>{s(o.relatedNodeId)&&(o.controlPoints=o.controlPoints.map(l=>[l[0],2*a-l[1]]))})}rightToLeft(e,t){return e.nodes.forEach(n=>n.x=t.width-n.x),e.edges.forEach(n=>{n.controlPoints=n.controlPoints.map(i=>[t.width-i[0],i[1]])}),e}execute(e,t){return RH(this,void 0,void 0,function*(){const n=Object.assign(Object.assign(Object.assign({},xh.defaultOptions),this.options),t),{direction:i,nodeSize:a}=n,s=this.getRoot();if(!s)return e;const o=this.formatSize(a);n.vGap||(n.vGap=Math.max(...(e.nodes||[]).map(h=>o(h)[1]))),n.hGap||(n.hGap=Math.max(...(e.nodes||[]).map(h=>o(h)[0])));let l=this.doLayout(s,n);this.placeAlterative(l,s),i==="RL"&&(l=this.rightToLeft(l,n));const{model:c}=this.context,u=[],d=[];return l.nodes.forEach(h=>{const{id:f,x:g,y:p}=h,v=c.getNodeLikeDatum(f);u.push(VT(v,{x:g,y:p}))}),l.edges.forEach(h=>{const{id:f,controlPoints:g}=h,p=c.getEdgeDatum(f);d.push(VT(p,{controlPoints:g}))}),{nodes:u,edges:d}})}}xh.defaultOptions={direction:"RL",getRibSep:()=>60};const VT=(r,e)=>Object.assign(Object.assign({},r),{style:Object.assign(Object.assign({},r.style||{}),e)}),Oy=r=>r.depth===0,eo=r=>(r.depth||(r.depth=0))%2===0;var LH=function(r,e,t,n){function i(a){return a instanceof t?a:new t(function(s){s(a)})}return new(t||(t=Promise))(function(a,s){function o(u){try{c(n.next(u))}catch(d){s(d)}}function l(u){try{c(n.throw(u))}catch(d){s(d)}}function c(u){u.done?a(u.value):i(u.value).then(o,l)}c((n=n.apply(r,e||[])).next())})};class wh extends Vd{constructor(){super(...arguments),this.id="snake"}formatSize(e,t){const n=typeof t=="function"?t:()=>t;return e.reduce((i,a)=>{const[s,o]=Ir(n(a))||[0,0];return[Math.max(i[0],s),Math.max(i[1],o)]},[0,0])}validate(e){const{nodes:t=[],edges:n=[]}=e,i={},a={},s={};t.forEach(h=>{i[h.id]=0,a[h.id]=0,s[h.id]=[]}),n.forEach(h=>{i[h.target]++,a[h.source]++,s[h.source].push(h.target)});const o=new Set,l=h=>{o.has(h)||(o.add(h),s[h].forEach(l))};if(l(t[0].id),o.size!==t.length)return!1;const c=t.filter(h=>i[h.id]===0),u=t.filter(h=>a[h.id]===0);return!(c.length!==1||u.length!==1||t.filter(h=>i[h.id]===1&&a[h.id]===1).length!==t.length-2)}execute(e,t){return LH(this,void 0,void 0,function*(){var n;if(!this.validate(e))return e;const{nodeSize:i,padding:a,sortBy:s,cols:o,colGap:l,rowGap:c,clockwise:u,width:d,height:h}=Object.assign({},wh.defaultOptions,this.options,t),[f,g,p,v]=Fi(a),m=this.formatSize(e.nodes||[],i),y=Math.ceil((e.nodes||[]).length/o);let b=l||(d-v-g-o*m[0])/(o-1),w=c||(h-f-p-y*m[1])/(y-1);return(w===1/0||w<0)&&(w=0),(b===1/0||b<0)&&(b=0),{nodes:((s?(n=e.nodes)===null||n===void 0?void 0:n.sort(s):IH(e))||[]).map((O,M)=>{const N=Math.floor(M/o),A=M%o,P=u?N%2===0?A:o-1-A:N%2===0?o-1-A:A,L=v+P*(m[0]+b)+m[0]/2,I=f+N*(m[1]+w)+m[1]/2;return{id:O.id,style:{x:L,y:I}}})}})}}wh.defaultOptions={padding:0,cols:5,clockwise:!0};function IH(r){const{nodes:e=[],edges:t=[]}=r,n={},i={};e.forEach(o=>{n[o.id]=0,i[o.id]=[]}),t.forEach(o=>{n[o.target]++,i[o.source].push(o.target)});const a=[],s=[];for(e.forEach(o=>{n[o.id]===0&&a.push(o.id)});a.length>0;){const o=a.shift(),l=e.find(c=>c.id===o);s.push(l),i[o].forEach(c=>{n[c]--,n[c]===0&&a.push(c)})}return s}const DH=["rgb(158, 1, 66)","rgb(213, 62, 79)","rgb(244, 109, 67)","rgb(253, 174, 97)","rgb(254, 224, 139)","rgb(255, 255, 191)","rgb(230, 245, 152)","rgb(171, 221, 164)","rgb(102, 194, 165)","rgb(50, 136, 189)","rgb(94, 79, 162)"],FH=["rgb(78, 121, 167)","rgb(242, 142, 44)","rgb(225, 87, 89)","rgb(118, 183, 178)","rgb(89, 161, 79)","rgb(237, 201, 73)","rgb(175, 122, 161)","rgb(255, 157, 167)","rgb(156, 117, 95)","rgb(186, 176, 171)"],BH=["rgb(255, 245, 235)","rgb(254, 230, 206)","rgb(253, 208, 162)","rgb(253, 174, 107)","rgb(253, 141, 60)","rgb(241, 105, 19)","rgb(217, 72, 1)","rgb(166, 54, 3)","rgb(127, 39, 4)"],zH=["rgb(247, 252, 245)","rgb(229, 245, 224)","rgb(199, 233, 192)","rgb(161, 217, 155)","rgb(116, 196, 118)","rgb(65, 171, 93)","rgb(35, 139, 69)","rgb(0, 109, 44)","rgb(0, 68, 27)"],jH=["rgb(247, 251, 255)","rgb(222, 235, 247)","rgb(198, 219, 239)","rgb(158, 202, 225)","rgb(107, 174, 214)","rgb(66, 146, 198)","rgb(33, 113, 181)","rgb(8, 81, 156)","rgb(8, 48, 107)"];class Zn extends Fb{}function Vo(r,e=!0,t){const n=document.createElement("div");return n.setAttribute("class",`g6-${r}`),Object.assign(n.style,{position:"absolute",display:"block"}),e&&Object.assign(n.style,{position:"unset",gridArea:"1 / 1 / 2 / 2",inset:"0px",height:"100%",width:"100%",overflow:"hidden",pointerEvents:"none"}),t&&Object.assign(n.style,t),n}function Y1(r,e="div",t={},n="",i=document.body){const a=document.getElementById(r);a&&a.remove();const s=document.createElement(e);return s.innerHTML=n,s.id=r,Object.assign(s.style,t),i.appendChild(s),s}var $H=function(r,e,t,n){function i(a){return a instanceof t?a:new t(function(s){s(a)})}return new(t||(t=Promise))(function(a,s){function o(u){try{c(n.next(u))}catch(d){s(d)}}function l(u){try{c(n.throw(u))}catch(d){s(d)}}function c(u){u.done?a(u.value):i(u.value).then(o,l)}c((n=n.apply(r,e||[])).next())})};class Eh extends Zn{constructor(e,t){super(e,Object.assign({},Eh.defaultOptions,t)),this.$element=Vo("background"),this.context.canvas.getContainer().prepend(this.$element),this.update(t)}update(e){const t=Object.create(null,{update:{get:()=>super.update}});return $H(this,void 0,void 0,function*(){t.update.call(this,e),Object.assign(this.$element.style,bb(this.options,["key","type"]))})}destroy(){super.destroy(),this.$element.remove()}}Eh.defaultOptions={transition:"background 0.5s",backgroundSize:"cover",zIndex:"-1"};function xx(r,e,t,n,i,a){const s=r,o=e,l=t-s,c=n-o;let u=i-s,d=a-o,h=u*l+d*c,f=0;h<=0?f=0:(u=l-u,d=c-d,h=u*l+d*c,h<=0?f=0:f=h*h/(l*l+c*c));const g=u*u+d*d-f;return g<0?0:g}function Pa(r,e,t,n){return(r-t)*(r-t)+(e-n)*(e-n)}function UT(r,e,t,n,i){return Pa(r,e,t,n)<i*i}function qH(r){if(!Number.isFinite(r))return t=>t;if(r===0)return Math.round;const e=Math.pow(10,r);return t=>Math.round(t*e)/e}function HR(r){const e=Math.min(r.x1,r.x2),t=Math.max(r.x1,r.x2),n=Math.min(r.y1,r.y2),i=Math.max(r.y1,r.y2);return{x:e,y:n,x2:t,y2:i,width:t-e,height:i-n}}class Fn{constructor(e,t,n,i){this.x1=e,this.y1=t,this.x2=n,this.y2=i}equals(e){return this.x1===e.x1&&this.y1===e.y1&&this.x2===e.x2&&this.y2===e.y2}draw(e){e.moveTo(this.x1,this.y1),e.lineTo(this.x2,this.y2)}toString(){return`Line(from=(${this.x1},${this.y1}),to=(${this.x2},${this.y2}))`}static from(e){return new Fn(e.x1,e.y1,e.x2,e.y2)}cuts(e,t){if(this.y1===this.y2||t<this.y1&&t<=this.y2||t>this.y1&&t>=this.y2||e>this.x1&&e>=this.x2)return!1;if(e<this.x1&&e<=this.x2)return!0;const n=this.x1+(t-this.y1)*(this.x2-this.x1)/(this.y2-this.y1);return e<=n}distSquare(e,t){return xx(this.x1,this.y1,this.x2,this.y2,e,t)}ptClose(e,t,n){if(this.x1<this.x2){if(e<this.x1-n||e>this.x2+n)return!1}else if(e<this.x2-n||e>this.x1+n)return!1;if(this.y1<this.y2){if(t<this.y1-n||t>this.y2+n)return!1}else if(t<this.y2-n||t>this.y1+n)return!1;return!0}}var ln;(function(r){r[r.POINT=1]="POINT",r[r.PARALLEL=2]="PARALLEL",r[r.COINCIDENT=3]="COINCIDENT",r[r.NONE=4]="NONE"})(ln||(ln={}));class Cy{constructor(e,t=0,n=0){this.state=e,this.x=t,this.y=n}}function pu(r,e){const t=(e.x2-e.x1)*(r.y1-e.y1)-(e.y2-e.y1)*(r.x1-e.x1),n=(r.x2-r.x1)*(r.y1-e.y1)-(r.y2-r.y1)*(r.x1-e.x1),i=(e.y2-e.y1)*(r.x2-r.x1)-(e.x2-e.x1)*(r.y2-r.y1);if(i){const a=t/i,s=n/i;return 0<=a&&a<=1&&0<=s&&s<=1?new Cy(ln.POINT,r.x1+a*(r.x2-r.x1),r.y1+a*(r.y2-r.y1)):new Cy(ln.NONE)}return new Cy(t===0||n===0?ln.COINCIDENT:ln.PARALLEL)}function YR(r,e){const t=(e.x2-e.x1)*(r.y1-e.y1)-(e.y2-e.y1)*(r.x1-e.x1),n=(r.x2-r.x1)*(r.y1-e.y1)-(r.y2-r.y1)*(r.x1-e.x1),i=(e.y2-e.y1)*(r.x2-r.x1)-(e.x2-e.x1)*(r.y2-r.y1);if(i){const a=t/i,s=n/i;if(0<=a&&a<=1&&0<=s&&s<=1)return a}return Number.POSITIVE_INFINITY}function GH(r,e){function t(i,a,s,o){let l=YR(e,new Fn(i,a,s,o));return l=Math.abs(l-.5),l>=0&&l<=1?1:0}let n=t(r.x,r.y,r.x2,r.y);return n+=t(r.x,r.y,r.x,r.y2),n>1||(n+=t(r.x,r.y2,r.x2,r.y2),n>1)?!0:(n+=t(r.x2,r.y,r.x2,r.y2),n>0)}var cn;(function(r){r[r.LEFT=0]="LEFT",r[r.TOP=1]="TOP",r[r.RIGHT=2]="RIGHT",r[r.BOTTOM=3]="BOTTOM"})(cn||(cn={}));function Lu(r,e,t){const n=new Set;return r.width<=0?(n.add(cn.LEFT),n.add(cn.RIGHT)):e<r.x?n.add(cn.LEFT):e>r.x+r.width&&n.add(cn.RIGHT),r.height<=0?(n.add(cn.TOP),n.add(cn.BOTTOM)):t<r.y?n.add(cn.TOP):t>r.y+r.height&&n.add(cn.BOTTOM),n}function KR(r,e){let t=e.x1,n=e.y1;const i=e.x2,a=e.y2,s=Array.from(Lu(r,i,a));if(s.length===0)return!0;let o=Lu(r,t,n);for(;o.size!==0;){for(const l of s)if(o.has(l))return!1;if(o.has(cn.RIGHT)||o.has(cn.LEFT)){let l=r.x;o.has(cn.RIGHT)&&(l+=r.width),n=n+(l-t)*(a-n)/(i-t),t=l}else{let l=r.y;o.has(cn.BOTTOM)&&(l+=r.height),t=t+(l-n)*(i-t)/(a-n),n=l}o=Lu(r,t,n)}return!0}function WH(r,e){let t=Number.POSITIVE_INFINITY,n=0;function i(a,s,o,l){let c=YR(e,new Fn(a,s,o,l));c=Math.abs(c-.5),c>=0&&c<=1&&(n++,c<t&&(t=c))}return i(r.x,r.y,r.x2,r.y),i(r.x,r.y,r.x,r.y2),n>1||(i(r.x,r.y2,r.x2,r.y2),n>1)?t:(i(r.x2,r.y,r.x2,r.y2),n===0?-1:t)}function VH(r,e){let t=0;const n=pu(r,new Fn(e.x,e.y,e.x2,e.y));t+=n.state===ln.POINT?1:0;const i=pu(r,new Fn(e.x,e.y,e.x,e.y2));t+=i.state===ln.POINT?1:0;const a=pu(r,new Fn(e.x,e.y2,e.x2,e.y2));t+=a.state===ln.POINT?1:0;const s=pu(r,new Fn(e.x2,e.y,e.x2,e.y2));return t+=s.state===ln.POINT?1:0,{top:n,left:i,bottom:a,right:s,count:t}}class tr{constructor(e,t,n,i){this.x=e,this.y=t,this.width=n,this.height=i}get x2(){return this.x+this.width}get y2(){return this.y+this.height}get cx(){return this.x+this.width/2}get cy(){return this.y+this.height/2}get radius(){return Math.max(this.width,this.height)/2}static from(e){return new tr(e.x,e.y,e.width,e.height)}equals(e){return this.x===e.x&&this.y===e.y&&this.width===e.width&&this.height===e.height}clone(){return new tr(this.x,this.y,this.width,this.height)}add(e){const t=Math.min(this.x,e.x),n=Math.min(this.y,e.y),i=Math.max(this.x2,e.x+e.width),a=Math.max(this.y2,e.y+e.height);this.x=t,this.y=n,this.width=i-t,this.height=a-n}addPoint(e){const t=Math.min(this.x,e.x),n=Math.min(this.y,e.y),i=Math.max(this.x2,e.x),a=Math.max(this.y2,e.y);this.x=t,this.y=n,this.width=i-t,this.height=a-n}toString(){return`Rectangle[x=${this.x}, y=${this.y}, w=${this.width}, h=${this.height}]`}draw(e){e.rect(this.x,this.y,this.width,this.height)}containsPt(e,t){return e>=this.x&&e<=this.x2&&t>=this.y&&t<=this.y2}get area(){return this.width*this.height}intersects(e){return this.area<=0||e.width<=0||e.height<=0?!1:e.x+e.width>this.x&&e.y+e.height>this.y&&e.x<this.x2&&e.y<this.y2}distSquare(e,t){if(this.containsPt(e,t))return 0;const n=Lu(this,e,t);return n.has(cn.TOP)?n.has(cn.LEFT)?Pa(e,t,this.x,this.y):n.has(cn.RIGHT)?Pa(e,t,this.x2,this.y):(this.y-t)*(this.y-t):n.has(cn.BOTTOM)?n.has(cn.LEFT)?Pa(e,t,this.x,this.y2):n.has(cn.RIGHT)?Pa(e,t,this.x2,this.y2):(t-this.y2)*(t-this.y2):n.has(cn.LEFT)?(this.x-e)*(this.x-e):n.has(cn.RIGHT)?(e-this.x2)*(e-this.x2):0}}function UH(r){if(r.length===0)return null;const e=r[0],t=new tr(e.x,e.y,0,0);for(const n of r)t.addPoint(n);return t}class pd{constructor(e,t,n){this.cx=e,this.cy=t,this.radius=n}get x(){return this.cx-this.radius}get x2(){return this.cx+this.radius}get width(){return this.radius*2}get y(){return this.cy-this.radius}get y2(){return this.cy+this.radius}get height(){return this.radius*2}static from(e){return new pd(e.cx,e.cy,e.radius)}containsPt(e,t){return Pa(this.cx,this.cy,e,t)<this.radius*this.radius}distSquare(e,t){const n=Pa(this.cx,this.cy,e,t);if(n<this.radius*this.radius)return 0;const i=Math.sqrt(n)-this.radius;return i*i}draw(e){e.ellipse(this.cx,this.cy,this.radius,this.radius,0,0,Math.PI*2)}}class ms{constructor(e,t=0,n=0,i=0,a=0,s=10,o=10,l=new Float32Array(Math.max(0,s*o)).fill(0)){this.pixelGroup=e,this.i=t,this.j=n,this.pixelX=i,this.pixelY=a,this.width=s,this.height=o,this.area=l}createSub(e,t){return new ms(this.pixelGroup,e.x,e.y,t.x,t.y,e.width,e.height)}static fromPixelRegion(e,t){return new ms(t,0,0,e.x,e.y,Math.ceil(e.width/t),Math.ceil(e.height/t))}copy(e,t){return new ms(this.pixelGroup,this.scaleX(t.x),this.scaleY(t.y),t.x,t.y,e.width,e.height,e.area)}boundX(e){return e<this.i?this.i:e>=this.width?this.width-1:e}boundY(e){return e<this.j?this.j:e>=this.height?this.height-1:e}scaleX(e){return this.boundX(Math.floor((e-this.pixelX)/this.pixelGroup))}scaleY(e){return this.boundY(Math.floor((e-this.pixelY)/this.pixelGroup))}scale(e){const t=this.scaleX(e.x),n=this.scaleY(e.y),i=this.boundX(Math.ceil((e.x+e.width-this.pixelX)/this.pixelGroup)),a=this.boundY(Math.ceil((e.y+e.height-this.pixelY)/this.pixelGroup)),s=i-t,o=a-n;return new tr(t,n,s,o)}invertScaleX(e){return Math.round(e*this.pixelGroup+this.pixelX)}invertScaleY(e){return Math.round(e*this.pixelGroup+this.pixelY)}addPadding(e,t){const n=Math.ceil(t/this.pixelGroup),i=this.boundX(e.x-n),a=this.boundY(e.y-n),s=this.boundX(e.x2+n),o=this.boundY(e.y2+n),l=s-i,c=o-a;return new tr(i,a,l,c)}get(e,t){return e<0||t<0||e>=this.width||t>=this.height?Number.NaN:this.area[e+t*this.width]}inc(e,t,n){e<0||t<0||e>=this.width||t>=this.height||(this.area[e+t*this.width]+=n)}set(e,t,n){e<0||t<0||e>=this.width||t>=this.height||(this.area[e+t*this.width]=n)}incArea(e,t){if(e.width<=0||e.height<=0||t===0)return;const n=this.width,i=e.width,a=Math.max(0,e.i),s=Math.max(0,e.j),o=Math.min(e.i+e.width,n),l=Math.min(e.j+e.height,this.height);if(!(l<=0||o<=0||a>=n||l>=this.height))for(let c=s;c<l;c++){const u=(c-e.j)*i,d=c*n;for(let h=a;h<o;h++){const f=e.area[h-e.i+u];f!==0&&(this.area[h+d]+=t*f)}}}fill(e){this.area.fill(e)}fillArea(e,t){const n=e.x+e.y*this.width;for(let i=0;i<e.height;i++){const a=n+i*this.width;this.area.fill(t,a,a+e.width)}}fillHorizontalLine(e,t,n,i){const a=e+t*this.width;this.area.fill(i,a,a+n)}fillVerticalLine(e,t,n,i){const a=e+t*this.width;for(let s=0;s<n;s++)this.area[a+s*this.width]=i}clear(){this.area.fill(0)}toString(){let e="";for(let t=0;t<this.height;t++){const n=t*this.width;for(let i=0;i<this.width;i++){const a=this.area[n+i];e+=a.toFixed(1).padStart(6),e+=" "}e+=`
343
343
  `}return e}draw(e,t=!0){if(this.width<=0||this.height<=0)return;e.save(),t&&e.translate(this.pixelX,this.pixelY);const n=this.area.reduce((s,o)=>Math.min(s,o),Number.POSITIVE_INFINITY),i=this.area.reduce((s,o)=>Math.max(s,o),Number.NEGATIVE_INFINITY),a=s=>(s-n)/(i-n);e.scale(this.pixelGroup,this.pixelGroup);for(let s=0;s<this.width;s++)for(let o=0;o<this.height;o++){const l=this.area[s+o*this.width];e.fillStyle=`rgba(0, 0, 0, ${a(l)})`,e.fillRect(s,o,1,1)}e.restore()}drawThreshold(e,t,n=!0){if(!(this.width<=0||this.height<=0)){e.save(),n&&e.translate(this.pixelX,this.pixelY),e.scale(this.pixelGroup,this.pixelGroup);for(let i=0;i<this.width;i++)for(let a=0;a<this.height;a++){const s=this.area[i+a*this.width];e.fillStyle=s>t?"black":"white",e.fillRect(i,a,1,1)}e.restore()}}}function XR(r,e){const t=n=>({x:n.x-e,y:n.y-e,width:n.width+2*e,height:n.height+2*e});return Array.isArray(r)?r.map(t):t(r)}function HT(r,e,t){return ZR(Object.assign(HR(r),{distSquare:(n,i)=>xx(r.x1,r.y1,r.x2,r.y2,n,i)}),e,t)}function ZR(r,e,t){const n=XR(r,t),i=e.scale(n),a=e.createSub(i,n);return HH(a,e,t,(s,o)=>r.distSquare(s,o)),a}function HH(r,e,t,n){const i=t*t;for(let a=0;a<r.height;a++)for(let s=0;s<r.width;s++){const o=e.invertScaleX(r.i+s),l=e.invertScaleY(r.j+a),c=n(o,l);if(c===0){r.set(s,a,i);continue}if(c<i){const u=t-Math.sqrt(c);r.set(s,a,u*u)}}return r}function YH(r,e,t){const n=e.scale(r),i=e.addPadding(n,t),a=e.createSub(i,{x:r.x-t,y:r.y-t}),s=n.x-i.x,o=n.y-i.y,l=i.x2-n.x2,c=i.y2-n.y2,u=i.width-s-l,d=i.height-o-c,h=t*t;a.fillArea({x:s,y:o,width:u+1,height:d+1},h);const f=[0],g=Math.max(o,s,l,c);{const y=e.invertScaleX(n.x+n.width/2);for(let b=1;b<g;b++){const w=e.invertScaleY(n.y-b),E=r.distSquare(y,w);if(E<h){const _=t-Math.sqrt(E);f.push(_*_)}else break}}const p=[],v=Math.max(s,l),m=Math.max(o,l);for(let y=1;y<v;y++){const b=e.invertScaleX(n.x-y),w=[];for(let E=1;E<m;E++){const _=e.invertScaleY(n.y-E),O=r.distSquare(b,_);if(O<h){const M=t-Math.sqrt(O);w.push(M*M)}else w.push(0)}p.push(w)}for(let y=1;y<Math.min(o,f.length);y++){const b=f[y];a.fillHorizontalLine(s,o-y,u+1,b)}for(let y=1;y<Math.min(c,f.length);y++){const b=f[y];a.fillHorizontalLine(s,o+d+y,u+1,b)}for(let y=1;y<Math.min(s,f.length);y++){const b=f[y];a.fillVerticalLine(s-y,o,d+1,b)}for(let y=1;y<Math.min(c,f.length);y++){const b=f[y];a.fillVerticalLine(s+u+y,o,d+1,b)}for(let y=1;y<s;y++){const b=p[y-1],w=s-y;for(let E=1;E<o;E++)a.set(w,o-E,b[E-1]);for(let E=1;E<c;E++)a.set(w,o+d+E,b[E-1])}for(let y=1;y<l;y++){const b=p[y-1],w=s+u+y;for(let E=1;E<o;E++)a.set(w,o-E,b[E-1]);for(let E=1;E<c;E++)a.set(w,o+d+E,b[E-1])}return a}function Wt(r,e){return{x:r,y:e}}function KH(r,e,t,n){if(r.length===0)return[];const i=eY(r);return i.map((a,s)=>{const o=i.slice(0,s);return XH(e,a,o,t,n)}).flat()}function XH(r,e,t,n,i){const a=Wt(e.cx,e.cy),s=QH(a,t,r);if(s==null)return[];const o=new Fn(a.x,a.y,s.cx,s.cy),l=ZH(o,r,n,i);return JH(l,r)}function ZH(r,e,t,n){const i=[],a=[];a.push(r);let s=!0;for(let o=0;o<t&&s;o++)for(s=!1;!s&&a.length>0;){const l=a.pop(),c=JR(e,l),u=c?VH(l,c):null;if(!c||!u||u.count!==2){s||i.push(l);continue}let d=n,h=yu(c,d,u,!0),f=va(h,a)||va(h,i),g=mu(h,e);for(;!f&&g&&d>=1;)d/=1.5,h=yu(c,d,u,!0),f=va(h,a)||va(h,i),g=mu(h,e);if(h&&!f&&!g&&(a.push(new Fn(l.x1,l.y1,h.x,h.y)),a.push(new Fn(h.x,h.y,l.x2,l.y2)),s=!0),s)continue;d=n,h=yu(c,d,u,!1);let p=va(h,a)||va(h,i);for(g=mu(h,e);!p&&g&&d>=1;)d/=1.5,h=yu(c,d,u,!1),p=va(h,a)||va(h,i),g=mu(h,e);h&&!p&&(a.push(new Fn(l.x1,l.y1,h.x,h.y)),a.push(new Fn(h.x,h.y,l.x2,l.y2)),s=!0),s||i.push(l)}for(;a.length>0;)i.push(a.pop());return i}function JH(r,e){const t=[];for(;r.length>0;){const n=r.pop();if(r.length===0){t.push(n);break}const i=r.pop(),a=new Fn(n.x1,n.y1,i.x2,i.y2);JR(e,a)?(t.push(n),r.push(i)):r.push(a)}return t}function QH(r,e,t){let n=Number.POSITIVE_INFINITY;return e.reduce((i,a)=>{const s=Pa(r.x,r.y,a.cx,a.cy);if(s>n)return i;const o=new Fn(r.x,r.y,a.cx,a.cy),l=tY(t,o);return s*(l+1)*(l+1)<n&&(i=a,n=s*(l+1)*(l+1)),i},null)}function eY(r){if(r.length<2)return r;let e=0,t=0;return r.forEach(n=>{e+=n.cx,t+=n.cy}),e/=r.length,t/=r.length,r.map(n=>{const i=e-n.cx,a=t-n.cy,s=i*i+a*a;return[n,s]}).sort((n,i)=>n[1]-i[1]).map(n=>n[0])}function mu(r,e){return e.some(t=>t.containsPt(r.x,r.y))}function va(r,e){return e.some(t=>!!(UT(t.x1,t.y1,r.x,r.y,.001)||UT(t.x2,t.y2,r.x,r.y,.001)))}function JR(r,e){let t=Number.POSITIVE_INFINITY,n=null;for(const i of r){if(!KR(i,e))continue;const a=WH(i,e);a>=0&&a<t&&(n=i,t=a)}return n}function tY(r,e){return r.reduce((t,n)=>KR(n,e)&&GH(n,e)?t+1:t,0)}function yu(r,e,t,n){const i=t.top,a=t.left,s=t.bottom,o=t.right;if(n){if(a.state===ln.POINT){if(i.state===ln.POINT)return Wt(r.x-e,r.y-e);if(s.state===ln.POINT)return Wt(r.x-e,r.y2+e);const h=r.width*r.height;return r.width*((a.y-r.y+(o.y-r.y))*.5)<h*.5?a.y>o.y?Wt(r.x-e,r.y-e):Wt(r.x2+e,r.y-e):a.y<o.y?Wt(r.x-e,r.y2+e):Wt(r.x2+e,r.y2+e)}if(o.state===ln.POINT){if(i.state===ln.POINT)return Wt(r.x2+e,r.y-e);if(s.state===ln.POINT)return Wt(r.x2+e,r.y2+e)}const u=r.height*r.width;return r.height*((i.x-r.x+(o.x-r.x))*.5)<u*.5?i.x>s.x?Wt(r.x-e,r.y-e):Wt(r.x-e,r.y2+e):i.x<s.x?Wt(r.x2+e,r.y-e):Wt(r.x2+e,r.y2+e)}if(a.state===ln.POINT){if(i.state===ln.POINT)return Wt(r.x2+e,r.y2+e);if(s.state===ln.POINT)return Wt(r.x2+e,r.y-e);const u=r.height*r.width;return r.width*((a.y-r.y+(o.y-r.y))*.5)<u*.5?a.y>o.y?Wt(r.x2+e,r.y2+e):Wt(r.x-e,r.y2+e):a.y<o.y?Wt(r.x2+e,r.y-e):Wt(r.x-e,r.y-e)}if(o.state===ln.POINT){if(i.state===ln.POINT)return Wt(r.x-e,r.y2+e);if(s.state===ln.POINT)return Wt(r.x-e,r.y-e)}const l=r.height*r.width;return r.height*((i.x-r.x+(o.x-r.x))*.5)<l*.5?i.x>s.x?Wt(r.x2+e,r.y2+e):Wt(r.x2+e,r.y-e):i.x<s.x?Wt(r.x-e,r.y2+e):Wt(r.x-e,r.y-e)}function nY(r,e,t,n){if(!(r.closed?t<r.length:t<r.length-1))return!1;const a=r.get(e),s=r.get(t+1);for(let o=e+1;o<=t;o++){const l=r.get(o);if(xx(a.x,a.y,s.x,s.y,l.x,l.y)>n)return!1}return!0}function rY(r=0){return e=>{if(r<0||e.length<3)return e;const t=[];let n=0;const i=r*r;for(;n<e.length;){let a=n+1;for(;nY(e,n,a,i);)a++;t.push(e.get(n)),n=a}return new Uo(t)}}function iY(r,e){switch(r){case-2:return(((-e+3)*e-3)*e+1)/6;case-1:return((3*e-6)*e*e+4)/6;case 0:return(((-3*e+3)*e+3)*e+1)/6;case 1:return e*e*e/6;default:throw new Error("unknown error")}}function aY(r=6){function a(s,o,l){let c=0,u=0;for(let d=-2;d<=1;d++){const h=s.get(o+d),f=iY(d,l);c+=f*h.x,u+=f*h.y}return{x:c,y:u}}return s=>{if(s.length<3)return s;const o=[],l=s.closed,c=s.length+3-1+(l?0:2);o.push(a(s,2-(l?0:2),0));for(let u=2-(l?0:2);u<c;u++)for(let d=1;d<=r;d++)o.push(a(s,u,d/r));return new Uo(o)}}function sY(r=8){return e=>{let t=r,n=e.length;if(t>1)for(n=Math.floor(e.length/t);n<3&&t>1;)t-=1,n=Math.floor(e.length/t);const i=[];for(let a=0,s=0;s<n;s++,a+=t)i.push(e.get(a));return new Uo(i)}}class Uo{constructor(e=[],t=!0){this.points=e,this.closed=t}get(e){const t=e,n=this.points.length;return e<0?this.closed?this.get(e+n):this.points[0]:e>=n?this.closed?this.get(e-n):this.points[n-1]:this.points[t]}get length(){return this.points.length}toString(e=1/0){const t=this.points;if(t.length===0)return"";const n=typeof e=="function"?e:qH(e);let i="M";for(const a of t)i+=`${n(a.x)},${n(a.y)} L`;return i=i.slice(0,-1),this.closed&&(i+=" Z"),i}draw(e){const t=this.points;if(t.length!==0){e.beginPath(),e.moveTo(t[0].x,t[0].y);for(const n of t)e.lineTo(n.x,n.y);this.closed&&e.closePath()}}sample(e){return sY(e)(this)}simplify(e){return rY(e)(this)}bSplines(e){return aY(e)(this)}apply(e){return e(this)}containsElements(e){const t=UH(this.points);return t?e.every(n=>t.containsPt(n.cx,n.cy)&&this.withinArea(n.cx,n.cy)):!1}withinArea(e,t){if(this.length===0)return!1;let n=0;const i=this.points[0],a=new Fn(i.x,i.y,i.x,i.y);for(let s=1;s<this.points.length;s++){const o=this.points[s];a.x1=a.x2,a.y1=a.y2,a.x2=o.x,a.y2=o.y,a.cuts(e,t)&&n++}return a.x1=a.x2,a.y1=a.y2,a.x2=i.x,a.y2=i.y,a.cuts(e,t)&&n++,n%2===1}}class oY{constructor(e=0){this.count=0,this.arr=[],this.set=new Set,this.arr.length=e}add(e){this.set.add(`${e.x}x${e.y}`),this.arr[this.count++]=e}contains(e){return this.set.has(`${e.x}x${e.y}`)}isFirst(e){if(this.count===0)return!1;const t=this.arr[0];return t!=null&&t.x===e.x&&t.y===e.y}path(){return new Uo(this.arr.slice(0,this.count))}clear(){this.set.clear(),this.count=0}get(e){return this.arr[e]}get length(){return this.count}}const al=0,bu=1,xu=2,Ny=3;function lY(r,e){const t=(Math.floor(r.width)+Math.floor(r.height))*2,n=new oY(t);function i(l,c,u,d){const h=r.get(l,c);return Number.isNaN(h)?Number.NaN:h>e?u+d:u}function a(l,c){let u=al;return u=i(l,c,u,1),u=i(l+1,c,u,2),u=i(l,c+1,u,4),u=i(l+1,c+1,u,8),Number.isNaN(u)?-1:u}let s=bu;function o(l,c){let u=l,d=c,h=r.invertScaleX(u),f=r.invertScaleY(d);for(let g=0;g<r.width*r.height;g++){const p={x:h,y:f};if(n.contains(p)){if(n.isFirst(p))return!0}else n.add(p);const v=a(u,d);switch(v){case-1:return!0;case 0:case 3:case 2:case 7:s=xu;break;case 12:case 14:case 4:s=Ny;break;case 6:s=s===al?Ny:xu;break;case 1:case 13:case 5:s=al;break;case 9:s=s===xu?al:bu;break;case 10:case 8:case 11:s=bu;break;default:return console.warn("Marching squares invalid state: "+v),!0}switch(s){case al:d--,f-=r.pixelGroup;break;case bu:d++,f+=r.pixelGroup;break;case Ny:u--,h-=r.pixelGroup;break;case xu:u++,h+=r.pixelGroup;break;default:return console.warn("Marching squares invalid state: "+v),!0}}return!0}for(let l=0;l<r.width;l++)for(let c=0;c<r.height;c++){if(r.get(l,c)<=e)continue;const u=a(l,c);if(!(u<0||u===15)&&o(l,c))return n.path()}return null}const Sh={maxRoutingIterations:100,maxMarchingIterations:20,pixelGroup:4,edgeR0:10,edgeR1:20,nodeR0:15,nodeR1:50,morphBuffer:10,threshold:1,memberInfluenceFactor:1,edgeInfluenceFactor:1,nonMemberInfluenceFactor:-.8,virtualEdges:!0};function Ol(r){return r!=null&&typeof r.radius=="number"}function YT(r,e){if(Ol(r)!==Ol(e))return!1;if(Ol(r)){const n=e;return r.cx===n.cx&&r.cy===n.cy&&r.radius===n.radius}const t=e;return r.x===t.x&&r.y===t.y&&r.width===t.width&&r.height===t.height}var ni;(function(r){r[r.MEMBERS=0]="MEMBERS",r[r.NON_MEMBERS=1]="NON_MEMBERS",r[r.EDGES=2]="EDGES"})(ni||(ni={}));let KT=class{constructor(e={}){this.dirty=new Set,this.members=[],this.nonMembers=[],this.virtualEdges=[],this.edges=[],this.activeRegion=new tr(0,0,0,0),this.potentialArea=new ms(1,0,0,0,0,0,0),this.o=Object.assign({},Sh,e)}pushMember(...e){if(e.length!==0){this.dirty.add(ni.MEMBERS);for(const t of e)this.members.push({raw:t,obj:Ol(t)?pd.from(t):tr.from(t),area:null})}}removeMember(e){const t=this.members.findIndex(n=>YT(n.raw,e));return t<0?!1:(this.members.splice(t,1),this.dirty.add(ni.MEMBERS),!0)}removeNonMember(e){const t=this.nonMembers.findIndex(n=>YT(n.raw,e));return t<0?!1:(this.nonMembers.splice(t,1),this.dirty.add(ni.NON_MEMBERS),!0)}removeEdge(e){const t=this.edges.findIndex(n=>n.obj.equals(e));return t<0?!1:(this.edges.splice(t,1),this.dirty.add(ni.NON_MEMBERS),!0)}pushNonMember(...e){if(e.length!==0){this.dirty.add(ni.NON_MEMBERS);for(const t of e)this.nonMembers.push({raw:t,obj:Ol(t)?pd.from(t):tr.from(t),area:null})}}pushEdge(...e){if(e.length!==0){this.dirty.add(ni.EDGES);for(const t of e)this.edges.push({raw:t,obj:Fn.from(t),area:null})}}update(){const e=this.dirty.has(ni.MEMBERS),t=this.dirty.has(ni.NON_MEMBERS);let n=this.dirty.has(ni.EDGES);this.dirty.clear();const i=this.members.map(c=>c.obj);if(this.o.virtualEdges&&(e||t)){const c=this.nonMembers.map(h=>h.obj),u=KH(i,c,this.o.maxRoutingIterations,this.o.morphBuffer),d=new Map(this.virtualEdges.map(h=>[h.obj.toString(),h.area]));this.virtualEdges=u.map(h=>{var f;return{raw:h,obj:h,area:(f=d.get(h.toString()))!==null&&f!==void 0?f:null}}),n=!0}let a=!1;if(e||n){const c=this.virtualEdges.concat(this.edges).map(f=>f.obj),u=uY(i,c),d=Math.max(this.o.edgeR1,this.o.nodeR1)+this.o.morphBuffer,h=tr.from(XR(u,d));h.equals(this.activeRegion)||(a=!0,this.activeRegion=h)}if(a){const c=Math.ceil(this.activeRegion.width/this.o.pixelGroup),u=Math.ceil(this.activeRegion.height/this.o.pixelGroup);this.activeRegion.x!==this.potentialArea.pixelX||this.activeRegion.y!==this.potentialArea.pixelY?(this.potentialArea=ms.fromPixelRegion(this.activeRegion,this.o.pixelGroup),this.members.forEach(d=>d.area=null),this.nonMembers.forEach(d=>d.area=null),this.edges.forEach(d=>d.area=null),this.virtualEdges.forEach(d=>d.area=null)):(c!==this.potentialArea.width||u!==this.potentialArea.height)&&(this.potentialArea=ms.fromPixelRegion(this.activeRegion,this.o.pixelGroup))}const s=new Map,o=c=>{if(c.area){const u=`${c.obj.width}x${c.obj.height}x${c.obj instanceof tr?"R":"C"}`;s.set(u,c.area)}},l=c=>{if(c.area)return;const u=`${c.obj.width}x${c.obj.height}x${c.obj instanceof tr?"R":"C"}`;if(s.has(u)){const h=s.get(u);c.area=this.potentialArea.copy(h,{x:c.obj.x-this.o.nodeR1,y:c.obj.y-this.o.nodeR1});return}const d=c.obj instanceof tr?YH(c.obj,this.potentialArea,this.o.nodeR1):ZR(c.obj,this.potentialArea,this.o.nodeR1);c.area=d,s.set(u,d)};this.members.forEach(o),this.nonMembers.forEach(o),this.members.forEach(l),this.nonMembers.forEach(c=>{this.activeRegion.intersects(c.obj)?l(c):c.area=null}),this.edges.forEach(c=>{c.area||(c.area=HT(c.obj,this.potentialArea,this.o.edgeR1))}),this.virtualEdges.forEach(c=>{c.area||(c.area=HT(c.obj,this.potentialArea,this.o.edgeR1))})}drawMembers(e){for(const t of this.members)t.obj.draw(e)}drawNonMembers(e){for(const t of this.nonMembers)t.obj.draw(e)}drawEdges(e){for(const t of this.edges)t.obj.draw(e)}drawPotentialArea(e,t=!0){this.potentialArea.draw(e,t)}compute(){if(this.members.length===0)return new Uo([]);this.dirty.size>0&&this.update();const{o:e,potentialArea:t}=this,n=this.members.map(o=>o.area),i=this.virtualEdges.concat(this.edges).map(o=>o.area),a=this.nonMembers.filter(o=>o.area!=null).map(o=>o.area),s=this.members.map(o=>o.obj);return cY(t,n,i,a,o=>o.containsElements(s),e)}};function cY(r,e,t,n,i,a={}){const s=Object.assign({},Sh,a);let o=s.threshold,l=s.memberInfluenceFactor,c=s.edgeInfluenceFactor,u=s.nonMemberInfluenceFactor;const d=(s.nodeR0-s.nodeR1)*(s.nodeR0-s.nodeR1),h=(s.edgeR0-s.edgeR1)*(s.edgeR0-s.edgeR1);for(let f=0;f<s.maxMarchingIterations;f++){if(r.clear(),l!==0){const p=l/d;for(const v of e)r.incArea(v,p)}if(c!==0){const p=c/h;for(const v of t)r.incArea(v,p)}if(u!==0){const p=u/d;for(const v of n)r.incArea(v,p)}const g=lY(r,o);if(g&&i(g))return g;if(o*=.95,f<=s.maxMarchingIterations*.5)l*=1.2,c*=1.2;else if(u!==0&&n.length>0)u*=.8;else break}return new Uo([])}function uY(r,e){if(r.length===0)return new tr(0,0,0,0);const t=tr.from(r[0]);for(const n of r)t.add(n);for(const n of e)t.add(HR(n));return t}var dY=function(r,e){var t={};for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&e.indexOf(n)<0&&(t[n]=r[n]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(r);i<n.length;i++)e.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(r,n[i])&&(t[n[i]]=r[n[i]]);return t};class _h extends Zn{constructor(e,t){super(e,hr({},_h.defaultOptions,t)),this.members=new Map,this.avoidMembers=new Map,this.bubbleSetOptions={},this.drawBubbleSets=()=>{const{style:n,bubbleSetOptions:i}=this.parseOptions();sn(this.bubbleSetOptions,i)||this.init(),this.bubbleSetOptions=Object.assign({},i);const a=Object.assign(Object.assign({},n),{d:this.getPath()});this.shape?this.shape.update(a):(this.shape=new hc({style:a}),this.context.canvas.appendChild(this.shape))},this.updateBubbleSetsPath=n=>{if(!this.shape)return;const i=te(n.data);[...this.options.members,...this.options.avoidMembers].includes(i)&&this.shape.update(Object.assign(Object.assign({},this.parseOptions().style),{d:this.getPath(i)}))},this.getPath=n=>{const{graph:i}=this.context,a=this.options.members,s=[...this.members.keys()],o=this.options.avoidMembers,l=[...this.avoidMembers.keys()];if(!n&&sn(a,s)&&sn(o,l))return this.path;const{enter:c=[],exit:u=[]}=Ia(s,a,v=>v),{enter:d=[],exit:h=[]}=Ia(l,o,v=>v);n&&(u.push(n),c.push(n));const f=(v,m,y)=>{v.forEach(b=>{const w=y?this.members:this.avoidMembers,E=y?"pushMember":"pushNonMember",_=y?"removeMember":"removeNonMember";if(m){let O;i.getElementType(b)==="edge"?([O]=fY(i,b),this.bubbleSets.pushEdge(O)):([O]=hY(i,b),this.bubbleSets[E](O)),w.set(b,O)}else{const O=w.get(b);O&&(i.getElementType(b)==="edge"?this.bubbleSets.removeEdge(O):this.bubbleSets[_](O),w.delete(b))}})};f(u,!1,!0),f(c,!0,!0),f(h,!1,!1),f(d,!0,!1);const p=this.bubbleSets.compute().sample(8).simplify(0).bSplines().simplify(0);return this.path=DA(p.points.map(Un)),this.path},this.bindEvents(),this.bubbleSets=new KT(this.options)}bindEvents(){this.context.graph.on(we.AFTER_RENDER,this.drawBubbleSets),this.context.graph.on(we.AFTER_ELEMENT_UPDATE,this.updateBubbleSetsPath)}init(){this.bubbleSets=new KT(this.options),this.members=new Map,this.avoidMembers=new Map}parseOptions(){const e=this.options,{type:t,key:n,members:i,avoidMembers:a}=e,s=dY(e,["type","key","members","avoidMembers"]),o=Object.keys(s).reduce((l,c)=>(c in Sh?l.bubbleSetOptions[c]=s[c]:l.style[c]=s[c],l),{style:{},bubbleSetOptions:{}});return Object.assign({type:t,key:n,members:i,avoidMembers:a},o)}addMember(e){const t=Array.isArray(e)?e:[e];t.some(n=>this.options.avoidMembers.includes(n))&&(this.options.avoidMembers=this.options.avoidMembers.filter(n=>!t.includes(n))),this.options.members=[...new Set([...this.options.members,...t])],this.drawBubbleSets()}removeMember(e){const t=Array.isArray(e)?e:[e];this.options.members=this.options.members.filter(n=>!t.includes(n)),this.drawBubbleSets()}updateMember(e){this.options.members=Ie(e)?e(this.options.members):e,this.drawBubbleSets()}getMember(){return this.options.members}addAvoidMember(e){const t=Array.isArray(e)?e:[e];t.some(n=>this.options.members.includes(n))&&(this.options.members=this.options.members.filter(n=>!t.includes(n))),this.options.avoidMembers=[...new Set([...this.options.avoidMembers,...t])],this.drawBubbleSets()}removeAvoidMember(e){const t=Array.isArray(e)?e:[e];this.options.avoidMembers.some(n=>t.includes(n))&&(this.options.avoidMembers=this.options.avoidMembers.filter(n=>!t.includes(n)),this.drawBubbleSets())}updateAvoidMember(e){this.options.avoidMembers=Array.isArray(e)?e:[e],this.drawBubbleSets()}getAvoidMember(){return this.options.avoidMembers}destroy(){this.context.graph.off(we.AFTER_RENDER,this.drawBubbleSets),this.context.graph.off(we.AFTER_ELEMENT_UPDATE,this.updateBubbleSetsPath),this.shape.destroy(),super.destroy()}}_h.defaultOptions=Object.assign({members:[],avoidMembers:[],fill:"lightblue",fillOpacity:.2,stroke:"blue",strokeOpacity:.2},Sh);const hY=(r,e)=>(Array.isArray(e)?e:[e]).map(n=>{const i=r.getElementRenderBounds(n);return new tr(i.min[0],i.min[1],Bi(i),zi(i))}),fY=(r,e)=>(Array.isArray(e)?e:[e]).map(n=>{const i=r.getEdgeData(n),a=r.getElementPosition(i.source),s=r.getElementPosition(i.target);return Fn.from({x1:a[0],y1:a[1],x2:s[0],y2:s[1]})});function gY(r){return`
344
344
  <ul class="g6-contextmenu-ul">
345
345
  ${r.map(e=>`<li class="g6-contextmenu-li" value="${e.value}">${e.name}</li>`).join("")}
@@ -482,4 +482,4 @@ YYYY`):pr(t,"MM月");case"year":return pr(t,"YYYY");default:return pr(t,"YYYY-MM
482
482
  #fff 50%,
483
483
  #fff 100%
484
484
  )`,"background-position-y":"1.5px"}},null,-1))],4),[[pC,n.imgHover]])]))}}),AQ={key:0,flex:"","flex-col":"",relative:"","h-full":"","p-2px":"","box-border":"","overflow-hidden":""},PQ=["src"],RQ={"pointer-events-none":"",absolute:"","left-2px":"","top-2px":"",size:"[calc(100%-4px)]"},LQ={absolute:"","z-4":"","pointer-events-none":"","left-0":"","top-0":"","text-12px":"",leading:"100%",flex:"","gap-4px":""},IQ={"p-1px":"",bg:"#ffffff70"},DQ={"p-1px":"",bg:"#ffffff70"},FQ=pt({__name:"ScreenshotCard",setup(r){const e=$s(),{updatePosition:t}=e,n=Ns(e),{focusNode:i,screenshotUrl:a}=n,s=$e(()=>e.snapshot),o=Tt(),l=Tt(!1),c=b=>{const w=o.value;if(!w)return;const E=w.getBoundingClientRect(),_=E.width/w.naturalWidth*w.naturalHeight,O=(E.height-_)/2,M=(b.clientX-E.left)/E.width*w.naturalWidth,N=(b.clientY-E.top-O)/_*w.naturalHeight;t({x:M,y:N})},u=b=>`${b*100}%`,d=q3(o),h=$e(()=>{var M;const b=o.value,w=(M=i.value)==null?void 0:M.attr;if(!i.value||!b||!w||!l.value)return"";const E=d.width.value,_=d.height.value,O=E/b.naturalWidth*b.naturalHeight;return{left:`calc(${u(w.left/b.naturalWidth)} - 2px)`,width:`calc(${u((w.right-w.left)/b.naturalWidth)} + 2px)`,top:`calc(${u((w.top/b.naturalHeight*O+(_-O)/2)/_)} - 2px)`,height:`calc(${u((w.bottom-w.top)/b.naturalHeight*O/_)} + 2px)`}}),f=Tt(!1),g=Tt({ox:0,oy:0}),p=$e(()=>{var _;const b=(_=i.value)==null?void 0:_.attr;if(!b)return;const{ox:w,oy:E}=g.value;return{left:w-b.left,right:b.right-w,top:E-b.top,bottom:b.bottom-E}}),v=$e(()=>{var M;if(!((M=i.value)==null?void 0:M.attr)||!p.value)return;const{bottom:w,left:E,right:_,top:O}=p.value;return{left:(E/(_+E)).toFixed(3),right:(_/(_+E)).toFixed(3),top:(O/(O+w)).toFixed(3),bottom:(w/(O+w)).toFixed(3)}}),m=Tt({left:"0",top:"0"}),y=b=>{const w=o.value;if(!w)return;const E=w.getBoundingClientRect(),_=E.width/w.naturalWidth*w.naturalHeight,O=(E.height-_)/2,M=(b.clientX-E.left)/E.width*w.naturalWidth,N=(b.clientY-E.top-O)/_*w.naturalHeight;g.value={ox:M,oy:N},m.value={left:-(M-.1*w.naturalWidth)/w.naturalWidth*1e3+"px",top:-(N-.1*w.naturalWidth)/w.naturalWidth*1e3+"px"}};return(b,w)=>se(a)?(We(),jt("div",AQ,[Le("img",{ref_key:"imgRef",ref:o,src:se(a),onClick:c,"cursor-crosshair":"","object-contain":"","h-full":"",class:"max-w-[calc(var(--gkd-w)*0.35)]",onMouseover:w[0]||(w[0]=E=>f.value=!0),onMouseleave:w[1]||(w[1]=E=>f.value=!1),onMousemove:y,onLoad:w[2]||(w[2]=E=>l.value=!0)},null,40,PQ),Le("div",RQ,[Le("div",{style:Ri(se(h)),absolute:"","transition-all-300":"","b-1px":"","b-blue":"","b-solid":""},w[3]||(w[3]=[Le("div",{absolute:"","left-0":"","top-0":"","bottom-0":"","right-0":"","b-solid":"","b-1px":"","b-red":""},null,-1)]),4)]),Le("div",LQ,[Le("div",IQ,vt(`${se(s).screenWidth}x${se(s).screenHeight}`),1),Le("div",DQ,vt(se(kC)(se(s).id).format("YYYY-MM-DD HH:mm:ss")),1)]),se(o)?(We(),rn(NQ,{key:0,imgHover:se(f),imgRef:se(o),boxHoverPerPosition:se(v),boxHoverPosition:se(p),hoverPositionStyle:se(m),hoverPosition:se(g),screenshotUrl:se(a)},null,8,["imgHover","imgRef","boxHoverPerPosition","boxHoverPosition","hoverPositionStyle","hoverPosition","screenshotUrl"])):Nn("",!0)])):Nn("",!0)}}),BQ={"bg-white":"","b-1px":"","b-solid":"","b-gray-200":"","rounded-4px":"","p-8px":""},zQ={flex:"","m-b-4px":"","pr-4px":""},jQ={key:0,underline:"","leading-20px":"","decoration-1":"","m-r-4px":"",gkd_code:"",title:"查询数量"},$Q=["title"],qQ={flex:"","gap-8px":"","flex-wrap":""},GQ=pt({__name:"SearchCard",props:{show:{type:Boolean},onUpdateShow:{type:Function,default:So}},setup(r){const e=wC(),{snapshotImportId:t,snapshotImageId:n}=SC(),i=$s(),{updateFocusNode:a}=i,s=Ns(i),o=s.snapshot,l=s.rootNode,{focusNode:c}=s,u=Tt(""),d=gb([]),h=Tt([]),f=E=>{const _=lI(()=>Mu(E),M=>typeof M=="string"?M:M instanceof i3?"非法选择器:"+M.outMessage:"非法选择器:"+(M instanceof Error?M.message:M));if(d.find(M=>typeof M.selector=="object"&&M.selector.toString()==_.toString())){xa.warning("不可重复选择");return}const O=_.querySelectorAllContext(l.value);if(O.length==0){xa.success("没有选择到节点");return}return xa.success(`选择到 ${O.length} 个节点`),d.unshift({selector:_,nodes:O.map(M=>M.target),results:O,key:Date.now(),gkd:!0}),O.length},g=E=>{if(d.find(M=>typeof M.selector=="string"&&M.selector.toString()==E)){xa.warning("不可重复搜索");return}const _=[],O=[l.value];for(;O.length>0;){const M=O.pop();po(M).includes(E)&&_.push(M),O.push(...[...M.children].reverse())}if(_.length==0){xa.success("没有搜索到节点");return}return xa.success(`搜索到 ${_.length} 个节点`),d.unshift({gkd:!1,selector:E,nodes:_,key:Date.now()}),_.length},p=()=>{const E=d[0],_=E.nodes[0];Array.isArray(_)?typeof E.selector=="object"&&a(_):a(_);const O=new Set(d.map(N=>N.key)),M=h.value.filter(N=>O.has(N));M.push(E.key),h.value=M},v=Jx(()=>{const E=u.value.trim();if(E){if(y.value){if(!f(E))return}else if(!g(E))return;p()}});xd(async()=>{await r3;let E=0;e.query.gkd&&(E+=f(jx.decode(e.query.gkd))||0),e.query.str&&(E+=g(e.query.str)||0),E>0&&p()});const m=Jx(async E=>{var G,H,Y;const _=n[o.value.id],O=t[o.value.id],M=O?Ux(O):void 0,N=_?W3(_):void 0,A=E.selector,P=E.nodes[0],L=[((G=P.quickFind)!=null?G:P.idQf)&&P.attr.id&&A.fastQueryList.some(W=>W instanceof nf.Id&&W.value===P.attr.id),((H=P.quickFind)!=null?H:P.idQf)&&P.attr.vid&&A.fastQueryList.some(W=>W instanceof nf.Vid&&W.value===P.attr.vid),((Y=P.quickFind)!=null?Y:P.textQf)&&P.attr.text&&A.fastQueryList.some(W=>W instanceof nf.Text&&W.value===P.attr.text)].some(Boolean),I={id:o.value.appId,name:Ei(o.value).name,groups:[{key:1,name:`[ChangeMe]规则名称-${kC().format("YYYY-MM-DD HH:mm:ss")}`,desc:"[ChangeMe]本规则由GKD网页端审查工具生成",rules:[{fastQuery:L||void 0,activityIds:o.value.activityId,matches:A.toString(),exampleUrls:N,snapshotUrls:M}]}]};_i(MC.stringify(I,void 0,2))}),y=Tt(!0),b=$e(()=>t[o.value.id]),w=E=>{if(!b.value)return;const _=new URL(Ux(t[o.value.id]));typeof E.selector=="object"?_.searchParams.set("gkd",jx.encode(E.selector.toString())):_.searchParams.set("str",E.selector.toString()),_i(_.toString())};return(E,_)=>{const O=sI,M=_C,N=aI,A=bs("SvgIcon"),P=Io,L=TC,I=oI,G=_I,H=lb,Y=vb,W=PI,q=CI;return We(),rn(Zh,{initialValue:{top:40,right:Math.max(315,12*se(qL)+135),width:Math.max(480,se(GL)*.3)},minWidth:300,sizeDraggable:"",class:"box-shadow-dim",show:E.show},{default:xe(({onRef:Q})=>[Le("div",BQ,[Le("div",zQ,[Ee(N,{value:se(y),"onUpdate:value":_[0]||(_[0]=re=>mo(y)?y.value=re:null)},{default:xe(()=>[Ee(M,null,{default:xe(()=>[Ee(O,{value:!1},{default:xe(()=>_[4]||(_[4]=[zt(" 字符搜索 ")])),_:1}),Ee(O,{value:!0},{default:xe(()=>_[5]||(_[5]=[zt(" 选择器查询 ")])),_:1})]),_:1})]),_:1},8,["value"]),Le("div",{"flex-1":"","cursor-move":"",ref:Q},null,512),Ee(P,{onClick:_[1]||(_[1]=re=>E.onUpdateShow(!E.show)),text:"",title:"最小化"},{icon:xe(()=>[Ee(A,{name:"minus"})]),_:1})]),Ee(I,null,{default:xe(()=>[Ee(L,{value:se(u),"onUpdate:value":_[2]||(_[2]=re=>mo(u)?u.value=re:null),placeholder:se(y)?"请输入选择器":"请输入字符",onKeyup:G3(se(v),["enter"]),inputProps:{class:"gkd_code"}},null,8,["value","placeholder","onKeyup"]),Ee(P,{onClick:se(v)},{icon:xe(()=>[Ee(A,{name:"search"})]),_:1},8,["onClick"])]),_:1}),_[8]||(_[8]=Le("div",{"p-5px":""},null,-1)),Ee(q,{expandedNames:se(h),"onUpdate:expandedNames":_[3]||(_[3]=re=>mo(h)?h.value=re:null)},{default:xe(()=>[(We(!0),jt(oi,null,ds(se(d),(re,de)=>(We(),rn(W,{key:re.key,name:re.key},{header:xe(()=>[re.nodes.length>1?(We(),jt("span",jQ,vt(re.nodes.length),1)):Nn("",!0),Le("span",{"break-all":"","px-4px":"","leading-20px":"",bg:"#eee",gkd_code:"",title:re.gkd?"选择器":"搜索字符"},[re.gkd?(We(),rn(ku,{key:0,node:re.selector.ast,source:re.selector.source},null,8,["node","source"])):(We(),jt(oi,{key:1},[zt(vt(re.selector),1)],64))],8,$Q),_[6]||(_[6]=Le("span",{"pl-4px":""},null,-1))]),"header-extra":xe(()=>[Ee(G,null,{default:xe(()=>[re.gkd&&re.selector.canCopy?(We(),rn(P,{key:0,size:"small",onClick:lf(oe=>se(m)(re),["stop"]),title:"复制规则"},{icon:xe(()=>[Ee(A,{name:"copy"})]),_:2},1032,["onClick"])):Nn("",!0),se(b)?(We(),rn(P,{key:1,size:"small",title:re.gkd?"复制查询链接":"复制搜索链接",onClick:lf(oe=>w(re),["stop"])},{icon:xe(()=>[Ee(A,{name:"share"})]),_:2},1032,["title","onClick"])):Nn("",!0),Ee(P,{size:"small",onClick:lf(oe=>se(d).splice(de,1),["stop"]),title:"删除记录"},{icon:xe(()=>[Ee(A,{name:"delete"})]),_:2},1032,["onClick"])]),_:2},1024)]),default:xe(()=>[Ee(Y,{xScrollable:"",style:{"max-height":"400px"}},{default:xe(()=>[Le("div",qQ,[!re.gkd||re.selector.connectKeys.length===0?(We(!0),jt(oi,{key:0},ds(re.nodes,oe=>(We(),rn(P,{key:oe.id,onClick:he=>se(a)(oe),size:"small",style:Ri(se(Pl)(oe,se(c)))},{default:xe(()=>[zt(vt(se(po)(oe)),1)]),_:2},1032,["onClick","style"]))),128)):(We(!0),jt(oi,{key:1},ds(re.nodes,(oe,he)=>(We(),rn(G,{key:he},{default:xe(()=>[Ee(P,{size:"small",onClick:X=>se(i).showTrack(re.selector,re.results[he])},{default:xe(()=>[Ee(H,null,{default:xe(()=>[Ee(A,{name:"path"})]),_:1})]),_:2},1032,["onClick"]),Ee(P,{onClick:X=>se(a)(oe),size:"small",style:Ri(se(Pl)(oe,se(c)))},{default:xe(()=>[zt(vt(se(po)(oe)),1)]),_:2},1032,["onClick","style"])]),_:2},1024))),128))]),_[7]||(_[7]=Le("div",{un:"h-10px"},null,-1))]),_:2},1024)]),_:2},1032,["name"]))),128))]),_:1},8,["expandedNames"])])]),_:1},8,["initialValue","show"])}}}),hC=[],WQ=pt((r,e)=>{const t=$e(()=>r.tag||"div");return()=>{var a,s,o,l;const n=(((s=(a=e.slots).default)==null?void 0:s.call(a))||hC).filter(c=>typeof c.type!="symbol"),i=[];if(n.length>0&&i.push(n[0]),n.length>1)for(let c=1;c<n.length;c++){const u=((l=(o=e.slots).gap)==null?void 0:l.call(o,{index:c-1}))||hC;i.push(...u),i.push(n[c])}return r.virtual?i:ze(t.value,r,i)}},{props:["tag","virtual"]}),VQ={flex:"","flex-col":"","overflow-hidden":""},UQ={flex:"","items-center":"","px-8px":""},HQ={flex:"","items-center":"","gap-2px":"","max-w-120px":""},YQ=pt({__name:"WindowCard",setup(r){const e=EC(),t=$s(),{updateFocusNode:n}=t,i=Ns(t),a=i.snapshot,s=i.rootNode,{focusNode:o,focusTime:l}=i;let c=Number.NaN;const u=Tt([]),d=Tt([]);Mi([()=>o.value,()=>l.value],async()=>{if(!o.value)return;const w=o.value.id;co().then(async()=>{var O;if(await Hx(300),w===((O=o.value)==null?void 0:O.id)){if(c===w){c=Number.NaN;return}const M=document.querySelector(`[data-node-id="${w}"]`);if(!M)return;d.value=[w],M.scrollIntoView({behavior:"smooth",block:"center"})}});let E=o.value.parent;if(!E)return;const _=new Set(u.value);for(;E;)_.add(E.id),E=E.parent;_.size==u.value.length&&u.value.every(O=>_.has(O))||(u.value=[..._])});const h=Tt(),f=(w,E)=>{var _;return E.id===((_=o.value)==null?void 0:_.id)},g=w=>{const E=Pl(w.option,o.value);return{onClick:()=>{c=w.option.id,n(w.option)},style:{"--n-node-text-color":E.color,...E},class:"whitespace-nowrap","data-node-id":String(w.option.id)}},p=w=>po(w.option),v=$e(()=>`${$x(a.value).manufacturer} Android ${$x(a.value).release||""}`),m=$e(()=>Ei(a.value).isSystem),y=$e(()=>{const w=a.value.activityId,E=a.value.appId;return!w||!E?"":w.startsWith(E)&&w[E.length]==="."?w.substring(E.length):w}),b=async()=>{xa.success("删除成功,即将回到首页"),await Hx(2e3),e.replace({path:"/"})};return(w,E)=>{const _=ob,O=bs("SvgIcon"),M=iD,N=vb;return We(),jt("div",VQ,[Le("div",UQ,[Ee(se(WQ),{flex:"","flex-wrap":"","items-center":"","gap-8px":"",gkd_code:""},{gap:xe(()=>E[8]||(E[8]=[Le("div",{"w-1px":"","bg-gray":"","h-12px":""},null,-1)])),default:xe(()=>[Ee(_,null,{trigger:xe(()=>[Le("div",{onClick:E[0]||(E[0]=A=>se(_i)(se(v)))},vt(se(v)),1)]),default:xe(()=>[E[9]||(E[9]=zt(" 设备名称 "))]),_:1}),Ee(_,null,{trigger:xe(()=>[Le("div",{class:Ll({"opacity-50":!se(qx)(se(a)).versionName})},vt(se(qx)(se(a)).versionName||"null"),3)]),default:xe(()=>[E[10]||(E[10]=zt(" GKD 版本 "))]),_:1}),Le("div",HQ,[se(m)?(We(),rn(_,{key:0},{trigger:xe(()=>[Ee(O,{name:"system"})]),default:xe(()=>[zt(" "+vt(`${se(Ei)(se(a)).name} 是一个系统应用`),1)]),_:1})):Nn("",!0),Ee(_,null,{trigger:xe(()=>[Le("div",{onClick:E[1]||(E[1]=A=>se(_i)(se(Ei)(se(a)).name))},vt(se(Ei)(se(a)).name),1)]),default:xe(()=>[E[11]||(E[11]=zt(" 应用名称 "))]),_:1})]),Ee(_,null,{trigger:xe(()=>[Le("div",{onClick:E[2]||(E[2]=A=>se(_i)(se(Ei)(se(a)).versionName))},vt(se(Ei)(se(a)).versionName),1)]),default:xe(()=>[E[12]||(E[12]=zt(" 版本名称 "))]),_:1}),Ee(_,null,{trigger:xe(()=>[Le("div",{onClick:E[3]||(E[3]=A=>se(_i)(se(Ei)(se(a)).versionCode.toString()))},vt(se(Ei)(se(a)).versionCode),1)]),default:xe(()=>[E[13]||(E[13]=zt(" 版本代码 "))]),_:1}),Ee(_,null,{trigger:xe(()=>[Le("div",{onClick:E[4]||(E[4]=A=>se(_i)(se(a).appId))},vt(se(a).appId),1)]),default:xe(()=>[E[14]||(E[14]=zt(" 应用ID "))]),_:1}),Ee(_,null,{trigger:xe(()=>[Le("div",{onClick:E[5]||(E[5]=A=>se(_i)(se(y))),class:Ll({"opacity-50":!se(y)})},vt(se(y)||"null"),3)]),default:xe(()=>[E[15]||(E[15]=zt(" 界面ID "))]),_:1})]),_:1}),E[16]||(E[16]=Le("div",{"flex-1":""},null,-1)),Ee(K3,{class:"ml-8px",snapshot:se(a),onDelete:b,showPreview:!1},null,8,["snapshot"])]),E[17]||(E[17]=Le("div",{"h-1px":"","mt-4px":"",bg:"#efeff5"},null,-1)),Ee(N,{xScrollable:"",class:"flex-1"},{default:xe(()=>[Ee(M,{class:"mb-24px mr-24px",ref_key:"treeRef",ref:h,virtualScroll:"",showLine:"",blockLine:"",keyField:"id",expandedKeys:se(u),"onUpdate:expandedKeys":E[6]||(E[6]=A=>mo(u)?u.value=A:null),selectedKeys:se(d),"onUpdate:selectedKeys":E[7]||(E[7]=A=>mo(d)?d.value=A:null),data:[se(s)],filter:f,nodeProps:g,renderLabel:p},null,8,["expandedKeys","selectedKeys","data","filter","nodeProps","renderLabel"])]),_:1})])}}}),KQ={"h-full":"",flex:"","gap-5px":""},XQ={"w-28px":"","py-8px":"",flex:"","flex-col":"","gap-16px":""},ZQ={flex:"","justify-center":"",href:"https://gkd.li/guide/snapshot#share-note",target:"_blank",rel:"noopener noreferrer"},JQ={key:1,flex:"","justify-center":"","pt-80px":""},fee=pt({__name:"SnapshotPage",setup(r){const e=$s(),t=Ns(e),{snapshot:n,rootNode:i,loading:a,redirected:s,trackData:o,trackShow:l}=t;ii(()=>{a.value?Yx.start():Yx.finish()});const c=cf("searchShow",!0,sessionStorage),u=cf("ruleShow",!1,sessionStorage),d=cf("attrShow",!0,sessionStorage),h=()=>{xa.info("暂未实现")};return(f,g)=>{const p=bs("SvgIcon"),v=lb,m=bs("RouterLink"),y=Io,b=ob;return se(n)&&se(i)?(We(),jt(oi,{key:0},[Le("div",KQ,[Le("div",XQ,[Ee(b,{placement:"right"},{trigger:xe(()=>[Ee(y,{text:""},{icon:xe(()=>[Ee(m,{to:"/",title:"",color:"inherit"},{default:xe(()=>[Ee(v,{size:"24"},{default:xe(()=>[Ee(p,{name:"home"})]),_:1})]),_:1})]),_:1})]),default:xe(()=>[g[8]||(g[8]=zt(" 回到首页 "))]),_:1}),Ee(b,{placement:"right"},{trigger:xe(()=>[Ee(y,{onClick:h,text:""},{icon:xe(()=>[Ee(v,{size:"24"},{default:xe(()=>[Ee(p,{name:"settings"})]),_:1})]),_:1})]),default:xe(()=>[g[9]||(g[9]=zt(" 设置 "))]),_:1}),g[14]||(g[14]=Le("div",null,null,-1)),Ee(b,{placement:"right"},{trigger:xe(()=>[Ee(y,{text:"",onClick:g[0]||(g[0]=w=>c.value=!se(c))},{icon:xe(()=>[Ee(v,{size:"24"},{default:xe(()=>[Ee(p,{name:"search-list"})]),_:1})]),_:1})]),default:xe(()=>[g[10]||(g[10]=zt(" 搜索面板 "))]),_:1}),Ee(b,{placement:"right"},{trigger:xe(()=>[Ee(y,{onClick:g[1]||(g[1]=w=>d.value=!se(d)),text:""},{icon:xe(()=>[Ee(v,{size:"24"},{default:xe(()=>[Ee(p,{name:"prop"})]),_:1})]),_:1})]),default:xe(()=>[g[11]||(g[11]=zt(" 属性面板 "))]),_:1}),Ee(b,{placement:"right"},{trigger:xe(()=>[Ee(y,{onClick:g[2]||(g[2]=w=>u.value=!se(u)),text:""},{icon:xe(()=>[Ee(v,{size:"24"},{default:xe(()=>[Ee(p,{name:"test"})]),_:1})]),_:1})]),default:xe(()=>[g[12]||(g[12]=zt(" 测试规则 "))]),_:1}),g[15]||(g[15]=Le("div",null,null,-1)),Ee(b,{placement:"right"},{trigger:xe(()=>[Le("a",ZQ,[Ee(y,{text:""},{icon:xe(()=>[Ee(v,{size:"24"},{default:xe(()=>[Ee(p,{name:"warn"})]),_:1})]),_:1})])]),default:xe(()=>[g[13]||(g[13]=zt(" 分享须知 "))]),_:1})]),Ee(FQ),Ee(YQ,{class:"flex-1"})]),Ee(GQ,{show:se(c),onUpdateShow:g[3]||(g[3]=w=>c.value=w)},null,8,["show"]),Ee(kQ,{show:se(u),onUpdateShow:g[4]||(g[4]=w=>u.value=w)},null,8,["show"]),Ee(yQ,{show:se(d),onUpdateShow:g[5]||(g[5]=w=>d.value=w)},null,8,["show"]),Ee(xQ),Ee(dQ,{show:se(l),onUpdateShow:g[6]||(g[6]=w=>l.value=w),data:se(o),onUpdateData:g[7]||(g[7]=w=>o.value=w)},null,8,["show","data"])],64)):!se(a)&&!se(s)?(We(),jt("div",JQ,g[16]||(g[16]=[Le("div",null,"快照数据缺失",-1)]))):Nn("",!0)}}});export{fee as default};
485
- //# sourceMappingURL=SnapshotPage-DLiCCFD7.js.map
485
+ //# sourceMappingURL=SnapshotPage-BaHDcwT7.js.map