intable 0.0.6 → 0.0.7

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 (169) hide show
  1. package/README.md +16 -263
  2. package/docs/index-BaMALNy6.css +1 -0
  3. package/docs/index-CDN48t9E.js +3 -0
  4. package/docs/index-Cc4RNkLY.css +1 -0
  5. package/docs/index-MRnbkYmU.js +3 -0
  6. package/docs/index.html +15 -0
  7. package/docs/vite.svg +1 -0
  8. package/index.html +14 -0
  9. package/package.json +30 -38
  10. package/packages/intable/README.md +379 -0
  11. package/packages/intable/package.json +51 -0
  12. package/packages/intable/src/assets/ClearFormat.svg +3 -0
  13. package/packages/intable/src/assets/Forms.svg +4 -0
  14. package/packages/intable/src/assets/MergeCell.svg +4 -0
  15. package/packages/intable/src/assets/SplitCell.svg +4 -0
  16. package/packages/intable/src/assets/gap.svg +3 -0
  17. package/packages/intable/src/assets/loading.svg +12 -0
  18. package/packages/intable/src/assets/paint.svg +9 -0
  19. package/packages/intable/src/assets/solid.svg +1 -0
  20. package/packages/intable/src/components/Columns.tsx +86 -0
  21. package/packages/intable/src/components/DocTree.tsx +36 -0
  22. package/packages/intable/src/components/Menu.tsx +109 -0
  23. package/packages/intable/src/components/Popover.tsx +55 -0
  24. package/packages/intable/src/components/RecycleList.tsx +99 -0
  25. package/packages/intable/src/components/Render.tsx +26 -0
  26. package/packages/intable/src/components/Split.tsx +56 -0
  27. package/packages/intable/src/components/Tree.tsx +115 -0
  28. package/packages/intable/src/components/utils.tsx +12 -0
  29. package/packages/intable/src/hooks/index.ts +200 -0
  30. package/packages/intable/src/hooks/useDir.ts +78 -0
  31. package/packages/intable/src/hooks/useSelector.ts +91 -0
  32. package/packages/intable/src/hooks/useSort.tsx +118 -0
  33. package/packages/intable/src/hooks/useVirtualizer.ts +180 -0
  34. package/packages/intable/src/index.tsx +481 -0
  35. package/packages/intable/src/plugins/CellChangeHighlightPlugin.tsx +5 -0
  36. package/packages/intable/src/plugins/CellMergePlugin.tsx +153 -0
  37. package/packages/intable/src/plugins/CellSelectionPlugin.tsx +175 -0
  38. package/packages/intable/src/plugins/CommandPlugin.tsx +74 -0
  39. package/packages/intable/src/plugins/CopyPastePlugin.tsx +63 -0
  40. package/packages/intable/src/plugins/DiffPlugin.tsx +107 -0
  41. package/packages/intable/src/plugins/DragPlugin.tsx +81 -0
  42. package/packages/intable/src/plugins/EditablePlugin.tsx +252 -0
  43. package/packages/intable/src/plugins/ExpandPlugin.tsx +80 -0
  44. package/packages/intable/src/plugins/HeaderGroup.tsx +289 -0
  45. package/packages/intable/src/plugins/HistoryPlugin.tsx +49 -0
  46. package/packages/intable/src/plugins/MenuPlugin.tsx +195 -0
  47. package/packages/intable/src/plugins/RenderPlugin/components.tsx +51 -0
  48. package/packages/intable/src/plugins/RenderPlugin/index.tsx +81 -0
  49. package/packages/intable/src/plugins/ResizePlugin.tsx +122 -0
  50. package/packages/intable/src/plugins/RowGroupPlugin.tsx +122 -0
  51. package/packages/intable/src/plugins/RowSelectionPlugin.tsx +65 -0
  52. package/packages/intable/src/plugins/TreePlugin.tsx +212 -0
  53. package/packages/intable/src/plugins/VirtualScrollPlugin.tsx +190 -0
  54. package/packages/intable/src/plugins/ZodValidatorPlugin.tsx +61 -0
  55. package/packages/intable/src/style.scss +244 -0
  56. package/{dist → packages/intable/src}/theme/antd.scss +14 -5
  57. package/{dist → packages/intable/src}/theme/element-plus.scss +6 -5
  58. package/packages/intable/src/tree.ts +13 -0
  59. package/packages/intable/src/types/auto-imports.d.ts +13 -0
  60. package/packages/intable/src/utils.ts +122 -0
  61. package/packages/intable/src/wc.tsx +35 -0
  62. package/packages/intable/src/web-component.ts +1 -0
  63. package/packages/react/package.json +31 -0
  64. package/packages/react/src/index.ts +44 -0
  65. package/packages/react/src/plugins/antd.ts +94 -0
  66. package/packages/react/src/style.scss +12 -0
  67. package/packages/react/src/types/auto-imports.d.ts +10 -0
  68. package/packages/vue/package.json +34 -0
  69. package/packages/vue/src/index.ts +63 -0
  70. package/packages/vue/src/plugins/element-plus.ts +69 -0
  71. package/packages/vue/src/style.scss +12 -0
  72. package/packages/vue/src/types/auto-imports.d.ts +10 -0
  73. package/pnpm-workspace.yaml +2 -0
  74. package/public/vite.svg +1 -0
  75. package/scripts/build.js +184 -0
  76. package/scripts/publish.js +95 -0
  77. package/src/assets/ClearFormat.svg +3 -0
  78. package/src/assets/Forms.svg +4 -0
  79. package/src/assets/MergeCell.svg +4 -0
  80. package/src/assets/SplitCell.svg +4 -0
  81. package/src/assets/gap.svg +3 -0
  82. package/src/assets/loading.svg +12 -0
  83. package/src/assets/paint.svg +9 -0
  84. package/src/assets/solid.svg +1 -0
  85. package/src/demo-vue.ts +54 -0
  86. package/src/demo.tsx +107 -0
  87. package/src/index.scss +105 -0
  88. package/src/styles/index.scss +172 -0
  89. package/src/types/auto-imports.d.ts +13 -0
  90. package/stats.html +4949 -0
  91. package/tsconfig.app.json +34 -0
  92. package/tsconfig.json +7 -0
  93. package/tsconfig.node.json +26 -0
  94. package/vite.config.ts +63 -0
  95. package/dist/__uno.css +0 -1
  96. package/dist/chevron-right.js +0 -6
  97. package/dist/components/Columns.d.ts +0 -3
  98. package/dist/components/Columns.js +0 -71
  99. package/dist/components/DocTree.d.ts +0 -4
  100. package/dist/components/DocTree.js +0 -32
  101. package/dist/components/Menu.d.ts +0 -1
  102. package/dist/components/Menu.js +0 -107
  103. package/dist/components/Popover.d.ts +0 -14
  104. package/dist/components/Popover.js +0 -41
  105. package/dist/components/Render.d.ts +0 -4
  106. package/dist/components/Render.js +0 -20
  107. package/dist/components/Split.d.ts +0 -15
  108. package/dist/components/Split.js +0 -76
  109. package/dist/components/Tree.d.ts +0 -37
  110. package/dist/components/Tree.js +0 -82
  111. package/dist/components/utils.d.ts +0 -3
  112. package/dist/components/utils.js +0 -8
  113. package/dist/hooks/index.d.ts +0 -40
  114. package/dist/hooks/index.js +0 -157
  115. package/dist/hooks/useDir.d.ts +0 -11
  116. package/dist/hooks/useDir.js +0 -42
  117. package/dist/hooks/useSelector.d.ts +0 -16
  118. package/dist/hooks/useSelector.js +0 -35
  119. package/dist/hooks/useSort.d.ts +0 -18
  120. package/dist/hooks/useSort.js +0 -83
  121. package/dist/hooks/useVirtualizer.d.ts +0 -25
  122. package/dist/hooks/useVirtualizer.js +0 -67
  123. package/dist/index.d.ts +0 -130
  124. package/dist/index.js +0 -347
  125. package/dist/loading.js +0 -6
  126. package/dist/plugins/CellChangeHighlightPlugin.d.ts +0 -2
  127. package/dist/plugins/CellChangeHighlightPlugin.js +0 -4
  128. package/dist/plugins/CellMergePlugin.d.ts +0 -12
  129. package/dist/plugins/CellMergePlugin.js +0 -2
  130. package/dist/plugins/CellSelectionPlugin.d.ts +0 -15
  131. package/dist/plugins/CellSelectionPlugin.js +0 -115
  132. package/dist/plugins/CommandPlugin.d.ts +0 -14
  133. package/dist/plugins/CommandPlugin.js +0 -12
  134. package/dist/plugins/CopyPastePlugin.d.ts +0 -14
  135. package/dist/plugins/CopyPastePlugin.js +0 -42
  136. package/dist/plugins/DiffPlugin.d.ts +0 -23
  137. package/dist/plugins/DiffPlugin.js +0 -56
  138. package/dist/plugins/DragPlugin.d.ts +0 -14
  139. package/dist/plugins/DragPlugin.js +0 -47
  140. package/dist/plugins/EditablePlugin.d.ts +0 -48
  141. package/dist/plugins/EditablePlugin.js +0 -141
  142. package/dist/plugins/ExpandPlugin.d.ts +0 -18
  143. package/dist/plugins/ExpandPlugin.js +0 -50
  144. package/dist/plugins/HistoryPlugin.d.ts +0 -10
  145. package/dist/plugins/HistoryPlugin.js +0 -30
  146. package/dist/plugins/MenuPlugin.d.ts +0 -18
  147. package/dist/plugins/MenuPlugin.js +0 -107
  148. package/dist/plugins/RenderPlugin/components.d.ts +0 -5
  149. package/dist/plugins/RenderPlugin/components.js +0 -87
  150. package/dist/plugins/RenderPlugin/index.d.ts +0 -30
  151. package/dist/plugins/RenderPlugin/index.js +0 -49
  152. package/dist/plugins/ResizePlugin.d.ts +0 -27
  153. package/dist/plugins/ResizePlugin.js +0 -81
  154. package/dist/plugins/RowGroupPlugin.d.ts +0 -17
  155. package/dist/plugins/RowGroupPlugin.js +0 -83
  156. package/dist/plugins/RowSelectionPlugin.d.ts +0 -20
  157. package/dist/plugins/RowSelectionPlugin.js +0 -42
  158. package/dist/plugins/VirtualScrollPlugin.d.ts +0 -15
  159. package/dist/plugins/VirtualScrollPlugin.js +0 -96
  160. package/dist/plus.js +0 -6
  161. package/dist/style.css +0 -3
  162. package/dist/types/auto-imports.d.js +0 -0
  163. package/dist/utils.d.ts +0 -30
  164. package/dist/utils.js +0 -70
  165. package/dist/wc.d.ts +0 -1
  166. package/dist/wc.js +0 -21
  167. package/dist/web-component.d.ts +0 -1
  168. package/dist/web-component.js +0 -2
  169. package/dist/x.js +0 -6
@@ -0,0 +1,3 @@
1
+ (function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e){if(t.type!==`childList`)continue;for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),e.crossOrigin===`use-credentials`?t.credentials=`include`:e.crossOrigin===`anonymous`?t.credentials=`omit`:t.credentials=`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var e={context:void 0,registry:void 0,effects:void 0,done:!1,getContextId(){return t(this.context.count)},getNextContextId(){return t(this.context.count++)}};function t(t){let n=String(t),r=n.length-1;return e.context.id+(r?String.fromCharCode(96+r):``)+n}function n(t){e.context=t}function r(){return{...e.context,id:e.getNextContextId(),count:0}}var i=(e,t)=>e===t,a=Symbol(`solid-proxy`),o=typeof Proxy==`function`,s=Symbol(`solid-track`),c={equals:i},l=null,u=Se,d=1,f=2,p={owned:null,cleanups:null,context:null,owner:null},m=null,h=null,g=null,_=null,v=null,y=null,b=null,ee=0;function te(e,t){let n=v,r=m,i=e.length===0,a=t===void 0?r:t,o=i?p:{owned:null,cleanups:null,context:a?a.context:null,owner:a},s=i?e:()=>e(()=>E(()=>De(o)));m=o,v=null;try{return k(s,!0)}finally{v=n,m=r}}function x(e,t){t=t?Object.assign({},c,t):c;let n={value:e,observers:null,observerSlots:null,comparator:t.equals||void 0};return[he.bind(n),e=>(typeof e==`function`&&(e=h&&h.running&&h.sources.has(n)?e(n.tValue):e(n.value)),ge(n,e))]}function ne(e,t,n){let r=ye(e,t,!0,d);g&&h&&h.running?y.push(r):_e(r)}function S(e,t,n){let r=ye(e,t,!1,d);g&&h&&h.running?y.push(r):_e(r)}function C(e,t,n){u=we;let r=ye(e,t,!1,d),i=me&&O(me);i&&(r.suspense=i),(!n||!n.render)&&(r.user=!0),b?b.push(r):_e(r)}function w(e,t,n){n=n?Object.assign({},c,n):c;let r=ye(e,t,!0,0);return r.observers=null,r.observerSlots=null,r.comparator=n.equals||void 0,g&&h&&h.running?(r.tState=d,y.push(r)):_e(r),he.bind(r)}function re(e,t=i,n){let r=new Map,a=ye(n=>{let i=e();for(let[e,a]of r.entries())if(t(e,i)!==t(e,n))for(let e of a.values())e.state=d,e.pure?y.push(e):b.push(e);return i},void 0,!0,d);return _e(a),e=>{let n=v;if(n){let t;(t=r.get(e))?t.add(n):r.set(e,t=new Set([n])),D(()=>{t.delete(n),!t.size&&r.delete(e)})}return t(e,h&&h.running&&h.sources.has(a)?a.tValue:a.value)}}function T(e){return k(e,!1)}function E(e){if(!_&&v===null)return e();let t=v;v=null;try{return _?_.untrack(e):e()}finally{v=t}}function ie(e,t,n){let r=Array.isArray(e),i,a=n&&n.defer;return n=>{let o;if(r){o=Array(e.length);for(let t=0;t<e.length;t++)o[t]=e[t]()}else o=e();if(a)return a=!1,n;let s=E(()=>t(o,i,n));return i=o,s}}function ae(e){C(()=>E(e))}function D(e){return m===null||(m.cleanups===null?m.cleanups=[e]:m.cleanups.push(e)),e}function oe(){return v}function se(){return m}function ce(e,t){let n=m,r=v;m=e,v=null;try{return k(t,!0)}catch(e){je(e)}finally{m=n,v=r}}function le(e){if(h&&h.running)return e(),h.done;let t=v,n=m;return Promise.resolve().then(()=>{v=t,m=n;let r;return(g||me)&&(r=h||={sources:new Set,effects:[],promises:new Set,disposed:new Set,queue:new Set,running:!0},r.done||=new Promise(e=>r.resolve=e),r.running=!0),k(e,!1),v=m=null,r?r.done:void 0})}var[ue,de]=x(!1);function fe(e,t){let n=Symbol(`context`);return{id:n,Provider:Ne(n),defaultValue:e}}function O(e){let t;return m&&m.context&&(t=m.context[e.id])!==void 0?t:e.defaultValue}function pe(e){let t=w(e),n=w(()=>Me(t()));return n.toArray=()=>{let e=n();return Array.isArray(e)?e:e==null?[]:[e]},n}var me;function he(){let e=h&&h.running;if(this.sources&&(e?this.tState:this.state))if((e?this.tState:this.state)===d)_e(this);else{let e=y;y=null,k(()=>Te(this),!1),y=e}if(v){let e=this.observers?this.observers.length:0;v.sources?(v.sources.push(this),v.sourceSlots.push(e)):(v.sources=[this],v.sourceSlots=[e]),this.observers?(this.observers.push(v),this.observerSlots.push(v.sources.length-1)):(this.observers=[v],this.observerSlots=[v.sources.length-1])}return e&&h.sources.has(this)?this.tValue:this.value}function ge(e,t,n){let r=h&&h.running&&h.sources.has(e)?e.tValue:e.value;if(!e.comparator||!e.comparator(r,t)){if(h){let r=h.running;(r||!n&&h.sources.has(e))&&(h.sources.add(e),e.tValue=t),r||(e.value=t)}else e.value=t;e.observers&&e.observers.length&&k(()=>{for(let t=0;t<e.observers.length;t+=1){let n=e.observers[t],r=h&&h.running;r&&h.disposed.has(n)||((r?!n.tState:!n.state)&&(n.pure?y.push(n):b.push(n),n.observers&&Ee(n)),r?n.tState=d:n.state=d)}if(y.length>1e6)throw y=[],Error()},!1)}return t}function _e(e){if(!e.fn)return;De(e);let t=ee;ve(e,h&&h.running&&h.sources.has(e)?e.tValue:e.value,t),h&&!h.running&&h.sources.has(e)&&queueMicrotask(()=>{k(()=>{h&&(h.running=!0),v=m=e,ve(e,e.tValue,t),v=m=null},!1)})}function ve(e,t,n){let r,i=m,a=v;v=m=e;try{r=e.fn(t)}catch(t){return e.pure&&(h&&h.running?(e.tState=d,e.tOwned&&e.tOwned.forEach(De),e.tOwned=void 0):(e.state=d,e.owned&&e.owned.forEach(De),e.owned=null)),e.updatedAt=n+1,je(t)}finally{v=a,m=i}(!e.updatedAt||e.updatedAt<=n)&&(e.updatedAt!=null&&`observers`in e?ge(e,r,!0):h&&h.running&&e.pure?(h.sources.add(e),e.tValue=r):e.value=r,e.updatedAt=n)}function ye(e,t,n,r=d,i){let a={fn:e,state:r,updatedAt:null,owned:null,sources:null,sourceSlots:null,cleanups:null,value:t,owner:m,context:m?m.context:null,pure:n};if(h&&h.running&&(a.state=0,a.tState=r),m===null||m!==p&&(h&&h.running&&m.pure?m.tOwned?m.tOwned.push(a):m.tOwned=[a]:m.owned?m.owned.push(a):m.owned=[a]),_&&a.fn){let[e,t]=x(void 0,{equals:!1}),n=_.factory(a.fn,t);D(()=>n.dispose());let r=_.factory(a.fn,()=>le(t).then(()=>r.dispose()));a.fn=t=>(e(),h&&h.running?r.track(t):n.track(t))}return a}function be(e){let t=h&&h.running;if((t?e.tState:e.state)===0)return;if((t?e.tState:e.state)===f)return Te(e);if(e.suspense&&E(e.suspense.inFallback))return e.suspense.effects.push(e);let n=[e];for(;(e=e.owner)&&(!e.updatedAt||e.updatedAt<ee);){if(t&&h.disposed.has(e))return;(t?e.tState:e.state)&&n.push(e)}for(let r=n.length-1;r>=0;r--){if(e=n[r],t){let t=e,i=n[r+1];for(;(t=t.owner)&&t!==i;)if(h.disposed.has(t))return}if((t?e.tState:e.state)===d)_e(e);else if((t?e.tState:e.state)===f){let t=y;y=null,k(()=>Te(e,n[0]),!1),y=t}}}function k(e,t){if(y)return e();let n=!1;t||(y=[]),b?n=!0:b=[],ee++;try{let t=e();return xe(n),t}catch(e){n||(b=null),y=null,je(e)}}function xe(e){if(y&&=(g&&h&&h.running?Ce(y):Se(y),null),e)return;let t;if(h){if(!h.promises.size&&!h.queue.size){let e=h.sources,n=h.disposed;b.push.apply(b,h.effects),t=h.resolve;for(let e of b)`tState`in e&&(e.state=e.tState),delete e.tState;h=null,k(()=>{for(let e of n)De(e);for(let t of e){if(t.value=t.tValue,t.owned)for(let e=0,n=t.owned.length;e<n;e++)De(t.owned[e]);t.tOwned&&(t.owned=t.tOwned),delete t.tValue,delete t.tOwned,t.tState=0}de(!1)},!1)}else if(h.running){h.running=!1,h.effects.push.apply(h.effects,b),b=null,de(!0);return}}let n=b;b=null,n.length&&k(()=>u(n),!1),t&&t()}function Se(e){for(let t=0;t<e.length;t++)be(e[t])}function Ce(e){for(let t=0;t<e.length;t++){let n=e[t],r=h.queue;r.has(n)||(r.add(n),g(()=>{r.delete(n),k(()=>{h.running=!0,be(n)},!1),h&&(h.running=!1)}))}}function we(t){let r,i=0;for(r=0;r<t.length;r++){let e=t[r];e.user?t[i++]=e:be(e)}if(e.context){if(e.count){e.effects||=[],e.effects.push(...t.slice(0,i));return}n()}for(e.effects&&(e.done||!e.count)&&(t=[...e.effects,...t],i+=e.effects.length,delete e.effects),r=0;r<i;r++)be(t[r])}function Te(e,t){let n=h&&h.running;n?e.tState=0:e.state=0;for(let r=0;r<e.sources.length;r+=1){let i=e.sources[r];if(i.sources){let e=n?i.tState:i.state;e===d?i!==t&&(!i.updatedAt||i.updatedAt<ee)&&be(i):e===f&&Te(i,t)}}}function Ee(e){let t=h&&h.running;for(let n=0;n<e.observers.length;n+=1){let r=e.observers[n];(t?!r.tState:!r.state)&&(t?r.tState=f:r.state=f,r.pure?y.push(r):b.push(r),r.observers&&Ee(r))}}function De(e){let t;if(e.sources)for(;e.sources.length;){let t=e.sources.pop(),n=e.sourceSlots.pop(),r=t.observers;if(r&&r.length){let e=r.pop(),i=t.observerSlots.pop();n<r.length&&(e.sourceSlots[i]=n,r[n]=e,t.observerSlots[n]=i)}}if(e.tOwned){for(t=e.tOwned.length-1;t>=0;t--)De(e.tOwned[t]);delete e.tOwned}if(h&&h.running&&e.pure)Oe(e,!0);else if(e.owned){for(t=e.owned.length-1;t>=0;t--)De(e.owned[t]);e.owned=null}if(e.cleanups){for(t=e.cleanups.length-1;t>=0;t--)e.cleanups[t]();e.cleanups=null}h&&h.running?e.tState=0:e.state=0}function Oe(e,t){if(t||(e.tState=0,h.disposed.add(e)),e.owned)for(let t=0;t<e.owned.length;t++)Oe(e.owned[t])}function ke(e){return e instanceof Error?e:Error(typeof e==`string`?e:`Unknown error`,{cause:e})}function Ae(e,t,n){try{for(let n of t)n(e)}catch(e){je(e,n&&n.owner||null)}}function je(e,t=m){let n=l&&t&&t.context&&t.context[l],r=ke(e);if(!n)throw r;b?b.push({fn(){Ae(r,n,t)},state:d}):Ae(r,n,t)}function Me(e){if(typeof e==`function`&&!e.length)return Me(e());if(Array.isArray(e)){let t=[];for(let n=0;n<e.length;n++){let r=Me(e[n]);Array.isArray(r)?t.push.apply(t,r):t.push(r)}return t}return e}function Ne(e,t){return function(t){let n;return S(()=>n=E(()=>(m.context={...m.context,[e]:t.value},pe(()=>t.children))),void 0),n}}var Pe=Symbol(`fallback`);function Fe(e){for(let t=0;t<e.length;t++)e[t]()}function Ie(e,t,n={}){let r=[],i=[],a=[],o=0,c=t.length>1?[]:null;return D(()=>Fe(a)),()=>{let l=e()||[],u=l.length,d,f;return l[s],E(()=>{let e,t,s,m,h,g,_,v,y;if(u===0)o!==0&&(Fe(a),a=[],r=[],i=[],o=0,c&&=[]),n.fallback&&(r=[Pe],i[0]=te(e=>(a[0]=e,n.fallback())),o=1);else if(o===0){for(i=Array(u),f=0;f<u;f++)r[f]=l[f],i[f]=te(p);o=u}else{for(s=Array(u),m=Array(u),c&&(h=Array(u)),g=0,_=Math.min(o,u);g<_&&r[g]===l[g];g++);for(_=o-1,v=u-1;_>=g&&v>=g&&r[_]===l[v];_--,v--)s[v]=i[_],m[v]=a[_],c&&(h[v]=c[_]);for(e=new Map,t=Array(v+1),f=v;f>=g;f--)y=l[f],d=e.get(y),t[f]=d===void 0?-1:d,e.set(y,f);for(d=g;d<=_;d++)y=r[d],f=e.get(y),f!==void 0&&f!==-1?(s[f]=i[d],m[f]=a[d],c&&(h[f]=c[d]),f=t[f],e.set(y,f)):a[d]();for(f=g;f<u;f++)f in s?(i[f]=s[f],a[f]=m[f],c&&(c[f]=h[f],c[f](f))):i[f]=te(p);i=i.slice(0,o=u),r=l.slice(0)}return i});function p(e){if(a[f]=e,c){let[e,n]=x(f);return c[f]=n,t(l[f],e)}return t(l[f])}}}var Le=!1;function A(t,i){if(Le&&e.context){let a=e.context;n(r());let o=E(()=>t(i||{}));return n(a),o}return E(()=>t(i||{}))}function Re(){return!0}var ze={get(e,t,n){return t===a?n:e.get(t)},has(e,t){return t===a?!0:e.has(t)},set:Re,deleteProperty:Re,getOwnPropertyDescriptor(e,t){return{configurable:!0,enumerable:!0,get(){return e.get(t)},set:Re,deleteProperty:Re}},ownKeys(e){return e.keys()}};function Be(e){return(e=typeof e==`function`?e():e)?e:{}}function Ve(){for(let e=0,t=this.length;e<t;++e){let t=this[e]();if(t!==void 0)return t}}function j(...e){let t=!1;for(let n=0;n<e.length;n++){let r=e[n];t||=!!r&&a in r,e[n]=typeof r==`function`?(t=!0,w(r)):r}if(o&&t)return new Proxy({get(t){for(let n=e.length-1;n>=0;n--){let r=Be(e[n])[t];if(r!==void 0)return r}},has(t){for(let n=e.length-1;n>=0;n--)if(t in Be(e[n]))return!0;return!1},keys(){let t=[];for(let n=0;n<e.length;n++)t.push(...Object.keys(Be(e[n])));return[...new Set(t)]}},ze);let n={},r=Object.create(null);for(let t=e.length-1;t>=0;t--){let i=e[t];if(!i)continue;let a=Object.getOwnPropertyNames(i);for(let e=a.length-1;e>=0;e--){let t=a[e];if(t===`__proto__`||t===`constructor`)continue;let o=Object.getOwnPropertyDescriptor(i,t);if(!r[t])r[t]=o.get?{enumerable:!0,configurable:!0,get:Ve.bind(n[t]=[o.get.bind(i)])}:o.value===void 0?void 0:o;else{let e=n[t];e&&(o.get?e.push(o.get.bind(i)):o.value!==void 0&&e.push(()=>o.value))}}}let i={},s=Object.keys(r);for(let e=s.length-1;e>=0;e--){let t=s[e],n=r[t];n&&n.get?Object.defineProperty(i,t,n):i[t]=n?n.value:void 0}return i}function M(e,...t){let n=t.length;if(o&&a in e){let r=n>1?t.flat():t[0],i=t.map(t=>new Proxy({get(n){return t.includes(n)?e[n]:void 0},has(n){return t.includes(n)&&n in e},keys(){return t.filter(t=>t in e)}},ze));return i.push(new Proxy({get(t){return r.includes(t)?void 0:e[t]},has(t){return r.includes(t)?!1:t in e},keys(){return Object.keys(e).filter(e=>!r.includes(e))}},ze)),i}let r=[];for(let e=0;e<=n;e++)r[e]={};for(let i of Object.getOwnPropertyNames(e)){let a=n;for(let e=0;e<t.length;e++)if(t[e].includes(i)){a=e;break}let o=Object.getOwnPropertyDescriptor(e,i);!o.get&&!o.set&&o.enumerable&&o.writable&&o.configurable?r[a][i]=o.value:Object.defineProperty(r[a],i,o)}return r}function He(e){let t=`fallback`in e&&{fallback:()=>e.fallback};return w(Ie(()=>e.each,e.children,t||void 0))}var Ue=new Set([`className`,`value`,`readOnly`,`noValidate`,`formNoValidate`,`isMap`,`noModule`,`playsInline`,`adAuctionHeaders`,`allowFullscreen`,`browsingTopics`,`defaultChecked`,`defaultMuted`,`defaultSelected`,`disablePictureInPicture`,`disableRemotePlayback`,`preservesPitch`,`shadowRootClonable`,`shadowRootCustomElementRegistry`,`shadowRootDelegatesFocus`,`shadowRootSerializable`,`sharedStorageWritable`,...`allowfullscreen.async.alpha.autofocus.autoplay.checked.controls.default.disabled.formnovalidate.hidden.indeterminate.inert.ismap.loop.multiple.muted.nomodule.novalidate.open.playsinline.readonly.required.reversed.seamless.selected.adauctionheaders.browsingtopics.credentialless.defaultchecked.defaultmuted.defaultselected.defer.disablepictureinpicture.disableremoteplayback.preservespitch.shadowrootclonable.shadowrootcustomelementregistry.shadowrootdelegatesfocus.shadowrootserializable.sharedstoragewritable`.split(`.`)]),We=new Set([`innerHTML`,`textContent`,`innerText`,`children`]),Ge=Object.assign(Object.create(null),{className:`class`,htmlFor:`for`}),Ke=Object.assign(Object.create(null),{class:`className`,novalidate:{$:`noValidate`,FORM:1},formnovalidate:{$:`formNoValidate`,BUTTON:1,INPUT:1},ismap:{$:`isMap`,IMG:1},nomodule:{$:`noModule`,SCRIPT:1},playsinline:{$:`playsInline`,VIDEO:1},readonly:{$:`readOnly`,INPUT:1,TEXTAREA:1},adauctionheaders:{$:`adAuctionHeaders`,IFRAME:1},allowfullscreen:{$:`allowFullscreen`,IFRAME:1},browsingtopics:{$:`browsingTopics`,IMG:1},defaultchecked:{$:`defaultChecked`,INPUT:1},defaultmuted:{$:`defaultMuted`,AUDIO:1,VIDEO:1},defaultselected:{$:`defaultSelected`,OPTION:1},disablepictureinpicture:{$:`disablePictureInPicture`,VIDEO:1},disableremoteplayback:{$:`disableRemotePlayback`,AUDIO:1,VIDEO:1},preservespitch:{$:`preservesPitch`,AUDIO:1,VIDEO:1},shadowrootclonable:{$:`shadowRootClonable`,TEMPLATE:1},shadowrootdelegatesfocus:{$:`shadowRootDelegatesFocus`,TEMPLATE:1},shadowrootserializable:{$:`shadowRootSerializable`,TEMPLATE:1},sharedstoragewritable:{$:`sharedStorageWritable`,IFRAME:1,IMG:1}});function qe(e,t){let n=Ke[e];return typeof n==`object`?n[t]?n.$:void 0:n}var Je=new Set([`beforeinput`,`click`,`dblclick`,`contextmenu`,`focusin`,`focusout`,`input`,`keydown`,`keyup`,`mousedown`,`mousemove`,`mouseout`,`mouseover`,`mouseup`,`pointerdown`,`pointermove`,`pointerout`,`pointerover`,`pointerup`,`touchend`,`touchmove`,`touchstart`]),Ye=new Set(`altGlyph.altGlyphDef.altGlyphItem.animate.animateColor.animateMotion.animateTransform.circle.clipPath.color-profile.cursor.defs.desc.ellipse.feBlend.feColorMatrix.feComponentTransfer.feComposite.feConvolveMatrix.feDiffuseLighting.feDisplacementMap.feDistantLight.feDropShadow.feFlood.feFuncA.feFuncB.feFuncG.feFuncR.feGaussianBlur.feImage.feMerge.feMergeNode.feMorphology.feOffset.fePointLight.feSpecularLighting.feSpotLight.feTile.feTurbulence.filter.font.font-face.font-face-format.font-face-name.font-face-src.font-face-uri.foreignObject.g.glyph.glyphRef.hkern.image.line.linearGradient.marker.mask.metadata.missing-glyph.mpath.path.pattern.polygon.polyline.radialGradient.rect.set.stop.svg.switch.symbol.text.textPath.tref.tspan.use.view.vkern`.split(`.`)),Xe={xlink:`http://www.w3.org/1999/xlink`,xml:`http://www.w3.org/XML/1998/namespace`},N=e=>w(()=>e());function Ze(e,t,n){let r=n.length,i=t.length,a=r,o=0,s=0,c=t[i-1].nextSibling,l=null;for(;o<i||s<a;){if(t[o]===n[s]){o++,s++;continue}for(;t[i-1]===n[a-1];)i--,a--;if(i===o){let t=a<r?s?n[s-1].nextSibling:n[a-s]:c;for(;s<a;)e.insertBefore(n[s++],t)}else if(a===s)for(;o<i;)(!l||!l.has(t[o]))&&t[o].remove(),o++;else if(t[o]===n[a-1]&&n[s]===t[i-1]){let r=t[--i].nextSibling;e.insertBefore(n[s++],t[o++].nextSibling),e.insertBefore(n[--a],r),t[i]=n[a]}else{if(!l){l=new Map;let e=s;for(;e<a;)l.set(n[e],e++)}let r=l.get(t[o]);if(r!=null)if(s<r&&r<a){let c=o,u=1,d;for(;++c<i&&c<a&&!((d=l.get(t[c]))==null||d!==r+u);)u++;if(u>r-s){let i=t[o];for(;s<r;)e.insertBefore(n[s++],i)}else e.replaceChild(n[s++],t[o++])}else o++;else t[o++].remove()}}}var Qe=`_$DX_DELEGATE`;function $e(e,t,n,r={}){let i;return te(r=>{i=r,t===document?e():L(t,e(),t.firstChild?null:void 0,n)},r.owner),()=>{i(),t.textContent=``}}function P(e,t,n,r){let i,a=()=>{let t=r?document.createElementNS(`http://www.w3.org/1998/Math/MathML`,`template`):document.createElement(`template`);return t.innerHTML=e,n?t.content.firstChild.firstChild:r?t.firstChild:t.content.firstChild},o=t?()=>E(()=>document.importNode(i||=a(),!0)):()=>(i||=a()).cloneNode(!0);return o.cloneNode=o,o}function et(e,t=window.document){let n=t[Qe]||(t[Qe]=new Set);for(let r=0,i=e.length;r<i;r++){let i=e[r];n.has(i)||(n.add(i),t.addEventListener(i,mt))}}function tt(e,t,n){ut(e)||(n==null?e.removeAttribute(t):e.setAttribute(t,n))}function nt(e,t,n,r){ut(e)||(r==null?e.removeAttributeNS(t,n):e.setAttributeNS(t,n,r))}function rt(e,t,n){ut(e)||(n?e.setAttribute(t,``):e.removeAttribute(t))}function it(e,t){ut(e)||(t==null?e.removeAttribute(`class`):e.className=t)}function at(e,t,n,r){if(r)Array.isArray(n)?(e[`$$${t}`]=n[0],e[`$$${t}Data`]=n[1]):e[`$$${t}`]=n;else if(Array.isArray(n)){let r=n[0];e.addEventListener(t,n[0]=t=>r.call(e,n[1],t))}else e.addEventListener(t,n,typeof n!=`function`&&n)}function ot(e,t,n={}){let r=Object.keys(t||{}),i=Object.keys(n),a,o;for(a=0,o=i.length;a<o;a++){let r=i[a];!r||r===`undefined`||t[r]||(ft(e,r,!1),delete n[r])}for(a=0,o=r.length;a<o;a++){let i=r[a],o=!!t[i];!i||i===`undefined`||n[i]===o||!o||(ft(e,i,!0),n[i]=o)}return n}function st(e,t,n){if(!t)return n?tt(e,`style`):t;let r=e.style;if(typeof t==`string`)return r.cssText=t;typeof n==`string`&&(r.cssText=n=void 0),n||={},t||={};let i,a;for(a in n)t[a]??r.removeProperty(a),delete n[a];for(a in t)i=t[a],i!==n[a]&&(r.setProperty(a,i),n[a]=i);return n}function F(e,t={},n,r){let i={};return r||S(()=>i.children=ht(e,t.children,i.children)),S(()=>typeof t.ref==`function`&&I(t.ref,e)),S(()=>ct(e,t,n,!0,i,!0)),i}function I(e,t,n){return E(()=>e(t,n))}function L(e,t,n,r){if(n!==void 0&&!r&&(r=[]),typeof t!=`function`)return ht(e,t,r,n);S(r=>ht(e,t(),r,n),r)}function ct(e,t,n,r,i={},a=!1){for(let r in t||={},i)if(!(r in t)){if(r===`children`)continue;i[r]=pt(e,r,null,i[r],n,a,t)}for(let o in t){if(o===`children`){r||ht(e,t.children);continue}let s=t[o];i[o]=pt(e,o,s,i[o],n,a,t)}}function lt(t){let n,r;return!ut()||!(n=e.registry.get(r=yt()))?t():(e.completed&&e.completed.add(n),e.registry.delete(r),n)}function ut(t){return!!e.context&&!e.done&&(!t||t.isConnected)}function dt(e){return e.toLowerCase().replace(/-([a-z])/g,(e,t)=>t.toUpperCase())}function ft(e,t,n){let r=t.trim().split(/\s+/);for(let t=0,i=r.length;t<i;t++)e.classList.toggle(r[t],n)}function pt(e,t,n,r,i,a,o){let s,c,l,u,d;if(t===`style`)return st(e,n,r);if(t===`classList`)return ot(e,n,r);if(n===r)return r;if(t===`ref`)a||n(e);else if(t.slice(0,3)===`on:`){let i=t.slice(3);r&&e.removeEventListener(i,r,typeof r!=`function`&&r),n&&e.addEventListener(i,n,typeof n!=`function`&&n)}else if(t.slice(0,10)===`oncapture:`){let i=t.slice(10);r&&e.removeEventListener(i,r,!0),n&&e.addEventListener(i,n,!0)}else if(t.slice(0,2)===`on`){let i=t.slice(2).toLowerCase(),a=Je.has(i);if(!a&&r){let t=Array.isArray(r)?r[0]:r;e.removeEventListener(i,t)}(a||n)&&(at(e,i,n,a),a&&et([i]))}else if(t.slice(0,5)===`attr:`)tt(e,t.slice(5),n);else if(t.slice(0,5)===`bool:`)rt(e,t.slice(5),n);else if((d=t.slice(0,5)===`prop:`)||(l=We.has(t))||!i&&((u=qe(t,e.tagName))||(c=Ue.has(t)))||(s=e.nodeName.includes(`-`)||`is`in o)){if(d)t=t.slice(5),c=!0;else if(ut(e))return n;t===`class`||t===`className`?it(e,n):s&&!c&&!l?e[dt(t)]=n:e[u||t]=n}else{let r=i&&t.indexOf(`:`)>-1&&Xe[t.split(`:`)[0]];r?nt(e,r,t,n):tt(e,Ge[t]||t,n)}return n}function mt(t){if(e.registry&&e.events&&e.events.find(([e,n])=>n===t))return;let n=t.target,r=`$$${t.type}`,i=t.target,a=t.currentTarget,o=e=>Object.defineProperty(t,`target`,{configurable:!0,value:e}),s=()=>{let e=n[r];if(e&&!n.disabled){let i=n[`${r}Data`];if(i===void 0?e.call(n,t):e.call(n,i,t),t.cancelBubble)return}return n.host&&typeof n.host!=`string`&&!n.host._$host&&n.contains(t.target)&&o(n.host),!0},c=()=>{for(;s()&&(n=n._$host||n.parentNode||n.host););};if(Object.defineProperty(t,`currentTarget`,{configurable:!0,get(){return n||document}}),e.registry&&!e.done&&(e.done=_$HY.done=!0),t.composedPath){let e=t.composedPath();o(e[0]);for(let t=0;t<e.length-2&&(n=e[t],s());t++){if(n._$host){n=n._$host,c();break}if(n.parentNode===a)break}}else c();o(i)}function ht(e,t,n,r,i){let a=ut(e);if(a){!n&&(n=[...e.childNodes]);let t=[];for(let e=0;e<n.length;e++){let r=n[e];r.nodeType===8&&r.data.slice(0,2)===`!$`?r.remove():t.push(r)}n=t}for(;typeof n==`function`;)n=n();if(t===n)return n;let o=typeof t,s=r!==void 0;if(e=s&&n[0]&&n[0].parentNode||e,o===`string`||o===`number`){if(a||o===`number`&&(t=t.toString(),t===n))return n;if(s){let i=n[0];i&&i.nodeType===3?i.data!==t&&(i.data=t):i=document.createTextNode(t),n=vt(e,n,r,i)}else n=n!==``&&typeof n==`string`?e.firstChild.data=t:e.textContent=t}else if(t==null||o===`boolean`){if(a)return n;n=vt(e,n,r)}else if(o===`function`)return S(()=>{let i=t();for(;typeof i==`function`;)i=i();n=ht(e,i,n,r)}),()=>n;else if(Array.isArray(t)){let o=[],c=n&&Array.isArray(n);if(gt(o,t,n,i))return S(()=>n=ht(e,o,n,r,!0)),()=>n;if(a){if(!o.length)return n;if(r===void 0)return n=[...e.childNodes];let t=o[0];if(t.parentNode!==e)return n;let i=[t];for(;(t=t.nextSibling)!==r;)i.push(t);return n=i}if(o.length===0){if(n=vt(e,n,r),s)return n}else c?n.length===0?_t(e,o,r):Ze(e,n,o):(n&&vt(e),_t(e,o));n=o}else if(t.nodeType){if(a&&t.parentNode)return n=s?[t]:t;if(Array.isArray(n)){if(s)return n=vt(e,n,r,t);vt(e,n,null,t)}else n==null||n===``||!e.firstChild?e.appendChild(t):e.replaceChild(t,e.firstChild);n=t}return n}function gt(e,t,n,r){let i=!1;for(let a=0,o=t.length;a<o;a++){let o=t[a],s=n&&n[e.length],c;if(!(o==null||o===!0||o===!1))if((c=typeof o)==`object`&&o.nodeType)e.push(o);else if(Array.isArray(o))i=gt(e,o,s)||i;else if(c===`function`)if(r){for(;typeof o==`function`;)o=o();i=gt(e,Array.isArray(o)?o:[o],Array.isArray(s)?s:[s])||i}else e.push(o),i=!0;else{let t=String(o);s&&s.nodeType===3&&s.data===t?e.push(s):e.push(document.createTextNode(t))}}return i}function _t(e,t,n=null){for(let r=0,i=t.length;r<i;r++)e.insertBefore(t[r],n)}function vt(e,t,n,r){if(n===void 0)return e.textContent=``;let i=r||document.createTextNode(``);if(t.length){let r=!1;for(let a=t.length-1;a>=0;a--){let o=t[a];if(i!==o){let t=o.parentNode===e;!r&&!a?t?e.replaceChild(i,o):e.insertBefore(i,n):t&&o.remove()}else r=!0}}else e.insertBefore(i,n);return[i]}function yt(){return e.getNextContextId()}var bt=`http://www.w3.org/2000/svg`;function xt(e,t=!1,n=void 0){return t?document.createElementNS(bt,e):document.createElement(e,{is:n})}function St(t){let{useShadow:n}=t,r=document.createTextNode(``),i=()=>t.mount||document.body,a=se(),o,s=!!e.context;return C(()=>{s&&(se().user=s=!1),o||=ce(a,()=>w(()=>t.children));let e=i();if(e instanceof HTMLHeadElement){let[t,n]=x(!1);te(n=>L(e,()=>t()?n():o(),null)),D(()=>n(!0))}else{let i=xt(t.isSVG?`g`:`div`,t.isSVG),a=n&&i.attachShadow?i.attachShadow({mode:`open`}):i;Object.defineProperty(i,`_$host`,{get(){return r.parentNode},configurable:!0}),L(a,o),e.appendChild(i),t.ref&&t.ref(i),D(()=>e.removeChild(i))}},void 0,{render:!s}),r}function Ct(t,n){let r=w(t);return w(()=>{let t=r();switch(typeof t){case`function`:return E(()=>t(n));case`string`:let r=Ye.has(t),i=e.context?lt():xt(t,r,E(()=>n.is));return F(i,n,r),i}})}function wt(e){let[,t]=M(e,[`component`]);return Ct(()=>e.component,t)}var Tt=Symbol(`store-raw`),Et=Symbol(`store-node`),R=Symbol(`store-has`),Dt=Symbol(`store-self`);function Ot(e){let t;return typeof e==`object`&&!!e&&(e[a]||!(t=Object.getPrototypeOf(e))||t===Object.prototype||Array.isArray(e))}function kt(e,t=new Set){let n,r,i,a;if(n=e!=null&&e[Tt])return n;if(!Ot(e)||t.has(e))return e;if(Array.isArray(e)){Object.isFrozen(e)?e=e.slice(0):t.add(e);for(let n=0,a=e.length;n<a;n++)i=e[n],(r=kt(i,t))!==i&&(e[n]=r)}else{Object.isFrozen(e)?e=Object.assign({},e):t.add(e);let n=Object.keys(e),o=Object.getOwnPropertyDescriptors(e);for(let s=0,c=n.length;s<c;s++)a=n[s],!o[a].get&&(i=e[a],(r=kt(i,t))!==i&&(e[a]=r))}return e}function At(e,t){let n=e[t];return n||Object.defineProperty(e,t,{value:n=Object.create(null)}),n}function jt(e,t,n){if(e[t])return e[t];let[r,i]=x(n,{equals:!1,internal:!0});return r.$=i,e[t]=r}function Mt(e){oe()&&jt(At(e,Et),Dt)()}function Nt(e){return Mt(e),Reflect.ownKeys(e)}function z(e,t,n,r=!1){if(!r&&e[t]===n)return;let i=e[t],a=e.length;n===void 0?(delete e[t],e[R]&&e[R][t]&&i!==void 0&&e[R][t].$()):(e[t]=n,e[R]&&e[R][t]&&i===void 0&&e[R][t].$());let o=At(e,Et),s;if((s=jt(o,t,i))&&s.$(()=>n),Array.isArray(e)&&e.length!==a){for(let t=e.length;t<a;t++)(s=o[t])&&s.$();(s=jt(o,`length`,a))&&s.$(e.length)}(s=o[Dt])&&s.$()}function Pt(e,t){let n=Reflect.getOwnPropertyDescriptor(e,t);return!n||n.get||n.set||!n.configurable||t===a||t===Et?n:(delete n.value,delete n.writable,n.get=()=>e[a][t],n.set=n=>e[a][t]=n,n)}var Ft={get(e,t,n){if(t===Tt)return e;if(t===a)return n;if(t===s)return Mt(e),n;let r=At(e,Et),i=r[t],o=i?i():e[t];if(t===Et||t===R||t===`__proto__`)return o;if(!i){let i=Object.getOwnPropertyDescriptor(e,t),a=typeof o==`function`;if(oe()&&(!a||e.hasOwnProperty(t))&&!(i&&i.get))o=jt(r,t,o)();else if(o!=null&&a&&o===Array.prototype[t])return(...e)=>T(()=>Array.prototype[t].apply(n,e))}return Ot(o)?It(o):o},has(e,t){return t===Tt||t===a||t===s||t===Et||t===R||t===`__proto__`?!0:(oe()&&jt(At(e,R),t)(),t in e)},set(e,t,n){return T(()=>z(e,t,kt(n))),!0},deleteProperty(e,t){return T(()=>z(e,t,void 0,!0)),!0},ownKeys:Nt,getOwnPropertyDescriptor:Pt};function It(e){let t=e[a];if(!t){Object.defineProperty(e,a,{value:t=new Proxy(e,Ft)});let n=Object.keys(e),r=Object.getOwnPropertyDescriptors(e),i=Object.getPrototypeOf(e),o=i!==null&&typeof e==`object`&&!!e&&!Array.isArray(e)&&i!==Object.prototype;if(o){let e=i;for(;e!=null;){let t=Object.getOwnPropertyDescriptors(e);n.push(...Object.keys(t)),Object.assign(r,t),e=Object.getPrototypeOf(e)}}for(let i=0,a=n.length;i<a;i++){let a=n[i];if(!(o&&a===`constructor`)){if(r[a].get){let n=r[a].get.bind(t);Object.defineProperty(e,a,{get:n,configurable:!0})}if(r[a].set){let n=r[a].set;Object.defineProperty(e,a,{set:e=>T(()=>n.call(t,e)),configurable:!0})}}}}return t}function B(e,t){let n=kt(e||{});return It(n)}var Lt=Symbol(`store-root`);function Rt(e,t,n,r,i){let a=t[n];if(e===a)return;let o=Array.isArray(e);if(n!==Lt&&(!Ot(e)||!Ot(a)||o!==Array.isArray(a)||i&&e[i]!==a[i])){z(t,n,e);return}if(o){if(e.length&&a.length&&(!r||i&&e[0]&&e[0][i]!=null)){let t,n,o,s,c,l,u,d;for(o=0,s=Math.min(a.length,e.length);o<s&&(a[o]===e[o]||i&&a[o]&&e[o]&&a[o][i]&&a[o][i]===e[o][i]);o++)Rt(e[o],a,o,r,i);let f=Array(e.length),p=new Map;for(s=a.length-1,c=e.length-1;s>=o&&c>=o&&(a[s]===e[c]||i&&a[s]&&e[c]&&a[s][i]&&a[s][i]===e[c][i]);s--,c--)f[c]=a[s];if(o>c||o>s){for(n=o;n<=c;n++)z(a,n,e[n]);for(;n<e.length;n++)z(a,n,f[n]),Rt(e[n],a,n,r,i);a.length>e.length&&z(a,`length`,e.length);return}for(u=Array(c+1),n=c;n>=o;n--)l=e[n],d=i&&l?l[i]:l,t=p.get(d),u[n]=t===void 0?-1:t,p.set(d,n);for(t=o;t<=s;t++)l=a[t],d=i&&l?l[i]:l,n=p.get(d),n!==void 0&&n!==-1&&(f[n]=a[t],n=u[n],p.set(d,n));for(n=o;n<e.length;n++)n in f?(z(a,n,f[n]),Rt(e[n],a,n,r,i)):z(a,n,e[n])}else for(let t=0,n=e.length;t<n;t++)Rt(e[t],a,t,r,i);a.length>e.length&&z(a,`length`,e.length);return}let s=Object.keys(e);for(let t=0,n=s.length;t<n;t++)Rt(e[s[t]],a,s[t],r,i);let c=Object.keys(a);for(let t=0,n=c.length;t<n;t++)e[c[t]]===void 0&&z(a,c[t],void 0)}function zt(e,t={}){let{merge:n,key:r=`id`}=t,i=kt(e);return e=>{if(!Ot(e)||!Ot(i))return i;let t=Rt(i,{[Lt]:e},Lt,n,r);return t===void 0?e:t}}function Bt(e,t){let n=new Set(t);return e.filter(e=>!n.has(e))}function Vt(e,t){let n={};for(let r=0;r<e.length;r++){let i=e[r],a=t(i);Object.hasOwn(n,a)||(n[a]=[]),n[a].push(i)}return n}function Ht(e,t){let n=e.slice(),r=[],i=0;for(let a=0;a<e.length;a++){if(t(e[a],a,n)){r.push(e[a]);continue}if(!Object.hasOwn(e,a)){delete e[i++];continue}e[i++]=e[a]}return e.length=i,r}function Ut(e){return typeof e==`symbol`||e instanceof Symbol}function Wt(e){return Ut(e)?NaN:Number(e)}function Gt(e){return e?(e=Wt(e),e===1/0||e===-1/0?(e<0?-1:1)*Number.MAX_VALUE:e===e?e:0):e===0?e:0}function Kt(e){let t=Gt(e),n=t%1;return n?t-n:t}function qt(e,t){let n={};for(let r=0;r<e.length;r++)n[e[r]]=t[r];return n}var Jt=class extends Error{constructor(e=`The operation was aborted`){super(e),this.name=`AbortError`}};function Yt(e){return e}function Xt(){}function Zt(e,{signal:t}={}){return new Promise((n,r)=>{let i=()=>{r(new Jt)},a=()=>{clearTimeout(o),i()};if(t?.aborted)return i();let o=setTimeout(()=>{t?.removeEventListener(`abort`,a),n()},e);t?.addEventListener(`abort`,a,{once:!0})})}function Qt(e,t,n){return n==null?Math.min(e,t):Math.min(Math.max(e,t),n)}function $t(e,t){let n=0;for(let r=0;r<e.length;r++)n+=t(e[r],r);return n}function en(e,t,n=1){if(t??(t=e,e=0),!Number.isInteger(n)||n===0)throw Error(`The step value must be a non-zero integer.`);let r=Math.max(Math.ceil((t-e)/n),0),i=Array(r);for(let t=0;t<r;t++)i[t]=e+t*n;return i}function tn(e){return e==null||typeof e!=`object`&&typeof e!=`function`}function nn(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function rn(e){return Object.getOwnPropertySymbols(e).filter(t=>Object.prototype.propertyIsEnumerable.call(e,t))}function an(e){return e==null?e===void 0?`[object Undefined]`:`[object Null]`:Object.prototype.toString.call(e)}var on=`[object RegExp]`,sn=`[object String]`,cn=`[object Number]`,ln=`[object Boolean]`,un=`[object Arguments]`,dn=`[object Symbol]`,fn=`[object Date]`,pn=`[object Map]`,mn=`[object Set]`,hn=`[object Array]`,gn=`[object Function]`,_n=`[object ArrayBuffer]`,vn=`[object Object]`,yn=`[object Error]`,bn=`[object DataView]`,xn=`[object Uint8Array]`,Sn=`[object Uint8ClampedArray]`,Cn=`[object Uint16Array]`,wn=`[object Uint32Array]`,Tn=`[object BigUint64Array]`,En=`[object Int8Array]`,Dn=`[object Int16Array]`,On=`[object Int32Array]`,kn=`[object BigInt64Array]`,An=`[object Float32Array]`,jn=`[object Float64Array]`;function Mn(e,t){return Nn(e,void 0,e,new Map,t)}function Nn(e,t,n,r=new Map,i=void 0){let a=i?.(e,t,n,r);if(a!==void 0)return a;if(tn(e))return e;if(r.has(e))return r.get(e);if(Array.isArray(e)){let t=Array(e.length);r.set(e,t);for(let a=0;a<e.length;a++)t[a]=Nn(e[a],a,n,r,i);return Object.hasOwn(e,`index`)&&(t.index=e.index),Object.hasOwn(e,`input`)&&(t.input=e.input),t}if(e instanceof Date)return new Date(e.getTime());if(e instanceof RegExp){let t=new RegExp(e.source,e.flags);return t.lastIndex=e.lastIndex,t}if(e instanceof Map){let t=new Map;r.set(e,t);for(let[a,o]of e)t.set(a,Nn(o,a,n,r,i));return t}if(e instanceof Set){let t=new Set;r.set(e,t);for(let a of e)t.add(Nn(a,void 0,n,r,i));return t}if(typeof Buffer<`u`&&Buffer.isBuffer(e))return e.subarray();if(nn(e)){let t=new(Object.getPrototypeOf(e)).constructor(e.length);r.set(e,t);for(let a=0;a<e.length;a++)t[a]=Nn(e[a],a,n,r,i);return t}if(e instanceof ArrayBuffer||typeof SharedArrayBuffer<`u`&&e instanceof SharedArrayBuffer)return e.slice(0);if(e instanceof DataView){let t=new DataView(e.buffer.slice(0),e.byteOffset,e.byteLength);return r.set(e,t),V(t,e,n,r,i),t}if(typeof File<`u`&&e instanceof File){let t=new File([e],e.name,{type:e.type});return r.set(e,t),V(t,e,n,r,i),t}if(typeof Blob<`u`&&e instanceof Blob){let t=new Blob([e],{type:e.type});return r.set(e,t),V(t,e,n,r,i),t}if(e instanceof Error){let t=new e.constructor;return r.set(e,t),t.message=e.message,t.name=e.name,t.stack=e.stack,t.cause=e.cause,V(t,e,n,r,i),t}if(e instanceof Boolean){let t=new Boolean(e.valueOf());return r.set(e,t),V(t,e,n,r,i),t}if(e instanceof Number){let t=new Number(e.valueOf());return r.set(e,t),V(t,e,n,r,i),t}if(e instanceof String){let t=new String(e.valueOf());return r.set(e,t),V(t,e,n,r,i),t}if(typeof e==`object`&&Pn(e)){let t=Object.create(Object.getPrototypeOf(e));return r.set(e,t),V(t,e,n,r,i),t}return e}function V(e,t,n=e,r,i){let a=[...Object.keys(t),...rn(t)];for(let o=0;o<a.length;o++){let s=a[o],c=Object.getOwnPropertyDescriptor(e,s);(c==null||c.writable)&&(e[s]=Nn(t[s],s,n,r,i))}}function Pn(e){switch(an(e)){case un:case hn:case _n:case bn:case ln:case fn:case An:case jn:case En:case Dn:case On:case pn:case cn:case vn:case on:case mn:case sn:case dn:case xn:case Sn:case Cn:case wn:return!0;default:return!1}}function Fn(e){return Nn(e,void 0,e,new Map,void 0)}function In(e){if(!e||typeof e!=`object`)return!1;let t=Object.getPrototypeOf(e);return t===null||t===Object.prototype||Object.getPrototypeOf(t)===null?Object.prototype.toString.call(e)===`[object Object]`:!1}function Ln(e,t){let n={},r=Object.keys(e);for(let i=0;i<r.length;i++){let a=r[i],o=e[a];n[a]=t(o,a,e)}return n}function Rn(e){return e===`__proto__`}function zn(e){if(typeof e!=`object`||!e)return!1;if(Object.getPrototypeOf(e)===null)return!0;if(Object.prototype.toString.call(e)!==`[object Object]`){let t=e[Symbol.toStringTag];return t==null||!Object.getOwnPropertyDescriptor(e,Symbol.toStringTag)?.writable?!1:e.toString()===`[object ${t}]`}let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function Bn(e,t){return e===t||Number.isNaN(e)&&Number.isNaN(t)}function Vn(e,t,n){return Hn(e,t,void 0,void 0,void 0,void 0,n)}function Hn(e,t,n,r,i,a,o){let s=o(e,t,n,r,i,a);if(s!==void 0)return s;if(typeof e==typeof t)switch(typeof e){case`bigint`:case`string`:case`boolean`:case`symbol`:case`undefined`:return e===t;case`number`:return e===t||Object.is(e,t);case`function`:return e===t;case`object`:return Un(e,t,a,o)}return Un(e,t,a,o)}function Un(e,t,n,r){if(Object.is(e,t))return!0;let i=an(e),a=an(t);if(i===`[object Arguments]`&&(i=vn),a===`[object Arguments]`&&(a=vn),i!==a)return!1;switch(i){case sn:return e.toString()===t.toString();case cn:{let n=e.valueOf(),r=t.valueOf();return Bn(n,r)}case ln:case fn:case dn:return Object.is(e.valueOf(),t.valueOf());case on:return e.source===t.source&&e.flags===t.flags;case gn:return e===t}n??=new Map;let o=n.get(e),s=n.get(t);if(o!=null&&s!=null)return o===t;n.set(e,t),n.set(t,e);try{switch(i){case pn:if(e.size!==t.size)return!1;for(let[i,a]of e.entries())if(!t.has(i)||!Hn(a,t.get(i),i,e,t,n,r))return!1;return!0;case mn:{if(e.size!==t.size)return!1;let i=Array.from(e.values()),a=Array.from(t.values());for(let o=0;o<i.length;o++){let s=i[o],c=a.findIndex(i=>Hn(s,i,void 0,e,t,n,r));if(c===-1)return!1;a.splice(c,1)}return!0}case hn:case xn:case Sn:case Cn:case wn:case Tn:case En:case Dn:case On:case kn:case An:case jn:if(typeof Buffer<`u`&&Buffer.isBuffer(e)!==Buffer.isBuffer(t)||e.length!==t.length)return!1;for(let i=0;i<e.length;i++)if(!Hn(e[i],t[i],i,e,t,n,r))return!1;return!0;case _n:return e.byteLength===t.byteLength?Un(new Uint8Array(e),new Uint8Array(t),n,r):!1;case bn:return e.byteLength!==t.byteLength||e.byteOffset!==t.byteOffset?!1:Un(new Uint8Array(e),new Uint8Array(t),n,r);case yn:return e.name===t.name&&e.message===t.message;case vn:{if(!(Un(e.constructor,t.constructor,n,r)||In(e)&&In(t)))return!1;let i=[...Object.keys(e),...rn(e)],a=[...Object.keys(t),...rn(t)];if(i.length!==a.length)return!1;for(let a=0;a<i.length;a++){let o=i[a],s=e[o];if(!Object.hasOwn(t,o))return!1;let c=t[o];if(!Hn(s,c,o,e,t,n,r))return!1}return!0}default:return!1}}finally{n.delete(e),n.delete(t)}}function Wn(e,t){return Vn(e,t,Xt)}function Gn(e){return typeof e==`function`}function Kn(e){return Number.isSafeInteger(e)&&e>=0}function qn(e){return e instanceof Promise}function Jn(){return!0}const Yn={get(e,t,n){return t===a?n:e.get(t)},has(e,t){return e.has(t)},set:Jn,deleteProperty:Jn,getOwnPropertyDescriptor(e,t){return{configurable:!0,enumerable:!0,get(){return e.get(t)},set:Jn,deleteProperty:Jn}},ownKeys(e){return e.keys()}};function Xn(e){return e!==null&&(typeof e==`object`||typeof e==`function`)}const Zn=e=>e!=null,Qn=e=>e.filter(Zn);function $n(e){return(...t)=>{for(let n of e)n&&n(...t)}}function er(e){return(...t)=>{for(let n=e.length-1;n>=0;n--){let r=e[n];r&&r(...t)}}}const H=e=>typeof e==`function`&&!e.length?e():e,tr=e=>Array.isArray(e)?e:e?[e]:[];function nr(e,...t){return typeof e==`function`?e(...t):e}const rr=Object.entries,ir=D;function ar(e,t,n,r){let i=e.length,a=t.length,o=0;if(!a){for(;o<i;o++)n(e[o]);return}if(!i){for(;o<a;o++)r(t[o]);return}for(;o<a&&t[o]===e[o];o++);let s,c;t=t.slice(o),e=e.slice(o);for(s of t)e.includes(s)||r(s);for(c of e)t.includes(c)||n(c)}var or=/((?:--)?(?:\w+-?)+)\s*:\s*([^;]*)/g;function sr(e){let t={},n;for(;n=or.exec(e);)t[n[1]]=n[2];return t}function cr(e,t){if(typeof e==`string`){if(typeof t==`string`)return`${e};${t}`;e=sr(e)}else typeof t==`string`&&(t=sr(t));return{...e,...t}}var lr=(e,t,n)=>{let r;for(let i of e){let e=H(i)[t];r?e&&(r=n(r,e)):r=e}return r};function U(...e){let t=Array.isArray(e[0]),n=t?e[0]:e;if(n.length===1)return n[0];let r=t&&e[1]?.reverseEventHandlers?er:$n,i={};for(let e of n){let t=H(e);for(let e in t)if(e[0]===`o`&&e[1]===`n`&&e[2]){let n=t[e],r=e.toLowerCase(),a=typeof n==`function`?n:Array.isArray(n)?n.length===1?n[0]:n[0].bind(void 0,n[1]):void 0;a?i[r]?i[r].push(a):i[r]=[a]:delete i[r]}}let a=j(...n);return new Proxy({get(e){if(typeof e!=`string`)return Reflect.get(a,e);if(e===`style`)return lr(n,`style`,cr);if(e===`ref`){let t=[];for(let r of n){let n=H(r)[e];typeof n==`function`&&t.push(n)}return r(t)}if(e[0]===`o`&&e[1]===`n`&&e[2]){let t=i[e.toLowerCase()];return t?r(t):Reflect.get(a,e)}return e===`class`||e===`className`?lr(n,e,(e,t)=>`${e} ${t}`):e===`classList`?lr(n,e,(e,t)=>({...e,...t})):Reflect.get(a,e)},has(e){return Reflect.has(a,e)},keys(){return Object.keys(a)}},Yn)}function ur(e,t,n,r){return e.addEventListener(t,n,r),ir(e.removeEventListener.bind(e,t,n,r))}function W(e,t,n,r){let i=()=>{tr(H(e)).forEach(e=>{e&&tr(H(t)).forEach(t=>ur(e,t,n,r))})};typeof e==`function`?C(i):S(i)}function dr(e,t,n){for(let[r,i]of rr(t))i&&W(e,r,i,n)}const fr=e=>Object.assign({},e);function pr(e,...t){let n=typeof t[0]==`string`?[t]:t,r=fr(e),i=[];for(let e=0;e<n.length;e++){let t=n[e];i.push({});for(let n of t)i[e][n]=r[n],delete r[n]}return[...i,r]}var mr=e=>e.substring(2).toLowerCase();const hr=e=>{let t={};return Object.entries(e).forEach(([e,n])=>t[mr(e)]=n),t};function gr(e){let[{target:t=document.body,pointerTypes:n,passive:r=!0},i]=pr(e,`target`,`pointerTypes`,`passive`),[{gotcapture:a,lostcapture:o},s]=pr(hr(i),`gotcapture`,`lostcapture`),c=e=>t=>(!n||n.includes(t.pointerType))&&e(t),l=(e,n)=>W(t,e,c(n),{passive:r});rr(s).forEach(([e,t])=>t&&l(`pointer${e}`,t)),a&&l(`gotpointercapture`,a),o&&l(`lostpointercapture`,o)}const _r=(e,t)=>{let{pointerTypes:n,handler:r}=(()=>{let e=t();return typeof e==`function`?{handler:e,pointerTypes:void 0}:e})(),i=new Set;gr({target:e,pointerTypes:n,onEnter:t=>{i.add(t.pointerId),r(!0,e)},onLeave:t=>{i.delete(t.pointerId),i.size===0&&r(!1,e)}})};function vr(e,t,n){let r,i,a=typeof window<`u`&&`MutationObserver`in window;typeof t==`function`?(r={},i=t):(r=t,i=n);let o=a?new MutationObserver(i):void 0,s=(e,t)=>o?.observe(e,H(t)??r),c=()=>{tr(H(e)).forEach(e=>{e instanceof Node?s(e,r):s(e[0],e[1])})},l=()=>o?.disconnect();return ae(c),D(l),[s,{start:c,stop:l,instance:o,isSupported:a}]}function yr(e){return arguments.length===0?[]:Array.isArray(e)?e:[e]}function br(e){return e!=null&&typeof e!=`function`&&Kn(e.length)}function xr(e){switch(typeof e){case`number`:case`symbol`:return!1;case`string`:return e.includes(`.`)||e.includes(`[`)||e.includes(`]`)}}function Sr(e){return typeof e==`string`||typeof e==`symbol`?e:Object.is(e?.valueOf?.(),-0)?`-0`:String(e)}function Cr(e){if(e==null)return``;if(typeof e==`string`)return e;if(Array.isArray(e))return e.map(Cr).join(`,`);let t=String(e);return t===`0`&&Object.is(Number(e),-0)?`-0`:t}function wr(e){if(Array.isArray(e))return e.map(Sr);if(typeof e==`symbol`)return[e];e=Cr(e);let t=[],n=e.length;if(n===0)return t;let r=0,i=``,a=``,o=!1;for(e.charCodeAt(0)===46&&(t.push(``),r++);r<n;){let s=e[r];a?s===`\\`&&r+1<n?(r++,i+=e[r]):s===a?a=``:i+=s:o?s===`"`||s===`'`?a=s:s===`]`?(o=!1,t.push(i),i=``):i+=s:s===`[`?(o=!0,i&&=(t.push(i),``)):s===`.`?i&&=(t.push(i),``):i+=s,r++}return i&&t.push(i),t}function Tr(e,t,n){if(e==null)return n;switch(typeof t){case`string`:{if(Rn(t))return n;let r=e[t];return r===void 0?xr(t)?Tr(e,wr(t),n):n:r}case`number`:case`symbol`:{typeof t==`number`&&(t=Sr(t));let r=e[t];return r===void 0?n:r}default:{if(Array.isArray(t))return Er(e,t,n);if(t=Object.is(t?.valueOf(),-0)?`-0`:String(t),Rn(t))return n;let r=e[t];return r===void 0?n:r}}}function Er(e,t,n){if(t.length===0)return n;let r=e;for(let e=0;e<t.length;e++){if(r==null||Rn(t[e]))return n;r=r[t[e]]}return r===void 0?n:r}function Dr(e){return function(t){return Tr(t,e)}}function Or(e){return e!==null&&(typeof e==`object`||typeof e==`function`)}function kr(e,t,n){return typeof n==`function`?Ar(e,t,function e(t,r,i,a,o,s){let c=n(t,r,i,a,o,s);return c===void 0?Ar(t,r,e,s):!!c},new Map):kr(e,t,()=>void 0)}function Ar(e,t,n,r){if(t===e)return!0;switch(typeof t){case`object`:return jr(e,t,n,r);case`function`:return Object.keys(t).length>0?Ar(e,{...t},n,r):Bn(e,t);default:return Or(e)?typeof t==`string`?t===``:!0:Bn(e,t)}}function jr(e,t,n,r){if(t==null)return!0;if(Array.isArray(t))return Nr(e,t,n,r);if(t instanceof Map)return Mr(e,t,n,r);if(t instanceof Set)return Pr(e,t,n,r);let i=Object.keys(t);if(e==null||tn(e))return i.length===0;if(i.length===0)return!0;if(r?.has(t))return r.get(t)===e;r?.set(t,e);try{for(let a=0;a<i.length;a++){let o=i[a];if(!tn(e)&&!(o in e)||t[o]===void 0&&e[o]!==void 0||t[o]===null&&e[o]!==null||!n(e[o],t[o],o,e,t,r))return!1}return!0}finally{r?.delete(t)}}function Mr(e,t,n,r){if(t.size===0)return!0;if(!(e instanceof Map))return!1;for(let[i,a]of t.entries()){let o=e.get(i);if(n(o,a,i,e,t,r)===!1)return!1}return!0}function Nr(e,t,n,r){if(t.length===0)return!0;if(!Array.isArray(e))return!1;let i=new Set;for(let a=0;a<t.length;a++){let o=t[a],s=!1;for(let c=0;c<e.length;c++){if(i.has(c))continue;let l=e[c],u=!1;if(n(l,o,a,e,t,r)&&(u=!0),u){i.add(c),s=!0;break}}if(!s)return!1}return!0}function Pr(e,t,n,r){return t.size===0?!0:e instanceof Set?Nr([...e],[...t],n,r):!1}function Fr(e,t){return kr(e,t,()=>void 0)}function Ir(e){return e=Fn(e),t=>Fr(t,e)}function Lr(e,t){return Mn(e,(n,r,i,a)=>{let o=t?.(n,r,i,a);if(o!==void 0)return o;if(typeof e==`object`)switch(Object.prototype.toString.call(e)){case cn:case sn:case ln:{let t=new e.constructor(e?.valueOf());return V(t,e),t}case un:{let t={};return V(t,e),t.length=e.length,t[Symbol.iterator]=e[Symbol.iterator],t}default:return}})}function Rr(e){return Lr(e)}var zr=/^(?:0|[1-9]\d*)$/;function Br(e,t=2**53-1){switch(typeof e){case`number`:return Number.isInteger(e)&&e>=0&&e<t;case`symbol`:return!1;case`string`:return zr.test(e)}}function Vr(e){return typeof e==`object`&&!!e&&an(e)===`[object Arguments]`}function Hr(e,t){let n;if(n=Array.isArray(t)?t:typeof t==`string`&&xr(t)&&e?.[t]==null?wr(t):[t],n.length===0)return!1;let r=e;for(let e=0;e<n.length;e++){let t=n[e];if((r==null||!Object.hasOwn(r,t))&&!((Array.isArray(r)||Vr(r))&&Br(t)&&t<r.length))return!1;r=r[t]}return!0}function Ur(e,t){switch(typeof e){case`object`:Object.is(e?.valueOf(),-0)&&(e=`-0`);break;case`number`:e=Sr(e);break}return t=Rr(t),function(n){let r=Tr(n,e);return r===void 0?Hr(n,e):t===void 0?r===void 0:Fr(r,t)}}function Wr(e){if(e==null)return Yt;switch(typeof e){case`function`:return e;case`object`:return Array.isArray(e)&&e.length===2?Ur(e[0],e[1]):Ir(e);case`string`:case`symbol`:case`number`:return Dr(e)}}function Gr(e,t=Yt,n){if(!e)return;let r=Array.isArray(e)?e.length:Object.keys(e).length;n=Kt(n??r-1),n=n<0?Math.max(r+n,0):Math.min(n,r-1);let i=Wr(t);if(!Array.isArray(e)){let t=Object.keys(e);for(let r=n;r>=0;r--){let n=t[r],a=e[n];if(i(a,n,e))return a}return}return e.slice(0,n+1).findLast(i)}function Kr(e){let t=e?.constructor,n=typeof t==`function`?t.prototype:Object.prototype;return e===n}function qr(e){return nn(e)}function Jr(e,...t){e=Object(e);for(let n=0;n<t.length;n++){let r=t[n];r!=null&&Yr(e,r,new WeakMap)}return e}function Yr(e,t,n){for(let r in t){let i=t[r],a=e[r];if(a===void 0||!Object.hasOwn(e,r)){e[r]=Xr(i,n);continue}if(n.get(i)===a)continue;Zr(a,i,n)}}function Xr(e,t){if(t.has(e))return t.get(e);if(zn(e)){let n={};return t.set(e,n),Yr(n,e,t),n}return e}function Zr(e,t,n){if(zn(e)&&zn(t)){n.set(t,e),Yr(e,t,n);return}Array.isArray(e)&&Array.isArray(t)&&(n.set(t,e),Qr(e,t,n))}function Qr(e,t,n){let r=Math.min(t.length,e.length);for(let i=0;i<r;i++)zn(e[i])&&zn(t[i])&&Yr(e[i],t[i],n);for(let n=r;n<t.length;n++)e.push(t[n])}function $r(e){if(e==null)return!0;if(br(e))return typeof e.splice!=`function`&&typeof e!=`string`&&(typeof Buffer>`u`||!Buffer.isBuffer(e))&&!qr(e)&&!Vr(e)?!1:e.length===0;if(typeof e==`object`){if(e instanceof Map||e instanceof Set)return e.size===0;let t=Object.keys(e);return Kr(e)?t.filter(e=>e!==`constructor`).length===0:t.length===0}return!0}var ei=[`Shift`,`Meta`,`Alt`,`Control`],ti=typeof navigator==`object`?navigator.platform:``,ni=/Mac|iPod|iPhone|iPad/.test(ti),ri=ni?`Meta`:`Control`,ii=ti===`Win32`?[`Control`,`Alt`]:ni?[`Alt`]:[];function ai(e,t){return typeof e.getModifierState==`function`&&(e.getModifierState(t)||ii.includes(t)&&e.getModifierState(`AltGraph`))}function oi(e){return e.trim().split(` `).map(function(e){var t=e.split(/\b\+/),n=t.pop(),r=n.match(/^\((.+)\)$/);return r&&(n=RegExp(`^`+r[1]+`$`)),[t=t.map(function(e){return e===`$mod`?ri:e}),n]})}function si(e,t){var n=t[0],r=t[1];return!((r instanceof RegExp?!r.test(e.key)&&!r.test(e.code):r.toUpperCase()!==e.key.toUpperCase()&&r!==e.code)||n.find(function(t){return!ai(e,t)})||ei.find(function(t){return!n.includes(t)&&r!==t&&ai(e,t)}))}function ci(e,t){t===void 0&&(t={});var n=t.timeout??1e3,r=Object.keys(e).map(function(t){return[oi(t),e[t]]}),i=new Map,a=null;return function(e){e instanceof KeyboardEvent&&(r.forEach(function(t){var n=t[0],r=t[1],a=i.get(n)||n;si(e,a[0])?a.length>1?i.set(n,a.slice(1)):(i.delete(n),r(e)):ai(e,e.key)||i.delete(n)}),a&&clearTimeout(a),a=setTimeout(i.clear.bind(i),n))}}function li(e){return new Promise((t,n)=>{let r=document.createElement(`input`);r.type=`file`,r.accept=e?.accept,r.multiple=e?.multiple,r.onchange=()=>{r.files&&r.files.length>0&&t(r.multiple?[...r.files]:r.files[0])},r.oncancel=n,r.click()})}const ui=(e,...t)=>typeof e==`function`?e(...t):e,di=(...e)=>(console.log(...e),e[0]);async function fi(e,t){for(let n=0;n<e.length;n++)if(await t(e[n],n))return e[n]}var pi=new WeakMap;function mi(e){let t=e;return Gn(t)&&(t=t()),qn(t)?(pi.has(t)||pi.set(t,_i(()=>t.then(e=>e.map(e=>mi(e))))),pi.get(t)()):(In(t)&&(t=Object.entries(t).map(([e,t])=>({value:e,label:t,...t}))),t?.map(e=>hi(e))||[])}function hi(e){return In(e)?e:Array.isArray(e)?{label:e[0],value:e[1]}:{label:e,value:e}}function gi(e,t){t=j({preventDefault:!0},t),gr({target:e,passive:!1,onDown(e){t.preventDefault&&e.preventDefault();let[n,r]=[e.x,e.y],i,a;t.start?.(e,e=>i=e,e=>a=e),te(t=>{gr({target:document,onMove(e){let[t,a]=[e.x-n,e.y-r];i?.(e,{sx:n,sy:r,ox:t,oy:a})},onUp(){a?.(e),t(),i=void 0,a=void 0}}),dr(document,{drop:t})})}})}function _i(e,t){let n=Symbol(),[r,i]=x(t);return ne(async()=>{let t=e(E(r)),a=t instanceof Promise?await new Promise(e=>{t.then(e),D(()=>e(n))}):t;a==n||i(()=>a)}),r}function vi(e,t){let n=x(Gn(e)?void 0:e),r=e=>{let n=t?.before?.(e);return qn(n)?n.then(t=>t===void 0?e:t):n??e},i=_i(()=>r(n[0]()));if(Gn(e)){let t=_i(()=>r(e()));ne(()=>n[1](t()))}return[i,n[1]]}var yi=Symbol();function bi(e){let t=()=>ui(e),n=()=>!0,r=e=>(e=>typeof e==`function`&&yi in e?e():e)(t()[e]);return new Proxy(Object.create(null),{get:(e,n,r)=>n==a||n==Tt?r:(e=>typeof e==`function`&&yi in e?e():e)(t()[n]),set:n,defineProperty:(e,n,r)=>Object.defineProperty(t(),n,r),deleteProperty:n,getPrototypeOf:()=>Object.getPrototypeOf(t()),has:(e,n)=>n==a||n in t(),ownKeys:e=>Object.keys(t()),getOwnPropertyDescriptor:(e,t)=>({enumerable:!0,configurable:!0,get(){return r(t)},set:n})})}function xi(e){let t=w(e);return t[yi]=1,t}function Si(e){let[t,n]=x(!1);return W(e,`pointerenter`,()=>n(!0)),W(e,`pointerleave`,()=>n(!1)),t}function Ci(e){let[t,n]=x(!1),r=()=>yr(H(e));return W(()=>r().map(e=>e?.getRootNode()),`click`,e=>n(r().some(t=>t?.contains(e.target)))),t}function wi(e,t){W(e,`keydown`,ci({...Ln(t,e=>t=>{t.preventDefault(),e(t)})}))}function Ti(e){let t={...e},n={...e},r={},i=e=>{let n=r[e];if(!n){if(!oe())return t[e];r[e]=n=x(t[e],{internal:!0}),delete t[e]}return n[0]()};for(let t in e)Object.defineProperty(n,t,{get:()=>i(t),enumerable:!0});let a=(e,n)=>{let i=r[e];if(i)return i[1](n);e in t&&(t[e]=nr(n,t[e]))};return[n,(e,t)=>{if(Xn(e)){let t=E(()=>Object.entries(nr(e,n)));T(()=>{for(let[e,n]of t)a(e,()=>n)})}else a(e,t);return n}]}function Ei(e,t,n){let r=se(),i=w(e,t,n),a={...E(i)},o={};for(let e in a)Object.defineProperty(a,e,{get(){let t=o[e];if(!t){if(!oe())return i()[e];ce(r,()=>o[e]=t=w(()=>i()[e]))}return t()},enumerable:!0});return a}function Di(e,t){let n=new ResizeObserver(e);return D(n.disconnect.bind(n)),{observe:e=>n.observe(e,t),unobserve:n.unobserve.bind(n)}}function Oi(e,t,n){let r=new WeakMap,{observe:i,unobserve:a}=Di(e=>{for(let n of e){let{contentRect:e,target:i}=n,a=Math.round(e.width),o=Math.round(e.height),s=r.get(i);(!s||s.width!==a||s.height!==o)&&(t(e,i,n),r.set(i,{width:a,height:o}))}},n);C(t=>{let n=Qn(tr(H(e)));return ar(n,t,i,a),n},[])}var ki={width:null,height:null};function Ai(e){if(!e)return{...ki};let{width:t,height:n}=e.getBoundingClientRect();return{width:t,height:n}}function ji(t){let n=typeof t==`function`,[r,i]=Ti(e.context||n?ki:Ai(t)),a=new ResizeObserver(([e])=>i(Ai(e.target)));return D(()=>a.disconnect()),n?C(()=>{let e=t();e&&(i(Ai(e)),a.observe(e),D(()=>a.unobserve(e)))}):(a.observe(t),D(()=>a.unobserve(t))),r}var Mi={x:0,y:0};function Ni(e){return e?e instanceof Window?{x:e.scrollX,y:e.scrollY}:{x:e.scrollLeft,y:e.scrollTop}:{...Mi}}function Pi(t){t||=window;let n=typeof t==`function`,r=e.context,i=n?()=>Ni(t()):()=>Ni(t),[a,o]=x(r?()=>Mi:i,{equals:!1}),s=()=>o(()=>i),c=Ei(()=>a()());return(r||n)&&ae(s),W(t,`scroll`,s,{passive:!0}),c}var Fi=P(`<div class=area>`),Ii=(e,t,n)=>e<=n&&e>=t;const Li={name:`cell-selection`,store:()=>({selected:{start:[],end:[]}}),commands:e=>({getAreaRows(){let{start:t,end:n}=e.selected,[r,i]=[t[1],n[1]].sort((e,t)=>e-t);return e.props.data.slice(r,i+1)}}),rewriteProps:{Table:({Table:e},{store:t})=>n=>{let{props:r}=O($);t.cellSelectionRect??=w(()=>{let{start:e,end:n}=t.selected,r=[e[0],n[0]].sort((e,t)=>e-t),i=[e[1],n[1]].sort((e,t)=>e-t);return{xs:r,ys:i}}),gi(()=>t.table,{preventDefault:!1,start(e,n,r){T(()=>{let r=e=>e.composedPath().find(e=>e.tagName==`TH`||e.tagName==`TD`),i=e=>[e.getAttribute(`x`),e.getAttribute(`y`)],a=r(e);if(a&&!(e.buttons!=1&&a.classList.contains(`range-selected`))){if(a.tagName==`TH`){let[e,o]=i(a);if(e==null)return;t.selected.start=[+e,0],t.selected.end=[+e,1/0],n(e=>{let n=r(e);if(!n)return;let[a,o]=i(n);a!=null&&(t.selected.end=[+a,1/0])})}if(a.classList.contains(`index`)){let[e,o]=i(a);if(e==null||o==null)return;t.selected.start=[0,+o],t.selected.end=[1/0,+o],n(e=>{let n=r(e);if(!n)return;let[a,o]=i(n);a==null||o==null||(t.selected.end=[1/0,+o])})}else if(a.tagName==`TD`){let[e,o]=i(a);if(e==null||o==null)return;t.selected.start=[+e,+o],t.selected.end=[...t.selected.start],n(e=>{let n=r(e);if(!n)return;let[a,o]=i(n);a==null||o==null||(t.selected.end=[+a,+o])})}}})}}),wi(()=>t.table,{ArrowLeft:()=>{let{start:e,end:n}=t.selected;e[0]=n[0]=Math.max(e[0]-1,0),n[1]=e[1],i()},ArrowRight:()=>{let{start:e,end:n}=t.selected;e[0]=n[0]=Math.min(e[0]+1,r.columns.length-1),n[1]=e[1],i()},ArrowUp:()=>{let{start:e,end:n}=t.selected;e[1]=n[1]=Math.max(e[1]-1,0),n[0]=e[0],i()},ArrowDown:()=>{let{start:e,end:n}=t.selected;e[1]=n[1]=Math.min(e[1]+1,r.data.length-1),n[0]=e[0],i()}});let i=()=>{let e=t.table.querySelector(`td[x="${t.selected.start[0]}"][y="${t.selected.start[1]}"]`);e?.scrollIntoViewIfNeeded(!1),e?.focus()};return n=U({class:`select-none`},n),A(e,n)},Th:({Th:e},{store:t})=>n=>{let r=w(()=>{let{start:e,end:r}=t.selected;return Ii(n.x,...[e[0],r[0]].sort((e,t)=>e-t))?`col-range-highlight`:``}),i=U(n,{get class(){return r()}});return A(e,j(i,{get children(){return[N(()=>i.children),N(()=>N(()=>!!r())()&&Fi())]}}))},Td:({Td:e},{store:t})=>n=>{let r=w(()=>{let e=``,{xs:r,ys:i}=t.cellSelectionRect(),a=Ii(n.x,r[0],r[1]),o=Ii(n.y,i[0],i[1]);return a&&o&&(e+=`range-selected `,n.x==r[0]&&(e+=`range-selected-l `),n.x==r[1]&&(e+=`range-selected-r `),n.y==i[0]&&(e+=`range-selected-t `),n.y==i[1]&&(e+=`range-selected-b `)),n.col.id==t.$index.id&&o&&(e+=`row-range-highlight `),e}),i=U(n,{get class(){return r()},tabindex:-1});return A(e,j(i,{get children(){return[N(()=>i.children),N(()=>N(()=>!!r())()&&Fi())]}}))}}},Ri={name:`clipboard`,rewriteProps:{Table:({Table:e},{store:t})=>n=>{let r;return wi(()=>r,{"Control+C":()=>{t.commands.copy(),r.classList.add(`copied`)},"Control+V":()=>t.commands.paste()}),C(()=>{JSON.stringify(t.selected),r.classList.remove(`copied`)}),n=U({ref:e=>r=e,tabindex:-1},n),A(e,n)}},menus:e=>[],commands:e=>({copy:()=>{let{start:t,end:n}=e.selected;if(t.length==0)return;let[r,i]=[t[0],n[0]].sort((e,t)=>e-t),[a,o]=[t[1],n[1]].sort((e,t)=>e-t),s=e.props.columns.slice(r,i+1),c=e.props.data.slice(a,o+1).map(e=>s.map(t=>e[t.id])).map(e=>e.join(` `)).join(`
2
+ `);navigator.clipboard.writeText(c)},paste:async()=>{let{start:t,end:n}=e.selected;if(t.length==0)return;let r=(await navigator.clipboard.readText()).split(`
3
+ `).map(e=>e.split(` `)),i=e.props.columns.slice(t[0],t[0]+r[0].length),a=e.props.data.slice();r.forEach((e,n)=>{e=Object.fromEntries(i.map((t,n)=>[t.id,e[n]])),a[t[1]+n]={...a[t[1]+n],...e}}),e.selected.end=[t[0]+i.length-1,Math.min(t[1]+r.length-1,ctx.props.data.length-1)],e.props.onDataChange?.(a)}})};function zi(e,t={}){let[n,r]=x(t.value,t),i=[];return ne(async()=>{let t=e(E(n));t instanceof Promise?(i.push(t),t.then(e=>i.includes(t)&&r(()=>e)),t.finally(()=>{let e=i.indexOf(t);i.splice(0,e+1)})):r(()=>t)},void 0,t),n}var Bi=P(`<svg viewBox="0 0 24 24"width=1.2em height=1.2em><path fill=none stroke=currentColor stroke-linecap=round stroke-linejoin=round stroke-width=2 d="M5 12h14m-7-7v14">`),Vi=(e={})=>(()=>{var t=Bi();return F(t,e,!0,!0),t})(),Hi=P(`<svg viewBox="0 0 24 24"width=1.2em height=1.2em><path fill=none stroke=currentColor stroke-linecap=round stroke-linejoin=round stroke-width=2 d="M18 6L6 18M6 6l12 12">`),Ui=(e={})=>(()=>{var t=Hi();return F(t,e,!0,!0),t})(),Wi=P(`<input type=checkbox>`),Gi=P(`<div>`);const Ki=e=>{let t;return[e,t]=M(e,[`value`,`onChange`]),t=U({get class(){return`you-checkbox ${e.value&&`checked`}`}},t),(()=>{var n=Wi();return n.addEventListener(`change`,t=>e.onChange?.(t.currentTarget.checked)),F(n,j({get checked(){return e.value||!1}},t),!1,!1),n})()},qi=e=>{let t;return[e,t]=M(e,[]),A(Ji,t)},Ji=e=>{let t;[e,t]=M(e,[`value`,`children`,`disabled`,`onChange`,`onAdd`]),t=U({class:`flex flex-wrap items-center gap-2 h-full`},t);let n=e=>Array.isArray(e)?e:e==null?[]:[e];return(()=>{var r=Gi();return F(r,t,!1,!0),L(r,A(He,{get each(){return n(e.value)},children:t=>A(Yi,{get style(){return`background: ${t.color}`},get disabled(){return e.disabled},onDel:()=>e.onChange(n(e.value).filter(e=>e!=t)),get children(){return N(()=>!!e.children)()?e.children(t):t?.text??t?.label??t?.name??t}})}),null),L(r,(()=>{var t=N(()=>!e.disabled);return()=>t()&&A(Yi,{disabled:!0,get onClick(){return e.onAdd},get children(){return A(Vi,{})}})})(),null),r})()},Yi=e=>{let t;return[e,t]=M(e,[`disabled`,`children`,`onDel`]),t=U({class:`flex items-center px-2 py-1 rd-sm bg-gray/20 text-3.5 lh-[1]`},t),(()=>{var n=Gi();return F(n,t,!1,!0),L(n,()=>e.children,null),L(n,(()=>{var t=N(()=>!e.disabled);return()=>t()&&A(Ui,{class:`icon-clickable flex-shrink-0 size-4! ml-1 mr--1 op-75`,get onClick(){return e.onDel}})})(),null),n})()};var Xi=P(`<input style=position:absolute;margin-top:1em;width:0;height:0;pointer-events:none;opacity:0>`),Zi=P(`<div class=in-cell-edit-wrapper>`),Qi=P(`<input>`),$i=P(`<select>`),ea=P(`<option>`),ta=P(`<label class="h-full flex items-center">`);const na={name:`editable`,store:()=>({editors:{...ga}}),rewriteProps:{Td:({Td:e},{store:t})=>n=>{let r,{props:i}=O($),a=w(()=>!!n.col.editable&&!n.data[t.internal]&&!n.col[t.internal]),[o,s]=x(!1),c=``,l=w(()=>(([e,t])=>n.x==e&&n.y==t)(t.selected.start||[])),u=w(()=>l()&&a()&&!o()),d=zi(async()=>{if(o()){let e=!1,r=(e=>typeof e==`string`?t.editors[e]:e)(n.col.editor||`text`),a={props:n.col.editorProps,col:n.col,eventKey:c,data:n.data,value:n.data[n.col.id],ok:()=>s(!1),cancel:()=>(e=!0,s(!1))},o=r(a);return D(()=>{if(!e&&o.getValue()!==n.data[n.col.id]){let e=[...i.data];e[n.y]={...e[n.y],[n.col.id]:o.getValue()},i.onDataChange?.(e)}o.destroy()}),[a,o]}});C(()=>{d()?.[1]?.focus?.()}),C(()=>{if(o()){let e=w(()=>JSON.stringify(t.selected));C(ie(e,()=>s(!1),{defer:!0}))}});let f,p=B({w:0,h:0});return ne(()=>o()&&(p.w=r.getBoundingClientRect().width,p.h=r.getBoundingClientRect().height)),n=U(n,{ref:e=>r=e,get class(){return o()?`is-editing`:``},get style(){return o()?`width: ${p.w}px; height: ${p.h}px; padding: 0; `:``},onClick:()=>f?.focus?.(),onDblClick:()=>s(a()),onKeyDown:e=>e.key==`Escape`&&d()?.[0].cancel()}),A(e,j(n,{get children(){return[N(()=>N(()=>!!u())()&&(()=>{var e=Xi();return e.addEventListener(`compositionend`,()=>{s(!0)}),e.$$input=e=>{c=e.target.value,s(!e.isComposing)},e.$$keydown=e=>{e.key==` `&&e.preventDefault()},I(e=>{f=e,Zt(0).then(()=>e.focus({preventScroll:!0}))},e),e})()),N(()=>N(()=>!!d()?.[1]?.el)()?(()=>{var e=Zi();return L(e,()=>d()?.[1]?.el),e})():n.children)]}}))}}};var G=(e,t,n)=>({eventKey:r,value:i,col:a,ok:o,cancel:s,props:c})=>te(l=>{let[u,d]=x(r||i),f;return A(e,j({ref:e=>f=e,class:`relative block px-2 size-full z-9 box-border resize-none outline-0`,get value(){return u()},onInput:e=>d(e instanceof Event?e.target.value:e),onChange:e=>(d(e instanceof Event?e.target.value:e),n&&o()),"on:pointerdown":e=>e.stopPropagation(),"on:keydown":e=>{e.stopPropagation(),e.key==`Enter`&&o(),e.key==`Escape`&&s()},get options(){return N(()=>!!a.enum)()?mi(a.enum??[]):void 0}},t,c)),{el:f,getValue:u,focus:()=>f.focus(),destroy:l}}),ra=e=>(()=>{var t=Qi();return F(t,e,!1,!1),t})(),ia=G(ra),aa=G(ra,{type:`number`}),oa=G(ra,{type:`range`}),sa=G(ra,{type:`color`}),ca=G(ra,{type:`tel`}),la=G(ra,{type:`password`}),ua=G(ra,{type:`date`},!0),da=G(ra,{type:`time`},!0),fa=G(ra,{type:`datetime-local`},!0),pa=G(e=>(()=>{var t=$i();return F(t,e,!1,!0),L(t,()=>e.options?.map(e=>(()=>{var t=ea();return L(t,()=>e.label),S(()=>t.value=e.value),t})())),t})(),{},!0),ma=G(e=>A(qi,j(e,{class:`relative z-9 outline-2 outline-blue min-h-a! h-a! p-1 bg-#fff`,onAdd:()=>li({multiple:!0}).then(t=>e.onChange([...e.value||[],...t.map(e=>({name:e.name,size:e.size}))]))}))),ha=G(e=>(()=>{var t=ta(),n=e.ref;return typeof n==`function`?I(n,t):e.ref=t,L(t,A(Ki,j(e,{ref:()=>{},onInput:()=>{},class:`mx-3!`}))),t})());const ga={text:ia,number:aa,range:oa,date:ua,time:da,datetime:fa,color:sa,tel:ca,password:la,file:ma,checkbox:ha,select:pa};et([`keydown`,`input`]);function _a(e){return e.__solid=1,e}function va(e,t,n){return e.__solid||(e=n(e)),A(e,t)}var ya=P(`<div class="flex items-center h-full">`);const ba={name:`render`,priority:-1/0,store:()=>({renders:{...Sa}}),rewriteProps:{Td:({Td:e},{store:t})=>n=>A(e,j(n,{get children(){return(()=>{let e=(e=>typeof e==`string`?t.renders[e]:e)(n.col.render)||xa;return va(e,j(n,{onChange:e=>t.commands.rowChange({...n.data,[n.col.id]:e},n.y)}),t.props.renderer)})()}}))}};var xa=e=>N(()=>(t=>e.col.enum?mi(e.col.enum).find(e=>e.value==t)?.label??t:t)(e.data[e.col.id]));const Sa={text:xa,number:xa,date:xa,checkbox:e=>(()=>{var t=ya();return L(t,A(Ki,{class:``,get value(){return e.data[e.col.id]},get onChange(){return e.onChange}})),t})(),file:e=>A(qi,{get value(){return e.data[e.col.id]},get onChange(){return e.onChange},disabled:!0})};for(let e in Sa)Sa[e]=_a(Sa[e]);var Ca=[`top`,`right`,`bottom`,`left`],wa=[`start`,`end`],Ta=Ca.reduce((e,t)=>e.concat(t,t+`-`+wa[0],t+`-`+wa[1]),[]),Ea=Math.min,Da=Math.max,Oa=Math.round,ka=Math.floor,K=e=>({x:e,y:e}),Aa={left:`right`,right:`left`,bottom:`top`,top:`bottom`},ja={start:`end`,end:`start`};function Ma(e,t){return typeof e==`function`?e(t):e}function Na(e){return e.split(`-`)[0]}function Pa(e){return e.split(`-`)[1]}function Fa(e){return e===`x`?`y`:`x`}function Ia(e){return e===`y`?`height`:`width`}var La=new Set([`top`,`bottom`]);function Ra(e){return La.has(Na(e))?`y`:`x`}function za(e){return Fa(Ra(e))}function Ba(e,t,n){n===void 0&&(n=!1);let r=Pa(e),i=za(e),a=Ia(i),o=i===`x`?r===(n?`end`:`start`)?`right`:`left`:r===`start`?`bottom`:`top`;return t.reference[a]>t.floating[a]&&(o=Ha(o)),[o,Ha(o)]}function Va(e){return e.replace(/start|end/g,e=>ja[e])}function Ha(e){return e.replace(/left|right|bottom|top/g,e=>Aa[e])}function Ua(e){return{top:0,right:0,bottom:0,left:0,...e}}function Wa(e){return typeof e==`number`?{top:e,right:e,bottom:e,left:e}:Ua(e)}function Ga(e){let{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function Ka(e,t,n){let{reference:r,floating:i}=e,a=Ra(t),o=za(t),s=Ia(o),c=Na(t),l=a===`y`,u=r.x+r.width/2-i.width/2,d=r.y+r.height/2-i.height/2,f=r[s]/2-i[s]/2,p;switch(c){case`top`:p={x:u,y:r.y-i.height};break;case`bottom`:p={x:u,y:r.y+r.height};break;case`right`:p={x:r.x+r.width,y:d};break;case`left`:p={x:r.x-i.width,y:d};break;default:p={x:r.x,y:r.y}}switch(Pa(t)){case`start`:p[o]-=f*(n&&l?-1:1);break;case`end`:p[o]+=f*(n&&l?-1:1);break}return p}var qa=async(e,t,n)=>{let{placement:r=`bottom`,strategy:i=`absolute`,middleware:a=[],platform:o}=n,s=a.filter(Boolean),c=await(o.isRTL==null?void 0:o.isRTL(t)),l=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=Ka(l,r,c),f=r,p={},m=0;for(let n=0;n<s.length;n++){let{name:a,fn:h}=s[n],{x:g,y:_,data:v,reset:y}=await h({x:u,y:d,initialPlacement:r,placement:f,strategy:i,middlewareData:p,rects:l,platform:o,elements:{reference:e,floating:t}});u=g??u,d=_??d,p={...p,[a]:{...p[a],...v}},y&&m<=50&&(m++,typeof y==`object`&&(y.placement&&(f=y.placement),y.rects&&(l=y.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:i}):y.rects),{x:u,y:d}=Ka(l,f,c)),n=-1)}return{x:u,y:d,placement:f,strategy:i,middlewareData:p}};async function Ja(e,t){t===void 0&&(t={});let{x:n,y:r,platform:i,rects:a,elements:o,strategy:s}=e,{boundary:c=`clippingAncestors`,rootBoundary:l=`viewport`,elementContext:u=`floating`,altBoundary:d=!1,padding:f=0}=Ma(t,e),p=Wa(f),m=o[d?u===`floating`?`reference`:`floating`:u],h=Ga(await i.getClippingRect({element:await(i.isElement==null?void 0:i.isElement(m))??!0?m:m.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(o.floating)),boundary:c,rootBoundary:l,strategy:s})),g=u===`floating`?{x:n,y:r,width:a.floating.width,height:a.floating.height}:a.reference,_=await(i.getOffsetParent==null?void 0:i.getOffsetParent(o.floating)),v=await(i.isElement==null?void 0:i.isElement(_))&&await(i.getScale==null?void 0:i.getScale(_))||{x:1,y:1},y=Ga(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:o,rect:g,offsetParent:_,strategy:s}):g);return{top:(h.top-y.top+p.top)/v.y,bottom:(y.bottom-h.bottom+p.bottom)/v.y,left:(h.left-y.left+p.left)/v.x,right:(y.right-h.right+p.right)/v.x}}function Ya(e,t,n){return(e?[...n.filter(t=>Pa(t)===e),...n.filter(t=>Pa(t)!==e)]:n.filter(e=>Na(e)===e)).filter(n=>e?Pa(n)===e||(t?Va(n)!==n:!1):!0)}var Xa=function(e){return e===void 0&&(e={}),{name:`autoPlacement`,options:e,async fn(t){let{rects:n,middlewareData:r,placement:i,platform:a,elements:o}=t,{crossAxis:s=!1,alignment:c,allowedPlacements:l=Ta,autoAlignment:u=!0,...d}=Ma(e,t),f=c!==void 0||l===Ta?Ya(c||null,u,l):l,p=await Ja(t,d),m=r.autoPlacement?.index||0,h=f[m];if(h==null)return{};let g=Ba(h,n,await(a.isRTL==null?void 0:a.isRTL(o.floating)));if(i!==h)return{reset:{placement:f[0]}};let _=[p[Na(h)],p[g[0]],p[g[1]]],v=[...r.autoPlacement?.overflows||[],{placement:h,overflows:_}],y=f[m+1];if(y)return{data:{index:m+1,overflows:v},reset:{placement:y}};let b=v.map(e=>{let t=Pa(e.placement);return[e.placement,t&&s?e.overflows.slice(0,2).reduce((e,t)=>e+t,0):e.overflows[0],e.overflows]}).sort((e,t)=>e[1]-t[1]),ee=b.filter(e=>e[2].slice(0,Pa(e[0])?2:3).every(e=>e<=0))[0]?.[0]||b[0][0];return ee===i?{}:{data:{index:m+1,overflows:v},reset:{placement:ee}}}}},Za=new Set([`left`,`top`]);async function Qa(e,t){let{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=Na(n),s=Pa(n),c=Ra(n)===`y`,l=Za.has(o)?-1:1,u=a&&c?-1:1,d=Ma(t,e),{mainAxis:f,crossAxis:p,alignmentAxis:m}=typeof d==`number`?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&typeof m==`number`&&(p=s===`end`?m*-1:m),c?{x:p*u,y:f*l}:{x:f*l,y:p*u}}var $a=function(e){return e===void 0&&(e=0),{name:`offset`,options:e,async fn(t){var n;let{x:r,y:i,placement:a,middlewareData:o}=t,s=await Qa(t,e);return a===o.offset?.placement&&(n=o.arrow)!=null&&n.alignmentOffset?{}:{x:r+s.x,y:i+s.y,data:{...s,placement:a}}}}};function eo(){return typeof window<`u`}function to(e){return no(e)?(e.nodeName||``).toLowerCase():`#document`}function q(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function J(e){return((no(e)?e.ownerDocument:e.document)||window.document)?.documentElement}function no(e){return eo()?e instanceof Node||e instanceof q(e).Node:!1}function Y(e){return eo()?e instanceof Element||e instanceof q(e).Element:!1}function X(e){return eo()?e instanceof HTMLElement||e instanceof q(e).HTMLElement:!1}function ro(e){return!eo()||typeof ShadowRoot>`u`?!1:e instanceof ShadowRoot||e instanceof q(e).ShadowRoot}var io=new Set([`inline`,`contents`]);function ao(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=Z(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!io.has(i)}var oo=new Set([`table`,`td`,`th`]);function so(e){return oo.has(to(e))}var co=[`:popover-open`,`:modal`];function lo(e){return co.some(t=>{try{return e.matches(t)}catch{return!1}})}var uo=[`transform`,`translate`,`scale`,`rotate`,`perspective`],fo=[`transform`,`translate`,`scale`,`rotate`,`perspective`,`filter`],po=[`paint`,`layout`,`strict`,`content`];function mo(e){let t=go(),n=Y(e)?Z(e):e;return uo.some(e=>n[e]?n[e]!==`none`:!1)||(n.containerType?n.containerType!==`normal`:!1)||!t&&(n.backdropFilter?n.backdropFilter!==`none`:!1)||!t&&(n.filter?n.filter!==`none`:!1)||fo.some(e=>(n.willChange||``).includes(e))||po.some(e=>(n.contain||``).includes(e))}function ho(e){let t=bo(e);for(;X(t)&&!vo(t);){if(mo(t))return t;if(lo(t))return null;t=bo(t)}return null}function go(){return typeof CSS>`u`||!CSS.supports?!1:CSS.supports(`-webkit-backdrop-filter`,`none`)}var _o=new Set([`html`,`body`,`#document`]);function vo(e){return _o.has(to(e))}function Z(e){return q(e).getComputedStyle(e)}function yo(e){return Y(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function bo(e){if(to(e)===`html`)return e;let t=e.assignedSlot||e.parentNode||ro(e)&&e.host||J(e);return ro(t)?t.host:t}function xo(e){let t=bo(e);return vo(t)?e.ownerDocument?e.ownerDocument.body:e.body:X(t)&&ao(t)?t:xo(t)}function So(e,t,n){t===void 0&&(t=[]),n===void 0&&(n=!0);let r=xo(e),i=r===e.ownerDocument?.body,a=q(r);if(i){let e=Co(a);return t.concat(a,a.visualViewport||[],ao(r)?r:[],e&&n?So(e):[])}return t.concat(r,So(r,[],n))}function Co(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function wo(e){let t=Z(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=X(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,s=Oa(n)!==a||Oa(r)!==o;return s&&(n=a,r=o),{width:n,height:r,$:s}}function To(e){return Y(e)?e:e.contextElement}function Eo(e){let t=To(e);if(!X(t))return K(1);let n=t.getBoundingClientRect(),{width:r,height:i,$:a}=wo(t),o=(a?Oa(n.width):n.width)/r,s=(a?Oa(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!s||!Number.isFinite(s))&&(s=1),{x:o,y:s}}var Do=K(0);function Oo(e){let t=q(e);return!go()||!t.visualViewport?Do:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function ko(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==q(e)?!1:t}function Ao(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);let i=e.getBoundingClientRect(),a=To(e),o=K(1);t&&(r?Y(r)&&(o=Eo(r)):o=Eo(e));let s=ko(a,n,r)?Oo(a):K(0),c=(i.left+s.x)/o.x,l=(i.top+s.y)/o.y,u=i.width/o.x,d=i.height/o.y;if(a){let e=q(a),t=r&&Y(r)?q(r):r,n=e,i=Co(n);for(;i&&r&&t!==n;){let e=Eo(i),t=i.getBoundingClientRect(),r=Z(i),a=t.left+(i.clientLeft+parseFloat(r.paddingLeft))*e.x,o=t.top+(i.clientTop+parseFloat(r.paddingTop))*e.y;c*=e.x,l*=e.y,u*=e.x,d*=e.y,c+=a,l+=o,n=q(i),i=Co(n)}}return Ga({width:u,height:d,x:c,y:l})}function jo(e,t){let n=yo(e).scrollLeft;return t?t.left+n:Ao(J(e)).left+n}function Mo(e,t){let n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-jo(e,n),i=n.top+t.scrollTop;return{x:r,y:i}}function No(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e,a=i===`fixed`,o=J(r),s=t?lo(t.floating):!1;if(r===o||s&&a)return n;let c={scrollLeft:0,scrollTop:0},l=K(1),u=K(0),d=X(r);if((d||!d&&!a)&&((to(r)!==`body`||ao(o))&&(c=yo(r)),X(r))){let e=Ao(r);l=Eo(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}let f=o&&!d&&!a?Mo(o,c):K(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-c.scrollLeft*l.x+u.x+f.x,y:n.y*l.y-c.scrollTop*l.y+u.y+f.y}}function Po(e){return Array.from(e.getClientRects())}function Fo(e){let t=J(e),n=yo(e),r=e.ownerDocument.body,i=Da(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=Da(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight),o=-n.scrollLeft+jo(e),s=-n.scrollTop;return Z(r).direction===`rtl`&&(o+=Da(t.clientWidth,r.clientWidth)-i),{width:i,height:a,x:o,y:s}}var Io=25;function Lo(e,t){let n=q(e),r=J(e),i=n.visualViewport,a=r.clientWidth,o=r.clientHeight,s=0,c=0;if(i){a=i.width,o=i.height;let e=go();(!e||e&&t===`fixed`)&&(s=i.offsetLeft,c=i.offsetTop)}let l=jo(r);if(l<=0){let e=r.ownerDocument,t=e.body,n=getComputedStyle(t),i=e.compatMode===`CSS1Compat`&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,o=Math.abs(r.clientWidth-t.clientWidth-i);o<=Io&&(a-=o)}else l<=Io&&(a+=l);return{width:a,height:o,x:s,y:c}}var Ro=new Set([`absolute`,`fixed`]);function zo(e,t){let n=Ao(e,!0,t===`fixed`),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=X(e)?Eo(e):K(1),o=e.clientWidth*a.x,s=e.clientHeight*a.y,c=i*a.x,l=r*a.y;return{width:o,height:s,x:c,y:l}}function Bo(e,t,n){let r;if(t===`viewport`)r=Lo(e,n);else if(t===`document`)r=Fo(J(e));else if(Y(t))r=zo(t,n);else{let n=Oo(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return Ga(r)}function Vo(e,t){let n=bo(e);return n===t||!Y(n)||vo(n)?!1:Z(n).position===`fixed`||Vo(n,t)}function Ho(e,t){let n=t.get(e);if(n)return n;let r=So(e,[],!1).filter(e=>Y(e)&&to(e)!==`body`),i=null,a=Z(e).position===`fixed`,o=a?bo(e):e;for(;Y(o)&&!vo(o);){let t=Z(o),n=mo(o);!n&&t.position===`fixed`&&(i=null),(a?!n&&!i:!n&&t.position===`static`&&i&&Ro.has(i.position)||ao(o)&&!n&&Vo(e,o))?r=r.filter(e=>e!==o):i=t,o=bo(o)}return t.set(e,r),r}function Uo(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,a=[...n===`clippingAncestors`?lo(t)?[]:Ho(t,this._c):[].concat(n),r],o=a[0],s=a.reduce((e,n)=>{let r=Bo(t,n,i);return e.top=Da(r.top,e.top),e.right=Ea(r.right,e.right),e.bottom=Ea(r.bottom,e.bottom),e.left=Da(r.left,e.left),e},Bo(t,o,i));return{width:s.right-s.left,height:s.bottom-s.top,x:s.left,y:s.top}}function Wo(e){let{width:t,height:n}=wo(e);return{width:t,height:n}}function Go(e,t,n){let r=X(t),i=J(t),a=n===`fixed`,o=Ao(e,!0,a,t),s={scrollLeft:0,scrollTop:0},c=K(0);function l(){c.x=jo(i)}if(r||!r&&!a)if((to(t)!==`body`||ao(i))&&(s=yo(t)),r){let e=Ao(t,!0,a,t);c.x=e.x+t.clientLeft,c.y=e.y+t.clientTop}else i&&l();a&&!r&&i&&l();let u=i&&!r&&!a?Mo(i,s):K(0),d=o.left+s.scrollLeft-c.x-u.x,f=o.top+s.scrollTop-c.y-u.y;return{x:d,y:f,width:o.width,height:o.height}}function Ko(e){return Z(e).position===`static`}function qo(e,t){if(!X(e)||Z(e).position===`fixed`)return null;if(t)return t(e);let n=e.offsetParent;return J(e)===n&&(n=n.ownerDocument.body),n}function Jo(e,t){let n=q(e);if(lo(e))return n;if(!X(e)){let t=bo(e);for(;t&&!vo(t);){if(Y(t)&&!Ko(t))return t;t=bo(t)}return n}let r=qo(e,t);for(;r&&so(r)&&Ko(r);)r=qo(r,t);return r&&vo(r)&&Ko(r)&&!mo(r)?n:r||ho(e)||n}var Yo=async function(e){let t=this.getOffsetParent||Jo,n=this.getDimensions,r=await n(e.floating);return{reference:Go(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function Xo(e){return Z(e).direction===`rtl`}var Zo={convertOffsetParentRelativeRectToViewportRelativeRect:No,getDocumentElement:J,getClippingRect:Uo,getOffsetParent:Jo,getElementRects:Yo,getClientRects:Po,getDimensions:Wo,getScale:Eo,isElement:Y,isRTL:Xo};function Qo(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function $o(e,t){let n=null,r,i=J(e);function a(){var e;clearTimeout(r),(e=n)==null||e.disconnect(),n=null}function o(s,c){s===void 0&&(s=!1),c===void 0&&(c=1),a();let l=e.getBoundingClientRect(),{left:u,top:d,width:f,height:p}=l;if(s||t(),!f||!p)return;let m=ka(d),h=ka(i.clientWidth-(u+f)),g=ka(i.clientHeight-(d+p)),_=ka(u),v={rootMargin:-m+`px `+-h+`px `+-g+`px `+-_+`px`,threshold:Da(0,Ea(1,c))||1},y=!0;function b(t){let n=t[0].intersectionRatio;if(n!==c){if(!y)return o();n?o(!1,n):r=setTimeout(()=>{o(!1,1e-7)},1e3)}n===1&&!Qo(l,e.getBoundingClientRect())&&o(),y=!1}try{n=new IntersectionObserver(b,{...v,root:i.ownerDocument})}catch{n=new IntersectionObserver(b,v)}n.observe(e)}return o(!0),a}function es(e,t,n,r){r===void 0&&(r={});let{ancestorScroll:i=!0,ancestorResize:a=!0,elementResize:o=typeof ResizeObserver==`function`,layoutShift:s=typeof IntersectionObserver==`function`,animationFrame:c=!1}=r,l=To(e),u=i||a?[...l?So(l):[],...So(t)]:[];u.forEach(e=>{i&&e.addEventListener(`scroll`,n,{passive:!0}),a&&e.addEventListener(`resize`,n)});let d=l&&s?$o(l,n):null,f=-1,p=null;o&&(p=new ResizeObserver(e=>{let[r]=e;r&&r.target===l&&p&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var e;(e=p)==null||e.observe(t)})),n()}),l&&!c&&p.observe(l),p.observe(t));let m,h=c?Ao(e):null;c&&g();function g(){let t=Ao(e);h&&!Qo(h,t)&&n(),h=t,m=requestAnimationFrame(g)}return n(),()=>{var e;u.forEach(e=>{i&&e.removeEventListener(`scroll`,n),a&&e.removeEventListener(`resize`,n)}),d?.(),(e=p)==null||e.disconnect(),p=null,c&&cancelAnimationFrame(m)}}var ts=$a,ns=Xa,rs=(e,t,n)=>{let r=new Map,i={platform:Zo,...n},a={...i.platform,_c:r};return qa(e,t,{...i,platform:a})},os=(e,...t)=>typeof e==`function`?e(...t):e;function ss({is:e,processProps:t=e=>e}={}){let n=n=>{let[i,a]=M(t?.(n),[`is`,`vIf`,`children`]);return N(()=>N(()=>!!(!(`vIf`in i)||os(i.vIf)))()&&A(wt,j({get component(){return i.is??e}},a,{get children(){return r(i.children)}})))},r=e=>Array.isArray(e)?e.map(e=>typeof e==`object`?n(e):e):e;return n}ss({is:`div`});function cs(e,t){let n=ls(e);return Math.round(t*n)/n}function ls(e){return typeof window>`u`?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}const us=(e={})=>{let[t,n]=x(null),[r,i]=x(null),a=()=>typeof e.strategy==`function`?e.strategy():e.strategy??`absolute`,o=()=>typeof e.placement==`function`?e.placement():e.placement??`bottom`,s=typeof e.transform==`function`?e.transform:()=>e.transform===void 0?!0:e.transform,c=typeof e.middleware==`function`?e.middleware:()=>e.middleware??[],l=typeof e.isOpen==`function`?e.isOpen:()=>e.isOpen??!0,u=()=>e.elements?.reference?.()||t(),d=()=>e.elements?.floating?.()||r(),[f,p]=x({x:0,y:0,strategy:a(),middlewareData:{},placement:o(),isPositioned:!1,arrow:null}),m=w(()=>{f().x,f().y,s(),a(),d();let e={top:`0px`,left:`0px`,position:a()};if(!d?.())return e;let t=cs(d?.(),f().x),n=cs(d?.(),f().y);return s()?{...e,transform:`translate(${t}px, ${n}px)`,...ls(d?.())>=1.5&&{willChange:`transform`}}:{position:a(),left:`${t}px`,top:`${n}px`}});function h(){let e=u(),t=d();e&&t&&rs(e,t,{middleware:c(),placement:o(),strategy:a()}).then(e=>{let t={...e,isPositioned:!0};p({...t,middlewareData:t.middlewareData,isPositioned:!0,arrow:e.middlewareData.arrow})},e=>{console.error(e)})}return C(()=>{let t=u(),n=d();if(a(),o(),s(),c(),!l())return;let r={current:void 0};if(D(()=>{r.current?.(),r.current=void 0}),t&&n){if(typeof e.whileElementsMounted==`function`){r.current=e.whileElementsMounted(t,n,h);return}h()}}),C(()=>{l()===!1&&f().isPositioned&&p({...f(),isPositioned:!1})}),{x:()=>f().x,y:()=>f().y,placement:()=>f().placement,strategy:()=>f().strategy,isPositioned:()=>f().isPositioned,floatingStyles:m,middleware:()=>f().middlewareData,elements:{reference:()=>t(),floating:()=>r()},arrowStyles:()=>f().arrow,refs:{setReference:n,setFloating:i,reference:()=>t(),floating:()=>r()},update:h}};function ds(e){e=j({loop:!0},e);let t=()=>H(e.list)??H(e.ref),n=()=>H(e.ref)??H(e.list);C(()=>{n().tabIndex>-1||(n().tabIndex=0)}),W(n,`keydown`,n=>{if(![`ArrowDown`,`ArrowUp`,`Enter`].includes(n.key))return;n.stopPropagation(),n.preventDefault();let r=t()?.querySelector(`.hover`);if(n.key==`Enter`){r?.click();return}let i=n.key==`ArrowDown`?r?+r?.getAttribute(`data-index`)+1:0:n.key==`ArrowUp`?r?r?.getAttribute(`data-index`)-1:-1:0,a=t()?.querySelector(`[data-index='${i}']`);a?(r?.classList.remove(`hover`),a.classList.add(`hover`)):e.loop&&(r?.classList.remove(`hover`),i>=0?t()?.querySelector(`[data-index='0']`)?.classList.add(`hover`):[...t()?.querySelectorAll(`[data-index]`)].at(-1)?.classList.add(`hover`))},e.options),C(()=>{if(!e.defaultFirst)return;let n=t();if(!n)return;let r=()=>{n.querySelector(`.hover`)||n.querySelector(`[data-index]`)?.classList.add(`hover`)};vr(n,{childList:!0},r),r()}),W(t,`mouseover`,()=>{t()?.querySelector(`.hover`)?.classList.remove(`hover`)})}function fs(e,t){ds({...t(),list:e})}function ps(e){let[t,n]=M(e,[`reference`,`floating`]),r=(e.trigger==`click`?Ci:Si)(()=>[a(),o()].filter(e=>e)),i=_i(()=>e.trigger==`click`?r():r()?Zt(100).then(()=>!0):Zt(200).then(()=>!1)),a=pe(()=>e.reference),o=pe(()=>i()?e.floating:void 0);return A(ms,j(n,{reference:a,floating:o}))}function ms(e){let[t,n]=M(e,[`reference`,`floating`]),r=pe(()=>e.reference),i=pe(()=>e.floating),a=w(()=>i()?us({whileElementsMounted(t,n,r){return es(t,n,r,{ancestorResize:!0,elementResize:!0,layoutShift:!0,ancestorScroll:!0,...e.update})},...n,elements:{reference:r,floating:i}}).floatingStyles:void 0);return C(()=>{i()&&Object.assign(i().style,a()?.()??{})}),[N(r),N(()=>N(()=>!!(n.portal&&i()))()?A(St,{get mount(){return n.portal},get children(){return i()}}):i())]}var hs=P(`<svg width=1.2em height=1.2em xmlns=http://www.w3.org/2000/svg viewBox="0 0 24 24"><g><rect width=2 height=5 x=11 y=1 fill=currentColor opacity=.14></rect><rect width=2 height=5 x=11 y=1 fill=currentColor opacity=.29 transform="rotate(30 12 12)"></rect><rect width=2 height=5 x=11 y=1 fill=currentColor opacity=.43 transform="rotate(60 12 12)"></rect><rect width=2 height=5 x=11 y=1 fill=currentColor opacity=.57 transform="rotate(90 12 12)"></rect><rect width=2 height=5 x=11 y=1 fill=currentColor opacity=.71 transform="rotate(120 12 12)"></rect><rect width=2 height=5 x=11 y=1 fill=currentColor opacity=.86 transform="rotate(150 12 12)"></rect><rect width=2 height=5 x=11 y=1 fill=currentColor transform="rotate(180 12 12)"></rect><animateTransform attributeName=transform calcMode=discrete dur=0.75s repeatCount=indefinite type=rotate values="0 12 12;30 12 12;60 12 12;90 12 12;120 12 12;150 12 12;180 12 12;210 12 12;240 12 12;270 12 12;300 12 12;330 12 12;360 12 12">`),gs=(e={})=>(()=>{var t=hs();return F(t,e,!0,!0),t})(),_s=P(`<div><div>`),vs=P(`<div>`),ys=P(`<div class="px-4 py-2 op40">无内容`);function bs(e){let t=fe({deep:0}),n=ss({is:n=>{let i=O(t),[a,o]=M(n,[`children`,`label`,`icon`,`isActive`,`cb`,`menu`,`popover`]),s=w(()=>e.x&&i.deep==1),c,[l,u]=x(),[d,f]=vi(!1,{before:()=>Zt(100)}),p=w(()=>l()?us({strategy:`fixed`,placement:s()?`bottom-start`:`right-start`,...a.menu,elements:{reference:()=>c,floating:l},whileElementsMounted(e,t,n){return es(e,t,n,{ancestorResize:!0,elementResize:!0,layoutShift:!0,ancestorScroll:!0})}}).floatingStyles:void 0);C(()=>{l()&&Object.assign(l().style,p()?.()??{})});let m=B({loading:!1});async function h(){if(m.loading)return;let t=a.cb?.();if(t instanceof Promise)try{await t,m.loading=!0}finally{m.loading=!1,e.onAction?.(a)}else e.onAction?.(a)}return ae(()=>{A(ps,j({strategy:`fixed`,reference:c,portal:c},()=>n.popover,{get middleware(){return[ts({mainAxis:4})]}}))}),pe(()=>a.children),(()=>{var t=_s(),n=t.firstChild;I(_r,t,()=>f);var i=c;return typeof i==`function`?I(i,t):c=t,F(t,j(()=>U({class:`li flex aic rd-2 ${s()?`my-1 p-1`:`mx-1 pl-1 pr-4 py-1`} ${ui(a.isActive)&&`active`}`},o),{"on:click":h}),!1,!0),L(n,(()=>{var e=N(()=>!!m.loading);return()=>e()?A(gs,{}):a.icon})()),L(t,()=>a.label,null),L(t,(()=>{var e=N(()=>!!(d()&&a.children));return()=>e()&&A(r,{ref:u,class:`z-1`,get children(){return a.children}})})(),null),S(()=>it(n,`flex aic ${s()?``:e.density==`comfortable`?`ml-1 mr-2.5`:`ml-.5 mr-1`} `)),t})()},processProps:e=>{let t=0;return Array.isArray(e.children)&&e.children.forEach(e=>!e.is&&typeof e==`object`&&(e[`data-index`]=t++)),e}}),r=n=>{let r=O(t),i=B({deep:r.deep+1});return A(t.Provider,{value:i,get children(){var t=vs();return I(fs,t,()=>n.usedir),F(t,j(()=>U({class:`${e.x&&i.deep==1?`tt-menu-x flex`:`tt-menu max-h-100`} overflow-auto`},n),{"on:click":e=>e.stopPropagation()}),!1,!0),L(t,()=>(e=>$r(e)?ys():e)(n.children)),t}})};return A(n,j(()=>U({},e),{is:r,items:null,get children(){return e.items}}))}const xs={name:`menu`,priority:1/0,store:e=>({}),rewriteProps:{Table:({Table:e},{store:t})=>n=>{let[r,i]=x(),a=Ie(()=>t.plugins||[],e=>w(()=>e.menus?.(t))),o=w(()=>a().flatMap(e=>e()||[])),[s,c]=x();function l(e){e.preventDefault(),c({x:e.x,y:e.y})}W(document,`pointerdown`,e=>{r()?.contains(e.target)||c()});let u=_i(()=>{let e=r();if(e)return rs({getBoundingClientRect:()=>DOMRect.fromRect(s())},e,{strategy:`fixed`,placement:`top-start`,middleware:[ns({boundary:document.body,alignment:`start`})]}).then(({x:e,y:t})=>({position:`fixed`,transform:`translate(${e}px, ${t}px)`,top:0,left:0,"z-index":10}))});return n=U({tabindex:-1,onContextMenu:l},n),A(e,j(n,{get children(){return[N(()=>N(()=>!!s())()&&A(bs,{ref:i,get style(){return u()||`position: fixed`},get items(){return o()},onAction:()=>c()})),N(()=>n.children)]}}))}},menus:e=>[{label:`新增行 ↑`,cb:()=>e.commands.addRows(e.selected.end[1],[e.props.newRow(e.selected.end[1])])},{label:`新增行 ↓`,cb:()=>e.commands.addRows(e.selected.end[1],[e.props.newRow(e.selected.end[1])],!1)},{label:`删除行`,cb:()=>e.commands.deleteRows(en(...(e=>[e[0],e[1]+1])([e.selected.start[1],e.selected.end[1]].sort((e,t)=>e-t))))}],commands:e=>({rowEquals(e,t){return e==t},rowIndexOf(t,n){return t.findIndex(t=>e.commands.rowEquals(t,n))},rowChange(t,n){let r=[...e.rawProps.data||[]];n=n==null?e.commands.rowIndexOf(r,t):r.findIndex(t=>t==e.props.data[n]),n>-1&&(r[n]=t,e.props.onDataChange?.(r))},addRows(t,n,r=!0){Ss(e,t,n,r)},deleteRows(t){let{rowKey:n,data:r}=e.props,i=[...e.rawProps.data||[]],a=new Set(t.map(e=>r[e]));di([...a]),Ht(i,e=>a.has(e)),e.props?.onDataChange?.(i)}})};function Ss(e,t,n,r){let{data:i}=e.props,a=t=>{for(r=!1;--t>=0&&i[t]?.[e.internal];);return t>=0?i[t]:null},o=t=>{for(r=!0;++t<i.length&&i[t]?.[e.internal];);return t<i.length?i[t]:null},s=i[t]?.[e.internal]?r?a(t)||o(t):o(t)||a(t):i[t];s&&T(()=>{t=e.commands.rowIndexOf(i,s),e.selected&&(e.selected.start=[0,t+(r?0:1)],e.selected.end=[1/0,t+n.length-1+(r?0:1)])}),(()=>{let t=[...e.rawProps.data||[]],i=s?e.commands.rowIndexOf(t,s)+(r?0:1):t.length;t.splice(i,0,...n),e.props?.onDataChange?.(t)})()}const Cs={name:`command`,priority:1/0,store:e=>{let t=se(),n=w(()=>e.plugins.reduce((n,r)=>Object.assign(n,ce(t,()=>r.commands?.(e,{...n}))),{}));return{get commands(){return n()}}}};function ws(e){let{value:t,onChange:n,multiple:r=!1,selectable:i}=e,[a,o]=x((()=>r?t?new Set(Array.isArray(t)?t:[t]):new Set:t)()),s=e=>i?i(e):!0,c=()=>{r?(o(new Set),n?.([])):(o(void 0),n?.(void 0))},l=e=>{if(s(e))if(r){let t=new Set(Array.isArray(e)?e:[e]);o(t),n?.(Array.from(t))}else o(e),n?.(e)},u=re(a,(e,t)=>r?t.has(e):e===t),d=e=>{if(s(e))if(r){let t=new Set(a());t.add(e),o(t),n?.(Array.from(t))}else o(e),n?.(e)},f=e=>{if(r){let t=new Set(a());t.delete(e),o(t),n?.(Array.from(t))}else a()===e&&(o(void 0),n?.(void 0))},p=e=>{u(e)?f(e):d(e)},m=w(()=>r?Array.from(a()):a());return{clear:c,set:l,has:u,add:d,del:f,toggle:p,get value(){return m()}}}var Ts=P(`<label>`);const Es={name:`row-selection`,priority:-1/0,store:e=>({rowSelectionCol:{[e.internal]:1,id:Symbol(`row-selection`),fixed:`left`,class:`row-selection`,width:45,resizable:!1,render:_a(t=>(()=>{var n=Ts();return L(n,A(Ki,{style:`position: absolute`,get value(){return e.commands.rowSelector.has(t.data)},onChange:n=>n?e.commands.rowSelector.add(t.data):e.commands.rowSelector.del(t.data),get disabled(){return!e.props?.rowSelection?.selectable?.(t.data)}})),n})())}}),commands:e=>({rowSelector:ws(j(()=>({...e.props?.rowSelection})))}),rewriteProps:{rowSelection:({rowSelection:e})=>Jr(e,{enable:!1,multiple:!1,selectable:()=>!0}),columns:({columns:e},{store:t})=>t.props?.rowSelection?.enable?[t.rowSelectionCol,...e]:e}};var Ds=P(`<div>`),Os=Symbol(`col_size`),ks=Symbol(`row_size`),As=e=>{let{props:t,store:n}=O($),r;return gi(()=>r,{start(i,a,o){i.stopPropagation();let s=e.x,{min:c,max:l}=t.resizable.col,u=r.parentElement,d=u.offsetWidth;a((t,{ox:r})=>n[Os][e.x]=Qt(d+r,c,l)),o(()=>{let e=t.columns[s],r=[...n.rawProps.columns||[]],i=r.indexOf(e[n.raw]??e);i>-1&&(r[i]={...r[i],width:u.offsetWidth},t.onColumnsChange?.(r)),e.onWidthChange?.(u.offsetWidth)})}}),(()=>{var n=Ds(),i=r;return typeof i==`function`?I(i,n):r=n,S(()=>it(n,`in-cell__resize-handle absolute top-0 right-0 flex justify-center w-10px! ${e.x==t.columns.length-1?`justify-end!`:`w-10px! translate-x-1/2`} after:w-1 cursor-w-resize z-1`)),n})()},js=e=>{let{props:t,store:n}=O($),r;return gi(()=>r,{start(i,a,o){i.stopPropagation();let s=e.y,{min:c,max:l}=t.resizable.row,u=r.parentElement.offsetHeight;a((t,{oy:r})=>n[ks][e.y]=Qt(u+r,c,l)),o(()=>{let e=t.data[s];[...n.rawProps.data||[]].indexOf(e[n.raw]??e)})}}),W(()=>r,`dblclick`,()=>e.data[Os]=void 0),(()=>{var n=Ds(),i=r;return typeof i==`function`?I(i,n):r=n,S(()=>it(n,`in-cell__resize-handle absolute bottom-0 left-0 flex flex-col justify-center h-1! ${e.y==t.data.length-1?`justify-end!`:``} after:h-1 cursor-s-resize z-1`)),n})()};const Ms={name:`resize`,store:()=>({[Os]:[],[ks]:[]}),rewriteProps:{resizable:({resizable:e})=>Jr(e,{col:{enable:!0,min:45,max:800},row:{enable:!1,min:20,max:400}}),columns:({columns:e},{store:t})=>(e=e.map((e,n)=>({...e,[t.raw]:e[t.raw]??e})),e=e.map(e=>e.resizable===void 0?{...e,resizable:t.props?.resizable?.col.enable,[t.raw]:e[t.raw]??e}:e),e=e.map((e,n)=>t[Os][n]?{...e,width:t[Os][n],[t.raw]:e[t.raw]??e}:e),E(()=>T(()=>zt(e,{key:t.raw})(t.__resize__cols??=[])))),Th:({Th:e},{store:t})=>t=>(t=U({class:`relative`},t),A(e,j(t,{get children(){return[N(()=>t.children),N(()=>N(()=>!!t.col.resizable)()&&A(As,t))]}}))),Td:({Td:e},{store:t})=>t.props?.resizable?.row.enable?n=>(n=U({class:`relative`},n),A(e,j(n,{get children(){return[N(()=>n.children),N(()=>N(()=>!!(n.x==0&&t.props?.resizable?.row.enable))()&&A(js,n))]}}))):e,cellStyle:({cellStyle:e},{store:t})=>n=>`${ui(e,n)};`+(t[ks][n.y]?`height: ${t[ks][n.y]}px`:``)}};var Ns=P(`<div>`);const Ps=(e,t)=>{t=j({enable:!0},t);let n=0;dr(()=>t.enable?H(e):void 0,{async pointerdown(e){let r=n,a=await fi(e.composedPath(),e=>e instanceof HTMLElement&&t.draggable(e));r==n&&a&&(e.stopPropagation(),i.drag=a,i.drag?.setAttribute(`draggable`,`true`))},pointerup(){n++,r()},pointermove(){n++},dragstart(e){e.dataTransfer.setDragImage(document.createElement(`img`),0,0)},dragover(e){if(!i.drag)return;let n=i.over=e.composedPath().filter(e=>e instanceof HTMLElement).find(e=>t.dragover(e))??i.over;if(!n)return;e.preventDefault(),e.stopPropagation();let r=t.children(n);if(r){let t=0,n=1/0,a=``;r.forEach((r,i)=>{let o=getComputedStyle(r).display,s=[`table-cell`,`inline`].some(e=>o.includes(e)),c=r.getBoundingClientRect();if(s){let r=Math.sqrt((e.clientX-c.x)**2+(e.clientY-c.y+c.height/2)**2);r<n&&(t=i,n=r,a=`l`),r=Math.sqrt((e.clientX-c.right)**2+(e.clientY-c.y+c.height/2)**2),r<n&&(t=i,n=r,a=`r`)}else{let r=Math.sqrt((e.clientY-c.y)**2+(e.clientX-c.x+c.width/2)**2);r<n&&(t=i,n=r,a=`t`),r=Math.sqrt((e.clientY-c.bottom)**2+(e.clientX-c.x+c.width/2)**2),r<n&&(t=i,n=r,a=`b`)}});let o=r[t].getBoundingClientRect(),s=a==`l`||a==`r`,c=a==`t`||a==`b`;i.style={width:`${c?o.width:3}px`,height:`${c?3:o.height}px`,translate:`${c?o.x:(a==`l`?o.x:o.right)-3/2}px ${s?o.y:(a==`t`?o.y:o.bottom)-3/2}px`},i.rel=r[t],i.type=a==`l`||a==`t`?`before`:`after`}else{let e=n.getBoundingClientRect();i.style={width:e.width,height:e.height,translate:`${e.x}px ${e.y}px`},i.rel=n,i.type=`inner`}},dragend(){r()}});function r(){i.drag?.removeAttribute(`draggable`),i.drag&&i.rel&&t.dragend?.(),zt({})(i)}let i=B({style:void 0,drag:void 0,over:void 0,rel:void 0,type:``});return N(()=>N(()=>!!i.style)()&&A(St,{get mount(){return H(e)},get children(){var e=Ns();return F(e,j(()=>t.guideLine,{get style(){return i.style}}),!1,!1),e}})),i},Fs={rewriteProps:{colDrag:({colDrag:e=!1})=>e,rowDrag:({rowDrag:e=!1})=>e},onMount(e){let t=Ps(()=>e.scroll_el,{get enable(){return e.props?.colDrag},guideLine:{class:`col__guide-line`},draggable:t=>((n,r)=>t.tagName==`TH`&&Fr(e.selected,{start:[n,0]})&&!e.props?.columns[n][e.internal]&&e.thead.contains(t)&&Zt(300).then(()=>!0))(+t.getAttribute(`x`),+t.getAttribute(`y`)),dragover:e=>e.tagName==`THEAD`,children:n=>[...t.drag.parentElement.children].filter(t=>!e.props?.columns[t.getAttribute(`x`)][e.internal]),dragend:r}),n=Ps(()=>e.scroll_el,{get enable(){return e.props?.rowDrag},guideLine:{class:`row__guide-line`},draggable:t=>((n,r)=>t.tagName==`TD`&&Fr(e.selected,{start:[0,r]})&&n==0&&!e.props?.data[r][e.internal]&&e.tbody.contains(t)&&Zt(300).then(()=>!0))(+t.getAttribute(`x`),+t.getAttribute(`y`)),dragover:e=>e.tagName==`TBODY`,children:t=>[...n.over.children].filter(t=>!e.props.data[t.getAttribute(`y`)][e.internal]),dragend:i});async function r(){if(t.drag==t.rel)return;let[n,r]=[e.props.columns,[...e.rawProps.columns||[]]],i=(t=>t[e.raw]??t)(n[t.drag.getAttribute(`x`)]),a=(t=>t[e.raw]??t)(n[t.rel.getAttribute(`x`)]),o=r.indexOf(i),s=r.indexOf(a);if(o<0||s<0)return;r[o].fixed=r[s].fixed,r.splice(s-(o>s?0:1)+(t.type==`before`?0:1),0,r.splice(o,1)[0]),e.props.onColumnsChange?.(r),await Promise.resolve();let c=e.props.columns.findIndex(t=>t==i||t[e.raw]==i);c<0||(e.selected.start[0]=e.selected.end[0]=c)}async function i(){if(n.drag==n.rel)return;let[t,r]=[e.props.data,[...e.rawProps.data||[]]],i=(t=>t[e.raw]??t)(t[n.drag.getAttribute(`y`)]),a=(t=>t[e.raw]??t)(t[n.rel.getAttribute(`y`)]),o=r.indexOf(i),s=r.indexOf(a);if(o<0||s<0)return;r.splice(s-(o>s?0:1)+(n.type==`before`?0:1),0,r.splice(o,1)[0]),e.props.onDataChange?.(r),await Promise.resolve();let c=e.props.data.findIndex(t=>t==i||t[e.raw]==i);c<0||(e.selected.start[1]=e.selected.end[1]=c)}}};var Is=P(`<svg viewBox="0 0 24 24"width=1.2em height=1.2em><path fill=none stroke=currentColor stroke-linecap=round stroke-linejoin=round stroke-width=2 d="m9 18l6-6l-6-6">`),Ls=(e={})=>(()=>{var t=Is();return F(t,e,!0,!0),t})(),Rs=P(`<div class="flex items-center">`);const zs={priority:-1/0,store:e=>({rowGroup:{expands:[],isExpand:t=>e.rowGroup.expands.some(e=>Wn(e,t[Q].path)),expand:(t,n)=>T(()=>n?t[Q].path2.forEach(t=>e.rowGroup.isExpand(t)||e.rowGroup.expands.push(t[Q].path)):e.rowGroup.isExpand(t)||e.rowGroup.expands.push(t[Q].path)),toggleExpand:t=>e.rowGroup.isExpand(t)?Ht(e.rowGroup.expands,e=>Wn(e,t[Q].path)):e.rowGroup.expand(t)}}),commands:(e,{addRows:t})=>({addRows(n,r,i){let{data:a,rowGroup:o,rowKey:s}=e.props;if(o?.fields?.length){let o=Gr(a,e=>e[Q],n);if(o&&a[n][Q]){let t=function e(t){return t[Q]?.children[0]?.[Q]?e(t[Q].children[0]):t}(o);e.rowGroup.expand(t,!0);let r=t[Q].children[0];n=e.props.data.indexOf(r),i=!0}t?.(n,r,i)}else t?.(...arguments)}}),rewriteProps:{data:({data:e},{store:t})=>t.props?.rowGroup?.fields?.length?Bs(e,t):e,newRow:({newRow:e},{store:t})=>function(n){let r=e(...arguments),{data:i,rowGroup:a}=t.props;if(a?.fields?.length){let e=Gr(i,e=>e[Q],n);if(e){let t=function e(t){return t[Q]?.children[0]?.[Q]?e(t[Q].children[0]):t}(e),n=qt(a.fields,t[Q].path);Object.assign(r,n)}}return r},Td:({Td:e},{store:t})=>n=>{if(!n.data?.[Q])return A(e,n);let{props:r}=O($),i=w(()=>t.rowGroup.isExpand(n.data));return A(e,j(n,{get children(){return N(()=>r.columns?.findIndex(e=>!e[t.internal])==n.x)()?(()=>{var e=Rs();return e.$$dblclick=()=>t.rowGroup.toggleExpand(n.data),L(e,A(Ls,{class:`icon-clickable mr-2`,get style(){return`transform: rotate(${i()?90:0}deg); opacity: .6`},onClick:()=>t.rowGroup.toggleExpand(n.data)}),null),L(e,()=>n.data[Q].value,null),S(t=>st(e,`padding-left: ${(n.data[Q].path.length-1)*16}px`,t)),e})():n.children}}))}}};var Q=Symbol(`row-group`),Bs=(e,t,n=[])=>{let r=t.props.rowGroup.fields,i=t.props.columns.find(e=>!e[t.internal]);if(!i||r.length==n.length)return e;let a=n[n.length-1]?.[Q].path||[],o=Vt(e,e=>e[r[a.length]]);return Object.keys(o).flatMap(e=>{let r={[i.id]:e,[t.internal]:1},s=[...n,r];r[Q]={path:[...a,e],value:e,path2:s},r[Q].children=Bs(o[e],t,s);let c=t.rowGroup.isExpand(r)?r[Q].children:[];return[r,...c]})};et([`dblclick`]);var Vs=P(`<td style=width:100%>`),Hs=P(`<div style=display:flex;align-items:center;width:100%;height:100%;opacity:.4>`);const Us={store:e=>({expandCol:{id:Symbol(`expand`),fixed:`left`,width:45,render:_a(t=>A(Ws,{store:e,get data(){return t.data}})),props:t=>({onClick:()=>e.commands.expand.toggle(t.data)}),[e.internal]:1}}),commands:e=>({expand:ws({multiple:!0})}),rewriteProps:{expand:({expand:e})=>Jr(e,{enable:!1}),columns:({columns:e},{store:t})=>t.props.expand?.enable?[t.expandCol,...e]:e,Tr:({Tr:e},{store:t})=>t.props.expand?.enable?n=>{let{props:r}=O($);return A(e,j(n,{get children(){return N(()=>!n.data?.[t.expandCol.id])()?n.children:(()=>{var e=Vs();return L(e,(()=>{var e=N(()=>!!r.expand?.render);return()=>e()&&va(r.expand.render,n,r.renderer)})()),S(()=>tt(e,`colspan`,r.columns?.length)),e})()}}))}:e,Td:({Td:e},{store:t})=>n=>(n=U(n,{onClick:()=>n.col.id==t.expandCol.id&&t.commands.expand.toggle(n.data)}),A(e,n)),data:({data:e},{store:t})=>t.commands.expand.value.length?e?.flatMap(e=>t.commands.expand.has(e)?[e,{[t.expandCol.id]:1}]:e):e}};var Ws=e=>(()=>{var t=Hs();return L(t,A(Ls,{get style(){return`transform: rotate(${e.store.commands.expand.has(e.data)?90:0}deg);`}})),t})(),Gs=P(`<table>`),Ks=P(`<thead>`),qs=P(`<tbody>`),Js=P(`<tr>`),Ys=P(`<th>`),Xs=P(`<td>`),Zs=P(`<div><div class=data-table__layers></div><table class=data-table--table>`);const $=fe({props:{},store:{}}),Qs=e=>{e=j({rowKey:`id`},e);let t=w(()=>[...nc,...e.plugins||[],ba].sort((e,t)=>(t.priority||0)-(e.priority||0))),n=B({get rawProps(){return e},get plugins(){return t()}}),r=se();ne(e=>{let i=Bt(t(),e);return ce(r,()=>{i.forEach(e=>Object.assign(n,e.store?.(n)))}),t()},[]);let i=Ie(t,()=>x());n.props=bi(w(()=>i()[i().length-1][0]()||e)),ne(Ie(t,(t,r)=>{let a=w(()=>i()[r()-1]?.[0]()||e),o=j(a,bi(Ln(t.rewriteProps||{},e=>xi(()=>e(a(),{store:n})))));i()[r()][1](o)})),ae(()=>{C(Ie(t,e=>e.onMount?.(n)))});let a=B({props:n.props,store:n});return window.store=n,window.ctx=a,A($.Provider,{value:a,get children(){return A(a.props.Table,{get children(){return[A($s,{}),A(ec,{})]}})}})};var $s=()=>{let{props:e}=O($);return A(e.Thead,{get children(){return A(e.Tr,{get children(){return A(e.EachCells,{get each(){return e.columns||[]},children:(t,n)=>A(e.Th,{get col(){return t()},get x(){return n()},get children(){return t().name}})})}})}})},ec=()=>{let{props:e}=O($);return A(e.Tbody,{get children(){return A(e.EachRows,{get each(){return e.data},children:(t,n)=>A(e.Tr,{get y(){return n()},get data(){return t()},get children(){return A(e.EachCells,{get each(){return e.columns},children:(r,i)=>A(e.Td,{get col(){return r()},get x(){return i()},get y(){return n()},get data(){return t()},get children(){return t()[r().id]}})})}})})}})};function tc(){let e={col:null,data:null},t=e=>(()=>{var t=Gs();return F(t,e,!1,!1),t})(),n=e=>(()=>{var t=Ks();return F(t,e,!1,!1),t})(),r=e=>(()=>{var t=qs();return F(t,e,!1,!1),t})(),i=t=>(()=>{var n=Js();return F(n,j(t,e),!1,!1),n})(),a=t=>(()=>{var n=Ys();return F(n,j(t,e),!1,!1),n})(),o=t=>(()=>{var n=Xs();return F(n,j(t,e),!1,!1),n})();return{name:`base`,priority:1/0,store:e=>({ths:[],thSizes:[],trs:[],trSizes:[],internal:Symbol(`internal`),raw:Symbol(`raw`)}),rewriteProps:{data:({data:e=[]})=>e,columns:({columns:e=[]})=>e,newRow:({newRow:e=()=>({})})=>e,Table:({Table:e=t},{store:n})=>t=>{let[n,r]=x(),{props:i}=O($);return t=U({ref:r,get class(){return`data-table ${i.class} ${i.border&&`data-table--border`} data-table--${i.size}`},get style(){return i.style}},t),A(e,t)},Thead:({Thead:e=n},{store:t})=>n=>(n=U({ref:e=>t.thead=e},n),A(e,n)),Tbody:({Tbody:e=r},{store:t})=>n=>(n=U({ref:e=>t.tbody=e},n),A(e,n)),Tr:({Tr:e=i},{store:t})=>n=>{let[r,i]=x();return n=U({ref:i},n),C(()=>{let{y:e}=n;t.trs[e]=r(),t.trSizes[e]=ji(r()),D(()=>t.trSizes[e]=t.trs[e]=void 0)}),A(e,n)},Th:({Th:e=a},{store:t})=>n=>{let[r,i]=x(),{props:a}=O($),o=U(n,{ref:i},{get class(){return ui(a.cellClass,n)},get style(){return ui(a.cellStyle,n)}},{get class(){return n.col.class},get style(){return n.col.style}},{get style(){return n.col.width?`width: ${n.col.width}px`:``}});return C(()=>{let{x:e}=n;t.ths[e]=r(),t.thSizes[e]=ji(r()),D(()=>t.thSizes[e]=t.ths[e]=void 0)}),A(e,j(o,{get children(){return n.children}}))},Td:({Td:e=o},{store:t})=>t=>{let{props:n}=O($),r=U(t,{get class(){return ui(n.cellClass,t)},get style(){return ui(n.cellStyle,t)}},{get class(){return t.col.class},get style(){return t.col.style}},{get style(){return t.col.width?`width: ${t.col.width}px`:``}});return A(e,j(r,{get children(){return t.children}}))},EachRows:({EachRows:e})=>e||(e=>A(He,{get each(){return e.each},children:(t,n)=>e.children(()=>t,n)})),EachCells:({EachCells:e})=>e||(e=>A(He,{get each(){return e.each},children:(t,n)=>e.children(()=>t,n)})),renderer:({renderer:e=e=>e})=>e}}}const nc=[{name:`scroll`,priority:1/0,rewriteProps:{Table:(e,{store:t})=>e=>{let n=Pi(()=>t.scroll_el),r=ji(()=>t.scroll_el),i=w(()=>{let e=t.scroll_el;if(!e)return;let i=n.x==0,a=n.x>=e.scrollWidth-(r.width||0);return i&&a?``:!i&&!a?`is-scroll-mid`:i?`is-scroll-left`:a?`is-scroll-right`:``});e=U(e,{ref:e=>t.scroll_el=e,class:`data-table--scroll-view`},{get class(){return i()}});let a=Ie(()=>t.plugins.flatMap(e=>e.layers??[]),e=>A(e,t));return(()=>{var n=Zs(),r=n.firstChild,i=r.nextSibling;return F(n,e,!1,!0),L(r,a),I(e=>t.table=e,i),L(i,()=>e.children),n})()}}},tc(),Cs,xs,Li,{name:`sticky-header`,rewriteProps:{Thead:({Thead:e})=>t=>{let{props:n}=O($);return t=U({get class(){return n.stickyHeader?`sticky-header`:``}},t),A(e,t)}}},{name:`fixed-column`,rewriteProps:{columns:({columns:e})=>[...e?.filter(e=>e.fixed==`left`)||[],...e?.filter(e=>!e.fixed)||[],...e?.filter(e=>e.fixed==`right`)||[]],cellClass:({cellClass:e})=>t=>(ui(e,t)||``)+(t.col.fixed?` fixed-${t.col.fixed}`:``),cellStyle:({cellStyle:e},{store:t})=>n=>(ui(e,n)||``)+(n.col.fixed?`; ${n.col.fixed}: ${$t(t.thSizes.slice(n.col.fixed==`left`?0:n.x+1,n.col.fixed==`left`?n.x:1/0),e=>e?.width||0)}px`:``)}},Ms,Fs,Ri,Us,Es,{name:`index`,priority:-1/0,store:e=>({$index:{name:``,id:Symbol(`index`),fixed:`left`,[e.internal]:1,width:40,style:`text-align: center`,class:`index`,render:_a(e=>N(()=>e.y+1))}}),rewriteProps:{columns:({columns:e},{store:t})=>t.props?.index?[t.$index,...e||[]]:e}},na,{name:`fit-col-width`,priority:-1/0,rewriteProps:{Table:(e,{store:t})=>n=>{let r=B({width:0});return Oi(()=>t.scroll_el,(e,t,n)=>r.width=n.contentBoxSize[0].inlineSize),C(ie(()=>[r.width,e.columns.map(e=>e.width)],async()=>{if(!r.width)return;t.__fit_col_width__cols_temp=null,await Promise.resolve();let e=(r.width-t.table.getBoundingClientRect().width)/t.props.columns.filter(e=>!e.width).length;t.__fit_col_width__cols_temp=t.props.columns.map((n,r)=>n.width?null:{width:Math.max((t.ths[r]?.getBoundingClientRect().width||0)+e,80)})})),A(e.Table,n)},columns:({columns:e},{store:t})=>(e=e.map((e,n)=>({...e,...t.__fit_col_width__cols_temp?.[n],[t.raw]:e[t.raw]??e})),E(()=>T(()=>zt(e,{key:t.raw})(t.__fit_col_width__cols??=[]))))}},zs];var rc=P(`<div class="p-2 c-red">`),ic=document.body.appendChild(document.createElement(`div`)),ac=B({bool:!0}),oc=B(en(10).map(e=>({name:`col_`+e,id:`col_`+e,width:80}))),sc=B(en(1e3).map((e,t)=>Object.fromEntries(oc.map(e=>[e.id,t+1]))));oc.forEach(e=>e.editable=!0),sc.forEach(e=>e.g=e.col_0%10),sc.forEach(e=>e.n=e.col_0%3),$e(()=>A(Qs,{class:`w-50vw! h-40vh m-10`,rowDrag:!0,colDrag:!0,size:`small`,get index(){return ac.bool},get stickyHeader(){return ac.bool},columns:oc,onColumnsChange:e=>T(()=>(oc.length=0,oc.push(...e))),data:sc,onDataChange:e=>T(()=>(sc.length=0,sc.push(...e))),border:!0,resizable:{row:{enable:!0}},plugins:[],expand:{enable:!0,render:({data:e})=>(()=>{var t=rc();return L(t,()=>JSON.stringify(e)),t})()},diff:{onCommit:(...e)=>di(e)},virtual:{},rowSelection:{}}),ic);
@@ -0,0 +1,15 @@
1
+ <!doctype html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8" />
5
+ <link rel="icon" type="image/svg+xml" href="./vite.svg" />
6
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
7
+ <title>intable</title>
8
+ <script type="module" crossorigin src="./index-MRnbkYmU.js"></script>
9
+ <link rel="stylesheet" crossorigin href="./index-Cc4RNkLY.css">
10
+ </head>
11
+ <body>
12
+ <div id="root"></div>
13
+ <!-- <script type="module" src="/src/demo-vue.ts"></script> -->
14
+ </body>
15
+ </html>
package/docs/vite.svg ADDED
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" class="iconify iconify--logos" width="31.88" height="32" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 257"><defs><linearGradient id="IconifyId1813088fe1fbc01fb466" x1="-.828%" x2="57.636%" y1="7.652%" y2="78.411%"><stop offset="0%" stop-color="#41D1FF"></stop><stop offset="100%" stop-color="#BD34FE"></stop></linearGradient><linearGradient id="IconifyId1813088fe1fbc01fb467" x1="43.376%" x2="50.316%" y1="2.242%" y2="89.03%"><stop offset="0%" stop-color="#FFEA83"></stop><stop offset="8.333%" stop-color="#FFDD35"></stop><stop offset="100%" stop-color="#FFA800"></stop></linearGradient></defs><path fill="url(#IconifyId1813088fe1fbc01fb466)" d="M255.153 37.938L134.897 252.976c-2.483 4.44-8.862 4.466-11.382.048L.875 37.958c-2.746-4.814 1.371-10.646 6.827-9.67l120.385 21.517a6.537 6.537 0 0 0 2.322-.004l117.867-21.483c5.438-.991 9.574 4.796 6.877 9.62Z"></path><path fill="url(#IconifyId1813088fe1fbc01fb467)" d="M185.432.063L96.44 17.501a3.268 3.268 0 0 0-2.634 3.014l-5.474 92.456a3.268 3.268 0 0 0 3.997 3.378l24.777-5.718c2.318-.535 4.413 1.507 3.936 3.838l-7.361 36.047c-.495 2.426 1.782 4.5 4.151 3.78l15.304-4.649c2.372-.72 4.652 1.36 4.15 3.788l-11.698 56.621c-.732 3.542 3.979 5.473 5.943 2.437l1.313-2.028l72.516-144.72c1.215-2.423-.88-5.186-3.54-4.672l-25.505 4.922c-2.396.462-4.435-1.77-3.759-4.114l16.646-57.705c.677-2.35-1.37-4.583-3.769-4.113Z"></path></svg>
package/index.html ADDED
@@ -0,0 +1,14 @@
1
+ <!doctype html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8" />
5
+ <link rel="icon" type="image/svg+xml" href="/vite.svg" />
6
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
7
+ <title>intable</title>
8
+ </head>
9
+ <body>
10
+ <div id="root"></div>
11
+ <script type="module" src="/src/demo.tsx"></script>
12
+ <!-- <script type="module" src="/src/demo-vue.ts"></script> -->
13
+ </body>
14
+ </html>
package/package.json CHANGED
@@ -1,51 +1,43 @@
1
1
  {
2
2
  "name": "intable",
3
- "version": "0.0.6",
4
- "license": "MIT",
3
+ "version": "0.0.7",
5
4
  "type": "module",
6
- "files": [
7
- "dist"
8
- ],
9
- "main": "./dist/index.js",
10
- "module": "./dist/index.js",
11
- "exports": {
12
- ".": "./dist/index.js",
13
- "./theme/*": "./dist/theme/*",
14
- "./*": {
15
- "import": "./dist/*.js",
16
- "types": "./dist/*.d.ts"
17
- }
18
- },
19
5
  "dependencies": {
20
- "@floating-ui/dom": "^1.7.4",
21
- "@solid-primitives/bounds": "^0.1.3",
22
- "@solid-primitives/deep": "^0.3.3",
23
- "@solid-primitives/event-listener": "^2.4.3",
24
- "@solid-primitives/history": "^0.2.2",
25
- "@solid-primitives/keyboard": "^1.3.3",
26
- "@solid-primitives/media": "^2.3.3",
27
- "@solid-primitives/memo": "^1.4.3",
28
- "@solid-primitives/mutation-observer": "^1.2.2",
29
- "@solid-primitives/pointer": "^0.3.3",
30
- "@solid-primitives/props": "^3.2.2",
31
- "@solid-primitives/resize-observer": "^2.1.3",
32
- "@solid-primitives/scroll": "^2.1.3",
33
- "@solid-primitives/storage": "^4.3.3",
34
- "@solid-primitives/utils": "^6.3.2",
35
- "@tanstack/solid-virtual": "^3.13.12",
36
6
  "es-toolkit": "^1.39.10",
37
- "floating-ui-solid": "^1.0.63",
38
- "solid-element": "^1.9.1",
39
7
  "solid-js": "^1.9.9",
40
- "tinykeys": "^3.0.0",
41
- "uuid": "^13.0.0",
42
- "zod": "^4.3.6"
8
+ "@intable/vue": "^0.0.7",
9
+ "intable": "^0.0.7"
10
+ },
11
+ "devDependencies": {
12
+ "@babel/plugin-syntax-typescript": "^7.27.1",
13
+ "@iconify-json/lucide": "^1.2.63",
14
+ "@iconify-json/solar": "^1.2.4",
15
+ "@iconify-json/vscode-icons": "^1.2.29",
16
+ "@types/node": "^25.0.8",
17
+ "@unocss/transformer-directives": "^66.4.2",
18
+ "babel-plugin-solid-undestructure": "^1.1.0",
19
+ "rollup-plugin-visualizer": "^6.0.3",
20
+ "sass": "^1.90.0",
21
+ "tinyglobby": "^0.2.15",
22
+ "typescript": "~5.8.3",
23
+ "undestructure-macros": "^0.0.1",
24
+ "unocss": "^66.4.2",
25
+ "unplugin-auto-import": "^19.3.0",
26
+ "unplugin-icons": "^22.2.0",
27
+ "vite": "npm:rolldown-vite@7.1.12",
28
+ "vite-plugin-lib-inject-css": "^2.2.2",
29
+ "vite-plugin-solid": "^2.11.8",
30
+ "vue": "^3.5.24"
43
31
  },
44
32
  "publishConfig": {
45
33
  "access": "public",
46
34
  "registry": "https://registry.npmjs.org/"
47
35
  },
48
- "devDependencies": {
49
- "diff": "^8.0.2"
36
+ "scripts": {
37
+ "dev": "vite",
38
+ "build": "vite build",
39
+ "build:lib": "node scripts/build.js",
40
+ "publish:lib": "pnpm build:lib && node scripts/publish.js",
41
+ "preview": "vite preview"
50
42
  }
51
43
  }