@gkd-kit/inspect 0.0.1749367608743 → 0.0.1749439290226

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 (49) hide show
  1. package/dist/assets/{ActionCard.vue_vue_type_script_setup_true_lang-Caj5VsLm.js → ActionCard.vue_vue_type_script_setup_true_lang-DU4pt--9.js} +2 -2
  2. package/dist/assets/{ActionCard.vue_vue_type_script_setup_true_lang-Caj5VsLm.js.map → ActionCard.vue_vue_type_script_setup_true_lang-DU4pt--9.js.map} +1 -1
  3. package/dist/assets/{DevicePage-BkqlVhe7.js → DevicePage-CBSvm_vv.js} +2 -2
  4. package/dist/assets/{DevicePage-BkqlVhe7.js.map → DevicePage-CBSvm_vv.js.map} +1 -1
  5. package/dist/assets/{HomePage-4ldzgcB4.js → HomePage-N14oZR_I.js} +7 -7
  6. package/dist/assets/{HomePage-4ldzgcB4.js.map → HomePage-N14oZR_I.js.map} +1 -1
  7. package/dist/assets/ImportPage-flY1gTRb.js +2 -0
  8. package/dist/assets/ImportPage-flY1gTRb.js.map +1 -0
  9. package/dist/assets/{Input-BAk7HlsW.js → Input-D4KWqeWH.js} +2 -2
  10. package/dist/assets/{Input-BAk7HlsW.js.map → Input-D4KWqeWH.js.map} +1 -1
  11. package/dist/assets/{SelectorPage-n-KrNT4q.js → SelectorPage-BcxetUIX.js} +2 -2
  12. package/dist/assets/{SelectorPage-n-KrNT4q.js.map → SelectorPage-BcxetUIX.js.map} +1 -1
  13. package/dist/assets/{SnapshotPage-Bbg8XVjn.js → SnapshotPage-CwOAZlmE.js} +4 -4
  14. package/dist/assets/{SnapshotPage-Bbg8XVjn.js.map → SnapshotPage-CwOAZlmE.js.map} +1 -1
  15. package/dist/assets/{SvgPage-BwpO2Icx.js → SvgPage-BZU0H3vr.js} +2 -2
  16. package/dist/assets/{SvgPage-BwpO2Icx.js.map → SvgPage-BZU0H3vr.js.map} +1 -1
  17. package/dist/assets/{TrackGraph-Dc1QDhx0.js → TrackGraph-DdCOvVKa.js} +3 -3
  18. package/dist/assets/{TrackGraph-Dc1QDhx0.js.map → TrackGraph-DdCOvVKa.js.map} +1 -1
  19. package/dist/assets/{_404Page-BY-fZfSg.js → _404Page-403o9W_M.js} +2 -2
  20. package/dist/assets/{_404Page-BY-fZfSg.js.map → _404Page-403o9W_M.js.map} +1 -1
  21. package/dist/assets/chunk-BJS9npRX.js +3 -0
  22. package/dist/assets/{chunk-Cq75DicM.js.map → chunk-BJS9npRX.js.map} +1 -1
  23. package/dist/assets/{dayjs.min-DD7YyuP-.js → dayjs.min-BtRfTVBh.js} +2 -2
  24. package/dist/assets/{dayjs.min-DD7YyuP-.js.map → dayjs.min-BtRfTVBh.js.map} +1 -1
  25. package/dist/assets/{error-CZdhkKZU.js → error-xNFSYohO.js} +2 -2
  26. package/dist/assets/{error-CZdhkKZU.js.map → error-xNFSYohO.js.map} +1 -1
  27. package/dist/assets/{import-DYzYwAQY.js → import-Dusv6BQN.js} +2 -2
  28. package/dist/assets/import-Dusv6BQN.js.map +1 -0
  29. package/dist/assets/{index-DiuccYHc.js → index-BDvOwdMH.js} +3 -3
  30. package/dist/assets/{index-DiuccYHc.js.map → index-BDvOwdMH.js.map} +1 -1
  31. package/dist/assets/{index-d_sGH3qC.js → index-EsA5VFY-.js} +6 -6
  32. package/dist/assets/{index-d_sGH3qC.js.map → index-EsA5VFY-.js.map} +1 -1
  33. package/dist/assets/{jszip.min-Dg7wZQLA.js → jszip.min-DWn1nr2b.js} +2 -2
  34. package/dist/assets/{jszip.min-Dg7wZQLA.js.map → jszip.min-DWn1nr2b.js.map} +1 -1
  35. package/dist/assets/{node-Dvv82saR.js → node-BuNKmMiV.js} +2 -2
  36. package/dist/assets/{node-Dvv82saR.js.map → node-BuNKmMiV.js.map} +1 -1
  37. package/dist/assets/{polyfills-CaqqA8pJ.js → polyfills-BI7TBZoP.js} +2 -2
  38. package/dist/assets/polyfills-BI7TBZoP.js.map +1 -0
  39. package/dist/assets/{snapshot-CFNIbrFU.js → snapshot-CuDNuSe-.js} +2 -2
  40. package/dist/assets/{snapshot-CFNIbrFU.js.map → snapshot-CuDNuSe-.js.map} +1 -1
  41. package/dist/assets/{table-B4tpbfUd.js → table-CaNPLMrp.js} +2 -2
  42. package/dist/assets/{table-B4tpbfUd.js.map → table-CaNPLMrp.js.map} +1 -1
  43. package/dist/index.html +3 -3
  44. package/package.json +1 -1
  45. package/dist/assets/ImportPage-Bep5UqpU.js +0 -2
  46. package/dist/assets/ImportPage-Bep5UqpU.js.map +0 -1
  47. package/dist/assets/chunk-Cq75DicM.js +0 -3
  48. package/dist/assets/import-DYzYwAQY.js.map +0 -1
  49. package/dist/assets/polyfills-CaqqA8pJ.js.map +0 -1
@@ -1,2 +1,2 @@
1
- import{S as I,A as z,a as B,_ as V,d as f}from"./index-DiuccYHc.js";import{h as q,bO as D,bP as E,aJ as L,aK as P,A as F,aR as H,q as p,I as J,J as h,K as a,L as r,M as s,H as i,O as c,U as K,S as M,P as d,W as O,Q as t,aD as U,V as x,T as W}from"./index-d_sGH3qC.js";import{N as Q,a as $}from"./node-Dvv82saR.js";import{_ as j}from"./Input-BAk7HlsW.js";const G={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":""},ae={key:1},re={key:0,"p-4px":"","bg-red-300":"",gkd_code:""},de=q({__name:"SelectorPage",setup(ie){D(),E();const k=L(),y=P(),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=F(T()),b=H(u,500),l=p(()=>(u.value&&b.value).trim());J(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=M,S=$,A=j;return r(),a(W,null,[s("div",G,[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]=K(" 回到首页 "))]),_: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=>O(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:U(t(n)?"bg-red-200":"bg-light-600")},[t(g)?(r(),a("div",Y,[i(V,{source:t(l),node:t(g)},null,8,["source","node"])])):t(n)?(r(),a("span",Z,[t(n).headText?(r(),a("span",ee,x(t(n).headText),1)):d("",!0),s("span",te,[t(n).errorText?(r(),a("span",oe,x(t(n).errorText),1)):(r(),a("span",ne)),s("div",se,[i(v,{name:"arrow",class:"text-18px color-dark"})])]),t(n).tailText?(r(),a("span",ae,x(t(n).tailText),1)):d("",!0)])):d("",!0)],2),t(n)?(r(),a("div",re,x(t(n).message),1)):d("",!0)])],64)}}});export{de as default};
2
- //# sourceMappingURL=SelectorPage-n-KrNT4q.js.map
1
+ import{S as I,A as z,a as B,_ as V,d as f}from"./index-BDvOwdMH.js";import{h as q,bO as D,bP as E,aJ as L,aK as P,A as F,aR as H,q as p,I as J,J as h,K as a,L as r,M as s,H as i,O as c,U as K,S as M,P as d,W as O,Q as t,aD as U,V as x,T as W}from"./index-EsA5VFY-.js";import{N as Q,a as $}from"./node-BuNKmMiV.js";import{_ as j}from"./Input-D4KWqeWH.js";const G={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":""},ae={key:1},re={key:0,"p-4px":"","bg-red-300":"",gkd_code:""},de=q({__name:"SelectorPage",setup(ie){D(),E();const k=L(),y=P(),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=F(T()),b=H(u,500),l=p(()=>(u.value&&b.value).trim());J(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=M,S=$,A=j;return r(),a(W,null,[s("div",G,[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]=K(" 回到首页 "))]),_: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=>O(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:U(t(n)?"bg-red-200":"bg-light-600")},[t(g)?(r(),a("div",Y,[i(V,{source:t(l),node:t(g)},null,8,["source","node"])])):t(n)?(r(),a("span",Z,[t(n).headText?(r(),a("span",ee,x(t(n).headText),1)):d("",!0),s("span",te,[t(n).errorText?(r(),a("span",oe,x(t(n).errorText),1)):(r(),a("span",ne)),s("div",se,[i(v,{name:"arrow",class:"text-18px color-dark"})])]),t(n).tailText?(r(),a("span",ae,x(t(n).tailText),1)):d("",!0)])):d("",!0)],2),t(n)?(r(),a("div",re,x(t(n).message),1)):d("",!0)])],64)}}});export{de as default};
2
+ //# sourceMappingURL=SelectorPage-BcxetUIX.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"SelectorPage-n-KrNT4q.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-BcxetUIX.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,5 +1,5 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["https://registry.npmmirror.com/@gkd-kit/inspect/0.0.1749367608743/files/dist/assets/TrackGraph-Dc1QDhx0.js","https://registry.npmmirror.com/@gkd-kit/inspect/0.0.1749367608743/files/dist/assets/node-Dvv82saR.js","https://registry.npmmirror.com/@gkd-kit/inspect/0.0.1749367608743/files/dist/assets/index-d_sGH3qC.js","https://registry.npmmirror.com/@gkd-kit/inspect/0.0.1749367608743/files/dist/assets/index-BoCjhXH7.css","https://registry.npmmirror.com/@gkd-kit/inspect/0.0.1749367608743/files/dist/assets/index-DiuccYHc.js","https://registry.npmmirror.com/@gkd-kit/inspect/0.0.1749367608743/files/dist/assets/index-CdMJYWIX.css"])))=>i.map(i=>d[i]);
2
- import{h as Y,k as I,a as U,g as De,f as H,e as O,b as ee,u as pt,a0 as ko,a1 as vt,a2 as qt,a3 as wo,d as Wt,a4 as Ht,o as ae,q as A,p as ut,m as Me,x as Vt,a5 as Gt,y as ce,a6 as Nn,a7 as Rn,a8 as $n,a9 as Co,t as G,aa as an,ab as So,ac as _o,ad as he,ae as Ue,af as No,ag as Pn,ah as Ee,ai as Ro,aj as $o,ak as Po,c as Do,al as To,am as Io,an as Eo,s as At,X as Lo,ao as Ft,N as Ko,l as Ao,ap as Fo,B as Rt,aq as Bo,v as Dn,i as zo,ar as Bt,as as sn,at as dn,w as dt,F as Ne,I as Fe,au as et,av as rt,A as J,J as Oe,K as te,L as B,M as T,H as _,S as lt,O as S,aw as ie,P as de,Q as a,ax as Oo,T as Re,ay as ze,az as Ie,aA as wt,aB as Mo,aC as jt,D as Uo,aD as ft,aE as Ho,C as Yt,aF as Nt,aG as Tn,aH as jo,aI as qo,aJ as In,aK as En,z as Wo,aL as Ln,aM as Vo,aN as He,aO as Te,V,U as Z,aP as Go,aQ as Yo,aR as Qo,W as nt,aS as Xo,aT as Jo,aU as Ct,R as Zo,aV as zt,aW as Ae,aX as cn,Y as er,aY as un,aZ as Ot,a_ as fn}from"./index-d_sGH3qC.js";import{_ as St,U as hn,p as _t,w as tr,d as pn,F as Mt,G as nr}from"./index-DiuccYHc.js";import{_ as or}from"./_plugin-vue_export-helper-DlAUqK2U.js";import{g as Pe,l as rr,f as lr,b as ar,a as Qt,N as Kn,c as ht,d as ot,e as vn,h as gn}from"./node-Dvv82saR.js";import{e as ir,f as sr,g as dr,_ as cr}from"./ActionCard.vue_vue_type_script_setup_true_lang-Caj5VsLm.js";import{a as ur,b as fr,g as hr}from"./snapshot-CFNIbrFU.js";import{h as tt,C as pr,e as vr,V as gr,c as mn,f as bn,b as mr,N as yn,u as br,d as yr,a as An,g as Fn,i as xr,j as kr,_ as wr}from"./dayjs.min-DD7YyuP-.js";import{l as Bn,e as xn,a as Cr}from"./error-CZdhkKZU.js";import{_ as zn}from"./Input-BAk7HlsW.js";import"./chunk-Cq75DicM.js";function On(e){return typeof e=="string"?`s-${e}`:`n-${e}`}const Sr=Y({name:"ChevronLeft",render(){return I("svg",{viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},I("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"}))}}),_r=Y({name:"Switcher",render(){return I("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32"},I("path",{d:"M12 8l10 8l-10 8z"}))}}),le="0!important",Mn="-1px!important";function Je(e){return H(`${e}-type`,[O("& +",[U("button",{},[H(`${e}-type`,[ee("border",{borderLeftWidth:le}),ee("state-border",{left:Mn})])])])])}function Ze(e){return H(`${e}-type`,[O("& +",[U("button",[H(`${e}-type`,[ee("border",{borderTopWidth:le}),ee("state-border",{top:Mn})])])])])}const Nr=U("button-group",`
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["https://registry.npmmirror.com/@gkd-kit/inspect/0.0.1749439290226/files/dist/assets/TrackGraph-DdCOvVKa.js","https://registry.npmmirror.com/@gkd-kit/inspect/0.0.1749439290226/files/dist/assets/node-BuNKmMiV.js","https://registry.npmmirror.com/@gkd-kit/inspect/0.0.1749439290226/files/dist/assets/index-EsA5VFY-.js","https://registry.npmmirror.com/@gkd-kit/inspect/0.0.1749439290226/files/dist/assets/index-BoCjhXH7.css","https://registry.npmmirror.com/@gkd-kit/inspect/0.0.1749439290226/files/dist/assets/index-BDvOwdMH.js","https://registry.npmmirror.com/@gkd-kit/inspect/0.0.1749439290226/files/dist/assets/index-CdMJYWIX.css"])))=>i.map(i=>d[i]);
2
+ import{h as Y,k as I,a as U,g as De,f as H,e as O,b as ee,u as pt,a0 as ko,a1 as vt,a2 as qt,a3 as wo,d as Wt,a4 as Ht,o as ae,q as A,p as ut,m as Me,x as Vt,a5 as Gt,y as ce,a6 as Nn,a7 as Rn,a8 as $n,a9 as Co,t as G,aa as an,ab as So,ac as _o,ad as he,ae as Ue,af as No,ag as Pn,ah as Ee,ai as Ro,aj as $o,ak as Po,c as Do,al as To,am as Io,an as Eo,s as At,X as Lo,ao as Ft,N as Ko,l as Ao,ap as Fo,B as Rt,aq as Bo,v as Dn,i as zo,ar as Bt,as as sn,at as dn,w as dt,F as Ne,I as Fe,au as et,av as rt,A as J,J as Oe,K as te,L as B,M as T,H as _,S as lt,O as S,aw as ie,P as de,Q as a,ax as Oo,T as Re,ay as ze,az as Ie,aA as wt,aB as Mo,aC as jt,D as Uo,aD as ft,aE as Ho,C as Yt,aF as Nt,aG as Tn,aH as jo,aI as qo,aJ as In,aK as En,z as Wo,aL as Ln,aM as Vo,aN as He,aO as Te,V,U as Z,aP as Go,aQ as Yo,aR as Qo,W as nt,aS as Xo,aT as Jo,aU as Ct,R as Zo,aV as zt,aW as Ae,aX as cn,Y as er,aY as un,aZ as Ot,a_ as fn}from"./index-EsA5VFY-.js";import{_ as St,U as hn,p as _t,w as tr,d as pn,F as Mt,G as nr}from"./index-BDvOwdMH.js";import{_ as or}from"./_plugin-vue_export-helper-DlAUqK2U.js";import{g as Pe,l as rr,f as lr,b as ar,a as Qt,N as Kn,c as ht,d as ot,e as vn,h as gn}from"./node-BuNKmMiV.js";import{e as ir,f as sr,g as dr,_ as cr}from"./ActionCard.vue_vue_type_script_setup_true_lang-DU4pt--9.js";import{a as ur,b as fr,g as hr}from"./snapshot-CuDNuSe-.js";import{h as tt,C as pr,e as vr,V as gr,c as mn,f as bn,b as mr,N as yn,u as br,d as yr,a as An,g as Fn,i as xr,j as kr,_ as wr}from"./dayjs.min-BtRfTVBh.js";import{l as Bn,e as xn,a as Cr}from"./error-xNFSYohO.js";import{_ as zn}from"./Input-D4KWqeWH.js";import"./chunk-BJS9npRX.js";function On(e){return typeof e=="string"?`s-${e}`:`n-${e}`}const Sr=Y({name:"ChevronLeft",render(){return I("svg",{viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},I("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"}))}}),_r=Y({name:"Switcher",render(){return I("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32"},I("path",{d:"M12 8l10 8l-10 8z"}))}}),le="0!important",Mn="-1px!important";function Je(e){return H(`${e}-type`,[O("& +",[U("button",{},[H(`${e}-type`,[ee("border",{borderLeftWidth:le}),ee("state-border",{left:Mn})])])])])}function Ze(e){return H(`${e}-type`,[O("& +",[U("button",[H(`${e}-type`,[ee("border",{borderTopWidth:le}),ee("state-border",{top:Mn})])])])])}const Nr=U("button-group",`
3
3
  flex-wrap: nowrap;
4
4
  display: inline-flex;
5
5
  position: relative;
@@ -254,7 +254,7 @@ import{h as Y,k as I,a as U,g as De,f as H,e as O,b as ee,u as pt,a0 as ko,a1 as
254
254
  max-width: 100%;
255
255
  `),ee("suffix",`
256
256
  display: inline-flex;
257
- `)]),ee("empty","margin: auto;")]);var ll=function(e,t,s,n){function l(r){return r instanceof s?r:new s(function(h){h(r)})}return new(s||(s=Promise))(function(r,h){function u(d){try{p(n.next(d))}catch(b){h(b)}}function f(d){try{p(n.throw(d))}catch(b){h(b)}}function p(d){d.done?r(d.value):l(d.value).then(u,f)}p((n=n.apply(e,[])).next())})};function wn(e,t,s,n){return{getIsGroup(){return!1},getKey(r){return r[e]},getChildren:n||(r=>r[t]),getDisabled(r){return!!(r[s]||r.checkboxDisabled)}}}const al={allowCheckingNotLoaded:Boolean,filter:Function,defaultExpandAll:Boolean,expandedKeys:Array,keyField:{type:String,default:"key"},labelField:{type:String,default:"label"},childrenField:{type:String,default:"children"},disabledField:{type:String,default:"disabled"},defaultExpandedKeys:{type:Array,default:()=>[]},indeterminateKeys:Array,renderSwitcherIcon:Function,onUpdateIndeterminateKeys:[Function,Array],"onUpdate:indeterminateKeys":[Function,Array],onUpdateExpandedKeys:[Function,Array],"onUpdate:expandedKeys":[Function,Array],overrideDefaultNodeClickBehavior:Function},il=Object.assign(Object.assign(Object.assign(Object.assign({},Me.props),{accordion:Boolean,showIrrelevantNodes:{type:Boolean,default:!0},data:{type:Array,default:()=>[]},expandOnDragenter:{type:Boolean,default:!0},expandOnClick:Boolean,checkOnClick:{type:[Boolean,Function],default:!1},cancelable:{type:Boolean,default:!0},checkable:Boolean,draggable:Boolean,blockNode:Boolean,blockLine:Boolean,showLine:Boolean,disabled:Boolean,checkedKeys:Array,defaultCheckedKeys:{type:Array,default:()=>[]},selectedKeys:Array,defaultSelectedKeys:{type:Array,default:()=>[]},multiple:Boolean,pattern:{type:String,default:""},onLoad:Function,cascade:Boolean,selectable:{type:Boolean,default:!0},scrollbarProps:Object,indent:{type:Number,default:24},allowDrop:{type:Function,default:Yr},animated:{type:Boolean,default:!0},checkboxPlacement:{type:String,default:"left"},virtualScroll:Boolean,watchProps:Array,renderLabel:Function,renderPrefix:Function,renderSuffix:Function,nodeProps:Function,keyboard:{type:Boolean,default:!0},getChildren:Function,onDragenter:[Function,Array],onDragleave:[Function,Array],onDragend:[Function,Array],onDragstart:[Function,Array],onDragover:[Function,Array],onDrop:[Function,Array],onUpdateCheckedKeys:[Function,Array],"onUpdate:checkedKeys":[Function,Array],onUpdateSelectedKeys:[Function,Array],"onUpdate:selectedKeys":[Function,Array]}),al),{internalTreeSelect:Boolean,internalScrollable:Boolean,internalScrollablePadding:String,internalRenderEmpty:Function,internalHighlightKeySet:Object,internalUnifySelectCheck:Boolean,internalCheckboxFocusable:{type:Boolean,default:!0},internalFocusable:{type:Boolean,default:!0},checkStrategy:{type:String,default:"all"},leafOnly:Boolean}),sl=Y({name:"Tree",props:il,slots:Object,setup(e){const{mergedClsPrefixRef:t,inlineThemeDisabled:s,mergedRtlRef:n}=pt(e),l=vt("Tree",n,t),r=Me("Tree","-tree",rl,Mr,e,t),h=ae(null),u=ae(null),f=ae(null);function p(){var o;return(o=f.value)===null||o===void 0?void 0:o.listElRef}function d(){var o;return(o=f.value)===null||o===void 0?void 0:o.itemsElRef}const b=A(()=>{const{filter:o}=e;if(o)return o;const{labelField:x}=e;return(D,L)=>{if(!D.length)return!0;const K=L[x];return typeof K=="string"?K.toLowerCase().includes(D.toLowerCase()):!1}}),$=A(()=>{const{pattern:o}=e;return o?!o.length||!b.value?{filteredTree:e.data,highlightKeySet:null,expandedKeys:void 0}:nl(e.data,b.value,o,e.keyField,e.childrenField):{filteredTree:e.data,highlightKeySet:null,expandedKeys:void 0}}),P=A(()=>mn(e.showIrrelevantNodes?e.data:$.value.filteredTree,wn(e.keyField,e.childrenField,e.disabledField,e.getChildren))),i=Ue(Hn,null),g=e.internalTreeSelect?i.dataTreeMate:A(()=>e.showIrrelevantNodes?P.value:mn(e.data,wn(e.keyField,e.childrenField,e.disabledField,e.getChildren))),{watchProps:k}=e,w=ae([]);k!=null&&k.includes("defaultCheckedKeys")?Ne(()=>{w.value=e.defaultCheckedKeys}):w.value=e.defaultCheckedKeys;const N=G(e,"checkedKeys"),C=ut(N,w),m=A(()=>g.value.getCheckedKeys(C.value,{cascade:e.cascade,allowNotLoaded:e.allowCheckingNotLoaded})),c=el(e),y=A(()=>m.value.checkedKeys),R=A(()=>{const{indeterminateKeys:o}=e;return o!==void 0?o:m.value.indeterminateKeys}),v=ae([]);k!=null&&k.includes("defaultSelectedKeys")?Ne(()=>{v.value=e.defaultSelectedKeys}):v.value=e.defaultSelectedKeys;const z=G(e,"selectedKeys"),F=ut(z,v),M=ae([]),we=o=>{M.value=e.defaultExpandAll?g.value.getNonLeafKeys():o===void 0?e.defaultExpandedKeys:o};k!=null&&k.includes("defaultExpandedKeys")?Ne(()=>{we(void 0)}):Ne(()=>{we(e.defaultExpandedKeys)});const ne=G(e,"expandedKeys"),j=ut(ne,M),pe=A(()=>P.value.getFlattenedNodes(j.value)),{pendingNodeKeyRef:be,handleKeydown:fe}=Qr({props:e,mergedCheckedKeysRef:C,mergedSelectedKeysRef:F,fNodesRef:pe,mergedExpandedKeysRef:j,handleCheck:Et,handleSelect:Lt,handleSwitcherClick:tn});let ye=null,$e=null;const q=ae(new Set),at=A(()=>e.internalHighlightKeySet||$.value.highlightKeySet),ve=ut(at,q),E=ae(new Set),W=A(()=>j.value.filter(o=>!E.value.has(o)));let oe=0;const se=ae(null),ge=ae(null),mt=ae(null),bt=ae(null),yt=ae(0),Yn=A(()=>{const{value:o}=ge;return o?o.parent:null});let Pt=!1;Fe(G(e,"data"),()=>{Pt=!0,et(()=>{Pt=!1}),E.value.clear(),be.value=null,st()},{deep:!1});let Dt=!1;const Tt=()=>{Dt=!0,et(()=>{Dt=!1})};let it;Fe(G(e,"pattern"),(o,x)=>{if(e.showIrrelevantNodes)if(it=void 0,o){const{expandedKeys:D,highlightKeySet:L}=tl(e.data,e.pattern,e.keyField,e.childrenField,b.value);q.value=L,Tt(),We(D,xe(D),{node:null,action:"filter"})}else q.value=new Set;else if(!o.length)it!==void 0&&(Tt(),We(it,xe(it),{node:null,action:"filter"}));else{x.length||(it=j.value);const{expandedKeys:D}=$.value;D!==void 0&&(Tt(),We(D,xe(D),{node:null,action:"filter"}))}});function Zt(o){return ll(this,void 0,void 0,function*(){const{onLoad:x}=e;if(!x){yield Promise.resolve();return}const{value:D}=E;if(!D.has(o.key)){D.add(o.key);try{(yield x(o.rawNode))===!1&&Ve()}catch(L){console.error(L),Ve()}D.delete(o.key)}})}Ne(()=>{var o;const{value:x}=P;if(!x)return;const{getNode:D}=x;(o=j.value)===null||o===void 0||o.forEach(L=>{const K=D(L);K&&!K.shallowLoaded&&Zt(K)})});const qe=ae(!1),Le=ae([]);Fe(W,(o,x)=>{if(!e.animated||Dt){et(xt);return}if(Pt)return;const D=dt(r.value.self.nodeHeight),L=new Set(x);let K=null,re=null;for(const X of o)if(!L.has(X)){if(K!==null)return;K=X}const me=new Set(o);for(const X of x)if(!me.has(X)){if(re!==null)return;re=X}if(K===null&&re===null)return;const{virtualScroll:ke}=e,Ye=(ke?f.value.listElRef:h.value).offsetHeight,Qe=Math.ceil(Ye/D)+1;let Ce;if(K!==null&&(Ce=x),re!==null&&(Ce===void 0?Ce=o:Ce=Ce.filter(X=>X!==re)),qe.value=!0,Le.value=P.value.getFlattenedNodes(Ce),K!==null){const X=Le.value.findIndex(Se=>Se.key===K);if(~X){const Se=Le.value[X].children;if(Se){const _e=bn(Se,o);Le.value.splice(X+1,0,{__motion:!0,mode:"expand",height:ke?_e.length*D:void 0,nodes:ke?_e.slice(0,Qe):_e})}}}if(re!==null){const X=Le.value.findIndex(Se=>Se.key===re);if(~X){const Se=Le.value[X].children;if(!Se)return;qe.value=!0;const _e=bn(Se,o);Le.value.splice(X+1,0,{__motion:!0,mode:"collapse",height:ke?_e.length*D:void 0,nodes:ke?_e.slice(0,Qe):_e})}}});const Qn=A(()=>mr(pe.value)),Xn=A(()=>qe.value?Le.value:pe.value);function xt(){const{value:o}=u;o&&o.sync()}function Jn(){qe.value=!1,e.virtualScroll&&et(xt)}function xe(o){const{getNode:x}=g.value;return o.map(D=>{var L;return((L=x(D))===null||L===void 0?void 0:L.rawNode)||null})}function We(o,x,D){const{"onUpdate:expandedKeys":L,onUpdateExpandedKeys:K}=e;M.value=o,L&&ce(L,o,x,D),K&&ce(K,o,x,D)}function en(o,x,D){const{"onUpdate:checkedKeys":L,onUpdateCheckedKeys:K}=e;w.value=o,K&&ce(K,o,x,D),L&&ce(L,o,x,D)}function Zn(o,x){const{"onUpdate:indeterminateKeys":D,onUpdateIndeterminateKeys:L}=e;D&&ce(D,o,x),L&&ce(L,o,x)}function It(o,x,D){const{"onUpdate:selectedKeys":L,onUpdateSelectedKeys:K}=e;v.value=o,K&&ce(K,o,x,D),L&&ce(L,o,x,D)}function eo(o){const{onDragenter:x}=e;x&&ce(x,o)}function to(o){const{onDragleave:x}=e;x&&ce(x,o)}function no(o){const{onDragend:x}=e;x&&ce(x,o)}function oo(o){const{onDragstart:x}=e;x&&ce(x,o)}function ro(o){const{onDragover:x}=e;x&&ce(x,o)}function lo(o){const{onDrop:x}=e;x&&ce(x,o)}function st(){ao(),Be()}function ao(){se.value=null}function Be(){yt.value=0,ge.value=null,mt.value=null,bt.value=null,Ve()}function Ve(){ye&&(window.clearTimeout(ye),ye=null),$e=null}function Et(o,x){if(e.disabled||Ke(o,e.disabledField))return;if(e.internalUnifySelectCheck&&!e.multiple){Lt(o);return}const D=x?"check":"uncheck",{checkedKeys:L,indeterminateKeys:K}=g.value[D](o.key,y.value,{cascade:e.cascade,checkStrategy:c.value,allowNotLoaded:e.allowCheckingNotLoaded});en(L,xe(L),{node:o.rawNode,action:D}),Zn(K,xe(K))}function io(o){if(e.disabled)return;const{key:x}=o,{value:D}=j,L=D.findIndex(K=>K===x);if(~L){const K=Array.from(D);K.splice(L,1),We(K,xe(K),{node:o.rawNode,action:"collapse"})}else{const K=P.value.getNode(x);if(!K||K.isLeaf)return;let re;if(e.accordion){const me=new Set(o.siblings.map(({key:ke})=>ke));re=D.filter(ke=>!me.has(ke)),re.push(x)}else re=D.concat(x);We(re,xe(re),{node:o.rawNode,action:"expand"})}}function tn(o){e.disabled||qe.value||io(o)}function Lt(o){if(!(e.disabled||!e.selectable)){if(be.value=o.key,e.internalUnifySelectCheck){const{value:{checkedKeys:x,indeterminateKeys:D}}=m;e.multiple?Et(o,!(x.includes(o.key)||D.includes(o.key))):en([o.key],xe([o.key]),{node:o.rawNode,action:"check"})}if(e.multiple){const x=Array.from(F.value),D=x.findIndex(L=>L===o.key);~D?e.cancelable&&x.splice(D,1):~D||x.push(o.key),It(x,xe(x),{node:o.rawNode,action:~D?"unselect":"select"})}else F.value.includes(o.key)?e.cancelable&&It([],[],{node:o.rawNode,action:"unselect"}):It([o.key],xe([o.key]),{node:o.rawNode,action:"select"})}}function so(o){if(ye&&(window.clearTimeout(ye),ye=null),o.isLeaf)return;$e=o.key;const x=()=>{if($e!==o.key)return;const{value:D}=mt;if(D&&D.key===o.key&&!j.value.includes(o.key)){const L=j.value.concat(o.key);We(L,xe(L),{node:o.rawNode,action:"expand"})}ye=null,$e=null};o.shallowLoaded?ye=window.setTimeout(()=>{x()},1e3):ye=window.setTimeout(()=>{Zt(o).then(()=>{x()})},1e3)}function co({event:o,node:x}){!e.draggable||e.disabled||Ke(x,e.disabledField)||(nn({event:o,node:x},!1),eo({event:o,node:x.rawNode}))}function uo({event:o,node:x}){!e.draggable||e.disabled||Ke(x,e.disabledField)||to({event:o,node:x.rawNode})}function fo(o){o.target===o.currentTarget&&Be()}function ho({event:o,node:x}){st(),!(!e.draggable||e.disabled||Ke(x,e.disabledField))&&no({event:o,node:x.rawNode})}function po({event:o,node:x}){!e.draggable||e.disabled||Ke(x,e.disabledField)||(oe=o.clientX,se.value=x,oo({event:o,node:x.rawNode}))}function nn({event:o,node:x},D=!0){var L;if(!e.draggable||e.disabled||Ke(x,e.disabledField))return;const{value:K}=se;if(!K)return;const{allowDrop:re,indent:me}=e;D&&ro({event:o,node:x.rawNode});const ke=o.currentTarget,{height:Ye,top:Qe}=ke.getBoundingClientRect(),Ce=o.clientY-Qe;let X;re({node:x.rawNode,dropPosition:"inside",phase:"drag"})?Ce<=8?X="before":Ce>=Ye-8?X="after":X="inside":Ce<=Ye/2?X="before":X="after";const{value:_e}=Qn;let Q,ue;const Xe=_e(x.key);if(Xe===null){Be();return}let kt=!1;X==="inside"?(Q=x,ue="inside"):X==="before"?x.isFirstChild?(Q=x,ue="before"):(Q=pe.value[Xe-1],ue="after"):(Q=x,ue="after"),!Q.isLeaf&&j.value.includes(Q.key)&&(kt=!0,ue==="after"&&(Q=pe.value[Xe+1],Q?ue="before":(Q=x,ue="inside")));const rn=Q;if(mt.value=rn,!kt&&K.isLastChild&&K.key===Q.key&&(ue="after"),ue==="after"){let ln=oe-o.clientX,Kt=0;for(;ln>=me/2&&Q.parent!==null&&Q.isLastChild&&Kt<1;)ln-=me,Kt+=1,Q=Q.parent;yt.value=Kt}else yt.value=0;if((K.contains(Q)||ue==="inside"&&((L=K.parent)===null||L===void 0?void 0:L.key)===Q.key)&&!(K.key===rn.key&&K.key===Q.key)){Be();return}if(!re({node:Q.rawNode,dropPosition:ue,phase:"drag"})){Be();return}if(K.key===Q.key)Ve();else if($e!==Q.key)if(ue==="inside"){if(e.expandOnDragenter){if(so(Q),!Q.shallowLoaded&&$e!==Q.key){st();return}}else if(!Q.shallowLoaded){st();return}}else Ve();else ue!=="inside"&&Ve();bt.value=ue,ge.value=Q}function vo({event:o,node:x,dropPosition:D}){if(!e.draggable||e.disabled||Ke(x,e.disabledField))return;const{value:L}=se,{value:K}=ge,{value:re}=bt;if(!(!L||!K||!re)&&e.allowDrop({node:K.rawNode,dropPosition:re,phase:"drag"})&&L.key!==K.key){if(re==="before"){const me=L.getNext({includeDisabled:!0});if(me&&me.key===K.key){Be();return}}if(re==="after"){const me=L.getPrev({includeDisabled:!0});if(me&&me.key===K.key){Be();return}}lo({event:o,node:K.rawNode,dragNode:L.rawNode,dropPosition:D}),st()}}function go(){xt()}function mo(){xt()}function bo(o){var x;if(e.virtualScroll||e.internalScrollable){const{value:D}=u;if(!((x=D==null?void 0:D.containerRef)===null||x===void 0)&&x.contains(o.relatedTarget))return;be.value=null}else{const{value:D}=h;if(D!=null&&D.contains(o.relatedTarget))return;be.value=null}}Fe(be,o=>{var x,D;if(o!==null){if(e.virtualScroll)(x=f.value)===null||x===void 0||x.scrollTo({key:o});else if(e.internalScrollable){const{value:L}=u;if(L===null)return;const K=(D=L.contentRef)===null||D===void 0?void 0:D.querySelector(`[data-key="${On(o)}"]`);if(!K)return;L.scrollTo({el:K})}}}),qt(gt,{loadingKeysRef:E,highlightKeySetRef:ve,displayedCheckedKeysRef:y,displayedIndeterminateKeysRef:R,mergedSelectedKeysRef:F,mergedExpandedKeysRef:j,mergedThemeRef:r,mergedCheckStrategyRef:c,nodePropsRef:G(e,"nodeProps"),disabledRef:G(e,"disabled"),checkableRef:G(e,"checkable"),selectableRef:G(e,"selectable"),expandOnClickRef:G(e,"expandOnClick"),onLoadRef:G(e,"onLoad"),draggableRef:G(e,"draggable"),blockLineRef:G(e,"blockLine"),indentRef:G(e,"indent"),cascadeRef:G(e,"cascade"),checkOnClickRef:G(e,"checkOnClick"),checkboxPlacementRef:e.checkboxPlacement,droppingMouseNodeRef:mt,droppingNodeParentRef:Yn,draggingNodeRef:se,droppingPositionRef:bt,droppingOffsetLevelRef:yt,fNodesRef:pe,pendingNodeKeyRef:be,showLineRef:G(e,"showLine"),disabledFieldRef:G(e,"disabledField"),internalScrollableRef:G(e,"internalScrollable"),internalCheckboxFocusableRef:G(e,"internalCheckboxFocusable"),internalTreeSelect:e.internalTreeSelect,renderLabelRef:G(e,"renderLabel"),renderPrefixRef:G(e,"renderPrefix"),renderSuffixRef:G(e,"renderSuffix"),renderSwitcherIconRef:G(e,"renderSwitcherIcon"),labelFieldRef:G(e,"labelField"),multipleRef:G(e,"multiple"),overrideDefaultNodeClickBehaviorRef:G(e,"overrideDefaultNodeClickBehavior"),handleSwitcherClick:tn,handleDragEnd:ho,handleDragEnter:co,handleDragLeave:uo,handleDragStart:po,handleDrop:vo,handleDragOver:nn,handleSelect:Lt,handleCheck:Et});function yo(o,x){var D,L;typeof o=="number"?(D=f.value)===null||D===void 0||D.scrollTo(o,x||0):(L=f.value)===null||L===void 0||L.scrollTo(o)}const xo={handleKeydown:fe,scrollTo:yo,getCheckedData:()=>{if(!e.checkable)return{keys:[],options:[]};const{checkedKeys:o}=m.value;return{keys:o,options:xe(o)}},getIndeterminateData:()=>{if(!e.checkable)return{keys:[],options:[]};const{indeterminateKeys:o}=m.value;return{keys:o,options:xe(o)}}},on=A(()=>{const{common:{cubicBezierEaseInOut:o},self:{fontSize:x,nodeBorderRadius:D,nodeColorHover:L,nodeColorPressed:K,nodeColorActive:re,arrowColor:me,loadingColor:ke,nodeTextColor:Ye,nodeTextColorDisabled:Qe,dropMarkColor:Ce,nodeWrapperPadding:X,nodeHeight:Se,lineHeight:_e,lineColor:Q}}=r.value,ue=Bt(X,"top"),Xe=Bt(X,"bottom"),kt=Dn(dt(Se)-dt(ue)-dt(Xe));return{"--n-arrow-color":me,"--n-loading-color":ke,"--n-bezier":o,"--n-font-size":x,"--n-node-border-radius":D,"--n-node-color-active":re,"--n-node-color-hover":L,"--n-node-color-pressed":K,"--n-node-text-color":Ye,"--n-node-text-color-disabled":Qe,"--n-drop-mark-color":Ce,"--n-node-wrapper-padding":X,"--n-line-offset-top":`-${ue}`,"--n-line-offset-bottom":`-${Xe}`,"--n-node-content-height":kt,"--n-line-height":_e,"--n-line-color":Q}}),Ge=s?Vt("tree",void 0,on,e):void 0;return Object.assign(Object.assign({},xo),{mergedClsPrefix:t,mergedTheme:r,rtlEnabled:l,fNodes:Xn,aip:qe,selfElRef:h,virtualListInstRef:f,scrollbarInstRef:u,handleFocusout:bo,handleDragLeaveTree:fo,handleScroll:go,getScrollContainer:p,getScrollContent:d,handleAfterEnter:Jn,handleResize:mo,cssVars:s?void 0:on,themeClass:Ge==null?void 0:Ge.themeClass,onRender:Ge==null?void 0:Ge.onRender})},render(){var e;const{fNodes:t,internalRenderEmpty:s}=this;if(!t.length&&s)return s();const{mergedClsPrefix:n,blockNode:l,blockLine:r,draggable:h,disabled:u,internalFocusable:f,checkable:p,handleKeydown:d,rtlEnabled:b,handleFocusout:$,scrollbarProps:P}=this,i=f&&!u,g=i?"0":void 0,k=[`${n}-tree`,b&&`${n}-tree--rtl`,p&&`${n}-tree--checkable`,(r||l)&&`${n}-tree--block-node`,r&&`${n}-tree--block-line`],w=C=>"__motion"in C?I(ol,{height:C.height,nodes:C.nodes,clsPrefix:n,mode:C.mode,onAfterEnter:this.handleAfterEnter}):I(qn,{key:C.key,tmNode:C,clsPrefix:n});if(this.virtualScroll){const{mergedTheme:C,internalScrollablePadding:m}=this,c=Bt(m||"0");return I(sn,Object.assign({},P,{ref:"scrollbarInstRef",onDragleave:h?this.handleDragLeaveTree:void 0,container:this.getScrollContainer,content:this.getScrollContent,class:k,theme:C.peers.Scrollbar,themeOverrides:C.peerOverrides.Scrollbar,tabindex:g,onKeydown:i?d:void 0,onFocusout:i?$:void 0}),{default:()=>{var y;return(y=this.onRender)===null||y===void 0||y.call(this),t.length?I(gr,{ref:"virtualListInstRef",items:this.fNodes,itemSize:dt(C.self.nodeHeight),ignoreItemResize:this.aip,paddingTop:c.top,paddingBottom:c.bottom,class:this.themeClass,style:[this.cssVars,{paddingLeft:c.left,paddingRight:c.right}],onScroll:this.handleScroll,onResize:this.handleResize,showScrollbar:!1,itemResizable:!0},{default:({item:R})=>w(R)}):dn(this.$slots.empty,()=>[I(yn,{class:`${n}-tree__empty`,theme:this.mergedTheme.peers.Empty,themeOverrides:this.mergedTheme.peerOverrides.Empty})])}})}const{internalScrollable:N}=this;return k.push(this.themeClass),(e=this.onRender)===null||e===void 0||e.call(this),N?I(sn,Object.assign({},P,{class:k,tabindex:g,onKeydown:i?d:void 0,onFocusout:i?$:void 0,style:this.cssVars,contentStyle:{padding:this.internalScrollablePadding}}),{default:()=>I("div",{onDragleave:h?this.handleDragLeaveTree:void 0,ref:"selfElRef"},this.fNodes.map(w))}):I("div",{class:k,tabindex:g,ref:"selfElRef",style:this.cssVars,onKeydown:i?d:void 0,onFocusout:i?$:void 0,onDragleave:h?this.handleDragLeaveTree:void 0},t.length?t.map(w):dn(this.$slots.empty,()=>[I(yn,{class:`${n}-tree__empty`,theme:this.mergedTheme.peers.Empty,themeOverrides:this.mergedTheme.peerOverrides.Empty})]))}}),dl={class:"TrackCard",flex:"","flex-col":"","h-full":"","p-12px":"","box-border":"","gap-8px":"","overflow-hidden":""},cl={flex:"","justify-between":"","items-center":""},ul={flex:"","items-center":"","gap-4px":""},fl={"flex-1":"",flex:"","gap-12px":"","overflow-hidden":""},hl={"self-stretch":"",flex:"[2]"},pl={"mb-24px":"","break-all":"","px-4px":"","py-2px":"",bg:"#eee"},vl={flex:"","flex-col":"","gap-12px":""},gl={key:0,flex:"","gap-8px":""},ml=["onClick"],Wn=()=>Mo(()=>import("./TrackGraph-Dc1QDhx0.js"),__vite__mapDeps([0,1,2,3,4,5]),import.meta.url),bl=Oo({loader:Wn,delay:0});setTimeout(Wn,3e3);const yl=Y({__name:"TrackCard",props:{nodes:{},queryResult:{},selector:{},onClose:{type:Function,default:rt}},setup(e){const t=e,s=A(()=>t.queryResult?t.queryResult.unitResults.asJsReadonlyArrayView().concat():[]),n=A(()=>s.value.filter(f=>!f.context.prev)),l=A(()=>s.value.filter(f=>f.context.prev)),r=J([]);Ne(()=>{r.value=l.value});const h=f=>{r.value.includes(f)?r.value=r.value.filter(p=>p!==f):r.value=r.value.concat(f)},u=f=>{const p=f.value;return p instanceof hn&&s.value.some(d=>d.expression===p)&&!f.outChildren.some(d=>d.value instanceof hn)?{outline:"1px solid #00F"}:""};return(f,p)=>{const d=Oe("SvgIcon"),b=lt,$=Xt;return B(),te("div",dl,[T("div",cl,[T("div",ul,[_(d,{name:"path",h:"24px"}),p[0]||(p[0]=T("div",{text:"20px/28px","font-bold":""},"选择器路径视图",-1))]),_(b,{text:"",onClick:f.onClose},{default:S(()=>[_(d,{name:"close",h:"20px"})]),_:1},8,["onClick"])]),T("div",fl,[T("div",hl,[f.nodes.length&&f.queryResult?(B(),ie(a(bl),{key:0,nodes:f.nodes,queryResult:f.queryResult,showUnitResults:a(l),filterUnitResults:a(r),class:"h-[calc(100%-2px)] b-1px b-solid"},null,8,["nodes","queryResult","showUnitResults","filterUnitResults"])):de("",!0),p[1]||(p[1]=T("div",{relative:"","pointer-events-none":"","z-1":""},[T("div",{absolute:"","left-8px":"","bottom-8px":"",text:"14px/14px #6C6E71"}," *为简化视图已隐藏无关节点 ")],-1))]),_($,{class:"self-stretch flex-1 text-20px leading-28px gkd_code"},{default:S(()=>[T("div",pl,[_(St,{source:f.selector.source,node:f.selector.ast,getNodeStyle:u},null,8,["source","node"])]),T("div",vl,[a(n).length?(B(),te("div",gl,[(B(!0),te(Re,null,ze(a(n),(P,i)=>(B(),te("div",{key:i,"break-all":"","px-4px":"","py-2px":"","b-1px":"","b-solid":"",b:"#ccc"},[_(St,{source:f.selector.source,node:f.selector.findAst(P.expression)},null,8,["source","node"])]))),128))])):de("",!0),(B(!0),te(Re,null,ze(a(l),(P,i)=>(B(),te("div",{key:i,"cursor-pointer":"","break-all":"","px-4px":"","py-2px":"","b-1px":"","b-solid":"","transition-colors":"",onClick:g=>h(P),style:Ie({borderColor:a(wt)[i%a(wt).length],backgroundColor:a(r).includes(P)?"#eee":void 0})},[T("div",{"inline-block":"","align-middle":"","size-20px":"",style:Ie({backgroundColor:a(wt)[i%a(wt).length]})},null,4),p[2]||(p[2]=T("span",{"pl-4px":""},null,-1)),_(St,{source:f.selector.source,node:f.selector.findAst(P.expression)},null,8,["source","node"])],12,ml))),128))])]),_:1})])])}}}),xl=Y({__name:"TrackModal",props:{data:{},show:{type:Boolean},onUpdateShow:{type:Function,default:rt},onUpdateData:{type:Function,default:rt}},setup(e){const t=e,s=ae(!1),n=ae(0);return jt(()=>t.show,async()=>{t.show?(s.value=!0,n.value=-1,await new Promise(l=>setTimeout(l,300)),n.value=0):(n.value=1,await new Promise(l=>setTimeout(l,300)),s.value=!1,n.value=0,t.onUpdateData())}),Uo("keyup",l=>{l.key==="Escape"&&t.onUpdateShow(!1)}),(l,r)=>a(s)?(B(),te("div",{key:0,class:ft(["TrackModal",{"track-model-enter":a(n)===-1,"track-model-exit":a(n)===1}]),absolute:"","left-0":"","top-0":"","bg-white":"","z-3000":"",w:"[--gkd-w]",h:"[--gkd-h]"},[l.data?(B(),ie(yl,Ho({key:0},l.data,{onClose:r[0]||(r[0]=h=>l.onUpdateShow(!1))}),null,16)):de("",!0)],2)):de("",!0)}}),kl=or(xl,[["__scopeId","data-v-66dad45d"]]),Cn=e=>{const t=J(),s={x:0,y:0},n=Yt({...s});let l;const r=d=>{l&&d.preventDefault()},h=d=>{l=d,s.x=n.x,s.y=n.y},u=d=>{if(!l||!t.value)return;const b=d.clientX-l.clientX,$=d.clientY-l.clientY;e(b)&&(n.x=s.x+b),n.y=s.y+$},f=()=>{l=void 0},p=()=>{if(!t.value||!l)return;f();const{top:d,bottom:b,left:$,right:P}=t.value.getBoundingClientRect();(P<0||$>window.innerWidth||b<0||d>window.innerHeight)&&(n.x=s.x,n.y=s.y)};return Rt(()=>{window.addEventListener("pointermove",u),window.addEventListener("pointerup",p),document.addEventListener("selectstart",r)}),Nt(()=>{window.removeEventListener("pointermove",u),window.removeEventListener("pointerup",p),document.removeEventListener("selectstart",r),f()}),Fe(t,(d,b)=>{d&&(d.addEventListener("pointerdown",h),d.addEventListener("pointerup",f)),b&&(b.removeEventListener("pointerdown",h),b.removeEventListener("pointerup",f))}),Nt(()=>{t.value&&(t.value.removeEventListener("pointerdown",h),t.value.removeEventListener("pointerup",f))}),{target:t,offset:n}};let ct=1e3;const wl=()=>{ct++;const e=J(ct);return{zIndex:e,setTop:()=>{e.value!==ct&&(ct++,e.value=ct)}}},Sn="transition-top,bottom,left,right-500",$t=Y({__name:"DraggableCard",props:{initialValue:{default:()=>({})},minWidth:{},sizeDraggable:{type:Boolean},show:{type:Boolean,default:!0},class:{}},setup(e){var c,y;const t=e,s=t.initialValue.left!==void 0,n=t.initialValue.top!==void 0,l={x:(c=s?t.initialValue.left:t.initialValue.right)!=null?c:0,y:(y=n?t.initialValue.top:t.initialValue.bottom)!=null?y:0},r=Cn(R=>{const v=(t.initialValue.width||0)+h.offset.x+-r.offset.x-R;return(t.minWidth||0)<v}),h=Cn(R=>{const v=(t.initialValue.width||0)+h.offset.x+R-r.offset.x;return(t.minWidth||0)<v}),u=Yt({...l}),f=A(()=>{const R=(t.initialValue.width||0)+h.offset.x-r.offset.x,v=t.initialValue.width?`width:${R}px;`:"",z=n?`top:${u.y}px;`:`bottom:${u.y}px;`;return s?`left:${u.x-r.offset.x}px;`+z+v:`right:${u.x-h.offset.x}px;`+z+v});let p;const d=J(!1),b=R=>{p=R,l.x=u.x,l.y=u.y,d.value=!1},$=R=>{if(!g.value||!p)return;const v=R.clientX-p.clientX,z=R.clientY-p.clientY;u.x=l.x+(s?v:-v),u.y=l.y+(n?z:-z),d.value=!0},P=()=>{p=void 0},i=J(),g=J(),k=R=>{p&&R.preventDefault()},w=()=>{if(!g.value||!p)return;P();const{top:R,bottom:v,left:z,right:F}=g.value.getBoundingClientRect();if(F<0||z>window.innerWidth||v<0||R>window.innerHeight){u.x=l.x,u.y=l.y;const M=i.value;M&&(M.classList.add(Sn),setTimeout(()=>{M.classList.remove(Sn)},550))}};Rt(()=>{window.addEventListener("pointermove",$),window.addEventListener("pointerup",w),document.addEventListener("selectstart",k)}),Nt(()=>{window.removeEventListener("pointermove",$),window.removeEventListener("pointerup",w),document.removeEventListener("selectstart",k),P()}),Fe(g,(R,v)=>{R&&(R.addEventListener("pointerdown",b),R.addEventListener("pointerup",P)),v&&(v.removeEventListener("pointerdown",b),v.removeEventListener("pointerup",P))}),Nt(()=>{g.value&&(g.value.removeEventListener("pointerdown",b),g.value.removeEventListener("pointerup",P))});const N=R=>{R instanceof HTMLElement?g.value=R:g.value=void 0},{setTop:C,zIndex:m}=wl();return Fe(()=>t.show,()=>{t.show&&C()}),(R,v)=>(B(),ie(Tn,{to:"body"},[R.show?(B(),te("div",{key:0,fixed:"",ref_key:"box",ref:i,class:ft(["DraggableCard",t.class]),style:Ie([a(f),{zIndex:a(m)}]),onMousedown:v[0]||(v[0]=(...z)=>a(C)&&a(C)(...z))},[jo(R.$slots,"default",{onRef:N,moved:a(d)}),R.sizeDraggable?(B(),te(Re,{key:0},[T("div",{ref:a(r).target,absolute:"","right-full":"","top-0":"","bottom-0":"","w-5px":"","cursor-ew-resize":""},null,512),T("div",{ref:a(h).target,absolute:"","left-full":"","top-0":"","bottom-0":"","w-5px":"","cursor-ew-resize":""},null,512)],64)):de("",!0)],38)):de("",!0)]))}}),Cl=async e=>fetch("https://detect.gkd.li/api/getImportId?id="+e).then(t=>t.json()).catch(()=>0),je=qo("snapshot",()=>{const e=In(),t=En(),s=Wo(),n=Ln(),{snapshotImportId:l,snapshotImageId:r,importSnapshotId:h}=n,u=J();jt(()=>e.params.snapshotId,ne=>{u.value=Vo(ne)});const f=A(()=>{if(u.value)return l[u.value]}),p=A(()=>{if(u.value)return r[u.value]}),d=J();Ne(()=>{d.value&&(document.title="快照-"+(Pe(d.value).name||d.value.appId))});const b=J(),$=A(()=>{if(b.value)return URL.createObjectURL(new Blob([b.value],{type:"image/png"}))}),P=J(!1),i=br(async ne=>{if(P.value=!1,!ne){d.value=void 0,b.value=void 0;return}if(await Promise.all([ur.getItem(ne).then(j=>{d.value=j||void 0}),fr.getItem(ne).then(j=>{b.value=j||void 0})]),!d.value){const j=l[ne]||await Cl(ne);if(j&&Number.isSafeInteger(j)){P.value=!0,t.replace({path:"/i/"+j,query:e.query});return}}}),g=A(()=>i.loading);jt(()=>u.value,i.invoke),Ne(()=>{f.value&&n.inited&&!h[f.value]&&u.value&&fetch("https://detect.gkd.li/api/detectSnapshot?importId="+f.value)});const k=A(()=>hr()&&s.inited&&s.autoUploadImport&&n.inited);Ne(()=>{k.value&&d.value&&!p.value&&ir(d.value),k.value&&d.value&&!f.value&&sr(d.value),k.value&&d.value&&f.value&&dr(d.value.id,f.value)});const w=A(()=>d.value&&s.inited?d.value.nodes.length<=s.maxShowNodeSize?structuredClone(d.value.nodes):structuredClone(d.value.nodes.slice(0,s.maxShowNodeSize)):[]),N=A(()=>{if(w.value.length)return rr(w.value)}),C=A(()=>d.value?d.value.nodes.length-s.maxShowNodeSize:0),m=J(),c=J(0),y=J(),R=J(),v=async ne=>{m.value=ne,c.value=Date.now(),await et(),R.value&&!R.value.includes(ne)&&(y.value=void 0,R.value=void 0)};Ne(()=>{N.value&&v(N.value)});const z=ne=>{y.value=ne;const j=lr(w.value,y.value);j.length&&v(j[0]),j.length>1?R.value=j:R.value=void 0},F=ae(!1),M=J();return{snapshotId:u,snapshot:d,rootNode:N,screenshotUrl:$,loading:g,redirected:P,importId:f,imageId:p,focusNode:m,updateFocusNode:v,focusTime:c,overlapNodes:R,missNodeSize:C,focusPosition:y,updatePosition:z,trackData:M,trackShow:F,showTrack:(ne,j)=>{F.value=!0,M.value={selector:ne,nodes:w.value,queryResult:j}}}}),Sl={absolute:"","top-0":"","right-0":"","pt-4px":"","pr-8px":""},_l={key:0,flex:"","justify-between":"","items-center":""},Nl={flex:"","items-center":"","h-24px":"","px-2px":""},Rl={"max-w-500px":""},$l=Y({__name:"AttrCard",props:{show:{type:Boolean},onUpdateShow:{type:Function,default:rt}},setup(e){const{focusNode:t}=He(je()),s=A(()=>{const h=t.value;return h?{_id:{desc:"虚拟属性(真机不可用):生成快照访问节点顺序",type:"info",show:!0},_pid:{desc:"虚拟属性(真机不可用):父节点的 _id",type:"info",show:!0},_selector:{desc:"自动生成的选择器, 点击“_selector”可直接复制内容, 用于定位",type:"info",show:!0},depth:{desc:"使用此属性在某些应用上可能造成无限节点错误",type:"info",show:!0},id:{desc:"可快速查找",type:"quickFind",show:!!((h.quickFind||h.idQf)&&h.attr.id)},vid:{desc:"可快速查找",type:"quickFind",show:!!((h.quickFind||h.idQf)&&h.attr.vid)},text:{desc:"可快速查找",type:"quickFind",show:!!((h.quickFind||h.textQf)&&h.attr.text)}}:{}}),n=["text","desc"],l=A(()=>t.value?Object.entries(t.value.attr).map(([h,u])=>{var p,d,b;const f={name:h,value:u,desc:JSON.stringify(u),tip:(p=s.value[h])!=null&&p.show?s.value[h]:void 0};return n.includes(h)?[f,{name:h+".length",value:(d=u==null?void 0:u.length)!=null?d:null,desc:JSON.stringify((b=u==null?void 0:u.length)!=null?b:null),tip:void 0}]:f}).flat():[]),r=A(()=>t.value?ar(t.value):"");return(h,u)=>{const f=Oe("SvgIcon"),p=lt,d=Kn,b=Qt,$=Vr,P=yr,i=Gr,g=Wr,k=qr;return B(),ie($t,{initialValue:{top:40,right:10},class:"box-shadow-dim",show:h.show&&!!a(t)},{default:S(({onRef:w})=>[T("div",Sl,[_(p,{onClick:u[0]||(u[0]=N=>h.onUpdateShow(!h.show)),text:"",title:"最小化"},{icon:S(()=>[_(f,{name:"minus"})]),_:1})]),a(t)?(B(),ie(k,{key:0,size:"small",striped:"",singleLine:!1,class:"gkd_code",themeOverrides:{thPaddingSmall:"1px 3px",tdPaddingSmall:"0px 3px"}},{default:S(()=>[T("thead",null,[T("tr",{ref:w,"cursor-move":""},u[2]||(u[2]=[T("th",null,"Name",-1),T("th",null,"Value",-1)]),512)]),_(g,null,{default:S(()=>[(B(!0),te(Re,null,ze(a(l),N=>(B(),ie(i,{key:N.name},{default:S(()=>[_($,{onClick:C=>a(Te)(`${N.name}=${N.desc}`)},{default:S(()=>[N.tip?(B(),te("div",_l,[T("div",null,V(N.name),1),_(b,null,{trigger:S(()=>[_(d,{size:"16"},{default:S(()=>[N.tip.type=="info"?(B(),ie(f,{key:0,name:"info"})):N.tip.type=="quickFind"?(B(),ie(f,{key:1,name:"ok"})):de("",!0)]),_:2},1024)]),default:S(()=>[Z(" "+V(N.tip.desc),1)]),_:2},1024)])):(B(),te(Re,{key:1},[Z(V(N.name),1)],64))]),_:2},1032,["onClick"]),_($,null,{default:S(()=>[_(P,{class:ft(["w-[calc(var(--gkd-w)*0.12)]",{"text-left direction-rtl":N.name=="id","opacity-50":N.value===null}])},{default:S(()=>[Z(V(N.desc),1)]),_:2},1032,["class"])]),_:2},1024)]),_:2},1024))),128)),_(i,null,{default:S(()=>[_($,{colspan:"2"},{default:S(()=>[T("div",Nl,[_(b,null,{trigger:S(()=>[_(p,{text:"",onClick:u[1]||(u[1]=N=>a(Te)(a(r)))},{icon:S(()=>[_(d,{size:"20"},{default:S(()=>[_(f,{name:"path"})]),_:1})]),_:1})]),default:S(()=>[T("div",Rl,V(a(r)),1)]),_:1})])]),_:1})]),_:1})]),_:1})]),_:2},1024)):de("",!0)]),_:1},8,["show"])}}}),Pl={bg:"#eee","px-2px":""},Dl=Y({__name:"OverlapCard",setup(e){const t=je(),{focusNode:s,overlapNodes:n,focusPosition:l}=He(t),h=document.documentElement.scrollWidth/100*25.5;return(u,f)=>{const p=lt,d=An,b=Go;return B(),ie($t,{initialValue:{top:215,left:h},class:"box-shadow-dim w-420px",show:!!(a(n)&&a(l))},{default:S(({onRef:$})=>[a(n)&&a(l)?(B(),ie(b,{key:0,size:"small",closable:"",onClose:f[0]||(f[0]=P=>n.value=void 0)},{header:S(()=>[T("div",{ref:$,"cursor-move":""},[f[1]||(f[1]=Z(" 位置 ")),T("span",Pl,V(`${a(l).x.toFixed(0)},${a(l).y.toFixed(0)}`),1),Z(" 存在 "+V(a(n).length)+" 个层叠节点 ",1)],512)]),default:S(()=>[_(d,{style:{"max-height":"400px","overflow-y":"scroll","padding-bottom":"10px"},class:"scrollbar-hidden"},{default:S(()=>[(B(!0),te(Re,null,ze(a(n),P=>(B(),ie(p,{key:P.id,onClick:i=>a(t).updateFocusNode(P),size:"small",style:Ie(a(ht)(P,a(s)))},{default:S(()=>[Z(V(a(ot)(P)),1)]),_:2},1032,["onClick","style"]))),128))]),_:1})]),_:2},1024)):de("",!0)]),_:1},8,["initialValue","show"])}}}),Jt=Yo(),Vn=A(()=>Jt.width.value/100),Gn=A(()=>Math.max(1200,Jt.width.value));A(()=>Math.max(700,Jt.height.value));const Tl={"bg-white":"","b-1px":"","b-solid":"","b-gray-200":"","rounded-4px":"","p-8px":""},Il={flex:"","m-b-4px":"","pr-4px":""},El={"min-h-24px":""},Ll={key:0,"color-red":"","whitespace-pre":""},Kl=Y({__name:"RuleCard",props:{show:{type:Boolean},onUpdateShow:{type:Function,default:rt}},setup(e){const t=je(),s=He(t),{rootNode:n,focusNode:l}=s,r=s.snapshot,h=J(""),u=Qo(h,500),f=i=>{if(i==null)return[];if(typeof i=="string")return[i];if(Array.isArray(i)&&i.every(g=>typeof g=="string"))return i},p=i=>{const g=f(i.matches);if(!g)return"非法格式: matches";const k=f(i.anyMatches);if(!k)return"非法格式: anyMatches";const w=f(i.excludeMatches);if(!w)return"非法格式: excludeMatches";const N=[];for(let v=0;v<g.length;v++){const z=g[v];try{N.push(_t(z))}catch(F){const M=F instanceof Error?F.message:String(F);return`非法选择器: matches[${v}]
257
+ `)]),ee("empty","margin: auto;")]);var ll=function(e,t,s,n){function l(r){return r instanceof s?r:new s(function(h){h(r)})}return new(s||(s=Promise))(function(r,h){function u(d){try{p(n.next(d))}catch(b){h(b)}}function f(d){try{p(n.throw(d))}catch(b){h(b)}}function p(d){d.done?r(d.value):l(d.value).then(u,f)}p((n=n.apply(e,[])).next())})};function wn(e,t,s,n){return{getIsGroup(){return!1},getKey(r){return r[e]},getChildren:n||(r=>r[t]),getDisabled(r){return!!(r[s]||r.checkboxDisabled)}}}const al={allowCheckingNotLoaded:Boolean,filter:Function,defaultExpandAll:Boolean,expandedKeys:Array,keyField:{type:String,default:"key"},labelField:{type:String,default:"label"},childrenField:{type:String,default:"children"},disabledField:{type:String,default:"disabled"},defaultExpandedKeys:{type:Array,default:()=>[]},indeterminateKeys:Array,renderSwitcherIcon:Function,onUpdateIndeterminateKeys:[Function,Array],"onUpdate:indeterminateKeys":[Function,Array],onUpdateExpandedKeys:[Function,Array],"onUpdate:expandedKeys":[Function,Array],overrideDefaultNodeClickBehavior:Function},il=Object.assign(Object.assign(Object.assign(Object.assign({},Me.props),{accordion:Boolean,showIrrelevantNodes:{type:Boolean,default:!0},data:{type:Array,default:()=>[]},expandOnDragenter:{type:Boolean,default:!0},expandOnClick:Boolean,checkOnClick:{type:[Boolean,Function],default:!1},cancelable:{type:Boolean,default:!0},checkable:Boolean,draggable:Boolean,blockNode:Boolean,blockLine:Boolean,showLine:Boolean,disabled:Boolean,checkedKeys:Array,defaultCheckedKeys:{type:Array,default:()=>[]},selectedKeys:Array,defaultSelectedKeys:{type:Array,default:()=>[]},multiple:Boolean,pattern:{type:String,default:""},onLoad:Function,cascade:Boolean,selectable:{type:Boolean,default:!0},scrollbarProps:Object,indent:{type:Number,default:24},allowDrop:{type:Function,default:Yr},animated:{type:Boolean,default:!0},checkboxPlacement:{type:String,default:"left"},virtualScroll:Boolean,watchProps:Array,renderLabel:Function,renderPrefix:Function,renderSuffix:Function,nodeProps:Function,keyboard:{type:Boolean,default:!0},getChildren:Function,onDragenter:[Function,Array],onDragleave:[Function,Array],onDragend:[Function,Array],onDragstart:[Function,Array],onDragover:[Function,Array],onDrop:[Function,Array],onUpdateCheckedKeys:[Function,Array],"onUpdate:checkedKeys":[Function,Array],onUpdateSelectedKeys:[Function,Array],"onUpdate:selectedKeys":[Function,Array]}),al),{internalTreeSelect:Boolean,internalScrollable:Boolean,internalScrollablePadding:String,internalRenderEmpty:Function,internalHighlightKeySet:Object,internalUnifySelectCheck:Boolean,internalCheckboxFocusable:{type:Boolean,default:!0},internalFocusable:{type:Boolean,default:!0},checkStrategy:{type:String,default:"all"},leafOnly:Boolean}),sl=Y({name:"Tree",props:il,slots:Object,setup(e){const{mergedClsPrefixRef:t,inlineThemeDisabled:s,mergedRtlRef:n}=pt(e),l=vt("Tree",n,t),r=Me("Tree","-tree",rl,Mr,e,t),h=ae(null),u=ae(null),f=ae(null);function p(){var o;return(o=f.value)===null||o===void 0?void 0:o.listElRef}function d(){var o;return(o=f.value)===null||o===void 0?void 0:o.itemsElRef}const b=A(()=>{const{filter:o}=e;if(o)return o;const{labelField:x}=e;return(D,L)=>{if(!D.length)return!0;const K=L[x];return typeof K=="string"?K.toLowerCase().includes(D.toLowerCase()):!1}}),$=A(()=>{const{pattern:o}=e;return o?!o.length||!b.value?{filteredTree:e.data,highlightKeySet:null,expandedKeys:void 0}:nl(e.data,b.value,o,e.keyField,e.childrenField):{filteredTree:e.data,highlightKeySet:null,expandedKeys:void 0}}),P=A(()=>mn(e.showIrrelevantNodes?e.data:$.value.filteredTree,wn(e.keyField,e.childrenField,e.disabledField,e.getChildren))),i=Ue(Hn,null),g=e.internalTreeSelect?i.dataTreeMate:A(()=>e.showIrrelevantNodes?P.value:mn(e.data,wn(e.keyField,e.childrenField,e.disabledField,e.getChildren))),{watchProps:k}=e,w=ae([]);k!=null&&k.includes("defaultCheckedKeys")?Ne(()=>{w.value=e.defaultCheckedKeys}):w.value=e.defaultCheckedKeys;const N=G(e,"checkedKeys"),C=ut(N,w),m=A(()=>g.value.getCheckedKeys(C.value,{cascade:e.cascade,allowNotLoaded:e.allowCheckingNotLoaded})),c=el(e),y=A(()=>m.value.checkedKeys),R=A(()=>{const{indeterminateKeys:o}=e;return o!==void 0?o:m.value.indeterminateKeys}),v=ae([]);k!=null&&k.includes("defaultSelectedKeys")?Ne(()=>{v.value=e.defaultSelectedKeys}):v.value=e.defaultSelectedKeys;const z=G(e,"selectedKeys"),F=ut(z,v),M=ae([]),we=o=>{M.value=e.defaultExpandAll?g.value.getNonLeafKeys():o===void 0?e.defaultExpandedKeys:o};k!=null&&k.includes("defaultExpandedKeys")?Ne(()=>{we(void 0)}):Ne(()=>{we(e.defaultExpandedKeys)});const ne=G(e,"expandedKeys"),j=ut(ne,M),pe=A(()=>P.value.getFlattenedNodes(j.value)),{pendingNodeKeyRef:be,handleKeydown:fe}=Qr({props:e,mergedCheckedKeysRef:C,mergedSelectedKeysRef:F,fNodesRef:pe,mergedExpandedKeysRef:j,handleCheck:Et,handleSelect:Lt,handleSwitcherClick:tn});let ye=null,$e=null;const q=ae(new Set),at=A(()=>e.internalHighlightKeySet||$.value.highlightKeySet),ve=ut(at,q),E=ae(new Set),W=A(()=>j.value.filter(o=>!E.value.has(o)));let oe=0;const se=ae(null),ge=ae(null),mt=ae(null),bt=ae(null),yt=ae(0),Yn=A(()=>{const{value:o}=ge;return o?o.parent:null});let Pt=!1;Fe(G(e,"data"),()=>{Pt=!0,et(()=>{Pt=!1}),E.value.clear(),be.value=null,st()},{deep:!1});let Dt=!1;const Tt=()=>{Dt=!0,et(()=>{Dt=!1})};let it;Fe(G(e,"pattern"),(o,x)=>{if(e.showIrrelevantNodes)if(it=void 0,o){const{expandedKeys:D,highlightKeySet:L}=tl(e.data,e.pattern,e.keyField,e.childrenField,b.value);q.value=L,Tt(),We(D,xe(D),{node:null,action:"filter"})}else q.value=new Set;else if(!o.length)it!==void 0&&(Tt(),We(it,xe(it),{node:null,action:"filter"}));else{x.length||(it=j.value);const{expandedKeys:D}=$.value;D!==void 0&&(Tt(),We(D,xe(D),{node:null,action:"filter"}))}});function Zt(o){return ll(this,void 0,void 0,function*(){const{onLoad:x}=e;if(!x){yield Promise.resolve();return}const{value:D}=E;if(!D.has(o.key)){D.add(o.key);try{(yield x(o.rawNode))===!1&&Ve()}catch(L){console.error(L),Ve()}D.delete(o.key)}})}Ne(()=>{var o;const{value:x}=P;if(!x)return;const{getNode:D}=x;(o=j.value)===null||o===void 0||o.forEach(L=>{const K=D(L);K&&!K.shallowLoaded&&Zt(K)})});const qe=ae(!1),Le=ae([]);Fe(W,(o,x)=>{if(!e.animated||Dt){et(xt);return}if(Pt)return;const D=dt(r.value.self.nodeHeight),L=new Set(x);let K=null,re=null;for(const X of o)if(!L.has(X)){if(K!==null)return;K=X}const me=new Set(o);for(const X of x)if(!me.has(X)){if(re!==null)return;re=X}if(K===null&&re===null)return;const{virtualScroll:ke}=e,Ye=(ke?f.value.listElRef:h.value).offsetHeight,Qe=Math.ceil(Ye/D)+1;let Ce;if(K!==null&&(Ce=x),re!==null&&(Ce===void 0?Ce=o:Ce=Ce.filter(X=>X!==re)),qe.value=!0,Le.value=P.value.getFlattenedNodes(Ce),K!==null){const X=Le.value.findIndex(Se=>Se.key===K);if(~X){const Se=Le.value[X].children;if(Se){const _e=bn(Se,o);Le.value.splice(X+1,0,{__motion:!0,mode:"expand",height:ke?_e.length*D:void 0,nodes:ke?_e.slice(0,Qe):_e})}}}if(re!==null){const X=Le.value.findIndex(Se=>Se.key===re);if(~X){const Se=Le.value[X].children;if(!Se)return;qe.value=!0;const _e=bn(Se,o);Le.value.splice(X+1,0,{__motion:!0,mode:"collapse",height:ke?_e.length*D:void 0,nodes:ke?_e.slice(0,Qe):_e})}}});const Qn=A(()=>mr(pe.value)),Xn=A(()=>qe.value?Le.value:pe.value);function xt(){const{value:o}=u;o&&o.sync()}function Jn(){qe.value=!1,e.virtualScroll&&et(xt)}function xe(o){const{getNode:x}=g.value;return o.map(D=>{var L;return((L=x(D))===null||L===void 0?void 0:L.rawNode)||null})}function We(o,x,D){const{"onUpdate:expandedKeys":L,onUpdateExpandedKeys:K}=e;M.value=o,L&&ce(L,o,x,D),K&&ce(K,o,x,D)}function en(o,x,D){const{"onUpdate:checkedKeys":L,onUpdateCheckedKeys:K}=e;w.value=o,K&&ce(K,o,x,D),L&&ce(L,o,x,D)}function Zn(o,x){const{"onUpdate:indeterminateKeys":D,onUpdateIndeterminateKeys:L}=e;D&&ce(D,o,x),L&&ce(L,o,x)}function It(o,x,D){const{"onUpdate:selectedKeys":L,onUpdateSelectedKeys:K}=e;v.value=o,K&&ce(K,o,x,D),L&&ce(L,o,x,D)}function eo(o){const{onDragenter:x}=e;x&&ce(x,o)}function to(o){const{onDragleave:x}=e;x&&ce(x,o)}function no(o){const{onDragend:x}=e;x&&ce(x,o)}function oo(o){const{onDragstart:x}=e;x&&ce(x,o)}function ro(o){const{onDragover:x}=e;x&&ce(x,o)}function lo(o){const{onDrop:x}=e;x&&ce(x,o)}function st(){ao(),Be()}function ao(){se.value=null}function Be(){yt.value=0,ge.value=null,mt.value=null,bt.value=null,Ve()}function Ve(){ye&&(window.clearTimeout(ye),ye=null),$e=null}function Et(o,x){if(e.disabled||Ke(o,e.disabledField))return;if(e.internalUnifySelectCheck&&!e.multiple){Lt(o);return}const D=x?"check":"uncheck",{checkedKeys:L,indeterminateKeys:K}=g.value[D](o.key,y.value,{cascade:e.cascade,checkStrategy:c.value,allowNotLoaded:e.allowCheckingNotLoaded});en(L,xe(L),{node:o.rawNode,action:D}),Zn(K,xe(K))}function io(o){if(e.disabled)return;const{key:x}=o,{value:D}=j,L=D.findIndex(K=>K===x);if(~L){const K=Array.from(D);K.splice(L,1),We(K,xe(K),{node:o.rawNode,action:"collapse"})}else{const K=P.value.getNode(x);if(!K||K.isLeaf)return;let re;if(e.accordion){const me=new Set(o.siblings.map(({key:ke})=>ke));re=D.filter(ke=>!me.has(ke)),re.push(x)}else re=D.concat(x);We(re,xe(re),{node:o.rawNode,action:"expand"})}}function tn(o){e.disabled||qe.value||io(o)}function Lt(o){if(!(e.disabled||!e.selectable)){if(be.value=o.key,e.internalUnifySelectCheck){const{value:{checkedKeys:x,indeterminateKeys:D}}=m;e.multiple?Et(o,!(x.includes(o.key)||D.includes(o.key))):en([o.key],xe([o.key]),{node:o.rawNode,action:"check"})}if(e.multiple){const x=Array.from(F.value),D=x.findIndex(L=>L===o.key);~D?e.cancelable&&x.splice(D,1):~D||x.push(o.key),It(x,xe(x),{node:o.rawNode,action:~D?"unselect":"select"})}else F.value.includes(o.key)?e.cancelable&&It([],[],{node:o.rawNode,action:"unselect"}):It([o.key],xe([o.key]),{node:o.rawNode,action:"select"})}}function so(o){if(ye&&(window.clearTimeout(ye),ye=null),o.isLeaf)return;$e=o.key;const x=()=>{if($e!==o.key)return;const{value:D}=mt;if(D&&D.key===o.key&&!j.value.includes(o.key)){const L=j.value.concat(o.key);We(L,xe(L),{node:o.rawNode,action:"expand"})}ye=null,$e=null};o.shallowLoaded?ye=window.setTimeout(()=>{x()},1e3):ye=window.setTimeout(()=>{Zt(o).then(()=>{x()})},1e3)}function co({event:o,node:x}){!e.draggable||e.disabled||Ke(x,e.disabledField)||(nn({event:o,node:x},!1),eo({event:o,node:x.rawNode}))}function uo({event:o,node:x}){!e.draggable||e.disabled||Ke(x,e.disabledField)||to({event:o,node:x.rawNode})}function fo(o){o.target===o.currentTarget&&Be()}function ho({event:o,node:x}){st(),!(!e.draggable||e.disabled||Ke(x,e.disabledField))&&no({event:o,node:x.rawNode})}function po({event:o,node:x}){!e.draggable||e.disabled||Ke(x,e.disabledField)||(oe=o.clientX,se.value=x,oo({event:o,node:x.rawNode}))}function nn({event:o,node:x},D=!0){var L;if(!e.draggable||e.disabled||Ke(x,e.disabledField))return;const{value:K}=se;if(!K)return;const{allowDrop:re,indent:me}=e;D&&ro({event:o,node:x.rawNode});const ke=o.currentTarget,{height:Ye,top:Qe}=ke.getBoundingClientRect(),Ce=o.clientY-Qe;let X;re({node:x.rawNode,dropPosition:"inside",phase:"drag"})?Ce<=8?X="before":Ce>=Ye-8?X="after":X="inside":Ce<=Ye/2?X="before":X="after";const{value:_e}=Qn;let Q,ue;const Xe=_e(x.key);if(Xe===null){Be();return}let kt=!1;X==="inside"?(Q=x,ue="inside"):X==="before"?x.isFirstChild?(Q=x,ue="before"):(Q=pe.value[Xe-1],ue="after"):(Q=x,ue="after"),!Q.isLeaf&&j.value.includes(Q.key)&&(kt=!0,ue==="after"&&(Q=pe.value[Xe+1],Q?ue="before":(Q=x,ue="inside")));const rn=Q;if(mt.value=rn,!kt&&K.isLastChild&&K.key===Q.key&&(ue="after"),ue==="after"){let ln=oe-o.clientX,Kt=0;for(;ln>=me/2&&Q.parent!==null&&Q.isLastChild&&Kt<1;)ln-=me,Kt+=1,Q=Q.parent;yt.value=Kt}else yt.value=0;if((K.contains(Q)||ue==="inside"&&((L=K.parent)===null||L===void 0?void 0:L.key)===Q.key)&&!(K.key===rn.key&&K.key===Q.key)){Be();return}if(!re({node:Q.rawNode,dropPosition:ue,phase:"drag"})){Be();return}if(K.key===Q.key)Ve();else if($e!==Q.key)if(ue==="inside"){if(e.expandOnDragenter){if(so(Q),!Q.shallowLoaded&&$e!==Q.key){st();return}}else if(!Q.shallowLoaded){st();return}}else Ve();else ue!=="inside"&&Ve();bt.value=ue,ge.value=Q}function vo({event:o,node:x,dropPosition:D}){if(!e.draggable||e.disabled||Ke(x,e.disabledField))return;const{value:L}=se,{value:K}=ge,{value:re}=bt;if(!(!L||!K||!re)&&e.allowDrop({node:K.rawNode,dropPosition:re,phase:"drag"})&&L.key!==K.key){if(re==="before"){const me=L.getNext({includeDisabled:!0});if(me&&me.key===K.key){Be();return}}if(re==="after"){const me=L.getPrev({includeDisabled:!0});if(me&&me.key===K.key){Be();return}}lo({event:o,node:K.rawNode,dragNode:L.rawNode,dropPosition:D}),st()}}function go(){xt()}function mo(){xt()}function bo(o){var x;if(e.virtualScroll||e.internalScrollable){const{value:D}=u;if(!((x=D==null?void 0:D.containerRef)===null||x===void 0)&&x.contains(o.relatedTarget))return;be.value=null}else{const{value:D}=h;if(D!=null&&D.contains(o.relatedTarget))return;be.value=null}}Fe(be,o=>{var x,D;if(o!==null){if(e.virtualScroll)(x=f.value)===null||x===void 0||x.scrollTo({key:o});else if(e.internalScrollable){const{value:L}=u;if(L===null)return;const K=(D=L.contentRef)===null||D===void 0?void 0:D.querySelector(`[data-key="${On(o)}"]`);if(!K)return;L.scrollTo({el:K})}}}),qt(gt,{loadingKeysRef:E,highlightKeySetRef:ve,displayedCheckedKeysRef:y,displayedIndeterminateKeysRef:R,mergedSelectedKeysRef:F,mergedExpandedKeysRef:j,mergedThemeRef:r,mergedCheckStrategyRef:c,nodePropsRef:G(e,"nodeProps"),disabledRef:G(e,"disabled"),checkableRef:G(e,"checkable"),selectableRef:G(e,"selectable"),expandOnClickRef:G(e,"expandOnClick"),onLoadRef:G(e,"onLoad"),draggableRef:G(e,"draggable"),blockLineRef:G(e,"blockLine"),indentRef:G(e,"indent"),cascadeRef:G(e,"cascade"),checkOnClickRef:G(e,"checkOnClick"),checkboxPlacementRef:e.checkboxPlacement,droppingMouseNodeRef:mt,droppingNodeParentRef:Yn,draggingNodeRef:se,droppingPositionRef:bt,droppingOffsetLevelRef:yt,fNodesRef:pe,pendingNodeKeyRef:be,showLineRef:G(e,"showLine"),disabledFieldRef:G(e,"disabledField"),internalScrollableRef:G(e,"internalScrollable"),internalCheckboxFocusableRef:G(e,"internalCheckboxFocusable"),internalTreeSelect:e.internalTreeSelect,renderLabelRef:G(e,"renderLabel"),renderPrefixRef:G(e,"renderPrefix"),renderSuffixRef:G(e,"renderSuffix"),renderSwitcherIconRef:G(e,"renderSwitcherIcon"),labelFieldRef:G(e,"labelField"),multipleRef:G(e,"multiple"),overrideDefaultNodeClickBehaviorRef:G(e,"overrideDefaultNodeClickBehavior"),handleSwitcherClick:tn,handleDragEnd:ho,handleDragEnter:co,handleDragLeave:uo,handleDragStart:po,handleDrop:vo,handleDragOver:nn,handleSelect:Lt,handleCheck:Et});function yo(o,x){var D,L;typeof o=="number"?(D=f.value)===null||D===void 0||D.scrollTo(o,x||0):(L=f.value)===null||L===void 0||L.scrollTo(o)}const xo={handleKeydown:fe,scrollTo:yo,getCheckedData:()=>{if(!e.checkable)return{keys:[],options:[]};const{checkedKeys:o}=m.value;return{keys:o,options:xe(o)}},getIndeterminateData:()=>{if(!e.checkable)return{keys:[],options:[]};const{indeterminateKeys:o}=m.value;return{keys:o,options:xe(o)}}},on=A(()=>{const{common:{cubicBezierEaseInOut:o},self:{fontSize:x,nodeBorderRadius:D,nodeColorHover:L,nodeColorPressed:K,nodeColorActive:re,arrowColor:me,loadingColor:ke,nodeTextColor:Ye,nodeTextColorDisabled:Qe,dropMarkColor:Ce,nodeWrapperPadding:X,nodeHeight:Se,lineHeight:_e,lineColor:Q}}=r.value,ue=Bt(X,"top"),Xe=Bt(X,"bottom"),kt=Dn(dt(Se)-dt(ue)-dt(Xe));return{"--n-arrow-color":me,"--n-loading-color":ke,"--n-bezier":o,"--n-font-size":x,"--n-node-border-radius":D,"--n-node-color-active":re,"--n-node-color-hover":L,"--n-node-color-pressed":K,"--n-node-text-color":Ye,"--n-node-text-color-disabled":Qe,"--n-drop-mark-color":Ce,"--n-node-wrapper-padding":X,"--n-line-offset-top":`-${ue}`,"--n-line-offset-bottom":`-${Xe}`,"--n-node-content-height":kt,"--n-line-height":_e,"--n-line-color":Q}}),Ge=s?Vt("tree",void 0,on,e):void 0;return Object.assign(Object.assign({},xo),{mergedClsPrefix:t,mergedTheme:r,rtlEnabled:l,fNodes:Xn,aip:qe,selfElRef:h,virtualListInstRef:f,scrollbarInstRef:u,handleFocusout:bo,handleDragLeaveTree:fo,handleScroll:go,getScrollContainer:p,getScrollContent:d,handleAfterEnter:Jn,handleResize:mo,cssVars:s?void 0:on,themeClass:Ge==null?void 0:Ge.themeClass,onRender:Ge==null?void 0:Ge.onRender})},render(){var e;const{fNodes:t,internalRenderEmpty:s}=this;if(!t.length&&s)return s();const{mergedClsPrefix:n,blockNode:l,blockLine:r,draggable:h,disabled:u,internalFocusable:f,checkable:p,handleKeydown:d,rtlEnabled:b,handleFocusout:$,scrollbarProps:P}=this,i=f&&!u,g=i?"0":void 0,k=[`${n}-tree`,b&&`${n}-tree--rtl`,p&&`${n}-tree--checkable`,(r||l)&&`${n}-tree--block-node`,r&&`${n}-tree--block-line`],w=C=>"__motion"in C?I(ol,{height:C.height,nodes:C.nodes,clsPrefix:n,mode:C.mode,onAfterEnter:this.handleAfterEnter}):I(qn,{key:C.key,tmNode:C,clsPrefix:n});if(this.virtualScroll){const{mergedTheme:C,internalScrollablePadding:m}=this,c=Bt(m||"0");return I(sn,Object.assign({},P,{ref:"scrollbarInstRef",onDragleave:h?this.handleDragLeaveTree:void 0,container:this.getScrollContainer,content:this.getScrollContent,class:k,theme:C.peers.Scrollbar,themeOverrides:C.peerOverrides.Scrollbar,tabindex:g,onKeydown:i?d:void 0,onFocusout:i?$:void 0}),{default:()=>{var y;return(y=this.onRender)===null||y===void 0||y.call(this),t.length?I(gr,{ref:"virtualListInstRef",items:this.fNodes,itemSize:dt(C.self.nodeHeight),ignoreItemResize:this.aip,paddingTop:c.top,paddingBottom:c.bottom,class:this.themeClass,style:[this.cssVars,{paddingLeft:c.left,paddingRight:c.right}],onScroll:this.handleScroll,onResize:this.handleResize,showScrollbar:!1,itemResizable:!0},{default:({item:R})=>w(R)}):dn(this.$slots.empty,()=>[I(yn,{class:`${n}-tree__empty`,theme:this.mergedTheme.peers.Empty,themeOverrides:this.mergedTheme.peerOverrides.Empty})])}})}const{internalScrollable:N}=this;return k.push(this.themeClass),(e=this.onRender)===null||e===void 0||e.call(this),N?I(sn,Object.assign({},P,{class:k,tabindex:g,onKeydown:i?d:void 0,onFocusout:i?$:void 0,style:this.cssVars,contentStyle:{padding:this.internalScrollablePadding}}),{default:()=>I("div",{onDragleave:h?this.handleDragLeaveTree:void 0,ref:"selfElRef"},this.fNodes.map(w))}):I("div",{class:k,tabindex:g,ref:"selfElRef",style:this.cssVars,onKeydown:i?d:void 0,onFocusout:i?$:void 0,onDragleave:h?this.handleDragLeaveTree:void 0},t.length?t.map(w):dn(this.$slots.empty,()=>[I(yn,{class:`${n}-tree__empty`,theme:this.mergedTheme.peers.Empty,themeOverrides:this.mergedTheme.peerOverrides.Empty})]))}}),dl={class:"TrackCard",flex:"","flex-col":"","h-full":"","p-12px":"","box-border":"","gap-8px":"","overflow-hidden":""},cl={flex:"","justify-between":"","items-center":""},ul={flex:"","items-center":"","gap-4px":""},fl={"flex-1":"",flex:"","gap-12px":"","overflow-hidden":""},hl={"self-stretch":"",flex:"[2]"},pl={"mb-24px":"","break-all":"","px-4px":"","py-2px":"",bg:"#eee"},vl={flex:"","flex-col":"","gap-12px":""},gl={key:0,flex:"","gap-8px":""},ml=["onClick"],Wn=()=>Mo(()=>import("./TrackGraph-DdCOvVKa.js"),__vite__mapDeps([0,1,2,3,4,5]),import.meta.url),bl=Oo({loader:Wn,delay:0});setTimeout(Wn,3e3);const yl=Y({__name:"TrackCard",props:{nodes:{},queryResult:{},selector:{},onClose:{type:Function,default:rt}},setup(e){const t=e,s=A(()=>t.queryResult?t.queryResult.unitResults.asJsReadonlyArrayView().concat():[]),n=A(()=>s.value.filter(f=>!f.context.prev)),l=A(()=>s.value.filter(f=>f.context.prev)),r=J([]);Ne(()=>{r.value=l.value});const h=f=>{r.value.includes(f)?r.value=r.value.filter(p=>p!==f):r.value=r.value.concat(f)},u=f=>{const p=f.value;return p instanceof hn&&s.value.some(d=>d.expression===p)&&!f.outChildren.some(d=>d.value instanceof hn)?{outline:"1px solid #00F"}:""};return(f,p)=>{const d=Oe("SvgIcon"),b=lt,$=Xt;return B(),te("div",dl,[T("div",cl,[T("div",ul,[_(d,{name:"path",h:"24px"}),p[0]||(p[0]=T("div",{text:"20px/28px","font-bold":""},"选择器路径视图",-1))]),_(b,{text:"",onClick:f.onClose},{default:S(()=>[_(d,{name:"close",h:"20px"})]),_:1},8,["onClick"])]),T("div",fl,[T("div",hl,[f.nodes.length&&f.queryResult?(B(),ie(a(bl),{key:0,nodes:f.nodes,queryResult:f.queryResult,showUnitResults:a(l),filterUnitResults:a(r),class:"h-[calc(100%-2px)] b-1px b-solid"},null,8,["nodes","queryResult","showUnitResults","filterUnitResults"])):de("",!0),p[1]||(p[1]=T("div",{relative:"","pointer-events-none":"","z-1":""},[T("div",{absolute:"","left-8px":"","bottom-8px":"",text:"14px/14px #6C6E71"}," *为简化视图已隐藏无关节点 ")],-1))]),_($,{class:"self-stretch flex-1 text-20px leading-28px gkd_code"},{default:S(()=>[T("div",pl,[_(St,{source:f.selector.source,node:f.selector.ast,getNodeStyle:u},null,8,["source","node"])]),T("div",vl,[a(n).length?(B(),te("div",gl,[(B(!0),te(Re,null,ze(a(n),(P,i)=>(B(),te("div",{key:i,"break-all":"","px-4px":"","py-2px":"","b-1px":"","b-solid":"",b:"#ccc"},[_(St,{source:f.selector.source,node:f.selector.findAst(P.expression)},null,8,["source","node"])]))),128))])):de("",!0),(B(!0),te(Re,null,ze(a(l),(P,i)=>(B(),te("div",{key:i,"cursor-pointer":"","break-all":"","px-4px":"","py-2px":"","b-1px":"","b-solid":"","transition-colors":"",onClick:g=>h(P),style:Ie({borderColor:a(wt)[i%a(wt).length],backgroundColor:a(r).includes(P)?"#eee":void 0})},[T("div",{"inline-block":"","align-middle":"","size-20px":"",style:Ie({backgroundColor:a(wt)[i%a(wt).length]})},null,4),p[2]||(p[2]=T("span",{"pl-4px":""},null,-1)),_(St,{source:f.selector.source,node:f.selector.findAst(P.expression)},null,8,["source","node"])],12,ml))),128))])]),_:1})])])}}}),xl=Y({__name:"TrackModal",props:{data:{},show:{type:Boolean},onUpdateShow:{type:Function,default:rt},onUpdateData:{type:Function,default:rt}},setup(e){const t=e,s=ae(!1),n=ae(0);return jt(()=>t.show,async()=>{t.show?(s.value=!0,n.value=-1,await new Promise(l=>setTimeout(l,300)),n.value=0):(n.value=1,await new Promise(l=>setTimeout(l,300)),s.value=!1,n.value=0,t.onUpdateData())}),Uo("keyup",l=>{l.key==="Escape"&&t.onUpdateShow(!1)}),(l,r)=>a(s)?(B(),te("div",{key:0,class:ft(["TrackModal",{"track-model-enter":a(n)===-1,"track-model-exit":a(n)===1}]),absolute:"","left-0":"","top-0":"","bg-white":"","z-3000":"",w:"[--gkd-w]",h:"[--gkd-h]"},[l.data?(B(),ie(yl,Ho({key:0},l.data,{onClose:r[0]||(r[0]=h=>l.onUpdateShow(!1))}),null,16)):de("",!0)],2)):de("",!0)}}),kl=or(xl,[["__scopeId","data-v-66dad45d"]]),Cn=e=>{const t=J(),s={x:0,y:0},n=Yt({...s});let l;const r=d=>{l&&d.preventDefault()},h=d=>{l=d,s.x=n.x,s.y=n.y},u=d=>{if(!l||!t.value)return;const b=d.clientX-l.clientX,$=d.clientY-l.clientY;e(b)&&(n.x=s.x+b),n.y=s.y+$},f=()=>{l=void 0},p=()=>{if(!t.value||!l)return;f();const{top:d,bottom:b,left:$,right:P}=t.value.getBoundingClientRect();(P<0||$>window.innerWidth||b<0||d>window.innerHeight)&&(n.x=s.x,n.y=s.y)};return Rt(()=>{window.addEventListener("pointermove",u),window.addEventListener("pointerup",p),document.addEventListener("selectstart",r)}),Nt(()=>{window.removeEventListener("pointermove",u),window.removeEventListener("pointerup",p),document.removeEventListener("selectstart",r),f()}),Fe(t,(d,b)=>{d&&(d.addEventListener("pointerdown",h),d.addEventListener("pointerup",f)),b&&(b.removeEventListener("pointerdown",h),b.removeEventListener("pointerup",f))}),Nt(()=>{t.value&&(t.value.removeEventListener("pointerdown",h),t.value.removeEventListener("pointerup",f))}),{target:t,offset:n}};let ct=1e3;const wl=()=>{ct++;const e=J(ct);return{zIndex:e,setTop:()=>{e.value!==ct&&(ct++,e.value=ct)}}},Sn="transition-top,bottom,left,right-500",$t=Y({__name:"DraggableCard",props:{initialValue:{default:()=>({})},minWidth:{},sizeDraggable:{type:Boolean},show:{type:Boolean,default:!0},class:{}},setup(e){var c,y;const t=e,s=t.initialValue.left!==void 0,n=t.initialValue.top!==void 0,l={x:(c=s?t.initialValue.left:t.initialValue.right)!=null?c:0,y:(y=n?t.initialValue.top:t.initialValue.bottom)!=null?y:0},r=Cn(R=>{const v=(t.initialValue.width||0)+h.offset.x+-r.offset.x-R;return(t.minWidth||0)<v}),h=Cn(R=>{const v=(t.initialValue.width||0)+h.offset.x+R-r.offset.x;return(t.minWidth||0)<v}),u=Yt({...l}),f=A(()=>{const R=(t.initialValue.width||0)+h.offset.x-r.offset.x,v=t.initialValue.width?`width:${R}px;`:"",z=n?`top:${u.y}px;`:`bottom:${u.y}px;`;return s?`left:${u.x-r.offset.x}px;`+z+v:`right:${u.x-h.offset.x}px;`+z+v});let p;const d=J(!1),b=R=>{p=R,l.x=u.x,l.y=u.y,d.value=!1},$=R=>{if(!g.value||!p)return;const v=R.clientX-p.clientX,z=R.clientY-p.clientY;u.x=l.x+(s?v:-v),u.y=l.y+(n?z:-z),d.value=!0},P=()=>{p=void 0},i=J(),g=J(),k=R=>{p&&R.preventDefault()},w=()=>{if(!g.value||!p)return;P();const{top:R,bottom:v,left:z,right:F}=g.value.getBoundingClientRect();if(F<0||z>window.innerWidth||v<0||R>window.innerHeight){u.x=l.x,u.y=l.y;const M=i.value;M&&(M.classList.add(Sn),setTimeout(()=>{M.classList.remove(Sn)},550))}};Rt(()=>{window.addEventListener("pointermove",$),window.addEventListener("pointerup",w),document.addEventListener("selectstart",k)}),Nt(()=>{window.removeEventListener("pointermove",$),window.removeEventListener("pointerup",w),document.removeEventListener("selectstart",k),P()}),Fe(g,(R,v)=>{R&&(R.addEventListener("pointerdown",b),R.addEventListener("pointerup",P)),v&&(v.removeEventListener("pointerdown",b),v.removeEventListener("pointerup",P))}),Nt(()=>{g.value&&(g.value.removeEventListener("pointerdown",b),g.value.removeEventListener("pointerup",P))});const N=R=>{R instanceof HTMLElement?g.value=R:g.value=void 0},{setTop:C,zIndex:m}=wl();return Fe(()=>t.show,()=>{t.show&&C()}),(R,v)=>(B(),ie(Tn,{to:"body"},[R.show?(B(),te("div",{key:0,fixed:"",ref_key:"box",ref:i,class:ft(["DraggableCard",t.class]),style:Ie([a(f),{zIndex:a(m)}]),onMousedown:v[0]||(v[0]=(...z)=>a(C)&&a(C)(...z))},[jo(R.$slots,"default",{onRef:N,moved:a(d)}),R.sizeDraggable?(B(),te(Re,{key:0},[T("div",{ref:a(r).target,absolute:"","right-full":"","top-0":"","bottom-0":"","w-5px":"","cursor-ew-resize":""},null,512),T("div",{ref:a(h).target,absolute:"","left-full":"","top-0":"","bottom-0":"","w-5px":"","cursor-ew-resize":""},null,512)],64)):de("",!0)],38)):de("",!0)]))}}),Cl=async e=>fetch("https://detect.gkd.li/api/getImportId?id="+e).then(t=>t.json()).catch(()=>0),je=qo("snapshot",()=>{const e=In(),t=En(),s=Wo(),n=Ln(),{snapshotImportId:l,snapshotImageId:r,importSnapshotId:h}=n,u=J();jt(()=>e.params.snapshotId,ne=>{u.value=Vo(ne)});const f=A(()=>{if(u.value)return l[u.value]}),p=A(()=>{if(u.value)return r[u.value]}),d=J();Ne(()=>{d.value&&(document.title="快照-"+(Pe(d.value).name||d.value.appId))});const b=J(),$=A(()=>{if(b.value)return URL.createObjectURL(new Blob([b.value],{type:"image/png"}))}),P=J(!1),i=br(async ne=>{if(P.value=!1,!ne){d.value=void 0,b.value=void 0;return}if(await Promise.all([ur.getItem(ne).then(j=>{d.value=j||void 0}),fr.getItem(ne).then(j=>{b.value=j||void 0})]),!d.value){const j=l[ne]||await Cl(ne);if(j&&Number.isSafeInteger(j)){P.value=!0,t.replace({path:"/i/"+j,query:e.query});return}}}),g=A(()=>i.loading);jt(()=>u.value,i.invoke),Ne(()=>{f.value&&n.inited&&!h[f.value]&&u.value&&fetch("https://detect.gkd.li/api/detectSnapshot?importId="+f.value)});const k=A(()=>hr()&&s.inited&&s.autoUploadImport&&n.inited);Ne(()=>{k.value&&d.value&&!p.value&&ir(d.value),k.value&&d.value&&!f.value&&sr(d.value),k.value&&d.value&&f.value&&dr(d.value.id,f.value)});const w=A(()=>d.value&&s.inited?d.value.nodes.length<=s.maxShowNodeSize?structuredClone(d.value.nodes):structuredClone(d.value.nodes.slice(0,s.maxShowNodeSize)):[]),N=A(()=>{if(w.value.length)return rr(w.value)}),C=A(()=>d.value?d.value.nodes.length-s.maxShowNodeSize:0),m=J(),c=J(0),y=J(),R=J(),v=async ne=>{m.value=ne,c.value=Date.now(),await et(),R.value&&!R.value.includes(ne)&&(y.value=void 0,R.value=void 0)};Ne(()=>{N.value&&v(N.value)});const z=ne=>{y.value=ne;const j=lr(w.value,y.value);j.length&&v(j[0]),j.length>1?R.value=j:R.value=void 0},F=ae(!1),M=J();return{snapshotId:u,snapshot:d,rootNode:N,screenshotUrl:$,loading:g,redirected:P,importId:f,imageId:p,focusNode:m,updateFocusNode:v,focusTime:c,overlapNodes:R,missNodeSize:C,focusPosition:y,updatePosition:z,trackData:M,trackShow:F,showTrack:(ne,j)=>{F.value=!0,M.value={selector:ne,nodes:w.value,queryResult:j}}}}),Sl={absolute:"","top-0":"","right-0":"","pt-4px":"","pr-8px":""},_l={key:0,flex:"","justify-between":"","items-center":""},Nl={flex:"","items-center":"","h-24px":"","px-2px":""},Rl={"max-w-500px":""},$l=Y({__name:"AttrCard",props:{show:{type:Boolean},onUpdateShow:{type:Function,default:rt}},setup(e){const{focusNode:t}=He(je()),s=A(()=>{const h=t.value;return h?{_id:{desc:"虚拟属性(真机不可用):生成快照访问节点顺序",type:"info",show:!0},_pid:{desc:"虚拟属性(真机不可用):父节点的 _id",type:"info",show:!0},_selector:{desc:"自动生成的选择器, 点击“_selector”可直接复制内容, 用于定位",type:"info",show:!0},depth:{desc:"使用此属性在某些应用上可能造成无限节点错误",type:"info",show:!0},id:{desc:"可快速查找",type:"quickFind",show:!!((h.quickFind||h.idQf)&&h.attr.id)},vid:{desc:"可快速查找",type:"quickFind",show:!!((h.quickFind||h.idQf)&&h.attr.vid)},text:{desc:"可快速查找",type:"quickFind",show:!!((h.quickFind||h.textQf)&&h.attr.text)}}:{}}),n=["text","desc"],l=A(()=>t.value?Object.entries(t.value.attr).map(([h,u])=>{var p,d,b;const f={name:h,value:u,desc:JSON.stringify(u),tip:(p=s.value[h])!=null&&p.show?s.value[h]:void 0};return n.includes(h)?[f,{name:h+".length",value:(d=u==null?void 0:u.length)!=null?d:null,desc:JSON.stringify((b=u==null?void 0:u.length)!=null?b:null),tip:void 0}]:f}).flat():[]),r=A(()=>t.value?ar(t.value):"");return(h,u)=>{const f=Oe("SvgIcon"),p=lt,d=Kn,b=Qt,$=Vr,P=yr,i=Gr,g=Wr,k=qr;return B(),ie($t,{initialValue:{top:40,right:10},class:"box-shadow-dim",show:h.show&&!!a(t)},{default:S(({onRef:w})=>[T("div",Sl,[_(p,{onClick:u[0]||(u[0]=N=>h.onUpdateShow(!h.show)),text:"",title:"最小化"},{icon:S(()=>[_(f,{name:"minus"})]),_:1})]),a(t)?(B(),ie(k,{key:0,size:"small",striped:"",singleLine:!1,class:"gkd_code",themeOverrides:{thPaddingSmall:"1px 3px",tdPaddingSmall:"0px 3px"}},{default:S(()=>[T("thead",null,[T("tr",{ref:w,"cursor-move":""},u[2]||(u[2]=[T("th",null,"Name",-1),T("th",null,"Value",-1)]),512)]),_(g,null,{default:S(()=>[(B(!0),te(Re,null,ze(a(l),N=>(B(),ie(i,{key:N.name},{default:S(()=>[_($,{onClick:C=>a(Te)(`${N.name}=${N.desc}`)},{default:S(()=>[N.tip?(B(),te("div",_l,[T("div",null,V(N.name),1),_(b,null,{trigger:S(()=>[_(d,{size:"16"},{default:S(()=>[N.tip.type=="info"?(B(),ie(f,{key:0,name:"info"})):N.tip.type=="quickFind"?(B(),ie(f,{key:1,name:"ok"})):de("",!0)]),_:2},1024)]),default:S(()=>[Z(" "+V(N.tip.desc),1)]),_:2},1024)])):(B(),te(Re,{key:1},[Z(V(N.name),1)],64))]),_:2},1032,["onClick"]),_($,null,{default:S(()=>[_(P,{class:ft(["w-[calc(var(--gkd-w)*0.12)]",{"text-left direction-rtl":N.name=="id","opacity-50":N.value===null}])},{default:S(()=>[Z(V(N.desc),1)]),_:2},1032,["class"])]),_:2},1024)]),_:2},1024))),128)),_(i,null,{default:S(()=>[_($,{colspan:"2"},{default:S(()=>[T("div",Nl,[_(b,null,{trigger:S(()=>[_(p,{text:"",onClick:u[1]||(u[1]=N=>a(Te)(a(r)))},{icon:S(()=>[_(d,{size:"20"},{default:S(()=>[_(f,{name:"path"})]),_:1})]),_:1})]),default:S(()=>[T("div",Rl,V(a(r)),1)]),_:1})])]),_:1})]),_:1})]),_:1})]),_:2},1024)):de("",!0)]),_:1},8,["show"])}}}),Pl={bg:"#eee","px-2px":""},Dl=Y({__name:"OverlapCard",setup(e){const t=je(),{focusNode:s,overlapNodes:n,focusPosition:l}=He(t),h=document.documentElement.scrollWidth/100*25.5;return(u,f)=>{const p=lt,d=An,b=Go;return B(),ie($t,{initialValue:{top:215,left:h},class:"box-shadow-dim w-420px",show:!!(a(n)&&a(l))},{default:S(({onRef:$})=>[a(n)&&a(l)?(B(),ie(b,{key:0,size:"small",closable:"",onClose:f[0]||(f[0]=P=>n.value=void 0)},{header:S(()=>[T("div",{ref:$,"cursor-move":""},[f[1]||(f[1]=Z(" 位置 ")),T("span",Pl,V(`${a(l).x.toFixed(0)},${a(l).y.toFixed(0)}`),1),Z(" 存在 "+V(a(n).length)+" 个层叠节点 ",1)],512)]),default:S(()=>[_(d,{style:{"max-height":"400px","overflow-y":"scroll","padding-bottom":"10px"},class:"scrollbar-hidden"},{default:S(()=>[(B(!0),te(Re,null,ze(a(n),P=>(B(),ie(p,{key:P.id,onClick:i=>a(t).updateFocusNode(P),size:"small",style:Ie(a(ht)(P,a(s)))},{default:S(()=>[Z(V(a(ot)(P)),1)]),_:2},1032,["onClick","style"]))),128))]),_:1})]),_:2},1024)):de("",!0)]),_:1},8,["initialValue","show"])}}}),Jt=Yo(),Vn=A(()=>Jt.width.value/100),Gn=A(()=>Math.max(1200,Jt.width.value));A(()=>Math.max(700,Jt.height.value));const Tl={"bg-white":"","b-1px":"","b-solid":"","b-gray-200":"","rounded-4px":"","p-8px":""},Il={flex:"","m-b-4px":"","pr-4px":""},El={"min-h-24px":""},Ll={key:0,"color-red":"","whitespace-pre":""},Kl=Y({__name:"RuleCard",props:{show:{type:Boolean},onUpdateShow:{type:Function,default:rt}},setup(e){const t=je(),s=He(t),{rootNode:n,focusNode:l}=s,r=s.snapshot,h=J(""),u=Qo(h,500),f=i=>{if(i==null)return[];if(typeof i=="string")return[i];if(Array.isArray(i)&&i.every(g=>typeof g=="string"))return i},p=i=>{const g=f(i.matches);if(!g)return"非法格式: matches";const k=f(i.anyMatches);if(!k)return"非法格式: anyMatches";const w=f(i.excludeMatches);if(!w)return"非法格式: excludeMatches";const N=[];for(let v=0;v<g.length;v++){const z=g[v];try{N.push(_t(z))}catch(F){const M=F instanceof Error?F.message:String(F);return`非法选择器: matches[${v}]
258
258
  错误: ${M}`}}const C=N.map(v=>v.querySelfOrSelectorAll(n.value));if(N.length){const v=C.findIndex(z=>z.length===0);if(v>=0)return`无法匹配: matches[${v}] 查找结果为空`}const m=[];for(let v=0;v<k.length;v++){const z=k[v];try{m.push(_t(z))}catch(F){const M=F instanceof Error?F.message:String(F);return`非法选择器: anyMatches[${v}]
259
259
  错误: ${M}`}}const c=m.map(v=>v.querySelfOrSelectorAll(n.value));if(m.length&&c.every(v=>v.length===0))return"无法匹配: anyMatches 查找结果为空";if(!g.length&&!k.length)return"非法规则: matches 和 anyMatches 至少存在一个";const y=[];for(let v=0;v<w.length;v++){const z=w[v];try{y.push(_t(z))}catch(F){const M=F instanceof Error?F.message:String(F);return`非法选择器: excludeMatches[${v}]
260
260
  错误: ${M}`}}const R=y.map(v=>v.querySelfOrSelectorAll(n.value));if(y.length){const v=R.findIndex(z=>z.length!==0);if(v>=0)return`无法匹配: excludeMatches[${v}] 查找结果不为空`}return C.length?C.at(-1)[0]:c[0][0]},d=i=>typeof i=="object"&&i!==null&&!Array.isArray(i),b=A(()=>{if(!u.value)return"";const i=(()=>{try{return Bn.parse(u.value)}catch(g){return g}})();if(i instanceof Error)return`非法格式: ${i.message}`;if(!d(i))return"非法格式: 请使用对象格式";if(typeof i.id=="string"){if(i.id!==r.value.appId)return"非法格式: id 不匹配 appId";if(!Array.isArray(i.groups))return"非法格式: groups 不是数组";if(i.groups.length!==1)return"非法格式: groups 长度不为 1";const g=i.groups[0];if(!(g!=null&&g.rules))return"非法格式: groups[0].rules 非法";const k=Array.isArray(g.rules)?g.rules:[g.rules];if(k.length!==1)return"非法格式: groups[0].rules 长度不为 1";const w=typeof k[0]=="string"?{matches:k[0]}:k[0];return d(w)?p(w):"非法格式: rules[0] 非法"}if(i.rules){const g=Array.isArray(i.rules)?i.rules:[i.rules];if(g.length!==1)return"非法格式: rules 长度不为 1";const k=typeof g[0]=="string"?{matches:g[0]}:g[0];return d(k)?p(k):"非法格式: rules[0] 非法"}return p(i)}),$=A(()=>h.value&&u.value&&typeof b.value=="string"?b.value:""),P=A(()=>typeof b.value=="string"?null:b.value);return(i,g)=>{const k=Oe("SvgIcon"),w=lt,N=zn;return B(),ie($t,{initialValue:{top:40,right:Math.max(315,12*a(Vn)+135),width:Math.max(480,a(Gn)*.3)},minWidth:300,sizeDraggable:"",class:"box-shadow-dim",show:i.show},{default:S(({onRef:C})=>[T("div",Tl,[T("div",Il,[g[3]||(g[3]=T("div",null,"测试规则",-1)),T("div",{"flex-1":"","cursor-move":"",ref:C},null,512),_(w,{onClick:g[0]||(g[0]=m=>i.onUpdateShow(!i.show)),text:"",title:"最小化"},{icon:S(()=>[_(k,{name:"minus"})]),_:1})]),_(N,{value:a(h),"onUpdate:value":g[1]||(g[1]=m=>nt(h)?h.value=m:null),type:"textarea",placeholder:"请输入单个规则测试",size:"small",class:"gkd_code m-b-4px",autosize:{minRows:10,maxRows:20}},null,8,["value"]),T("div",El,[a($)?(B(),te("div",Ll,V(a($)),1)):a(P)?(B(),ie(w,{key:1,onClick:g[2]||(g[2]=m=>a(t).updateFocusNode(a(P))),size:"small",style:Ie(a(ht)(a(P),a(l)))},{default:S(()=>[Z(V(a(ot)(a(P))),1)]),_:1},8,["style"])):de("",!0)])])]),_:1},8,["initialValue","show"])}}}),Al=["src"],Fl={absolute:"","left-2px":"","top-2px":"","p-1px":"","z-1":"","text-13px":"",class:"leading-[1] bg-[rgba(256,256,256,0.7)]"},Bl={key:0,absolute:"","left-2px":"","bottom-2px":"","p-1px":"","z-1":"","text-12px":"",class:"leading-[1] bg-[rgba(256,256,256,0.7)]",flex:"","flex-col":"","flex-items-center":""},zl={key:1,absolute:"","right-2px":"","bottom-2px":"","p-1px":"","z-1":"","text-12px":"",class:"leading-[1] bg-[rgba(256,256,256,0.7)]",flex:"","flex-col":"","flex-items-center":""},Ol=Y({__name:"MiniHoverImg",props:{imgRef:{},imgHover:{type:Boolean},screenshotUrl:{},hoverPosition:{},hoverPositionStyle:{},boxHoverPosition:{},boxHoverPerPosition:{}},setup(e){const t=e,s=Xo(A(()=>t.imgRef));return(n,l)=>(B(),ie(Tn,{to:"body"},[Rn(T("div",{style:Ie({left:a(s).right.value+4+"px",top:a(s).top.value+"px"}),"pointer-events-none":"",fixed:"","overflow-hidden":"","z-2":"","bg-white":"","h-200px":"","w-200px":"","border-1px":"","border-indigo-600":"","border-dashed":""},[T("img",{src:n.screenshotUrl,"object-contain":"",absolute:"","left-0":"","top-0":"",style:Ie(n.hoverPositionStyle),"w-1000px":""},null,12,Al),T("div",Fl,V(`${n.hoverPosition.ox.toFixed(0)}, ${n.hoverPosition.oy.toFixed(0)}`),1),n.boxHoverPosition?(B(),te("div",Bl,[T("div",null,V(n.boxHoverPosition.top.toFixed(0)),1),T("div",null,V(n.boxHoverPosition.left.toFixed(0)+", "+n.boxHoverPosition.right.toFixed(0)),1),T("div",null,V(n.boxHoverPosition.bottom.toFixed(0)),1)])):de("",!0),n.boxHoverPerPosition?(B(),te("div",zl,[T("div",null,V(n.boxHoverPerPosition.top),1),T("div",null,V(n.boxHoverPerPosition.left+", "+n.boxHoverPerPosition.right),1),T("div",null,V(n.boxHoverPerPosition.bottom),1)])):de("",!0),l[0]||(l[0]=T("div",{class:"top-[calc(50%-1px)] bg-[length:10px_1px]",absolute:"","left-0":"","right-0":"","h-1px":"","bg-repeat-x":"","mix-blend-difference":"",style:{"background-image":`linear-gradient(
@@ -270,4 +270,4 @@ import{h as Y,k as I,a as U,g as De,f as H,e as O,b as ee,u as pt,a0 as ko,a1 as
270
270
  #fff 50%,
271
271
  #fff 100%
272
272
  )`,"background-position-y":"1.5px"}},null,-1))],4),[[$n,n.imgHover]])]))}}),Ml={key:0,flex:"","flex-col":"",relative:"","h-full":"","p-2px":"","box-border":"","overflow-hidden":""},Ul=["src"],Hl={"pointer-events-none":"",absolute:"","left-2px":"","top-2px":"",size:"[calc(100%-4px)]"},jl={absolute:"","z-4":"","pointer-events-none":"","left-4px":"","top-4px":"","text-12px":"",leading:"100%",flex:"","gap-4px":""},ql={"py-1px":"","px-2px":"",bg:"#ffffff90",title:"尺寸"},Wl={"py-1px":"","px-2px":"",bg:"#ffffff90",title:"创建时间"},Vl=Y({__name:"ScreenshotCard",setup(e){const t=je(),{updatePosition:s}=t,n=He(t),{focusNode:l,screenshotUrl:r}=n,h=A(()=>t.snapshot),u=J(),f=J(!1),p=C=>{const m=u.value;if(!m)return;const c=m.getBoundingClientRect(),y=c.width/m.naturalWidth*m.naturalHeight,R=(c.height-y)/2,v=(C.clientX-c.left)/c.width*m.naturalWidth,z=(C.clientY-c.top-R)/y*m.naturalHeight;s({x:v,y:z})},d=C=>`${C*100}%`,b=Jo(u),$=A(()=>{var v;const C=u.value,m=(v=l.value)==null?void 0:v.attr;if(!l.value||!C||!m||!f.value)return"";const c=b.width.value,y=b.height.value,R=c/C.naturalWidth*C.naturalHeight;return{left:`calc(${d(m.left/C.naturalWidth)} - 2px)`,width:`calc(${d((m.right-m.left)/C.naturalWidth)} + 2px)`,top:`calc(${d((m.top/C.naturalHeight*R+(y-R)/2)/y)} - 2px)`,height:`calc(${d((m.bottom-m.top)/C.naturalHeight*R/y)} + 2px)`}}),P=J(!1),i=J({ox:0,oy:0}),g=A(()=>{var y;const C=(y=l.value)==null?void 0:y.attr;if(!C)return;const{ox:m,oy:c}=i.value;return{left:m-C.left,right:C.right-m,top:c-C.top,bottom:C.bottom-c}}),k=A(()=>{var v;const C=(v=l.value)==null?void 0:v.attr;if(!C||!g.value||C.width<=0||C.height<=0)return;const{bottom:m,left:c,right:y,top:R}=g.value;return{left:Ct(c/(y+c),3),right:Ct(y/(y+c),3),top:Ct(R/(R+m),3),bottom:Ct(m/(R+m),3)}}),w=J({left:"0",top:"0"}),N=C=>{const m=u.value;if(!m)return;const c=m.getBoundingClientRect(),y=c.width/m.naturalWidth*m.naturalHeight,R=(c.height-y)/2,v=(C.clientX-c.left)/c.width*m.naturalWidth,z=(C.clientY-c.top-R)/y*m.naturalHeight;i.value={ox:v,oy:z},w.value={left:-(v-.1*m.naturalWidth)/m.naturalWidth*1e3+"px",top:-(z-.1*m.naturalWidth)/m.naturalWidth*1e3+"px"}};return(C,m)=>a(r)?(B(),te("div",Ml,[T("img",{ref_key:"imgRef",ref:u,src:a(r),onClick:p,"cursor-crosshair":"","object-contain":"","h-full":"",class:"max-w-[calc(var(--gkd-w)*0.35)]",onMouseover:m[0]||(m[0]=c=>P.value=!0),onMouseleave:m[1]||(m[1]=c=>P.value=!1),onMousemove:N,onLoad:m[2]||(m[2]=c=>f.value=!0)},null,40,Ul),T("div",Hl,[T("div",{style:Ie(a($)),absolute:"","transition-all-300":"","b-1px":"","b-blue":"","b-solid":""},m[3]||(m[3]=[T("div",{absolute:"","left-0":"","top-0":"","bottom-0":"","right-0":"","b-solid":"","b-1px":"","b-red":""},null,-1)]),4)]),T("div",jl,[T("div",ql,V(`${a(h).screenWidth}x${a(h).screenHeight}`),1),T("div",Wl,V(a(Fn)(a(h).id).format("YYYY-MM-DD HH:mm:ss")),1)]),a(u)?(B(),ie(Ol,{key:0,imgHover:a(P),imgRef:a(u),boxHoverPerPosition:a(k),boxHoverPosition:a(g),hoverPositionStyle:a(w),hoverPosition:a(i),screenshotUrl:a(r)},null,8,["imgHover","imgRef","boxHoverPerPosition","boxHoverPosition","hoverPositionStyle","hoverPosition","screenshotUrl"])):de("",!0)])):de("",!0)}}),Gl={"bg-white":"","b-1px":"","b-solid":"","b-gray-200":"","rounded-4px":"","p-8px":""},Yl={flex:"","m-b-4px":"","pr-4px":""},Ql={key:0,underline:"","leading-20px":"","decoration-1":"","m-r-4px":"",gkd_code:"",title:"查询数量"},Xl=["title"],Jl={flex:"","gap-8px":"","flex-wrap":""},Zl=Y({__name:"SearchCard",props:{show:{type:Boolean},onUpdateShow:{type:Function,default:rt}},setup(e){const t=In(),{snapshotImportId:s,snapshotImageId:n}=Ln(),l=je(),{updateFocusNode:r}=l,h=He(l),u=h.snapshot,f=h.rootNode,{focusNode:p}=h,d=J(""),b=Yt([]),$=J([]),P=c=>{const y=Cr(()=>_t(c),v=>typeof v=="string"?v:v instanceof nr?"非法选择器:"+v.outMessage:"非法选择器:"+(v instanceof Error?v.message:v));if(b.find(v=>typeof v.selector=="object"&&v.selector.toString()==y.toString())){Ae.warning("不可重复选择");return}const R=y.querySelfOrSelectorAllContext(f.value);if(R.length==0){Ae.success("没有选择到节点");return}return Ae.success(`选择到 ${R.length} 个节点`),b.unshift({selector:y,nodes:R.map(v=>v.target),results:R,key:Date.now(),gkd:!0}),R.length},i=c=>{if(b.find(v=>typeof v.selector=="string"&&v.selector.toString()==c)){Ae.warning("不可重复搜索");return}const y=[],R=[f.value];for(;R.length>0;){const v=R.pop();ot(v).includes(c)&&y.push(v),R.push(...[...v.children].reverse())}if(y.length==0){Ae.success("没有搜索到节点");return}return Ae.success(`搜索到 ${y.length} 个节点`),b.unshift({gkd:!1,selector:c,nodes:y,key:Date.now()}),y.length},g=()=>{const c=b[0],y=c.nodes[0];Array.isArray(y)?typeof c.selector=="object"&&r(y):r(y);const R=new Set(b.map(z=>z.key)),v=$.value.filter(z=>R.has(z));v.push(c.key),$.value=v},k=xn(()=>{const c=d.value.trim();if(c){if(N.value){if(!P(c))return}else if(!i(c))return;g()}});Rt(async()=>{await tr;let c=0;t.query.gkd&&(c+=P(pn.decode(t.query.gkd))||0),t.query.str&&(c+=i(t.query.str)||0),c>0&&g()});const w=xn(async c=>{var j,pe,be;const y=n[u.value.id],R=s[u.value.id],v=R?cn(R):void 0,z=y?er(y):void 0,F=c.selector,M=c.results.map(fe=>fe.context.toArray().at(-1))[0],we=[((j=M.quickFind)!=null?j:M.idQf)&&M.attr.id&&F.fastQueryList.some(fe=>fe instanceof Mt.Id&&fe.acceptText(M.attr.id)),((pe=M.quickFind)!=null?pe:M.idQf)&&M.attr.vid&&F.fastQueryList.some(fe=>fe instanceof Mt.Vid&&fe.acceptText(M.attr.vid)),((be=M.quickFind)!=null?be:M.textQf)&&M.attr.text&&F.fastQueryList.some(fe=>fe instanceof Mt.Text&&fe.acceptText(M.attr.text))].some(Boolean),ne={id:u.value.appId,name:Pe(u.value).name,groups:[{key:1,name:`[ChangeMe]规则名称-${Fn().format("YYYY-MM-DD HH:mm:ss")}`,desc:"[ChangeMe]本规则由GKD网页端审查工具生成",rules:[{fastQuery:we||void 0,activityIds:u.value.activityId,matches:F.toString(),exampleUrls:z,snapshotUrls:v}]}]};Te(Bn.stringify(ne,void 0,2))}),N=J(!0),C=A(()=>s[u.value.id]),m=c=>{if(!C.value)return;const y=new URL(cn(s[u.value.id]));typeof c.selector=="object"?y.searchParams.set("gkd",pn.encode(c.selector.toString())):y.searchParams.set("str",c.selector.toString()),Te(y.toString())};return(c,y)=>{const R=kr,v=An,z=xr,F=Oe("SvgIcon"),M=lt,we=zn,ne=wr,j=$r,pe=Kn,be=Xt,fe=Ar,ye=Er;return B(),ie($t,{initialValue:{top:40,right:Math.max(315,12*a(Vn)+135),width:Math.max(480,a(Gn)*.3)},minWidth:300,sizeDraggable:"",class:"box-shadow-dim",show:c.show},{default:S(({onRef:$e})=>[T("div",Gl,[T("div",Yl,[_(z,{value:a(N),"onUpdate:value":y[0]||(y[0]=q=>nt(N)?N.value=q:null)},{default:S(()=>[_(v,null,{default:S(()=>[_(R,{value:!1},{default:S(()=>y[4]||(y[4]=[Z(" 字符搜索 ")])),_:1}),_(R,{value:!0},{default:S(()=>y[5]||(y[5]=[Z(" 选择器查询 ")])),_:1})]),_:1})]),_:1},8,["value"]),T("div",{"flex-1":"","cursor-move":"",ref:$e},null,512),_(M,{onClick:y[1]||(y[1]=q=>c.onUpdateShow(!c.show)),text:"",title:"最小化"},{icon:S(()=>[_(F,{name:"minus"})]),_:1})]),_(ne,null,{default:S(()=>[_(we,{value:a(d),"onUpdate:value":y[2]||(y[2]=q=>nt(d)?d.value=q:null),placeholder:a(N)?"请输入选择器":"请输入字符",onKeyup:Zo(a(k),["enter"]),inputProps:{class:"gkd_code"}},null,8,["value","placeholder","onKeyup"]),_(M,{onClick:a(k)},{icon:S(()=>[_(F,{name:"search"})]),_:1},8,["onClick"])]),_:1}),y[8]||(y[8]=T("div",{"p-5px":""},null,-1)),_(ye,{expandedNames:a($),"onUpdate:expandedNames":y[3]||(y[3]=q=>nt($)?$.value=q:null)},{default:S(()=>[(B(!0),te(Re,null,ze(a(b),(q,at)=>(B(),ie(fe,{key:q.key,name:q.key},{header:S(()=>[q.nodes.length>1?(B(),te("span",Ql,V(q.nodes.length),1)):de("",!0),T("span",{"break-all":"","px-4px":"","leading-20px":"",bg:"#eee",gkd_code:"",title:q.gkd?"选择器":"搜索字符"},[q.gkd?(B(),ie(St,{key:0,node:q.selector.ast,source:q.selector.source},null,8,["node","source"])):(B(),te(Re,{key:1},[Z(V(q.selector),1)],64))],8,Xl),y[6]||(y[6]=T("span",{"pl-4px":""},null,-1))]),"header-extra":S(()=>[_(j,null,{default:S(()=>[q.gkd&&q.selector.canCopy?(B(),ie(M,{key:0,size:"small",onClick:zt(ve=>a(w)(q),["stop"]),title:"复制规则"},{icon:S(()=>[_(F,{name:"copy"})]),_:2},1032,["onClick"])):de("",!0),a(C)?(B(),ie(M,{key:1,size:"small",title:q.gkd?"复制查询链接":"复制搜索链接",onClick:zt(ve=>m(q),["stop"])},{icon:S(()=>[_(F,{name:"share"})]),_:2},1032,["title","onClick"])):de("",!0),_(M,{size:"small",onClick:zt(ve=>a(b).splice(at,1),["stop"]),title:"删除记录"},{icon:S(()=>[_(F,{name:"delete"})]),_:2},1032,["onClick"])]),_:2},1024)]),default:S(()=>[_(be,{xScrollable:"",style:{"max-height":"400px"}},{default:S(()=>[T("div",Jl,[!q.gkd||q.selector.connectKeys.length===0?(B(!0),te(Re,{key:0},ze(q.nodes,ve=>(B(),ie(M,{key:ve.id,onClick:E=>a(r)(ve),size:"small",style:Ie(a(ht)(ve,a(p)))},{default:S(()=>[Z(V(a(ot)(ve)),1)]),_:2},1032,["onClick","style"]))),128)):(B(!0),te(Re,{key:1},ze(q.nodes,(ve,E)=>(B(),ie(j,{key:E},{default:S(()=>[_(M,{size:"small",onClick:W=>a(l).showTrack(q.selector,q.results[E])},{default:S(()=>[_(pe,null,{default:S(()=>[_(F,{name:"path"})]),_:1})]),_:2},1032,["onClick"]),_(M,{onClick:W=>a(r)(ve),size:"small",style:Ie(a(ht)(ve,a(p)))},{default:S(()=>[Z(V(a(ot)(ve)),1)]),_:2},1032,["onClick","style"])]),_:2},1024))),128))]),y[7]||(y[7]=T("div",{un:"h-10px"},null,-1))]),_:2},1024)]),_:2},1032,["name"]))),128))]),_:1},8,["expandedNames"])])]),_:1},8,["initialValue","show"])}}}),_n=[],ea=Y((e,t)=>{const s=A(()=>e.tag||"div");return()=>{var r,h,u,f;const n=(((h=(r=t.slots).default)==null?void 0:h.call(r))||_n).filter(p=>typeof p.type!="symbol"),l=[];if(n.length>0&&l.push(n[0]),n.length>1)for(let p=1;p<n.length;p++){const d=((f=(u=t.slots).gap)==null?void 0:f.call(u,{index:p-1}))||_n;l.push(...d),l.push(n[p])}return e.virtual?l:I(s.value,e,l)}},{props:["tag","virtual"]}),ta={flex:"","flex-col":"","overflow-hidden":""},na={flex:"","items-center":"","px-8px":""},oa={flex:"","items-center":"","gap-2px":"","max-w-120px":""},ra=Y({__name:"WindowCard",setup(e){const t=En(),s=je(),{updateFocusNode:n}=s,l=He(s),r=l.snapshot,h=l.rootNode,{focusNode:u,focusTime:f}=l;let p=Number.NaN;const d=J([]),b=J([]);Fe([()=>u.value,()=>f.value],async()=>{if(!u.value)return;const m=u.value.id;et().then(async()=>{var R;if(await un(300),m===((R=u.value)==null?void 0:R.id)){if(p===m){p=Number.NaN;return}const v=document.querySelector(`[data-node-id="${m}"]`);if(!v)return;b.value=[m],v.scrollIntoView({behavior:"smooth",block:"center"})}});let c=u.value.parent;if(!c)return;const y=new Set(d.value);for(;c;)y.add(c.id),c=c.parent;y.size==d.value.length&&d.value.every(R=>y.has(R))||(d.value=[...y])});const $=J(),P=(m,c)=>{var y;return c.id===((y=u.value)==null?void 0:y.id)},i=m=>{const c=ht(m.option,u.value);return{onClick:()=>{p=m.option.id,n(m.option)},style:{"--n-node-text-color":c.color,...c},class:"whitespace-nowrap","data-node-id":String(m.option.id)}},g=m=>ot(m.option),k=A(()=>`${vn(r.value).manufacturer} Android ${vn(r.value).release||""}`),w=A(()=>Pe(r.value).isSystem),N=A(()=>{const m=r.value.activityId,c=r.value.appId;return!m||!c?"":m.startsWith(c)&&m[c.length]==="."?m.substring(c.length):m}),C=async()=>{Ae.success("删除成功,即将回到首页"),await un(2e3),t.replace({path:"/"})};return(m,c)=>{const y=Qt,R=Oe("SvgIcon"),v=sl,z=Xt;return B(),te("div",ta,[T("div",na,[_(a(ea),{flex:"","flex-wrap":"","items-center":"","gap-8px":"",gkd_code:""},{gap:S(()=>c[8]||(c[8]=[T("div",{"w-1px":"","bg-gray":"","h-12px":""},null,-1)])),default:S(()=>[_(y,null,{trigger:S(()=>[T("div",{onClick:c[0]||(c[0]=F=>a(Te)(a(k)))},V(a(k)),1)]),default:S(()=>[c[9]||(c[9]=Z(" 设备名称 "))]),_:1}),_(y,null,{trigger:S(()=>[T("div",{class:ft({"opacity-50":!a(gn)(a(r)).versionName})},V(a(gn)(a(r)).versionName||"null"),3)]),default:S(()=>[c[10]||(c[10]=Z(" GKD 版本 "))]),_:1}),T("div",oa,[a(w)?(B(),ie(y,{key:0},{trigger:S(()=>[_(R,{name:"system"})]),default:S(()=>[Z(" "+V(`${a(Pe)(a(r)).name} 是一个系统应用`),1)]),_:1})):de("",!0),_(y,null,{trigger:S(()=>[T("div",{onClick:c[1]||(c[1]=F=>a(Te)(a(Pe)(a(r)).name))},V(a(Pe)(a(r)).name),1)]),default:S(()=>[c[11]||(c[11]=Z(" 应用名称 "))]),_:1})]),_(y,null,{trigger:S(()=>[T("div",{onClick:c[2]||(c[2]=F=>a(Te)(a(Pe)(a(r)).versionName))},V(a(Pe)(a(r)).versionName),1)]),default:S(()=>[c[12]||(c[12]=Z(" 版本名称 "))]),_:1}),_(y,null,{trigger:S(()=>[T("div",{onClick:c[3]||(c[3]=F=>a(Te)(a(Pe)(a(r)).versionCode.toString()))},V(a(Pe)(a(r)).versionCode),1)]),default:S(()=>[c[13]||(c[13]=Z(" 版本代码 "))]),_:1}),_(y,null,{trigger:S(()=>[T("div",{onClick:c[4]||(c[4]=F=>a(Te)(a(r).appId))},V(a(r).appId),1)]),default:S(()=>[c[14]||(c[14]=Z(" 应用ID "))]),_:1}),_(y,null,{trigger:S(()=>[T("div",{onClick:c[5]||(c[5]=F=>a(Te)(a(N))),class:ft({"opacity-50":!a(N)})},V(a(N)||"null"),3)]),default:S(()=>[c[15]||(c[15]=Z(" 界面ID "))]),_:1})]),_:1}),c[16]||(c[16]=T("div",{"flex-1":""},null,-1)),_(cr,{class:"ml-8px",snapshot:a(r),onDelete:C,showPreview:!1},null,8,["snapshot"])]),c[17]||(c[17]=T("div",{"h-1px":"","mt-4px":"",bg:"#efeff5"},null,-1)),_(z,{xScrollable:"",class:"flex-1"},{default:S(()=>[_(v,{class:"mb-24px mr-24px",ref_key:"treeRef",ref:$,virtualScroll:"",showLine:"",blockLine:"",keyField:"id",expandedKeys:a(d),"onUpdate:expandedKeys":c[6]||(c[6]=F=>nt(d)?d.value=F:null),selectedKeys:a(b),"onUpdate:selectedKeys":c[7]||(c[7]=F=>nt(b)?b.value=F:null),data:[a(h)],filter:P,nodeProps:i,renderLabel:g},null,8,["expandedKeys","selectedKeys","data","filter","nodeProps","renderLabel"])]),_:1})])}}}),la={"h-full":"",flex:"","gap-5px":""},aa={"w-40px":"","py-12px":"",flex:"","flex-col":"","items-center":"","gap-16px":"",class:"[--svg-h:24px]"},ia={flex:"","justify-center":"",href:"https://github.com/orgs/gkd-kit/discussions",target:"_blank",rel:"noopener noreferrer"},sa={flex:"","justify-center":"",href:"https://gkd.li/guide/snapshot#share-note",target:"_blank",rel:"noopener noreferrer"},da={key:1,flex:"","justify-center":"","pt-80px":""},xa=Y({__name:"SnapshotPage",setup(e){const t=je(),s=He(t),{snapshot:n,rootNode:l,loading:r,redirected:h,trackData:u,trackShow:f}=s;Ne(()=>{r.value?fn.start():fn.finish()});const p=Ot("searchShow",!0,sessionStorage),d=Ot("ruleShow",!1,sessionStorage),b=Ot("attrShow",!0,sessionStorage),$=()=>{Ae.info("暂未实现")};return(P,i)=>{const g=Oe("SvgIcon"),k=Oe("RouterLink"),w=lt,N=Qt;return a(n)&&a(l)?(B(),te(Re,{key:0},[T("div",la,[T("div",aa,[_(N,{placement:"right"},{trigger:S(()=>[_(w,{text:""},{default:S(()=>[_(k,{to:"/"},{default:S(()=>[_(g,{name:"home"})]),_:1})]),_:1})]),default:S(()=>[i[8]||(i[8]=Z(" 回到首页 "))]),_:1}),_(N,{placement:"right"},{trigger:S(()=>[_(w,{onClick:$,text:""},{default:S(()=>[_(g,{name:"settings"})]),_:1})]),default:S(()=>[i[9]||(i[9]=Z(" 设置 "))]),_:1}),i[15]||(i[15]=T("div",null,null,-1)),_(N,{placement:"right"},{trigger:S(()=>[_(w,{text:"",onClick:i[0]||(i[0]=C=>p.value=!a(p))},{default:S(()=>[_(g,{name:"search-list"})]),_:1})]),default:S(()=>[i[10]||(i[10]=Z(" 搜索面板 "))]),_:1}),_(N,{placement:"right"},{trigger:S(()=>[_(w,{onClick:i[1]||(i[1]=C=>b.value=!a(b)),text:""},{default:S(()=>[_(g,{name:"prop"})]),_:1})]),default:S(()=>[i[11]||(i[11]=Z(" 属性面板 "))]),_:1}),_(N,{placement:"right"},{trigger:S(()=>[_(w,{onClick:i[2]||(i[2]=C=>d.value=!a(d)),text:""},{default:S(()=>[_(g,{name:"test"})]),_:1})]),default:S(()=>[i[12]||(i[12]=Z(" 测试规则 "))]),_:1}),i[16]||(i[16]=T("div",null,null,-1)),_(N,{placement:"right"},{trigger:S(()=>[T("a",ia,[_(w,{text:""},{default:S(()=>[_(g,{name:"discussion"})]),_:1})])]),default:S(()=>[i[13]||(i[13]=Z(" 讨论交流 "))]),_:1}),_(N,{placement:"right"},{trigger:S(()=>[T("a",sa,[_(w,{text:""},{default:S(()=>[_(g,{name:"warn"})]),_:1})])]),default:S(()=>[i[14]||(i[14]=Z(" 分享须知 "))]),_:1})]),_(Vl),_(ra,{class:"flex-1"})]),_(Zl,{show:a(p),onUpdateShow:i[3]||(i[3]=C=>p.value=C)},null,8,["show"]),_(Kl,{show:a(d),onUpdateShow:i[4]||(i[4]=C=>d.value=C)},null,8,["show"]),_($l,{show:a(b),onUpdateShow:i[5]||(i[5]=C=>b.value=C)},null,8,["show"]),_(Dl),_(kl,{show:a(f),onUpdateShow:i[6]||(i[6]=C=>f.value=C),data:a(u),onUpdateData:i[7]||(i[7]=C=>u.value=C)},null,8,["show","data"])],64)):!a(r)&&!a(h)?(B(),te("div",da,i[17]||(i[17]=[T("div",null,"快照数据缺失",-1)]))):de("",!0)}}});export{xa as default};
273
- //# sourceMappingURL=SnapshotPage-Bbg8XVjn.js.map
273
+ //# sourceMappingURL=SnapshotPage-CwOAZlmE.js.map