@techdocs/cli 1.11.1 → 1.11.2-next.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +8 -0
- package/dist/embedded-app/.config-schema.json +1967 -1200
- package/dist/embedded-app/index.html +1 -1
- package/dist/embedded-app/index.html.tmpl +1 -1
- package/dist/embedded-app/static/123.bcb96abf.chunk.js +2 -0
- package/dist/embedded-app/static/123.bcb96abf.chunk.js.map +1 -0
- package/dist/embedded-app/static/1659.fe3e020b.chunk.js +2 -0
- package/dist/embedded-app/static/1659.fe3e020b.chunk.js.map +1 -0
- package/dist/embedded-app/static/3641.2f6dbbcb.chunk.js +2 -0
- package/dist/embedded-app/static/3641.2f6dbbcb.chunk.js.map +1 -0
- package/dist/embedded-app/static/3641.3641.9c1b1a2e.css +2 -0
- package/dist/embedded-app/static/3641.3641.9c1b1a2e.css.map +1 -0
- package/dist/embedded-app/static/4587.9946f651.chunk.js +2 -0
- package/dist/embedded-app/static/4587.9946f651.chunk.js.map +1 -0
- package/dist/embedded-app/static/{5443.fa47af87.chunk.js → 5443.835e027f.chunk.js} +2 -2
- package/dist/embedded-app/static/{5443.fa47af87.chunk.js.map → 5443.835e027f.chunk.js.map} +1 -1
- package/dist/embedded-app/static/{3939.3939.44355183.css → 5954.5954.8056ed76.css} +1 -1
- package/dist/embedded-app/static/{3939.3939.44355183.css.map → 5954.5954.8056ed76.css.map} +1 -1
- package/dist/embedded-app/static/5954.f0710c0b.chunk.js +2 -0
- package/dist/embedded-app/static/5954.f0710c0b.chunk.js.map +1 -0
- package/dist/embedded-app/static/{4815.b2bde1a3.chunk.js → 7213.e2116c72.chunk.js} +2 -2
- package/dist/embedded-app/static/7213.e2116c72.chunk.js.map +1 -0
- package/dist/embedded-app/static/{7226.8c68c3d3.chunk.js → 7226.07a43ca6.chunk.js} +2 -2
- package/dist/embedded-app/static/7226.07a43ca6.chunk.js.map +1 -0
- package/dist/embedded-app/static/{7477.a970d20a.chunk.js → 7227.69beafef.chunk.js} +5 -5
- package/dist/embedded-app/static/7227.69beafef.chunk.js.map +1 -0
- package/dist/embedded-app/static/{main.728cdf6e.css → main.2a45aed3.css} +2 -2
- package/dist/embedded-app/static/main.2a45aed3.css.map +1 -0
- package/dist/embedded-app/static/main.3aa6c085.js +523 -0
- package/dist/embedded-app/static/main.3aa6c085.js.map +1 -0
- package/dist/embedded-app/static/{module-material-ui.972bd852.js → module-material-ui.0bea4977.js} +2 -2
- package/dist/embedded-app/static/module-material-ui.0bea4977.js.map +1 -0
- package/dist/embedded-app/static/module-react-aria-components.edebf589.js +2 -0
- package/dist/embedded-app/static/module-react-aria-components.edebf589.js.map +1 -0
- package/dist/embedded-app/static/module-react-aria.84a78dd1.js +13 -0
- package/dist/embedded-app/static/module-react-aria.84a78dd1.js.map +1 -0
- package/dist/embedded-app/static/{module-react-stately.97fc37eb.js → module-react-stately.3db88231.js} +2 -2
- package/dist/embedded-app/static/module-react-stately.3db88231.js.map +1 -0
- package/dist/embedded-app/static/module-remixicon.4e40b5b6.js +2 -0
- package/dist/embedded-app/static/{module-remixicon.0feb7353.js.map → module-remixicon.4e40b5b6.js.map} +1 -1
- package/dist/embedded-app/static/{runtime.8fda57a9.js → runtime.9fcbc8ae.js} +2 -2
- package/dist/embedded-app/static/runtime.9fcbc8ae.js.map +1 -0
- package/dist/package.json.cjs.js +1 -1
- package/package.json +7 -7
- package/dist/embedded-app/static/123.59719fa4.chunk.js +0 -2
- package/dist/embedded-app/static/123.59719fa4.chunk.js.map +0 -1
- package/dist/embedded-app/static/1659.6b3694d1.chunk.js +0 -2
- package/dist/embedded-app/static/1659.6b3694d1.chunk.js.map +0 -1
- package/dist/embedded-app/static/3939.265160c5.chunk.js +0 -2
- package/dist/embedded-app/static/3939.265160c5.chunk.js.map +0 -1
- package/dist/embedded-app/static/4587.baab3514.chunk.js +0 -2
- package/dist/embedded-app/static/4587.baab3514.chunk.js.map +0 -1
- package/dist/embedded-app/static/4815.b2bde1a3.chunk.js.map +0 -1
- package/dist/embedded-app/static/7226.8c68c3d3.chunk.js.map +0 -1
- package/dist/embedded-app/static/7477.a970d20a.chunk.js.map +0 -1
- package/dist/embedded-app/static/main.728cdf6e.css.map +0 -1
- package/dist/embedded-app/static/main.fbc1b502.js +0 -523
- package/dist/embedded-app/static/main.fbc1b502.js.map +0 -1
- package/dist/embedded-app/static/module-material-ui.972bd852.js.map +0 -1
- package/dist/embedded-app/static/module-react-aria-components.ab7cc6df.js +0 -2
- package/dist/embedded-app/static/module-react-aria-components.ab7cc6df.js.map +0 -1
- package/dist/embedded-app/static/module-react-aria.e3e38de1.js +0 -13
- package/dist/embedded-app/static/module-react-aria.e3e38de1.js.map +0 -1
- package/dist/embedded-app/static/module-react-stately.97fc37eb.js.map +0 -1
- package/dist/embedded-app/static/module-remixicon.0feb7353.js +0 -2
- package/dist/embedded-app/static/runtime.8fda57a9.js.map +0 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";(self.webpackChunktechdocs_cli_embedded_app=self.webpackChunktechdocs_cli_embedded_app||[]).push([["7762"],{20934(e,t,i){i.d(t,{r:()=>n});var s=i(59155),l=i(14041);function n(e){let{onInputChange:t,inputValue:i,defaultInputValue:n=""}=e,[o,r]=(0,l.useState)(null),[a,h]=(0,s.P)(i,n,e=>{t&&t(e)});return{inputValue:a,setInputValue:h,focusedNodeId:o,setFocusedNodeId:r}}},95226(e,t,i){function s(e,t){return"function"==typeof t.getChildren?t.getChildren(e.key):e.childNodes}function l(e){return n(e,0)}function n(e,t){if(t<0)return;let i=0;for(let s of e){if(i===t)return s;i++}}function o(e){let t;for(let i of e)t=i;return t}function r(e,t,i){if(t.parentKey===i.parentKey)return t.index-i.index;let s=[...a(e,t),t],l=[...a(e,i),i],n=s.slice(0,l.length).findIndex((e,t)=>e!==l[t]);return -1!==n?(t=s[n],i=l[n],t.index-i.index):s.findIndex(e=>e===i)>=0?1:(l.findIndex(e=>e===t),-1)}function a(e,t){let i=[],s=t;for(;s?.parentKey!=null;)(s=e.getItem(s.parentKey))&&i.unshift(s);return i}i.d(t,{W:()=>o,cj:()=>n,iQ:()=>s,o3:()=>r,ue:()=>l})},35955(e,t,i){i.d(t,{v:()=>n});var s=i(95226);let l=new WeakMap;function n(e){let t=l.get(e);if(null!=t)return t;let i=0,n=t=>{for(let l of t)"section"===l.type?n((0,s.iQ)(l,e)):"item"===l.type&&i++};return n(e),l.set(e,i),i}},70408(e,t,i){i.d(t,{G:()=>r});var s=i(14041);class l{build(e,t){return this.context=t,n(()=>this.iterateCollection(e))}*iterateCollection(e){let{children:t,items:i}=e;if(s.isValidElement(t)&&t.type===s.Fragment)yield*this.iterateCollection({children:t.props.children,items:i});else if("function"==typeof t){if(!i)throw Error("props.children was a function but props.items is missing");let e=0;for(let s of i)yield*this.getFullNode({value:s,index:e},{renderer:t}),e++}else{let e=[];s.Children.forEach(t,t=>{t&&e.push(t)});let i=0;for(let t of e)for(let e of this.getFullNode({element:t,index:i},{}))i++,yield e}}getKey(e,t,i,s){if(null!=e.key)return e.key;if("cell"===t.type&&null!=t.key)return`${s}${t.key}`;let l=t.value;if(null!=l){let e=l.key??l.id;if(null==e)throw Error("No key found for item");return e}return s?`${s}.${t.index}`:`$.${t.index}`}getChildState(e,t){return{renderer:t.renderer||e.renderer}}*getFullNode(e,t,i,l){if(s.isValidElement(e.element)&&e.element.type===s.Fragment){let n=[];s.Children.forEach(e.element.props.children,e=>{n.push(e)});let o=e.index??0;for(let e of n)yield*this.getFullNode({element:e,index:o++},t,i,l);return}let r=e.element;if(!r&&e.value&&t&&t.renderer){let i=this.cache.get(e.value);if(i&&(!i.shouldInvalidate||!i.shouldInvalidate(this.context))){i.index=e.index,i.parentKey=l?l.key:null,yield i;return}r=t.renderer(e.value)}if(s.isValidElement(r)){let s=r.type;if("function"!=typeof s&&"function"!=typeof s.getCollectionNode){let e=r.type;throw Error(`Unknown element <${e}> in collection.`)}let n=s.getCollectionNode(r.props,this.context),a=e.index??0,h=n.next();for(;!h.done&&h.value;){let s=h.value;e.index=a;let d=s.key??null;null==d&&(d=s.element?null:this.getKey(r,e,t,i));let u=[...this.getFullNode({...s,key:d,index:a,wrapper:function(e,t){return e&&t?i=>e(t(i)):e||t||void 0}(e.wrapper,s.wrapper)},this.getChildState(t,s),i?`${i}${r.key}`:r.key,l)];for(let t of u){if(t.value=s.value??e.value??null,t.value&&this.cache.set(t.value,t),e.type&&t.type!==e.type)throw Error(`Unsupported type <${o(t.type)}> in <${o(l?.type??"unknown parent type")}>. Only <${o(e.type)}> is supported.`);a++,yield t}h=n.next(u)}return}if(null==e.key||null==e.type)return;let a=this,h={type:e.type,props:e.props,key:e.key,parentKey:l?l.key:null,value:e.value??null,level:(l?.level??0)+ +(l?.type==="item"),index:e.index,rendered:e.rendered,textValue:e.textValue??"","aria-label":e["aria-label"],wrapper:e.wrapper,shouldInvalidate:e.shouldInvalidate,hasChildNodes:e.hasChildNodes||!1,childNodes:n(function*(){if(!e.hasChildNodes||!e.childNodes)return;let i=0;for(let s of e.childNodes())for(let e of(null!=s.key&&(s.key=`${h.key}${s.key}`),a.getFullNode({...s,index:i},a.getChildState(t,s),h.key,h)))i++,yield e})};yield h}constructor(){this.cache=new WeakMap}}function n(e){let t=[],i=null;return{*[Symbol.iterator](){for(let e of t)yield e;for(let s of(i||(i=e()),i))t.push(s),yield s}}}function o(e){return e[0].toUpperCase()+e.slice(1)}function r(e,t,i){let n=(0,s.useMemo)(()=>new l,[]),{children:o,items:r,collection:a}=e;return(0,s.useMemo)(()=>a||t(n.build({children:o,items:r},i)),[n,o,r,a,i,t])}},30419(e,t,i){i.d(t,{r:()=>n});var s=i(59155),l=i(14041);function n(e){let{allowsMultipleExpanded:t=!1,isDisabled:i=!1}=e,[n,o]=(0,s.P)((0,l.useMemo)(()=>e.expandedKeys?new Set(e.expandedKeys):void 0,[e.expandedKeys]),(0,l.useMemo)(()=>e.defaultExpandedKeys?new Set(e.defaultExpandedKeys):new Set,[e.defaultExpandedKeys]),e.onExpandedChange);return(0,l.useEffect)(()=>{if(!t&&n.size>1){let e=n.values().next().value;null!=e&&o(new Set([e]))}}),{allowsMultipleExpanded:t,isDisabled:i,expandedKeys:n,setExpandedKeys:o,toggleKey(e){let i;t?(i=new Set(n)).has(e)?i.delete(e):i.add(e):i=new Set(n.has(e)?[]:[e]),o(i)}}}},86306(e,t,i){i.d(t,{E:()=>n});var s=i(59155),l=i(14041);function n(e){let[t,i]=(0,s.P)(e.isExpanded,e.defaultExpanded||!1,e.onExpandedChange),n=(0,l.useCallback)(()=>{i(!0)},[i]),o=(0,l.useCallback)(()=>{i(!1)},[i]),r=(0,l.useCallback)(()=>{i(!t)},[i,t]);return{isExpanded:t,setExpanded:i,expand:n,collapse:o,toggle:r}}},17876(e,t,i){i.d(t,{Nf:()=>s});function s(){return!1}},73465(e,t,i){i.d(t,{KZ:()=>h,Lf:()=>a,YD:()=>o});var s=i(14041);let l={badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valueMissing:!1,valid:!0},n={...l,customError:!0,valid:!1},o={isInvalid:!1,validationDetails:l,validationErrors:[]},r=(0,s.createContext)({}),a="__reactAriaFormValidationState";function h(e){if(e[a]){let{realtimeValidation:t,displayValidation:i,updateValidation:s,resetValidation:l,commitValidation:n}=e[a];return{realtimeValidation:t,displayValidation:i,updateValidation:s,resetValidation:l,commitValidation:n}}return function(e){let{isInvalid:t,validationState:i,name:l,value:a,builtinValidation:h,validate:y,validationBehavior:g="aria"}=e;i&&(t||="invalid"===i);let p=void 0!==t?{isInvalid:t,validationErrors:[],validationDetails:n}:null,f=(0,s.useMemo)(()=>y&&null!=a?u(function(e,t){if("function"==typeof e){let i=e(t);if(i&&"boolean"!=typeof i)return d(i)}return[]}(y,a)):null,[y,a]);h?.validationDetails.valid&&(h=void 0);let m=(0,s.useContext)(r),w=(0,s.useMemo)(()=>l?Array.isArray(l)?l.flatMap(e=>d(m[e])):d(m[l]):[],[m,l]),[v,S]=(0,s.useState)(m),[K,b]=(0,s.useState)(!1);m!==v&&(S(m),b(!1));let z=(0,s.useMemo)(()=>u(K?[]:w),[K,w]),x=(0,s.useRef)(o),[I,k]=(0,s.useState)(o),R=(0,s.useRef)(o),[C,M]=(0,s.useState)(!1);return(0,s.useEffect)(()=>{if(!C)return;M(!1);let e=f||h||x.current;c(e,R.current)||(R.current=e,k(e))}),{realtimeValidation:p||z||f||h||o,displayValidation:"native"===g?p||z||I:p||z||f||h||I,updateValidation(e){"aria"!==g||c(I,e)?x.current=e:k(e)},resetValidation(){c(o,R.current)||(R.current=o,k(o)),"native"===g&&M(!1),b(!0)},commitValidation(){"native"===g&&M(!0),b(!0)}}}(e)}function d(e){return e?Array.isArray(e)?e:[e]:[]}function u(e){return e.length?{isInvalid:!0,validationErrors:e,validationDetails:n}:null}function c(e,t){return e===t||!!e&&!!t&&e.isInvalid===t.isInvalid&&e.validationErrors.length===t.validationErrors.length&&e.validationErrors.every((e,i)=>e===t.validationErrors[i])&&Object.entries(e.validationDetails).every(([e,i])=>t.validationDetails[e]===i)}},68501(e,t,i){i.d(t,{$:()=>a});var s=i(95226);class l{shouldInvalidate(e,t){return e.width!==t.width||e.height!==t.height}shouldInvalidateLayoutOptions(e,t){return e!==t}update(e){}getItemRect(e){return this.getLayoutInfo(e)?.rect??null}getVisibleRect(){return this.virtualizer.visibleRect}constructor(){this.virtualizer=null}}var n=i(90901),o=i(13377),r=i(35616);class a extends l{constructor(e={}){super(),this.rowSize=e?.rowSize??e?.rowHeight??null,this.orientation=e.orientation??"vertical",this.estimatedRowSize=e?.estimatedRowSize??e?.estimatedRowHeight??null,this.headingSize=e?.headingSize??e?.headingHeight??null,this.estimatedHeadingSize=e?.estimatedHeadingSize??e?.estimatedHeadingHeight??null,this.loaderSize=e?.loaderSize??e?.loaderHeight??null,this.dropIndicatorThickness=e.dropIndicatorThickness||2,this.gap=e.gap||0,this.padding=e.padding||0,this.layoutNodes=new Map,this.rootNodes=[],this.lastCollection=null,this.invalidateEverything=!1,this.validRect=new(0,o.r),this.requestedRect=new(0,o.r),this.contentSize=new(0,r.o)}get collection(){return this.virtualizer.collection}get rowHeight(){return this.rowSize}get estimatedRowHeight(){return this.estimatedRowSize}get headingHeight(){return this.headingSize}get estimatedHeadingHeight(){return this.estimatedHeadingSize}get loaderHeight(){return this.loaderSize}getLayoutInfo(e){return this.ensureLayoutInfo(e),this.layoutNodes.get(e)?.layoutInfo||null}getVisibleLayoutInfos(e){let t="horizontal"===this.orientation?"x":"y",i="horizontal"===this.orientation?"width":"height";if(e[i]>1){let s=(this.rowSize??this.estimatedRowSize??48)+this.gap,l=Math.floor((e=e.copy())[t]/s)*s,n=e[i]+e[t]-l;e[t]=l,e[i]=Math.ceil(n/s)*s}this.layoutIfNeeded(e);let s=[],l=t=>{for(let i of t)this.isVisible(i,e)&&(s.push(i.layoutInfo),i.children&&l(i.children))};return l(this.rootNodes),s}layoutIfNeeded(e){if(this.lastCollection){for(let t of(this.requestedRect.containsRect(e)||(this.requestedRect=this.requestedRect.union(e),this.rootNodes=this.buildCollection()),this.virtualizer.persistedKeys))if(this.ensureLayoutInfo(t))return}}ensureLayoutInfo(e){return!this.layoutNodes.has(e)&&this.requestedRect.area<this.contentSize.area&&!!this.lastCollection&&(this.requestedRect=new(0,o.r)(0,0,1/0,1/0),this.rootNodes=this.buildCollection(),this.requestedRect=new(0,o.r)(0,0,this.contentSize.width,this.contentSize.height),!0)}isVisible(e,t){return e.layoutInfo.rect.intersects(t)||e.layoutInfo.isSticky||"header"===e.layoutInfo.type||"loader"===e.layoutInfo.type||this.virtualizer.isPersistedKey(e.layoutInfo.key)}shouldInvalidateEverything(e){let t=e.layoutOptions;return e.sizeChanged||this.rowSize!==(t?.rowSize??t?.rowHeight??this.rowSize)||this.orientation!==(t?.orientation??this.orientation)||this.headingSize!==(t?.headingSize??t?.headingHeight??this.headingSize)||this.loaderSize!==(t?.loaderSize??t?.loaderHeight??this.loaderSize)||this.gap!==(t?.gap??this.gap)||this.padding!==(t?.padding??this.padding)}shouldInvalidateLayoutOptions(e,t){return(e?.rowSize??e?.rowHeight)!==(t?.rowSize??t?.rowHeight)||e.orientation!==t.orientation||(e?.estimatedRowSize??e?.estimatedRowHeight)!==(t?.estimatedRowSize??t?.estimatedRowHeight)||(e?.headingSize??e?.headingHeight)!==(t?.headingSize??t?.headingHeight)||(e?.estimatedHeadingSize??e?.estimatedHeadingHeight)!==(t?.estimatedHeadingSize??t?.estimatedHeadingHeight)||(e?.loaderSize??e?.loaderHeight)!==(t?.loaderSize??t?.loaderHeight)||e.dropIndicatorThickness!==t.dropIndicatorThickness||e.gap!==t.gap||e.padding!==t.padding}update(e){let t=this.virtualizer.collection;this.invalidateEverything=this.shouldInvalidateEverything(e),this.invalidateEverything&&(this.requestedRect=this.virtualizer.visibleRect.copy(),this.layoutNodes.clear());let i=e.layoutOptions;if(this.rowSize=i?.rowSize??i?.rowHeight??this.rowSize,this.orientation=i?.orientation??this.orientation,this.estimatedRowSize=i?.estimatedRowSize??i?.estimatedRowHeight??this.estimatedRowSize,this.headingSize=i?.headingSize??i?.headingHeight??this.headingSize,this.estimatedHeadingSize=i?.estimatedHeadingSize??i?.estimatedHeadingHeight??this.estimatedHeadingSize,this.loaderSize=i?.loaderSize??i?.loaderHeight??this.loaderSize,this.dropIndicatorThickness=i?.dropIndicatorThickness??this.dropIndicatorThickness,this.gap=i?.gap??this.gap,this.padding=i?.padding??this.padding,this.rootNodes=this.buildCollection(),this.lastCollection&&t!==this.lastCollection)for(let e of this.lastCollection.getKeys())!t.getItem(e)&&this.layoutNodes.get(e)&&this.layoutNodes.delete(e);this.lastCollection=t,this.invalidateEverything=!1,this.validRect=this.requestedRect.copy()}buildCollection(e=this.padding){let t=this.virtualizer.collection,i="horizontal"===this.orientation?"x":"y",s="horizontal"===this.orientation?"maxX":"maxY",l=function(e,t){let i=[];for(let s of e)t(s)&&i.push(s);return i}(t,e=>"content"!==e.type),n=l.filter(e=>"loader"===e.type),o=[],a=t?.size===0;for(let t of(a&&(e=0),l)){let r=(this.rowSize??this.estimatedRowSize??48)+this.gap;if("item"===t.type&&e+r<this.requestedRect[i]&&!this.isValid(t,e)){e+=r;continue}let a="horizontal"===this.orientation?this.buildChild(t,e,this.padding,null):this.buildChild(t,this.padding,e,null);if(e=a.layoutInfo.rect[s]+this.gap,o.push(a),"loader"===t.type){let e=n.indexOf(t);n.splice(e,1)}if(("item"===t.type||"loader"===t.type)&&e>this.requestedRect[s]){let i=l.indexOf(t);for(let t of n){let n=l.indexOf(t);e+=(n-i-1)*r;let a="horizontal"===this.orientation?this.buildChild(t,e,this.padding,null):this.buildChild(t,this.padding,e,null);o.push(a),e=a.layoutInfo.rect[s],i=n}e+=(l.length-i-1)*r;break}}return e=Math.max(e-this.gap,0)+(a?0:this.padding),this.contentSize="horizontal"===this.orientation?new(0,r.o)(e,this.virtualizer.size.height):new(0,r.o)(this.virtualizer.size.width,e),o}isValid(e,t){let i=this.layoutNodes.get(e.key),s="horizontal"===this.orientation?"x":"y";return!this.invalidateEverything&&!!i&&i.node===e&&t===i.layoutInfo.rect[s]&&i.layoutInfo.rect.intersects(this.validRect)&&i.validRect.containsRect(i.layoutInfo.rect.intersection(this.requestedRect))}buildChild(e,t,i,s){if(this.isValid(e,"horizontal"===this.orientation?t:i))return this.layoutNodes.get(e.key);let l=this.buildNode(e,t,i);return l.layoutInfo.parentKey=s??null,l.layoutInfo.allowOverflow=!0,this.layoutNodes.set(e.key,l),l}buildNode(e,t,i){switch(e.type){case"section":return this.buildSection(e,t,i);case"item":case"separator":return this.buildItem(e,t,i);case"header":return this.buildSectionHeader(e,t,i);case"loader":return this.buildLoader(e,t,i);default:throw Error("Unsupported node type: "+e.type)}}buildLoader(e,t,i){let s=new(0,o.r)(t,i,this.padding,0),l=new(0,n.B)(e.type,e.key,s);return"horizontal"===this.orientation?(s.height=this.virtualizer.contentSize.height-this.padding-i,s.width=e.props.isLoading?this.loaderSize??this.rowSize??this.estimatedRowSize??48:0):(s.width=this.virtualizer.contentSize.width-this.padding-t,s.height=e.props.isLoading?this.loaderSize??this.rowSize??this.estimatedRowSize??48:0),{layoutInfo:l,validRect:s.intersection(this.requestedRect)}}buildSection(e,t,i){let l=this.virtualizer.collection,r=this.virtualizer.size.width-this.padding-t,a=this.virtualizer.size.height-this.padding-i,h="horizontal"===this.orientation?new(0,o.r)(t,i,0,a):new(0,o.r)(t,i,r,0),d=new(0,n.B)(e.type,e.key,h),u="horizontal"===this.orientation?t:i,c="horizontal"===this.orientation?"x":"y",y="horizontal"===this.orientation?"maxX":"maxY",g="horizontal"===this.orientation?"width":"height",p=0,f=[];for(let n of(0,s.iQ)(e,l)){if("content"===n.type)continue;let o=(this.rowSize??this.estimatedRowSize??48)+this.gap;if(u+o<this.requestedRect[c]&&!this.isValid(e,u)){u+=o,p++;continue}let r="horizontal"===this.orientation?this.buildChild(n,u,i,d.key):this.buildChild(n,t,u,d.key);if(u=r.layoutInfo.rect[y]+this.gap,f.push(r),u>this.requestedRect[y]){u+=([...(0,s.iQ)(e,l)].length-(f.length+p))*o;break}}return u-=this.gap,h[g]=u-("horizontal"===this.orientation?t:i),{layoutInfo:d,children:f,validRect:d.rect.intersection(this.requestedRect),node:e}}buildSectionHeader(e,t,i){let s="horizontal"===this.orientation?"height":"width",l="horizontal"===this.orientation?"width":"height",r=this.virtualizer.size[s]-this.padding-("horizontal"===this.orientation?i:t),a=this.headingSize,h=!1;if(null==a){let t=this.layoutNodes.get(e.key),i=t?.layoutInfo;if(i){let n=this.virtualizer.collection.getItem(e.key),o=this.lastCollection?this.lastCollection.getItem(e.key):null;a=t.layoutInfo.rect[l],h=r!==i.rect[s]||n!==o||i.estimatedSize}else a=e.rendered?this.estimatedHeadingSize:0,h=!0}null==a&&(a=48);let d="horizontal"===this.orientation?new(0,o.r)(t,i,a,r-i):new(0,o.r)(t,i,r-t,a),u=new(0,n.B)("header",e.key,d);return u.estimatedSize=h,{layoutInfo:u,children:[],validRect:u.rect.intersection(this.requestedRect),node:e}}buildItem(e,t,i){let s="horizontal"===this.orientation?"height":"width",l="horizontal"===this.orientation?"width":"height",r=this.virtualizer.size[s]-this.padding-("horizontal"===this.orientation?i:t),a=this.rowSize,h=!1;if(null==a){let t=this.layoutNodes.get(e.key);t?(a=t.layoutInfo.rect[l],h=r!==t.layoutInfo.rect[s]||e!==t.node||t.layoutInfo.estimatedSize):(a=this.estimatedRowSize,h=!0)}null==a&&(a=48);let d="horizontal"===this.orientation?new(0,o.r)(t,i,a,r):new(0,o.r)(t,i,r,a),u=new(0,n.B)(e.type,e.key,d);return u.estimatedSize=h,{layoutInfo:u,children:[],validRect:u.rect.intersection(this.requestedRect),node:e}}updateItemSize(e,t){let i=this.layoutNodes.get(e);if(!i)return!1;let s=this.virtualizer.collection,l=i.layoutInfo,n="horizontal"===this.orientation?"x":"y",o="horizontal"===this.orientation?"width":"height";if(l.estimatedSize=!1,l.rect[o]!==t[o]){let r=l.copy();r.rect[o]=t[o],i.layoutInfo=r,this.validRect[o]=Math.min(this.validRect[o],l.rect[n]-this.validRect[n]),this.requestedRect[o]+=r.rect[o]-l.rect[o],this.updateLayoutNode(e,l,r);let a=null!=l.parentKey?s.getItem(l.parentKey):null;for(;a;)this.updateLayoutNode(a.key,l,r),a=null!=a.parentKey?s.getItem(a.parentKey):null;return!0}return!1}updateLayoutNode(e,t,i){let s=this.layoutNodes.get(e);s&&(s.validRect=s.validRect.intersection(this.validRect),s.layoutInfo===t&&(s.layoutInfo=i))}getContentSize(){return this.contentSize}getDropTargetFromPoint(e,t,i){e+=this.virtualizer.visibleRect.x,t+=this.virtualizer.visibleRect.y;let s=new(0,o.r)(e,Math.max(0,t-this.gap),1,Math.max(1,2*this.gap)),l=this.getVisibleLayoutInfos(s),n=null,r=1/0;for(let e of l){if(!e.rect.intersects(s))continue;let i=Math.min(Math.abs(e.rect.y-t),Math.abs(e.rect.maxY-t));i<r&&(r=i,n=e.key)}if(null==n||0===this.virtualizer.collection.size)return{type:"root"};let a=this.getLayoutInfo(n);if(!a)return null;let h=a.rect,d={type:"item",key:a.key,dropPosition:"on"};return i(d)?t<=h.y+10&&i({...d,dropPosition:"before"})?d.dropPosition="before":t>=h.maxY-10&&i({...d,dropPosition:"after"})&&(d.dropPosition="after"):t<=h.y+h.height/2&&i({...d,dropPosition:"before"})?d.dropPosition="before":i({...d,dropPosition:"after"})&&(d.dropPosition="after"),d}getDropTargetLayoutInfo(e){let t,i=this.getLayoutInfo(e.key);if("before"===e.dropPosition)t="horizontal"===this.orientation?new(0,o.r)(Math.max(0,i.rect.x-this.dropIndicatorThickness/2),i.rect.y,this.dropIndicatorThickness,i.rect.height):new(0,o.r)(i.rect.x,Math.max(0,i.rect.y-this.dropIndicatorThickness/2),i.rect.width,this.dropIndicatorThickness);else if("after"===e.dropPosition){let s=this.collection.getItem(e.key);if(s){let t=s.level??0,l=this.collection.getKeyAfter(e.key);for(;null!=l;){let e=this.collection.getItem(l);if(!e||e.level<=t)break;i=this.getLayoutInfo(l)||i,l=this.collection.getKeyAfter(l)}}t="horizontal"===this.orientation?new(0,o.r)(i.rect.maxX-this.dropIndicatorThickness/2,i.rect.y,this.dropIndicatorThickness,i.rect.height):new(0,o.r)(i.rect.x,i.rect.maxY-this.dropIndicatorThickness/2,i.rect.width,this.dropIndicatorThickness)}else t=i.rect;return new(0,n.B)("dropIndicator",e.key+":"+e.dropPosition,t)}}},7553(e,t,i){i.d(t,{p:()=>a,Z:()=>h});class s{constructor(e){this.keyMap=new Map,this.firstKey=null,this.lastKey=null,this.iterable=e;let t=e=>{if(this.keyMap.set(e.key,e),e.childNodes&&"section"===e.type)for(let i of e.childNodes)t(i)};for(let i of e)t(i);let i=null,s=0,l=0;for(let[e,t]of this.keyMap)i?(i.nextKey=e,t.prevKey=i.key):(this.firstKey=e,t.prevKey=void 0),"item"===t.type&&(t.index=s++),("section"===t.type||"item"===t.type)&&l++,(i=t).nextKey=void 0;this._size=l,this.lastKey=i?.key??null}*[Symbol.iterator](){yield*this.iterable}get size(){return this._size}getKeys(){return this.keyMap.keys()}getKeyBefore(e){let t=this.keyMap.get(e);return t?t.prevKey??null:null}getKeyAfter(e){let t=this.keyMap.get(e);return t?t.nextKey??null:null}getFirstKey(){return this.firstKey}getLastKey(){return this.lastKey}getItem(e){return this.keyMap.get(e)??null}at(e){let t=[...this.getKeys()];return this.getItem(t[e])}getChildren(e){let t=this.keyMap.get(e);return t?.childNodes||[]}}var l=i(82722),n=i(56345),o=i(70408),r=i(14041);function a(e){let{filter:t,layoutDelegate:i}=e,a=(0,l.R)(e),h=(0,r.useMemo)(()=>e.disabledKeys?new Set(e.disabledKeys):new Set,[e.disabledKeys]),u=(0,r.useCallback)(e=>new s(t?t(e):e),[t]),c=(0,r.useMemo)(()=>({suppressTextValueWarning:e.suppressTextValueWarning}),[e.suppressTextValueWarning]),y=(0,o.G)(e,u,c),g=(0,r.useMemo)(()=>new(0,n.Y)(y,a,{layoutDelegate:i}),[y,a,i]);return d(y,g),{collection:y,disabledKeys:h,selectionManager:g}}function h(e,t){let i=(0,r.useMemo)(()=>t?e.collection.filter(t):e.collection,[e.collection,t]),s=e.selectionManager.withCollection(i);return d(i,s),{collection:i,selectionManager:s,disabledKeys:e.disabledKeys}}function d(e,t){let i=(0,r.useRef)(null);(0,r.useEffect)(()=>{if(null!=t.focusedKey&&!e.getItem(t.focusedKey)&&i.current){let s=i.current.getKeyAfter(t.focusedKey),l=null;for(;null!=s;){let n=e.getItem(s);if(n&&"item"===n.type&&!t.isDisabled(s)){l=s;break}s=i.current.getKeyAfter(s)}if(null==l)for(s=i.current.getKeyBefore(t.focusedKey);null!=s;){let n=e.getItem(s);if(n&&"item"===n.type&&!t.isDisabled(s)){l=s;break}s=i.current.getKeyBefore(s)}t.setFocusedKey(l)}i.current=e},[e,t])}},95432(e,t,i){i.d(t,{I:()=>n});var s=i(57139),l=i(14041);function n(e){let t=(0,s.T)(e),[i,n]=(0,l.useState)(null),[o,r]=(0,l.useState)([]);return{focusStrategy:i,...t,open(e=null){n(e),t.open()},toggle(e=null){n(e),t.toggle()},close(){r([]),t.close()},expandedKeysStack:o,openSubmenu:(e,t)=>{r(i=>t>i.length?i:[...i.slice(0,t),e])},closeSubmenu:(e,t)=>{r(i=>i[t]===e?i.slice(0,t):i)}}}},57139(e,t,i){i.d(t,{T:()=>n});var s=i(59155),l=i(14041);function n(e){let[t,i]=(0,s.P)(e.isOpen,e.defaultOpen||!1,e.onOpenChange),n=(0,l.useCallback)(()=>{i(!0)},[i]),o=(0,l.useCallback)(()=>{i(!1)},[i]),r=(0,l.useCallback)(()=>{i(!t)},[i,t]);return{isOpen:t,setOpen:i,open:n,close:o,toggle:r}}},34862(e,t,i){i.d(t,{V:()=>l});var s=i(59155);function l(e){let[t,i]=(0,s.P)(n(e.value),n(e.defaultValue)||"",e.onChange);return{value:t,setValue:i}}function n(e){if(null!=e)return e.toString()}},50756(e,t,i){i.d(t,{L:()=>s});class s extends Set{constructor(e,t,i){super(e),e instanceof s?(this.anchorKey=t??e.anchorKey,this.currentKey=i??e.currentKey):(this.anchorKey=t??null,this.currentKey=i??null)}}},56345(e,t,i){i.d(t,{Y:()=>n});var s=i(95226),l=i(50756);class n{constructor(e,t,i){this.collection=e,this.state=t,this.allowsCellSelection=i?.allowsCellSelection??!1,this._isSelectAll=null,this.layoutDelegate=i?.layoutDelegate||null,this.fullCollection=i?.fullCollection||null}get selectionMode(){return this.state.selectionMode}get disallowEmptySelection(){return this.state.disallowEmptySelection}get selectionBehavior(){return this.state.selectionBehavior}setSelectionBehavior(e){this.state.setSelectionBehavior(e)}get isFocused(){return this.state.isFocused}setFocused(e){this.state.setFocused(e)}get focusedKey(){return this.state.focusedKey}get childFocusStrategy(){return this.state.childFocusStrategy}setFocusedKey(e,t){(null==e||this.collection.getItem(e))&&this.state.setFocusedKey(e,t)}get selectedKeys(){return"all"===this.state.selectedKeys?new Set(this.getSelectAllKeys()):this.state.selectedKeys}get rawSelection(){return this.state.selectedKeys}isSelected(e){if("none"===this.state.selectionMode)return!1;let t=this.getKey(e);return null!=t&&("all"===this.state.selectedKeys?this.canSelectItem(t):this.state.selectedKeys.has(t))}get isEmpty(){return"all"!==this.state.selectedKeys&&0===this.state.selectedKeys.size}get isSelectAll(){if(this.isEmpty)return!1;if("all"===this.state.selectedKeys)return!0;if(null!=this._isSelectAll)return this._isSelectAll;let e=this.getSelectAllKeys(),t=this.state.selectedKeys;return this._isSelectAll=e.every(e=>t.has(e)),this._isSelectAll}get firstSelectedKey(){let e=null;for(let t of this.state.selectedKeys){let i=this.collection.getItem(t);(!e||i&&0>(0,s.o3)(this.collection,i,e))&&(e=i)}return e?.key??null}get lastSelectedKey(){let e=null;for(let t of this.state.selectedKeys){let i=this.collection.getItem(t);(!e||i&&(0,s.o3)(this.collection,i,e)>0)&&(e=i)}return e?.key??null}get disabledKeys(){return this.state.disabledKeys}get disabledBehavior(){return this.state.disabledBehavior}extendSelection(e){let t;if("none"===this.selectionMode)return;if("single"===this.selectionMode)return void this.replaceSelection(e);let i=this.getKey(e);if(null!=i){if("all"===this.state.selectedKeys)t=new(0,l.L)([i],i,i);else{let e=this.state.selectedKeys,s=e.anchorKey??i;for(let n of(t=new(0,l.L)(e,s,i),this.getKeyRange(s,e.currentKey??i)))t.delete(n);for(let e of this.getKeyRange(i,s))this.canSelectItem(e)&&t.add(e)}this.state.setSelectedKeys(t)}}getKeyRange(e,t){let i=this.collection.getItem(e),l=this.collection.getItem(t);return i&&l?0>=(0,s.o3)(this.collection,i,l)?this.getKeyRangeInternal(e,t):this.getKeyRangeInternal(t,e):[]}getKeyRangeInternal(e,t){if(this.layoutDelegate?.getKeyRange)return this.layoutDelegate.getKeyRange(e,t);let i=[],s=e;for(;null!=s;){let e=this.collection.getItem(s);if(e&&("item"===e.type||"cell"===e.type&&this.allowsCellSelection)&&i.push(s),s===t)return i;s=this.collection.getKeyAfter(s)}return[]}getKey(e){let t=this.collection.getItem(e);if(!t||"cell"===t.type&&this.allowsCellSelection)return e;for(;t&&"item"!==t.type&&null!=t.parentKey;)t=this.collection.getItem(t.parentKey);return t&&"item"===t.type?t.key:null}toggleSelection(e){if("none"===this.selectionMode)return;if("single"===this.selectionMode&&!this.isSelected(e))return void this.replaceSelection(e);let t=this.getKey(e);if(null==t)return;let i=new(0,l.L)("all"===this.state.selectedKeys?this.getSelectAllKeys():this.state.selectedKeys);i.has(t)?i.delete(t):this.canSelectItem(t)&&(i.add(t),i.anchorKey=t,i.currentKey=t),this.disallowEmptySelection&&0===i.size||this.state.setSelectedKeys(i)}replaceSelection(e){if("none"===this.selectionMode)return;let t=this.getKey(e);if(null==t)return;let i=this.canSelectItem(t)?new(0,l.L)([t],t,t):new(0,l.L);this.state.setSelectedKeys(i)}setSelectedKeys(e){if("none"===this.selectionMode)return;let t=new(0,l.L);for(let i of e){let e=this.getKey(i);if(null!=e&&(t.add(e),"single"===this.selectionMode))break}this.state.setSelectedKeys(t)}getSelectAllKeys(){let e=this.fullCollection??this.collection,t=[],i=l=>{for(;null!=l;){if(this.canSelectItemIn(l,e)){let n=e.getItem(l);n?.type==="item"&&t.push(l),n?.hasChildNodes&&(this.allowsCellSelection||"item"!==n.type)&&i((0,s.ue)((0,s.iQ)(n,e))?.key??null)}l=e.getKeyAfter(l)}};return i(e.getFirstKey()),t}selectAll(){this.isSelectAll||"multiple"!==this.selectionMode||this.state.setSelectedKeys("all")}clearSelection(){!this.disallowEmptySelection&&("all"===this.state.selectedKeys||this.state.selectedKeys.size>0)&&this.state.setSelectedKeys(new(0,l.L))}toggleSelectAll(){this.isSelectAll?this.clearSelection():this.selectAll()}select(e,t){"none"!==this.selectionMode&&("single"===this.selectionMode?this.isSelected(e)&&!this.disallowEmptySelection?this.toggleSelection(e):this.replaceSelection(e):"toggle"===this.selectionBehavior||t&&("touch"===t.pointerType||"virtual"===t.pointerType)?this.toggleSelection(e):this.replaceSelection(e))}isSelectionEqual(e){if(e===this.state.selectedKeys)return!0;let t=this.selectedKeys;if(e.size!==t.size)return!1;for(let i of e)if(!t.has(i))return!1;for(let i of t)if(!e.has(i))return!1;return!0}canSelectItem(e){return this.canSelectItemIn(e,this.collection)}canSelectItemIn(e,t){if("none"===this.state.selectionMode||this.state.disabledKeys.has(e))return!1;let i=t.getItem(e);return!(!i||i?.props?.isDisabled)&&("cell"!==i.type||!!this.allowsCellSelection)}isDisabled(e){return"all"===this.state.disabledBehavior&&(this.state.disabledKeys.has(e)||!!this.collection.getItem(e)?.props?.isDisabled)}isLink(e){return!!this.collection.getItem(e)?.props?.href}getItemProps(e){return this.collection.getItem(e)?.props}withCollection(e){return new n(e,this.state,{allowsCellSelection:this.allowsCellSelection,layoutDelegate:this.layoutDelegate||void 0,fullCollection:this.fullCollection??this.collection})}}},82722(e,t,i){i.d(t,{R:()=>o});var s=i(50756),l=i(59155),n=i(14041);function o(e){let{selectionMode:t="none",disallowEmptySelection:i=!1,allowDuplicateSelectionEvents:o,selectionBehavior:a="toggle",disabledBehavior:h="all"}=e,d=(0,n.useRef)(!1),[,u]=(0,n.useState)(!1),c=(0,n.useRef)(null),y=(0,n.useRef)(null),[,g]=(0,n.useState)(null),p=(0,n.useMemo)(()=>r(e.selectedKeys),[e.selectedKeys]),f=(0,n.useMemo)(()=>r(e.defaultSelectedKeys,new(0,s.L)),[e.defaultSelectedKeys]),[m,w]=(0,l.P)(p,f,e.onSelectionChange),v=(0,n.useMemo)(()=>e.disabledKeys?new Set(e.disabledKeys):new Set,[e.disabledKeys]),[S,K]=(0,n.useState)(a);"replace"===a&&"toggle"===S&&"object"==typeof m&&0===m.size&&K("replace");let b=(0,n.useRef)(a);return(0,n.useEffect)(()=>{a!==b.current&&(K(a),b.current=a)},[a]),{selectionMode:t,disallowEmptySelection:i,selectionBehavior:S,setSelectionBehavior:K,get isFocused(){return d.current},setFocused(e){d.current=e,u(e)},get focusedKey(){return c.current},get childFocusStrategy(){return y.current},setFocusedKey(e,t="first"){c.current=e,y.current=t,g(e)},selectedKeys:m,setSelectedKeys(e){(o||!function(e,t){if(e.size!==t.size)return!1;for(let i of e)if(!t.has(i))return!1;return!0}(e,m))&&w(e)},disabledKeys:v,disabledBehavior:h}}function r(e,t){return e?"all"===e?"all":new(0,s.L)(e):t}},61373(e,t,i){i.d(t,{g:()=>o});var s=i(7553),l=i(59155),n=i(14041);function o(e){let t=function(e){let[t,i]=(0,l.P)(e.selectedKey,e.defaultSelectedKey??null,e.onSelectionChange),o=(0,n.useMemo)(()=>null!=t?[t]:[],[t]),{collection:r,disabledKeys:a,selectionManager:h}=(0,s.p)({...e,selectionMode:"single",disallowEmptySelection:!0,allowDuplicateSelectionEvents:!0,selectedKeys:o,onSelectionChange:s=>{if("all"===s)return;let l=s.values().next().value??null;l===t&&e.onSelectionChange&&e.onSelectionChange(l),i(l)}}),d=null!=t?r.getItem(t):null;return{collection:r,disabledKeys:a,selectionManager:h,selectedKey:t,setSelectedKey:i,selectedItem:d}}({...e,onSelectionChange:e.onSelectionChange?t=>{null!=t&&e.onSelectionChange?.(t)}:void 0,suppressTextValueWarning:!0,defaultSelectedKey:e.defaultSelectedKey??r(e.collection,e.disabledKeys?new Set(e.disabledKeys):new Set)??void 0}),{selectionManager:i,collection:o,selectedKey:a}=t,h=(0,n.useRef)(a);return(0,n.useEffect)(()=>{let s=a;null==e.selectedKey&&(i.isEmpty||null==s||!o.getItem(s))&&null!=(s=r(o,t.disabledKeys))&&i.setSelectedKeys([s]),(null==s||null!=i.focusedKey)&&(i.isFocused||s===h.current)||i.setFocusedKey(s),h.current=s}),{...t,isDisabled:e.isDisabled||!1}}function r(e,t){let i=null;if(e){for(i=e.getFirstKey();null!=i&&(t.has(i)||e.getItem(i)?.props?.isDisabled)&&i!==e.getLastKey();)i=e.getKeyAfter(i);null!=i&&(t.has(i)||e.getItem(i)?.props?.isDisabled)&&i===e.getLastKey()&&(i=e.getFirstKey())}return i}},59344(e,t,i){i.d(t,{Vv:()=>o,oS:()=>n});var s=i(14041),l=i(58139);function n(e){let t=(0,s.useCallback)(t=>e.subscribe(t),[e]),i=(0,s.useCallback)(()=>e.visibleToasts,[e]);return{visibleToasts:(0,l.useSyncExternalStore)(t,i,i),add:(t,i)=>e.add(t,i),close:t=>e.close(t),pauseAll:()=>e.pauseAll(),resumeAll:()=>e.resumeAll()}}class o{constructor(e){this.queue=[],this.subscriptions=new Set,this.visibleToasts=[],this.maxVisibleToasts=e?.maxVisibleToasts??1/0,this.wrapUpdate=e?.wrapUpdate}runWithWrapUpdate(e,t){this.wrapUpdate?this.wrapUpdate(e,t):e()}subscribe(e){return this.subscriptions.add(e),()=>this.subscriptions.delete(e)}add(e,t={}){let i="_"+Math.random().toString(36).slice(2),s={...t,content:e,key:i,timer:t.timeout?new r(()=>this.close(i),t.timeout):void 0};return this.queue.unshift(s),this.updateVisibleToasts("add"),i}close(e){let t=this.queue.findIndex(t=>t.key===e);t>=0&&(this.queue[t].onClose?.(),this.queue.splice(t,1)),this.updateVisibleToasts("remove")}updateVisibleToasts(e){this.visibleToasts=this.queue.slice(0,this.maxVisibleToasts),this.runWithWrapUpdate(()=>{for(let e of this.subscriptions)e()},e)}pauseAll(){for(let e of this.visibleToasts)e.timer&&e.timer.pause()}resumeAll(){for(let e of this.visibleToasts)e.timer&&e.timer.resume()}clear(){this.queue=[],this.updateVisibleToasts("clear")}}class r{constructor(e,t){this.startTime=null,this.remaining=t,this.callback=e}reset(e){this.remaining=e,this.resume()}pause(){null!=this.timerId&&(clearTimeout(this.timerId),this.timerId=null,this.remaining-=Date.now()-this.startTime)}resume(){this.remaining<=0||(this.startTime=Date.now(),this.timerId=setTimeout(()=>{this.timerId=null,this.remaining=0,this.callback()},this.remaining))}}},9357(e,t,i){i.d(t,{p:()=>h});var s=i(56345);class l{constructor(e,{expandedKeys:t}={}){this.keyMap=new Map,this.firstKey=null,this.lastKey=null,this.iterable=e,t=t||new Set;let i=e=>{if(this.keyMap.set(e.key,e),e.childNodes&&("section"===e.type||t.has(e.key)))for(let t of e.childNodes)i(t)};for(let t of e)i(t);let s=null,l=0;for(let[e,t]of this.keyMap)s?(s.nextKey=e,t.prevKey=s.key):(this.firstKey=e,t.prevKey=void 0),"item"===t.type&&(t.index=l++),(s=t).nextKey=void 0;this.lastKey=s?.key??null}*[Symbol.iterator](){yield*this.iterable}get size(){return this.keyMap.size}getKeys(){return this.keyMap.keys()}getKeyBefore(e){let t=this.keyMap.get(e);return t?t.prevKey??null:null}getKeyAfter(e){let t=this.keyMap.get(e);return t?t.nextKey??null:null}getFirstKey(){return this.firstKey}getLastKey(){return this.lastKey}getItem(e){return this.keyMap.get(e)??null}at(e){let t=[...this.getKeys()];return this.getItem(t[e])}}var n=i(70408),o=i(59155),r=i(82722),a=i(14041);function h(e){let{onExpandedChange:t}=e,[i,h]=(0,o.P)(e.expandedKeys?new Set(e.expandedKeys):void 0,e.defaultExpandedKeys?new Set(e.defaultExpandedKeys):new Set,t),d=(0,r.R)(e),u=(0,a.useMemo)(()=>e.disabledKeys?new Set(e.disabledKeys):new Set,[e.disabledKeys]),c=(0,n.G)(e,(0,a.useCallback)(e=>new l(e,{expandedKeys:i}),[i]),null);return(0,a.useEffect)(()=>{null==d.focusedKey||c.getItem(d.focusedKey)||d.setFocusedKey(null)},[c,d.focusedKey]),{collection:c,expandedKeys:i,disabledKeys:u,toggleKey:e=>{var t,s;let l;h((t=i,s=e,(l=new Set(t)).has(s)?l.delete(s):l.add(s),l))},setExpandedKeys:h,selectionManager:new(0,s.Y)(c,d)}}},73858(e,t,i){i.d(t,{qE:()=>s});function s(e,t=-1/0,i=1/0){return Math.min(Math.max(e,t),i)}},59155(e,t,i){i.d(t,{P:()=>n});var s=i(14041);let l="u">typeof document?s.useInsertionEffect??s.useLayoutEffect:()=>{};function n(e,t,i){let[n,o]=(0,s.useState)(e||t),r=(0,s.useRef)(n),a=(0,s.useRef)(void 0!==e),h=void 0!==e;(0,s.useEffect)(()=>{a.current,a.current=h},[h]);let d=h?e:n;l(()=>{r.current=d});let[,u]=(0,s.useReducer)(()=>({}),{});return[d,(0,s.useCallback)((e,...t)=>{let s="function"==typeof e?e(r.current):e;Object.is(r.current,s)||(r.current=s,o(s),u(),i?.(s,...t))},[i])]}},90901(e,t,i){i.d(t,{B:()=>s});class s{constructor(e,t,i){this.type=e,this.key=t,this.parentKey=null,this.content=null,this.rect=i,this.estimatedSize=!1,this.isSticky=!1,this.opacity=1,this.transform=null,this.zIndex=0,this.allowOverflow=!1}copy(){let e=new s(this.type,this.key,this.rect.copy());return e.estimatedSize=this.estimatedSize,e.opacity=this.opacity,e.transform=this.transform,e.parentKey=this.parentKey,e.content=this.content,e.isSticky=this.isSticky,e.zIndex=this.zIndex,e.allowOverflow=this.allowOverflow,e}}},13215(e,t,i){i.d(t,{b:()=>s});class s{constructor(e=0,t=0){this.x=e,this.y=t}copy(){return new s(this.x,this.y)}equals(e){return this.x===e.x&&this.y===e.y}isOrigin(){return 0===this.x&&0===this.y}}},13377(e,t,i){i.d(t,{r:()=>l});var s=i(13215);class l{constructor(e=0,t=0,i=0,s=0){this.x=e,this.y=t,this.width=i,this.height=s}get maxX(){return this.x+this.width}get maxY(){return this.y+this.height}get area(){return this.width*this.height}get topLeft(){return new(0,s.b)(this.x,this.y)}get topRight(){return new(0,s.b)(this.maxX,this.y)}get bottomLeft(){return new(0,s.b)(this.x,this.maxY)}get bottomRight(){return new(0,s.b)(this.maxX,this.maxY)}intersects(e){return this.area>0&&e.area>0&&this.x<=e.x+e.width&&e.x<=this.x+this.width&&this.y<=e.y+e.height&&e.y<=this.y+this.height}containsRect(e){return this.x<=e.x&&this.y<=e.y&&this.maxX>=e.maxX&&this.maxY>=e.maxY}containsPoint(e){return this.x<=e.x&&this.y<=e.y&&this.maxX>=e.x&&this.maxY>=e.y}getCornerInRect(e){for(let t of["topLeft","topRight","bottomLeft","bottomRight"])if(e.containsPoint(this[t]))return t;return null}equals(e){return e.x===this.x&&e.y===this.y&&e.width===this.width&&e.height===this.height}pointEquals(e){return this.x===e.x&&this.y===e.y}sizeEquals(e){return this.width===e.width&&this.height===e.height}union(e){let t=Math.min(this.x,e.x),i=Math.min(this.y,e.y),s=Math.max(this.maxX,e.maxX)-t,n=Math.max(this.maxY,e.maxY)-i;return new l(t,i,s,n)}intersection(e){if(!this.intersects(e))return new l(0,0,0,0);let t=Math.max(this.x,e.x),i=Math.max(this.y,e.y);return new l(t,i,Math.min(this.maxX,e.maxX)-t,Math.min(this.maxY,e.maxY)-i)}copy(){return new l(this.x,this.y,this.width,this.height)}}},35616(e,t,i){i.d(t,{o:()=>s});class s{constructor(e=0,t=0){this.width=Math.max(e,0),this.height=Math.max(t,0)}copy(){return new s(this.width,this.height)}equals(e){return this.width===e.width&&this.height===e.height}get area(){return this.width*this.height}}},1564(e,t,i){i.d(t,{E:()=>g});var s=i(13377),l=i(35616);let n=0;class o{constructor(e,t){this.virtualizer=e,this.key=++n,this.viewType=t,this.children=new Set,this.reusableViews=new Map,this.layoutInfo=null,this.content=null,this.rendered=null}prepareForReuse(){this.content=null,this.rendered=null,this.layoutInfo=null}getReusableView(e){let t=this.reusableViews.get(e);return t&&t.length>0?t.shift():new a(this.virtualizer,this,e)}reuseChild(e){e.prepareForReuse();let t=this.reusableViews.get(e.viewType);t||(t=[],this.reusableViews.set(e.viewType,t)),t.push(e)}}class r extends o{constructor(e){super(e,"root")}}class a extends o{constructor(e,t,i){super(e,i),this.parent=t}}var h=i(13215);class d{setVisibleRect(e){let t=performance.now()-this.startTime;t<500&&(e.x!==this.visibleRect.x&&t>0&&(this.velocity.x=(e.x-this.visibleRect.x)/t),e.y!==this.visibleRect.y&&t>0&&(this.velocity.y=(e.y-this.visibleRect.y)/t)),this.startTime=performance.now(),this.visibleRect=e}getOverscannedRect(){let e=this.visibleRect.copy(),t=this.visibleRect.height/3;e.height+=t,this.velocity.y<0&&(e.y-=t);let i=this.visibleRect.width/3;return e.width+=i,this.velocity.x<0&&(e.x-=i),e}constructor(){this.startTime=0,this.velocity=new(0,h.b)(0,0),this.visibleRect=new(0,s.r)}}class u{constructor(e){this.delegate=e.delegate,this.collection=e.collection,this.layout=e.layout,this.contentSize=new(0,l.o),this.visibleRect=new(0,s.r),this.size=new(0,l.o),this.persistedKeys=new Set,this._visibleViews=new Map,this._renderedContent=new WeakMap,this._rootView=new r(this),this._isScrolling=!1,this._invalidationContext={},this._overscanManager=new d}isPersistedKey(e){if(this.persistedKeys.has(e))return!0;for(let t of this.persistedKeys)for(;null!=t;){let i=this.layout.getLayoutInfo(t);if(!i||null==i.parentKey)break;if((t=i.parentKey)===e)return!0}return!1}getParentView(e){return null!=e.parentKey?this._visibleViews.get(e.parentKey):this._rootView}getReusableView(e){let t=this.getParentView(e).getReusableView(e.type);return t.layoutInfo=e,this._renderView(t),t}_renderView(e){if(e.layoutInfo){let{type:t,key:i,content:s}=e.layoutInfo;e.content=s||this.collection.getItem(i),e.rendered=this._renderContent(t,e.content)}}_renderContent(e,t){let i=null!=t?this._renderedContent.get(t):null;if(null!=i)return i;let s=this.delegate.renderView(e,t);return t&&this._renderedContent.set(t,s),s}keyAtPoint(e){let t=new(0,s.r)(e.x,e.y,1,1);for(let e of 0===t.area?[]:this.layout.getVisibleLayoutInfos(t))if(e.rect.intersects(t))return e.key;return null}relayout(e={}){this.layout.update(e),this.contentSize=this.layout.getContentSize();let t=this.visibleRect,i=e.contentChanged?0:t.x,l=e.contentChanged?0:t.y;if(i=Math.max(0,Math.min(this.contentSize.width-t.width,i)),l=Math.max(0,Math.min(this.contentSize.height-t.height,l)),i!==t.x||l!==t.y){let e=new(0,s.r)(i,l,t.width,t.height);this.delegate.setVisibleRect(e)}else this.updateSubviews()}getVisibleLayoutInfos(){let e;e=this._overscanManager.getOverscannedRect();let t=this.layout.getVisibleLayoutInfos(e),i=new Map;for(let e of t)i.set(e.key,e);return i}updateSubviews(){let e=this.getVisibleLayoutInfos(),t=new Set;for(let[i,s]of this._visibleViews){let l=e.get(i);l&&s.parent===this.getParentView(l)||(this._visibleViews.delete(i),s.parent.reuseChild(s),t.add(s))}for(let[i,s]of e){let e=this._visibleViews.get(i);if(e){e.layoutInfo=s;let t=this.collection.getItem(s.key);e.content!==t&&(null!=e.content&&this._renderedContent.delete(e.content),this._renderView(e))}else(e=this.getReusableView(s)).parent.children.add(e),this._visibleViews.set(i,e),t.delete(e)}for(let e of t)e.parent.children.delete(e),e.parent.reusableViews.clear();if(!this._isScrolling)for(let t of e.keys()){let e=this._visibleViews.get(t);e.parent.children.delete(e),e.parent.children.add(e)}}render(e){let t=!1,i=!1,l=!1,n=!1,o=!1,r=!1;if(e.collection!==this.collection&&(this.collection=e.collection,t=!0),(e.layout!==this.layout||this.layout.virtualizer!==this)&&(this.layout&&(this.layout.virtualizer=null),e.layout.virtualizer=this,this.layout=e.layout,t=!0),e.persistedKeys&&!function(e,t){if(e===t)return!0;if(e.size!==t.size)return!1;for(let i of e)if(!t.has(i))return!1;return!0}(e.persistedKeys,this.persistedKeys)&&(this.persistedKeys=e.persistedKeys,r=!0),!this.visibleRect.equals(e.visibleRect)||!this.size.equals(e.size)){this._overscanManager.setVisibleRect(e.visibleRect);let n=new(0,s.r)(this.visibleRect.x,this.visibleRect.y,this.size.width,this.size.height),o=new(0,s.r)(e.visibleRect.x,e.visibleRect.y,e.size.width,e.size.height);this.layout.shouldInvalidate(o,n)?(i=!e.visibleRect.pointEquals(this.visibleRect),l=!this.size.equals(e.size),t=!0):r=!0,this.visibleRect=e.visibleRect,this.size=e.size}return e.invalidationContext!==this._invalidationContext&&(e.invalidationContext&&(l||=e.invalidationContext.sizeChanged||!1,i||=e.invalidationContext.offsetChanged||!1,n||=e.invalidationContext.itemSizeChanged||!1,o||=null!=e.invalidationContext.layoutOptions&&null!=this._invalidationContext.layoutOptions&&e.invalidationContext.layoutOptions!==this._invalidationContext.layoutOptions&&this.layout.shouldInvalidateLayoutOptions(e.invalidationContext.layoutOptions,this._invalidationContext.layoutOptions),t||=n||l||i||o),this._invalidationContext=e.invalidationContext),e.isScrolling!==this._isScrolling&&(this._isScrolling=e.isScrolling,e.isScrolling||(r=!0)),t?this.relayout({offsetChanged:i,sizeChanged:l,itemSizeChanged:n,layoutOptionsChanged:o,layoutOptions:this._invalidationContext.layoutOptions}):r&&this.updateSubviews(),Array.from(this._rootView.children)}getVisibleView(e){return this._visibleViews.get(e)}invalidate(e){this.delegate.invalidate(e)}updateItemSize(e,t){!this.layout.updateItemSize||this.layout.updateItemSize(e,t)&&this.invalidate({itemSizeChanged:!0})}}var c=i(14041);let y="u">typeof document?c.useLayoutEffect:()=>{};function g(e){let[t,i]=(0,c.useState)(new(0,s.r)(0,0,0,0)),[n,o]=(0,c.useState)(new(0,l.o)),[r,a]=(0,c.useState)(!1),[h,d]=(0,c.useState)({}),g=(0,c.useRef)(!1),[p]=(0,c.useState)(()=>new u({collection:e.collection,layout:e.layout,delegate:{setVisibleRect(e){i(e),g.current=!0},renderView:e.renderView,invalidate:d}}));y(()=>{g.current&&(g.current=!1,e.onVisibleRectChange(t))});let f=(0,c.useMemo)(()=>null!=e.layoutOptions?{...h,layoutOptions:e.layoutOptions}:h,[h,e.layoutOptions]),m=p.render({layout:e.layout,collection:e.collection,persistedKeys:e.persistedKeys,layoutOptions:e.layoutOptions,visibleRect:t,size:e.allowsWindowScrolling?n:t,invalidationContext:f,isScrolling:r}),w=p.contentSize,v=(0,c.useCallback)(()=>{a(!0)},[]),S=(0,c.useCallback)(()=>{a(!1)},[]);return(0,c.useMemo)(()=>({virtualizer:p,visibleViews:m,setVisibleRect:i,size:n,setSize:o,contentSize:w,isScrolling:r,startScrolling:v,endScrolling:S}),[p,m,i,n,o,w,r,v,S])}}}]);
|
|
2
|
-
//# sourceMappingURL=module-react-stately.
|
|
1
|
+
"use strict";(self.webpackChunktechdocs_cli_embedded_app=self.webpackChunktechdocs_cli_embedded_app||[]).push([["7762"],{20934(e,t,i){i.d(t,{r:()=>n});var s=i(59155),l=i(14041);function n(e){let{onInputChange:t,inputValue:i,defaultInputValue:n=""}=e,[o,r]=(0,l.useState)(null),[a,h]=(0,s.P)(i,n,e=>{t&&t(e)});return{inputValue:a,setInputValue:h,focusedNodeId:o,setFocusedNodeId:r}}},95226(e,t,i){function s(e,t){return"function"==typeof t.getChildren?t.getChildren(e.key):e.childNodes}function l(e){return n(e,0)}function n(e,t){if(t<0)return;let i=0;for(let s of e){if(i===t)return s;i++}}function o(e){let t;for(let i of e)t=i;return t}function r(e,t,i){if(t.parentKey===i.parentKey)return t.index-i.index;let s=[...a(e,t),t],l=[...a(e,i),i],n=s.slice(0,l.length).findIndex((e,t)=>e!==l[t]);return -1!==n?(t=s[n],i=l[n],t.index-i.index):s.findIndex(e=>e===i)>=0?1:(l.findIndex(e=>e===t),-1)}function a(e,t){let i=[],s=t;for(;s?.parentKey!=null;)(s=e.getItem(s.parentKey))&&i.unshift(s);return i}i.d(t,{W:()=>o,cj:()=>n,iQ:()=>s,o3:()=>r,ue:()=>l})},35955(e,t,i){i.d(t,{v:()=>n});var s=i(95226);let l=new WeakMap;function n(e){let t=l.get(e);if(null!=t)return t;let i=0,n=t=>{for(let l of t)"section"===l.type?n((0,s.iQ)(l,e)):"item"===l.type&&i++};return n(e),l.set(e,i),i}},70408(e,t,i){i.d(t,{G:()=>r});var s=i(14041);class l{build(e,t){return this.context=t,n(()=>this.iterateCollection(e))}*iterateCollection(e){let{children:t,items:i}=e;if(s.isValidElement(t)&&t.type===s.Fragment)yield*this.iterateCollection({children:t.props.children,items:i});else if("function"==typeof t){if(!i)throw Error("props.children was a function but props.items is missing");let e=0;for(let s of i)yield*this.getFullNode({value:s,index:e},{renderer:t}),e++}else{let e=[];s.Children.forEach(t,t=>{t&&e.push(t)});let i=0;for(let t of e)for(let e of this.getFullNode({element:t,index:i},{}))i++,yield e}}getKey(e,t,i,s){if(null!=e.key)return e.key;if("cell"===t.type&&null!=t.key)return`${s}${t.key}`;let l=t.value;if(null!=l){let e=l.key??l.id;if(null==e)throw Error("No key found for item");return e}return s?`${s}.${t.index}`:`$.${t.index}`}getChildState(e,t){return{renderer:t.renderer||e.renderer}}*getFullNode(e,t,i,l){if(s.isValidElement(e.element)&&e.element.type===s.Fragment){let n=[];s.Children.forEach(e.element.props.children,e=>{n.push(e)});let o=e.index??0;for(let e of n)yield*this.getFullNode({element:e,index:o++},t,i,l);return}let r=e.element;if(!r&&e.value&&t&&t.renderer){let i=this.cache.get(e.value);if(i&&(!i.shouldInvalidate||!i.shouldInvalidate(this.context))){i.index=e.index,i.parentKey=l?l.key:null,yield i;return}r=t.renderer(e.value)}if(s.isValidElement(r)){let s=r.type;if("function"!=typeof s&&"function"!=typeof s.getCollectionNode){let e=r.type;throw Error(`Unknown element <${e}> in collection.`)}let n=s.getCollectionNode(r.props,this.context),a=e.index??0,h=n.next();for(;!h.done&&h.value;){let s=h.value;e.index=a;let u=s.key??null;null==u&&(u=s.element?null:this.getKey(r,e,t,i));let d=[...this.getFullNode({...s,key:u,index:a,wrapper:function(e,t){return e&&t?i=>e(t(i)):e||t||void 0}(e.wrapper,s.wrapper)},this.getChildState(t,s),i?`${i}${r.key}`:r.key,l)];for(let t of d){if(t.value=s.value??e.value??null,t.value&&this.cache.set(t.value,t),e.type&&t.type!==e.type)throw Error(`Unsupported type <${o(t.type)}> in <${o(l?.type??"unknown parent type")}>. Only <${o(e.type)}> is supported.`);a++,yield t}h=n.next(d)}return}if(null==e.key||null==e.type)return;let a=this,h={type:e.type,props:e.props,key:e.key,parentKey:l?l.key:null,value:e.value??null,level:(l?.level??0)+ +(l?.type==="item"),index:e.index,rendered:e.rendered,textValue:e.textValue??"","aria-label":e["aria-label"],wrapper:e.wrapper,shouldInvalidate:e.shouldInvalidate,hasChildNodes:e.hasChildNodes||!1,childNodes:n(function*(){if(!e.hasChildNodes||!e.childNodes)return;let i=0;for(let s of e.childNodes())for(let e of(null!=s.key&&(s.key=`${h.key}${s.key}`),a.getFullNode({...s,index:i},a.getChildState(t,s),h.key,h)))i++,yield e})};yield h}constructor(){this.cache=new WeakMap}}function n(e){let t=[],i=null;return{*[Symbol.iterator](){for(let e of t)yield e;for(let s of(i||(i=e()),i))t.push(s),yield s}}}function o(e){return e[0].toUpperCase()+e.slice(1)}function r(e,t,i){let n=(0,s.useMemo)(()=>new l,[]),{children:o,items:r,collection:a}=e;return(0,s.useMemo)(()=>a||t(n.build({children:o,items:r},i)),[n,o,r,a,i,t])}},30419(e,t,i){i.d(t,{r:()=>n});var s=i(59155),l=i(14041);function n(e){let{allowsMultipleExpanded:t=!1,isDisabled:i=!1}=e,[n,o]=(0,s.P)((0,l.useMemo)(()=>e.expandedKeys?new Set(e.expandedKeys):void 0,[e.expandedKeys]),(0,l.useMemo)(()=>e.defaultExpandedKeys?new Set(e.defaultExpandedKeys):new Set,[e.defaultExpandedKeys]),e.onExpandedChange);return(0,l.useEffect)(()=>{if(!t&&n.size>1){let e=n.values().next().value;null!=e&&o(new Set([e]))}}),{allowsMultipleExpanded:t,isDisabled:i,expandedKeys:n,setExpandedKeys:o,toggleKey(e){let i;t?(i=new Set(n)).has(e)?i.delete(e):i.add(e):i=new Set(n.has(e)?[]:[e]),o(i)}}}},86306(e,t,i){i.d(t,{E:()=>n});var s=i(59155),l=i(14041);function n(e){let[t,i]=(0,s.P)(e.isExpanded,e.defaultExpanded||!1,e.onExpandedChange),n=(0,l.useCallback)(()=>{i(!0)},[i]),o=(0,l.useCallback)(()=>{i(!1)},[i]),r=(0,l.useCallback)(()=>{i(!t)},[i,t]);return{isExpanded:t,setExpanded:i,expand:n,collapse:o,toggle:r}}},17876(e,t,i){i.d(t,{Nf:()=>s});function s(){return!1}},73465(e,t,i){i.d(t,{KZ:()=>h,Lf:()=>a,YD:()=>o});var s=i(14041);let l={badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valueMissing:!1,valid:!0},n={...l,customError:!0,valid:!1},o={isInvalid:!1,validationDetails:l,validationErrors:[]},r=(0,s.createContext)({}),a="__reactAriaFormValidationState";function h(e){if(e[a]){let{realtimeValidation:t,displayValidation:i,updateValidation:s,resetValidation:l,commitValidation:n}=e[a];return{realtimeValidation:t,displayValidation:i,updateValidation:s,resetValidation:l,commitValidation:n}}return function(e){let{isInvalid:t,validationState:i,name:l,value:a,builtinValidation:h,validate:y,validationBehavior:g="aria"}=e;i&&(t||="invalid"===i);let p=void 0!==t?{isInvalid:t,validationErrors:[],validationDetails:n}:null,f=(0,s.useMemo)(()=>y&&null!=a?d(function(e,t){if("function"==typeof e){let i=e(t);if(i&&"boolean"!=typeof i)return u(i)}return[]}(y,a)):null,[y,a]);h?.validationDetails.valid&&(h=void 0);let m=(0,s.useContext)(r),v=(0,s.useMemo)(()=>l?Array.isArray(l)?l.flatMap(e=>u(m[e])):u(m[l]):[],[m,l]),[w,S]=(0,s.useState)(m),[K,b]=(0,s.useState)(!1);m!==w&&(S(m),b(!1));let z=(0,s.useMemo)(()=>d(K?[]:v),[K,v]),x=(0,s.useRef)(o),[I,k]=(0,s.useState)(o),R=(0,s.useRef)(o),[C,M]=(0,s.useState)(!1);return(0,s.useEffect)(()=>{if(!C)return;M(!1);let e=f||h||x.current;c(e,R.current)||(R.current=e,k(e))}),{realtimeValidation:p||z||f||h||o,displayValidation:"native"===g?p||z||I:p||z||f||h||I,updateValidation(e){"aria"!==g||c(I,e)?x.current=e:k(e)},resetValidation(){c(o,R.current)||(R.current=o,k(o)),"native"===g&&M(!1),b(!0)},commitValidation(){"native"===g&&M(!0),b(!0)}}}(e)}function u(e){return e?Array.isArray(e)?e:[e]:[]}function d(e){return e.length?{isInvalid:!0,validationErrors:e,validationDetails:n}:null}function c(e,t){return e===t||!!e&&!!t&&e.isInvalid===t.isInvalid&&e.validationErrors.length===t.validationErrors.length&&e.validationErrors.every((e,i)=>e===t.validationErrors[i])&&Object.entries(e.validationDetails).every(([e,i])=>t.validationDetails[e]===i)}},68501(e,t,i){i.d(t,{$:()=>a});var s=i(95226);class l{shouldInvalidate(e,t){return e.width!==t.width||e.height!==t.height}shouldInvalidateLayoutOptions(e,t){return e!==t}update(e){}getItemRect(e){return this.getLayoutInfo(e)?.rect??null}getVisibleRect(){return this.virtualizer.visibleRect}constructor(){this.virtualizer=null}}var n=i(90901),o=i(13377),r=i(35616);class a extends l{constructor(e={}){super(),this.rowSize=e?.rowSize??e?.rowHeight??null,this.orientation=e.orientation??"vertical",this.estimatedRowSize=e?.estimatedRowSize??e?.estimatedRowHeight??null,this.headingSize=e?.headingSize??e?.headingHeight??null,this.estimatedHeadingSize=e?.estimatedHeadingSize??e?.estimatedHeadingHeight??null,this.loaderSize=e?.loaderSize??e?.loaderHeight??null,this.dropIndicatorThickness=e.dropIndicatorThickness||2,this.gap=e.gap||0,this.padding=e.padding||0,this.layoutNodes=new Map,this.rootNodes=[],this.lastCollection=null,this.invalidateEverything=!1,this.validRect=new(0,o.r),this.requestedRect=new(0,o.r),this.contentSize=new(0,r.o)}get collection(){return this.virtualizer.collection}get rowHeight(){return this.rowSize}get estimatedRowHeight(){return this.estimatedRowSize}get headingHeight(){return this.headingSize}get estimatedHeadingHeight(){return this.estimatedHeadingSize}get loaderHeight(){return this.loaderSize}getLayoutInfo(e){return this.ensureLayoutInfo(e),this.layoutNodes.get(e)?.layoutInfo||null}getVisibleLayoutInfos(e){let t="horizontal"===this.orientation?"x":"y",i="horizontal"===this.orientation?"width":"height";if(e[i]>1){let s=(this.rowSize??this.estimatedRowSize??48)+this.gap,l=Math.floor((e=e.copy())[t]/s)*s,n=e[i]+e[t]-l;e[t]=l,e[i]=Math.ceil(n/s)*s}this.layoutIfNeeded(e);let s=[],l=t=>{for(let i of t)this.isVisible(i,e)&&(s.push(i.layoutInfo),i.children&&l(i.children))};return l(this.rootNodes),s}layoutIfNeeded(e){if(this.lastCollection){for(let t of(this.requestedRect.containsRect(e)||(this.requestedRect=this.requestedRect.union(e),this.rootNodes=this.buildCollection()),this.virtualizer.persistedKeys))if(this.ensureLayoutInfo(t))return}}ensureLayoutInfo(e){return!this.layoutNodes.has(e)&&this.requestedRect.area<this.contentSize.area&&!!this.lastCollection&&(this.requestedRect=new(0,o.r)(0,0,1/0,1/0),this.rootNodes=this.buildCollection(),this.requestedRect=new(0,o.r)(0,0,this.contentSize.width,this.contentSize.height),!0)}isVisible(e,t){return e.layoutInfo.rect.intersects(t)||e.layoutInfo.isSticky||"header"===e.layoutInfo.type||"loader"===e.layoutInfo.type||this.virtualizer.isPersistedKey(e.layoutInfo.key)}shouldInvalidateEverything(e){let t=e.layoutOptions;return e.sizeChanged||this.rowSize!==(t?.rowSize??t?.rowHeight??this.rowSize)||this.orientation!==(t?.orientation??this.orientation)||this.headingSize!==(t?.headingSize??t?.headingHeight??this.headingSize)||this.loaderSize!==(t?.loaderSize??t?.loaderHeight??this.loaderSize)||this.gap!==(t?.gap??this.gap)||this.padding!==(t?.padding??this.padding)}shouldInvalidateLayoutOptions(e,t){return(e?.rowSize??e?.rowHeight)!==(t?.rowSize??t?.rowHeight)||e.orientation!==t.orientation||(e?.estimatedRowSize??e?.estimatedRowHeight)!==(t?.estimatedRowSize??t?.estimatedRowHeight)||(e?.headingSize??e?.headingHeight)!==(t?.headingSize??t?.headingHeight)||(e?.estimatedHeadingSize??e?.estimatedHeadingHeight)!==(t?.estimatedHeadingSize??t?.estimatedHeadingHeight)||(e?.loaderSize??e?.loaderHeight)!==(t?.loaderSize??t?.loaderHeight)||e.dropIndicatorThickness!==t.dropIndicatorThickness||e.gap!==t.gap||e.padding!==t.padding}update(e){let t=this.virtualizer.collection;this.invalidateEverything=this.shouldInvalidateEverything(e),this.invalidateEverything&&(this.requestedRect=this.virtualizer.visibleRect.copy(),this.layoutNodes.clear());let i=e.layoutOptions;if(this.rowSize=i?.rowSize??i?.rowHeight??this.rowSize,this.orientation=i?.orientation??this.orientation,this.estimatedRowSize=i?.estimatedRowSize??i?.estimatedRowHeight??this.estimatedRowSize,this.headingSize=i?.headingSize??i?.headingHeight??this.headingSize,this.estimatedHeadingSize=i?.estimatedHeadingSize??i?.estimatedHeadingHeight??this.estimatedHeadingSize,this.loaderSize=i?.loaderSize??i?.loaderHeight??this.loaderSize,this.dropIndicatorThickness=i?.dropIndicatorThickness??this.dropIndicatorThickness,this.gap=i?.gap??this.gap,this.padding=i?.padding??this.padding,this.rootNodes=this.buildCollection(),this.lastCollection&&t!==this.lastCollection)for(let e of this.lastCollection.getKeys())!t.getItem(e)&&this.layoutNodes.get(e)&&this.layoutNodes.delete(e);this.lastCollection=t,this.invalidateEverything=!1,this.validRect=this.requestedRect.copy()}buildCollection(e=this.padding){let t=this.virtualizer.collection,i="horizontal"===this.orientation?"x":"y",s="horizontal"===this.orientation?"maxX":"maxY",l=function(e,t){let i=[];for(let s of e)t(s)&&i.push(s);return i}(t,e=>"content"!==e.type),n=l.filter(e=>"loader"===e.type),o=[],a=t?.size===0;for(let t of(a&&(e=0),l)){let r=(this.rowSize??this.estimatedRowSize??48)+this.gap;if("item"===t.type&&e+r<this.requestedRect[i]&&!this.isValid(t,e)){e+=r;continue}let a="horizontal"===this.orientation?this.buildChild(t,e,this.padding,null):this.buildChild(t,this.padding,e,null);if(e=a.layoutInfo.rect[s]+this.gap,o.push(a),"loader"===t.type){let e=n.indexOf(t);n.splice(e,1)}if(("item"===t.type||"loader"===t.type)&&e>this.requestedRect[s]){let i=l.indexOf(t);for(let t of n){let n=l.indexOf(t);e+=(n-i-1)*r;let a="horizontal"===this.orientation?this.buildChild(t,e,this.padding,null):this.buildChild(t,this.padding,e,null);o.push(a),e=a.layoutInfo.rect[s],i=n}e+=(l.length-i-1)*r;break}}return e=Math.max(e-this.gap,0)+(a?0:this.padding),this.contentSize="horizontal"===this.orientation?new(0,r.o)(e,this.virtualizer.size.height):new(0,r.o)(this.virtualizer.size.width,e),o}isValid(e,t){let i=this.layoutNodes.get(e.key),s="horizontal"===this.orientation?"x":"y";return!this.invalidateEverything&&!!i&&i.node===e&&t===i.layoutInfo.rect[s]&&i.layoutInfo.rect.intersects(this.validRect)&&i.validRect.containsRect(i.layoutInfo.rect.intersection(this.requestedRect))}buildChild(e,t,i,s){if(this.isValid(e,"horizontal"===this.orientation?t:i))return this.layoutNodes.get(e.key);let l=this.buildNode(e,t,i);return l.layoutInfo.parentKey=s??null,l.layoutInfo.allowOverflow=!0,this.layoutNodes.set(e.key,l),l}buildNode(e,t,i){switch(e.type){case"section":return this.buildSection(e,t,i);case"item":case"separator":return this.buildItem(e,t,i);case"header":return this.buildSectionHeader(e,t,i);case"loader":return this.buildLoader(e,t,i);default:throw Error("Unsupported node type: "+e.type)}}buildLoader(e,t,i){let s=new(0,o.r)(t,i,this.padding,0),l=new(0,n.B)(e.type,e.key,s);return"horizontal"===this.orientation?(s.height=this.virtualizer.contentSize.height-this.padding-i,s.width=e.props.isLoading?this.loaderSize??this.rowSize??this.estimatedRowSize??48:0):(s.width=this.virtualizer.contentSize.width-this.padding-t,s.height=e.props.isLoading?this.loaderSize??this.rowSize??this.estimatedRowSize??48:0),{layoutInfo:l,validRect:s.intersection(this.requestedRect)}}buildSection(e,t,i){let l=this.virtualizer.collection,r=this.virtualizer.size.width-this.padding-t,a=this.virtualizer.size.height-this.padding-i,h="horizontal"===this.orientation?new(0,o.r)(t,i,0,a):new(0,o.r)(t,i,r,0),u=new(0,n.B)(e.type,e.key,h),d="horizontal"===this.orientation?t:i,c="horizontal"===this.orientation?"x":"y",y="horizontal"===this.orientation?"maxX":"maxY",g="horizontal"===this.orientation?"width":"height",p=0,f=[];for(let n of(0,s.iQ)(e,l)){if("content"===n.type)continue;let o=(this.rowSize??this.estimatedRowSize??48)+this.gap;if(d+o<this.requestedRect[c]&&!this.isValid(e,d)){d+=o,p++;continue}let r="horizontal"===this.orientation?this.buildChild(n,d,i,u.key):this.buildChild(n,t,d,u.key);if(d=r.layoutInfo.rect[y]+this.gap,f.push(r),d>this.requestedRect[y]){d+=([...(0,s.iQ)(e,l)].length-(f.length+p))*o;break}}return d-=this.gap,h[g]=d-("horizontal"===this.orientation?t:i),{layoutInfo:u,children:f,validRect:u.rect.intersection(this.requestedRect),node:e}}buildSectionHeader(e,t,i){let s="horizontal"===this.orientation?"height":"width",l="horizontal"===this.orientation?"width":"height",r=this.virtualizer.size[s]-this.padding-("horizontal"===this.orientation?i:t),a=this.headingSize,h=!1;if(null==a){let t=this.layoutNodes.get(e.key),i=t?.layoutInfo;if(i){let n=this.virtualizer.collection.getItem(e.key),o=this.lastCollection?this.lastCollection.getItem(e.key):null;a=t.layoutInfo.rect[l],h=r!==i.rect[s]||n!==o||i.estimatedSize}else a=e.rendered?this.estimatedHeadingSize:0,h=!0}null==a&&(a=48);let u="horizontal"===this.orientation?new(0,o.r)(t,i,a,r-i):new(0,o.r)(t,i,r-t,a),d=new(0,n.B)("header",e.key,u);return d.estimatedSize=h,{layoutInfo:d,children:[],validRect:d.rect.intersection(this.requestedRect),node:e}}buildItem(e,t,i){let s="horizontal"===this.orientation?"height":"width",l="horizontal"===this.orientation?"width":"height",r=this.virtualizer.size[s]-this.padding-("horizontal"===this.orientation?i:t),a=this.rowSize,h=!1;if(null==a){let t=this.layoutNodes.get(e.key);t?(a=t.layoutInfo.rect[l],h=r!==t.layoutInfo.rect[s]||e!==t.node||t.layoutInfo.estimatedSize):(a=this.estimatedRowSize,h=!0)}null==a&&(a=48);let u="horizontal"===this.orientation?new(0,o.r)(t,i,a,r):new(0,o.r)(t,i,r,a),d=new(0,n.B)(e.type,e.key,u);return d.estimatedSize=h,{layoutInfo:d,children:[],validRect:d.rect.intersection(this.requestedRect),node:e}}updateItemSize(e,t){let i=this.layoutNodes.get(e);if(!i)return!1;let s=this.virtualizer.collection,l=i.layoutInfo,n="horizontal"===this.orientation?"x":"y",o="horizontal"===this.orientation?"width":"height";if(l.estimatedSize=!1,l.rect[o]!==t[o]){let r=l.copy();r.rect[o]=t[o],i.layoutInfo=r,this.validRect[o]=Math.min(this.validRect[o],l.rect[n]-this.validRect[n]),this.requestedRect[o]+=r.rect[o]-l.rect[o],this.updateLayoutNode(e,l,r);let a=null!=l.parentKey?s.getItem(l.parentKey):null;for(;a;)this.updateLayoutNode(a.key,l,r),a=null!=a.parentKey?s.getItem(a.parentKey):null;return!0}return!1}updateLayoutNode(e,t,i){let s=this.layoutNodes.get(e);s&&(s.validRect=s.validRect.intersection(this.validRect),s.layoutInfo===t&&(s.layoutInfo=i))}getContentSize(){return this.contentSize}getDropTargetFromPoint(e,t,i){e+=this.virtualizer.visibleRect.x,t+=this.virtualizer.visibleRect.y;let s=new(0,o.r)(e,Math.max(0,t-this.gap),1,Math.max(1,2*this.gap)),l=this.getVisibleLayoutInfos(s),n=null,r=1/0;for(let e of l){if(!e.rect.intersects(s))continue;let i=Math.min(Math.abs(e.rect.y-t),Math.abs(e.rect.maxY-t));i<r&&(r=i,n=e.key)}if(null==n||0===this.virtualizer.collection.size)return{type:"root"};let a=this.getLayoutInfo(n);if(!a)return null;let h=a.rect,u={type:"item",key:a.key,dropPosition:"on"};return i(u)?t<=h.y+10&&i({...u,dropPosition:"before"})?u.dropPosition="before":t>=h.maxY-10&&i({...u,dropPosition:"after"})&&(u.dropPosition="after"):t<=h.y+h.height/2&&i({...u,dropPosition:"before"})?u.dropPosition="before":i({...u,dropPosition:"after"})&&(u.dropPosition="after"),u}getDropTargetLayoutInfo(e){let t,i=this.getLayoutInfo(e.key);if("before"===e.dropPosition)t="horizontal"===this.orientation?new(0,o.r)(Math.max(0,i.rect.x-this.dropIndicatorThickness/2),i.rect.y,this.dropIndicatorThickness,i.rect.height):new(0,o.r)(i.rect.x,Math.max(0,i.rect.y-this.dropIndicatorThickness/2),i.rect.width,this.dropIndicatorThickness);else if("after"===e.dropPosition){let s=this.collection.getItem(e.key);if(s){let t=s.level??0,l=this.collection.getKeyAfter(e.key);for(;null!=l;){let e=this.collection.getItem(l);if(!e||e.level<=t)break;i=this.getLayoutInfo(l)||i,l=this.collection.getKeyAfter(l)}}t="horizontal"===this.orientation?new(0,o.r)(i.rect.maxX-this.dropIndicatorThickness/2,i.rect.y,this.dropIndicatorThickness,i.rect.height):new(0,o.r)(i.rect.x,i.rect.maxY-this.dropIndicatorThickness/2,i.rect.width,this.dropIndicatorThickness)}else t=i.rect;return new(0,n.B)("dropIndicator",e.key+":"+e.dropPosition,t)}}},7553(e,t,i){i.d(t,{p:()=>a,Z:()=>h});class s{constructor(e){this.keyMap=new Map,this.firstKey=null,this.lastKey=null,this.iterable=e;let t=e=>{if(this.keyMap.set(e.key,e),e.childNodes&&"section"===e.type)for(let i of e.childNodes)t(i)};for(let i of e)t(i);let i=null,s=0,l=0;for(let[e,t]of this.keyMap)i?(i.nextKey=e,t.prevKey=i.key):(this.firstKey=e,t.prevKey=void 0),"item"===t.type&&(t.index=s++),("section"===t.type||"item"===t.type)&&l++,(i=t).nextKey=void 0;this._size=l,this.lastKey=i?.key??null}*[Symbol.iterator](){yield*this.iterable}get size(){return this._size}getKeys(){return this.keyMap.keys()}getKeyBefore(e){let t=this.keyMap.get(e);return t?t.prevKey??null:null}getKeyAfter(e){let t=this.keyMap.get(e);return t?t.nextKey??null:null}getFirstKey(){return this.firstKey}getLastKey(){return this.lastKey}getItem(e){return this.keyMap.get(e)??null}at(e){let t=[...this.getKeys()];return this.getItem(t[e])}getChildren(e){let t=this.keyMap.get(e);return t?.childNodes||[]}}var l=i(82722),n=i(56345),o=i(70408),r=i(14041);function a(e){let{filter:t,layoutDelegate:i}=e,a=(0,l.R)(e),h=(0,r.useMemo)(()=>e.disabledKeys?new Set(e.disabledKeys):new Set,[e.disabledKeys]),d=(0,r.useCallback)(e=>new s(t?t(e):e),[t]),c=(0,r.useMemo)(()=>({suppressTextValueWarning:e.suppressTextValueWarning}),[e.suppressTextValueWarning]),y=(0,o.G)(e,d,c),g=(0,r.useMemo)(()=>new(0,n.Y)(y,a,{layoutDelegate:i}),[y,a,i]);return u(y,g),{collection:y,disabledKeys:h,selectionManager:g}}function h(e,t){let i=(0,r.useMemo)(()=>t?e.collection.filter(t):e.collection,[e.collection,t]),s=e.selectionManager.withCollection(i);return u(i,s),{collection:i,selectionManager:s,disabledKeys:e.disabledKeys}}function u(e,t){let i=(0,r.useRef)(null);(0,r.useEffect)(()=>{if(null!=t.focusedKey&&!e.getItem(t.focusedKey)&&i.current){let s=i.current.getKeyAfter(t.focusedKey),l=null;for(;null!=s;){let n=e.getItem(s);if(n&&"item"===n.type&&!t.isDisabled(s)){l=s;break}s=i.current.getKeyAfter(s)}if(null==l)for(s=i.current.getKeyBefore(t.focusedKey);null!=s;){let n=e.getItem(s);if(n&&"item"===n.type&&!t.isDisabled(s)){l=s;break}s=i.current.getKeyBefore(s)}t.setFocusedKey(l)}i.current=e},[e,t])}},95432(e,t,i){i.d(t,{I:()=>n});var s=i(57139),l=i(14041);function n(e){let t=(0,s.T)(e),[i,n]=(0,l.useState)(null),[o,r]=(0,l.useState)([]);return{focusStrategy:i,...t,open(e=null){n(e),t.open()},toggle(e=null){n(e),t.toggle()},close(){r([]),t.close()},expandedKeysStack:o,openSubmenu:(e,t)=>{r(i=>t>i.length?i:[...i.slice(0,t),e])},closeSubmenu:(e,t)=>{r(i=>i[t]===e?i.slice(0,t):i)}}}},57139(e,t,i){i.d(t,{T:()=>n});var s=i(59155),l=i(14041);function n(e){let[t,i]=(0,s.P)(e.isOpen,e.defaultOpen||!1,e.onOpenChange),n=(0,l.useCallback)(()=>{i(!0)},[i]),o=(0,l.useCallback)(()=>{i(!1)},[i]),r=(0,l.useCallback)(()=>{i(!t)},[i,t]);return{isOpen:t,setOpen:i,open:n,close:o,toggle:r}}},34862(e,t,i){i.d(t,{V:()=>l});var s=i(59155);function l(e){let[t,i]=(0,s.P)(n(e.value),n(e.defaultValue)||"",e.onChange);return{value:t,setValue:i}}function n(e){if(null!=e)return e.toString()}},50756(e,t,i){i.d(t,{L:()=>s});class s extends Set{constructor(e,t,i){super(e),e instanceof s?(this.anchorKey=t??e.anchorKey,this.currentKey=i??e.currentKey):(this.anchorKey=t??null,this.currentKey=i??null)}}},56345(e,t,i){i.d(t,{Y:()=>n});var s=i(95226),l=i(50756);class n{constructor(e,t,i){this.collection=e,this.state=t,this.allowsCellSelection=i?.allowsCellSelection??!1,this._isSelectAll=null,this.layoutDelegate=i?.layoutDelegate||null,this.fullCollection=i?.fullCollection||null}get selectionMode(){return this.state.selectionMode}get disallowEmptySelection(){return this.state.disallowEmptySelection}get selectionBehavior(){return this.state.selectionBehavior}setSelectionBehavior(e){this.state.setSelectionBehavior(e)}get isFocused(){return this.state.isFocused}setFocused(e){this.state.setFocused(e)}get focusedKey(){return this.state.focusedKey}get childFocusStrategy(){return this.state.childFocusStrategy}setFocusedKey(e,t){(null==e||this.collection.getItem(e))&&this.state.setFocusedKey(e,t)}get selectedKeys(){return"all"===this.state.selectedKeys?new Set(this.getSelectAllKeys()):this.state.selectedKeys}get rawSelection(){return this.state.selectedKeys}isSelected(e){if("none"===this.state.selectionMode)return!1;let t=this.getKey(e);return null!=t&&("all"===this.state.selectedKeys?this.canSelectItem(t):this.state.selectedKeys.has(t))}get isEmpty(){return"all"!==this.state.selectedKeys&&0===this.state.selectedKeys.size}get isSelectAll(){if(this.isEmpty)return!1;if("all"===this.state.selectedKeys)return!0;if(null!=this._isSelectAll)return this._isSelectAll;let e=this.getSelectAllKeys(),t=this.state.selectedKeys;return this._isSelectAll=e.every(e=>t.has(e)),this._isSelectAll}get firstSelectedKey(){let e=null;for(let t of this.state.selectedKeys){let i=this.collection.getItem(t);(!e||i&&0>(0,s.o3)(this.collection,i,e))&&(e=i)}return e?.key??null}get lastSelectedKey(){let e=null;for(let t of this.state.selectedKeys){let i=this.collection.getItem(t);(!e||i&&(0,s.o3)(this.collection,i,e)>0)&&(e=i)}return e?.key??null}get disabledKeys(){return this.state.disabledKeys}get disabledBehavior(){return this.state.disabledBehavior}extendSelection(e){let t;if("none"===this.selectionMode)return;if("single"===this.selectionMode)return void this.replaceSelection(e);let i=this.getKey(e);if(null!=i){if("all"===this.state.selectedKeys)t=new(0,l.L)([i],i,i);else{let e=this.state.selectedKeys,s=e.anchorKey??i;for(let n of(t=new(0,l.L)(e,s,i),this.getKeyRange(s,e.currentKey??i)))t.delete(n);for(let e of this.getKeyRange(i,s))this.canSelectItem(e)&&t.add(e)}this.state.setSelectedKeys(t)}}getKeyRange(e,t){let i=this.collection.getItem(e),l=this.collection.getItem(t);return i&&l?0>=(0,s.o3)(this.collection,i,l)?this.getKeyRangeInternal(e,t):this.getKeyRangeInternal(t,e):[]}getKeyRangeInternal(e,t){if(this.layoutDelegate?.getKeyRange)return this.layoutDelegate.getKeyRange(e,t);let i=[],s=e;for(;null!=s;){let e=this.collection.getItem(s);if(e&&("item"===e.type||"cell"===e.type&&this.allowsCellSelection)&&i.push(s),s===t)return i;s=this.collection.getKeyAfter(s)}return[]}getKey(e){let t=this.collection.getItem(e);if(!t||"cell"===t.type&&this.allowsCellSelection)return e;for(;t&&"item"!==t.type&&null!=t.parentKey;)t=this.collection.getItem(t.parentKey);return t&&"item"===t.type?t.key:null}toggleSelection(e){if("none"===this.selectionMode)return;if("single"===this.selectionMode&&!this.isSelected(e))return void this.replaceSelection(e);let t=this.getKey(e);if(null==t)return;let i=new(0,l.L)("all"===this.state.selectedKeys?this.getSelectAllKeys():this.state.selectedKeys);i.has(t)?i.delete(t):this.canSelectItem(t)&&(i.add(t),i.anchorKey=t,i.currentKey=t),this.disallowEmptySelection&&0===i.size||this.state.setSelectedKeys(i)}replaceSelection(e){if("none"===this.selectionMode)return;let t=this.getKey(e);if(null==t)return;let i=this.canSelectItem(t)?new(0,l.L)([t],t,t):new(0,l.L);this.state.setSelectedKeys(i)}setSelectedKeys(e){if("none"===this.selectionMode)return;let t=new(0,l.L);for(let i of e){let e=this.getKey(i);if(null!=e&&(t.add(e),"single"===this.selectionMode))break}this.state.setSelectedKeys(t)}getSelectAllKeys(){let e=this.fullCollection??this.collection,t=[],i=l=>{for(;null!=l;){if(this.canSelectItemIn(l,e)){let n=e.getItem(l);n?.type==="item"&&t.push(l),n?.hasChildNodes&&(this.allowsCellSelection||"item"!==n.type)&&i((0,s.ue)((0,s.iQ)(n,e))?.key??null)}l=e.getKeyAfter(l)}};return i(e.getFirstKey()),t}selectAll(){this.isSelectAll||"multiple"!==this.selectionMode||this.state.setSelectedKeys("all")}clearSelection(){!this.disallowEmptySelection&&("all"===this.state.selectedKeys||this.state.selectedKeys.size>0)&&this.state.setSelectedKeys(new(0,l.L))}toggleSelectAll(){this.isSelectAll?this.clearSelection():this.selectAll()}select(e,t){"none"!==this.selectionMode&&("single"===this.selectionMode?this.isSelected(e)&&!this.disallowEmptySelection?this.toggleSelection(e):this.replaceSelection(e):"toggle"===this.selectionBehavior||t&&("touch"===t.pointerType||"virtual"===t.pointerType)?this.toggleSelection(e):this.replaceSelection(e))}isSelectionEqual(e){if(e===this.state.selectedKeys)return!0;let t=this.selectedKeys;if(e.size!==t.size)return!1;for(let i of e)if(!t.has(i))return!1;for(let i of t)if(!e.has(i))return!1;return!0}canSelectItem(e){return this.canSelectItemIn(e,this.collection)}canSelectItemIn(e,t){if("none"===this.state.selectionMode||this.state.disabledKeys.has(e))return!1;let i=t.getItem(e);return!(!i||i?.props?.isDisabled)&&("cell"!==i.type||!!this.allowsCellSelection)}isDisabled(e){return"all"===this.state.disabledBehavior&&(this.state.disabledKeys.has(e)||!!this.collection.getItem(e)?.props?.isDisabled)}isLink(e){return!!this.collection.getItem(e)?.props?.href}getItemProps(e){return this.collection.getItem(e)?.props}withCollection(e){return new n(e,this.state,{allowsCellSelection:this.allowsCellSelection,layoutDelegate:this.layoutDelegate||void 0,fullCollection:this.fullCollection??this.collection})}}},82722(e,t,i){i.d(t,{R:()=>o});var s=i(50756),l=i(59155),n=i(14041);function o(e){let{selectionMode:t="none",disallowEmptySelection:i=!1,allowDuplicateSelectionEvents:o,selectionBehavior:a="toggle",disabledBehavior:h="all"}=e,u=(0,n.useRef)(!1),[,d]=(0,n.useState)(!1),c=(0,n.useRef)(null),y=(0,n.useRef)(null),[,g]=(0,n.useState)(null),p=(0,n.useMemo)(()=>r(e.selectedKeys),[e.selectedKeys]),f=(0,n.useMemo)(()=>r(e.defaultSelectedKeys,new(0,s.L)),[e.defaultSelectedKeys]),[m,v]=(0,l.P)(p,f,e.onSelectionChange),w=(0,n.useMemo)(()=>e.disabledKeys?new Set(e.disabledKeys):new Set,[e.disabledKeys]),[S,K]=(0,n.useState)(a);"replace"===a&&"toggle"===S&&"object"==typeof m&&0===m.size&&K("replace");let b=(0,n.useRef)(a);return(0,n.useEffect)(()=>{a!==b.current&&(K(a),b.current=a)},[a]),{selectionMode:t,disallowEmptySelection:i,selectionBehavior:S,setSelectionBehavior:K,get isFocused(){return u.current},setFocused(e){u.current=e,d(e)},get focusedKey(){return c.current},get childFocusStrategy(){return y.current},setFocusedKey(e,t="first"){c.current=e,y.current=t,g(e)},selectedKeys:m,setSelectedKeys(e){(o||!function(e,t){if(e.size!==t.size)return!1;for(let i of e)if(!t.has(i))return!1;return!0}(e,m))&&v(e)},disabledKeys:w,disabledBehavior:h}}function r(e,t){return e?"all"===e?"all":new(0,s.L)(e):t}},61373(e,t,i){i.d(t,{g:()=>o});var s=i(7553),l=i(59155),n=i(14041);function o(e){let t=function(e){let[t,i]=(0,l.P)(e.selectedKey,e.defaultSelectedKey??null,e.onSelectionChange),o=(0,n.useMemo)(()=>null!=t?[t]:[],[t]),{collection:r,disabledKeys:a,selectionManager:h}=(0,s.p)({...e,selectionMode:"single",disallowEmptySelection:!0,allowDuplicateSelectionEvents:!0,selectedKeys:o,onSelectionChange:s=>{if("all"===s)return;let l=s.values().next().value??null;l===t&&e.onSelectionChange&&e.onSelectionChange(l),i(l)}}),u=null!=t?r.getItem(t):null;return{collection:r,disabledKeys:a,selectionManager:h,selectedKey:t,setSelectedKey:i,selectedItem:u}}({...e,onSelectionChange:e.onSelectionChange?t=>{null!=t&&e.onSelectionChange?.(t)}:void 0,suppressTextValueWarning:!0,defaultSelectedKey:e.defaultSelectedKey??r(e.collection,e.disabledKeys?new Set(e.disabledKeys):new Set)??void 0}),{selectionManager:i,collection:o,selectedKey:a}=t,h=(0,n.useRef)(a);return(0,n.useEffect)(()=>{let s=a;null==e.selectedKey&&(i.isEmpty||null==s||!o.getItem(s))&&null!=(s=r(o,t.disabledKeys))&&i.setSelectedKeys([s]),(null==s||null!=i.focusedKey)&&(i.isFocused||s===h.current)||i.setFocusedKey(s),h.current=s}),{...t,isDisabled:e.isDisabled||!1}}function r(e,t){let i=null;if(e){for(i=e.getFirstKey();null!=i&&(t.has(i)||e.getItem(i)?.props?.isDisabled)&&i!==e.getLastKey();)i=e.getKeyAfter(i);null!=i&&(t.has(i)||e.getItem(i)?.props?.isDisabled)&&i===e.getLastKey()&&(i=e.getFirstKey())}return i}},59344(e,t,i){i.d(t,{Vv:()=>o,oS:()=>n});var s=i(14041),l=i(58139);function n(e){let t=(0,s.useCallback)(t=>e.subscribe(t),[e]),i=(0,s.useCallback)(()=>e.visibleToasts,[e]);return{visibleToasts:(0,l.useSyncExternalStore)(t,i,i),add:(t,i)=>e.add(t,i),close:t=>e.close(t),pauseAll:()=>e.pauseAll(),resumeAll:()=>e.resumeAll()}}class o{constructor(e){this.queue=[],this.subscriptions=new Set,this.visibleToasts=[],this.maxVisibleToasts=e?.maxVisibleToasts??1/0,this.wrapUpdate=e?.wrapUpdate}runWithWrapUpdate(e,t){this.wrapUpdate?this.wrapUpdate(e,t):e()}subscribe(e){return this.subscriptions.add(e),()=>this.subscriptions.delete(e)}add(e,t={}){let i="_"+Math.random().toString(36).slice(2),s={...t,content:e,key:i,timer:t.timeout?new r(()=>this.close(i),t.timeout):void 0};return this.queue.unshift(s),this.updateVisibleToasts("add"),i}close(e){let t=this.queue.findIndex(t=>t.key===e);t>=0&&(this.queue[t].onClose?.(),this.queue.splice(t,1)),this.updateVisibleToasts("remove")}updateVisibleToasts(e){this.visibleToasts=this.queue.slice(0,this.maxVisibleToasts),this.runWithWrapUpdate(()=>{for(let e of this.subscriptions)e()},e)}pauseAll(){for(let e of this.visibleToasts)e.timer&&e.timer.pause()}resumeAll(){for(let e of this.visibleToasts)e.timer&&e.timer.resume()}clear(){this.queue=[],this.updateVisibleToasts("clear")}}class r{constructor(e,t){this.startTime=null,this.remaining=t,this.callback=e}reset(e){this.remaining=e,this.resume()}pause(){null!=this.timerId&&(clearTimeout(this.timerId),this.timerId=null,this.remaining-=Date.now()-this.startTime)}resume(){this.remaining<=0||(this.startTime=Date.now(),this.timerId=setTimeout(()=>{this.timerId=null,this.remaining=0,this.callback()},this.remaining))}}},9250(e,t,i){i.d(t,{O:()=>u});var s=i(57139),l=i(14041);let n={},o=0,r=!1,a=null,h=null;function u(e={}){let{delay:t=1500,closeDelay:i=500}=e,{isOpen:d,open:c,close:y}=(0,s.T)(e),g=(0,l.useMemo)(()=>`${++o}`,[]),p=(0,l.useRef)(null),f=(0,l.useRef)(y),m=()=>{n[g]=S},v=()=>{for(let e in n)e!==g&&(n[e](!0),delete n[e])},w=()=>{p.current&&clearTimeout(p.current),p.current=null,v(),m(),r=!0,c(),a&&(clearTimeout(a),a=null),h&&(clearTimeout(h),h=null)},S=e=>{e||i<=0?(p.current&&clearTimeout(p.current),p.current=null,f.current()):p.current||(p.current=setTimeout(()=>{p.current=null,f.current()},i)),a&&(clearTimeout(a),a=null),r&&(h&&clearTimeout(h),h=setTimeout(()=>{delete n[g],h=null,r=!1},Math.max(500,i)))};return(0,l.useEffect)(()=>{f.current=y},[y]),(0,l.useEffect)(()=>()=>{p.current&&clearTimeout(p.current),n[g]&&delete n[g]},[g]),{isOpen:d,open:e=>{e||!(t>0)||p.current?w():(v(),m(),d||r?d||w():(a&&clearTimeout(a),a=setTimeout(()=>{a=null,r=!0,w()},t)))},close:S}}},9357(e,t,i){i.d(t,{p:()=>h});var s=i(56345);class l{constructor(e,{expandedKeys:t}={}){this.keyMap=new Map,this.firstKey=null,this.lastKey=null,this.iterable=e,t=t||new Set;let i=e=>{if(this.keyMap.set(e.key,e),e.childNodes&&("section"===e.type||t.has(e.key)))for(let t of e.childNodes)i(t)};for(let t of e)i(t);let s=null,l=0;for(let[e,t]of this.keyMap)s?(s.nextKey=e,t.prevKey=s.key):(this.firstKey=e,t.prevKey=void 0),"item"===t.type&&(t.index=l++),(s=t).nextKey=void 0;this.lastKey=s?.key??null}*[Symbol.iterator](){yield*this.iterable}get size(){return this.keyMap.size}getKeys(){return this.keyMap.keys()}getKeyBefore(e){let t=this.keyMap.get(e);return t?t.prevKey??null:null}getKeyAfter(e){let t=this.keyMap.get(e);return t?t.nextKey??null:null}getFirstKey(){return this.firstKey}getLastKey(){return this.lastKey}getItem(e){return this.keyMap.get(e)??null}at(e){let t=[...this.getKeys()];return this.getItem(t[e])}}var n=i(70408),o=i(59155),r=i(82722),a=i(14041);function h(e){let{onExpandedChange:t}=e,[i,h]=(0,o.P)(e.expandedKeys?new Set(e.expandedKeys):void 0,e.defaultExpandedKeys?new Set(e.defaultExpandedKeys):new Set,t),u=(0,r.R)(e),d=(0,a.useMemo)(()=>e.disabledKeys?new Set(e.disabledKeys):new Set,[e.disabledKeys]),c=(0,n.G)(e,(0,a.useCallback)(e=>new l(e,{expandedKeys:i}),[i]),null);return(0,a.useEffect)(()=>{null==u.focusedKey||c.getItem(u.focusedKey)||u.setFocusedKey(null)},[c,u.focusedKey]),{collection:c,expandedKeys:i,disabledKeys:d,toggleKey:e=>{var t,s;let l;h((t=i,s=e,(l=new Set(t)).has(s)?l.delete(s):l.add(s),l))},setExpandedKeys:h,selectionManager:new(0,s.Y)(c,u)}}},73858(e,t,i){i.d(t,{qE:()=>s});function s(e,t=-1/0,i=1/0){return Math.min(Math.max(e,t),i)}},59155(e,t,i){i.d(t,{P:()=>n});var s=i(14041);let l="u">typeof document?s.useInsertionEffect??s.useLayoutEffect:()=>{};function n(e,t,i){let[n,o]=(0,s.useState)(e||t),r=(0,s.useRef)(n),a=(0,s.useRef)(void 0!==e),h=void 0!==e;(0,s.useEffect)(()=>{a.current,a.current=h},[h]);let u=h?e:n;l(()=>{r.current=u});let[,d]=(0,s.useReducer)(()=>({}),{});return[u,(0,s.useCallback)((e,...t)=>{let s="function"==typeof e?e(r.current):e;Object.is(r.current,s)||(r.current=s,o(s),d(),i?.(s,...t))},[i])]}},90901(e,t,i){i.d(t,{B:()=>s});class s{constructor(e,t,i){this.type=e,this.key=t,this.parentKey=null,this.content=null,this.rect=i,this.estimatedSize=!1,this.isSticky=!1,this.opacity=1,this.transform=null,this.zIndex=0,this.allowOverflow=!1}copy(){let e=new s(this.type,this.key,this.rect.copy());return e.estimatedSize=this.estimatedSize,e.opacity=this.opacity,e.transform=this.transform,e.parentKey=this.parentKey,e.content=this.content,e.isSticky=this.isSticky,e.zIndex=this.zIndex,e.allowOverflow=this.allowOverflow,e}}},13215(e,t,i){i.d(t,{b:()=>s});class s{constructor(e=0,t=0){this.x=e,this.y=t}copy(){return new s(this.x,this.y)}equals(e){return this.x===e.x&&this.y===e.y}isOrigin(){return 0===this.x&&0===this.y}}},13377(e,t,i){i.d(t,{r:()=>l});var s=i(13215);class l{constructor(e=0,t=0,i=0,s=0){this.x=e,this.y=t,this.width=i,this.height=s}get maxX(){return this.x+this.width}get maxY(){return this.y+this.height}get area(){return this.width*this.height}get topLeft(){return new(0,s.b)(this.x,this.y)}get topRight(){return new(0,s.b)(this.maxX,this.y)}get bottomLeft(){return new(0,s.b)(this.x,this.maxY)}get bottomRight(){return new(0,s.b)(this.maxX,this.maxY)}intersects(e){return this.area>0&&e.area>0&&this.x<=e.x+e.width&&e.x<=this.x+this.width&&this.y<=e.y+e.height&&e.y<=this.y+this.height}containsRect(e){return this.x<=e.x&&this.y<=e.y&&this.maxX>=e.maxX&&this.maxY>=e.maxY}containsPoint(e){return this.x<=e.x&&this.y<=e.y&&this.maxX>=e.x&&this.maxY>=e.y}getCornerInRect(e){for(let t of["topLeft","topRight","bottomLeft","bottomRight"])if(e.containsPoint(this[t]))return t;return null}equals(e){return e.x===this.x&&e.y===this.y&&e.width===this.width&&e.height===this.height}pointEquals(e){return this.x===e.x&&this.y===e.y}sizeEquals(e){return this.width===e.width&&this.height===e.height}union(e){let t=Math.min(this.x,e.x),i=Math.min(this.y,e.y),s=Math.max(this.maxX,e.maxX)-t,n=Math.max(this.maxY,e.maxY)-i;return new l(t,i,s,n)}intersection(e){if(!this.intersects(e))return new l(0,0,0,0);let t=Math.max(this.x,e.x),i=Math.max(this.y,e.y);return new l(t,i,Math.min(this.maxX,e.maxX)-t,Math.min(this.maxY,e.maxY)-i)}copy(){return new l(this.x,this.y,this.width,this.height)}}},35616(e,t,i){i.d(t,{o:()=>s});class s{constructor(e=0,t=0){this.width=Math.max(e,0),this.height=Math.max(t,0)}copy(){return new s(this.width,this.height)}equals(e){return this.width===e.width&&this.height===e.height}get area(){return this.width*this.height}}},1564(e,t,i){i.d(t,{E:()=>g});var s=i(13377),l=i(35616);let n=0;class o{constructor(e,t){this.virtualizer=e,this.key=++n,this.viewType=t,this.children=new Set,this.reusableViews=new Map,this.layoutInfo=null,this.content=null,this.rendered=null}prepareForReuse(){this.content=null,this.rendered=null,this.layoutInfo=null}getReusableView(e){let t=this.reusableViews.get(e);return t&&t.length>0?t.shift():new a(this.virtualizer,this,e)}reuseChild(e){e.prepareForReuse();let t=this.reusableViews.get(e.viewType);t||(t=[],this.reusableViews.set(e.viewType,t)),t.push(e)}}class r extends o{constructor(e){super(e,"root")}}class a extends o{constructor(e,t,i){super(e,i),this.parent=t}}var h=i(13215);class u{setVisibleRect(e){let t=performance.now()-this.startTime;t<500&&(e.x!==this.visibleRect.x&&t>0&&(this.velocity.x=(e.x-this.visibleRect.x)/t),e.y!==this.visibleRect.y&&t>0&&(this.velocity.y=(e.y-this.visibleRect.y)/t)),this.startTime=performance.now(),this.visibleRect=e}getOverscannedRect(){let e=this.visibleRect.copy(),t=this.visibleRect.height/3;e.height+=t,this.velocity.y<0&&(e.y-=t);let i=this.visibleRect.width/3;return e.width+=i,this.velocity.x<0&&(e.x-=i),e}constructor(){this.startTime=0,this.velocity=new(0,h.b)(0,0),this.visibleRect=new(0,s.r)}}class d{constructor(e){this.delegate=e.delegate,this.collection=e.collection,this.layout=e.layout,this.contentSize=new(0,l.o),this.visibleRect=new(0,s.r),this.size=new(0,l.o),this.persistedKeys=new Set,this._visibleViews=new Map,this._renderedContent=new WeakMap,this._rootView=new r(this),this._isScrolling=!1,this._invalidationContext={},this._overscanManager=new u}isPersistedKey(e){if(this.persistedKeys.has(e))return!0;for(let t of this.persistedKeys)for(;null!=t;){let i=this.layout.getLayoutInfo(t);if(!i||null==i.parentKey)break;if((t=i.parentKey)===e)return!0}return!1}getParentView(e){return null!=e.parentKey?this._visibleViews.get(e.parentKey):this._rootView}getReusableView(e){let t=this.getParentView(e).getReusableView(e.type);return t.layoutInfo=e,this._renderView(t),t}_renderView(e){if(e.layoutInfo){let{type:t,key:i,content:s}=e.layoutInfo;e.content=s||this.collection.getItem(i),e.rendered=this._renderContent(t,e.content)}}_renderContent(e,t){let i=null!=t?this._renderedContent.get(t):null;if(null!=i)return i;let s=this.delegate.renderView(e,t);return t&&this._renderedContent.set(t,s),s}keyAtPoint(e){let t=new(0,s.r)(e.x,e.y,1,1);for(let e of 0===t.area?[]:this.layout.getVisibleLayoutInfos(t))if(e.rect.intersects(t))return e.key;return null}relayout(e={}){this.layout.update(e),this.contentSize=this.layout.getContentSize();let t=this.visibleRect,i=e.contentChanged?0:t.x,l=e.contentChanged?0:t.y;if(i=Math.max(0,Math.min(this.contentSize.width-t.width,i)),l=Math.max(0,Math.min(this.contentSize.height-t.height,l)),i!==t.x||l!==t.y){let e=new(0,s.r)(i,l,t.width,t.height);this.delegate.setVisibleRect(e)}else this.updateSubviews()}getVisibleLayoutInfos(){let e;e=this._overscanManager.getOverscannedRect();let t=this.layout.getVisibleLayoutInfos(e),i=new Map;for(let e of t)i.set(e.key,e);return i}updateSubviews(){let e=this.getVisibleLayoutInfos(),t=new Set;for(let[i,s]of this._visibleViews){let l=e.get(i);l&&s.parent===this.getParentView(l)||(this._visibleViews.delete(i),s.parent.reuseChild(s),t.add(s))}for(let[i,s]of e){let e=this._visibleViews.get(i);if(e){e.layoutInfo=s;let t=this.collection.getItem(s.key);e.content!==t&&(null!=e.content&&this._renderedContent.delete(e.content),this._renderView(e))}else(e=this.getReusableView(s)).parent.children.add(e),this._visibleViews.set(i,e),t.delete(e)}for(let e of t)e.parent.children.delete(e),e.parent.reusableViews.clear();if(!this._isScrolling)for(let t of e.keys()){let e=this._visibleViews.get(t);e.parent.children.delete(e),e.parent.children.add(e)}}render(e){let t=!1,i=!1,l=!1,n=!1,o=!1,r=!1;if(e.collection!==this.collection&&(this.collection=e.collection,t=!0),(e.layout!==this.layout||this.layout.virtualizer!==this)&&(this.layout&&(this.layout.virtualizer=null),e.layout.virtualizer=this,this.layout=e.layout,t=!0),e.persistedKeys&&!function(e,t){if(e===t)return!0;if(e.size!==t.size)return!1;for(let i of e)if(!t.has(i))return!1;return!0}(e.persistedKeys,this.persistedKeys)&&(this.persistedKeys=e.persistedKeys,r=!0),!this.visibleRect.equals(e.visibleRect)||!this.size.equals(e.size)){this._overscanManager.setVisibleRect(e.visibleRect);let n=new(0,s.r)(this.visibleRect.x,this.visibleRect.y,this.size.width,this.size.height),o=new(0,s.r)(e.visibleRect.x,e.visibleRect.y,e.size.width,e.size.height);this.layout.shouldInvalidate(o,n)?(i=!e.visibleRect.pointEquals(this.visibleRect),l=!this.size.equals(e.size),t=!0):r=!0,this.visibleRect=e.visibleRect,this.size=e.size}return e.invalidationContext!==this._invalidationContext&&(e.invalidationContext&&(l||=e.invalidationContext.sizeChanged||!1,i||=e.invalidationContext.offsetChanged||!1,n||=e.invalidationContext.itemSizeChanged||!1,o||=null!=e.invalidationContext.layoutOptions&&null!=this._invalidationContext.layoutOptions&&e.invalidationContext.layoutOptions!==this._invalidationContext.layoutOptions&&this.layout.shouldInvalidateLayoutOptions(e.invalidationContext.layoutOptions,this._invalidationContext.layoutOptions),t||=n||l||i||o),this._invalidationContext=e.invalidationContext),e.isScrolling!==this._isScrolling&&(this._isScrolling=e.isScrolling,e.isScrolling||(r=!0)),t?this.relayout({offsetChanged:i,sizeChanged:l,itemSizeChanged:n,layoutOptionsChanged:o,layoutOptions:this._invalidationContext.layoutOptions}):r&&this.updateSubviews(),Array.from(this._rootView.children)}getVisibleView(e){return this._visibleViews.get(e)}invalidate(e){this.delegate.invalidate(e)}updateItemSize(e,t){!this.layout.updateItemSize||this.layout.updateItemSize(e,t)&&this.invalidate({itemSizeChanged:!0})}}var c=i(14041);let y="u">typeof document?c.useLayoutEffect:()=>{};function g(e){let[t,i]=(0,c.useState)(new(0,s.r)(0,0,0,0)),[n,o]=(0,c.useState)(new(0,l.o)),[r,a]=(0,c.useState)(!1),[h,u]=(0,c.useState)({}),g=(0,c.useRef)(!1),[p]=(0,c.useState)(()=>new d({collection:e.collection,layout:e.layout,delegate:{setVisibleRect(e){i(e),g.current=!0},renderView:e.renderView,invalidate:u}}));y(()=>{g.current&&(g.current=!1,e.onVisibleRectChange(t))});let f=(0,c.useMemo)(()=>null!=e.layoutOptions?{...h,layoutOptions:e.layoutOptions}:h,[h,e.layoutOptions]),m=p.render({layout:e.layout,collection:e.collection,persistedKeys:e.persistedKeys,layoutOptions:e.layoutOptions,visibleRect:t,size:e.allowsWindowScrolling?n:t,invalidationContext:f,isScrolling:r}),v=p.contentSize,w=(0,c.useCallback)(()=>{a(!0)},[]),S=(0,c.useCallback)(()=>{a(!1)},[]);return(0,c.useMemo)(()=>({virtualizer:p,visibleViews:m,setVisibleRect:i,size:n,setSize:o,contentSize:v,isScrolling:r,startScrolling:w,endScrolling:S}),[p,m,i,n,o,v,r,w,S])}}}]);
|
|
2
|
+
//# sourceMappingURL=module-react-stately.3db88231.js.map
|