@canonical/maas-react-components 2.0.2 → 2.0.3
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/dist/@canonical/maas-react-components.es.js +536 -572
- package/dist/@canonical/maas-react-components.umd.js +14 -14
- package/dist/maas-react-components.css +1 -1
- package/dist/src/lib/components/FileUpload/FileUpload.d.ts +64 -8
- package/dist/src/lib/components/FileUpload/FileUpload.stories.d.ts +6 -2
- package/package.json +1 -1
|
@@ -1,37 +1,37 @@
|
|
|
1
|
-
(function(K,c){typeof exports=="object"&&typeof module<"u"?c(exports,require("react/jsx-runtime"),require("react"),require("@canonical/react-components")):typeof define=="function"&&define.amd?define(["exports","react/jsx-runtime","react","@canonical/react-components"],c):(K=typeof globalThis<"u"?globalThis:K||self,c(K["@canonical/maas-react-components"]={},K["react/jsx-runtime"],K.React,K["@canonical/react-components"]))})(this,function(K,c,
|
|
1
|
+
(function(K,c){typeof exports=="object"&&typeof module<"u"?c(exports,require("react/jsx-runtime"),require("react"),require("@canonical/react-components")):typeof define=="function"&&define.amd?define(["exports","react/jsx-runtime","react","@canonical/react-components"],c):(K=typeof globalThis<"u"?globalThis:K||self,c(K["@canonical/maas-react-components"]={},K["react/jsx-runtime"],K.React,K["@canonical/react-components"]))})(this,function(K,c,w,q){"use strict";function pi(e){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const i=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,i.get?i:{enumerable:!0,get:()=>e[t]})}}return n.default=e,Object.freeze(n)}const ce=pi(w);function et(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var tt={exports:{}};/*!
|
|
2
2
|
Copyright (c) 2018 Jed Watson.
|
|
3
3
|
Licensed under the MIT License (MIT), see
|
|
4
4
|
http://jedwatson.github.io/classnames
|
|
5
|
-
*/var Ut;function
|
|
5
|
+
*/var Ut;function ui(){return Ut||(Ut=1,function(e){(function(){var n={}.hasOwnProperty;function t(){for(var a="",r=0;r<arguments.length;r++){var l=arguments[r];l&&(a=o(a,i(l)))}return a}function i(a){if(typeof a=="string"||typeof a=="number")return a;if(typeof a!="object")return"";if(Array.isArray(a))return t.apply(null,a);if(a.toString!==Object.prototype.toString&&!a.toString.toString().includes("[native code]"))return a.toString();var r="";for(var l in a)n.call(a,l)&&a[l]&&(r=o(r,l));return r}function o(a,r){return r?a?a+" "+r:a+r:a}e.exports?(t.default=t,e.exports=t):window.classNames=t})()}(tt)),tt.exports}var di=ui();const U=et(di),ye={caution:"#F99B11",light:"#F7F7F7",linkFaded:"#D3E4ED",link:"#0066CC",negative:"#C7162B",positiveFaded:"#B7CCB9",positiveMid:"#4DAB4D",positive:"#0E8420"},gi=[ye.link,ye.positive,ye.negative,ye.caution],fi=ye.linkFaded,Kt=ye.caution,nt=ye.light,Wt=2,Yt=1,Xt=(e,n)=>{var o,a;const t=((a=(o=e==null?void 0:e.current)==null?void 0:o.getBoundingClientRect())==null?void 0:a.width)||0;return t>n*Wt?t/n:Wt},Ce={bar:"meter-bar",container:"meter-container",filled:"meter-filled",label:"meter-label",meteroverflow:"meter-overflow",segments:"meter-segments"},Qt=({className:e,children:n,data:t,max:i,variant:o="regular",size:a="regular",...r})=>{const l=w.useRef(null),s=t==null?void 0:t.reduce((m,v)=>m+v.value,0),p=i||s,d=t.map(m=>m.value/p*100),[f,g]=w.useState(0);w.useEffect(()=>{g(o==="segmented"?Xt(l,p):0)},[p,o]);const u=w.useCallback(()=>{g(Xt(l,p))},[l,p,g]);return q.useListener(window,u,"resize",!0,o==="segmented"),c.jsxs("div",{className:U("p-meter",e,{"p-meter--small":a==="small"}),"aria-label":r==null?void 0:r["aria-label"],"data-testid":Ce.container,ref:l,children:[c.jsx(mi,{children:c.jsx(vi,{data:t,datumWidths:d,maximum:p,overColor:Kt,segmentWidth:f,separatorColor:nt})}),n]})},mi=({children:e})=>c.jsx("div",{className:"p-meter__bar","data-testid":Ce.bar,style:{backgroundColor:fi},children:e}),vi=({data:e,datumWidths:n,maximum:t,segmentWidth:i})=>{const o=()=>(e==null?void 0:e.reduce((l,s)=>l+s.value,0))>t,a=(l,s)=>({backgroundColor:l.color,left:`${n==null?void 0:n.reduce((p,d,f)=>s>f?p+d:p,0)}%`,width:`${n[s]}%`}),r=()=>({background:`repeating-linear-gradient(
|
|
6
6
|
to right,
|
|
7
7
|
transparent 0,
|
|
8
8
|
transparent ${i-Yt}px,
|
|
9
9
|
${nt} ${i-Yt}px,
|
|
10
10
|
${nt} ${i}px
|
|
11
|
-
)`});return c.jsxs(c.Fragment,{children:[o()?c.jsx("div",{className:"p-meter__filled","data-testid":Ce.meteroverflow,style:{backgroundColor:Kt,width:"100%"}}):e==null?void 0:e.map((l,s)=>c.jsx("div",{className:"p-meter__filled","data-testid":Ce.filled,style:a(l,s)},`meter-${s}`)),i>0&&c.jsx("div",{className:"p-meter__separators","data-testid":Ce.segments,style:r()})]})},
|
|
11
|
+
)`});return c.jsxs(c.Fragment,{children:[o()?c.jsx("div",{className:"p-meter__filled","data-testid":Ce.meteroverflow,style:{backgroundColor:Kt,width:"100%"}}):e==null?void 0:e.map((l,s)=>c.jsx("div",{className:"p-meter__filled","data-testid":Ce.filled,style:a(l,s)},`meter-${s}`)),i>0&&c.jsx("div",{className:"p-meter__separators","data-testid":Ce.segments,style:r()})]})},xi=({className:e,children:n})=>c.jsx("div",{className:U("p-meter__label",e),"data-testid":Ce.label,children:n});Qt.Label=xi;const hi=({children:e,to:n,...t})=>c.jsx(q.Link,{...t,href:n,rel:"noreferrer noopener",target:"_blank",children:e}),Jt=({percentComplete:e})=>c.jsxs("small",{className:"progress-indicator",children:[e,"% ",c.jsx(q.Spinner,{className:"progress-indicator__spinner"})]}),Zt=({text:e,children:n,className:t,isPending:i=!1})=>{const o=Math.floor(Math.random()*750);return i?c.jsx("span",{"aria-label":"loading",className:U("p-placeholder",t),role:"progressbar",style:{animationDelay:`${o}ms`},children:c.jsx("span",{"aria-hidden":"true",children:e||n||"Loading"})}):c.jsx(c.Fragment,{children:n})},wi=({children:e})=>c.jsx(c.Fragment,{children:e}),yi=({isCollapsed:e,setIsCollapsed:n,className:t})=>c.jsx(q.Tooltip,{className:"p-side-navigation__tooltip-wrapper",message:c.jsxs(c.Fragment,{children:[e?"expand":"collapse","( ",c.jsx("code",{children:"["})," )"]}),position:"right",tooltipClassName:"p-side-navigation__tooltip",children:c.jsx(q.Button,{appearance:"base","aria-label":`${e?"expand":"collapse"} main navigation`,className:U("is-dense has-icon is-dark u-no-margin l-navigation-collapse-toggle",t),onClick:i=>{n(!e),i.stopPropagation(),i.currentTarget.blur()},children:c.jsx(q.Icon,{light:!0,name:"sidebar-toggle"})})}),bi=({children:e})=>c.jsx("div",{className:"p-panel__content",children:c.jsx("nav",{className:"p-side-navigation--icons is-dark",children:e})}),Si=({children:e})=>c.jsx("div",{className:"p-panel__controls u-no-margin--top",children:e}),Ci=({children:e})=>c.jsx("div",{className:"l-navigation__drawer",children:c.jsx("div",{className:"p-panel is-dark",children:e})}),_i=({children:e})=>c.jsx("div",{className:"p-panel__footer",children:e}),Ei=({children:e})=>c.jsx("div",{className:"p-panel__header",children:e}),ki=({light:e=!0,name:n})=>c.jsx(q.Icon,{className:"p-side-navigation__icon",light:e,name:n}),Fi=({children:e,className:n,hasActiveChild:t})=>c.jsx("li",{className:U("p-side-navigation__item",n,{"has-active-child":t}),children:e}),Pi=({children:e,id:n,variant:t="base"})=>c.jsx("span",{className:U("p-side-navigation__label",{"p-side-navigation__label--group":t==="group"}),id:n,children:e}),Ii=({as:e,...n})=>{const t=e||"a";return c.jsx(t,{className:U("p-side-navigation__link",n.className),...n})},Mi=({children:e,className:n})=>c.jsx("ul",{className:U("p-side-navigation__list",n),children:e}),Di=({as:e,children:n,className:t,...i})=>{const o=e||"a";return c.jsx(o,{className:U("p-panel__logo",t),...i,children:c.jsx("div",{className:"p-navigation__tagged-logo",children:n})})},$i=({children:e})=>w.cloneElement(e,{className:"p-panel__logo-icon p-navigation__logo-icon"}),Ai=({children:e,variant:n="base"})=>c.jsx("div",{className:U("p-panel__logo-name is-fading-when-collapsed",{"p-panel__logo-name--small":n==="small"}),children:e}),Oi=({children:e})=>c.jsx("div",{className:"p-navigation__logo-tag",children:e}),Ri=({children:e})=>c.jsx("span",{className:"p-panel__logo-text",children:e}),ji=({children:e,className:n,onClick:t})=>c.jsx(q.Button,{appearance:"base",className:U("p-side-navigation__button--menu has-icon is-dark",n),onClick:i=>{t&&t(i),i.stopPropagation(),i.currentTarget.blur()},children:c.jsx(c.Fragment,{children:e})}),Ti=({children:e})=>c.jsx("span",{className:"p-side-navigation__text",children:e}),ae=({children:e,className:n,isCollapsed:t})=>c.jsx("header",{"aria-label":"main navigation",className:U("l-navigation is-maas",n,{"is-collapsed":t,"is-pinned":!t}),children:e}),en=({children:e,className:n})=>c.jsx("header",{"aria-label":"navigation",className:"l-navigation-bar",children:c.jsx("div",{className:U("p-panel is-dark",n),children:e})});ae.Header=Ei,ae.Banner=wi,ae.Drawer=Ci,ae.Controls=Si,ae.CollapseToggle=yi,ae.Content=bi,ae.Footer=_i,ae.List=Mi,ae.Item=Fi,ae.Link=Ii,ae.Text=Ti,ae.Icon=ki,ae.Label=Pi,ae.Logo=Di,ae.LogoTag=Oi,ae.LogoIcon=$i,ae.LogoName=Ai,ae.LogoText=Ri,en.MenuButton=ji;const it=w.createContext(null),ot=({children:e})=>{const n=w.useId();return c.jsx(it.Provider,{value:n,children:c.jsx("div",{role:"group","aria-labelledby":`${n}_label`,"aria-describedby":`${n}_description`,className:"p-input-group",children:e})})},zi=({children:e})=>{const n=w.useContext(it);return c.jsx("label",{id:`${n}_label`,children:e})},Vi=({children:e})=>{const n=w.useContext(it);return c.jsx("p",{className:"p-form-help-text",id:`${n}_description`,children:e})};ot.Label=zi,ot.Description=Vi;const ze=({children:e})=>c.jsx("div",{className:"p-form-section",children:e}),Ni=({children:e})=>c.jsx("h5",{className:"p-form-section__title u-no-padding--top",children:e}),Li=({children:e})=>c.jsx("p",{className:"p-form-help-text",children:e}),Hi=({children:e})=>c.jsx("div",{className:"p-form-section__content",children:e});ze.Title=Ni,ze.Description=Li,ze.Content=Hi;function qi(e){const[n,t]=ce.useState(null),i=ce.useRef(null),o=ce.useCallback(()=>{if(e.current){const a=e.current.getBoundingClientRect();t(a)}},[e]);return ce.useEffect(()=>{const a=new ResizeObserver(()=>{i.current&&cancelAnimationFrame(i.current),i.current=requestAnimationFrame(o)});return e.current&&a.observe(e.current),()=>{i.current&&cancelAnimationFrame(i.current),a.disconnect()}},[e,o]),n}const tn=ce.createContext(null),nn=ce.createContext([!1,()=>{}]),at=({children:e})=>{const n=ce.useRef(null),t=qi(n),[i,o]=ce.useState(!1);return c.jsx("header",{className:U("main-toolbar",{"main-toolbar--stacked":i}),ref:n,children:c.jsx(tn.Provider,{value:t,children:c.jsx(nn.Provider,{value:[i,o],children:e})})})},Gi=({as:e,children:n,className:t,...i})=>{const o=e||"h1";return c.jsx(o,{className:U("main-toolbar__title p-heading--4",t),"data-testid":"main-toolbar-heading",...i,children:n})},Bi=({children:e})=>{const n=ce.useContext(tn),[t,i]=ce.useContext(nn),o=ce.useRef(null);return ce.useEffect(()=>{!o.current||!n||i(o.current.getBoundingClientRect().width>n.width)},[i,n,o]),c.jsxs(c.Fragment,{children:[c.jsx("div",{"aria-hidden":"true",className:"main-toolbar__controls main-toolbar__controls--observer",ref:o,style:{visibility:"hidden",position:"absolute"},children:e}),c.jsx("div",{className:U("main-toolbar__controls",{"main-toolbar__controls--stacked":t}),children:e})]})};at.Title=Gi,at.Controls=Bi;const De=({children:e,className:n,as:t,variant:i="wide",...o})=>{const a=t||"section",r=U("content-section",n);return c.jsx(a,{...o,className:r,children:c.jsx(q.Row,{children:c.jsx(q.Col,{size:i==="narrow"?6:12,children:c.jsx(c.Fragment,{children:e})})})})},Ui=({children:e,className:n,as:t,...i})=>{const o=t||"h1";return c.jsx(o,{...i,className:U("content-section__title p-heading--4",n),children:e})},Ki=({children:e,className:n})=>c.jsx("header",{className:U("content-section__header",n),children:e}),Wi=({children:e,className:n})=>c.jsx("div",{className:U("content-section__body",n),children:e}),Yi=({children:e,className:n})=>c.jsx("footer",{className:U("content-section__footer",n),children:e});De.Title=Ui,De.Header=Ki,De.Content=Wi,De.Footer=Yi;const on=({children:e,className:n,isVisible:t})=>c.jsx("div",{className:U("fade-in--down",n),"aria-hidden":t?"false":"true",style:{visibility:t?"visible":"hidden"},children:e}),Xi=({children:e,...n})=>c.jsx(on,{isVisible:!n["aria-hidden"],children:c.jsx("div",{className:"p-form__nested-group",...n,children:e})}),an=({className:e,currentPage:n,error:t,disabled:i,onInputBlur:o,onInputChange:a,onNextClick:r,onPreviousClick:l,totalPages:s,...p})=>c.jsx("nav",{"aria-label":(p==null?void 0:p["aria-label"])||"pagination",className:U("p-pagination",e),children:c.jsxs("span",{className:"p-pagination--items",children:[c.jsx(q.Button,{"aria-label":"Previous page",className:"p-pagination__link--previous",disabled:n===1||i,onClick:l,type:"button",children:c.jsx(q.Icon,{name:"chevron-down"})}),c.jsx("strong",{children:"Page "})," ",c.jsx(q.Input,{"aria-label":"page number",className:"p-pagination__input",disabled:i,error:t,min:1,onBlur:o,onChange:a,required:!0,type:"number",value:n})," ",c.jsxs("strong",{className:"u-no-wrap",children:[" of ",s]}),c.jsx(q.Button,{"aria-label":"Next page",className:"p-pagination__link--next",disabled:n===s||i,onClick:r,type:"button",children:c.jsx(q.Icon,{name:"chevron-up"})})]})}),rn=({currentPage:e,disabled:n,paginate:t,totalPages:i})=>{const[o,a]=w.useState(e),[r,l]=w.useState(""),s=()=>{a(e),l("")},p=g=>{const{value:u,valueAsNumber:m}=g.target;u?(a(m),m>i||m<1?l(`${m} is not a valid page number.`):(l(""),t(m))):l("Enter a page number.")},d=()=>{a(g=>Number(g)-1),t(Number(e)-1)},f=()=>{a(g=>Number(g)+1),t(Number(e)+1)};return c.jsx(an,{currentPage:o,error:r,disabled:n,onInputBlur:s,onInputChange:p,onNextClick:f,onPreviousClick:d,totalPages:i})},Qi=({activeStep:e,items:n})=>c.jsx("ol",{className:"stepper",children:n.map((t,i)=>{const o=i===e,a=i<e;return c.jsx("li",{"aria-label":t,className:"stepper__item",children:c.jsx("p",{"aria-label":a?`${t} (completed)`:t,className:U("stepper__title",{"stepper__title--is-active":o,"stepper__title--is-complete":a}),children:t})},i)})});var Ve={exports:{}},Ne={exports:{}},W={};/** @license React v16.13.1
|
|
12
12
|
* react-is.production.min.js
|
|
13
13
|
*
|
|
14
14
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
15
15
|
*
|
|
16
16
|
* This source code is licensed under the MIT license found in the
|
|
17
17
|
* LICENSE file in the root directory of this source tree.
|
|
18
|
-
*/var ln;function
|
|
18
|
+
*/var ln;function Ji(){if(ln)return W;ln=1;var e=typeof Symbol=="function"&&Symbol.for,n=e?Symbol.for("react.element"):60103,t=e?Symbol.for("react.portal"):60106,i=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,a=e?Symbol.for("react.profiler"):60114,r=e?Symbol.for("react.provider"):60109,l=e?Symbol.for("react.context"):60110,s=e?Symbol.for("react.async_mode"):60111,p=e?Symbol.for("react.concurrent_mode"):60111,d=e?Symbol.for("react.forward_ref"):60112,f=e?Symbol.for("react.suspense"):60113,g=e?Symbol.for("react.suspense_list"):60120,u=e?Symbol.for("react.memo"):60115,m=e?Symbol.for("react.lazy"):60116,v=e?Symbol.for("react.block"):60121,P=e?Symbol.for("react.fundamental"):60117,h=e?Symbol.for("react.responder"):60118,O=e?Symbol.for("react.scope"):60119;function S(x){if(typeof x=="object"&&x!==null){var L=x.$$typeof;switch(L){case n:switch(x=x.type,x){case s:case p:case i:case a:case o:case f:return x;default:switch(x=x&&x.$$typeof,x){case l:case d:case m:case u:case r:return x;default:return L}}case t:return L}}}function T(x){return S(x)===p}return W.AsyncMode=s,W.ConcurrentMode=p,W.ContextConsumer=l,W.ContextProvider=r,W.Element=n,W.ForwardRef=d,W.Fragment=i,W.Lazy=m,W.Memo=u,W.Portal=t,W.Profiler=a,W.StrictMode=o,W.Suspense=f,W.isAsyncMode=function(x){return T(x)||S(x)===s},W.isConcurrentMode=T,W.isContextConsumer=function(x){return S(x)===l},W.isContextProvider=function(x){return S(x)===r},W.isElement=function(x){return typeof x=="object"&&x!==null&&x.$$typeof===n},W.isForwardRef=function(x){return S(x)===d},W.isFragment=function(x){return S(x)===i},W.isLazy=function(x){return S(x)===m},W.isMemo=function(x){return S(x)===u},W.isPortal=function(x){return S(x)===t},W.isProfiler=function(x){return S(x)===a},W.isStrictMode=function(x){return S(x)===o},W.isSuspense=function(x){return S(x)===f},W.isValidElementType=function(x){return typeof x=="string"||typeof x=="function"||x===i||x===p||x===a||x===o||x===f||x===g||typeof x=="object"&&x!==null&&(x.$$typeof===m||x.$$typeof===u||x.$$typeof===r||x.$$typeof===l||x.$$typeof===d||x.$$typeof===P||x.$$typeof===h||x.$$typeof===O||x.$$typeof===v)},W.typeOf=S,W}var Y={};/** @license React v16.13.1
|
|
19
19
|
* react-is.development.js
|
|
20
20
|
*
|
|
21
21
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
22
22
|
*
|
|
23
23
|
* This source code is licensed under the MIT license found in the
|
|
24
24
|
* LICENSE file in the root directory of this source tree.
|
|
25
|
-
*/var sn;function
|
|
25
|
+
*/var sn;function Zi(){return sn||(sn=1,process.env.NODE_ENV!=="production"&&function(){var e=typeof Symbol=="function"&&Symbol.for,n=e?Symbol.for("react.element"):60103,t=e?Symbol.for("react.portal"):60106,i=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,a=e?Symbol.for("react.profiler"):60114,r=e?Symbol.for("react.provider"):60109,l=e?Symbol.for("react.context"):60110,s=e?Symbol.for("react.async_mode"):60111,p=e?Symbol.for("react.concurrent_mode"):60111,d=e?Symbol.for("react.forward_ref"):60112,f=e?Symbol.for("react.suspense"):60113,g=e?Symbol.for("react.suspense_list"):60120,u=e?Symbol.for("react.memo"):60115,m=e?Symbol.for("react.lazy"):60116,v=e?Symbol.for("react.block"):60121,P=e?Symbol.for("react.fundamental"):60117,h=e?Symbol.for("react.responder"):60118,O=e?Symbol.for("react.scope"):60119;function S(_){return typeof _=="string"||typeof _=="function"||_===i||_===p||_===a||_===o||_===f||_===g||typeof _=="object"&&_!==null&&(_.$$typeof===m||_.$$typeof===u||_.$$typeof===r||_.$$typeof===l||_.$$typeof===d||_.$$typeof===P||_.$$typeof===h||_.$$typeof===O||_.$$typeof===v)}function T(_){if(typeof _=="object"&&_!==null){var ge=_.$$typeof;switch(ge){case n:var ke=_.type;switch(ke){case s:case p:case i:case a:case o:case f:return ke;default:var je=ke&&ke.$$typeof;switch(je){case l:case d:case m:case u:case r:return je;default:return ge}}case t:return ge}}}var x=s,L=p,V=l,J=r,Z=n,pe=d,ue=i,xe=m,$=u,F=t,B=a,Q=o,ee=f,se=!1;function ne(_){return se||(se=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),y(_)||T(_)===s}function y(_){return T(_)===p}function M(_){return T(_)===l}function C(_){return T(_)===r}function D(_){return typeof _=="object"&&_!==null&&_.$$typeof===n}function b(_){return T(_)===d}function E(_){return T(_)===i}function I(_){return T(_)===m}function A(_){return T(_)===u}function H(_){return T(_)===t}function N(_){return T(_)===a}function G(_){return T(_)===o}function ie(_){return T(_)===f}Y.AsyncMode=x,Y.ConcurrentMode=L,Y.ContextConsumer=V,Y.ContextProvider=J,Y.Element=Z,Y.ForwardRef=pe,Y.Fragment=ue,Y.Lazy=xe,Y.Memo=$,Y.Portal=F,Y.Profiler=B,Y.StrictMode=Q,Y.Suspense=ee,Y.isAsyncMode=ne,Y.isConcurrentMode=y,Y.isContextConsumer=M,Y.isContextProvider=C,Y.isElement=D,Y.isForwardRef=b,Y.isFragment=E,Y.isLazy=I,Y.isMemo=A,Y.isPortal=H,Y.isProfiler=N,Y.isStrictMode=G,Y.isSuspense=ie,Y.isValidElementType=S,Y.typeOf=T}()),Y}var cn;function pn(){return cn||(cn=1,process.env.NODE_ENV==="production"?Ne.exports=Ji():Ne.exports=Zi()),Ne.exports}/*
|
|
26
26
|
object-assign
|
|
27
27
|
(c) Sindre Sorhus
|
|
28
28
|
@license MIT
|
|
29
|
-
*/var rt,un;function
|
|
30
|
-
Valid keys: `+JSON.stringify(Object.keys(y),null," "));var C=ie(A,G,b,_,F+"."+G,t);if(C)return C}return null}return I(P)}function k(y){switch(typeof y){case"number":case"string":case"undefined":return!0;case"boolean":return!y;case"object":if(Array.isArray(y))return y.every(k);if(y===null||l(y))return!0;var P=f(y);if(P){var S=P.call(y),D;if(P!==y.entries){for(;!(D=S.next()).done;)if(!k(D.value))return!1}else for(;!(D=S.next()).done;){var b=D.value;if(b&&!k(b[1]))return!1}}else return!1;return!0;default:return!1}}function B(y,P){return y==="symbol"?!0:P?P["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&P instanceof Symbol:!1}function Q(y){var P=typeof y;return Array.isArray(y)?"array":y instanceof RegExp?"object":B(P,y)?"symbol":P}function ee(y){if(typeof y>"u"||y===null)return""+y;var P=Q(y);if(P==="object"){if(y instanceof Date)return"date";if(y instanceof RegExp)return"regexp"}return P}function se(y){var P=ee(y);switch(P){case"array":case"object":return"an "+P;case"boolean":case"date":case"regexp":return"a "+P;default:return P}}function ne(y){return!y.constructor||!y.constructor.name?g:y.constructor.name}return p.checkPropTypes=o,p.resetWarningCache=o.resetWarningCache,p.PropTypes=p,p},ut}var dt,xn;function oo(){if(xn)return dt;xn=1;var e=st();function n(){}function t(){}return t.resetWarningCache=n,dt=function(){function i(r,l,s,u,d,f){if(f!==e){var g=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw g.name="Invariant Violation",g}}i.isRequired=i;function o(){return i}var a={array:i,bigint:i,bool:i,func:i,number:i,object:i,string:i,symbol:i,any:i,arrayOf:o,element:i,elementType:i,instanceOf:o,node:i,objectOf:o,oneOf:o,oneOfType:o,shape:o,exact:o,checkPropTypes:t,resetWarningCache:n};return a.PropTypes=a,a},dt}var hn;function ao(){if(hn)return Ve.exports;if(hn=1,process.env.NODE_ENV!=="production"){var e=pn(),n=!0;Ve.exports=io()(e.isElement,n)}else Ve.exports=oo()();return Ve.exports}var ro=ao();const X=et(ro);function _e(e,n,t,i){function o(a){return a instanceof t?a:new t(function(r){r(a)})}return new(t||(t=Promise))(function(a,r){function l(d){try{u(i.next(d))}catch(f){r(f)}}function s(d){try{u(i.throw(d))}catch(f){r(f)}}function u(d){d.done?a(d.value):o(d.value).then(l,s)}u((i=i.apply(e,n||[])).next())})}typeof SuppressedError=="function"&&SuppressedError;const lo=new Map([["1km","application/vnd.1000minds.decision-model+xml"],["3dml","text/vnd.in3d.3dml"],["3ds","image/x-3ds"],["3g2","video/3gpp2"],["3gp","video/3gp"],["3gpp","video/3gpp"],["3mf","model/3mf"],["7z","application/x-7z-compressed"],["7zip","application/x-7z-compressed"],["123","application/vnd.lotus-1-2-3"],["aab","application/x-authorware-bin"],["aac","audio/x-acc"],["aam","application/x-authorware-map"],["aas","application/x-authorware-seg"],["abw","application/x-abiword"],["ac","application/vnd.nokia.n-gage.ac+xml"],["ac3","audio/ac3"],["acc","application/vnd.americandynamics.acc"],["ace","application/x-ace-compressed"],["acu","application/vnd.acucobol"],["acutc","application/vnd.acucorp"],["adp","audio/adpcm"],["aep","application/vnd.audiograph"],["afm","application/x-font-type1"],["afp","application/vnd.ibm.modcap"],["ahead","application/vnd.ahead.space"],["ai","application/pdf"],["aif","audio/x-aiff"],["aifc","audio/x-aiff"],["aiff","audio/x-aiff"],["air","application/vnd.adobe.air-application-installer-package+zip"],["ait","application/vnd.dvb.ait"],["ami","application/vnd.amiga.ami"],["amr","audio/amr"],["apk","application/vnd.android.package-archive"],["apng","image/apng"],["appcache","text/cache-manifest"],["application","application/x-ms-application"],["apr","application/vnd.lotus-approach"],["arc","application/x-freearc"],["arj","application/x-arj"],["asc","application/pgp-signature"],["asf","video/x-ms-asf"],["asm","text/x-asm"],["aso","application/vnd.accpac.simply.aso"],["asx","video/x-ms-asf"],["atc","application/vnd.acucorp"],["atom","application/atom+xml"],["atomcat","application/atomcat+xml"],["atomdeleted","application/atomdeleted+xml"],["atomsvc","application/atomsvc+xml"],["atx","application/vnd.antix.game-component"],["au","audio/x-au"],["avi","video/x-msvideo"],["avif","image/avif"],["aw","application/applixware"],["azf","application/vnd.airzip.filesecure.azf"],["azs","application/vnd.airzip.filesecure.azs"],["azv","image/vnd.airzip.accelerator.azv"],["azw","application/vnd.amazon.ebook"],["b16","image/vnd.pco.b16"],["bat","application/x-msdownload"],["bcpio","application/x-bcpio"],["bdf","application/x-font-bdf"],["bdm","application/vnd.syncml.dm+wbxml"],["bdoc","application/x-bdoc"],["bed","application/vnd.realvnc.bed"],["bh2","application/vnd.fujitsu.oasysprs"],["bin","application/octet-stream"],["blb","application/x-blorb"],["blorb","application/x-blorb"],["bmi","application/vnd.bmi"],["bmml","application/vnd.balsamiq.bmml+xml"],["bmp","image/bmp"],["book","application/vnd.framemaker"],["box","application/vnd.previewsystems.box"],["boz","application/x-bzip2"],["bpk","application/octet-stream"],["bpmn","application/octet-stream"],["bsp","model/vnd.valve.source.compiled-map"],["btif","image/prs.btif"],["buffer","application/octet-stream"],["bz","application/x-bzip"],["bz2","application/x-bzip2"],["c","text/x-c"],["c4d","application/vnd.clonk.c4group"],["c4f","application/vnd.clonk.c4group"],["c4g","application/vnd.clonk.c4group"],["c4p","application/vnd.clonk.c4group"],["c4u","application/vnd.clonk.c4group"],["c11amc","application/vnd.cluetrust.cartomobile-config"],["c11amz","application/vnd.cluetrust.cartomobile-config-pkg"],["cab","application/vnd.ms-cab-compressed"],["caf","audio/x-caf"],["cap","application/vnd.tcpdump.pcap"],["car","application/vnd.curl.car"],["cat","application/vnd.ms-pki.seccat"],["cb7","application/x-cbr"],["cba","application/x-cbr"],["cbr","application/x-cbr"],["cbt","application/x-cbr"],["cbz","application/x-cbr"],["cc","text/x-c"],["cco","application/x-cocoa"],["cct","application/x-director"],["ccxml","application/ccxml+xml"],["cdbcmsg","application/vnd.contact.cmsg"],["cda","application/x-cdf"],["cdf","application/x-netcdf"],["cdfx","application/cdfx+xml"],["cdkey","application/vnd.mediastation.cdkey"],["cdmia","application/cdmi-capability"],["cdmic","application/cdmi-container"],["cdmid","application/cdmi-domain"],["cdmio","application/cdmi-object"],["cdmiq","application/cdmi-queue"],["cdr","application/cdr"],["cdx","chemical/x-cdx"],["cdxml","application/vnd.chemdraw+xml"],["cdy","application/vnd.cinderella"],["cer","application/pkix-cert"],["cfs","application/x-cfs-compressed"],["cgm","image/cgm"],["chat","application/x-chat"],["chm","application/vnd.ms-htmlhelp"],["chrt","application/vnd.kde.kchart"],["cif","chemical/x-cif"],["cii","application/vnd.anser-web-certificate-issue-initiation"],["cil","application/vnd.ms-artgalry"],["cjs","application/node"],["cla","application/vnd.claymore"],["class","application/octet-stream"],["clkk","application/vnd.crick.clicker.keyboard"],["clkp","application/vnd.crick.clicker.palette"],["clkt","application/vnd.crick.clicker.template"],["clkw","application/vnd.crick.clicker.wordbank"],["clkx","application/vnd.crick.clicker"],["clp","application/x-msclip"],["cmc","application/vnd.cosmocaller"],["cmdf","chemical/x-cmdf"],["cml","chemical/x-cml"],["cmp","application/vnd.yellowriver-custom-menu"],["cmx","image/x-cmx"],["cod","application/vnd.rim.cod"],["coffee","text/coffeescript"],["com","application/x-msdownload"],["conf","text/plain"],["cpio","application/x-cpio"],["cpp","text/x-c"],["cpt","application/mac-compactpro"],["crd","application/x-mscardfile"],["crl","application/pkix-crl"],["crt","application/x-x509-ca-cert"],["crx","application/x-chrome-extension"],["cryptonote","application/vnd.rig.cryptonote"],["csh","application/x-csh"],["csl","application/vnd.citationstyles.style+xml"],["csml","chemical/x-csml"],["csp","application/vnd.commonspace"],["csr","application/octet-stream"],["css","text/css"],["cst","application/x-director"],["csv","text/csv"],["cu","application/cu-seeme"],["curl","text/vnd.curl"],["cww","application/prs.cww"],["cxt","application/x-director"],["cxx","text/x-c"],["dae","model/vnd.collada+xml"],["daf","application/vnd.mobius.daf"],["dart","application/vnd.dart"],["dataless","application/vnd.fdsn.seed"],["davmount","application/davmount+xml"],["dbf","application/vnd.dbf"],["dbk","application/docbook+xml"],["dcr","application/x-director"],["dcurl","text/vnd.curl.dcurl"],["dd2","application/vnd.oma.dd2+xml"],["ddd","application/vnd.fujixerox.ddd"],["ddf","application/vnd.syncml.dmddf+xml"],["dds","image/vnd.ms-dds"],["deb","application/x-debian-package"],["def","text/plain"],["deploy","application/octet-stream"],["der","application/x-x509-ca-cert"],["dfac","application/vnd.dreamfactory"],["dgc","application/x-dgc-compressed"],["dic","text/x-c"],["dir","application/x-director"],["dis","application/vnd.mobius.dis"],["disposition-notification","message/disposition-notification"],["dist","application/octet-stream"],["distz","application/octet-stream"],["djv","image/vnd.djvu"],["djvu","image/vnd.djvu"],["dll","application/octet-stream"],["dmg","application/x-apple-diskimage"],["dmn","application/octet-stream"],["dmp","application/vnd.tcpdump.pcap"],["dms","application/octet-stream"],["dna","application/vnd.dna"],["doc","application/msword"],["docm","application/vnd.ms-word.template.macroEnabled.12"],["docx","application/vnd.openxmlformats-officedocument.wordprocessingml.document"],["dot","application/msword"],["dotm","application/vnd.ms-word.template.macroEnabled.12"],["dotx","application/vnd.openxmlformats-officedocument.wordprocessingml.template"],["dp","application/vnd.osgi.dp"],["dpg","application/vnd.dpgraph"],["dra","audio/vnd.dra"],["drle","image/dicom-rle"],["dsc","text/prs.lines.tag"],["dssc","application/dssc+der"],["dtb","application/x-dtbook+xml"],["dtd","application/xml-dtd"],["dts","audio/vnd.dts"],["dtshd","audio/vnd.dts.hd"],["dump","application/octet-stream"],["dvb","video/vnd.dvb.file"],["dvi","application/x-dvi"],["dwd","application/atsc-dwd+xml"],["dwf","model/vnd.dwf"],["dwg","image/vnd.dwg"],["dxf","image/vnd.dxf"],["dxp","application/vnd.spotfire.dxp"],["dxr","application/x-director"],["ear","application/java-archive"],["ecelp4800","audio/vnd.nuera.ecelp4800"],["ecelp7470","audio/vnd.nuera.ecelp7470"],["ecelp9600","audio/vnd.nuera.ecelp9600"],["ecma","application/ecmascript"],["edm","application/vnd.novadigm.edm"],["edx","application/vnd.novadigm.edx"],["efif","application/vnd.picsel"],["ei6","application/vnd.pg.osasli"],["elc","application/octet-stream"],["emf","image/emf"],["eml","message/rfc822"],["emma","application/emma+xml"],["emotionml","application/emotionml+xml"],["emz","application/x-msmetafile"],["eol","audio/vnd.digital-winds"],["eot","application/vnd.ms-fontobject"],["eps","application/postscript"],["epub","application/epub+zip"],["es","application/ecmascript"],["es3","application/vnd.eszigno3+xml"],["esa","application/vnd.osgi.subsystem"],["esf","application/vnd.epson.esf"],["et3","application/vnd.eszigno3+xml"],["etx","text/x-setext"],["eva","application/x-eva"],["evy","application/x-envoy"],["exe","application/octet-stream"],["exi","application/exi"],["exp","application/express"],["exr","image/aces"],["ext","application/vnd.novadigm.ext"],["ez","application/andrew-inset"],["ez2","application/vnd.ezpix-album"],["ez3","application/vnd.ezpix-package"],["f","text/x-fortran"],["f4v","video/mp4"],["f77","text/x-fortran"],["f90","text/x-fortran"],["fbs","image/vnd.fastbidsheet"],["fcdt","application/vnd.adobe.formscentral.fcdt"],["fcs","application/vnd.isac.fcs"],["fdf","application/vnd.fdf"],["fdt","application/fdt+xml"],["fe_launch","application/vnd.denovo.fcselayout-link"],["fg5","application/vnd.fujitsu.oasysgp"],["fgd","application/x-director"],["fh","image/x-freehand"],["fh4","image/x-freehand"],["fh5","image/x-freehand"],["fh7","image/x-freehand"],["fhc","image/x-freehand"],["fig","application/x-xfig"],["fits","image/fits"],["flac","audio/x-flac"],["fli","video/x-fli"],["flo","application/vnd.micrografx.flo"],["flv","video/x-flv"],["flw","application/vnd.kde.kivio"],["flx","text/vnd.fmi.flexstor"],["fly","text/vnd.fly"],["fm","application/vnd.framemaker"],["fnc","application/vnd.frogans.fnc"],["fo","application/vnd.software602.filler.form+xml"],["for","text/x-fortran"],["fpx","image/vnd.fpx"],["frame","application/vnd.framemaker"],["fsc","application/vnd.fsc.weblaunch"],["fst","image/vnd.fst"],["ftc","application/vnd.fluxtime.clip"],["fti","application/vnd.anser-web-funds-transfer-initiation"],["fvt","video/vnd.fvt"],["fxp","application/vnd.adobe.fxp"],["fxpl","application/vnd.adobe.fxp"],["fzs","application/vnd.fuzzysheet"],["g2w","application/vnd.geoplan"],["g3","image/g3fax"],["g3w","application/vnd.geospace"],["gac","application/vnd.groove-account"],["gam","application/x-tads"],["gbr","application/rpki-ghostbusters"],["gca","application/x-gca-compressed"],["gdl","model/vnd.gdl"],["gdoc","application/vnd.google-apps.document"],["geo","application/vnd.dynageo"],["geojson","application/geo+json"],["gex","application/vnd.geometry-explorer"],["ggb","application/vnd.geogebra.file"],["ggt","application/vnd.geogebra.tool"],["ghf","application/vnd.groove-help"],["gif","image/gif"],["gim","application/vnd.groove-identity-message"],["glb","model/gltf-binary"],["gltf","model/gltf+json"],["gml","application/gml+xml"],["gmx","application/vnd.gmx"],["gnumeric","application/x-gnumeric"],["gpg","application/gpg-keys"],["gph","application/vnd.flographit"],["gpx","application/gpx+xml"],["gqf","application/vnd.grafeq"],["gqs","application/vnd.grafeq"],["gram","application/srgs"],["gramps","application/x-gramps-xml"],["gre","application/vnd.geometry-explorer"],["grv","application/vnd.groove-injector"],["grxml","application/srgs+xml"],["gsf","application/x-font-ghostscript"],["gsheet","application/vnd.google-apps.spreadsheet"],["gslides","application/vnd.google-apps.presentation"],["gtar","application/x-gtar"],["gtm","application/vnd.groove-tool-message"],["gtw","model/vnd.gtw"],["gv","text/vnd.graphviz"],["gxf","application/gxf"],["gxt","application/vnd.geonext"],["gz","application/gzip"],["gzip","application/gzip"],["h","text/x-c"],["h261","video/h261"],["h263","video/h263"],["h264","video/h264"],["hal","application/vnd.hal+xml"],["hbci","application/vnd.hbci"],["hbs","text/x-handlebars-template"],["hdd","application/x-virtualbox-hdd"],["hdf","application/x-hdf"],["heic","image/heic"],["heics","image/heic-sequence"],["heif","image/heif"],["heifs","image/heif-sequence"],["hej2","image/hej2k"],["held","application/atsc-held+xml"],["hh","text/x-c"],["hjson","application/hjson"],["hlp","application/winhlp"],["hpgl","application/vnd.hp-hpgl"],["hpid","application/vnd.hp-hpid"],["hps","application/vnd.hp-hps"],["hqx","application/mac-binhex40"],["hsj2","image/hsj2"],["htc","text/x-component"],["htke","application/vnd.kenameaapp"],["htm","text/html"],["html","text/html"],["hvd","application/vnd.yamaha.hv-dic"],["hvp","application/vnd.yamaha.hv-voice"],["hvs","application/vnd.yamaha.hv-script"],["i2g","application/vnd.intergeo"],["icc","application/vnd.iccprofile"],["ice","x-conference/x-cooltalk"],["icm","application/vnd.iccprofile"],["ico","image/x-icon"],["ics","text/calendar"],["ief","image/ief"],["ifb","text/calendar"],["ifm","application/vnd.shana.informed.formdata"],["iges","model/iges"],["igl","application/vnd.igloader"],["igm","application/vnd.insors.igm"],["igs","model/iges"],["igx","application/vnd.micrografx.igx"],["iif","application/vnd.shana.informed.interchange"],["img","application/octet-stream"],["imp","application/vnd.accpac.simply.imp"],["ims","application/vnd.ms-ims"],["in","text/plain"],["ini","text/plain"],["ink","application/inkml+xml"],["inkml","application/inkml+xml"],["install","application/x-install-instructions"],["iota","application/vnd.astraea-software.iota"],["ipfix","application/ipfix"],["ipk","application/vnd.shana.informed.package"],["irm","application/vnd.ibm.rights-management"],["irp","application/vnd.irepository.package+xml"],["iso","application/x-iso9660-image"],["itp","application/vnd.shana.informed.formtemplate"],["its","application/its+xml"],["ivp","application/vnd.immervision-ivp"],["ivu","application/vnd.immervision-ivu"],["jad","text/vnd.sun.j2me.app-descriptor"],["jade","text/jade"],["jam","application/vnd.jam"],["jar","application/java-archive"],["jardiff","application/x-java-archive-diff"],["java","text/x-java-source"],["jhc","image/jphc"],["jisp","application/vnd.jisp"],["jls","image/jls"],["jlt","application/vnd.hp-jlyt"],["jng","image/x-jng"],["jnlp","application/x-java-jnlp-file"],["joda","application/vnd.joost.joda-archive"],["jp2","image/jp2"],["jpe","image/jpeg"],["jpeg","image/jpeg"],["jpf","image/jpx"],["jpg","image/jpeg"],["jpg2","image/jp2"],["jpgm","video/jpm"],["jpgv","video/jpeg"],["jph","image/jph"],["jpm","video/jpm"],["jpx","image/jpx"],["js","application/javascript"],["json","application/json"],["json5","application/json5"],["jsonld","application/ld+json"],["jsonl","application/jsonl"],["jsonml","application/jsonml+json"],["jsx","text/jsx"],["jxr","image/jxr"],["jxra","image/jxra"],["jxrs","image/jxrs"],["jxs","image/jxs"],["jxsc","image/jxsc"],["jxsi","image/jxsi"],["jxss","image/jxss"],["kar","audio/midi"],["karbon","application/vnd.kde.karbon"],["kdb","application/octet-stream"],["kdbx","application/x-keepass2"],["key","application/x-iwork-keynote-sffkey"],["kfo","application/vnd.kde.kformula"],["kia","application/vnd.kidspiration"],["kml","application/vnd.google-earth.kml+xml"],["kmz","application/vnd.google-earth.kmz"],["kne","application/vnd.kinar"],["knp","application/vnd.kinar"],["kon","application/vnd.kde.kontour"],["kpr","application/vnd.kde.kpresenter"],["kpt","application/vnd.kde.kpresenter"],["kpxx","application/vnd.ds-keypoint"],["ksp","application/vnd.kde.kspread"],["ktr","application/vnd.kahootz"],["ktx","image/ktx"],["ktx2","image/ktx2"],["ktz","application/vnd.kahootz"],["kwd","application/vnd.kde.kword"],["kwt","application/vnd.kde.kword"],["lasxml","application/vnd.las.las+xml"],["latex","application/x-latex"],["lbd","application/vnd.llamagraphics.life-balance.desktop"],["lbe","application/vnd.llamagraphics.life-balance.exchange+xml"],["les","application/vnd.hhe.lesson-player"],["less","text/less"],["lgr","application/lgr+xml"],["lha","application/octet-stream"],["link66","application/vnd.route66.link66+xml"],["list","text/plain"],["list3820","application/vnd.ibm.modcap"],["listafp","application/vnd.ibm.modcap"],["litcoffee","text/coffeescript"],["lnk","application/x-ms-shortcut"],["log","text/plain"],["lostxml","application/lost+xml"],["lrf","application/octet-stream"],["lrm","application/vnd.ms-lrm"],["ltf","application/vnd.frogans.ltf"],["lua","text/x-lua"],["luac","application/x-lua-bytecode"],["lvp","audio/vnd.lucent.voice"],["lwp","application/vnd.lotus-wordpro"],["lzh","application/octet-stream"],["m1v","video/mpeg"],["m2a","audio/mpeg"],["m2v","video/mpeg"],["m3a","audio/mpeg"],["m3u","text/plain"],["m3u8","application/vnd.apple.mpegurl"],["m4a","audio/x-m4a"],["m4p","application/mp4"],["m4s","video/iso.segment"],["m4u","application/vnd.mpegurl"],["m4v","video/x-m4v"],["m13","application/x-msmediaview"],["m14","application/x-msmediaview"],["m21","application/mp21"],["ma","application/mathematica"],["mads","application/mads+xml"],["maei","application/mmt-aei+xml"],["mag","application/vnd.ecowin.chart"],["maker","application/vnd.framemaker"],["man","text/troff"],["manifest","text/cache-manifest"],["map","application/json"],["mar","application/octet-stream"],["markdown","text/markdown"],["mathml","application/mathml+xml"],["mb","application/mathematica"],["mbk","application/vnd.mobius.mbk"],["mbox","application/mbox"],["mc1","application/vnd.medcalcdata"],["mcd","application/vnd.mcd"],["mcurl","text/vnd.curl.mcurl"],["md","text/markdown"],["mdb","application/x-msaccess"],["mdi","image/vnd.ms-modi"],["mdx","text/mdx"],["me","text/troff"],["mesh","model/mesh"],["meta4","application/metalink4+xml"],["metalink","application/metalink+xml"],["mets","application/mets+xml"],["mfm","application/vnd.mfmp"],["mft","application/rpki-manifest"],["mgp","application/vnd.osgeo.mapguide.package"],["mgz","application/vnd.proteus.magazine"],["mid","audio/midi"],["midi","audio/midi"],["mie","application/x-mie"],["mif","application/vnd.mif"],["mime","message/rfc822"],["mj2","video/mj2"],["mjp2","video/mj2"],["mjs","application/javascript"],["mk3d","video/x-matroska"],["mka","audio/x-matroska"],["mkd","text/x-markdown"],["mks","video/x-matroska"],["mkv","video/x-matroska"],["mlp","application/vnd.dolby.mlp"],["mmd","application/vnd.chipnuts.karaoke-mmd"],["mmf","application/vnd.smaf"],["mml","text/mathml"],["mmr","image/vnd.fujixerox.edmics-mmr"],["mng","video/x-mng"],["mny","application/x-msmoney"],["mobi","application/x-mobipocket-ebook"],["mods","application/mods+xml"],["mov","video/quicktime"],["movie","video/x-sgi-movie"],["mp2","audio/mpeg"],["mp2a","audio/mpeg"],["mp3","audio/mpeg"],["mp4","video/mp4"],["mp4a","audio/mp4"],["mp4s","application/mp4"],["mp4v","video/mp4"],["mp21","application/mp21"],["mpc","application/vnd.mophun.certificate"],["mpd","application/dash+xml"],["mpe","video/mpeg"],["mpeg","video/mpeg"],["mpg","video/mpeg"],["mpg4","video/mp4"],["mpga","audio/mpeg"],["mpkg","application/vnd.apple.installer+xml"],["mpm","application/vnd.blueice.multipass"],["mpn","application/vnd.mophun.application"],["mpp","application/vnd.ms-project"],["mpt","application/vnd.ms-project"],["mpy","application/vnd.ibm.minipay"],["mqy","application/vnd.mobius.mqy"],["mrc","application/marc"],["mrcx","application/marcxml+xml"],["ms","text/troff"],["mscml","application/mediaservercontrol+xml"],["mseed","application/vnd.fdsn.mseed"],["mseq","application/vnd.mseq"],["msf","application/vnd.epson.msf"],["msg","application/vnd.ms-outlook"],["msh","model/mesh"],["msi","application/x-msdownload"],["msl","application/vnd.mobius.msl"],["msm","application/octet-stream"],["msp","application/octet-stream"],["msty","application/vnd.muvee.style"],["mtl","model/mtl"],["mts","model/vnd.mts"],["mus","application/vnd.musician"],["musd","application/mmt-usd+xml"],["musicxml","application/vnd.recordare.musicxml+xml"],["mvb","application/x-msmediaview"],["mvt","application/vnd.mapbox-vector-tile"],["mwf","application/vnd.mfer"],["mxf","application/mxf"],["mxl","application/vnd.recordare.musicxml"],["mxmf","audio/mobile-xmf"],["mxml","application/xv+xml"],["mxs","application/vnd.triscape.mxs"],["mxu","video/vnd.mpegurl"],["n-gage","application/vnd.nokia.n-gage.symbian.install"],["n3","text/n3"],["nb","application/mathematica"],["nbp","application/vnd.wolfram.player"],["nc","application/x-netcdf"],["ncx","application/x-dtbncx+xml"],["nfo","text/x-nfo"],["ngdat","application/vnd.nokia.n-gage.data"],["nitf","application/vnd.nitf"],["nlu","application/vnd.neurolanguage.nlu"],["nml","application/vnd.enliven"],["nnd","application/vnd.noblenet-directory"],["nns","application/vnd.noblenet-sealer"],["nnw","application/vnd.noblenet-web"],["npx","image/vnd.net-fpx"],["nq","application/n-quads"],["nsc","application/x-conference"],["nsf","application/vnd.lotus-notes"],["nt","application/n-triples"],["ntf","application/vnd.nitf"],["numbers","application/x-iwork-numbers-sffnumbers"],["nzb","application/x-nzb"],["oa2","application/vnd.fujitsu.oasys2"],["oa3","application/vnd.fujitsu.oasys3"],["oas","application/vnd.fujitsu.oasys"],["obd","application/x-msbinder"],["obgx","application/vnd.openblox.game+xml"],["obj","model/obj"],["oda","application/oda"],["odb","application/vnd.oasis.opendocument.database"],["odc","application/vnd.oasis.opendocument.chart"],["odf","application/vnd.oasis.opendocument.formula"],["odft","application/vnd.oasis.opendocument.formula-template"],["odg","application/vnd.oasis.opendocument.graphics"],["odi","application/vnd.oasis.opendocument.image"],["odm","application/vnd.oasis.opendocument.text-master"],["odp","application/vnd.oasis.opendocument.presentation"],["ods","application/vnd.oasis.opendocument.spreadsheet"],["odt","application/vnd.oasis.opendocument.text"],["oga","audio/ogg"],["ogex","model/vnd.opengex"],["ogg","audio/ogg"],["ogv","video/ogg"],["ogx","application/ogg"],["omdoc","application/omdoc+xml"],["onepkg","application/onenote"],["onetmp","application/onenote"],["onetoc","application/onenote"],["onetoc2","application/onenote"],["opf","application/oebps-package+xml"],["opml","text/x-opml"],["oprc","application/vnd.palm"],["opus","audio/ogg"],["org","text/x-org"],["osf","application/vnd.yamaha.openscoreformat"],["osfpvg","application/vnd.yamaha.openscoreformat.osfpvg+xml"],["osm","application/vnd.openstreetmap.data+xml"],["otc","application/vnd.oasis.opendocument.chart-template"],["otf","font/otf"],["otg","application/vnd.oasis.opendocument.graphics-template"],["oth","application/vnd.oasis.opendocument.text-web"],["oti","application/vnd.oasis.opendocument.image-template"],["otp","application/vnd.oasis.opendocument.presentation-template"],["ots","application/vnd.oasis.opendocument.spreadsheet-template"],["ott","application/vnd.oasis.opendocument.text-template"],["ova","application/x-virtualbox-ova"],["ovf","application/x-virtualbox-ovf"],["owl","application/rdf+xml"],["oxps","application/oxps"],["oxt","application/vnd.openofficeorg.extension"],["p","text/x-pascal"],["p7a","application/x-pkcs7-signature"],["p7b","application/x-pkcs7-certificates"],["p7c","application/pkcs7-mime"],["p7m","application/pkcs7-mime"],["p7r","application/x-pkcs7-certreqresp"],["p7s","application/pkcs7-signature"],["p8","application/pkcs8"],["p10","application/x-pkcs10"],["p12","application/x-pkcs12"],["pac","application/x-ns-proxy-autoconfig"],["pages","application/x-iwork-pages-sffpages"],["pas","text/x-pascal"],["paw","application/vnd.pawaafile"],["pbd","application/vnd.powerbuilder6"],["pbm","image/x-portable-bitmap"],["pcap","application/vnd.tcpdump.pcap"],["pcf","application/x-font-pcf"],["pcl","application/vnd.hp-pcl"],["pclxl","application/vnd.hp-pclxl"],["pct","image/x-pict"],["pcurl","application/vnd.curl.pcurl"],["pcx","image/x-pcx"],["pdb","application/x-pilot"],["pde","text/x-processing"],["pdf","application/pdf"],["pem","application/x-x509-user-cert"],["pfa","application/x-font-type1"],["pfb","application/x-font-type1"],["pfm","application/x-font-type1"],["pfr","application/font-tdpfr"],["pfx","application/x-pkcs12"],["pgm","image/x-portable-graymap"],["pgn","application/x-chess-pgn"],["pgp","application/pgp"],["php","application/x-httpd-php"],["php3","application/x-httpd-php"],["php4","application/x-httpd-php"],["phps","application/x-httpd-php-source"],["phtml","application/x-httpd-php"],["pic","image/x-pict"],["pkg","application/octet-stream"],["pki","application/pkixcmp"],["pkipath","application/pkix-pkipath"],["pkpass","application/vnd.apple.pkpass"],["pl","application/x-perl"],["plb","application/vnd.3gpp.pic-bw-large"],["plc","application/vnd.mobius.plc"],["plf","application/vnd.pocketlearn"],["pls","application/pls+xml"],["pm","application/x-perl"],["pml","application/vnd.ctc-posml"],["png","image/png"],["pnm","image/x-portable-anymap"],["portpkg","application/vnd.macports.portpkg"],["pot","application/vnd.ms-powerpoint"],["potm","application/vnd.ms-powerpoint.presentation.macroEnabled.12"],["potx","application/vnd.openxmlformats-officedocument.presentationml.template"],["ppa","application/vnd.ms-powerpoint"],["ppam","application/vnd.ms-powerpoint.addin.macroEnabled.12"],["ppd","application/vnd.cups-ppd"],["ppm","image/x-portable-pixmap"],["pps","application/vnd.ms-powerpoint"],["ppsm","application/vnd.ms-powerpoint.slideshow.macroEnabled.12"],["ppsx","application/vnd.openxmlformats-officedocument.presentationml.slideshow"],["ppt","application/powerpoint"],["pptm","application/vnd.ms-powerpoint.presentation.macroEnabled.12"],["pptx","application/vnd.openxmlformats-officedocument.presentationml.presentation"],["pqa","application/vnd.palm"],["prc","application/x-pilot"],["pre","application/vnd.lotus-freelance"],["prf","application/pics-rules"],["provx","application/provenance+xml"],["ps","application/postscript"],["psb","application/vnd.3gpp.pic-bw-small"],["psd","application/x-photoshop"],["psf","application/x-font-linux-psf"],["pskcxml","application/pskc+xml"],["pti","image/prs.pti"],["ptid","application/vnd.pvi.ptid1"],["pub","application/x-mspublisher"],["pvb","application/vnd.3gpp.pic-bw-var"],["pwn","application/vnd.3m.post-it-notes"],["pya","audio/vnd.ms-playready.media.pya"],["pyv","video/vnd.ms-playready.media.pyv"],["qam","application/vnd.epson.quickanime"],["qbo","application/vnd.intu.qbo"],["qfx","application/vnd.intu.qfx"],["qps","application/vnd.publishare-delta-tree"],["qt","video/quicktime"],["qwd","application/vnd.quark.quarkxpress"],["qwt","application/vnd.quark.quarkxpress"],["qxb","application/vnd.quark.quarkxpress"],["qxd","application/vnd.quark.quarkxpress"],["qxl","application/vnd.quark.quarkxpress"],["qxt","application/vnd.quark.quarkxpress"],["ra","audio/x-realaudio"],["ram","audio/x-pn-realaudio"],["raml","application/raml+yaml"],["rapd","application/route-apd+xml"],["rar","application/x-rar"],["ras","image/x-cmu-raster"],["rcprofile","application/vnd.ipunplugged.rcprofile"],["rdf","application/rdf+xml"],["rdz","application/vnd.data-vision.rdz"],["relo","application/p2p-overlay+xml"],["rep","application/vnd.businessobjects"],["res","application/x-dtbresource+xml"],["rgb","image/x-rgb"],["rif","application/reginfo+xml"],["rip","audio/vnd.rip"],["ris","application/x-research-info-systems"],["rl","application/resource-lists+xml"],["rlc","image/vnd.fujixerox.edmics-rlc"],["rld","application/resource-lists-diff+xml"],["rm","audio/x-pn-realaudio"],["rmi","audio/midi"],["rmp","audio/x-pn-realaudio-plugin"],["rms","application/vnd.jcp.javame.midlet-rms"],["rmvb","application/vnd.rn-realmedia-vbr"],["rnc","application/relax-ng-compact-syntax"],["rng","application/xml"],["roa","application/rpki-roa"],["roff","text/troff"],["rp9","application/vnd.cloanto.rp9"],["rpm","audio/x-pn-realaudio-plugin"],["rpss","application/vnd.nokia.radio-presets"],["rpst","application/vnd.nokia.radio-preset"],["rq","application/sparql-query"],["rs","application/rls-services+xml"],["rsa","application/x-pkcs7"],["rsat","application/atsc-rsat+xml"],["rsd","application/rsd+xml"],["rsheet","application/urc-ressheet+xml"],["rss","application/rss+xml"],["rtf","text/rtf"],["rtx","text/richtext"],["run","application/x-makeself"],["rusd","application/route-usd+xml"],["rv","video/vnd.rn-realvideo"],["s","text/x-asm"],["s3m","audio/s3m"],["saf","application/vnd.yamaha.smaf-audio"],["sass","text/x-sass"],["sbml","application/sbml+xml"],["sc","application/vnd.ibm.secure-container"],["scd","application/x-msschedule"],["scm","application/vnd.lotus-screencam"],["scq","application/scvp-cv-request"],["scs","application/scvp-cv-response"],["scss","text/x-scss"],["scurl","text/vnd.curl.scurl"],["sda","application/vnd.stardivision.draw"],["sdc","application/vnd.stardivision.calc"],["sdd","application/vnd.stardivision.impress"],["sdkd","application/vnd.solent.sdkm+xml"],["sdkm","application/vnd.solent.sdkm+xml"],["sdp","application/sdp"],["sdw","application/vnd.stardivision.writer"],["sea","application/octet-stream"],["see","application/vnd.seemail"],["seed","application/vnd.fdsn.seed"],["sema","application/vnd.sema"],["semd","application/vnd.semd"],["semf","application/vnd.semf"],["senmlx","application/senml+xml"],["sensmlx","application/sensml+xml"],["ser","application/java-serialized-object"],["setpay","application/set-payment-initiation"],["setreg","application/set-registration-initiation"],["sfd-hdstx","application/vnd.hydrostatix.sof-data"],["sfs","application/vnd.spotfire.sfs"],["sfv","text/x-sfv"],["sgi","image/sgi"],["sgl","application/vnd.stardivision.writer-global"],["sgm","text/sgml"],["sgml","text/sgml"],["sh","application/x-sh"],["shar","application/x-shar"],["shex","text/shex"],["shf","application/shf+xml"],["shtml","text/html"],["sid","image/x-mrsid-image"],["sieve","application/sieve"],["sig","application/pgp-signature"],["sil","audio/silk"],["silo","model/mesh"],["sis","application/vnd.symbian.install"],["sisx","application/vnd.symbian.install"],["sit","application/x-stuffit"],["sitx","application/x-stuffitx"],["siv","application/sieve"],["skd","application/vnd.koan"],["skm","application/vnd.koan"],["skp","application/vnd.koan"],["skt","application/vnd.koan"],["sldm","application/vnd.ms-powerpoint.slide.macroenabled.12"],["sldx","application/vnd.openxmlformats-officedocument.presentationml.slide"],["slim","text/slim"],["slm","text/slim"],["sls","application/route-s-tsid+xml"],["slt","application/vnd.epson.salt"],["sm","application/vnd.stepmania.stepchart"],["smf","application/vnd.stardivision.math"],["smi","application/smil"],["smil","application/smil"],["smv","video/x-smv"],["smzip","application/vnd.stepmania.package"],["snd","audio/basic"],["snf","application/x-font-snf"],["so","application/octet-stream"],["spc","application/x-pkcs7-certificates"],["spdx","text/spdx"],["spf","application/vnd.yamaha.smaf-phrase"],["spl","application/x-futuresplash"],["spot","text/vnd.in3d.spot"],["spp","application/scvp-vp-response"],["spq","application/scvp-vp-request"],["spx","audio/ogg"],["sql","application/x-sql"],["src","application/x-wais-source"],["srt","application/x-subrip"],["sru","application/sru+xml"],["srx","application/sparql-results+xml"],["ssdl","application/ssdl+xml"],["sse","application/vnd.kodak-descriptor"],["ssf","application/vnd.epson.ssf"],["ssml","application/ssml+xml"],["sst","application/octet-stream"],["st","application/vnd.sailingtracker.track"],["stc","application/vnd.sun.xml.calc.template"],["std","application/vnd.sun.xml.draw.template"],["stf","application/vnd.wt.stf"],["sti","application/vnd.sun.xml.impress.template"],["stk","application/hyperstudio"],["stl","model/stl"],["stpx","model/step+xml"],["stpxz","model/step-xml+zip"],["stpz","model/step+zip"],["str","application/vnd.pg.format"],["stw","application/vnd.sun.xml.writer.template"],["styl","text/stylus"],["stylus","text/stylus"],["sub","text/vnd.dvb.subtitle"],["sus","application/vnd.sus-calendar"],["susp","application/vnd.sus-calendar"],["sv4cpio","application/x-sv4cpio"],["sv4crc","application/x-sv4crc"],["svc","application/vnd.dvb.service"],["svd","application/vnd.svd"],["svg","image/svg+xml"],["svgz","image/svg+xml"],["swa","application/x-director"],["swf","application/x-shockwave-flash"],["swi","application/vnd.aristanetworks.swi"],["swidtag","application/swid+xml"],["sxc","application/vnd.sun.xml.calc"],["sxd","application/vnd.sun.xml.draw"],["sxg","application/vnd.sun.xml.writer.global"],["sxi","application/vnd.sun.xml.impress"],["sxm","application/vnd.sun.xml.math"],["sxw","application/vnd.sun.xml.writer"],["t","text/troff"],["t3","application/x-t3vm-image"],["t38","image/t38"],["taglet","application/vnd.mynfc"],["tao","application/vnd.tao.intent-module-archive"],["tap","image/vnd.tencent.tap"],["tar","application/x-tar"],["tcap","application/vnd.3gpp2.tcap"],["tcl","application/x-tcl"],["td","application/urc-targetdesc+xml"],["teacher","application/vnd.smart.teacher"],["tei","application/tei+xml"],["teicorpus","application/tei+xml"],["tex","application/x-tex"],["texi","application/x-texinfo"],["texinfo","application/x-texinfo"],["text","text/plain"],["tfi","application/thraud+xml"],["tfm","application/x-tex-tfm"],["tfx","image/tiff-fx"],["tga","image/x-tga"],["tgz","application/x-tar"],["thmx","application/vnd.ms-officetheme"],["tif","image/tiff"],["tiff","image/tiff"],["tk","application/x-tcl"],["tmo","application/vnd.tmobile-livetv"],["toml","application/toml"],["torrent","application/x-bittorrent"],["tpl","application/vnd.groove-tool-template"],["tpt","application/vnd.trid.tpt"],["tr","text/troff"],["tra","application/vnd.trueapp"],["trig","application/trig"],["trm","application/x-msterminal"],["ts","video/mp2t"],["tsd","application/timestamped-data"],["tsv","text/tab-separated-values"],["ttc","font/collection"],["ttf","font/ttf"],["ttl","text/turtle"],["ttml","application/ttml+xml"],["twd","application/vnd.simtech-mindmapper"],["twds","application/vnd.simtech-mindmapper"],["txd","application/vnd.genomatix.tuxedo"],["txf","application/vnd.mobius.txf"],["txt","text/plain"],["u8dsn","message/global-delivery-status"],["u8hdr","message/global-headers"],["u8mdn","message/global-disposition-notification"],["u8msg","message/global"],["u32","application/x-authorware-bin"],["ubj","application/ubjson"],["udeb","application/x-debian-package"],["ufd","application/vnd.ufdl"],["ufdl","application/vnd.ufdl"],["ulx","application/x-glulx"],["umj","application/vnd.umajin"],["unityweb","application/vnd.unity"],["uoml","application/vnd.uoml+xml"],["uri","text/uri-list"],["uris","text/uri-list"],["urls","text/uri-list"],["usdz","model/vnd.usdz+zip"],["ustar","application/x-ustar"],["utz","application/vnd.uiq.theme"],["uu","text/x-uuencode"],["uva","audio/vnd.dece.audio"],["uvd","application/vnd.dece.data"],["uvf","application/vnd.dece.data"],["uvg","image/vnd.dece.graphic"],["uvh","video/vnd.dece.hd"],["uvi","image/vnd.dece.graphic"],["uvm","video/vnd.dece.mobile"],["uvp","video/vnd.dece.pd"],["uvs","video/vnd.dece.sd"],["uvt","application/vnd.dece.ttml+xml"],["uvu","video/vnd.uvvu.mp4"],["uvv","video/vnd.dece.video"],["uvva","audio/vnd.dece.audio"],["uvvd","application/vnd.dece.data"],["uvvf","application/vnd.dece.data"],["uvvg","image/vnd.dece.graphic"],["uvvh","video/vnd.dece.hd"],["uvvi","image/vnd.dece.graphic"],["uvvm","video/vnd.dece.mobile"],["uvvp","video/vnd.dece.pd"],["uvvs","video/vnd.dece.sd"],["uvvt","application/vnd.dece.ttml+xml"],["uvvu","video/vnd.uvvu.mp4"],["uvvv","video/vnd.dece.video"],["uvvx","application/vnd.dece.unspecified"],["uvvz","application/vnd.dece.zip"],["uvx","application/vnd.dece.unspecified"],["uvz","application/vnd.dece.zip"],["vbox","application/x-virtualbox-vbox"],["vbox-extpack","application/x-virtualbox-vbox-extpack"],["vcard","text/vcard"],["vcd","application/x-cdlink"],["vcf","text/x-vcard"],["vcg","application/vnd.groove-vcard"],["vcs","text/x-vcalendar"],["vcx","application/vnd.vcx"],["vdi","application/x-virtualbox-vdi"],["vds","model/vnd.sap.vds"],["vhd","application/x-virtualbox-vhd"],["vis","application/vnd.visionary"],["viv","video/vnd.vivo"],["vlc","application/videolan"],["vmdk","application/x-virtualbox-vmdk"],["vob","video/x-ms-vob"],["vor","application/vnd.stardivision.writer"],["vox","application/x-authorware-bin"],["vrml","model/vrml"],["vsd","application/vnd.visio"],["vsf","application/vnd.vsf"],["vss","application/vnd.visio"],["vst","application/vnd.visio"],["vsw","application/vnd.visio"],["vtf","image/vnd.valve.source.texture"],["vtt","text/vtt"],["vtu","model/vnd.vtu"],["vxml","application/voicexml+xml"],["w3d","application/x-director"],["wad","application/x-doom"],["wadl","application/vnd.sun.wadl+xml"],["war","application/java-archive"],["wasm","application/wasm"],["wav","audio/x-wav"],["wax","audio/x-ms-wax"],["wbmp","image/vnd.wap.wbmp"],["wbs","application/vnd.criticaltools.wbs+xml"],["wbxml","application/wbxml"],["wcm","application/vnd.ms-works"],["wdb","application/vnd.ms-works"],["wdp","image/vnd.ms-photo"],["weba","audio/webm"],["webapp","application/x-web-app-manifest+json"],["webm","video/webm"],["webmanifest","application/manifest+json"],["webp","image/webp"],["wg","application/vnd.pmi.widget"],["wgt","application/widget"],["wks","application/vnd.ms-works"],["wm","video/x-ms-wm"],["wma","audio/x-ms-wma"],["wmd","application/x-ms-wmd"],["wmf","image/wmf"],["wml","text/vnd.wap.wml"],["wmlc","application/wmlc"],["wmls","text/vnd.wap.wmlscript"],["wmlsc","application/vnd.wap.wmlscriptc"],["wmv","video/x-ms-wmv"],["wmx","video/x-ms-wmx"],["wmz","application/x-msmetafile"],["woff","font/woff"],["woff2","font/woff2"],["word","application/msword"],["wpd","application/vnd.wordperfect"],["wpl","application/vnd.ms-wpl"],["wps","application/vnd.ms-works"],["wqd","application/vnd.wqd"],["wri","application/x-mswrite"],["wrl","model/vrml"],["wsc","message/vnd.wfa.wsc"],["wsdl","application/wsdl+xml"],["wspolicy","application/wspolicy+xml"],["wtb","application/vnd.webturbo"],["wvx","video/x-ms-wvx"],["x3d","model/x3d+xml"],["x3db","model/x3d+fastinfoset"],["x3dbz","model/x3d+binary"],["x3dv","model/x3d-vrml"],["x3dvz","model/x3d+vrml"],["x3dz","model/x3d+xml"],["x32","application/x-authorware-bin"],["x_b","model/vnd.parasolid.transmit.binary"],["x_t","model/vnd.parasolid.transmit.text"],["xaml","application/xaml+xml"],["xap","application/x-silverlight-app"],["xar","application/vnd.xara"],["xav","application/xcap-att+xml"],["xbap","application/x-ms-xbap"],["xbd","application/vnd.fujixerox.docuworks.binder"],["xbm","image/x-xbitmap"],["xca","application/xcap-caps+xml"],["xcs","application/calendar+xml"],["xdf","application/xcap-diff+xml"],["xdm","application/vnd.syncml.dm+xml"],["xdp","application/vnd.adobe.xdp+xml"],["xdssc","application/dssc+xml"],["xdw","application/vnd.fujixerox.docuworks"],["xel","application/xcap-el+xml"],["xenc","application/xenc+xml"],["xer","application/patch-ops-error+xml"],["xfdf","application/vnd.adobe.xfdf"],["xfdl","application/vnd.xfdl"],["xht","application/xhtml+xml"],["xhtml","application/xhtml+xml"],["xhvml","application/xv+xml"],["xif","image/vnd.xiff"],["xl","application/excel"],["xla","application/vnd.ms-excel"],["xlam","application/vnd.ms-excel.addin.macroEnabled.12"],["xlc","application/vnd.ms-excel"],["xlf","application/xliff+xml"],["xlm","application/vnd.ms-excel"],["xls","application/vnd.ms-excel"],["xlsb","application/vnd.ms-excel.sheet.binary.macroEnabled.12"],["xlsm","application/vnd.ms-excel.sheet.macroEnabled.12"],["xlsx","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"],["xlt","application/vnd.ms-excel"],["xltm","application/vnd.ms-excel.template.macroEnabled.12"],["xltx","application/vnd.openxmlformats-officedocument.spreadsheetml.template"],["xlw","application/vnd.ms-excel"],["xm","audio/xm"],["xml","application/xml"],["xns","application/xcap-ns+xml"],["xo","application/vnd.olpc-sugar"],["xop","application/xop+xml"],["xpi","application/x-xpinstall"],["xpl","application/xproc+xml"],["xpm","image/x-xpixmap"],["xpr","application/vnd.is-xpr"],["xps","application/vnd.ms-xpsdocument"],["xpw","application/vnd.intercon.formnet"],["xpx","application/vnd.intercon.formnet"],["xsd","application/xml"],["xsl","application/xml"],["xslt","application/xslt+xml"],["xsm","application/vnd.syncml+xml"],["xspf","application/xspf+xml"],["xul","application/vnd.mozilla.xul+xml"],["xvm","application/xv+xml"],["xvml","application/xv+xml"],["xwd","image/x-xwindowdump"],["xyz","chemical/x-xyz"],["xz","application/x-xz"],["yaml","text/yaml"],["yang","application/yang"],["yin","application/yin+xml"],["yml","text/yaml"],["ymp","text/x-suse-ymp"],["z","application/x-compress"],["z1","application/x-zmachine"],["z2","application/x-zmachine"],["z3","application/x-zmachine"],["z4","application/x-zmachine"],["z5","application/x-zmachine"],["z6","application/x-zmachine"],["z7","application/x-zmachine"],["z8","application/x-zmachine"],["zaz","application/vnd.zzazz.deck+xml"],["zip","application/zip"],["zir","application/vnd.zul"],["zirz","application/vnd.zul"],["zmm","application/vnd.handheld-entertainment+xml"],["zsh","text/x-scriptzsh"]]);function Fe(e,n,t){const i=so(e),{webkitRelativePath:o}=e,a=typeof n=="string"?n:typeof o=="string"&&o.length>0?o:`./${e.name}`;return typeof i.path!="string"&&wn(i,"path",a),wn(i,"relativePath",a),i}function so(e){const{name:n}=e;if(n&&n.lastIndexOf(".")!==-1&&!e.type){const i=n.split(".").pop().toLowerCase(),o=lo.get(i);o&&Object.defineProperty(e,"type",{value:o,writable:!1,configurable:!1,enumerable:!0})}return e}function wn(e,n,t){Object.defineProperty(e,n,{value:t,writable:!1,configurable:!1,enumerable:!0})}const co=[".DS_Store","Thumbs.db"];function po(e){return _e(this,void 0,void 0,function*(){return Le(e)&&uo(e.dataTransfer)?vo(e.dataTransfer,e.type):go(e)?fo(e):Array.isArray(e)&&e.every(n=>"getFile"in n&&typeof n.getFile=="function")?mo(e):[]})}function uo(e){return Le(e)}function go(e){return Le(e)&&Le(e.target)}function Le(e){return typeof e=="object"&&e!==null}function fo(e){return gt(e.target.files).map(n=>Fe(n))}function mo(e){return _e(this,void 0,void 0,function*(){return(yield Promise.all(e.map(t=>t.getFile()))).map(t=>Fe(t))})}function vo(e,n){return _e(this,void 0,void 0,function*(){if(e.items){const t=gt(e.items).filter(o=>o.kind==="file");if(n!=="drop")return t;const i=yield Promise.all(t.map(xo));return yn(bn(i))}return yn(gt(e.files).map(t=>Fe(t)))})}function yn(e){return e.filter(n=>co.indexOf(n.name)===-1)}function gt(e){if(e===null)return[];const n=[];for(let t=0;t<e.length;t++){const i=e[t];n.push(i)}return n}function xo(e){if(typeof e.webkitGetAsEntry!="function")return Sn(e);const n=e.webkitGetAsEntry();return n&&n.isDirectory?Cn(n):Sn(e,n)}function bn(e){return e.reduce((n,t)=>[...n,...Array.isArray(t)?bn(t):[t]],[])}function Sn(e,n){return _e(this,void 0,void 0,function*(){var t;if(globalThis.isSecureContext&&typeof e.getAsFileSystemHandle=="function"){const a=yield e.getAsFileSystemHandle();if(a===null)throw new Error(`${e} is not a File`);if(a!==void 0){const r=yield a.getFile();return r.handle=a,Fe(r)}}const i=e.getAsFile();if(!i)throw new Error(`${e} is not a File`);return Fe(i,(t=n==null?void 0:n.fullPath)!==null&&t!==void 0?t:void 0)})}function ho(e){return _e(this,void 0,void 0,function*(){return e.isDirectory?Cn(e):wo(e)})}function Cn(e){const n=e.createReader();return new Promise((t,i)=>{const o=[];function a(){n.readEntries(r=>_e(this,void 0,void 0,function*(){if(r.length){const l=Promise.all(r.map(ho));o.push(l),a()}else try{const l=yield Promise.all(o);t(l)}catch(l){i(l)}}),r=>{i(r)})}a()})}function wo(e){return _e(this,void 0,void 0,function*(){return new Promise((n,t)=>{e.file(i=>{const o=Fe(i,e.fullPath);n(o)},i=>{t(i)})})})}var He={},_n;function yo(){return _n||(_n=1,He.__esModule=!0,He.default=function(e,n){if(e&&n){var t=Array.isArray(n)?n:n.split(",");if(t.length===0)return!0;var i=e.name||"",o=(e.type||"").toLowerCase(),a=o.replace(/\/.*$/,"");return t.some(function(r){var l=r.trim().toLowerCase();return l.charAt(0)==="."?i.toLowerCase().endsWith(l):l.endsWith("/*")?a===l.replace(/\/.*$/,""):o===l})}return!0}),He}var bo=yo();const ft=et(bo);function En(e){return _o(e)||Co(e)||In(e)||So()}function So(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
31
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function
|
|
32
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function In(e,n){if(e){if(typeof e=="string")return mt(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);if(t==="Object"&&e.constructor&&(t=e.constructor.name),t==="Map"||t==="Set")return Array.from(e);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return mt(e,n)}}function mt(e,n){(n==null||n>e.length)&&(n=e.length);for(var t=0,i=new Array(n);t<n;t++)i[t]=e[t];return i}function
|
|
33
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function
|
|
34
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Tn(e,n){if(e){if(typeof e=="string")return xt(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);if(t==="Object"&&e.constructor&&(t=e.constructor.name),t==="Map"||t==="Set")return Array.from(e);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return xt(e,n)}}function xt(e,n){(n==null||n>e.length)&&(n=e.length);for(var t=0,i=new Array(n);t<n;t++)i[t]=e[t];return i}function Zo(e,n){var t=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(t!=null){var i=[],o=!0,a=!1,r,l;try{for(t=t.call(e);!(o=(r=t.next()).done)&&(i.push(r.value),!(n&&i.length===n));o=!0);}catch(s){a=!0,l=s}finally{try{!o&&t.return!=null&&t.return()}finally{if(a)throw l}}return i}}function ea(e){if(Array.isArray(e))return e}function zn(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),t.push.apply(t,i)}return t}function te(e){for(var n=1;n<arguments.length;n++){var t=arguments[n]!=null?arguments[n]:{};n%2?zn(Object(t),!0).forEach(function(i){ht(e,i,t[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):zn(Object(t)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(t,i))})}return e}function ht(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function Be(e,n){if(e==null)return{};var t=ta(e,n),i,o;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(o=0;o<a.length;o++)i=a[o],!(n.indexOf(i)>=0)&&Object.prototype.propertyIsEnumerable.call(e,i)&&(t[i]=e[i])}return t}function ta(e,n){if(e==null)return{};var t={},i=Object.keys(e),o,a;for(a=0;a<i.length;a++)o=i[a],!(n.indexOf(o)>=0)&&(t[o]=e[o]);return t}var wt=h.forwardRef(function(e,n){var t=e.children,i=Be(e,Go),o=Nn(i),a=o.open,r=Be(o,Bo);return h.useImperativeHandle(n,function(){return{open:a}},[a]),h.createElement(h.Fragment,null,t(te(te({},r),{},{open:a})))});wt.displayName="Dropzone";var Vn={disabled:!1,getFilesFromEvent:po,maxSize:1/0,minSize:0,multiple:!0,maxFiles:0,preventDropOnDocument:!0,noClick:!1,noKeyboard:!1,noDrag:!1,noDragEventsBubbling:!1,validator:null,useFsAccessApi:!1,autoFocus:!1};wt.defaultProps=Vn,wt.propTypes={children:X.func,accept:X.objectOf(X.arrayOf(X.string)),multiple:X.bool,preventDropOnDocument:X.bool,noClick:X.bool,noKeyboard:X.bool,noDrag:X.bool,noDragEventsBubbling:X.bool,minSize:X.number,maxSize:X.number,maxFiles:X.number,disabled:X.bool,getFilesFromEvent:X.func,onFileDialogCancel:X.func,onFileDialogOpen:X.func,useFsAccessApi:X.bool,autoFocus:X.bool,onDragEnter:X.func,onDragLeave:X.func,onDragOver:X.func,onDrop:X.func,onDropAccepted:X.func,onDropRejected:X.func,onError:X.func,validator:X.func};var yt={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,acceptedFiles:[],fileRejections:[]};function Nn(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=te(te({},Vn),e),t=n.accept,i=n.disabled,o=n.getFilesFromEvent,a=n.maxSize,r=n.minSize,l=n.multiple,s=n.maxFiles,u=n.onDragEnter,d=n.onDragLeave,f=n.onDragOver,g=n.onDrop,p=n.onDropAccepted,m=n.onDropRejected,v=n.onFileDialogCancel,I=n.onFileDialogOpen,w=n.useFsAccessApi,j=n.autoFocus,M=n.preventDropOnDocument,T=n.noClick,x=n.noKeyboard,L=n.noDrag,V=n.noDragEventsBubbling,J=n.onError,Z=n.validator,pe=h.useMemo(function(){return Lo(t)},[t]),ue=h.useMemo(function(){return No(t)},[t]),xe=h.useMemo(function(){return typeof I=="function"?I:Ln},[I]),$=h.useMemo(function(){return typeof v=="function"?v:Ln},[v]),k=h.useRef(null),B=h.useRef(null),Q=h.useReducer(na,yt),ee=vt(Q,2),se=ee[0],ne=ee[1],y=se.isFocused,P=se.isFileDialogActive,S=h.useRef(typeof window<"u"&&window.isSecureContext&&w&&Vo()),D=function(){!S.current&&P&&setTimeout(function(){if(B.current){var z=B.current.files;z.length||(ne({type:"closeDialog"}),$())}},300)};h.useEffect(function(){return window.addEventListener("focus",D,!1),function(){window.removeEventListener("focus",D,!1)}},[B,P,$,S]);var b=h.useRef([]),_=function(z){k.current&&k.current.contains(z.target)||(z.preventDefault(),b.current=[])};h.useEffect(function(){return M&&(document.addEventListener("dragover",On,!1),document.addEventListener("drop",_,!1)),function(){M&&(document.removeEventListener("dragover",On),document.removeEventListener("drop",_))}},[k,M]),h.useEffect(function(){return!i&&j&&k.current&&k.current.focus(),function(){}},[k,j,i]);var F=h.useCallback(function(E){J?J(E):console.error(E)},[J]),A=h.useCallback(function(E){E.preventDefault(),E.persist(),Je(E),b.current=[].concat(Wo(b.current),[E.target]),Ge(E)&&Promise.resolve(o(E)).then(function(z){if(!(qe(E)&&!V)){var oe=z.length,re=oe>0&&Ro({files:z,accept:pe,minSize:r,maxSize:a,multiple:l,maxFiles:s,validator:Z}),fe=oe>0&&!re;ne({isDragAccept:re,isDragReject:fe,isDragActive:!0,type:"setDraggedFiles"}),u&&u(E)}}).catch(function(z){return F(z)})},[o,u,F,V,pe,r,a,l,s,Z]),H=h.useCallback(function(E){E.preventDefault(),E.persist(),Je(E);var z=Ge(E);if(z&&E.dataTransfer)try{E.dataTransfer.dropEffect="copy"}catch{}return z&&f&&f(E),!1},[f,V]),N=h.useCallback(function(E){E.preventDefault(),E.persist(),Je(E);var z=b.current.filter(function(re){return k.current&&k.current.contains(re)}),oe=z.indexOf(E.target);oe!==-1&&z.splice(oe,1),b.current=z,!(z.length>0)&&(ne({type:"setDraggedFiles",isDragActive:!1,isDragAccept:!1,isDragReject:!1}),Ge(E)&&d&&d(E))},[k,d,V]),G=h.useCallback(function(E,z){var oe=[],re=[];E.forEach(function(fe){var Te=$n(fe,pe),Me=vt(Te,2),Vt=Me[0],Nt=Me[1],Lt=An(fe,r,a),Ze=vt(Lt,2),Ht=Ze[0],qt=Ze[1],Gt=Z?Z(fe):null;if(Vt&&Ht&&!Gt)oe.push(fe);else{var Bt=[Nt,qt];Gt&&(Bt=Bt.concat(Gt)),re.push({file:fe,errors:Bt.filter(function(cr){return cr})})}}),(!l&&oe.length>1||l&&s>=1&&oe.length>s)&&(oe.forEach(function(fe){re.push({file:fe,errors:[Oo]})}),oe.splice(0)),ne({acceptedFiles:oe,fileRejections:re,isDragReject:re.length>0,type:"setFiles"}),g&&g(oe,re,z),re.length>0&&m&&m(re,z),oe.length>0&&p&&p(oe,z)},[ne,l,pe,r,a,s,g,p,m,Z]),ie=h.useCallback(function(E){E.preventDefault(),E.persist(),Je(E),b.current=[],Ge(E)&&Promise.resolve(o(E)).then(function(z){qe(E)&&!V||G(z,E)}).catch(function(z){return F(z)}),ne({type:"reset"})},[o,G,F,V]),C=h.useCallback(function(){if(S.current){ne({type:"openDialog"}),xe();var E={multiple:l,types:ue};window.showOpenFilePicker(E).then(function(z){return o(z)}).then(function(z){G(z,null),ne({type:"closeDialog"})}).catch(function(z){Ho(z)?($(z),ne({type:"closeDialog"})):qo(z)?(S.current=!1,B.current?(B.current.value=null,B.current.click()):F(new Error("Cannot open the file picker because the https://developer.mozilla.org/en-US/docs/Web/API/File_System_Access_API is not supported and no <input> was provided."))):F(z)});return}B.current&&(ne({type:"openDialog"}),xe(),B.current.value=null,B.current.click())},[ne,xe,$,w,G,F,ue,l]),ge=h.useCallback(function(E){!k.current||!k.current.isEqualNode(E.target)||(E.key===" "||E.key==="Enter"||E.keyCode===32||E.keyCode===13)&&(E.preventDefault(),C())},[k,C]),ke=h.useCallback(function(){ne({type:"focus"})},[]),je=h.useCallback(function(){ne({type:"blur"})},[]),pi=h.useCallback(function(){T||(zo()?setTimeout(C,0):C())},[T,C]),Ie=function(z){return i?null:z},zt=function(z){return x?null:Ie(z)},Qe=function(z){return L?null:Ie(z)},Je=function(z){V&&z.stopPropagation()},rr=h.useMemo(function(){return function(){var E=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},z=E.refKey,oe=z===void 0?"ref":z,re=E.role,fe=E.onKeyDown,Te=E.onFocus,Me=E.onBlur,Vt=E.onClick,Nt=E.onDragEnter,Lt=E.onDragOver,Ze=E.onDragLeave,Ht=E.onDrop,qt=Be(E,Uo);return te(te(ht({onKeyDown:zt(he(fe,ge)),onFocus:zt(he(Te,ke)),onBlur:zt(he(Me,je)),onClick:Ie(he(Vt,pi)),onDragEnter:Qe(he(Nt,A)),onDragOver:Qe(he(Lt,H)),onDragLeave:Qe(he(Ze,N)),onDrop:Qe(he(Ht,ie)),role:typeof re=="string"&&re!==""?re:"presentation"},oe,k),!i&&!x?{tabIndex:0}:{}),qt)}},[k,ge,ke,je,pi,A,H,N,ie,x,L,i]),lr=h.useCallback(function(E){E.stopPropagation()},[]),sr=h.useMemo(function(){return function(){var E=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},z=E.refKey,oe=z===void 0?"ref":z,re=E.onChange,fe=E.onClick,Te=Be(E,Ko),Me=ht({accept:pe,multiple:l,type:"file",style:{border:0,clip:"rect(0, 0, 0, 0)",clipPath:"inset(50%)",height:"1px",margin:"0 -1px -1px 0",overflow:"hidden",padding:0,position:"absolute",width:"1px",whiteSpace:"nowrap"},onChange:Ie(he(re,ie)),onClick:Ie(he(fe,lr)),tabIndex:-1},oe,B);return te(te({},Me),Te)}},[B,t,l,ie,i]);return te(te({},se),{},{isFocused:y&&!i,getRootProps:rr,getInputProps:sr,rootRef:k,inputRef:B,open:Ie(C)})}function na(e,n){switch(n.type){case"focus":return te(te({},e),{},{isFocused:!0});case"blur":return te(te({},e),{},{isFocused:!1});case"openDialog":return te(te({},yt),{},{isFileDialogActive:!0});case"closeDialog":return te(te({},e),{},{isFileDialogActive:!1});case"setDraggedFiles":return te(te({},e),{},{isDragActive:n.isDragActive,isDragAccept:n.isDragAccept,isDragReject:n.isDragReject});case"setFiles":return te(te({},e),{},{acceptedFiles:n.acceptedFiles,fileRejections:n.fileRejections,isDragReject:n.isDragReject});case"reset":return te({},yt);default:return e}}function Ln(){}const ia=()=>{const e=(l,s)=>{switch(s.type){case"add-files":return{acceptedFiles:[...l.acceptedFiles,...s.payload.acceptedFiles],fileRejections:[...l.fileRejections,...s.payload.fileRejections]};case"remove-accepted":return{...l,acceptedFiles:l.acceptedFiles.filter(u=>u!==s.payload)};case"remove-rejected":return{...l,fileRejections:l.fileRejections.filter(u=>u!==s.payload)}}},[{acceptedFiles:n,fileRejections:t},i]=h.useReducer(e,{acceptedFiles:[],fileRejections:[]}),o=h.useCallback((l,s)=>i({type:"add-files",payload:{acceptedFiles:l,fileRejections:s}}),[i]);return{acceptedFiles:n,fileRejections:t,onFileUpload:o,removeFile:l=>i({type:"remove-accepted",payload:l}),removeRejectedFile:l=>i({type:"remove-rejected",payload:l})}},Hn=({accept:e,error:n,files:t,help:i,label:o,maxFiles:a,maxSize:r,onFileUpload:l,rejectedFiles:s,removeFile:u,removeRejectedFile:d})=>{const{getRootProps:f}=Nn({accept:e,maxFiles:a,maxSize:r,onDrop:l}),g=h.useId();return c.jsxs("div",{className:U("p-form__group p-form-validation",{"is-error":!!n}),children:[o&&c.jsx(q.Label,{id:g,children:o}),i&&c.jsx("p",{className:"p-form-help-text",children:i}),c.jsxs("div",{className:"p-form__control",children:[!a||t.length<a?c.jsx("div",{className:"file-upload__wrapper",children:c.jsx("div",{...f(),"aria-labelledby":o?g:void 0,className:"file-upload","data-testid":"file-upload",children:c.jsx("button",{className:"file-upload__button",type:"button",children:"Drag and drop files here or click to upload"})})}):null,n?c.jsxs("p",{className:"p-form-validation__message",children:[c.jsx("strong",{children:"Error: "}),n]}):null,c.jsxs("div",{className:"file-upload__files-list",children:[s&&s.map(p=>c.jsxs("span",{className:"is-error",children:[c.jsxs("div",{className:"file-upload__file is-rejected",children:[p.file.name,c.jsx(q.Button,{appearance:"base",className:"file-upload__file-remove-button",onClick:()=>d(p),type:"button",children:c.jsx(q.Icon,{name:"close",children:"Remove file"})})]}),p.errors.map(m=>c.jsx("p",{className:"p-form-validation__message",children:m.message},`${p.file.name}-${m.code}`))]},p.file.name)),t&&t.map(p=>c.jsxs("div",{className:"file-upload__file",children:[p.name,p.percentUploaded!==void 0?c.jsx(Jt,{percentComplete:p.percentUploaded}):c.jsx(q.Button,{appearance:"base",className:"file-upload__file-remove-button",onClick:()=>u(p),type:"button",children:c.jsx(q.Icon,{name:"close",children:"Remove file"})})]},p.name))]})]})]})},oa=({accept:e,error:n,help:t,label:i,maxFiles:o,maxSize:a})=>{const{acceptedFiles:r,fileRejections:l,onFileUpload:s,removeFile:u,removeRejectedFile:d}=ia();return c.jsx(Hn,{accept:e,error:n,files:r,rejectedFiles:l,help:t,label:i,maxFiles:o,maxSize:a,onFileUpload:s,removeFile:u,removeRejectedFile:d})},qn=(e,n)=>e.label.localeCompare(n.label,"en",{numeric:!0}),aa=e=>(n,t)=>{if(e){const i=e.has(n.value),o=e.has(t.value);if(i&&!o)return-1;if(!i&&o)return 1}return 0},ra=e=>{const n=new Map;return e.forEach(t=>{const i=t.group||"Ungrouped",o=n.get(i)||[];o.push(t),n.set(i,o)}),Array.from(n,([t,i])=>({group:t,items:i}))},Gn=({items:e,selectedItems:n,disabledItems:t,header:i,updateItems:o,isOpen:a,footer:r,sortFn:l=qn,groupFn:s=ra,...u})=>{const d=h.useMemo(()=>new Set(n.map(w=>w.value)),[n]),f=h.useMemo(()=>new Set(t.map(w=>w.value)),[t]),[g,p]=h.useState(new Set(d));h.useEffect(()=>{a&&p(new Set(d))},[a]);const m=h.useMemo(()=>e.some(w=>w.group),[e]),v=h.useMemo(()=>m?s(e):[{group:"Ungrouped",items:e}],[e,s]),I=w=>{const{checked:j,value:M}=w.target,T=e.find(x=>`${x.value}`===M);if(T){const x=j?[...n,T]:n.filter(L=>`${L.value}`!==M)??[];o(x)}};return c.jsx(on,{isVisible:a,className:"put-above",children:c.jsxs("div",{className:"multi-select__dropdown",role:"listbox",...u,children:[i||null,v.map(({group:w,items:j})=>c.jsxs("div",{className:"multi-select__group",children:[m?c.jsx("h5",{className:"multi-select__dropdown-header",children:w}):null,c.jsx("ul",{className:"multi-select__dropdown-list","aria-label":w,children:j.sort(l).sort(aa(g)).map(M=>c.jsx("li",{className:"multi-select__dropdown-item",children:c.jsx(q.CheckboxInput,{disabled:f.has(M.value),label:M.label,checked:d.has(M.value),value:M.value,onChange:I},M.value)},M.value))})]},w)),r?c.jsx("div",{className:"multi-select__footer",children:r}):null]})})},la=({disabled:e,selectedItems:n=[],label:t,onItemsUpdate:i,placeholder:o,required:a=!1,items:r=[],disabledItems:l=[],dropdownHeader:s,dropdownFooter:u,variant:d="search"})=>{const f=q.useClickOutside(()=>{p(!1),v("")});q.useOnEscapePressed(()=>{p(!1),v("")});const[g,p]=h.useState(!1),[m,v]=h.useState("");h.useEffect(()=>{g||v("")},[g]);const[I,w]=h.useState([]),j=n||I,M=V=>{const J=Array.from(new Set(V));w(J),i&&i(J)},T=h.useId(),x=h.useId(),L=j.filter(V=>r.some(J=>J.value===V.value)).sort(qn).map(V=>V.label).join(", ");return c.jsx("div",{ref:f,children:c.jsxs("div",{className:"multi-select",children:[d==="search"?c.jsx(q.SearchBox,{externallyControlled:!0,"aria-controls":T,"aria-expanded":g,id:x,role:"combobox","aria-label":t||o||"Search",disabled:e,autoComplete:"off",onChange:V=>{v(V),p(!0)},onFocus:()=>p(!0),placeholder:o??"Search",required:a,type:"text",value:m,className:"multi-select__input"}):c.jsx("button",{role:"combobox",type:"button","aria-label":t||o||"Select items","aria-controls":T,"aria-expanded":g,className:"multi-select__select-button",onClick:()=>{p(V=>!V)},children:c.jsx("span",{className:"multi-select__condensed-text",children:j.length>0?L:o??"Select items"})}),c.jsx(Gn,{id:T,isOpen:g,items:m.length>0?r.filter(V=>V.label.toLowerCase().includes(m.toLowerCase())):r,selectedItems:j,disabledItems:l,header:s,updateItems:M,footer:u||c.jsxs(c.Fragment,{children:[c.jsx(q.Button,{appearance:"link",onClick:()=>{const V=r.filter(J=>!l.some(Z=>Z.value===J.value));M([...j,...V])},type:"button",children:"Select all"}),c.jsx(q.Button,{appearance:"link",onClick:()=>{const V=j.filter(J=>l.some(Z=>Z.value===J.value));M(V)},type:"button",children:"Clear"})]})})]})})},sa={small:620},Bn=h.createContext({variant:"regular"}),bt=({className:e,children:n,variant:t,...i})=>c.jsx(Bn.Provider,{value:{variant:t},children:c.jsx("table",{...i,className:U("p-table-dynamic",e,{"is-full-height":t==="full-height"}),children:n})}),ca=({columns:e})=>c.jsx(c.Fragment,{children:Array.from({length:10},(n,t)=>c.jsx("tr",{"aria-hidden":"true",children:e.map((i,o)=>c.jsx("td",{className:U(i.id,"u-text-overflow-clip"),children:c.jsx(Zt,{isPending:!0,text:"XXXxxxx.xxxxxxxxx"})},o))},t))}),pa=({className:e,table:n})=>{const t=n?n.getAllColumns():Array.from({length:10}).fill({id:""});return c.jsxs(c.Fragment,{children:[c.jsx("caption",{className:"u-visually-hidden",children:"Loading..."}),c.jsx(Un,{"aria-busy":"true",className:e,children:c.jsx(ca,{columns:t})})]})},Un=({className:e,children:n,style:t,...i})=>{const{variant:o}=h.useContext(Bn),a=h.useRef(null),[r,l]=h.useState(null),s=h.useCallback(()=>{var d,f;if(window.innerWidth>sa.small){const g=(f=(d=a.current)==null?void 0:d.getBoundingClientRect)==null?void 0:f.call(d).top;g&&l(g+1)}else l(null)},[]);h.useLayoutEffect(()=>{s()},[s]),h.useEffect(()=>(window.addEventListener("resize",s),()=>window.removeEventListener("resize",s)),[s]);const u=h.useMemo(()=>o==="full-height"&&r?{height:`calc(100vh - ${r}px)`,minHeight:`calc(100vh - ${r}px)`,...t}:t,[o,r,t]);return c.jsx("tbody",{className:e,ref:a,style:u,...i,children:n})};bt.Body=Un,bt.Loading=pa;const St=({children:e})=>c.jsx("caption",{children:c.jsx("div",{className:"p-strip",children:e})}),ua=({children:e})=>c.jsx("div",{className:"row",children:c.jsx("div",{className:"col-start-large-4 u-align--left col-8 col-medium-4",children:c.jsx("p",{className:"p-heading--4 u-no-margin--bottom",children:e})})}),da=({children:e})=>c.jsx("div",{className:"row",children:c.jsx("div",{className:"u-align--left col-start-large-4 col-8 col-medium-4",children:c.jsx("p",{children:e})})});St.Title=ua,St.Description=da;/**
|
|
29
|
+
*/var rt,un;function eo(){if(un)return rt;un=1;var e=Object.getOwnPropertySymbols,n=Object.prototype.hasOwnProperty,t=Object.prototype.propertyIsEnumerable;function i(a){if(a==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(a)}function o(){try{if(!Object.assign)return!1;var a=new String("abc");if(a[5]="de",Object.getOwnPropertyNames(a)[0]==="5")return!1;for(var r={},l=0;l<10;l++)r["_"+String.fromCharCode(l)]=l;var s=Object.getOwnPropertyNames(r).map(function(d){return r[d]});if(s.join("")!=="0123456789")return!1;var p={};return"abcdefghijklmnopqrst".split("").forEach(function(d){p[d]=d}),Object.keys(Object.assign({},p)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return rt=o()?Object.assign:function(a,r){for(var l,s=i(a),p,d=1;d<arguments.length;d++){l=Object(arguments[d]);for(var f in l)n.call(l,f)&&(s[f]=l[f]);if(e){p=e(l);for(var g=0;g<p.length;g++)t.call(l,p[g])&&(s[p[g]]=l[p[g]])}}return s},rt}var lt,dn;function st(){if(dn)return lt;dn=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return lt=e,lt}var ct,gn;function fn(){return gn||(gn=1,ct=Function.call.bind(Object.prototype.hasOwnProperty)),ct}var pt,mn;function to(){if(mn)return pt;mn=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var n=st(),t={},i=fn();e=function(a){var r="Warning: "+a;typeof console<"u"&&console.error(r);try{throw new Error(r)}catch{}}}function o(a,r,l,s,p){if(process.env.NODE_ENV!=="production"){for(var d in a)if(i(a,d)){var f;try{if(typeof a[d]!="function"){var g=Error((s||"React class")+": "+l+" type `"+d+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof a[d]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw g.name="Invariant Violation",g}f=a[d](r,d,s,l,null,n)}catch(m){f=m}if(f&&!(f instanceof Error)&&e((s||"React class")+": type specification of "+l+" `"+d+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof f+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),f instanceof Error&&!(f.message in t)){t[f.message]=!0;var u=p?p():"";e("Failed "+l+" type: "+f.message+(u??""))}}}}return o.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(t={})},pt=o,pt}var ut,vn;function no(){if(vn)return ut;vn=1;var e=pn(),n=eo(),t=st(),i=fn(),o=to(),a=function(){};process.env.NODE_ENV!=="production"&&(a=function(l){var s="Warning: "+l;typeof console<"u"&&console.error(s);try{throw new Error(s)}catch{}});function r(){return null}return ut=function(l,s){var p=typeof Symbol=="function"&&Symbol.iterator,d="@@iterator";function f(y){var M=y&&(p&&y[p]||y[d]);if(typeof M=="function")return M}var g="<<anonymous>>",u={array:h("array"),bigint:h("bigint"),bool:h("boolean"),func:h("function"),number:h("number"),object:h("object"),string:h("string"),symbol:h("symbol"),any:O(),arrayOf:S,element:T(),elementType:x(),instanceOf:L,node:pe(),objectOf:J,oneOf:V,oneOfType:Z,shape:xe,exact:$};function m(y,M){return y===M?y!==0||1/y===1/M:y!==y&&M!==M}function v(y,M){this.message=y,this.data=M&&typeof M=="object"?M:{},this.stack=""}v.prototype=Error.prototype;function P(y){if(process.env.NODE_ENV!=="production")var M={},C=0;function D(E,I,A,H,N,G,ie){if(H=H||g,G=G||A,ie!==t){if(s){var _=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw _.name="Invariant Violation",_}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var ge=H+":"+A;!M[ge]&&C<3&&(a("You are manually calling a React.PropTypes validation function for the `"+G+"` prop on `"+H+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),M[ge]=!0,C++)}}return I[A]==null?E?I[A]===null?new v("The "+N+" `"+G+"` is marked as required "+("in `"+H+"`, but its value is `null`.")):new v("The "+N+" `"+G+"` is marked as required in "+("`"+H+"`, but its value is `undefined`.")):null:y(I,A,H,N,G)}var b=D.bind(null,!1);return b.isRequired=D.bind(null,!0),b}function h(y){function M(C,D,b,E,I,A){var H=C[D],N=Q(H);if(N!==y){var G=ee(H);return new v("Invalid "+E+" `"+I+"` of type "+("`"+G+"` supplied to `"+b+"`, expected ")+("`"+y+"`."),{expectedType:y})}return null}return P(M)}function O(){return P(r)}function S(y){function M(C,D,b,E,I){if(typeof y!="function")return new v("Property `"+I+"` of component `"+b+"` has invalid PropType notation inside arrayOf.");var A=C[D];if(!Array.isArray(A)){var H=Q(A);return new v("Invalid "+E+" `"+I+"` of type "+("`"+H+"` supplied to `"+b+"`, expected an array."))}for(var N=0;N<A.length;N++){var G=y(A,N,b,E,I+"["+N+"]",t);if(G instanceof Error)return G}return null}return P(M)}function T(){function y(M,C,D,b,E){var I=M[C];if(!l(I)){var A=Q(I);return new v("Invalid "+b+" `"+E+"` of type "+("`"+A+"` supplied to `"+D+"`, expected a single ReactElement."))}return null}return P(y)}function x(){function y(M,C,D,b,E){var I=M[C];if(!e.isValidElementType(I)){var A=Q(I);return new v("Invalid "+b+" `"+E+"` of type "+("`"+A+"` supplied to `"+D+"`, expected a single ReactElement type."))}return null}return P(y)}function L(y){function M(C,D,b,E,I){if(!(C[D]instanceof y)){var A=y.name||g,H=ne(C[D]);return new v("Invalid "+E+" `"+I+"` of type "+("`"+H+"` supplied to `"+b+"`, expected ")+("instance of `"+A+"`."))}return null}return P(M)}function V(y){if(!Array.isArray(y))return process.env.NODE_ENV!=="production"&&(arguments.length>1?a("Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."):a("Invalid argument supplied to oneOf, expected an array.")),r;function M(C,D,b,E,I){for(var A=C[D],H=0;H<y.length;H++)if(m(A,y[H]))return null;var N=JSON.stringify(y,function(ie,_){var ge=ee(_);return ge==="symbol"?String(_):_});return new v("Invalid "+E+" `"+I+"` of value `"+String(A)+"` "+("supplied to `"+b+"`, expected one of "+N+"."))}return P(M)}function J(y){function M(C,D,b,E,I){if(typeof y!="function")return new v("Property `"+I+"` of component `"+b+"` has invalid PropType notation inside objectOf.");var A=C[D],H=Q(A);if(H!=="object")return new v("Invalid "+E+" `"+I+"` of type "+("`"+H+"` supplied to `"+b+"`, expected an object."));for(var N in A)if(i(A,N)){var G=y(A,N,b,E,I+"."+N,t);if(G instanceof Error)return G}return null}return P(M)}function Z(y){if(!Array.isArray(y))return process.env.NODE_ENV!=="production"&&a("Invalid argument supplied to oneOfType, expected an instance of array."),r;for(var M=0;M<y.length;M++){var C=y[M];if(typeof C!="function")return a("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+se(C)+" at index "+M+"."),r}function D(b,E,I,A,H){for(var N=[],G=0;G<y.length;G++){var ie=y[G],_=ie(b,E,I,A,H,t);if(_==null)return null;_.data&&i(_.data,"expectedType")&&N.push(_.data.expectedType)}var ge=N.length>0?", expected one of type ["+N.join(", ")+"]":"";return new v("Invalid "+A+" `"+H+"` supplied to "+("`"+I+"`"+ge+"."))}return P(D)}function pe(){function y(M,C,D,b,E){return F(M[C])?null:new v("Invalid "+b+" `"+E+"` supplied to "+("`"+D+"`, expected a ReactNode."))}return P(y)}function ue(y,M,C,D,b){return new v((y||"React class")+": "+M+" type `"+C+"."+D+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+b+"`.")}function xe(y){function M(C,D,b,E,I){var A=C[D],H=Q(A);if(H!=="object")return new v("Invalid "+E+" `"+I+"` of type `"+H+"` "+("supplied to `"+b+"`, expected `object`."));for(var N in y){var G=y[N];if(typeof G!="function")return ue(b,E,I,N,ee(G));var ie=G(A,N,b,E,I+"."+N,t);if(ie)return ie}return null}return P(M)}function $(y){function M(C,D,b,E,I){var A=C[D],H=Q(A);if(H!=="object")return new v("Invalid "+E+" `"+I+"` of type `"+H+"` "+("supplied to `"+b+"`, expected `object`."));var N=n({},C[D],y);for(var G in N){var ie=y[G];if(i(y,G)&&typeof ie!="function")return ue(b,E,I,G,ee(ie));if(!ie)return new v("Invalid "+E+" `"+I+"` key `"+G+"` supplied to `"+b+"`.\nBad object: "+JSON.stringify(C[D],null," ")+`
|
|
30
|
+
Valid keys: `+JSON.stringify(Object.keys(y),null," "));var _=ie(A,G,b,E,I+"."+G,t);if(_)return _}return null}return P(M)}function F(y){switch(typeof y){case"number":case"string":case"undefined":return!0;case"boolean":return!y;case"object":if(Array.isArray(y))return y.every(F);if(y===null||l(y))return!0;var M=f(y);if(M){var C=M.call(y),D;if(M!==y.entries){for(;!(D=C.next()).done;)if(!F(D.value))return!1}else for(;!(D=C.next()).done;){var b=D.value;if(b&&!F(b[1]))return!1}}else return!1;return!0;default:return!1}}function B(y,M){return y==="symbol"?!0:M?M["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&M instanceof Symbol:!1}function Q(y){var M=typeof y;return Array.isArray(y)?"array":y instanceof RegExp?"object":B(M,y)?"symbol":M}function ee(y){if(typeof y>"u"||y===null)return""+y;var M=Q(y);if(M==="object"){if(y instanceof Date)return"date";if(y instanceof RegExp)return"regexp"}return M}function se(y){var M=ee(y);switch(M){case"array":case"object":return"an "+M;case"boolean":case"date":case"regexp":return"a "+M;default:return M}}function ne(y){return!y.constructor||!y.constructor.name?g:y.constructor.name}return u.checkPropTypes=o,u.resetWarningCache=o.resetWarningCache,u.PropTypes=u,u},ut}var dt,xn;function io(){if(xn)return dt;xn=1;var e=st();function n(){}function t(){}return t.resetWarningCache=n,dt=function(){function i(r,l,s,p,d,f){if(f!==e){var g=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw g.name="Invariant Violation",g}}i.isRequired=i;function o(){return i}var a={array:i,bigint:i,bool:i,func:i,number:i,object:i,string:i,symbol:i,any:i,arrayOf:o,element:i,elementType:i,instanceOf:o,node:i,objectOf:o,oneOf:o,oneOfType:o,shape:o,exact:o,checkPropTypes:t,resetWarningCache:n};return a.PropTypes=a,a},dt}var hn;function oo(){if(hn)return Ve.exports;if(hn=1,process.env.NODE_ENV!=="production"){var e=pn(),n=!0;Ve.exports=no()(e.isElement,n)}else Ve.exports=io()();return Ve.exports}var ao=oo();const X=et(ao);function _e(e,n,t,i){function o(a){return a instanceof t?a:new t(function(r){r(a)})}return new(t||(t=Promise))(function(a,r){function l(d){try{p(i.next(d))}catch(f){r(f)}}function s(d){try{p(i.throw(d))}catch(f){r(f)}}function p(d){d.done?a(d.value):o(d.value).then(l,s)}p((i=i.apply(e,n||[])).next())})}typeof SuppressedError=="function"&&SuppressedError;const ro=new Map([["1km","application/vnd.1000minds.decision-model+xml"],["3dml","text/vnd.in3d.3dml"],["3ds","image/x-3ds"],["3g2","video/3gpp2"],["3gp","video/3gp"],["3gpp","video/3gpp"],["3mf","model/3mf"],["7z","application/x-7z-compressed"],["7zip","application/x-7z-compressed"],["123","application/vnd.lotus-1-2-3"],["aab","application/x-authorware-bin"],["aac","audio/x-acc"],["aam","application/x-authorware-map"],["aas","application/x-authorware-seg"],["abw","application/x-abiword"],["ac","application/vnd.nokia.n-gage.ac+xml"],["ac3","audio/ac3"],["acc","application/vnd.americandynamics.acc"],["ace","application/x-ace-compressed"],["acu","application/vnd.acucobol"],["acutc","application/vnd.acucorp"],["adp","audio/adpcm"],["aep","application/vnd.audiograph"],["afm","application/x-font-type1"],["afp","application/vnd.ibm.modcap"],["ahead","application/vnd.ahead.space"],["ai","application/pdf"],["aif","audio/x-aiff"],["aifc","audio/x-aiff"],["aiff","audio/x-aiff"],["air","application/vnd.adobe.air-application-installer-package+zip"],["ait","application/vnd.dvb.ait"],["ami","application/vnd.amiga.ami"],["amr","audio/amr"],["apk","application/vnd.android.package-archive"],["apng","image/apng"],["appcache","text/cache-manifest"],["application","application/x-ms-application"],["apr","application/vnd.lotus-approach"],["arc","application/x-freearc"],["arj","application/x-arj"],["asc","application/pgp-signature"],["asf","video/x-ms-asf"],["asm","text/x-asm"],["aso","application/vnd.accpac.simply.aso"],["asx","video/x-ms-asf"],["atc","application/vnd.acucorp"],["atom","application/atom+xml"],["atomcat","application/atomcat+xml"],["atomdeleted","application/atomdeleted+xml"],["atomsvc","application/atomsvc+xml"],["atx","application/vnd.antix.game-component"],["au","audio/x-au"],["avi","video/x-msvideo"],["avif","image/avif"],["aw","application/applixware"],["azf","application/vnd.airzip.filesecure.azf"],["azs","application/vnd.airzip.filesecure.azs"],["azv","image/vnd.airzip.accelerator.azv"],["azw","application/vnd.amazon.ebook"],["b16","image/vnd.pco.b16"],["bat","application/x-msdownload"],["bcpio","application/x-bcpio"],["bdf","application/x-font-bdf"],["bdm","application/vnd.syncml.dm+wbxml"],["bdoc","application/x-bdoc"],["bed","application/vnd.realvnc.bed"],["bh2","application/vnd.fujitsu.oasysprs"],["bin","application/octet-stream"],["blb","application/x-blorb"],["blorb","application/x-blorb"],["bmi","application/vnd.bmi"],["bmml","application/vnd.balsamiq.bmml+xml"],["bmp","image/bmp"],["book","application/vnd.framemaker"],["box","application/vnd.previewsystems.box"],["boz","application/x-bzip2"],["bpk","application/octet-stream"],["bpmn","application/octet-stream"],["bsp","model/vnd.valve.source.compiled-map"],["btif","image/prs.btif"],["buffer","application/octet-stream"],["bz","application/x-bzip"],["bz2","application/x-bzip2"],["c","text/x-c"],["c4d","application/vnd.clonk.c4group"],["c4f","application/vnd.clonk.c4group"],["c4g","application/vnd.clonk.c4group"],["c4p","application/vnd.clonk.c4group"],["c4u","application/vnd.clonk.c4group"],["c11amc","application/vnd.cluetrust.cartomobile-config"],["c11amz","application/vnd.cluetrust.cartomobile-config-pkg"],["cab","application/vnd.ms-cab-compressed"],["caf","audio/x-caf"],["cap","application/vnd.tcpdump.pcap"],["car","application/vnd.curl.car"],["cat","application/vnd.ms-pki.seccat"],["cb7","application/x-cbr"],["cba","application/x-cbr"],["cbr","application/x-cbr"],["cbt","application/x-cbr"],["cbz","application/x-cbr"],["cc","text/x-c"],["cco","application/x-cocoa"],["cct","application/x-director"],["ccxml","application/ccxml+xml"],["cdbcmsg","application/vnd.contact.cmsg"],["cda","application/x-cdf"],["cdf","application/x-netcdf"],["cdfx","application/cdfx+xml"],["cdkey","application/vnd.mediastation.cdkey"],["cdmia","application/cdmi-capability"],["cdmic","application/cdmi-container"],["cdmid","application/cdmi-domain"],["cdmio","application/cdmi-object"],["cdmiq","application/cdmi-queue"],["cdr","application/cdr"],["cdx","chemical/x-cdx"],["cdxml","application/vnd.chemdraw+xml"],["cdy","application/vnd.cinderella"],["cer","application/pkix-cert"],["cfs","application/x-cfs-compressed"],["cgm","image/cgm"],["chat","application/x-chat"],["chm","application/vnd.ms-htmlhelp"],["chrt","application/vnd.kde.kchart"],["cif","chemical/x-cif"],["cii","application/vnd.anser-web-certificate-issue-initiation"],["cil","application/vnd.ms-artgalry"],["cjs","application/node"],["cla","application/vnd.claymore"],["class","application/octet-stream"],["clkk","application/vnd.crick.clicker.keyboard"],["clkp","application/vnd.crick.clicker.palette"],["clkt","application/vnd.crick.clicker.template"],["clkw","application/vnd.crick.clicker.wordbank"],["clkx","application/vnd.crick.clicker"],["clp","application/x-msclip"],["cmc","application/vnd.cosmocaller"],["cmdf","chemical/x-cmdf"],["cml","chemical/x-cml"],["cmp","application/vnd.yellowriver-custom-menu"],["cmx","image/x-cmx"],["cod","application/vnd.rim.cod"],["coffee","text/coffeescript"],["com","application/x-msdownload"],["conf","text/plain"],["cpio","application/x-cpio"],["cpp","text/x-c"],["cpt","application/mac-compactpro"],["crd","application/x-mscardfile"],["crl","application/pkix-crl"],["crt","application/x-x509-ca-cert"],["crx","application/x-chrome-extension"],["cryptonote","application/vnd.rig.cryptonote"],["csh","application/x-csh"],["csl","application/vnd.citationstyles.style+xml"],["csml","chemical/x-csml"],["csp","application/vnd.commonspace"],["csr","application/octet-stream"],["css","text/css"],["cst","application/x-director"],["csv","text/csv"],["cu","application/cu-seeme"],["curl","text/vnd.curl"],["cww","application/prs.cww"],["cxt","application/x-director"],["cxx","text/x-c"],["dae","model/vnd.collada+xml"],["daf","application/vnd.mobius.daf"],["dart","application/vnd.dart"],["dataless","application/vnd.fdsn.seed"],["davmount","application/davmount+xml"],["dbf","application/vnd.dbf"],["dbk","application/docbook+xml"],["dcr","application/x-director"],["dcurl","text/vnd.curl.dcurl"],["dd2","application/vnd.oma.dd2+xml"],["ddd","application/vnd.fujixerox.ddd"],["ddf","application/vnd.syncml.dmddf+xml"],["dds","image/vnd.ms-dds"],["deb","application/x-debian-package"],["def","text/plain"],["deploy","application/octet-stream"],["der","application/x-x509-ca-cert"],["dfac","application/vnd.dreamfactory"],["dgc","application/x-dgc-compressed"],["dic","text/x-c"],["dir","application/x-director"],["dis","application/vnd.mobius.dis"],["disposition-notification","message/disposition-notification"],["dist","application/octet-stream"],["distz","application/octet-stream"],["djv","image/vnd.djvu"],["djvu","image/vnd.djvu"],["dll","application/octet-stream"],["dmg","application/x-apple-diskimage"],["dmn","application/octet-stream"],["dmp","application/vnd.tcpdump.pcap"],["dms","application/octet-stream"],["dna","application/vnd.dna"],["doc","application/msword"],["docm","application/vnd.ms-word.template.macroEnabled.12"],["docx","application/vnd.openxmlformats-officedocument.wordprocessingml.document"],["dot","application/msword"],["dotm","application/vnd.ms-word.template.macroEnabled.12"],["dotx","application/vnd.openxmlformats-officedocument.wordprocessingml.template"],["dp","application/vnd.osgi.dp"],["dpg","application/vnd.dpgraph"],["dra","audio/vnd.dra"],["drle","image/dicom-rle"],["dsc","text/prs.lines.tag"],["dssc","application/dssc+der"],["dtb","application/x-dtbook+xml"],["dtd","application/xml-dtd"],["dts","audio/vnd.dts"],["dtshd","audio/vnd.dts.hd"],["dump","application/octet-stream"],["dvb","video/vnd.dvb.file"],["dvi","application/x-dvi"],["dwd","application/atsc-dwd+xml"],["dwf","model/vnd.dwf"],["dwg","image/vnd.dwg"],["dxf","image/vnd.dxf"],["dxp","application/vnd.spotfire.dxp"],["dxr","application/x-director"],["ear","application/java-archive"],["ecelp4800","audio/vnd.nuera.ecelp4800"],["ecelp7470","audio/vnd.nuera.ecelp7470"],["ecelp9600","audio/vnd.nuera.ecelp9600"],["ecma","application/ecmascript"],["edm","application/vnd.novadigm.edm"],["edx","application/vnd.novadigm.edx"],["efif","application/vnd.picsel"],["ei6","application/vnd.pg.osasli"],["elc","application/octet-stream"],["emf","image/emf"],["eml","message/rfc822"],["emma","application/emma+xml"],["emotionml","application/emotionml+xml"],["emz","application/x-msmetafile"],["eol","audio/vnd.digital-winds"],["eot","application/vnd.ms-fontobject"],["eps","application/postscript"],["epub","application/epub+zip"],["es","application/ecmascript"],["es3","application/vnd.eszigno3+xml"],["esa","application/vnd.osgi.subsystem"],["esf","application/vnd.epson.esf"],["et3","application/vnd.eszigno3+xml"],["etx","text/x-setext"],["eva","application/x-eva"],["evy","application/x-envoy"],["exe","application/octet-stream"],["exi","application/exi"],["exp","application/express"],["exr","image/aces"],["ext","application/vnd.novadigm.ext"],["ez","application/andrew-inset"],["ez2","application/vnd.ezpix-album"],["ez3","application/vnd.ezpix-package"],["f","text/x-fortran"],["f4v","video/mp4"],["f77","text/x-fortran"],["f90","text/x-fortran"],["fbs","image/vnd.fastbidsheet"],["fcdt","application/vnd.adobe.formscentral.fcdt"],["fcs","application/vnd.isac.fcs"],["fdf","application/vnd.fdf"],["fdt","application/fdt+xml"],["fe_launch","application/vnd.denovo.fcselayout-link"],["fg5","application/vnd.fujitsu.oasysgp"],["fgd","application/x-director"],["fh","image/x-freehand"],["fh4","image/x-freehand"],["fh5","image/x-freehand"],["fh7","image/x-freehand"],["fhc","image/x-freehand"],["fig","application/x-xfig"],["fits","image/fits"],["flac","audio/x-flac"],["fli","video/x-fli"],["flo","application/vnd.micrografx.flo"],["flv","video/x-flv"],["flw","application/vnd.kde.kivio"],["flx","text/vnd.fmi.flexstor"],["fly","text/vnd.fly"],["fm","application/vnd.framemaker"],["fnc","application/vnd.frogans.fnc"],["fo","application/vnd.software602.filler.form+xml"],["for","text/x-fortran"],["fpx","image/vnd.fpx"],["frame","application/vnd.framemaker"],["fsc","application/vnd.fsc.weblaunch"],["fst","image/vnd.fst"],["ftc","application/vnd.fluxtime.clip"],["fti","application/vnd.anser-web-funds-transfer-initiation"],["fvt","video/vnd.fvt"],["fxp","application/vnd.adobe.fxp"],["fxpl","application/vnd.adobe.fxp"],["fzs","application/vnd.fuzzysheet"],["g2w","application/vnd.geoplan"],["g3","image/g3fax"],["g3w","application/vnd.geospace"],["gac","application/vnd.groove-account"],["gam","application/x-tads"],["gbr","application/rpki-ghostbusters"],["gca","application/x-gca-compressed"],["gdl","model/vnd.gdl"],["gdoc","application/vnd.google-apps.document"],["geo","application/vnd.dynageo"],["geojson","application/geo+json"],["gex","application/vnd.geometry-explorer"],["ggb","application/vnd.geogebra.file"],["ggt","application/vnd.geogebra.tool"],["ghf","application/vnd.groove-help"],["gif","image/gif"],["gim","application/vnd.groove-identity-message"],["glb","model/gltf-binary"],["gltf","model/gltf+json"],["gml","application/gml+xml"],["gmx","application/vnd.gmx"],["gnumeric","application/x-gnumeric"],["gpg","application/gpg-keys"],["gph","application/vnd.flographit"],["gpx","application/gpx+xml"],["gqf","application/vnd.grafeq"],["gqs","application/vnd.grafeq"],["gram","application/srgs"],["gramps","application/x-gramps-xml"],["gre","application/vnd.geometry-explorer"],["grv","application/vnd.groove-injector"],["grxml","application/srgs+xml"],["gsf","application/x-font-ghostscript"],["gsheet","application/vnd.google-apps.spreadsheet"],["gslides","application/vnd.google-apps.presentation"],["gtar","application/x-gtar"],["gtm","application/vnd.groove-tool-message"],["gtw","model/vnd.gtw"],["gv","text/vnd.graphviz"],["gxf","application/gxf"],["gxt","application/vnd.geonext"],["gz","application/gzip"],["gzip","application/gzip"],["h","text/x-c"],["h261","video/h261"],["h263","video/h263"],["h264","video/h264"],["hal","application/vnd.hal+xml"],["hbci","application/vnd.hbci"],["hbs","text/x-handlebars-template"],["hdd","application/x-virtualbox-hdd"],["hdf","application/x-hdf"],["heic","image/heic"],["heics","image/heic-sequence"],["heif","image/heif"],["heifs","image/heif-sequence"],["hej2","image/hej2k"],["held","application/atsc-held+xml"],["hh","text/x-c"],["hjson","application/hjson"],["hlp","application/winhlp"],["hpgl","application/vnd.hp-hpgl"],["hpid","application/vnd.hp-hpid"],["hps","application/vnd.hp-hps"],["hqx","application/mac-binhex40"],["hsj2","image/hsj2"],["htc","text/x-component"],["htke","application/vnd.kenameaapp"],["htm","text/html"],["html","text/html"],["hvd","application/vnd.yamaha.hv-dic"],["hvp","application/vnd.yamaha.hv-voice"],["hvs","application/vnd.yamaha.hv-script"],["i2g","application/vnd.intergeo"],["icc","application/vnd.iccprofile"],["ice","x-conference/x-cooltalk"],["icm","application/vnd.iccprofile"],["ico","image/x-icon"],["ics","text/calendar"],["ief","image/ief"],["ifb","text/calendar"],["ifm","application/vnd.shana.informed.formdata"],["iges","model/iges"],["igl","application/vnd.igloader"],["igm","application/vnd.insors.igm"],["igs","model/iges"],["igx","application/vnd.micrografx.igx"],["iif","application/vnd.shana.informed.interchange"],["img","application/octet-stream"],["imp","application/vnd.accpac.simply.imp"],["ims","application/vnd.ms-ims"],["in","text/plain"],["ini","text/plain"],["ink","application/inkml+xml"],["inkml","application/inkml+xml"],["install","application/x-install-instructions"],["iota","application/vnd.astraea-software.iota"],["ipfix","application/ipfix"],["ipk","application/vnd.shana.informed.package"],["irm","application/vnd.ibm.rights-management"],["irp","application/vnd.irepository.package+xml"],["iso","application/x-iso9660-image"],["itp","application/vnd.shana.informed.formtemplate"],["its","application/its+xml"],["ivp","application/vnd.immervision-ivp"],["ivu","application/vnd.immervision-ivu"],["jad","text/vnd.sun.j2me.app-descriptor"],["jade","text/jade"],["jam","application/vnd.jam"],["jar","application/java-archive"],["jardiff","application/x-java-archive-diff"],["java","text/x-java-source"],["jhc","image/jphc"],["jisp","application/vnd.jisp"],["jls","image/jls"],["jlt","application/vnd.hp-jlyt"],["jng","image/x-jng"],["jnlp","application/x-java-jnlp-file"],["joda","application/vnd.joost.joda-archive"],["jp2","image/jp2"],["jpe","image/jpeg"],["jpeg","image/jpeg"],["jpf","image/jpx"],["jpg","image/jpeg"],["jpg2","image/jp2"],["jpgm","video/jpm"],["jpgv","video/jpeg"],["jph","image/jph"],["jpm","video/jpm"],["jpx","image/jpx"],["js","application/javascript"],["json","application/json"],["json5","application/json5"],["jsonld","application/ld+json"],["jsonl","application/jsonl"],["jsonml","application/jsonml+json"],["jsx","text/jsx"],["jxr","image/jxr"],["jxra","image/jxra"],["jxrs","image/jxrs"],["jxs","image/jxs"],["jxsc","image/jxsc"],["jxsi","image/jxsi"],["jxss","image/jxss"],["kar","audio/midi"],["karbon","application/vnd.kde.karbon"],["kdb","application/octet-stream"],["kdbx","application/x-keepass2"],["key","application/x-iwork-keynote-sffkey"],["kfo","application/vnd.kde.kformula"],["kia","application/vnd.kidspiration"],["kml","application/vnd.google-earth.kml+xml"],["kmz","application/vnd.google-earth.kmz"],["kne","application/vnd.kinar"],["knp","application/vnd.kinar"],["kon","application/vnd.kde.kontour"],["kpr","application/vnd.kde.kpresenter"],["kpt","application/vnd.kde.kpresenter"],["kpxx","application/vnd.ds-keypoint"],["ksp","application/vnd.kde.kspread"],["ktr","application/vnd.kahootz"],["ktx","image/ktx"],["ktx2","image/ktx2"],["ktz","application/vnd.kahootz"],["kwd","application/vnd.kde.kword"],["kwt","application/vnd.kde.kword"],["lasxml","application/vnd.las.las+xml"],["latex","application/x-latex"],["lbd","application/vnd.llamagraphics.life-balance.desktop"],["lbe","application/vnd.llamagraphics.life-balance.exchange+xml"],["les","application/vnd.hhe.lesson-player"],["less","text/less"],["lgr","application/lgr+xml"],["lha","application/octet-stream"],["link66","application/vnd.route66.link66+xml"],["list","text/plain"],["list3820","application/vnd.ibm.modcap"],["listafp","application/vnd.ibm.modcap"],["litcoffee","text/coffeescript"],["lnk","application/x-ms-shortcut"],["log","text/plain"],["lostxml","application/lost+xml"],["lrf","application/octet-stream"],["lrm","application/vnd.ms-lrm"],["ltf","application/vnd.frogans.ltf"],["lua","text/x-lua"],["luac","application/x-lua-bytecode"],["lvp","audio/vnd.lucent.voice"],["lwp","application/vnd.lotus-wordpro"],["lzh","application/octet-stream"],["m1v","video/mpeg"],["m2a","audio/mpeg"],["m2v","video/mpeg"],["m3a","audio/mpeg"],["m3u","text/plain"],["m3u8","application/vnd.apple.mpegurl"],["m4a","audio/x-m4a"],["m4p","application/mp4"],["m4s","video/iso.segment"],["m4u","application/vnd.mpegurl"],["m4v","video/x-m4v"],["m13","application/x-msmediaview"],["m14","application/x-msmediaview"],["m21","application/mp21"],["ma","application/mathematica"],["mads","application/mads+xml"],["maei","application/mmt-aei+xml"],["mag","application/vnd.ecowin.chart"],["maker","application/vnd.framemaker"],["man","text/troff"],["manifest","text/cache-manifest"],["map","application/json"],["mar","application/octet-stream"],["markdown","text/markdown"],["mathml","application/mathml+xml"],["mb","application/mathematica"],["mbk","application/vnd.mobius.mbk"],["mbox","application/mbox"],["mc1","application/vnd.medcalcdata"],["mcd","application/vnd.mcd"],["mcurl","text/vnd.curl.mcurl"],["md","text/markdown"],["mdb","application/x-msaccess"],["mdi","image/vnd.ms-modi"],["mdx","text/mdx"],["me","text/troff"],["mesh","model/mesh"],["meta4","application/metalink4+xml"],["metalink","application/metalink+xml"],["mets","application/mets+xml"],["mfm","application/vnd.mfmp"],["mft","application/rpki-manifest"],["mgp","application/vnd.osgeo.mapguide.package"],["mgz","application/vnd.proteus.magazine"],["mid","audio/midi"],["midi","audio/midi"],["mie","application/x-mie"],["mif","application/vnd.mif"],["mime","message/rfc822"],["mj2","video/mj2"],["mjp2","video/mj2"],["mjs","application/javascript"],["mk3d","video/x-matroska"],["mka","audio/x-matroska"],["mkd","text/x-markdown"],["mks","video/x-matroska"],["mkv","video/x-matroska"],["mlp","application/vnd.dolby.mlp"],["mmd","application/vnd.chipnuts.karaoke-mmd"],["mmf","application/vnd.smaf"],["mml","text/mathml"],["mmr","image/vnd.fujixerox.edmics-mmr"],["mng","video/x-mng"],["mny","application/x-msmoney"],["mobi","application/x-mobipocket-ebook"],["mods","application/mods+xml"],["mov","video/quicktime"],["movie","video/x-sgi-movie"],["mp2","audio/mpeg"],["mp2a","audio/mpeg"],["mp3","audio/mpeg"],["mp4","video/mp4"],["mp4a","audio/mp4"],["mp4s","application/mp4"],["mp4v","video/mp4"],["mp21","application/mp21"],["mpc","application/vnd.mophun.certificate"],["mpd","application/dash+xml"],["mpe","video/mpeg"],["mpeg","video/mpeg"],["mpg","video/mpeg"],["mpg4","video/mp4"],["mpga","audio/mpeg"],["mpkg","application/vnd.apple.installer+xml"],["mpm","application/vnd.blueice.multipass"],["mpn","application/vnd.mophun.application"],["mpp","application/vnd.ms-project"],["mpt","application/vnd.ms-project"],["mpy","application/vnd.ibm.minipay"],["mqy","application/vnd.mobius.mqy"],["mrc","application/marc"],["mrcx","application/marcxml+xml"],["ms","text/troff"],["mscml","application/mediaservercontrol+xml"],["mseed","application/vnd.fdsn.mseed"],["mseq","application/vnd.mseq"],["msf","application/vnd.epson.msf"],["msg","application/vnd.ms-outlook"],["msh","model/mesh"],["msi","application/x-msdownload"],["msl","application/vnd.mobius.msl"],["msm","application/octet-stream"],["msp","application/octet-stream"],["msty","application/vnd.muvee.style"],["mtl","model/mtl"],["mts","model/vnd.mts"],["mus","application/vnd.musician"],["musd","application/mmt-usd+xml"],["musicxml","application/vnd.recordare.musicxml+xml"],["mvb","application/x-msmediaview"],["mvt","application/vnd.mapbox-vector-tile"],["mwf","application/vnd.mfer"],["mxf","application/mxf"],["mxl","application/vnd.recordare.musicxml"],["mxmf","audio/mobile-xmf"],["mxml","application/xv+xml"],["mxs","application/vnd.triscape.mxs"],["mxu","video/vnd.mpegurl"],["n-gage","application/vnd.nokia.n-gage.symbian.install"],["n3","text/n3"],["nb","application/mathematica"],["nbp","application/vnd.wolfram.player"],["nc","application/x-netcdf"],["ncx","application/x-dtbncx+xml"],["nfo","text/x-nfo"],["ngdat","application/vnd.nokia.n-gage.data"],["nitf","application/vnd.nitf"],["nlu","application/vnd.neurolanguage.nlu"],["nml","application/vnd.enliven"],["nnd","application/vnd.noblenet-directory"],["nns","application/vnd.noblenet-sealer"],["nnw","application/vnd.noblenet-web"],["npx","image/vnd.net-fpx"],["nq","application/n-quads"],["nsc","application/x-conference"],["nsf","application/vnd.lotus-notes"],["nt","application/n-triples"],["ntf","application/vnd.nitf"],["numbers","application/x-iwork-numbers-sffnumbers"],["nzb","application/x-nzb"],["oa2","application/vnd.fujitsu.oasys2"],["oa3","application/vnd.fujitsu.oasys3"],["oas","application/vnd.fujitsu.oasys"],["obd","application/x-msbinder"],["obgx","application/vnd.openblox.game+xml"],["obj","model/obj"],["oda","application/oda"],["odb","application/vnd.oasis.opendocument.database"],["odc","application/vnd.oasis.opendocument.chart"],["odf","application/vnd.oasis.opendocument.formula"],["odft","application/vnd.oasis.opendocument.formula-template"],["odg","application/vnd.oasis.opendocument.graphics"],["odi","application/vnd.oasis.opendocument.image"],["odm","application/vnd.oasis.opendocument.text-master"],["odp","application/vnd.oasis.opendocument.presentation"],["ods","application/vnd.oasis.opendocument.spreadsheet"],["odt","application/vnd.oasis.opendocument.text"],["oga","audio/ogg"],["ogex","model/vnd.opengex"],["ogg","audio/ogg"],["ogv","video/ogg"],["ogx","application/ogg"],["omdoc","application/omdoc+xml"],["onepkg","application/onenote"],["onetmp","application/onenote"],["onetoc","application/onenote"],["onetoc2","application/onenote"],["opf","application/oebps-package+xml"],["opml","text/x-opml"],["oprc","application/vnd.palm"],["opus","audio/ogg"],["org","text/x-org"],["osf","application/vnd.yamaha.openscoreformat"],["osfpvg","application/vnd.yamaha.openscoreformat.osfpvg+xml"],["osm","application/vnd.openstreetmap.data+xml"],["otc","application/vnd.oasis.opendocument.chart-template"],["otf","font/otf"],["otg","application/vnd.oasis.opendocument.graphics-template"],["oth","application/vnd.oasis.opendocument.text-web"],["oti","application/vnd.oasis.opendocument.image-template"],["otp","application/vnd.oasis.opendocument.presentation-template"],["ots","application/vnd.oasis.opendocument.spreadsheet-template"],["ott","application/vnd.oasis.opendocument.text-template"],["ova","application/x-virtualbox-ova"],["ovf","application/x-virtualbox-ovf"],["owl","application/rdf+xml"],["oxps","application/oxps"],["oxt","application/vnd.openofficeorg.extension"],["p","text/x-pascal"],["p7a","application/x-pkcs7-signature"],["p7b","application/x-pkcs7-certificates"],["p7c","application/pkcs7-mime"],["p7m","application/pkcs7-mime"],["p7r","application/x-pkcs7-certreqresp"],["p7s","application/pkcs7-signature"],["p8","application/pkcs8"],["p10","application/x-pkcs10"],["p12","application/x-pkcs12"],["pac","application/x-ns-proxy-autoconfig"],["pages","application/x-iwork-pages-sffpages"],["pas","text/x-pascal"],["paw","application/vnd.pawaafile"],["pbd","application/vnd.powerbuilder6"],["pbm","image/x-portable-bitmap"],["pcap","application/vnd.tcpdump.pcap"],["pcf","application/x-font-pcf"],["pcl","application/vnd.hp-pcl"],["pclxl","application/vnd.hp-pclxl"],["pct","image/x-pict"],["pcurl","application/vnd.curl.pcurl"],["pcx","image/x-pcx"],["pdb","application/x-pilot"],["pde","text/x-processing"],["pdf","application/pdf"],["pem","application/x-x509-user-cert"],["pfa","application/x-font-type1"],["pfb","application/x-font-type1"],["pfm","application/x-font-type1"],["pfr","application/font-tdpfr"],["pfx","application/x-pkcs12"],["pgm","image/x-portable-graymap"],["pgn","application/x-chess-pgn"],["pgp","application/pgp"],["php","application/x-httpd-php"],["php3","application/x-httpd-php"],["php4","application/x-httpd-php"],["phps","application/x-httpd-php-source"],["phtml","application/x-httpd-php"],["pic","image/x-pict"],["pkg","application/octet-stream"],["pki","application/pkixcmp"],["pkipath","application/pkix-pkipath"],["pkpass","application/vnd.apple.pkpass"],["pl","application/x-perl"],["plb","application/vnd.3gpp.pic-bw-large"],["plc","application/vnd.mobius.plc"],["plf","application/vnd.pocketlearn"],["pls","application/pls+xml"],["pm","application/x-perl"],["pml","application/vnd.ctc-posml"],["png","image/png"],["pnm","image/x-portable-anymap"],["portpkg","application/vnd.macports.portpkg"],["pot","application/vnd.ms-powerpoint"],["potm","application/vnd.ms-powerpoint.presentation.macroEnabled.12"],["potx","application/vnd.openxmlformats-officedocument.presentationml.template"],["ppa","application/vnd.ms-powerpoint"],["ppam","application/vnd.ms-powerpoint.addin.macroEnabled.12"],["ppd","application/vnd.cups-ppd"],["ppm","image/x-portable-pixmap"],["pps","application/vnd.ms-powerpoint"],["ppsm","application/vnd.ms-powerpoint.slideshow.macroEnabled.12"],["ppsx","application/vnd.openxmlformats-officedocument.presentationml.slideshow"],["ppt","application/powerpoint"],["pptm","application/vnd.ms-powerpoint.presentation.macroEnabled.12"],["pptx","application/vnd.openxmlformats-officedocument.presentationml.presentation"],["pqa","application/vnd.palm"],["prc","application/x-pilot"],["pre","application/vnd.lotus-freelance"],["prf","application/pics-rules"],["provx","application/provenance+xml"],["ps","application/postscript"],["psb","application/vnd.3gpp.pic-bw-small"],["psd","application/x-photoshop"],["psf","application/x-font-linux-psf"],["pskcxml","application/pskc+xml"],["pti","image/prs.pti"],["ptid","application/vnd.pvi.ptid1"],["pub","application/x-mspublisher"],["pvb","application/vnd.3gpp.pic-bw-var"],["pwn","application/vnd.3m.post-it-notes"],["pya","audio/vnd.ms-playready.media.pya"],["pyv","video/vnd.ms-playready.media.pyv"],["qam","application/vnd.epson.quickanime"],["qbo","application/vnd.intu.qbo"],["qfx","application/vnd.intu.qfx"],["qps","application/vnd.publishare-delta-tree"],["qt","video/quicktime"],["qwd","application/vnd.quark.quarkxpress"],["qwt","application/vnd.quark.quarkxpress"],["qxb","application/vnd.quark.quarkxpress"],["qxd","application/vnd.quark.quarkxpress"],["qxl","application/vnd.quark.quarkxpress"],["qxt","application/vnd.quark.quarkxpress"],["ra","audio/x-realaudio"],["ram","audio/x-pn-realaudio"],["raml","application/raml+yaml"],["rapd","application/route-apd+xml"],["rar","application/x-rar"],["ras","image/x-cmu-raster"],["rcprofile","application/vnd.ipunplugged.rcprofile"],["rdf","application/rdf+xml"],["rdz","application/vnd.data-vision.rdz"],["relo","application/p2p-overlay+xml"],["rep","application/vnd.businessobjects"],["res","application/x-dtbresource+xml"],["rgb","image/x-rgb"],["rif","application/reginfo+xml"],["rip","audio/vnd.rip"],["ris","application/x-research-info-systems"],["rl","application/resource-lists+xml"],["rlc","image/vnd.fujixerox.edmics-rlc"],["rld","application/resource-lists-diff+xml"],["rm","audio/x-pn-realaudio"],["rmi","audio/midi"],["rmp","audio/x-pn-realaudio-plugin"],["rms","application/vnd.jcp.javame.midlet-rms"],["rmvb","application/vnd.rn-realmedia-vbr"],["rnc","application/relax-ng-compact-syntax"],["rng","application/xml"],["roa","application/rpki-roa"],["roff","text/troff"],["rp9","application/vnd.cloanto.rp9"],["rpm","audio/x-pn-realaudio-plugin"],["rpss","application/vnd.nokia.radio-presets"],["rpst","application/vnd.nokia.radio-preset"],["rq","application/sparql-query"],["rs","application/rls-services+xml"],["rsa","application/x-pkcs7"],["rsat","application/atsc-rsat+xml"],["rsd","application/rsd+xml"],["rsheet","application/urc-ressheet+xml"],["rss","application/rss+xml"],["rtf","text/rtf"],["rtx","text/richtext"],["run","application/x-makeself"],["rusd","application/route-usd+xml"],["rv","video/vnd.rn-realvideo"],["s","text/x-asm"],["s3m","audio/s3m"],["saf","application/vnd.yamaha.smaf-audio"],["sass","text/x-sass"],["sbml","application/sbml+xml"],["sc","application/vnd.ibm.secure-container"],["scd","application/x-msschedule"],["scm","application/vnd.lotus-screencam"],["scq","application/scvp-cv-request"],["scs","application/scvp-cv-response"],["scss","text/x-scss"],["scurl","text/vnd.curl.scurl"],["sda","application/vnd.stardivision.draw"],["sdc","application/vnd.stardivision.calc"],["sdd","application/vnd.stardivision.impress"],["sdkd","application/vnd.solent.sdkm+xml"],["sdkm","application/vnd.solent.sdkm+xml"],["sdp","application/sdp"],["sdw","application/vnd.stardivision.writer"],["sea","application/octet-stream"],["see","application/vnd.seemail"],["seed","application/vnd.fdsn.seed"],["sema","application/vnd.sema"],["semd","application/vnd.semd"],["semf","application/vnd.semf"],["senmlx","application/senml+xml"],["sensmlx","application/sensml+xml"],["ser","application/java-serialized-object"],["setpay","application/set-payment-initiation"],["setreg","application/set-registration-initiation"],["sfd-hdstx","application/vnd.hydrostatix.sof-data"],["sfs","application/vnd.spotfire.sfs"],["sfv","text/x-sfv"],["sgi","image/sgi"],["sgl","application/vnd.stardivision.writer-global"],["sgm","text/sgml"],["sgml","text/sgml"],["sh","application/x-sh"],["shar","application/x-shar"],["shex","text/shex"],["shf","application/shf+xml"],["shtml","text/html"],["sid","image/x-mrsid-image"],["sieve","application/sieve"],["sig","application/pgp-signature"],["sil","audio/silk"],["silo","model/mesh"],["sis","application/vnd.symbian.install"],["sisx","application/vnd.symbian.install"],["sit","application/x-stuffit"],["sitx","application/x-stuffitx"],["siv","application/sieve"],["skd","application/vnd.koan"],["skm","application/vnd.koan"],["skp","application/vnd.koan"],["skt","application/vnd.koan"],["sldm","application/vnd.ms-powerpoint.slide.macroenabled.12"],["sldx","application/vnd.openxmlformats-officedocument.presentationml.slide"],["slim","text/slim"],["slm","text/slim"],["sls","application/route-s-tsid+xml"],["slt","application/vnd.epson.salt"],["sm","application/vnd.stepmania.stepchart"],["smf","application/vnd.stardivision.math"],["smi","application/smil"],["smil","application/smil"],["smv","video/x-smv"],["smzip","application/vnd.stepmania.package"],["snd","audio/basic"],["snf","application/x-font-snf"],["so","application/octet-stream"],["spc","application/x-pkcs7-certificates"],["spdx","text/spdx"],["spf","application/vnd.yamaha.smaf-phrase"],["spl","application/x-futuresplash"],["spot","text/vnd.in3d.spot"],["spp","application/scvp-vp-response"],["spq","application/scvp-vp-request"],["spx","audio/ogg"],["sql","application/x-sql"],["src","application/x-wais-source"],["srt","application/x-subrip"],["sru","application/sru+xml"],["srx","application/sparql-results+xml"],["ssdl","application/ssdl+xml"],["sse","application/vnd.kodak-descriptor"],["ssf","application/vnd.epson.ssf"],["ssml","application/ssml+xml"],["sst","application/octet-stream"],["st","application/vnd.sailingtracker.track"],["stc","application/vnd.sun.xml.calc.template"],["std","application/vnd.sun.xml.draw.template"],["stf","application/vnd.wt.stf"],["sti","application/vnd.sun.xml.impress.template"],["stk","application/hyperstudio"],["stl","model/stl"],["stpx","model/step+xml"],["stpxz","model/step-xml+zip"],["stpz","model/step+zip"],["str","application/vnd.pg.format"],["stw","application/vnd.sun.xml.writer.template"],["styl","text/stylus"],["stylus","text/stylus"],["sub","text/vnd.dvb.subtitle"],["sus","application/vnd.sus-calendar"],["susp","application/vnd.sus-calendar"],["sv4cpio","application/x-sv4cpio"],["sv4crc","application/x-sv4crc"],["svc","application/vnd.dvb.service"],["svd","application/vnd.svd"],["svg","image/svg+xml"],["svgz","image/svg+xml"],["swa","application/x-director"],["swf","application/x-shockwave-flash"],["swi","application/vnd.aristanetworks.swi"],["swidtag","application/swid+xml"],["sxc","application/vnd.sun.xml.calc"],["sxd","application/vnd.sun.xml.draw"],["sxg","application/vnd.sun.xml.writer.global"],["sxi","application/vnd.sun.xml.impress"],["sxm","application/vnd.sun.xml.math"],["sxw","application/vnd.sun.xml.writer"],["t","text/troff"],["t3","application/x-t3vm-image"],["t38","image/t38"],["taglet","application/vnd.mynfc"],["tao","application/vnd.tao.intent-module-archive"],["tap","image/vnd.tencent.tap"],["tar","application/x-tar"],["tcap","application/vnd.3gpp2.tcap"],["tcl","application/x-tcl"],["td","application/urc-targetdesc+xml"],["teacher","application/vnd.smart.teacher"],["tei","application/tei+xml"],["teicorpus","application/tei+xml"],["tex","application/x-tex"],["texi","application/x-texinfo"],["texinfo","application/x-texinfo"],["text","text/plain"],["tfi","application/thraud+xml"],["tfm","application/x-tex-tfm"],["tfx","image/tiff-fx"],["tga","image/x-tga"],["tgz","application/x-tar"],["thmx","application/vnd.ms-officetheme"],["tif","image/tiff"],["tiff","image/tiff"],["tk","application/x-tcl"],["tmo","application/vnd.tmobile-livetv"],["toml","application/toml"],["torrent","application/x-bittorrent"],["tpl","application/vnd.groove-tool-template"],["tpt","application/vnd.trid.tpt"],["tr","text/troff"],["tra","application/vnd.trueapp"],["trig","application/trig"],["trm","application/x-msterminal"],["ts","video/mp2t"],["tsd","application/timestamped-data"],["tsv","text/tab-separated-values"],["ttc","font/collection"],["ttf","font/ttf"],["ttl","text/turtle"],["ttml","application/ttml+xml"],["twd","application/vnd.simtech-mindmapper"],["twds","application/vnd.simtech-mindmapper"],["txd","application/vnd.genomatix.tuxedo"],["txf","application/vnd.mobius.txf"],["txt","text/plain"],["u8dsn","message/global-delivery-status"],["u8hdr","message/global-headers"],["u8mdn","message/global-disposition-notification"],["u8msg","message/global"],["u32","application/x-authorware-bin"],["ubj","application/ubjson"],["udeb","application/x-debian-package"],["ufd","application/vnd.ufdl"],["ufdl","application/vnd.ufdl"],["ulx","application/x-glulx"],["umj","application/vnd.umajin"],["unityweb","application/vnd.unity"],["uoml","application/vnd.uoml+xml"],["uri","text/uri-list"],["uris","text/uri-list"],["urls","text/uri-list"],["usdz","model/vnd.usdz+zip"],["ustar","application/x-ustar"],["utz","application/vnd.uiq.theme"],["uu","text/x-uuencode"],["uva","audio/vnd.dece.audio"],["uvd","application/vnd.dece.data"],["uvf","application/vnd.dece.data"],["uvg","image/vnd.dece.graphic"],["uvh","video/vnd.dece.hd"],["uvi","image/vnd.dece.graphic"],["uvm","video/vnd.dece.mobile"],["uvp","video/vnd.dece.pd"],["uvs","video/vnd.dece.sd"],["uvt","application/vnd.dece.ttml+xml"],["uvu","video/vnd.uvvu.mp4"],["uvv","video/vnd.dece.video"],["uvva","audio/vnd.dece.audio"],["uvvd","application/vnd.dece.data"],["uvvf","application/vnd.dece.data"],["uvvg","image/vnd.dece.graphic"],["uvvh","video/vnd.dece.hd"],["uvvi","image/vnd.dece.graphic"],["uvvm","video/vnd.dece.mobile"],["uvvp","video/vnd.dece.pd"],["uvvs","video/vnd.dece.sd"],["uvvt","application/vnd.dece.ttml+xml"],["uvvu","video/vnd.uvvu.mp4"],["uvvv","video/vnd.dece.video"],["uvvx","application/vnd.dece.unspecified"],["uvvz","application/vnd.dece.zip"],["uvx","application/vnd.dece.unspecified"],["uvz","application/vnd.dece.zip"],["vbox","application/x-virtualbox-vbox"],["vbox-extpack","application/x-virtualbox-vbox-extpack"],["vcard","text/vcard"],["vcd","application/x-cdlink"],["vcf","text/x-vcard"],["vcg","application/vnd.groove-vcard"],["vcs","text/x-vcalendar"],["vcx","application/vnd.vcx"],["vdi","application/x-virtualbox-vdi"],["vds","model/vnd.sap.vds"],["vhd","application/x-virtualbox-vhd"],["vis","application/vnd.visionary"],["viv","video/vnd.vivo"],["vlc","application/videolan"],["vmdk","application/x-virtualbox-vmdk"],["vob","video/x-ms-vob"],["vor","application/vnd.stardivision.writer"],["vox","application/x-authorware-bin"],["vrml","model/vrml"],["vsd","application/vnd.visio"],["vsf","application/vnd.vsf"],["vss","application/vnd.visio"],["vst","application/vnd.visio"],["vsw","application/vnd.visio"],["vtf","image/vnd.valve.source.texture"],["vtt","text/vtt"],["vtu","model/vnd.vtu"],["vxml","application/voicexml+xml"],["w3d","application/x-director"],["wad","application/x-doom"],["wadl","application/vnd.sun.wadl+xml"],["war","application/java-archive"],["wasm","application/wasm"],["wav","audio/x-wav"],["wax","audio/x-ms-wax"],["wbmp","image/vnd.wap.wbmp"],["wbs","application/vnd.criticaltools.wbs+xml"],["wbxml","application/wbxml"],["wcm","application/vnd.ms-works"],["wdb","application/vnd.ms-works"],["wdp","image/vnd.ms-photo"],["weba","audio/webm"],["webapp","application/x-web-app-manifest+json"],["webm","video/webm"],["webmanifest","application/manifest+json"],["webp","image/webp"],["wg","application/vnd.pmi.widget"],["wgt","application/widget"],["wks","application/vnd.ms-works"],["wm","video/x-ms-wm"],["wma","audio/x-ms-wma"],["wmd","application/x-ms-wmd"],["wmf","image/wmf"],["wml","text/vnd.wap.wml"],["wmlc","application/wmlc"],["wmls","text/vnd.wap.wmlscript"],["wmlsc","application/vnd.wap.wmlscriptc"],["wmv","video/x-ms-wmv"],["wmx","video/x-ms-wmx"],["wmz","application/x-msmetafile"],["woff","font/woff"],["woff2","font/woff2"],["word","application/msword"],["wpd","application/vnd.wordperfect"],["wpl","application/vnd.ms-wpl"],["wps","application/vnd.ms-works"],["wqd","application/vnd.wqd"],["wri","application/x-mswrite"],["wrl","model/vrml"],["wsc","message/vnd.wfa.wsc"],["wsdl","application/wsdl+xml"],["wspolicy","application/wspolicy+xml"],["wtb","application/vnd.webturbo"],["wvx","video/x-ms-wvx"],["x3d","model/x3d+xml"],["x3db","model/x3d+fastinfoset"],["x3dbz","model/x3d+binary"],["x3dv","model/x3d-vrml"],["x3dvz","model/x3d+vrml"],["x3dz","model/x3d+xml"],["x32","application/x-authorware-bin"],["x_b","model/vnd.parasolid.transmit.binary"],["x_t","model/vnd.parasolid.transmit.text"],["xaml","application/xaml+xml"],["xap","application/x-silverlight-app"],["xar","application/vnd.xara"],["xav","application/xcap-att+xml"],["xbap","application/x-ms-xbap"],["xbd","application/vnd.fujixerox.docuworks.binder"],["xbm","image/x-xbitmap"],["xca","application/xcap-caps+xml"],["xcs","application/calendar+xml"],["xdf","application/xcap-diff+xml"],["xdm","application/vnd.syncml.dm+xml"],["xdp","application/vnd.adobe.xdp+xml"],["xdssc","application/dssc+xml"],["xdw","application/vnd.fujixerox.docuworks"],["xel","application/xcap-el+xml"],["xenc","application/xenc+xml"],["xer","application/patch-ops-error+xml"],["xfdf","application/vnd.adobe.xfdf"],["xfdl","application/vnd.xfdl"],["xht","application/xhtml+xml"],["xhtml","application/xhtml+xml"],["xhvml","application/xv+xml"],["xif","image/vnd.xiff"],["xl","application/excel"],["xla","application/vnd.ms-excel"],["xlam","application/vnd.ms-excel.addin.macroEnabled.12"],["xlc","application/vnd.ms-excel"],["xlf","application/xliff+xml"],["xlm","application/vnd.ms-excel"],["xls","application/vnd.ms-excel"],["xlsb","application/vnd.ms-excel.sheet.binary.macroEnabled.12"],["xlsm","application/vnd.ms-excel.sheet.macroEnabled.12"],["xlsx","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"],["xlt","application/vnd.ms-excel"],["xltm","application/vnd.ms-excel.template.macroEnabled.12"],["xltx","application/vnd.openxmlformats-officedocument.spreadsheetml.template"],["xlw","application/vnd.ms-excel"],["xm","audio/xm"],["xml","application/xml"],["xns","application/xcap-ns+xml"],["xo","application/vnd.olpc-sugar"],["xop","application/xop+xml"],["xpi","application/x-xpinstall"],["xpl","application/xproc+xml"],["xpm","image/x-xpixmap"],["xpr","application/vnd.is-xpr"],["xps","application/vnd.ms-xpsdocument"],["xpw","application/vnd.intercon.formnet"],["xpx","application/vnd.intercon.formnet"],["xsd","application/xml"],["xsl","application/xml"],["xslt","application/xslt+xml"],["xsm","application/vnd.syncml+xml"],["xspf","application/xspf+xml"],["xul","application/vnd.mozilla.xul+xml"],["xvm","application/xv+xml"],["xvml","application/xv+xml"],["xwd","image/x-xwindowdump"],["xyz","chemical/x-xyz"],["xz","application/x-xz"],["yaml","text/yaml"],["yang","application/yang"],["yin","application/yin+xml"],["yml","text/yaml"],["ymp","text/x-suse-ymp"],["z","application/x-compress"],["z1","application/x-zmachine"],["z2","application/x-zmachine"],["z3","application/x-zmachine"],["z4","application/x-zmachine"],["z5","application/x-zmachine"],["z6","application/x-zmachine"],["z7","application/x-zmachine"],["z8","application/x-zmachine"],["zaz","application/vnd.zzazz.deck+xml"],["zip","application/zip"],["zir","application/vnd.zul"],["zirz","application/vnd.zul"],["zmm","application/vnd.handheld-entertainment+xml"],["zsh","text/x-scriptzsh"]]);function Fe(e,n,t){const i=lo(e),{webkitRelativePath:o}=e,a=typeof n=="string"?n:typeof o=="string"&&o.length>0?o:`./${e.name}`;return typeof i.path!="string"&&wn(i,"path",a),wn(i,"relativePath",a),i}function lo(e){const{name:n}=e;if(n&&n.lastIndexOf(".")!==-1&&!e.type){const i=n.split(".").pop().toLowerCase(),o=ro.get(i);o&&Object.defineProperty(e,"type",{value:o,writable:!1,configurable:!1,enumerable:!0})}return e}function wn(e,n,t){Object.defineProperty(e,n,{value:t,writable:!1,configurable:!1,enumerable:!0})}const so=[".DS_Store","Thumbs.db"];function co(e){return _e(this,void 0,void 0,function*(){return Le(e)&&po(e.dataTransfer)?mo(e.dataTransfer,e.type):uo(e)?go(e):Array.isArray(e)&&e.every(n=>"getFile"in n&&typeof n.getFile=="function")?fo(e):[]})}function po(e){return Le(e)}function uo(e){return Le(e)&&Le(e.target)}function Le(e){return typeof e=="object"&&e!==null}function go(e){return gt(e.target.files).map(n=>Fe(n))}function fo(e){return _e(this,void 0,void 0,function*(){return(yield Promise.all(e.map(t=>t.getFile()))).map(t=>Fe(t))})}function mo(e,n){return _e(this,void 0,void 0,function*(){if(e.items){const t=gt(e.items).filter(o=>o.kind==="file");if(n!=="drop")return t;const i=yield Promise.all(t.map(vo));return yn(bn(i))}return yn(gt(e.files).map(t=>Fe(t)))})}function yn(e){return e.filter(n=>so.indexOf(n.name)===-1)}function gt(e){if(e===null)return[];const n=[];for(let t=0;t<e.length;t++){const i=e[t];n.push(i)}return n}function vo(e){if(typeof e.webkitGetAsEntry!="function")return Sn(e);const n=e.webkitGetAsEntry();return n&&n.isDirectory?Cn(n):Sn(e,n)}function bn(e){return e.reduce((n,t)=>[...n,...Array.isArray(t)?bn(t):[t]],[])}function Sn(e,n){return _e(this,void 0,void 0,function*(){var t;if(globalThis.isSecureContext&&typeof e.getAsFileSystemHandle=="function"){const a=yield e.getAsFileSystemHandle();if(a===null)throw new Error(`${e} is not a File`);if(a!==void 0){const r=yield a.getFile();return r.handle=a,Fe(r)}}const i=e.getAsFile();if(!i)throw new Error(`${e} is not a File`);return Fe(i,(t=n==null?void 0:n.fullPath)!==null&&t!==void 0?t:void 0)})}function xo(e){return _e(this,void 0,void 0,function*(){return e.isDirectory?Cn(e):ho(e)})}function Cn(e){const n=e.createReader();return new Promise((t,i)=>{const o=[];function a(){n.readEntries(r=>_e(this,void 0,void 0,function*(){if(r.length){const l=Promise.all(r.map(xo));o.push(l),a()}else try{const l=yield Promise.all(o);t(l)}catch(l){i(l)}}),r=>{i(r)})}a()})}function ho(e){return _e(this,void 0,void 0,function*(){return new Promise((n,t)=>{e.file(i=>{const o=Fe(i,e.fullPath);n(o)},i=>{t(i)})})})}var He={},_n;function wo(){return _n||(_n=1,He.__esModule=!0,He.default=function(e,n){if(e&&n){var t=Array.isArray(n)?n:n.split(",");if(t.length===0)return!0;var i=e.name||"",o=(e.type||"").toLowerCase(),a=o.replace(/\/.*$/,"");return t.some(function(r){var l=r.trim().toLowerCase();return l.charAt(0)==="."?i.toLowerCase().endsWith(l):l.endsWith("/*")?a===l.replace(/\/.*$/,""):o===l})}return!0}),He}var yo=wo();const ft=et(yo);function En(e){return Co(e)||So(e)||In(e)||bo()}function bo(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
31
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function So(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Co(e){if(Array.isArray(e))return mt(e)}function kn(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),t.push.apply(t,i)}return t}function Fn(e){for(var n=1;n<arguments.length;n++){var t=arguments[n]!=null?arguments[n]:{};n%2?kn(Object(t),!0).forEach(function(i){Pn(e,i,t[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):kn(Object(t)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(t,i))})}return e}function Pn(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function $e(e,n){return ko(e)||Eo(e,n)||In(e,n)||_o()}function _o(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
32
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function In(e,n){if(e){if(typeof e=="string")return mt(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);if(t==="Object"&&e.constructor&&(t=e.constructor.name),t==="Map"||t==="Set")return Array.from(e);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return mt(e,n)}}function mt(e,n){(n==null||n>e.length)&&(n=e.length);for(var t=0,i=new Array(n);t<n;t++)i[t]=e[t];return i}function Eo(e,n){var t=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(t!=null){var i=[],o=!0,a=!1,r,l;try{for(t=t.call(e);!(o=(r=t.next()).done)&&(i.push(r.value),!(n&&i.length===n));o=!0);}catch(s){a=!0,l=s}finally{try{!o&&t.return!=null&&t.return()}finally{if(a)throw l}}return i}}function ko(e){if(Array.isArray(e))return e}var Fo=typeof ft=="function"?ft:ft.default,Po="file-invalid-type",Io="file-too-large",Mo="file-too-small",Do="too-many-files",$o=function(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",t=n.split(","),i=t.length>1?"one of ".concat(t.join(", ")):t[0];return{code:Po,message:"File type must be ".concat(i)}},Mn=function(n){return{code:Io,message:"File is larger than ".concat(n," ").concat(n===1?"byte":"bytes")}},Dn=function(n){return{code:Mo,message:"File is smaller than ".concat(n," ").concat(n===1?"byte":"bytes")}},Ao={code:Do,message:"Too many files"};function $n(e,n){var t=e.type==="application/x-moz-file"||Fo(e,n);return[t,t?null:$o(n)]}function An(e,n,t){if(Ee(e.size))if(Ee(n)&&Ee(t)){if(e.size>t)return[!1,Mn(t)];if(e.size<n)return[!1,Dn(n)]}else{if(Ee(n)&&e.size<n)return[!1,Dn(n)];if(Ee(t)&&e.size>t)return[!1,Mn(t)]}return[!0,null]}function Ee(e){return e!=null}function Oo(e){var n=e.files,t=e.accept,i=e.minSize,o=e.maxSize,a=e.multiple,r=e.maxFiles,l=e.validator;return!a&&n.length>1||a&&r>=1&&n.length>r?!1:n.every(function(s){var p=$n(s,t),d=$e(p,1),f=d[0],g=An(s,i,o),u=$e(g,1),m=u[0],v=l?l(s):null;return f&&m&&!v})}function qe(e){return typeof e.isPropagationStopped=="function"?e.isPropagationStopped():typeof e.cancelBubble<"u"?e.cancelBubble:!1}function Ge(e){return e.dataTransfer?Array.prototype.some.call(e.dataTransfer.types,function(n){return n==="Files"||n==="application/x-moz-file"}):!!e.target&&!!e.target.files}function On(e){e.preventDefault()}function Ro(e){return e.indexOf("MSIE")!==-1||e.indexOf("Trident/")!==-1}function jo(e){return e.indexOf("Edge/")!==-1}function To(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.navigator.userAgent;return Ro(e)||jo(e)}function he(){for(var e=arguments.length,n=new Array(e),t=0;t<e;t++)n[t]=arguments[t];return function(i){for(var o=arguments.length,a=new Array(o>1?o-1:0),r=1;r<o;r++)a[r-1]=arguments[r];return n.some(function(l){return!qe(i)&&l&&l.apply(void 0,[i].concat(a)),qe(i)})}}function zo(){return"showOpenFilePicker"in window}function Vo(e){if(Ee(e)){var n=Object.entries(e).filter(function(t){var i=$e(t,2),o=i[0],a=i[1],r=!0;return Rn(o)||(console.warn('Skipped "'.concat(o,'" because it is not a valid MIME type. Check https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Common_types for a list of valid MIME types.')),r=!1),(!Array.isArray(a)||!a.every(jn))&&(console.warn('Skipped "'.concat(o,'" because an invalid file extension was provided.')),r=!1),r}).reduce(function(t,i){var o=$e(i,2),a=o[0],r=o[1];return Fn(Fn({},t),{},Pn({},a,r))},{});return[{description:"Files",accept:n}]}return e}function No(e){if(Ee(e))return Object.entries(e).reduce(function(n,t){var i=$e(t,2),o=i[0],a=i[1];return[].concat(En(n),[o],En(a))},[]).filter(function(n){return Rn(n)||jn(n)}).join(",")}function Lo(e){return e instanceof DOMException&&(e.name==="AbortError"||e.code===e.ABORT_ERR)}function Ho(e){return e instanceof DOMException&&(e.name==="SecurityError"||e.code===e.SECURITY_ERR)}function Rn(e){return e==="audio/*"||e==="video/*"||e==="image/*"||e==="text/*"||e==="application/*"||/\w+\/[-+.\w]+/g.test(e)}function jn(e){return/^.*\.[\w]+$/.test(e)}var qo=["children"],Go=["open"],Bo=["refKey","role","onKeyDown","onFocus","onBlur","onClick","onDragEnter","onDragOver","onDragLeave","onDrop"],Uo=["refKey","onChange","onClick"];function Ko(e){return Xo(e)||Yo(e)||Tn(e)||Wo()}function Wo(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
33
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Yo(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Xo(e){if(Array.isArray(e))return xt(e)}function vt(e,n){return Zo(e)||Jo(e,n)||Tn(e,n)||Qo()}function Qo(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
34
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Tn(e,n){if(e){if(typeof e=="string")return xt(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);if(t==="Object"&&e.constructor&&(t=e.constructor.name),t==="Map"||t==="Set")return Array.from(e);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return xt(e,n)}}function xt(e,n){(n==null||n>e.length)&&(n=e.length);for(var t=0,i=new Array(n);t<n;t++)i[t]=e[t];return i}function Jo(e,n){var t=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(t!=null){var i=[],o=!0,a=!1,r,l;try{for(t=t.call(e);!(o=(r=t.next()).done)&&(i.push(r.value),!(n&&i.length===n));o=!0);}catch(s){a=!0,l=s}finally{try{!o&&t.return!=null&&t.return()}finally{if(a)throw l}}return i}}function Zo(e){if(Array.isArray(e))return e}function zn(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),t.push.apply(t,i)}return t}function te(e){for(var n=1;n<arguments.length;n++){var t=arguments[n]!=null?arguments[n]:{};n%2?zn(Object(t),!0).forEach(function(i){ht(e,i,t[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):zn(Object(t)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(t,i))})}return e}function ht(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function Be(e,n){if(e==null)return{};var t=ea(e,n),i,o;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(o=0;o<a.length;o++)i=a[o],!(n.indexOf(i)>=0)&&Object.prototype.propertyIsEnumerable.call(e,i)&&(t[i]=e[i])}return t}function ea(e,n){if(e==null)return{};var t={},i=Object.keys(e),o,a;for(a=0;a<i.length;a++)o=i[a],!(n.indexOf(o)>=0)&&(t[o]=e[o]);return t}var wt=w.forwardRef(function(e,n){var t=e.children,i=Be(e,qo),o=Nn(i),a=o.open,r=Be(o,Go);return w.useImperativeHandle(n,function(){return{open:a}},[a]),w.createElement(w.Fragment,null,t(te(te({},r),{},{open:a})))});wt.displayName="Dropzone";var Vn={disabled:!1,getFilesFromEvent:co,maxSize:1/0,minSize:0,multiple:!0,maxFiles:0,preventDropOnDocument:!0,noClick:!1,noKeyboard:!1,noDrag:!1,noDragEventsBubbling:!1,validator:null,useFsAccessApi:!1,autoFocus:!1};wt.defaultProps=Vn,wt.propTypes={children:X.func,accept:X.objectOf(X.arrayOf(X.string)),multiple:X.bool,preventDropOnDocument:X.bool,noClick:X.bool,noKeyboard:X.bool,noDrag:X.bool,noDragEventsBubbling:X.bool,minSize:X.number,maxSize:X.number,maxFiles:X.number,disabled:X.bool,getFilesFromEvent:X.func,onFileDialogCancel:X.func,onFileDialogOpen:X.func,useFsAccessApi:X.bool,autoFocus:X.bool,onDragEnter:X.func,onDragLeave:X.func,onDragOver:X.func,onDrop:X.func,onDropAccepted:X.func,onDropRejected:X.func,onError:X.func,validator:X.func};var yt={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,acceptedFiles:[],fileRejections:[]};function Nn(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=te(te({},Vn),e),t=n.accept,i=n.disabled,o=n.getFilesFromEvent,a=n.maxSize,r=n.minSize,l=n.multiple,s=n.maxFiles,p=n.onDragEnter,d=n.onDragLeave,f=n.onDragOver,g=n.onDrop,u=n.onDropAccepted,m=n.onDropRejected,v=n.onFileDialogCancel,P=n.onFileDialogOpen,h=n.useFsAccessApi,O=n.autoFocus,S=n.preventDropOnDocument,T=n.noClick,x=n.noKeyboard,L=n.noDrag,V=n.noDragEventsBubbling,J=n.onError,Z=n.validator,pe=w.useMemo(function(){return No(t)},[t]),ue=w.useMemo(function(){return Vo(t)},[t]),xe=w.useMemo(function(){return typeof P=="function"?P:Ln},[P]),$=w.useMemo(function(){return typeof v=="function"?v:Ln},[v]),F=w.useRef(null),B=w.useRef(null),Q=w.useReducer(ta,yt),ee=vt(Q,2),se=ee[0],ne=ee[1],y=se.isFocused,M=se.isFileDialogActive,C=w.useRef(typeof window<"u"&&window.isSecureContext&&h&&zo()),D=function(){!C.current&&M&&setTimeout(function(){if(B.current){var z=B.current.files;z.length||(ne({type:"closeDialog"}),$())}},300)};w.useEffect(function(){return window.addEventListener("focus",D,!1),function(){window.removeEventListener("focus",D,!1)}},[B,M,$,C]);var b=w.useRef([]),E=function(z){F.current&&F.current.contains(z.target)||(z.preventDefault(),b.current=[])};w.useEffect(function(){return S&&(document.addEventListener("dragover",On,!1),document.addEventListener("drop",E,!1)),function(){S&&(document.removeEventListener("dragover",On),document.removeEventListener("drop",E))}},[F,S]),w.useEffect(function(){return!i&&O&&F.current&&F.current.focus(),function(){}},[F,O,i]);var I=w.useCallback(function(k){J?J(k):console.error(k)},[J]),A=w.useCallback(function(k){k.preventDefault(),k.persist(),Je(k),b.current=[].concat(Ko(b.current),[k.target]),Ge(k)&&Promise.resolve(o(k)).then(function(z){if(!(qe(k)&&!V)){var oe=z.length,re=oe>0&&Oo({files:z,accept:pe,minSize:r,maxSize:a,multiple:l,maxFiles:s,validator:Z}),fe=oe>0&&!re;ne({isDragAccept:re,isDragReject:fe,isDragActive:!0,type:"setDraggedFiles"}),p&&p(k)}}).catch(function(z){return I(z)})},[o,p,I,V,pe,r,a,l,s,Z]),H=w.useCallback(function(k){k.preventDefault(),k.persist(),Je(k);var z=Ge(k);if(z&&k.dataTransfer)try{k.dataTransfer.dropEffect="copy"}catch{}return z&&f&&f(k),!1},[f,V]),N=w.useCallback(function(k){k.preventDefault(),k.persist(),Je(k);var z=b.current.filter(function(re){return F.current&&F.current.contains(re)}),oe=z.indexOf(k.target);oe!==-1&&z.splice(oe,1),b.current=z,!(z.length>0)&&(ne({type:"setDraggedFiles",isDragActive:!1,isDragAccept:!1,isDragReject:!1}),Ge(k)&&d&&d(k))},[F,d,V]),G=w.useCallback(function(k,z){var oe=[],re=[];k.forEach(function(fe){var Te=$n(fe,pe),Me=vt(Te,2),Vt=Me[0],Nt=Me[1],Lt=An(fe,r,a),Ze=vt(Lt,2),Ht=Ze[0],qt=Ze[1],Gt=Z?Z(fe):null;if(Vt&&Ht&&!Gt)oe.push(fe);else{var Bt=[Nt,qt];Gt&&(Bt=Bt.concat(Gt)),re.push({file:fe,errors:Bt.filter(function(sr){return sr})})}}),(!l&&oe.length>1||l&&s>=1&&oe.length>s)&&(oe.forEach(function(fe){re.push({file:fe,errors:[Ao]})}),oe.splice(0)),ne({acceptedFiles:oe,fileRejections:re,isDragReject:re.length>0,type:"setFiles"}),g&&g(oe,re,z),re.length>0&&m&&m(re,z),oe.length>0&&u&&u(oe,z)},[ne,l,pe,r,a,s,g,u,m,Z]),ie=w.useCallback(function(k){k.preventDefault(),k.persist(),Je(k),b.current=[],Ge(k)&&Promise.resolve(o(k)).then(function(z){qe(k)&&!V||G(z,k)}).catch(function(z){return I(z)}),ne({type:"reset"})},[o,G,I,V]),_=w.useCallback(function(){if(C.current){ne({type:"openDialog"}),xe();var k={multiple:l,types:ue};window.showOpenFilePicker(k).then(function(z){return o(z)}).then(function(z){G(z,null),ne({type:"closeDialog"})}).catch(function(z){Lo(z)?($(z),ne({type:"closeDialog"})):Ho(z)?(C.current=!1,B.current?(B.current.value=null,B.current.click()):I(new Error("Cannot open the file picker because the https://developer.mozilla.org/en-US/docs/Web/API/File_System_Access_API is not supported and no <input> was provided."))):I(z)});return}B.current&&(ne({type:"openDialog"}),xe(),B.current.value=null,B.current.click())},[ne,xe,$,h,G,I,ue,l]),ge=w.useCallback(function(k){!F.current||!F.current.isEqualNode(k.target)||(k.key===" "||k.key==="Enter"||k.keyCode===32||k.keyCode===13)&&(k.preventDefault(),_())},[F,_]),ke=w.useCallback(function(){ne({type:"focus"})},[]),je=w.useCallback(function(){ne({type:"blur"})},[]),ci=w.useCallback(function(){T||(To()?setTimeout(_,0):_())},[T,_]),Ie=function(z){return i?null:z},zt=function(z){return x?null:Ie(z)},Qe=function(z){return L?null:Ie(z)},Je=function(z){V&&z.stopPropagation()},ar=w.useMemo(function(){return function(){var k=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},z=k.refKey,oe=z===void 0?"ref":z,re=k.role,fe=k.onKeyDown,Te=k.onFocus,Me=k.onBlur,Vt=k.onClick,Nt=k.onDragEnter,Lt=k.onDragOver,Ze=k.onDragLeave,Ht=k.onDrop,qt=Be(k,Bo);return te(te(ht({onKeyDown:zt(he(fe,ge)),onFocus:zt(he(Te,ke)),onBlur:zt(he(Me,je)),onClick:Ie(he(Vt,ci)),onDragEnter:Qe(he(Nt,A)),onDragOver:Qe(he(Lt,H)),onDragLeave:Qe(he(Ze,N)),onDrop:Qe(he(Ht,ie)),role:typeof re=="string"&&re!==""?re:"presentation"},oe,F),!i&&!x?{tabIndex:0}:{}),qt)}},[F,ge,ke,je,ci,A,H,N,ie,x,L,i]),rr=w.useCallback(function(k){k.stopPropagation()},[]),lr=w.useMemo(function(){return function(){var k=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},z=k.refKey,oe=z===void 0?"ref":z,re=k.onChange,fe=k.onClick,Te=Be(k,Uo),Me=ht({accept:pe,multiple:l,type:"file",style:{border:0,clip:"rect(0, 0, 0, 0)",clipPath:"inset(50%)",height:"1px",margin:"0 -1px -1px 0",overflow:"hidden",padding:0,position:"absolute",width:"1px",whiteSpace:"nowrap"},onChange:Ie(he(re,ie)),onClick:Ie(he(fe,rr)),tabIndex:-1},oe,B);return te(te({},Me),Te)}},[B,t,l,ie,i]);return te(te({},se),{},{isFocused:y&&!i,getRootProps:ar,getInputProps:lr,rootRef:F,inputRef:B,open:Ie(_)})}function ta(e,n){switch(n.type){case"focus":return te(te({},e),{},{isFocused:!0});case"blur":return te(te({},e),{},{isFocused:!1});case"openDialog":return te(te({},yt),{},{isFileDialogActive:!0});case"closeDialog":return te(te({},e),{},{isFileDialogActive:!1});case"setDraggedFiles":return te(te({},e),{},{isDragActive:n.isDragActive,isDragAccept:n.isDragAccept,isDragReject:n.isDragReject});case"setFiles":return te(te({},e),{},{acceptedFiles:n.acceptedFiles,fileRejections:n.fileRejections,isDragReject:n.isDragReject});case"reset":return te({},yt);default:return e}}function Ln(){}const na=()=>{const e=(l,s)=>{switch(s.type){case"add-files":return{acceptedFiles:[...l.acceptedFiles,...s.payload.acceptedFiles],fileRejections:[...l.fileRejections,...s.payload.fileRejections]};case"remove-accepted":return{...l,acceptedFiles:l.acceptedFiles.filter(p=>p!==s.payload)};case"remove-rejected":return{...l,fileRejections:l.fileRejections.filter(p=>p!==s.payload)}}},[{acceptedFiles:n,fileRejections:t},i]=w.useReducer(e,{acceptedFiles:[],fileRejections:[]}),o=w.useCallback((l,s)=>i({type:"add-files",payload:{acceptedFiles:l,fileRejections:s}}),[i]);return{acceptedFiles:n,fileRejections:t,onFileUpload:o,removeFile:l=>i({type:"remove-accepted",payload:l}),removeRejectedFile:l=>i({type:"remove-rejected",payload:l})}},ia=({accept:e,error:n,files:t,help:i,label:o,maxFiles:a,maxSize:r,minSize:l,onFileUpload:s,onRemoveFile:p,rejectedFiles:d})=>{const f=na(),g=t??f.acceptedFiles,u=d??f.fileRejections,m=s??f.onFileUpload,v=S=>{p?p(S):"file"in S&&"errors"in S?f.removeRejectedFile(S):f.removeFile(S)},{getRootProps:P,getInputProps:h}=Nn({accept:e,maxFiles:a,maxSize:r,minSize:l,onDrop:m}),O=w.useId();return c.jsxs("div",{className:U("p-form__group p-form-validation",{"is-error":!!n}),children:[o&&c.jsx(q.Label,{id:O,children:o}),i&&c.jsx("p",{className:"p-form-help-text",children:i}),c.jsxs("div",{className:"p-form__control",children:[!a||g.length+u.length<a?c.jsx("div",{className:"file-upload__wrapper",children:c.jsxs("div",{...P(),"aria-labelledby":o?O:void 0,className:"file-upload","data-testid":"file-upload",children:[c.jsx("input",{...h()}),c.jsx("button",{className:"file-upload__button",type:"button",children:"Drag and drop files here or click to upload"})]})}):null,c.jsxs("div",{className:"file-upload__files-list",children:[u&&u.map(S=>c.jsx("span",{className:"is-error",children:c.jsxs("div",{className:"file-upload__file is-rejected",children:[S.file.name,c.jsx(q.Button,{appearance:"base",className:"file-upload__file-remove-button",onClick:()=>v(S),type:"button",children:c.jsx(q.Icon,{name:"close",children:"Remove file"})})]})},S.file.name)),g&&g.map(S=>c.jsxs("div",{className:"file-upload__file",children:[S.name,S.percentUploaded!==void 0?c.jsx(Jt,{percentComplete:S.percentUploaded}):c.jsx(q.Button,{appearance:"base",className:"file-upload__file-remove-button",onClick:()=>v(S),type:"button",children:c.jsx(q.Icon,{name:"close",children:"Remove file"})})]},S.name))]}),n?c.jsxs("p",{className:"p-form-validation__message",children:[c.jsx("strong",{children:"Error: "}),n]}):null]})]})},Hn=(e,n)=>e.label.localeCompare(n.label,"en",{numeric:!0}),oa=e=>(n,t)=>{if(e){const i=e.has(n.value),o=e.has(t.value);if(i&&!o)return-1;if(!i&&o)return 1}return 0},aa=e=>{const n=new Map;return e.forEach(t=>{const i=t.group||"Ungrouped",o=n.get(i)||[];o.push(t),n.set(i,o)}),Array.from(n,([t,i])=>({group:t,items:i}))},qn=({items:e,selectedItems:n,disabledItems:t,header:i,updateItems:o,isOpen:a,footer:r,sortFn:l=Hn,groupFn:s=aa,...p})=>{const d=w.useMemo(()=>new Set(n.map(h=>h.value)),[n]),f=w.useMemo(()=>new Set(t.map(h=>h.value)),[t]),[g,u]=w.useState(new Set(d));w.useEffect(()=>{a&&u(new Set(d))},[a]);const m=w.useMemo(()=>e.some(h=>h.group),[e]),v=w.useMemo(()=>m?s(e):[{group:"Ungrouped",items:e}],[e,s]),P=h=>{const{checked:O,value:S}=h.target,T=e.find(x=>`${x.value}`===S);if(T){const x=O?[...n,T]:n.filter(L=>`${L.value}`!==S)??[];o(x)}};return c.jsx(on,{isVisible:a,className:"put-above",children:c.jsxs("div",{className:"multi-select__dropdown",role:"listbox",...p,children:[i||null,v.map(({group:h,items:O})=>c.jsxs("div",{className:"multi-select__group",children:[m?c.jsx("h5",{className:"multi-select__dropdown-header",children:h}):null,c.jsx("ul",{className:"multi-select__dropdown-list","aria-label":h,children:O.sort(l).sort(oa(g)).map(S=>c.jsx("li",{className:"multi-select__dropdown-item",children:c.jsx(q.CheckboxInput,{disabled:f.has(S.value),label:S.label,checked:d.has(S.value),value:S.value,onChange:P},S.value)},S.value))})]},h)),r?c.jsx("div",{className:"multi-select__footer",children:r}):null]})})},ra=({disabled:e,selectedItems:n=[],label:t,onItemsUpdate:i,placeholder:o,required:a=!1,items:r=[],disabledItems:l=[],dropdownHeader:s,dropdownFooter:p,variant:d="search"})=>{const f=q.useClickOutside(()=>{u(!1),v("")});q.useOnEscapePressed(()=>{u(!1),v("")});const[g,u]=w.useState(!1),[m,v]=w.useState("");w.useEffect(()=>{g||v("")},[g]);const[P,h]=w.useState([]),O=n||P,S=V=>{const J=Array.from(new Set(V));h(J),i&&i(J)},T=w.useId(),x=w.useId(),L=O.filter(V=>r.some(J=>J.value===V.value)).sort(Hn).map(V=>V.label).join(", ");return c.jsx("div",{ref:f,children:c.jsxs("div",{className:"multi-select",children:[d==="search"?c.jsx(q.SearchBox,{externallyControlled:!0,"aria-controls":T,"aria-expanded":g,id:x,role:"combobox","aria-label":t||o||"Search",disabled:e,autoComplete:"off",onChange:V=>{v(V),u(!0)},onFocus:()=>u(!0),placeholder:o??"Search",required:a,type:"text",value:m,className:"multi-select__input"}):c.jsx("button",{role:"combobox",type:"button","aria-label":t||o||"Select items","aria-controls":T,"aria-expanded":g,className:"multi-select__select-button",onClick:()=>{u(V=>!V)},children:c.jsx("span",{className:"multi-select__condensed-text",children:O.length>0?L:o??"Select items"})}),c.jsx(qn,{id:T,isOpen:g,items:m.length>0?r.filter(V=>V.label.toLowerCase().includes(m.toLowerCase())):r,selectedItems:O,disabledItems:l,header:s,updateItems:S,footer:p||c.jsxs(c.Fragment,{children:[c.jsx(q.Button,{appearance:"link",onClick:()=>{const V=r.filter(J=>!l.some(Z=>Z.value===J.value));S([...O,...V])},type:"button",children:"Select all"}),c.jsx(q.Button,{appearance:"link",onClick:()=>{const V=O.filter(J=>l.some(Z=>Z.value===J.value));S(V)},type:"button",children:"Clear"})]})})]})})},la={small:620},Gn=w.createContext({variant:"regular"}),bt=({className:e,children:n,variant:t,...i})=>c.jsx(Gn.Provider,{value:{variant:t},children:c.jsx("table",{...i,className:U("p-table-dynamic",e,{"is-full-height":t==="full-height"}),children:n})}),sa=({columns:e})=>c.jsx(c.Fragment,{children:Array.from({length:10},(n,t)=>c.jsx("tr",{"aria-hidden":"true",children:e.map((i,o)=>c.jsx("td",{className:U(i.id,"u-text-overflow-clip"),children:c.jsx(Zt,{isPending:!0,text:"XXXxxxx.xxxxxxxxx"})},o))},t))}),ca=({className:e,table:n})=>{const t=n?n.getAllColumns():Array.from({length:10}).fill({id:""});return c.jsxs(c.Fragment,{children:[c.jsx("caption",{className:"u-visually-hidden",children:"Loading..."}),c.jsx(Bn,{"aria-busy":"true",className:e,children:c.jsx(sa,{columns:t})})]})},Bn=({className:e,children:n,style:t,...i})=>{const{variant:o}=w.useContext(Gn),a=w.useRef(null),[r,l]=w.useState(null),s=w.useCallback(()=>{var d,f;if(window.innerWidth>la.small){const g=(f=(d=a.current)==null?void 0:d.getBoundingClientRect)==null?void 0:f.call(d).top;g&&l(g+1)}else l(null)},[]);w.useLayoutEffect(()=>{s()},[s]),w.useEffect(()=>(window.addEventListener("resize",s),()=>window.removeEventListener("resize",s)),[s]);const p=w.useMemo(()=>o==="full-height"&&r?{height:`calc(100vh - ${r}px)`,minHeight:`calc(100vh - ${r}px)`,...t}:t,[o,r,t]);return c.jsx("tbody",{className:e,ref:a,style:p,...i,children:n})};bt.Body=Bn,bt.Loading=ca;const St=({children:e})=>c.jsx("caption",{children:c.jsx("div",{className:"p-strip",children:e})}),pa=({children:e})=>c.jsx("div",{className:"row",children:c.jsx("div",{className:"col-start-large-4 u-align--left col-8 col-medium-4",children:c.jsx("p",{className:"p-heading--4 u-no-margin--bottom",children:e})})}),ua=({children:e})=>c.jsx("div",{className:"row",children:c.jsx("div",{className:"u-align--left col-start-large-4 col-8 col-medium-4",children:c.jsx("p",{children:e})})});St.Title=pa,St.Description=ua;/**
|
|
35
35
|
* table-core
|
|
36
36
|
*
|
|
37
37
|
* Copyright (c) TanStack
|
|
@@ -40,10 +40,10 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
40
40
|
* LICENSE.md file in the root directory of this source tree.
|
|
41
41
|
*
|
|
42
42
|
* @license MIT
|
|
43
|
-
*/function be(e,n){return typeof e=="function"?e(n):e}function de(e,n){return t=>{n.setState(i=>({...i,[e]:be(t,i[e])}))}}function Ue(e){return e instanceof Function}function
|
|
43
|
+
*/function be(e,n){return typeof e=="function"?e(n):e}function de(e,n){return t=>{n.setState(i=>({...i,[e]:be(t,i[e])}))}}function Ue(e){return e instanceof Function}function da(e){return Array.isArray(e)&&e.every(n=>typeof n=="number")}function Un(e,n){const t=[],i=o=>{o.forEach(a=>{t.push(a);const r=n(a);r!=null&&r.length&&i(r)})};return i(e),t}function R(e,n,t){let i=[],o;return a=>{let r;t.key&&t.debug&&(r=Date.now());const l=e(a);if(!(l.length!==i.length||l.some((d,f)=>i[f]!==d)))return o;i=l;let p;if(t.key&&t.debug&&(p=Date.now()),o=n(...l),t==null||t.onChange==null||t.onChange(o),t.key&&t.debug&&t!=null&&t.debug()){const d=Math.round((Date.now()-r)*100)/100,f=Math.round((Date.now()-p)*100)/100,g=f/16,u=(m,v)=>{for(m=String(m);m.length<v;)m=" "+m;return m};console.info(`%c⏱ ${u(f,5)} /${u(d,5)} ms`,`
|
|
44
44
|
font-size: .6rem;
|
|
45
45
|
font-weight: bold;
|
|
46
|
-
color: hsl(${Math.max(0,Math.min(120-120*g,120))}deg 100% 31%);`,t==null?void 0:t.key)}return o}}function R(e,n,t,i){return{debug:()=>{var o;return(o=e==null?void 0:e.debugAll)!=null?o:e[n]},key:process.env.NODE_ENV==="development"&&t,onChange:i}}function fa(e,n,t,i){const o=()=>{var r;return(r=a.getValue())!=null?r:e.options.renderFallbackValue},a={id:`${n.id}_${t.id}`,row:n,column:t,getValue:()=>n.getValue(i),renderValue:o,getContext:O(()=>[e,t,n,a],(r,l,s,u)=>({table:r,column:l,row:s,cell:u,getValue:u.getValue,renderValue:u.renderValue}),R(e.options,"debugCells","cell.getContext"))};return e._features.forEach(r=>{r.createCell==null||r.createCell(a,t,n,e)},{}),a}function ma(e,n,t,i){var o,a;const l={...e._getDefaultColumnDef(),...n},s=l.accessorKey;let u=(o=(a=l.id)!=null?a:s?typeof String.prototype.replaceAll=="function"?s.replaceAll(".","_"):s.replace(/\./g,"_"):void 0)!=null?o:typeof l.header=="string"?l.header:void 0,d;if(l.accessorFn?d=l.accessorFn:s&&(s.includes(".")?d=g=>{let p=g;for(const v of s.split(".")){var m;p=(m=p)==null?void 0:m[v],process.env.NODE_ENV!=="production"&&p===void 0&&console.warn(`"${v}" in deeply nested key "${s}" returned undefined.`)}return p}:d=g=>g[l.accessorKey]),!u)throw process.env.NODE_ENV!=="production"?new Error(l.accessorFn?"Columns require an id when using an accessorFn":"Columns require an id when using a non-string header"):new Error;let f={id:`${String(u)}`,accessorFn:d,parent:i,depth:t,columnDef:l,columns:[],getFlatColumns:O(()=>[!0],()=>{var g;return[f,...(g=f.columns)==null?void 0:g.flatMap(p=>p.getFlatColumns())]},R(e.options,"debugColumns","column.getFlatColumns")),getLeafColumns:O(()=>[e._getOrderColumnsFn()],g=>{var p;if((p=f.columns)!=null&&p.length){let m=f.columns.flatMap(v=>v.getLeafColumns());return g(m)}return[f]},R(e.options,"debugColumns","column.getLeafColumns"))};for(const g of e._features)g.createColumn==null||g.createColumn(f,e);return f}const le="debugHeaders";function Wn(e,n,t){var i;let a={id:(i=t.id)!=null?i:n.id,column:n,index:t.index,isPlaceholder:!!t.isPlaceholder,placeholderId:t.placeholderId,depth:t.depth,subHeaders:[],colSpan:0,rowSpan:0,headerGroup:null,getLeafHeaders:()=>{const r=[],l=s=>{s.subHeaders&&s.subHeaders.length&&s.subHeaders.map(l),r.push(s)};return l(a),r},getContext:()=>({table:e,header:a,column:n})};return e._features.forEach(r=>{r.createHeader==null||r.createHeader(a,e)}),a}const va={createTable:e=>{e.getHeaderGroups=O(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(n,t,i,o)=>{var a,r;const l=(a=i==null?void 0:i.map(f=>t.find(g=>g.id===f)).filter(Boolean))!=null?a:[],s=(r=o==null?void 0:o.map(f=>t.find(g=>g.id===f)).filter(Boolean))!=null?r:[],u=t.filter(f=>!(i!=null&&i.includes(f.id))&&!(o!=null&&o.includes(f.id)));return Ke(n,[...l,...u,...s],e)},R(e.options,le,"getHeaderGroups")),e.getCenterHeaderGroups=O(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(n,t,i,o)=>(t=t.filter(a=>!(i!=null&&i.includes(a.id))&&!(o!=null&&o.includes(a.id))),Ke(n,t,e,"center")),R(e.options,le,"getCenterHeaderGroups")),e.getLeftHeaderGroups=O(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left],(n,t,i)=>{var o;const a=(o=i==null?void 0:i.map(r=>t.find(l=>l.id===r)).filter(Boolean))!=null?o:[];return Ke(n,a,e,"left")},R(e.options,le,"getLeftHeaderGroups")),e.getRightHeaderGroups=O(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.right],(n,t,i)=>{var o;const a=(o=i==null?void 0:i.map(r=>t.find(l=>l.id===r)).filter(Boolean))!=null?o:[];return Ke(n,a,e,"right")},R(e.options,le,"getRightHeaderGroups")),e.getFooterGroups=O(()=>[e.getHeaderGroups()],n=>[...n].reverse(),R(e.options,le,"getFooterGroups")),e.getLeftFooterGroups=O(()=>[e.getLeftHeaderGroups()],n=>[...n].reverse(),R(e.options,le,"getLeftFooterGroups")),e.getCenterFooterGroups=O(()=>[e.getCenterHeaderGroups()],n=>[...n].reverse(),R(e.options,le,"getCenterFooterGroups")),e.getRightFooterGroups=O(()=>[e.getRightHeaderGroups()],n=>[...n].reverse(),R(e.options,le,"getRightFooterGroups")),e.getFlatHeaders=O(()=>[e.getHeaderGroups()],n=>n.map(t=>t.headers).flat(),R(e.options,le,"getFlatHeaders")),e.getLeftFlatHeaders=O(()=>[e.getLeftHeaderGroups()],n=>n.map(t=>t.headers).flat(),R(e.options,le,"getLeftFlatHeaders")),e.getCenterFlatHeaders=O(()=>[e.getCenterHeaderGroups()],n=>n.map(t=>t.headers).flat(),R(e.options,le,"getCenterFlatHeaders")),e.getRightFlatHeaders=O(()=>[e.getRightHeaderGroups()],n=>n.map(t=>t.headers).flat(),R(e.options,le,"getRightFlatHeaders")),e.getCenterLeafHeaders=O(()=>[e.getCenterFlatHeaders()],n=>n.filter(t=>{var i;return!((i=t.subHeaders)!=null&&i.length)}),R(e.options,le,"getCenterLeafHeaders")),e.getLeftLeafHeaders=O(()=>[e.getLeftFlatHeaders()],n=>n.filter(t=>{var i;return!((i=t.subHeaders)!=null&&i.length)}),R(e.options,le,"getLeftLeafHeaders")),e.getRightLeafHeaders=O(()=>[e.getRightFlatHeaders()],n=>n.filter(t=>{var i;return!((i=t.subHeaders)!=null&&i.length)}),R(e.options,le,"getRightLeafHeaders")),e.getLeafHeaders=O(()=>[e.getLeftHeaderGroups(),e.getCenterHeaderGroups(),e.getRightHeaderGroups()],(n,t,i)=>{var o,a,r,l,s,u;return[...(o=(a=n[0])==null?void 0:a.headers)!=null?o:[],...(r=(l=t[0])==null?void 0:l.headers)!=null?r:[],...(s=(u=i[0])==null?void 0:u.headers)!=null?s:[]].map(d=>d.getLeafHeaders()).flat()},R(e.options,le,"getLeafHeaders"))}};function Ke(e,n,t,i){var o,a;let r=0;const l=function(g,p){p===void 0&&(p=1),r=Math.max(r,p),g.filter(m=>m.getIsVisible()).forEach(m=>{var v;(v=m.columns)!=null&&v.length&&l(m.columns,p+1)},0)};l(e);let s=[];const u=(g,p)=>{const m={depth:p,id:[i,`${p}`].filter(Boolean).join("_"),headers:[]},v=[];g.forEach(I=>{const w=[...v].reverse()[0],j=I.column.depth===m.depth;let M,T=!1;if(j&&I.column.parent?M=I.column.parent:(M=I.column,T=!0),w&&(w==null?void 0:w.column)===M)w.subHeaders.push(I);else{const x=Wn(t,M,{id:[i,p,M.id,I==null?void 0:I.id].filter(Boolean).join("_"),isPlaceholder:T,placeholderId:T?`${v.filter(L=>L.column===M).length}`:void 0,depth:p,index:v.length});x.subHeaders.push(I),v.push(x)}m.headers.push(I),I.headerGroup=m}),s.push(m),p>0&&u(v,p-1)},d=n.map((g,p)=>Wn(t,g,{depth:r,index:p}));u(d,r-1),s.reverse();const f=g=>g.filter(m=>m.column.getIsVisible()).map(m=>{let v=0,I=0,w=[0];m.subHeaders&&m.subHeaders.length?(w=[],f(m.subHeaders).forEach(M=>{let{colSpan:T,rowSpan:x}=M;v+=T,w.push(x)})):v=1;const j=Math.min(...w);return I=I+j,m.colSpan=v,m.rowSpan=I,{colSpan:v,rowSpan:I}});return f((o=(a=s[0])==null?void 0:a.headers)!=null?o:[]),s}const Yn=(e,n,t,i,o,a,r)=>{let l={id:n,index:i,original:t,depth:o,parentId:r,_valuesCache:{},_uniqueValuesCache:{},getValue:s=>{if(l._valuesCache.hasOwnProperty(s))return l._valuesCache[s];const u=e.getColumn(s);if(u!=null&&u.accessorFn)return l._valuesCache[s]=u.accessorFn(l.original,i),l._valuesCache[s]},getUniqueValues:s=>{if(l._uniqueValuesCache.hasOwnProperty(s))return l._uniqueValuesCache[s];const u=e.getColumn(s);if(u!=null&&u.accessorFn)return u.columnDef.getUniqueValues?(l._uniqueValuesCache[s]=u.columnDef.getUniqueValues(l.original,i),l._uniqueValuesCache[s]):(l._uniqueValuesCache[s]=[l.getValue(s)],l._uniqueValuesCache[s])},renderValue:s=>{var u;return(u=l.getValue(s))!=null?u:e.options.renderFallbackValue},subRows:a??[],getLeafRows:()=>Kn(l.subRows,s=>s.subRows),getParentRow:()=>l.parentId?e.getRow(l.parentId,!0):void 0,getParentRows:()=>{let s=[],u=l;for(;;){const d=u.getParentRow();if(!d)break;s.push(d),u=d}return s.reverse()},getAllCells:O(()=>[e.getAllLeafColumns()],s=>s.map(u=>fa(e,l,u,u.id)),R(e.options,"debugRows","getAllCells")),_getAllCellsByColumnId:O(()=>[l.getAllCells()],s=>s.reduce((u,d)=>(u[d.column.id]=d,u),{}),R(e.options,"debugRows","getAllCellsByColumnId"))};for(let s=0;s<e._features.length;s++){const u=e._features[s];u==null||u.createRow==null||u.createRow(l,e)}return l},xa={createColumn:(e,n)=>{e._getFacetedRowModel=n.options.getFacetedRowModel&&n.options.getFacetedRowModel(n,e.id),e.getFacetedRowModel=()=>e._getFacetedRowModel?e._getFacetedRowModel():n.getPreFilteredRowModel(),e._getFacetedUniqueValues=n.options.getFacetedUniqueValues&&n.options.getFacetedUniqueValues(n,e.id),e.getFacetedUniqueValues=()=>e._getFacetedUniqueValues?e._getFacetedUniqueValues():new Map,e._getFacetedMinMaxValues=n.options.getFacetedMinMaxValues&&n.options.getFacetedMinMaxValues(n,e.id),e.getFacetedMinMaxValues=()=>{if(e._getFacetedMinMaxValues)return e._getFacetedMinMaxValues()}}},Xn=(e,n,t)=>{var i,o;const a=t==null||(i=t.toString())==null?void 0:i.toLowerCase();return!!(!((o=e.getValue(n))==null||(o=o.toString())==null||(o=o.toLowerCase())==null)&&o.includes(a))};Xn.autoRemove=e=>me(e);const Qn=(e,n,t)=>{var i;return!!(!((i=e.getValue(n))==null||(i=i.toString())==null)&&i.includes(t))};Qn.autoRemove=e=>me(e);const Jn=(e,n,t)=>{var i;return((i=e.getValue(n))==null||(i=i.toString())==null?void 0:i.toLowerCase())===(t==null?void 0:t.toLowerCase())};Jn.autoRemove=e=>me(e);const Zn=(e,n,t)=>{var i;return(i=e.getValue(n))==null?void 0:i.includes(t)};Zn.autoRemove=e=>me(e);const ei=(e,n,t)=>!t.some(i=>{var o;return!((o=e.getValue(n))!=null&&o.includes(i))});ei.autoRemove=e=>me(e)||!(e!=null&&e.length);const ti=(e,n,t)=>t.some(i=>{var o;return(o=e.getValue(n))==null?void 0:o.includes(i)});ti.autoRemove=e=>me(e)||!(e!=null&&e.length);const ni=(e,n,t)=>e.getValue(n)===t;ni.autoRemove=e=>me(e);const ii=(e,n,t)=>e.getValue(n)==t;ii.autoRemove=e=>me(e);const Ct=(e,n,t)=>{let[i,o]=t;const a=e.getValue(n);return a>=i&&a<=o};Ct.resolveFilterValue=e=>{let[n,t]=e,i=typeof n!="number"?parseFloat(n):n,o=typeof t!="number"?parseFloat(t):t,a=n===null||Number.isNaN(i)?-1/0:i,r=t===null||Number.isNaN(o)?1/0:o;if(a>r){const l=a;a=r,r=l}return[a,r]},Ct.autoRemove=e=>me(e)||me(e[0])&&me(e[1]);const we={includesString:Xn,includesStringSensitive:Qn,equalsString:Jn,arrIncludes:Zn,arrIncludesAll:ei,arrIncludesSome:ti,equals:ni,weakEquals:ii,inNumberRange:Ct};function me(e){return e==null||e===""}const ha={getDefaultColumnDef:()=>({filterFn:"auto"}),getInitialState:e=>({columnFilters:[],...e}),getDefaultOptions:e=>({onColumnFiltersChange:de("columnFilters",e),filterFromLeafRows:!1,maxLeafRowFilterDepth:100}),createColumn:(e,n)=>{e.getAutoFilterFn=()=>{const t=n.getCoreRowModel().flatRows[0],i=t==null?void 0:t.getValue(e.id);return typeof i=="string"?we.includesString:typeof i=="number"?we.inNumberRange:typeof i=="boolean"||i!==null&&typeof i=="object"?we.equals:Array.isArray(i)?we.arrIncludes:we.weakEquals},e.getFilterFn=()=>{var t,i;return Ue(e.columnDef.filterFn)?e.columnDef.filterFn:e.columnDef.filterFn==="auto"?e.getAutoFilterFn():(t=(i=n.options.filterFns)==null?void 0:i[e.columnDef.filterFn])!=null?t:we[e.columnDef.filterFn]},e.getCanFilter=()=>{var t,i,o;return((t=e.columnDef.enableColumnFilter)!=null?t:!0)&&((i=n.options.enableColumnFilters)!=null?i:!0)&&((o=n.options.enableFilters)!=null?o:!0)&&!!e.accessorFn},e.getIsFiltered=()=>e.getFilterIndex()>-1,e.getFilterValue=()=>{var t;return(t=n.getState().columnFilters)==null||(t=t.find(i=>i.id===e.id))==null?void 0:t.value},e.getFilterIndex=()=>{var t,i;return(t=(i=n.getState().columnFilters)==null?void 0:i.findIndex(o=>o.id===e.id))!=null?t:-1},e.setFilterValue=t=>{n.setColumnFilters(i=>{const o=e.getFilterFn(),a=i==null?void 0:i.find(d=>d.id===e.id),r=be(t,a?a.value:void 0);if(oi(o,r,e)){var l;return(l=i==null?void 0:i.filter(d=>d.id!==e.id))!=null?l:[]}const s={id:e.id,value:r};if(a){var u;return(u=i==null?void 0:i.map(d=>d.id===e.id?s:d))!=null?u:[]}return i!=null&&i.length?[...i,s]:[s]})}},createRow:(e,n)=>{e.columnFilters={},e.columnFiltersMeta={}},createTable:e=>{e.setColumnFilters=n=>{const t=e.getAllLeafColumns(),i=o=>{var a;return(a=be(n,o))==null?void 0:a.filter(r=>{const l=t.find(s=>s.id===r.id);if(l){const s=l.getFilterFn();if(oi(s,r.value,l))return!1}return!0})};e.options.onColumnFiltersChange==null||e.options.onColumnFiltersChange(i)},e.resetColumnFilters=n=>{var t,i;e.setColumnFilters(n?[]:(t=(i=e.initialState)==null?void 0:i.columnFilters)!=null?t:[])},e.getPreFilteredRowModel=()=>e.getCoreRowModel(),e.getFilteredRowModel=()=>(!e._getFilteredRowModel&&e.options.getFilteredRowModel&&(e._getFilteredRowModel=e.options.getFilteredRowModel(e)),e.options.manualFiltering||!e._getFilteredRowModel?e.getPreFilteredRowModel():e._getFilteredRowModel())}};function oi(e,n,t){return(e&&e.autoRemove?e.autoRemove(n,t):!1)||typeof n>"u"||typeof n=="string"&&!n}const _t={sum:(e,n,t)=>t.reduce((i,o)=>{const a=o.getValue(e);return i+(typeof a=="number"?a:0)},0),min:(e,n,t)=>{let i;return t.forEach(o=>{const a=o.getValue(e);a!=null&&(i>a||i===void 0&&a>=a)&&(i=a)}),i},max:(e,n,t)=>{let i;return t.forEach(o=>{const a=o.getValue(e);a!=null&&(i<a||i===void 0&&a>=a)&&(i=a)}),i},extent:(e,n,t)=>{let i,o;return t.forEach(a=>{const r=a.getValue(e);r!=null&&(i===void 0?r>=r&&(i=o=r):(i>r&&(i=r),o<r&&(o=r)))}),[i,o]},mean:(e,n)=>{let t=0,i=0;if(n.forEach(o=>{let a=o.getValue(e);a!=null&&(a=+a)>=a&&(++t,i+=a)}),t)return i/t},median:(e,n)=>{if(!n.length)return;const t=n.map(a=>a.getValue(e));if(!ga(t))return;if(t.length===1)return t[0];const i=Math.floor(t.length/2),o=t.sort((a,r)=>a-r);return t.length%2!==0?o[i]:(o[i-1]+o[i])/2},unique:(e,n)=>Array.from(new Set(n.map(t=>t.getValue(e))).values()),uniqueCount:(e,n)=>new Set(n.map(t=>t.getValue(e))).size,count:(e,n)=>n.length},wa={getDefaultColumnDef:()=>({aggregatedCell:e=>{var n,t;return(n=(t=e.getValue())==null||t.toString==null?void 0:t.toString())!=null?n:null},aggregationFn:"auto"}),getInitialState:e=>({grouping:[],...e}),getDefaultOptions:e=>({onGroupingChange:de("grouping",e),groupedColumnMode:"reorder"}),createColumn:(e,n)=>{e.toggleGrouping=()=>{n.setGrouping(t=>t!=null&&t.includes(e.id)?t.filter(i=>i!==e.id):[...t??[],e.id])},e.getCanGroup=()=>{var t,i;return((t=e.columnDef.enableGrouping)!=null?t:!0)&&((i=n.options.enableGrouping)!=null?i:!0)&&(!!e.accessorFn||!!e.columnDef.getGroupingValue)},e.getIsGrouped=()=>{var t;return(t=n.getState().grouping)==null?void 0:t.includes(e.id)},e.getGroupedIndex=()=>{var t;return(t=n.getState().grouping)==null?void 0:t.indexOf(e.id)},e.getToggleGroupingHandler=()=>{const t=e.getCanGroup();return()=>{t&&e.toggleGrouping()}},e.getAutoAggregationFn=()=>{const t=n.getCoreRowModel().flatRows[0],i=t==null?void 0:t.getValue(e.id);if(typeof i=="number")return _t.sum;if(Object.prototype.toString.call(i)==="[object Date]")return _t.extent},e.getAggregationFn=()=>{var t,i;if(!e)throw new Error;return Ue(e.columnDef.aggregationFn)?e.columnDef.aggregationFn:e.columnDef.aggregationFn==="auto"?e.getAutoAggregationFn():(t=(i=n.options.aggregationFns)==null?void 0:i[e.columnDef.aggregationFn])!=null?t:_t[e.columnDef.aggregationFn]}},createTable:e=>{e.setGrouping=n=>e.options.onGroupingChange==null?void 0:e.options.onGroupingChange(n),e.resetGrouping=n=>{var t,i;e.setGrouping(n?[]:(t=(i=e.initialState)==null?void 0:i.grouping)!=null?t:[])},e.getPreGroupedRowModel=()=>e.getFilteredRowModel(),e.getGroupedRowModel=()=>(!e._getGroupedRowModel&&e.options.getGroupedRowModel&&(e._getGroupedRowModel=e.options.getGroupedRowModel(e)),e.options.manualGrouping||!e._getGroupedRowModel?e.getPreGroupedRowModel():e._getGroupedRowModel())},createRow:(e,n)=>{e.getIsGrouped=()=>!!e.groupingColumnId,e.getGroupingValue=t=>{if(e._groupingValuesCache.hasOwnProperty(t))return e._groupingValuesCache[t];const i=n.getColumn(t);return i!=null&&i.columnDef.getGroupingValue?(e._groupingValuesCache[t]=i.columnDef.getGroupingValue(e.original),e._groupingValuesCache[t]):e.getValue(t)},e._groupingValuesCache={}},createCell:(e,n,t,i)=>{e.getIsGrouped=()=>n.getIsGrouped()&&n.id===t.groupingColumnId,e.getIsPlaceholder=()=>!e.getIsGrouped()&&n.getIsGrouped(),e.getIsAggregated=()=>{var o;return!e.getIsGrouped()&&!e.getIsPlaceholder()&&!!((o=t.subRows)!=null&&o.length)}}};function ya(e,n,t){if(!(n!=null&&n.length)||!t)return e;const i=e.filter(a=>!n.includes(a.id));return t==="remove"?i:[...n.map(a=>e.find(r=>r.id===a)).filter(Boolean),...i]}const ba={getInitialState:e=>({columnOrder:[],...e}),getDefaultOptions:e=>({onColumnOrderChange:de("columnOrder",e)}),createColumn:(e,n)=>{e.getIndex=O(t=>[Ae(n,t)],t=>t.findIndex(i=>i.id===e.id),R(n.options,"debugColumns","getIndex")),e.getIsFirstColumn=t=>{var i;return((i=Ae(n,t)[0])==null?void 0:i.id)===e.id},e.getIsLastColumn=t=>{var i;const o=Ae(n,t);return((i=o[o.length-1])==null?void 0:i.id)===e.id}},createTable:e=>{e.setColumnOrder=n=>e.options.onColumnOrderChange==null?void 0:e.options.onColumnOrderChange(n),e.resetColumnOrder=n=>{var t;e.setColumnOrder(n?[]:(t=e.initialState.columnOrder)!=null?t:[])},e._getOrderColumnsFn=O(()=>[e.getState().columnOrder,e.getState().grouping,e.options.groupedColumnMode],(n,t,i)=>o=>{let a=[];if(!(n!=null&&n.length))a=o;else{const r=[...n],l=[...o];for(;l.length&&r.length;){const s=r.shift(),u=l.findIndex(d=>d.id===s);u>-1&&a.push(l.splice(u,1)[0])}a=[...a,...l]}return ya(a,t,i)},R(e.options,"debugTable","_getOrderColumnsFn"))}},Et=()=>({left:[],right:[]}),Sa={getInitialState:e=>({columnPinning:Et(),...e}),getDefaultOptions:e=>({onColumnPinningChange:de("columnPinning",e)}),createColumn:(e,n)=>{e.pin=t=>{const i=e.getLeafColumns().map(o=>o.id).filter(Boolean);n.setColumnPinning(o=>{var a,r;if(t==="right"){var l,s;return{left:((l=o==null?void 0:o.left)!=null?l:[]).filter(f=>!(i!=null&&i.includes(f))),right:[...((s=o==null?void 0:o.right)!=null?s:[]).filter(f=>!(i!=null&&i.includes(f))),...i]}}if(t==="left"){var u,d;return{left:[...((u=o==null?void 0:o.left)!=null?u:[]).filter(f=>!(i!=null&&i.includes(f))),...i],right:((d=o==null?void 0:o.right)!=null?d:[]).filter(f=>!(i!=null&&i.includes(f)))}}return{left:((a=o==null?void 0:o.left)!=null?a:[]).filter(f=>!(i!=null&&i.includes(f))),right:((r=o==null?void 0:o.right)!=null?r:[]).filter(f=>!(i!=null&&i.includes(f)))}})},e.getCanPin=()=>e.getLeafColumns().some(i=>{var o,a,r;return((o=i.columnDef.enablePinning)!=null?o:!0)&&((a=(r=n.options.enableColumnPinning)!=null?r:n.options.enablePinning)!=null?a:!0)}),e.getIsPinned=()=>{const t=e.getLeafColumns().map(l=>l.id),{left:i,right:o}=n.getState().columnPinning,a=t.some(l=>i==null?void 0:i.includes(l)),r=t.some(l=>o==null?void 0:o.includes(l));return a?"left":r?"right":!1},e.getPinnedIndex=()=>{var t,i;const o=e.getIsPinned();return o?(t=(i=n.getState().columnPinning)==null||(i=i[o])==null?void 0:i.indexOf(e.id))!=null?t:-1:0}},createRow:(e,n)=>{e.getCenterVisibleCells=O(()=>[e._getAllVisibleCells(),n.getState().columnPinning.left,n.getState().columnPinning.right],(t,i,o)=>{const a=[...i??[],...o??[]];return t.filter(r=>!a.includes(r.column.id))},R(n.options,"debugRows","getCenterVisibleCells")),e.getLeftVisibleCells=O(()=>[e._getAllVisibleCells(),n.getState().columnPinning.left],(t,i)=>(i??[]).map(a=>t.find(r=>r.column.id===a)).filter(Boolean).map(a=>({...a,position:"left"})),R(n.options,"debugRows","getLeftVisibleCells")),e.getRightVisibleCells=O(()=>[e._getAllVisibleCells(),n.getState().columnPinning.right],(t,i)=>(i??[]).map(a=>t.find(r=>r.column.id===a)).filter(Boolean).map(a=>({...a,position:"right"})),R(n.options,"debugRows","getRightVisibleCells"))},createTable:e=>{e.setColumnPinning=n=>e.options.onColumnPinningChange==null?void 0:e.options.onColumnPinningChange(n),e.resetColumnPinning=n=>{var t,i;return e.setColumnPinning(n?Et():(t=(i=e.initialState)==null?void 0:i.columnPinning)!=null?t:Et())},e.getIsSomeColumnsPinned=n=>{var t;const i=e.getState().columnPinning;if(!n){var o,a;return!!((o=i.left)!=null&&o.length||(a=i.right)!=null&&a.length)}return!!((t=i[n])!=null&&t.length)},e.getLeftLeafColumns=O(()=>[e.getAllLeafColumns(),e.getState().columnPinning.left],(n,t)=>(t??[]).map(i=>n.find(o=>o.id===i)).filter(Boolean),R(e.options,"debugColumns","getLeftLeafColumns")),e.getRightLeafColumns=O(()=>[e.getAllLeafColumns(),e.getState().columnPinning.right],(n,t)=>(t??[]).map(i=>n.find(o=>o.id===i)).filter(Boolean),R(e.options,"debugColumns","getRightLeafColumns")),e.getCenterLeafColumns=O(()=>[e.getAllLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(n,t,i)=>{const o=[...t??[],...i??[]];return n.filter(a=>!o.includes(a.id))},R(e.options,"debugColumns","getCenterLeafColumns"))}},We={size:150,minSize:20,maxSize:Number.MAX_SAFE_INTEGER},kt=()=>({startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,isResizingColumn:!1,columnSizingStart:[]}),Ca={getDefaultColumnDef:()=>We,getInitialState:e=>({columnSizing:{},columnSizingInfo:kt(),...e}),getDefaultOptions:e=>({columnResizeMode:"onEnd",columnResizeDirection:"ltr",onColumnSizingChange:de("columnSizing",e),onColumnSizingInfoChange:de("columnSizingInfo",e)}),createColumn:(e,n)=>{e.getSize=()=>{var t,i,o;const a=n.getState().columnSizing[e.id];return Math.min(Math.max((t=e.columnDef.minSize)!=null?t:We.minSize,(i=a??e.columnDef.size)!=null?i:We.size),(o=e.columnDef.maxSize)!=null?o:We.maxSize)},e.getStart=O(t=>[t,Ae(n,t),n.getState().columnSizing],(t,i)=>i.slice(0,e.getIndex(t)).reduce((o,a)=>o+a.getSize(),0),R(n.options,"debugColumns","getStart")),e.getAfter=O(t=>[t,Ae(n,t),n.getState().columnSizing],(t,i)=>i.slice(e.getIndex(t)+1).reduce((o,a)=>o+a.getSize(),0),R(n.options,"debugColumns","getAfter")),e.resetSize=()=>{n.setColumnSizing(t=>{let{[e.id]:i,...o}=t;return o})},e.getCanResize=()=>{var t,i;return((t=e.columnDef.enableResizing)!=null?t:!0)&&((i=n.options.enableColumnResizing)!=null?i:!0)},e.getIsResizing=()=>n.getState().columnSizingInfo.isResizingColumn===e.id},createHeader:(e,n)=>{e.getSize=()=>{let t=0;const i=o=>{if(o.subHeaders.length)o.subHeaders.forEach(i);else{var a;t+=(a=o.column.getSize())!=null?a:0}};return i(e),t},e.getStart=()=>{if(e.index>0){const t=e.headerGroup.headers[e.index-1];return t.getStart()+t.getSize()}return 0},e.getResizeHandler=t=>{const i=n.getColumn(e.column.id),o=i==null?void 0:i.getCanResize();return a=>{if(!i||!o||(a.persist==null||a.persist(),Ft(a)&&a.touches&&a.touches.length>1))return;const r=e.getSize(),l=e?e.getLeafHeaders().map(w=>[w.column.id,w.column.getSize()]):[[i.id,i.getSize()]],s=Ft(a)?Math.round(a.touches[0].clientX):a.clientX,u={},d=(w,j)=>{typeof j=="number"&&(n.setColumnSizingInfo(M=>{var T,x;const L=n.options.columnResizeDirection==="rtl"?-1:1,V=(j-((T=M==null?void 0:M.startOffset)!=null?T:0))*L,J=Math.max(V/((x=M==null?void 0:M.startSize)!=null?x:0),-.999999);return M.columnSizingStart.forEach(Z=>{let[pe,ue]=Z;u[pe]=Math.round(Math.max(ue+ue*J,0)*100)/100}),{...M,deltaOffset:V,deltaPercentage:J}}),(n.options.columnResizeMode==="onChange"||w==="end")&&n.setColumnSizing(M=>({...M,...u})))},f=w=>d("move",w),g=w=>{d("end",w),n.setColumnSizingInfo(j=>({...j,isResizingColumn:!1,startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,columnSizingStart:[]}))},p=t||typeof document<"u"?document:null,m={moveHandler:w=>f(w.clientX),upHandler:w=>{p==null||p.removeEventListener("mousemove",m.moveHandler),p==null||p.removeEventListener("mouseup",m.upHandler),g(w.clientX)}},v={moveHandler:w=>(w.cancelable&&(w.preventDefault(),w.stopPropagation()),f(w.touches[0].clientX),!1),upHandler:w=>{var j;p==null||p.removeEventListener("touchmove",v.moveHandler),p==null||p.removeEventListener("touchend",v.upHandler),w.cancelable&&(w.preventDefault(),w.stopPropagation()),g((j=w.touches[0])==null?void 0:j.clientX)}},I=_a()?{passive:!1}:!1;Ft(a)?(p==null||p.addEventListener("touchmove",v.moveHandler,I),p==null||p.addEventListener("touchend",v.upHandler,I)):(p==null||p.addEventListener("mousemove",m.moveHandler,I),p==null||p.addEventListener("mouseup",m.upHandler,I)),n.setColumnSizingInfo(w=>({...w,startOffset:s,startSize:r,deltaOffset:0,deltaPercentage:0,columnSizingStart:l,isResizingColumn:i.id}))}}},createTable:e=>{e.setColumnSizing=n=>e.options.onColumnSizingChange==null?void 0:e.options.onColumnSizingChange(n),e.setColumnSizingInfo=n=>e.options.onColumnSizingInfoChange==null?void 0:e.options.onColumnSizingInfoChange(n),e.resetColumnSizing=n=>{var t;e.setColumnSizing(n?{}:(t=e.initialState.columnSizing)!=null?t:{})},e.resetHeaderSizeInfo=n=>{var t;e.setColumnSizingInfo(n?kt():(t=e.initialState.columnSizingInfo)!=null?t:kt())},e.getTotalSize=()=>{var n,t;return(n=(t=e.getHeaderGroups()[0])==null?void 0:t.headers.reduce((i,o)=>i+o.getSize(),0))!=null?n:0},e.getLeftTotalSize=()=>{var n,t;return(n=(t=e.getLeftHeaderGroups()[0])==null?void 0:t.headers.reduce((i,o)=>i+o.getSize(),0))!=null?n:0},e.getCenterTotalSize=()=>{var n,t;return(n=(t=e.getCenterHeaderGroups()[0])==null?void 0:t.headers.reduce((i,o)=>i+o.getSize(),0))!=null?n:0},e.getRightTotalSize=()=>{var n,t;return(n=(t=e.getRightHeaderGroups()[0])==null?void 0:t.headers.reduce((i,o)=>i+o.getSize(),0))!=null?n:0}}};let Ye=null;function _a(){if(typeof Ye=="boolean")return Ye;let e=!1;try{const n={get passive(){return e=!0,!1}},t=()=>{};window.addEventListener("test",t,n),window.removeEventListener("test",t)}catch{e=!1}return Ye=e,Ye}function Ft(e){return e.type==="touchstart"}const Ea={getInitialState:e=>({columnVisibility:{},...e}),getDefaultOptions:e=>({onColumnVisibilityChange:de("columnVisibility",e)}),createColumn:(e,n)=>{e.toggleVisibility=t=>{e.getCanHide()&&n.setColumnVisibility(i=>({...i,[e.id]:t??!e.getIsVisible()}))},e.getIsVisible=()=>{var t,i;const o=e.columns;return(t=o.length?o.some(a=>a.getIsVisible()):(i=n.getState().columnVisibility)==null?void 0:i[e.id])!=null?t:!0},e.getCanHide=()=>{var t,i;return((t=e.columnDef.enableHiding)!=null?t:!0)&&((i=n.options.enableHiding)!=null?i:!0)},e.getToggleVisibilityHandler=()=>t=>{e.toggleVisibility==null||e.toggleVisibility(t.target.checked)}},createRow:(e,n)=>{e._getAllVisibleCells=O(()=>[e.getAllCells(),n.getState().columnVisibility],t=>t.filter(i=>i.column.getIsVisible()),R(n.options,"debugRows","_getAllVisibleCells")),e.getVisibleCells=O(()=>[e.getLeftVisibleCells(),e.getCenterVisibleCells(),e.getRightVisibleCells()],(t,i,o)=>[...t,...i,...o],R(n.options,"debugRows","getVisibleCells"))},createTable:e=>{const n=(t,i)=>O(()=>[i(),i().filter(o=>o.getIsVisible()).map(o=>o.id).join("_")],o=>o.filter(a=>a.getIsVisible==null?void 0:a.getIsVisible()),R(e.options,"debugColumns",t));e.getVisibleFlatColumns=n("getVisibleFlatColumns",()=>e.getAllFlatColumns()),e.getVisibleLeafColumns=n("getVisibleLeafColumns",()=>e.getAllLeafColumns()),e.getLeftVisibleLeafColumns=n("getLeftVisibleLeafColumns",()=>e.getLeftLeafColumns()),e.getRightVisibleLeafColumns=n("getRightVisibleLeafColumns",()=>e.getRightLeafColumns()),e.getCenterVisibleLeafColumns=n("getCenterVisibleLeafColumns",()=>e.getCenterLeafColumns()),e.setColumnVisibility=t=>e.options.onColumnVisibilityChange==null?void 0:e.options.onColumnVisibilityChange(t),e.resetColumnVisibility=t=>{var i;e.setColumnVisibility(t?{}:(i=e.initialState.columnVisibility)!=null?i:{})},e.toggleAllColumnsVisible=t=>{var i;t=(i=t)!=null?i:!e.getIsAllColumnsVisible(),e.setColumnVisibility(e.getAllLeafColumns().reduce((o,a)=>({...o,[a.id]:t||!(a.getCanHide!=null&&a.getCanHide())}),{}))},e.getIsAllColumnsVisible=()=>!e.getAllLeafColumns().some(t=>!(t.getIsVisible!=null&&t.getIsVisible())),e.getIsSomeColumnsVisible=()=>e.getAllLeafColumns().some(t=>t.getIsVisible==null?void 0:t.getIsVisible()),e.getToggleAllColumnsVisibilityHandler=()=>t=>{var i;e.toggleAllColumnsVisible((i=t.target)==null?void 0:i.checked)}}};function Ae(e,n){return n?n==="center"?e.getCenterVisibleLeafColumns():n==="left"?e.getLeftVisibleLeafColumns():e.getRightVisibleLeafColumns():e.getVisibleLeafColumns()}const ka={createTable:e=>{e._getGlobalFacetedRowModel=e.options.getFacetedRowModel&&e.options.getFacetedRowModel(e,"__global__"),e.getGlobalFacetedRowModel=()=>e.options.manualFiltering||!e._getGlobalFacetedRowModel?e.getPreFilteredRowModel():e._getGlobalFacetedRowModel(),e._getGlobalFacetedUniqueValues=e.options.getFacetedUniqueValues&&e.options.getFacetedUniqueValues(e,"__global__"),e.getGlobalFacetedUniqueValues=()=>e._getGlobalFacetedUniqueValues?e._getGlobalFacetedUniqueValues():new Map,e._getGlobalFacetedMinMaxValues=e.options.getFacetedMinMaxValues&&e.options.getFacetedMinMaxValues(e,"__global__"),e.getGlobalFacetedMinMaxValues=()=>{if(e._getGlobalFacetedMinMaxValues)return e._getGlobalFacetedMinMaxValues()}}},Fa={getInitialState:e=>({globalFilter:void 0,...e}),getDefaultOptions:e=>({onGlobalFilterChange:de("globalFilter",e),globalFilterFn:"auto",getColumnCanGlobalFilter:n=>{var t;const i=(t=e.getCoreRowModel().flatRows[0])==null||(t=t._getAllCellsByColumnId()[n.id])==null?void 0:t.getValue();return typeof i=="string"||typeof i=="number"}}),createColumn:(e,n)=>{e.getCanGlobalFilter=()=>{var t,i,o,a;return((t=e.columnDef.enableGlobalFilter)!=null?t:!0)&&((i=n.options.enableGlobalFilter)!=null?i:!0)&&((o=n.options.enableFilters)!=null?o:!0)&&((a=n.options.getColumnCanGlobalFilter==null?void 0:n.options.getColumnCanGlobalFilter(e))!=null?a:!0)&&!!e.accessorFn}},createTable:e=>{e.getGlobalAutoFilterFn=()=>we.includesString,e.getGlobalFilterFn=()=>{var n,t;const{globalFilterFn:i}=e.options;return Ue(i)?i:i==="auto"?e.getGlobalAutoFilterFn():(n=(t=e.options.filterFns)==null?void 0:t[i])!=null?n:we[i]},e.setGlobalFilter=n=>{e.options.onGlobalFilterChange==null||e.options.onGlobalFilterChange(n)},e.resetGlobalFilter=n=>{e.setGlobalFilter(n?void 0:e.initialState.globalFilter)}}},Pa={getInitialState:e=>({expanded:{},...e}),getDefaultOptions:e=>({onExpandedChange:de("expanded",e),paginateExpandedRows:!0}),createTable:e=>{let n=!1,t=!1;e._autoResetExpanded=()=>{var i,o;if(!n){e._queue(()=>{n=!0});return}if((i=(o=e.options.autoResetAll)!=null?o:e.options.autoResetExpanded)!=null?i:!e.options.manualExpanding){if(t)return;t=!0,e._queue(()=>{e.resetExpanded(),t=!1})}},e.setExpanded=i=>e.options.onExpandedChange==null?void 0:e.options.onExpandedChange(i),e.toggleAllRowsExpanded=i=>{i??!e.getIsAllRowsExpanded()?e.setExpanded(!0):e.setExpanded({})},e.resetExpanded=i=>{var o,a;e.setExpanded(i?{}:(o=(a=e.initialState)==null?void 0:a.expanded)!=null?o:{})},e.getCanSomeRowsExpand=()=>e.getPrePaginationRowModel().flatRows.some(i=>i.getCanExpand()),e.getToggleAllRowsExpandedHandler=()=>i=>{i.persist==null||i.persist(),e.toggleAllRowsExpanded()},e.getIsSomeRowsExpanded=()=>{const i=e.getState().expanded;return i===!0||Object.values(i).some(Boolean)},e.getIsAllRowsExpanded=()=>{const i=e.getState().expanded;return typeof i=="boolean"?i===!0:!(!Object.keys(i).length||e.getRowModel().flatRows.some(o=>!o.getIsExpanded()))},e.getExpandedDepth=()=>{let i=0;return(e.getState().expanded===!0?Object.keys(e.getRowModel().rowsById):Object.keys(e.getState().expanded)).forEach(a=>{const r=a.split(".");i=Math.max(i,r.length)}),i},e.getPreExpandedRowModel=()=>e.getSortedRowModel(),e.getExpandedRowModel=()=>(!e._getExpandedRowModel&&e.options.getExpandedRowModel&&(e._getExpandedRowModel=e.options.getExpandedRowModel(e)),e.options.manualExpanding||!e._getExpandedRowModel?e.getPreExpandedRowModel():e._getExpandedRowModel())},createRow:(e,n)=>{e.toggleExpanded=t=>{n.setExpanded(i=>{var o;const a=i===!0?!0:!!(i!=null&&i[e.id]);let r={};if(i===!0?Object.keys(n.getRowModel().rowsById).forEach(l=>{r[l]=!0}):r=i,t=(o=t)!=null?o:!a,!a&&t)return{...r,[e.id]:!0};if(a&&!t){const{[e.id]:l,...s}=r;return s}return i})},e.getIsExpanded=()=>{var t;const i=n.getState().expanded;return!!((t=n.options.getIsRowExpanded==null?void 0:n.options.getIsRowExpanded(e))!=null?t:i===!0||i!=null&&i[e.id])},e.getCanExpand=()=>{var t,i,o;return(t=n.options.getRowCanExpand==null?void 0:n.options.getRowCanExpand(e))!=null?t:((i=n.options.enableExpanding)!=null?i:!0)&&!!((o=e.subRows)!=null&&o.length)},e.getIsAllParentsExpanded=()=>{let t=!0,i=e;for(;t&&i.parentId;)i=n.getRow(i.parentId,!0),t=i.getIsExpanded();return t},e.getToggleExpandedHandler=()=>{const t=e.getCanExpand();return()=>{t&&e.toggleExpanded()}}}},Pt=0,It=10,Mt=()=>({pageIndex:Pt,pageSize:It}),Ia={getInitialState:e=>({...e,pagination:{...Mt(),...e==null?void 0:e.pagination}}),getDefaultOptions:e=>({onPaginationChange:de("pagination",e)}),createTable:e=>{let n=!1,t=!1;e._autoResetPageIndex=()=>{var i,o;if(!n){e._queue(()=>{n=!0});return}if((i=(o=e.options.autoResetAll)!=null?o:e.options.autoResetPageIndex)!=null?i:!e.options.manualPagination){if(t)return;t=!0,e._queue(()=>{e.resetPageIndex(),t=!1})}},e.setPagination=i=>{const o=a=>be(i,a);return e.options.onPaginationChange==null?void 0:e.options.onPaginationChange(o)},e.resetPagination=i=>{var o;e.setPagination(i?Mt():(o=e.initialState.pagination)!=null?o:Mt())},e.setPageIndex=i=>{e.setPagination(o=>{let a=be(i,o.pageIndex);const r=typeof e.options.pageCount>"u"||e.options.pageCount===-1?Number.MAX_SAFE_INTEGER:e.options.pageCount-1;return a=Math.max(0,Math.min(a,r)),{...o,pageIndex:a}})},e.resetPageIndex=i=>{var o,a;e.setPageIndex(i?Pt:(o=(a=e.initialState)==null||(a=a.pagination)==null?void 0:a.pageIndex)!=null?o:Pt)},e.resetPageSize=i=>{var o,a;e.setPageSize(i?It:(o=(a=e.initialState)==null||(a=a.pagination)==null?void 0:a.pageSize)!=null?o:It)},e.setPageSize=i=>{e.setPagination(o=>{const a=Math.max(1,be(i,o.pageSize)),r=o.pageSize*o.pageIndex,l=Math.floor(r/a);return{...o,pageIndex:l,pageSize:a}})},e.setPageCount=i=>e.setPagination(o=>{var a;let r=be(i,(a=e.options.pageCount)!=null?a:-1);return typeof r=="number"&&(r=Math.max(-1,r)),{...o,pageCount:r}}),e.getPageOptions=O(()=>[e.getPageCount()],i=>{let o=[];return i&&i>0&&(o=[...new Array(i)].fill(null).map((a,r)=>r)),o},R(e.options,"debugTable","getPageOptions")),e.getCanPreviousPage=()=>e.getState().pagination.pageIndex>0,e.getCanNextPage=()=>{const{pageIndex:i}=e.getState().pagination,o=e.getPageCount();return o===-1?!0:o===0?!1:i<o-1},e.previousPage=()=>e.setPageIndex(i=>i-1),e.nextPage=()=>e.setPageIndex(i=>i+1),e.firstPage=()=>e.setPageIndex(0),e.lastPage=()=>e.setPageIndex(e.getPageCount()-1),e.getPrePaginationRowModel=()=>e.getExpandedRowModel(),e.getPaginationRowModel=()=>(!e._getPaginationRowModel&&e.options.getPaginationRowModel&&(e._getPaginationRowModel=e.options.getPaginationRowModel(e)),e.options.manualPagination||!e._getPaginationRowModel?e.getPrePaginationRowModel():e._getPaginationRowModel()),e.getPageCount=()=>{var i;return(i=e.options.pageCount)!=null?i:Math.ceil(e.getRowCount()/e.getState().pagination.pageSize)},e.getRowCount=()=>{var i;return(i=e.options.rowCount)!=null?i:e.getPrePaginationRowModel().rows.length}}},Dt=()=>({top:[],bottom:[]}),Ma={getInitialState:e=>({rowPinning:Dt(),...e}),getDefaultOptions:e=>({onRowPinningChange:de("rowPinning",e)}),createRow:(e,n)=>{e.pin=(t,i,o)=>{const a=i?e.getLeafRows().map(s=>{let{id:u}=s;return u}):[],r=o?e.getParentRows().map(s=>{let{id:u}=s;return u}):[],l=new Set([...r,e.id,...a]);n.setRowPinning(s=>{var u,d;if(t==="bottom"){var f,g;return{top:((f=s==null?void 0:s.top)!=null?f:[]).filter(v=>!(l!=null&&l.has(v))),bottom:[...((g=s==null?void 0:s.bottom)!=null?g:[]).filter(v=>!(l!=null&&l.has(v))),...Array.from(l)]}}if(t==="top"){var p,m;return{top:[...((p=s==null?void 0:s.top)!=null?p:[]).filter(v=>!(l!=null&&l.has(v))),...Array.from(l)],bottom:((m=s==null?void 0:s.bottom)!=null?m:[]).filter(v=>!(l!=null&&l.has(v)))}}return{top:((u=s==null?void 0:s.top)!=null?u:[]).filter(v=>!(l!=null&&l.has(v))),bottom:((d=s==null?void 0:s.bottom)!=null?d:[]).filter(v=>!(l!=null&&l.has(v)))}})},e.getCanPin=()=>{var t;const{enableRowPinning:i,enablePinning:o}=n.options;return typeof i=="function"?i(e):(t=i??o)!=null?t:!0},e.getIsPinned=()=>{const t=[e.id],{top:i,bottom:o}=n.getState().rowPinning,a=t.some(l=>i==null?void 0:i.includes(l)),r=t.some(l=>o==null?void 0:o.includes(l));return a?"top":r?"bottom":!1},e.getPinnedIndex=()=>{var t,i;const o=e.getIsPinned();if(!o)return-1;const a=(t=o==="top"?n.getTopRows():n.getBottomRows())==null?void 0:t.map(r=>{let{id:l}=r;return l});return(i=a==null?void 0:a.indexOf(e.id))!=null?i:-1}},createTable:e=>{e.setRowPinning=n=>e.options.onRowPinningChange==null?void 0:e.options.onRowPinningChange(n),e.resetRowPinning=n=>{var t,i;return e.setRowPinning(n?Dt():(t=(i=e.initialState)==null?void 0:i.rowPinning)!=null?t:Dt())},e.getIsSomeRowsPinned=n=>{var t;const i=e.getState().rowPinning;if(!n){var o,a;return!!((o=i.top)!=null&&o.length||(a=i.bottom)!=null&&a.length)}return!!((t=i[n])!=null&&t.length)},e._getPinnedRows=(n,t,i)=>{var o;return((o=e.options.keepPinnedRows)==null||o?(t??[]).map(r=>{const l=e.getRow(r,!0);return l.getIsAllParentsExpanded()?l:null}):(t??[]).map(r=>n.find(l=>l.id===r))).filter(Boolean).map(r=>({...r,position:i}))},e.getTopRows=O(()=>[e.getRowModel().rows,e.getState().rowPinning.top],(n,t)=>e._getPinnedRows(n,t,"top"),R(e.options,"debugRows","getTopRows")),e.getBottomRows=O(()=>[e.getRowModel().rows,e.getState().rowPinning.bottom],(n,t)=>e._getPinnedRows(n,t,"bottom"),R(e.options,"debugRows","getBottomRows")),e.getCenterRows=O(()=>[e.getRowModel().rows,e.getState().rowPinning.top,e.getState().rowPinning.bottom],(n,t,i)=>{const o=new Set([...t??[],...i??[]]);return n.filter(a=>!o.has(a.id))},R(e.options,"debugRows","getCenterRows"))}},Da={getInitialState:e=>({rowSelection:{},...e}),getDefaultOptions:e=>({onRowSelectionChange:de("rowSelection",e),enableRowSelection:!0,enableMultiRowSelection:!0,enableSubRowSelection:!0}),createTable:e=>{e.setRowSelection=n=>e.options.onRowSelectionChange==null?void 0:e.options.onRowSelectionChange(n),e.resetRowSelection=n=>{var t;return e.setRowSelection(n?{}:(t=e.initialState.rowSelection)!=null?t:{})},e.toggleAllRowsSelected=n=>{e.setRowSelection(t=>{n=typeof n<"u"?n:!e.getIsAllRowsSelected();const i={...t},o=e.getPreGroupedRowModel().flatRows;return n?o.forEach(a=>{a.getCanSelect()&&(i[a.id]=!0)}):o.forEach(a=>{delete i[a.id]}),i})},e.toggleAllPageRowsSelected=n=>e.setRowSelection(t=>{const i=typeof n<"u"?n:!e.getIsAllPageRowsSelected(),o={...t};return e.getRowModel().rows.forEach(a=>{$t(o,a.id,i,!0,e)}),o}),e.getPreSelectedRowModel=()=>e.getCoreRowModel(),e.getSelectedRowModel=O(()=>[e.getState().rowSelection,e.getCoreRowModel()],(n,t)=>Object.keys(n).length?At(e,t):{rows:[],flatRows:[],rowsById:{}},R(e.options,"debugTable","getSelectedRowModel")),e.getFilteredSelectedRowModel=O(()=>[e.getState().rowSelection,e.getFilteredRowModel()],(n,t)=>Object.keys(n).length?At(e,t):{rows:[],flatRows:[],rowsById:{}},R(e.options,"debugTable","getFilteredSelectedRowModel")),e.getGroupedSelectedRowModel=O(()=>[e.getState().rowSelection,e.getSortedRowModel()],(n,t)=>Object.keys(n).length?At(e,t):{rows:[],flatRows:[],rowsById:{}},R(e.options,"debugTable","getGroupedSelectedRowModel")),e.getIsAllRowsSelected=()=>{const n=e.getFilteredRowModel().flatRows,{rowSelection:t}=e.getState();let i=!!(n.length&&Object.keys(t).length);return i&&n.some(o=>o.getCanSelect()&&!t[o.id])&&(i=!1),i},e.getIsAllPageRowsSelected=()=>{const n=e.getPaginationRowModel().flatRows.filter(o=>o.getCanSelect()),{rowSelection:t}=e.getState();let i=!!n.length;return i&&n.some(o=>!t[o.id])&&(i=!1),i},e.getIsSomeRowsSelected=()=>{var n;const t=Object.keys((n=e.getState().rowSelection)!=null?n:{}).length;return t>0&&t<e.getFilteredRowModel().flatRows.length},e.getIsSomePageRowsSelected=()=>{const n=e.getPaginationRowModel().flatRows;return e.getIsAllPageRowsSelected()?!1:n.filter(t=>t.getCanSelect()).some(t=>t.getIsSelected()||t.getIsSomeSelected())},e.getToggleAllRowsSelectedHandler=()=>n=>{e.toggleAllRowsSelected(n.target.checked)},e.getToggleAllPageRowsSelectedHandler=()=>n=>{e.toggleAllPageRowsSelected(n.target.checked)}},createRow:(e,n)=>{e.toggleSelected=(t,i)=>{const o=e.getIsSelected();n.setRowSelection(a=>{var r;if(t=typeof t<"u"?t:!o,e.getCanSelect()&&o===t)return a;const l={...a};return $t(l,e.id,t,(r=i==null?void 0:i.selectChildren)!=null?r:!0,n),l})},e.getIsSelected=()=>{const{rowSelection:t}=n.getState();return Ot(e,t)},e.getIsSomeSelected=()=>{const{rowSelection:t}=n.getState();return Rt(e,t)==="some"},e.getIsAllSubRowsSelected=()=>{const{rowSelection:t}=n.getState();return Rt(e,t)==="all"},e.getCanSelect=()=>{var t;return typeof n.options.enableRowSelection=="function"?n.options.enableRowSelection(e):(t=n.options.enableRowSelection)!=null?t:!0},e.getCanSelectSubRows=()=>{var t;return typeof n.options.enableSubRowSelection=="function"?n.options.enableSubRowSelection(e):(t=n.options.enableSubRowSelection)!=null?t:!0},e.getCanMultiSelect=()=>{var t;return typeof n.options.enableMultiRowSelection=="function"?n.options.enableMultiRowSelection(e):(t=n.options.enableMultiRowSelection)!=null?t:!0},e.getToggleSelectedHandler=()=>{const t=e.getCanSelect();return i=>{var o;t&&e.toggleSelected((o=i.target)==null?void 0:o.checked)}}}},$t=(e,n,t,i,o)=>{var a;const r=o.getRow(n,!0);t?(r.getCanMultiSelect()||Object.keys(e).forEach(l=>delete e[l]),r.getCanSelect()&&(e[n]=!0)):delete e[n],i&&(a=r.subRows)!=null&&a.length&&r.getCanSelectSubRows()&&r.subRows.forEach(l=>$t(e,l.id,t,i,o))};function At(e,n){const t=e.getState().rowSelection,i=[],o={},a=function(r,l){return r.map(s=>{var u;const d=Ot(s,t);if(d&&(i.push(s),o[s.id]=s),(u=s.subRows)!=null&&u.length&&(s={...s,subRows:a(s.subRows)}),d)return s}).filter(Boolean)};return{rows:a(n.rows),flatRows:i,rowsById:o}}function Ot(e,n){var t;return(t=n[e.id])!=null?t:!1}function Rt(e,n,t){var i;if(!((i=e.subRows)!=null&&i.length))return!1;let o=!0,a=!1;return e.subRows.forEach(r=>{if(!(a&&!o)&&(r.getCanSelect()&&(Ot(r,n)?a=!0:o=!1),r.subRows&&r.subRows.length)){const l=Rt(r,n);l==="all"?a=!0:(l==="some"&&(a=!0),o=!1)}}),o?"all":a?"some":!1}const jt=/([0-9]+)/gm,$a=(e,n,t)=>ai(Se(e.getValue(t)).toLowerCase(),Se(n.getValue(t)).toLowerCase()),Aa=(e,n,t)=>ai(Se(e.getValue(t)),Se(n.getValue(t))),Oa=(e,n,t)=>Tt(Se(e.getValue(t)).toLowerCase(),Se(n.getValue(t)).toLowerCase()),Ra=(e,n,t)=>Tt(Se(e.getValue(t)),Se(n.getValue(t))),ja=(e,n,t)=>{const i=e.getValue(t),o=n.getValue(t);return i>o?1:i<o?-1:0},Ta=(e,n,t)=>Tt(e.getValue(t),n.getValue(t));function Tt(e,n){return e===n?0:e>n?1:-1}function Se(e){return typeof e=="number"?isNaN(e)||e===1/0||e===-1/0?"":String(e):typeof e=="string"?e:""}function ai(e,n){const t=e.split(jt).filter(Boolean),i=n.split(jt).filter(Boolean);for(;t.length&&i.length;){const o=t.shift(),a=i.shift(),r=parseInt(o,10),l=parseInt(a,10),s=[r,l].sort();if(isNaN(s[0])){if(o>a)return 1;if(a>o)return-1;continue}if(isNaN(s[1]))return isNaN(r)?-1:1;if(r>l)return 1;if(l>r)return-1}return t.length-i.length}const Oe={alphanumeric:$a,alphanumericCaseSensitive:Aa,text:Oa,textCaseSensitive:Ra,datetime:ja,basic:Ta},za=[va,Ea,ba,Sa,xa,ha,ka,Fa,{getInitialState:e=>({sorting:[],...e}),getDefaultColumnDef:()=>({sortingFn:"auto",sortUndefined:1}),getDefaultOptions:e=>({onSortingChange:de("sorting",e),isMultiSortEvent:n=>n.shiftKey}),createColumn:(e,n)=>{e.getAutoSortingFn=()=>{const t=n.getFilteredRowModel().flatRows.slice(10);let i=!1;for(const o of t){const a=o==null?void 0:o.getValue(e.id);if(Object.prototype.toString.call(a)==="[object Date]")return Oe.datetime;if(typeof a=="string"&&(i=!0,a.split(jt).length>1))return Oe.alphanumeric}return i?Oe.text:Oe.basic},e.getAutoSortDir=()=>{const t=n.getFilteredRowModel().flatRows[0];return typeof(t==null?void 0:t.getValue(e.id))=="string"?"asc":"desc"},e.getSortingFn=()=>{var t,i;if(!e)throw new Error;return Ue(e.columnDef.sortingFn)?e.columnDef.sortingFn:e.columnDef.sortingFn==="auto"?e.getAutoSortingFn():(t=(i=n.options.sortingFns)==null?void 0:i[e.columnDef.sortingFn])!=null?t:Oe[e.columnDef.sortingFn]},e.toggleSorting=(t,i)=>{const o=e.getNextSortingOrder(),a=typeof t<"u"&&t!==null;n.setSorting(r=>{const l=r==null?void 0:r.find(p=>p.id===e.id),s=r==null?void 0:r.findIndex(p=>p.id===e.id);let u=[],d,f=a?t:o==="desc";if(r!=null&&r.length&&e.getCanMultiSort()&&i?l?d="toggle":d="add":r!=null&&r.length&&s!==r.length-1?d="replace":l?d="toggle":d="replace",d==="toggle"&&(a||o||(d="remove")),d==="add"){var g;u=[...r,{id:e.id,desc:f}],u.splice(0,u.length-((g=n.options.maxMultiSortColCount)!=null?g:Number.MAX_SAFE_INTEGER))}else d==="toggle"?u=r.map(p=>p.id===e.id?{...p,desc:f}:p):d==="remove"?u=r.filter(p=>p.id!==e.id):u=[{id:e.id,desc:f}];return u})},e.getFirstSortDir=()=>{var t,i;return((t=(i=e.columnDef.sortDescFirst)!=null?i:n.options.sortDescFirst)!=null?t:e.getAutoSortDir()==="desc")?"desc":"asc"},e.getNextSortingOrder=t=>{var i,o;const a=e.getFirstSortDir(),r=e.getIsSorted();return r?r!==a&&((i=n.options.enableSortingRemoval)==null||i)&&(!(t&&(o=n.options.enableMultiRemove)!=null)||o)?!1:r==="desc"?"asc":"desc":a},e.getCanSort=()=>{var t,i;return((t=e.columnDef.enableSorting)!=null?t:!0)&&((i=n.options.enableSorting)!=null?i:!0)&&!!e.accessorFn},e.getCanMultiSort=()=>{var t,i;return(t=(i=e.columnDef.enableMultiSort)!=null?i:n.options.enableMultiSort)!=null?t:!!e.accessorFn},e.getIsSorted=()=>{var t;const i=(t=n.getState().sorting)==null?void 0:t.find(o=>o.id===e.id);return i?i.desc?"desc":"asc":!1},e.getSortIndex=()=>{var t,i;return(t=(i=n.getState().sorting)==null?void 0:i.findIndex(o=>o.id===e.id))!=null?t:-1},e.clearSorting=()=>{n.setSorting(t=>t!=null&&t.length?t.filter(i=>i.id!==e.id):[])},e.getToggleSortingHandler=()=>{const t=e.getCanSort();return i=>{t&&(i.persist==null||i.persist(),e.toggleSorting==null||e.toggleSorting(void 0,e.getCanMultiSort()?n.options.isMultiSortEvent==null?void 0:n.options.isMultiSortEvent(i):!1))}}},createTable:e=>{e.setSorting=n=>e.options.onSortingChange==null?void 0:e.options.onSortingChange(n),e.resetSorting=n=>{var t,i;e.setSorting(n?[]:(t=(i=e.initialState)==null?void 0:i.sorting)!=null?t:[])},e.getPreSortedRowModel=()=>e.getGroupedRowModel(),e.getSortedRowModel=()=>(!e._getSortedRowModel&&e.options.getSortedRowModel&&(e._getSortedRowModel=e.options.getSortedRowModel(e)),e.options.manualSorting||!e._getSortedRowModel?e.getPreSortedRowModel():e._getSortedRowModel())}},wa,Pa,Ia,Ma,Da,Ca];function Va(e){var n,t;process.env.NODE_ENV!=="production"&&(e.debugAll||e.debugTable)&&console.info("Creating Table Instance...");const i=[...za,...(n=e._features)!=null?n:[]];let o={_features:i};const a=o._features.reduce((g,p)=>Object.assign(g,p.getDefaultOptions==null?void 0:p.getDefaultOptions(o)),{}),r=g=>o.options.mergeOptions?o.options.mergeOptions(a,g):{...a,...g};let s={...{},...(t=e.initialState)!=null?t:{}};o._features.forEach(g=>{var p;s=(p=g.getInitialState==null?void 0:g.getInitialState(s))!=null?p:s});const u=[];let d=!1;const f={_features:i,options:{...a,...e},initialState:s,_queue:g=>{u.push(g),d||(d=!0,Promise.resolve().then(()=>{for(;u.length;)u.shift()();d=!1}).catch(p=>setTimeout(()=>{throw p})))},reset:()=>{o.setState(o.initialState)},setOptions:g=>{const p=be(g,o.options);o.options=r(p)},getState:()=>o.options.state,setState:g=>{o.options.onStateChange==null||o.options.onStateChange(g)},_getRowId:(g,p,m)=>{var v;return(v=o.options.getRowId==null?void 0:o.options.getRowId(g,p,m))!=null?v:`${m?[m.id,p].join("."):p}`},getCoreRowModel:()=>(o._getCoreRowModel||(o._getCoreRowModel=o.options.getCoreRowModel(o)),o._getCoreRowModel()),getRowModel:()=>o.getPaginationRowModel(),getRow:(g,p)=>{let m=(p?o.getPrePaginationRowModel():o.getRowModel()).rowsById[g];if(!m&&(m=o.getCoreRowModel().rowsById[g],!m))throw process.env.NODE_ENV!=="production"?new Error(`getRow could not find row with ID: ${g}`):new Error;return m},_getDefaultColumnDef:O(()=>[o.options.defaultColumn],g=>{var p;return g=(p=g)!=null?p:{},{header:m=>{const v=m.header.column.columnDef;return v.accessorKey?v.accessorKey:v.accessorFn?v.id:null},cell:m=>{var v,I;return(v=(I=m.renderValue())==null||I.toString==null?void 0:I.toString())!=null?v:null},...o._features.reduce((m,v)=>Object.assign(m,v.getDefaultColumnDef==null?void 0:v.getDefaultColumnDef()),{}),...g}},R(e,"debugColumns","_getDefaultColumnDef")),_getColumnDefs:()=>o.options.columns,getAllColumns:O(()=>[o._getColumnDefs()],g=>{const p=function(m,v,I){return I===void 0&&(I=0),m.map(w=>{const j=ma(o,w,I,v),M=w;return j.columns=M.columns?p(M.columns,j,I+1):[],j})};return p(g)},R(e,"debugColumns","getAllColumns")),getAllFlatColumns:O(()=>[o.getAllColumns()],g=>g.flatMap(p=>p.getFlatColumns()),R(e,"debugColumns","getAllFlatColumns")),_getAllFlatColumnsById:O(()=>[o.getAllFlatColumns()],g=>g.reduce((p,m)=>(p[m.id]=m,p),{}),R(e,"debugColumns","getAllFlatColumnsById")),getAllLeafColumns:O(()=>[o.getAllColumns(),o._getOrderColumnsFn()],(g,p)=>{let m=g.flatMap(v=>v.getLeafColumns());return p(m)},R(e,"debugColumns","getAllLeafColumns")),getColumn:g=>{const p=o._getAllFlatColumnsById()[g];return process.env.NODE_ENV!=="production"&&!p&&console.error(`[Table] Column with id '${g}' does not exist.`),p}};Object.assign(o,f);for(let g=0;g<o._features.length;g++){const p=o._features[g];p==null||p.createTable==null||p.createTable(o)}return o}function Na(){return e=>O(()=>[e.options.data],n=>{const t={rows:[],flatRows:[],rowsById:{}},i=function(o,a,r){a===void 0&&(a=0);const l=[];for(let u=0;u<o.length;u++){const d=Yn(e,e._getRowId(o[u],u,r),o[u],u,a,void 0,r==null?void 0:r.id);if(t.flatRows.push(d),t.rowsById[d.id]=d,l.push(d),e.options.getSubRows){var s;d.originalSubRows=e.options.getSubRows(o[u],u),(s=d.originalSubRows)!=null&&s.length&&(d.subRows=i(d.originalSubRows,a+1,d))}}return l};return t.rows=i(n),t},R(e.options,"debugTable","getRowModel",()=>e._autoResetPageIndex()))}function La(){return e=>O(()=>[e.getState().expanded,e.getPreExpandedRowModel(),e.options.paginateExpandedRows],(n,t,i)=>!t.rows.length||n!==!0&&!Object.keys(n??{}).length||!i?t:Ha(t),R(e.options,"debugTable","getExpandedRowModel"))}function Ha(e){const n=[],t=i=>{var o;n.push(i),(o=i.subRows)!=null&&o.length&&i.getIsExpanded()&&i.subRows.forEach(t)};return e.rows.forEach(t),{rows:n,flatRows:e.flatRows,rowsById:e.rowsById}}function qa(){return e=>O(()=>[e.getState().grouping,e.getPreGroupedRowModel()],(n,t)=>{if(!t.rows.length||!n.length)return t.rows.forEach(s=>{s.depth=0,s.parentId=void 0}),t;const i=n.filter(s=>e.getColumn(s)),o=[],a={},r=function(s,u,d){if(u===void 0&&(u=0),u>=i.length)return s.map(m=>(m.depth=u,o.push(m),a[m.id]=m,m.subRows&&(m.subRows=r(m.subRows,u+1,m.id)),m));const f=i[u],g=Ga(s,f);return Array.from(g.entries()).map((m,v)=>{let[I,w]=m,j=`${f}:${I}`;j=d?`${d}>${j}`:j;const M=r(w,u+1,j);M.forEach(L=>{L.parentId=j});const T=u?Kn(w,L=>L.subRows):w,x=Yn(e,j,T[0].original,v,u,void 0,d);return Object.assign(x,{groupingColumnId:f,groupingValue:I,subRows:M,leafRows:T,getValue:L=>{if(i.includes(L)){if(x._valuesCache.hasOwnProperty(L))return x._valuesCache[L];if(w[0]){var V;x._valuesCache[L]=(V=w[0].getValue(L))!=null?V:void 0}return x._valuesCache[L]}if(x._groupingValuesCache.hasOwnProperty(L))return x._groupingValuesCache[L];const J=e.getColumn(L),Z=J==null?void 0:J.getAggregationFn();if(Z)return x._groupingValuesCache[L]=Z(L,T,w),x._groupingValuesCache[L]}}),M.forEach(L=>{o.push(L),a[L.id]=L}),x})},l=r(t.rows,0);return l.forEach(s=>{o.push(s),a[s.id]=s}),{rows:l,flatRows:o,rowsById:a}},R(e.options,"debugTable","getGroupedRowModel",()=>{e._queue(()=>{e._autoResetExpanded(),e._autoResetPageIndex()})}))}function Ga(e,n){const t=new Map;return e.reduce((i,o)=>{const a=`${o.getGroupingValue(n)}`,r=i.get(a);return r?r.push(o):i.set(a,[o]),i},t)}/**
|
|
46
|
+
color: hsl(${Math.max(0,Math.min(120-120*g,120))}deg 100% 31%);`,t==null?void 0:t.key)}return o}}function j(e,n,t,i){return{debug:()=>{var o;return(o=e==null?void 0:e.debugAll)!=null?o:e[n]},key:process.env.NODE_ENV==="development"&&t,onChange:i}}function ga(e,n,t,i){const o=()=>{var r;return(r=a.getValue())!=null?r:e.options.renderFallbackValue},a={id:`${n.id}_${t.id}`,row:n,column:t,getValue:()=>n.getValue(i),renderValue:o,getContext:R(()=>[e,t,n,a],(r,l,s,p)=>({table:r,column:l,row:s,cell:p,getValue:p.getValue,renderValue:p.renderValue}),j(e.options,"debugCells","cell.getContext"))};return e._features.forEach(r=>{r.createCell==null||r.createCell(a,t,n,e)},{}),a}function fa(e,n,t,i){var o,a;const l={...e._getDefaultColumnDef(),...n},s=l.accessorKey;let p=(o=(a=l.id)!=null?a:s?typeof String.prototype.replaceAll=="function"?s.replaceAll(".","_"):s.replace(/\./g,"_"):void 0)!=null?o:typeof l.header=="string"?l.header:void 0,d;if(l.accessorFn?d=l.accessorFn:s&&(s.includes(".")?d=g=>{let u=g;for(const v of s.split(".")){var m;u=(m=u)==null?void 0:m[v],process.env.NODE_ENV!=="production"&&u===void 0&&console.warn(`"${v}" in deeply nested key "${s}" returned undefined.`)}return u}:d=g=>g[l.accessorKey]),!p)throw process.env.NODE_ENV!=="production"?new Error(l.accessorFn?"Columns require an id when using an accessorFn":"Columns require an id when using a non-string header"):new Error;let f={id:`${String(p)}`,accessorFn:d,parent:i,depth:t,columnDef:l,columns:[],getFlatColumns:R(()=>[!0],()=>{var g;return[f,...(g=f.columns)==null?void 0:g.flatMap(u=>u.getFlatColumns())]},j(e.options,"debugColumns","column.getFlatColumns")),getLeafColumns:R(()=>[e._getOrderColumnsFn()],g=>{var u;if((u=f.columns)!=null&&u.length){let m=f.columns.flatMap(v=>v.getLeafColumns());return g(m)}return[f]},j(e.options,"debugColumns","column.getLeafColumns"))};for(const g of e._features)g.createColumn==null||g.createColumn(f,e);return f}const le="debugHeaders";function Kn(e,n,t){var i;let a={id:(i=t.id)!=null?i:n.id,column:n,index:t.index,isPlaceholder:!!t.isPlaceholder,placeholderId:t.placeholderId,depth:t.depth,subHeaders:[],colSpan:0,rowSpan:0,headerGroup:null,getLeafHeaders:()=>{const r=[],l=s=>{s.subHeaders&&s.subHeaders.length&&s.subHeaders.map(l),r.push(s)};return l(a),r},getContext:()=>({table:e,header:a,column:n})};return e._features.forEach(r=>{r.createHeader==null||r.createHeader(a,e)}),a}const ma={createTable:e=>{e.getHeaderGroups=R(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(n,t,i,o)=>{var a,r;const l=(a=i==null?void 0:i.map(f=>t.find(g=>g.id===f)).filter(Boolean))!=null?a:[],s=(r=o==null?void 0:o.map(f=>t.find(g=>g.id===f)).filter(Boolean))!=null?r:[],p=t.filter(f=>!(i!=null&&i.includes(f.id))&&!(o!=null&&o.includes(f.id)));return Ke(n,[...l,...p,...s],e)},j(e.options,le,"getHeaderGroups")),e.getCenterHeaderGroups=R(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(n,t,i,o)=>(t=t.filter(a=>!(i!=null&&i.includes(a.id))&&!(o!=null&&o.includes(a.id))),Ke(n,t,e,"center")),j(e.options,le,"getCenterHeaderGroups")),e.getLeftHeaderGroups=R(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left],(n,t,i)=>{var o;const a=(o=i==null?void 0:i.map(r=>t.find(l=>l.id===r)).filter(Boolean))!=null?o:[];return Ke(n,a,e,"left")},j(e.options,le,"getLeftHeaderGroups")),e.getRightHeaderGroups=R(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.right],(n,t,i)=>{var o;const a=(o=i==null?void 0:i.map(r=>t.find(l=>l.id===r)).filter(Boolean))!=null?o:[];return Ke(n,a,e,"right")},j(e.options,le,"getRightHeaderGroups")),e.getFooterGroups=R(()=>[e.getHeaderGroups()],n=>[...n].reverse(),j(e.options,le,"getFooterGroups")),e.getLeftFooterGroups=R(()=>[e.getLeftHeaderGroups()],n=>[...n].reverse(),j(e.options,le,"getLeftFooterGroups")),e.getCenterFooterGroups=R(()=>[e.getCenterHeaderGroups()],n=>[...n].reverse(),j(e.options,le,"getCenterFooterGroups")),e.getRightFooterGroups=R(()=>[e.getRightHeaderGroups()],n=>[...n].reverse(),j(e.options,le,"getRightFooterGroups")),e.getFlatHeaders=R(()=>[e.getHeaderGroups()],n=>n.map(t=>t.headers).flat(),j(e.options,le,"getFlatHeaders")),e.getLeftFlatHeaders=R(()=>[e.getLeftHeaderGroups()],n=>n.map(t=>t.headers).flat(),j(e.options,le,"getLeftFlatHeaders")),e.getCenterFlatHeaders=R(()=>[e.getCenterHeaderGroups()],n=>n.map(t=>t.headers).flat(),j(e.options,le,"getCenterFlatHeaders")),e.getRightFlatHeaders=R(()=>[e.getRightHeaderGroups()],n=>n.map(t=>t.headers).flat(),j(e.options,le,"getRightFlatHeaders")),e.getCenterLeafHeaders=R(()=>[e.getCenterFlatHeaders()],n=>n.filter(t=>{var i;return!((i=t.subHeaders)!=null&&i.length)}),j(e.options,le,"getCenterLeafHeaders")),e.getLeftLeafHeaders=R(()=>[e.getLeftFlatHeaders()],n=>n.filter(t=>{var i;return!((i=t.subHeaders)!=null&&i.length)}),j(e.options,le,"getLeftLeafHeaders")),e.getRightLeafHeaders=R(()=>[e.getRightFlatHeaders()],n=>n.filter(t=>{var i;return!((i=t.subHeaders)!=null&&i.length)}),j(e.options,le,"getRightLeafHeaders")),e.getLeafHeaders=R(()=>[e.getLeftHeaderGroups(),e.getCenterHeaderGroups(),e.getRightHeaderGroups()],(n,t,i)=>{var o,a,r,l,s,p;return[...(o=(a=n[0])==null?void 0:a.headers)!=null?o:[],...(r=(l=t[0])==null?void 0:l.headers)!=null?r:[],...(s=(p=i[0])==null?void 0:p.headers)!=null?s:[]].map(d=>d.getLeafHeaders()).flat()},j(e.options,le,"getLeafHeaders"))}};function Ke(e,n,t,i){var o,a;let r=0;const l=function(g,u){u===void 0&&(u=1),r=Math.max(r,u),g.filter(m=>m.getIsVisible()).forEach(m=>{var v;(v=m.columns)!=null&&v.length&&l(m.columns,u+1)},0)};l(e);let s=[];const p=(g,u)=>{const m={depth:u,id:[i,`${u}`].filter(Boolean).join("_"),headers:[]},v=[];g.forEach(P=>{const h=[...v].reverse()[0],O=P.column.depth===m.depth;let S,T=!1;if(O&&P.column.parent?S=P.column.parent:(S=P.column,T=!0),h&&(h==null?void 0:h.column)===S)h.subHeaders.push(P);else{const x=Kn(t,S,{id:[i,u,S.id,P==null?void 0:P.id].filter(Boolean).join("_"),isPlaceholder:T,placeholderId:T?`${v.filter(L=>L.column===S).length}`:void 0,depth:u,index:v.length});x.subHeaders.push(P),v.push(x)}m.headers.push(P),P.headerGroup=m}),s.push(m),u>0&&p(v,u-1)},d=n.map((g,u)=>Kn(t,g,{depth:r,index:u}));p(d,r-1),s.reverse();const f=g=>g.filter(m=>m.column.getIsVisible()).map(m=>{let v=0,P=0,h=[0];m.subHeaders&&m.subHeaders.length?(h=[],f(m.subHeaders).forEach(S=>{let{colSpan:T,rowSpan:x}=S;v+=T,h.push(x)})):v=1;const O=Math.min(...h);return P=P+O,m.colSpan=v,m.rowSpan=P,{colSpan:v,rowSpan:P}});return f((o=(a=s[0])==null?void 0:a.headers)!=null?o:[]),s}const Wn=(e,n,t,i,o,a,r)=>{let l={id:n,index:i,original:t,depth:o,parentId:r,_valuesCache:{},_uniqueValuesCache:{},getValue:s=>{if(l._valuesCache.hasOwnProperty(s))return l._valuesCache[s];const p=e.getColumn(s);if(p!=null&&p.accessorFn)return l._valuesCache[s]=p.accessorFn(l.original,i),l._valuesCache[s]},getUniqueValues:s=>{if(l._uniqueValuesCache.hasOwnProperty(s))return l._uniqueValuesCache[s];const p=e.getColumn(s);if(p!=null&&p.accessorFn)return p.columnDef.getUniqueValues?(l._uniqueValuesCache[s]=p.columnDef.getUniqueValues(l.original,i),l._uniqueValuesCache[s]):(l._uniqueValuesCache[s]=[l.getValue(s)],l._uniqueValuesCache[s])},renderValue:s=>{var p;return(p=l.getValue(s))!=null?p:e.options.renderFallbackValue},subRows:a??[],getLeafRows:()=>Un(l.subRows,s=>s.subRows),getParentRow:()=>l.parentId?e.getRow(l.parentId,!0):void 0,getParentRows:()=>{let s=[],p=l;for(;;){const d=p.getParentRow();if(!d)break;s.push(d),p=d}return s.reverse()},getAllCells:R(()=>[e.getAllLeafColumns()],s=>s.map(p=>ga(e,l,p,p.id)),j(e.options,"debugRows","getAllCells")),_getAllCellsByColumnId:R(()=>[l.getAllCells()],s=>s.reduce((p,d)=>(p[d.column.id]=d,p),{}),j(e.options,"debugRows","getAllCellsByColumnId"))};for(let s=0;s<e._features.length;s++){const p=e._features[s];p==null||p.createRow==null||p.createRow(l,e)}return l},va={createColumn:(e,n)=>{e._getFacetedRowModel=n.options.getFacetedRowModel&&n.options.getFacetedRowModel(n,e.id),e.getFacetedRowModel=()=>e._getFacetedRowModel?e._getFacetedRowModel():n.getPreFilteredRowModel(),e._getFacetedUniqueValues=n.options.getFacetedUniqueValues&&n.options.getFacetedUniqueValues(n,e.id),e.getFacetedUniqueValues=()=>e._getFacetedUniqueValues?e._getFacetedUniqueValues():new Map,e._getFacetedMinMaxValues=n.options.getFacetedMinMaxValues&&n.options.getFacetedMinMaxValues(n,e.id),e.getFacetedMinMaxValues=()=>{if(e._getFacetedMinMaxValues)return e._getFacetedMinMaxValues()}}},Yn=(e,n,t)=>{var i,o;const a=t==null||(i=t.toString())==null?void 0:i.toLowerCase();return!!(!((o=e.getValue(n))==null||(o=o.toString())==null||(o=o.toLowerCase())==null)&&o.includes(a))};Yn.autoRemove=e=>me(e);const Xn=(e,n,t)=>{var i;return!!(!((i=e.getValue(n))==null||(i=i.toString())==null)&&i.includes(t))};Xn.autoRemove=e=>me(e);const Qn=(e,n,t)=>{var i;return((i=e.getValue(n))==null||(i=i.toString())==null?void 0:i.toLowerCase())===(t==null?void 0:t.toLowerCase())};Qn.autoRemove=e=>me(e);const Jn=(e,n,t)=>{var i;return(i=e.getValue(n))==null?void 0:i.includes(t)};Jn.autoRemove=e=>me(e);const Zn=(e,n,t)=>!t.some(i=>{var o;return!((o=e.getValue(n))!=null&&o.includes(i))});Zn.autoRemove=e=>me(e)||!(e!=null&&e.length);const ei=(e,n,t)=>t.some(i=>{var o;return(o=e.getValue(n))==null?void 0:o.includes(i)});ei.autoRemove=e=>me(e)||!(e!=null&&e.length);const ti=(e,n,t)=>e.getValue(n)===t;ti.autoRemove=e=>me(e);const ni=(e,n,t)=>e.getValue(n)==t;ni.autoRemove=e=>me(e);const Ct=(e,n,t)=>{let[i,o]=t;const a=e.getValue(n);return a>=i&&a<=o};Ct.resolveFilterValue=e=>{let[n,t]=e,i=typeof n!="number"?parseFloat(n):n,o=typeof t!="number"?parseFloat(t):t,a=n===null||Number.isNaN(i)?-1/0:i,r=t===null||Number.isNaN(o)?1/0:o;if(a>r){const l=a;a=r,r=l}return[a,r]},Ct.autoRemove=e=>me(e)||me(e[0])&&me(e[1]);const we={includesString:Yn,includesStringSensitive:Xn,equalsString:Qn,arrIncludes:Jn,arrIncludesAll:Zn,arrIncludesSome:ei,equals:ti,weakEquals:ni,inNumberRange:Ct};function me(e){return e==null||e===""}const xa={getDefaultColumnDef:()=>({filterFn:"auto"}),getInitialState:e=>({columnFilters:[],...e}),getDefaultOptions:e=>({onColumnFiltersChange:de("columnFilters",e),filterFromLeafRows:!1,maxLeafRowFilterDepth:100}),createColumn:(e,n)=>{e.getAutoFilterFn=()=>{const t=n.getCoreRowModel().flatRows[0],i=t==null?void 0:t.getValue(e.id);return typeof i=="string"?we.includesString:typeof i=="number"?we.inNumberRange:typeof i=="boolean"||i!==null&&typeof i=="object"?we.equals:Array.isArray(i)?we.arrIncludes:we.weakEquals},e.getFilterFn=()=>{var t,i;return Ue(e.columnDef.filterFn)?e.columnDef.filterFn:e.columnDef.filterFn==="auto"?e.getAutoFilterFn():(t=(i=n.options.filterFns)==null?void 0:i[e.columnDef.filterFn])!=null?t:we[e.columnDef.filterFn]},e.getCanFilter=()=>{var t,i,o;return((t=e.columnDef.enableColumnFilter)!=null?t:!0)&&((i=n.options.enableColumnFilters)!=null?i:!0)&&((o=n.options.enableFilters)!=null?o:!0)&&!!e.accessorFn},e.getIsFiltered=()=>e.getFilterIndex()>-1,e.getFilterValue=()=>{var t;return(t=n.getState().columnFilters)==null||(t=t.find(i=>i.id===e.id))==null?void 0:t.value},e.getFilterIndex=()=>{var t,i;return(t=(i=n.getState().columnFilters)==null?void 0:i.findIndex(o=>o.id===e.id))!=null?t:-1},e.setFilterValue=t=>{n.setColumnFilters(i=>{const o=e.getFilterFn(),a=i==null?void 0:i.find(d=>d.id===e.id),r=be(t,a?a.value:void 0);if(ii(o,r,e)){var l;return(l=i==null?void 0:i.filter(d=>d.id!==e.id))!=null?l:[]}const s={id:e.id,value:r};if(a){var p;return(p=i==null?void 0:i.map(d=>d.id===e.id?s:d))!=null?p:[]}return i!=null&&i.length?[...i,s]:[s]})}},createRow:(e,n)=>{e.columnFilters={},e.columnFiltersMeta={}},createTable:e=>{e.setColumnFilters=n=>{const t=e.getAllLeafColumns(),i=o=>{var a;return(a=be(n,o))==null?void 0:a.filter(r=>{const l=t.find(s=>s.id===r.id);if(l){const s=l.getFilterFn();if(ii(s,r.value,l))return!1}return!0})};e.options.onColumnFiltersChange==null||e.options.onColumnFiltersChange(i)},e.resetColumnFilters=n=>{var t,i;e.setColumnFilters(n?[]:(t=(i=e.initialState)==null?void 0:i.columnFilters)!=null?t:[])},e.getPreFilteredRowModel=()=>e.getCoreRowModel(),e.getFilteredRowModel=()=>(!e._getFilteredRowModel&&e.options.getFilteredRowModel&&(e._getFilteredRowModel=e.options.getFilteredRowModel(e)),e.options.manualFiltering||!e._getFilteredRowModel?e.getPreFilteredRowModel():e._getFilteredRowModel())}};function ii(e,n,t){return(e&&e.autoRemove?e.autoRemove(n,t):!1)||typeof n>"u"||typeof n=="string"&&!n}const _t={sum:(e,n,t)=>t.reduce((i,o)=>{const a=o.getValue(e);return i+(typeof a=="number"?a:0)},0),min:(e,n,t)=>{let i;return t.forEach(o=>{const a=o.getValue(e);a!=null&&(i>a||i===void 0&&a>=a)&&(i=a)}),i},max:(e,n,t)=>{let i;return t.forEach(o=>{const a=o.getValue(e);a!=null&&(i<a||i===void 0&&a>=a)&&(i=a)}),i},extent:(e,n,t)=>{let i,o;return t.forEach(a=>{const r=a.getValue(e);r!=null&&(i===void 0?r>=r&&(i=o=r):(i>r&&(i=r),o<r&&(o=r)))}),[i,o]},mean:(e,n)=>{let t=0,i=0;if(n.forEach(o=>{let a=o.getValue(e);a!=null&&(a=+a)>=a&&(++t,i+=a)}),t)return i/t},median:(e,n)=>{if(!n.length)return;const t=n.map(a=>a.getValue(e));if(!da(t))return;if(t.length===1)return t[0];const i=Math.floor(t.length/2),o=t.sort((a,r)=>a-r);return t.length%2!==0?o[i]:(o[i-1]+o[i])/2},unique:(e,n)=>Array.from(new Set(n.map(t=>t.getValue(e))).values()),uniqueCount:(e,n)=>new Set(n.map(t=>t.getValue(e))).size,count:(e,n)=>n.length},ha={getDefaultColumnDef:()=>({aggregatedCell:e=>{var n,t;return(n=(t=e.getValue())==null||t.toString==null?void 0:t.toString())!=null?n:null},aggregationFn:"auto"}),getInitialState:e=>({grouping:[],...e}),getDefaultOptions:e=>({onGroupingChange:de("grouping",e),groupedColumnMode:"reorder"}),createColumn:(e,n)=>{e.toggleGrouping=()=>{n.setGrouping(t=>t!=null&&t.includes(e.id)?t.filter(i=>i!==e.id):[...t??[],e.id])},e.getCanGroup=()=>{var t,i;return((t=e.columnDef.enableGrouping)!=null?t:!0)&&((i=n.options.enableGrouping)!=null?i:!0)&&(!!e.accessorFn||!!e.columnDef.getGroupingValue)},e.getIsGrouped=()=>{var t;return(t=n.getState().grouping)==null?void 0:t.includes(e.id)},e.getGroupedIndex=()=>{var t;return(t=n.getState().grouping)==null?void 0:t.indexOf(e.id)},e.getToggleGroupingHandler=()=>{const t=e.getCanGroup();return()=>{t&&e.toggleGrouping()}},e.getAutoAggregationFn=()=>{const t=n.getCoreRowModel().flatRows[0],i=t==null?void 0:t.getValue(e.id);if(typeof i=="number")return _t.sum;if(Object.prototype.toString.call(i)==="[object Date]")return _t.extent},e.getAggregationFn=()=>{var t,i;if(!e)throw new Error;return Ue(e.columnDef.aggregationFn)?e.columnDef.aggregationFn:e.columnDef.aggregationFn==="auto"?e.getAutoAggregationFn():(t=(i=n.options.aggregationFns)==null?void 0:i[e.columnDef.aggregationFn])!=null?t:_t[e.columnDef.aggregationFn]}},createTable:e=>{e.setGrouping=n=>e.options.onGroupingChange==null?void 0:e.options.onGroupingChange(n),e.resetGrouping=n=>{var t,i;e.setGrouping(n?[]:(t=(i=e.initialState)==null?void 0:i.grouping)!=null?t:[])},e.getPreGroupedRowModel=()=>e.getFilteredRowModel(),e.getGroupedRowModel=()=>(!e._getGroupedRowModel&&e.options.getGroupedRowModel&&(e._getGroupedRowModel=e.options.getGroupedRowModel(e)),e.options.manualGrouping||!e._getGroupedRowModel?e.getPreGroupedRowModel():e._getGroupedRowModel())},createRow:(e,n)=>{e.getIsGrouped=()=>!!e.groupingColumnId,e.getGroupingValue=t=>{if(e._groupingValuesCache.hasOwnProperty(t))return e._groupingValuesCache[t];const i=n.getColumn(t);return i!=null&&i.columnDef.getGroupingValue?(e._groupingValuesCache[t]=i.columnDef.getGroupingValue(e.original),e._groupingValuesCache[t]):e.getValue(t)},e._groupingValuesCache={}},createCell:(e,n,t,i)=>{e.getIsGrouped=()=>n.getIsGrouped()&&n.id===t.groupingColumnId,e.getIsPlaceholder=()=>!e.getIsGrouped()&&n.getIsGrouped(),e.getIsAggregated=()=>{var o;return!e.getIsGrouped()&&!e.getIsPlaceholder()&&!!((o=t.subRows)!=null&&o.length)}}};function wa(e,n,t){if(!(n!=null&&n.length)||!t)return e;const i=e.filter(a=>!n.includes(a.id));return t==="remove"?i:[...n.map(a=>e.find(r=>r.id===a)).filter(Boolean),...i]}const ya={getInitialState:e=>({columnOrder:[],...e}),getDefaultOptions:e=>({onColumnOrderChange:de("columnOrder",e)}),createColumn:(e,n)=>{e.getIndex=R(t=>[Ae(n,t)],t=>t.findIndex(i=>i.id===e.id),j(n.options,"debugColumns","getIndex")),e.getIsFirstColumn=t=>{var i;return((i=Ae(n,t)[0])==null?void 0:i.id)===e.id},e.getIsLastColumn=t=>{var i;const o=Ae(n,t);return((i=o[o.length-1])==null?void 0:i.id)===e.id}},createTable:e=>{e.setColumnOrder=n=>e.options.onColumnOrderChange==null?void 0:e.options.onColumnOrderChange(n),e.resetColumnOrder=n=>{var t;e.setColumnOrder(n?[]:(t=e.initialState.columnOrder)!=null?t:[])},e._getOrderColumnsFn=R(()=>[e.getState().columnOrder,e.getState().grouping,e.options.groupedColumnMode],(n,t,i)=>o=>{let a=[];if(!(n!=null&&n.length))a=o;else{const r=[...n],l=[...o];for(;l.length&&r.length;){const s=r.shift(),p=l.findIndex(d=>d.id===s);p>-1&&a.push(l.splice(p,1)[0])}a=[...a,...l]}return wa(a,t,i)},j(e.options,"debugTable","_getOrderColumnsFn"))}},Et=()=>({left:[],right:[]}),ba={getInitialState:e=>({columnPinning:Et(),...e}),getDefaultOptions:e=>({onColumnPinningChange:de("columnPinning",e)}),createColumn:(e,n)=>{e.pin=t=>{const i=e.getLeafColumns().map(o=>o.id).filter(Boolean);n.setColumnPinning(o=>{var a,r;if(t==="right"){var l,s;return{left:((l=o==null?void 0:o.left)!=null?l:[]).filter(f=>!(i!=null&&i.includes(f))),right:[...((s=o==null?void 0:o.right)!=null?s:[]).filter(f=>!(i!=null&&i.includes(f))),...i]}}if(t==="left"){var p,d;return{left:[...((p=o==null?void 0:o.left)!=null?p:[]).filter(f=>!(i!=null&&i.includes(f))),...i],right:((d=o==null?void 0:o.right)!=null?d:[]).filter(f=>!(i!=null&&i.includes(f)))}}return{left:((a=o==null?void 0:o.left)!=null?a:[]).filter(f=>!(i!=null&&i.includes(f))),right:((r=o==null?void 0:o.right)!=null?r:[]).filter(f=>!(i!=null&&i.includes(f)))}})},e.getCanPin=()=>e.getLeafColumns().some(i=>{var o,a,r;return((o=i.columnDef.enablePinning)!=null?o:!0)&&((a=(r=n.options.enableColumnPinning)!=null?r:n.options.enablePinning)!=null?a:!0)}),e.getIsPinned=()=>{const t=e.getLeafColumns().map(l=>l.id),{left:i,right:o}=n.getState().columnPinning,a=t.some(l=>i==null?void 0:i.includes(l)),r=t.some(l=>o==null?void 0:o.includes(l));return a?"left":r?"right":!1},e.getPinnedIndex=()=>{var t,i;const o=e.getIsPinned();return o?(t=(i=n.getState().columnPinning)==null||(i=i[o])==null?void 0:i.indexOf(e.id))!=null?t:-1:0}},createRow:(e,n)=>{e.getCenterVisibleCells=R(()=>[e._getAllVisibleCells(),n.getState().columnPinning.left,n.getState().columnPinning.right],(t,i,o)=>{const a=[...i??[],...o??[]];return t.filter(r=>!a.includes(r.column.id))},j(n.options,"debugRows","getCenterVisibleCells")),e.getLeftVisibleCells=R(()=>[e._getAllVisibleCells(),n.getState().columnPinning.left],(t,i)=>(i??[]).map(a=>t.find(r=>r.column.id===a)).filter(Boolean).map(a=>({...a,position:"left"})),j(n.options,"debugRows","getLeftVisibleCells")),e.getRightVisibleCells=R(()=>[e._getAllVisibleCells(),n.getState().columnPinning.right],(t,i)=>(i??[]).map(a=>t.find(r=>r.column.id===a)).filter(Boolean).map(a=>({...a,position:"right"})),j(n.options,"debugRows","getRightVisibleCells"))},createTable:e=>{e.setColumnPinning=n=>e.options.onColumnPinningChange==null?void 0:e.options.onColumnPinningChange(n),e.resetColumnPinning=n=>{var t,i;return e.setColumnPinning(n?Et():(t=(i=e.initialState)==null?void 0:i.columnPinning)!=null?t:Et())},e.getIsSomeColumnsPinned=n=>{var t;const i=e.getState().columnPinning;if(!n){var o,a;return!!((o=i.left)!=null&&o.length||(a=i.right)!=null&&a.length)}return!!((t=i[n])!=null&&t.length)},e.getLeftLeafColumns=R(()=>[e.getAllLeafColumns(),e.getState().columnPinning.left],(n,t)=>(t??[]).map(i=>n.find(o=>o.id===i)).filter(Boolean),j(e.options,"debugColumns","getLeftLeafColumns")),e.getRightLeafColumns=R(()=>[e.getAllLeafColumns(),e.getState().columnPinning.right],(n,t)=>(t??[]).map(i=>n.find(o=>o.id===i)).filter(Boolean),j(e.options,"debugColumns","getRightLeafColumns")),e.getCenterLeafColumns=R(()=>[e.getAllLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(n,t,i)=>{const o=[...t??[],...i??[]];return n.filter(a=>!o.includes(a.id))},j(e.options,"debugColumns","getCenterLeafColumns"))}},We={size:150,minSize:20,maxSize:Number.MAX_SAFE_INTEGER},kt=()=>({startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,isResizingColumn:!1,columnSizingStart:[]}),Sa={getDefaultColumnDef:()=>We,getInitialState:e=>({columnSizing:{},columnSizingInfo:kt(),...e}),getDefaultOptions:e=>({columnResizeMode:"onEnd",columnResizeDirection:"ltr",onColumnSizingChange:de("columnSizing",e),onColumnSizingInfoChange:de("columnSizingInfo",e)}),createColumn:(e,n)=>{e.getSize=()=>{var t,i,o;const a=n.getState().columnSizing[e.id];return Math.min(Math.max((t=e.columnDef.minSize)!=null?t:We.minSize,(i=a??e.columnDef.size)!=null?i:We.size),(o=e.columnDef.maxSize)!=null?o:We.maxSize)},e.getStart=R(t=>[t,Ae(n,t),n.getState().columnSizing],(t,i)=>i.slice(0,e.getIndex(t)).reduce((o,a)=>o+a.getSize(),0),j(n.options,"debugColumns","getStart")),e.getAfter=R(t=>[t,Ae(n,t),n.getState().columnSizing],(t,i)=>i.slice(e.getIndex(t)+1).reduce((o,a)=>o+a.getSize(),0),j(n.options,"debugColumns","getAfter")),e.resetSize=()=>{n.setColumnSizing(t=>{let{[e.id]:i,...o}=t;return o})},e.getCanResize=()=>{var t,i;return((t=e.columnDef.enableResizing)!=null?t:!0)&&((i=n.options.enableColumnResizing)!=null?i:!0)},e.getIsResizing=()=>n.getState().columnSizingInfo.isResizingColumn===e.id},createHeader:(e,n)=>{e.getSize=()=>{let t=0;const i=o=>{if(o.subHeaders.length)o.subHeaders.forEach(i);else{var a;t+=(a=o.column.getSize())!=null?a:0}};return i(e),t},e.getStart=()=>{if(e.index>0){const t=e.headerGroup.headers[e.index-1];return t.getStart()+t.getSize()}return 0},e.getResizeHandler=t=>{const i=n.getColumn(e.column.id),o=i==null?void 0:i.getCanResize();return a=>{if(!i||!o||(a.persist==null||a.persist(),Ft(a)&&a.touches&&a.touches.length>1))return;const r=e.getSize(),l=e?e.getLeafHeaders().map(h=>[h.column.id,h.column.getSize()]):[[i.id,i.getSize()]],s=Ft(a)?Math.round(a.touches[0].clientX):a.clientX,p={},d=(h,O)=>{typeof O=="number"&&(n.setColumnSizingInfo(S=>{var T,x;const L=n.options.columnResizeDirection==="rtl"?-1:1,V=(O-((T=S==null?void 0:S.startOffset)!=null?T:0))*L,J=Math.max(V/((x=S==null?void 0:S.startSize)!=null?x:0),-.999999);return S.columnSizingStart.forEach(Z=>{let[pe,ue]=Z;p[pe]=Math.round(Math.max(ue+ue*J,0)*100)/100}),{...S,deltaOffset:V,deltaPercentage:J}}),(n.options.columnResizeMode==="onChange"||h==="end")&&n.setColumnSizing(S=>({...S,...p})))},f=h=>d("move",h),g=h=>{d("end",h),n.setColumnSizingInfo(O=>({...O,isResizingColumn:!1,startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,columnSizingStart:[]}))},u=t||typeof document<"u"?document:null,m={moveHandler:h=>f(h.clientX),upHandler:h=>{u==null||u.removeEventListener("mousemove",m.moveHandler),u==null||u.removeEventListener("mouseup",m.upHandler),g(h.clientX)}},v={moveHandler:h=>(h.cancelable&&(h.preventDefault(),h.stopPropagation()),f(h.touches[0].clientX),!1),upHandler:h=>{var O;u==null||u.removeEventListener("touchmove",v.moveHandler),u==null||u.removeEventListener("touchend",v.upHandler),h.cancelable&&(h.preventDefault(),h.stopPropagation()),g((O=h.touches[0])==null?void 0:O.clientX)}},P=Ca()?{passive:!1}:!1;Ft(a)?(u==null||u.addEventListener("touchmove",v.moveHandler,P),u==null||u.addEventListener("touchend",v.upHandler,P)):(u==null||u.addEventListener("mousemove",m.moveHandler,P),u==null||u.addEventListener("mouseup",m.upHandler,P)),n.setColumnSizingInfo(h=>({...h,startOffset:s,startSize:r,deltaOffset:0,deltaPercentage:0,columnSizingStart:l,isResizingColumn:i.id}))}}},createTable:e=>{e.setColumnSizing=n=>e.options.onColumnSizingChange==null?void 0:e.options.onColumnSizingChange(n),e.setColumnSizingInfo=n=>e.options.onColumnSizingInfoChange==null?void 0:e.options.onColumnSizingInfoChange(n),e.resetColumnSizing=n=>{var t;e.setColumnSizing(n?{}:(t=e.initialState.columnSizing)!=null?t:{})},e.resetHeaderSizeInfo=n=>{var t;e.setColumnSizingInfo(n?kt():(t=e.initialState.columnSizingInfo)!=null?t:kt())},e.getTotalSize=()=>{var n,t;return(n=(t=e.getHeaderGroups()[0])==null?void 0:t.headers.reduce((i,o)=>i+o.getSize(),0))!=null?n:0},e.getLeftTotalSize=()=>{var n,t;return(n=(t=e.getLeftHeaderGroups()[0])==null?void 0:t.headers.reduce((i,o)=>i+o.getSize(),0))!=null?n:0},e.getCenterTotalSize=()=>{var n,t;return(n=(t=e.getCenterHeaderGroups()[0])==null?void 0:t.headers.reduce((i,o)=>i+o.getSize(),0))!=null?n:0},e.getRightTotalSize=()=>{var n,t;return(n=(t=e.getRightHeaderGroups()[0])==null?void 0:t.headers.reduce((i,o)=>i+o.getSize(),0))!=null?n:0}}};let Ye=null;function Ca(){if(typeof Ye=="boolean")return Ye;let e=!1;try{const n={get passive(){return e=!0,!1}},t=()=>{};window.addEventListener("test",t,n),window.removeEventListener("test",t)}catch{e=!1}return Ye=e,Ye}function Ft(e){return e.type==="touchstart"}const _a={getInitialState:e=>({columnVisibility:{},...e}),getDefaultOptions:e=>({onColumnVisibilityChange:de("columnVisibility",e)}),createColumn:(e,n)=>{e.toggleVisibility=t=>{e.getCanHide()&&n.setColumnVisibility(i=>({...i,[e.id]:t??!e.getIsVisible()}))},e.getIsVisible=()=>{var t,i;const o=e.columns;return(t=o.length?o.some(a=>a.getIsVisible()):(i=n.getState().columnVisibility)==null?void 0:i[e.id])!=null?t:!0},e.getCanHide=()=>{var t,i;return((t=e.columnDef.enableHiding)!=null?t:!0)&&((i=n.options.enableHiding)!=null?i:!0)},e.getToggleVisibilityHandler=()=>t=>{e.toggleVisibility==null||e.toggleVisibility(t.target.checked)}},createRow:(e,n)=>{e._getAllVisibleCells=R(()=>[e.getAllCells(),n.getState().columnVisibility],t=>t.filter(i=>i.column.getIsVisible()),j(n.options,"debugRows","_getAllVisibleCells")),e.getVisibleCells=R(()=>[e.getLeftVisibleCells(),e.getCenterVisibleCells(),e.getRightVisibleCells()],(t,i,o)=>[...t,...i,...o],j(n.options,"debugRows","getVisibleCells"))},createTable:e=>{const n=(t,i)=>R(()=>[i(),i().filter(o=>o.getIsVisible()).map(o=>o.id).join("_")],o=>o.filter(a=>a.getIsVisible==null?void 0:a.getIsVisible()),j(e.options,"debugColumns",t));e.getVisibleFlatColumns=n("getVisibleFlatColumns",()=>e.getAllFlatColumns()),e.getVisibleLeafColumns=n("getVisibleLeafColumns",()=>e.getAllLeafColumns()),e.getLeftVisibleLeafColumns=n("getLeftVisibleLeafColumns",()=>e.getLeftLeafColumns()),e.getRightVisibleLeafColumns=n("getRightVisibleLeafColumns",()=>e.getRightLeafColumns()),e.getCenterVisibleLeafColumns=n("getCenterVisibleLeafColumns",()=>e.getCenterLeafColumns()),e.setColumnVisibility=t=>e.options.onColumnVisibilityChange==null?void 0:e.options.onColumnVisibilityChange(t),e.resetColumnVisibility=t=>{var i;e.setColumnVisibility(t?{}:(i=e.initialState.columnVisibility)!=null?i:{})},e.toggleAllColumnsVisible=t=>{var i;t=(i=t)!=null?i:!e.getIsAllColumnsVisible(),e.setColumnVisibility(e.getAllLeafColumns().reduce((o,a)=>({...o,[a.id]:t||!(a.getCanHide!=null&&a.getCanHide())}),{}))},e.getIsAllColumnsVisible=()=>!e.getAllLeafColumns().some(t=>!(t.getIsVisible!=null&&t.getIsVisible())),e.getIsSomeColumnsVisible=()=>e.getAllLeafColumns().some(t=>t.getIsVisible==null?void 0:t.getIsVisible()),e.getToggleAllColumnsVisibilityHandler=()=>t=>{var i;e.toggleAllColumnsVisible((i=t.target)==null?void 0:i.checked)}}};function Ae(e,n){return n?n==="center"?e.getCenterVisibleLeafColumns():n==="left"?e.getLeftVisibleLeafColumns():e.getRightVisibleLeafColumns():e.getVisibleLeafColumns()}const Ea={createTable:e=>{e._getGlobalFacetedRowModel=e.options.getFacetedRowModel&&e.options.getFacetedRowModel(e,"__global__"),e.getGlobalFacetedRowModel=()=>e.options.manualFiltering||!e._getGlobalFacetedRowModel?e.getPreFilteredRowModel():e._getGlobalFacetedRowModel(),e._getGlobalFacetedUniqueValues=e.options.getFacetedUniqueValues&&e.options.getFacetedUniqueValues(e,"__global__"),e.getGlobalFacetedUniqueValues=()=>e._getGlobalFacetedUniqueValues?e._getGlobalFacetedUniqueValues():new Map,e._getGlobalFacetedMinMaxValues=e.options.getFacetedMinMaxValues&&e.options.getFacetedMinMaxValues(e,"__global__"),e.getGlobalFacetedMinMaxValues=()=>{if(e._getGlobalFacetedMinMaxValues)return e._getGlobalFacetedMinMaxValues()}}},ka={getInitialState:e=>({globalFilter:void 0,...e}),getDefaultOptions:e=>({onGlobalFilterChange:de("globalFilter",e),globalFilterFn:"auto",getColumnCanGlobalFilter:n=>{var t;const i=(t=e.getCoreRowModel().flatRows[0])==null||(t=t._getAllCellsByColumnId()[n.id])==null?void 0:t.getValue();return typeof i=="string"||typeof i=="number"}}),createColumn:(e,n)=>{e.getCanGlobalFilter=()=>{var t,i,o,a;return((t=e.columnDef.enableGlobalFilter)!=null?t:!0)&&((i=n.options.enableGlobalFilter)!=null?i:!0)&&((o=n.options.enableFilters)!=null?o:!0)&&((a=n.options.getColumnCanGlobalFilter==null?void 0:n.options.getColumnCanGlobalFilter(e))!=null?a:!0)&&!!e.accessorFn}},createTable:e=>{e.getGlobalAutoFilterFn=()=>we.includesString,e.getGlobalFilterFn=()=>{var n,t;const{globalFilterFn:i}=e.options;return Ue(i)?i:i==="auto"?e.getGlobalAutoFilterFn():(n=(t=e.options.filterFns)==null?void 0:t[i])!=null?n:we[i]},e.setGlobalFilter=n=>{e.options.onGlobalFilterChange==null||e.options.onGlobalFilterChange(n)},e.resetGlobalFilter=n=>{e.setGlobalFilter(n?void 0:e.initialState.globalFilter)}}},Fa={getInitialState:e=>({expanded:{},...e}),getDefaultOptions:e=>({onExpandedChange:de("expanded",e),paginateExpandedRows:!0}),createTable:e=>{let n=!1,t=!1;e._autoResetExpanded=()=>{var i,o;if(!n){e._queue(()=>{n=!0});return}if((i=(o=e.options.autoResetAll)!=null?o:e.options.autoResetExpanded)!=null?i:!e.options.manualExpanding){if(t)return;t=!0,e._queue(()=>{e.resetExpanded(),t=!1})}},e.setExpanded=i=>e.options.onExpandedChange==null?void 0:e.options.onExpandedChange(i),e.toggleAllRowsExpanded=i=>{i??!e.getIsAllRowsExpanded()?e.setExpanded(!0):e.setExpanded({})},e.resetExpanded=i=>{var o,a;e.setExpanded(i?{}:(o=(a=e.initialState)==null?void 0:a.expanded)!=null?o:{})},e.getCanSomeRowsExpand=()=>e.getPrePaginationRowModel().flatRows.some(i=>i.getCanExpand()),e.getToggleAllRowsExpandedHandler=()=>i=>{i.persist==null||i.persist(),e.toggleAllRowsExpanded()},e.getIsSomeRowsExpanded=()=>{const i=e.getState().expanded;return i===!0||Object.values(i).some(Boolean)},e.getIsAllRowsExpanded=()=>{const i=e.getState().expanded;return typeof i=="boolean"?i===!0:!(!Object.keys(i).length||e.getRowModel().flatRows.some(o=>!o.getIsExpanded()))},e.getExpandedDepth=()=>{let i=0;return(e.getState().expanded===!0?Object.keys(e.getRowModel().rowsById):Object.keys(e.getState().expanded)).forEach(a=>{const r=a.split(".");i=Math.max(i,r.length)}),i},e.getPreExpandedRowModel=()=>e.getSortedRowModel(),e.getExpandedRowModel=()=>(!e._getExpandedRowModel&&e.options.getExpandedRowModel&&(e._getExpandedRowModel=e.options.getExpandedRowModel(e)),e.options.manualExpanding||!e._getExpandedRowModel?e.getPreExpandedRowModel():e._getExpandedRowModel())},createRow:(e,n)=>{e.toggleExpanded=t=>{n.setExpanded(i=>{var o;const a=i===!0?!0:!!(i!=null&&i[e.id]);let r={};if(i===!0?Object.keys(n.getRowModel().rowsById).forEach(l=>{r[l]=!0}):r=i,t=(o=t)!=null?o:!a,!a&&t)return{...r,[e.id]:!0};if(a&&!t){const{[e.id]:l,...s}=r;return s}return i})},e.getIsExpanded=()=>{var t;const i=n.getState().expanded;return!!((t=n.options.getIsRowExpanded==null?void 0:n.options.getIsRowExpanded(e))!=null?t:i===!0||i!=null&&i[e.id])},e.getCanExpand=()=>{var t,i,o;return(t=n.options.getRowCanExpand==null?void 0:n.options.getRowCanExpand(e))!=null?t:((i=n.options.enableExpanding)!=null?i:!0)&&!!((o=e.subRows)!=null&&o.length)},e.getIsAllParentsExpanded=()=>{let t=!0,i=e;for(;t&&i.parentId;)i=n.getRow(i.parentId,!0),t=i.getIsExpanded();return t},e.getToggleExpandedHandler=()=>{const t=e.getCanExpand();return()=>{t&&e.toggleExpanded()}}}},Pt=0,It=10,Mt=()=>({pageIndex:Pt,pageSize:It}),Pa={getInitialState:e=>({...e,pagination:{...Mt(),...e==null?void 0:e.pagination}}),getDefaultOptions:e=>({onPaginationChange:de("pagination",e)}),createTable:e=>{let n=!1,t=!1;e._autoResetPageIndex=()=>{var i,o;if(!n){e._queue(()=>{n=!0});return}if((i=(o=e.options.autoResetAll)!=null?o:e.options.autoResetPageIndex)!=null?i:!e.options.manualPagination){if(t)return;t=!0,e._queue(()=>{e.resetPageIndex(),t=!1})}},e.setPagination=i=>{const o=a=>be(i,a);return e.options.onPaginationChange==null?void 0:e.options.onPaginationChange(o)},e.resetPagination=i=>{var o;e.setPagination(i?Mt():(o=e.initialState.pagination)!=null?o:Mt())},e.setPageIndex=i=>{e.setPagination(o=>{let a=be(i,o.pageIndex);const r=typeof e.options.pageCount>"u"||e.options.pageCount===-1?Number.MAX_SAFE_INTEGER:e.options.pageCount-1;return a=Math.max(0,Math.min(a,r)),{...o,pageIndex:a}})},e.resetPageIndex=i=>{var o,a;e.setPageIndex(i?Pt:(o=(a=e.initialState)==null||(a=a.pagination)==null?void 0:a.pageIndex)!=null?o:Pt)},e.resetPageSize=i=>{var o,a;e.setPageSize(i?It:(o=(a=e.initialState)==null||(a=a.pagination)==null?void 0:a.pageSize)!=null?o:It)},e.setPageSize=i=>{e.setPagination(o=>{const a=Math.max(1,be(i,o.pageSize)),r=o.pageSize*o.pageIndex,l=Math.floor(r/a);return{...o,pageIndex:l,pageSize:a}})},e.setPageCount=i=>e.setPagination(o=>{var a;let r=be(i,(a=e.options.pageCount)!=null?a:-1);return typeof r=="number"&&(r=Math.max(-1,r)),{...o,pageCount:r}}),e.getPageOptions=R(()=>[e.getPageCount()],i=>{let o=[];return i&&i>0&&(o=[...new Array(i)].fill(null).map((a,r)=>r)),o},j(e.options,"debugTable","getPageOptions")),e.getCanPreviousPage=()=>e.getState().pagination.pageIndex>0,e.getCanNextPage=()=>{const{pageIndex:i}=e.getState().pagination,o=e.getPageCount();return o===-1?!0:o===0?!1:i<o-1},e.previousPage=()=>e.setPageIndex(i=>i-1),e.nextPage=()=>e.setPageIndex(i=>i+1),e.firstPage=()=>e.setPageIndex(0),e.lastPage=()=>e.setPageIndex(e.getPageCount()-1),e.getPrePaginationRowModel=()=>e.getExpandedRowModel(),e.getPaginationRowModel=()=>(!e._getPaginationRowModel&&e.options.getPaginationRowModel&&(e._getPaginationRowModel=e.options.getPaginationRowModel(e)),e.options.manualPagination||!e._getPaginationRowModel?e.getPrePaginationRowModel():e._getPaginationRowModel()),e.getPageCount=()=>{var i;return(i=e.options.pageCount)!=null?i:Math.ceil(e.getRowCount()/e.getState().pagination.pageSize)},e.getRowCount=()=>{var i;return(i=e.options.rowCount)!=null?i:e.getPrePaginationRowModel().rows.length}}},Dt=()=>({top:[],bottom:[]}),Ia={getInitialState:e=>({rowPinning:Dt(),...e}),getDefaultOptions:e=>({onRowPinningChange:de("rowPinning",e)}),createRow:(e,n)=>{e.pin=(t,i,o)=>{const a=i?e.getLeafRows().map(s=>{let{id:p}=s;return p}):[],r=o?e.getParentRows().map(s=>{let{id:p}=s;return p}):[],l=new Set([...r,e.id,...a]);n.setRowPinning(s=>{var p,d;if(t==="bottom"){var f,g;return{top:((f=s==null?void 0:s.top)!=null?f:[]).filter(v=>!(l!=null&&l.has(v))),bottom:[...((g=s==null?void 0:s.bottom)!=null?g:[]).filter(v=>!(l!=null&&l.has(v))),...Array.from(l)]}}if(t==="top"){var u,m;return{top:[...((u=s==null?void 0:s.top)!=null?u:[]).filter(v=>!(l!=null&&l.has(v))),...Array.from(l)],bottom:((m=s==null?void 0:s.bottom)!=null?m:[]).filter(v=>!(l!=null&&l.has(v)))}}return{top:((p=s==null?void 0:s.top)!=null?p:[]).filter(v=>!(l!=null&&l.has(v))),bottom:((d=s==null?void 0:s.bottom)!=null?d:[]).filter(v=>!(l!=null&&l.has(v)))}})},e.getCanPin=()=>{var t;const{enableRowPinning:i,enablePinning:o}=n.options;return typeof i=="function"?i(e):(t=i??o)!=null?t:!0},e.getIsPinned=()=>{const t=[e.id],{top:i,bottom:o}=n.getState().rowPinning,a=t.some(l=>i==null?void 0:i.includes(l)),r=t.some(l=>o==null?void 0:o.includes(l));return a?"top":r?"bottom":!1},e.getPinnedIndex=()=>{var t,i;const o=e.getIsPinned();if(!o)return-1;const a=(t=o==="top"?n.getTopRows():n.getBottomRows())==null?void 0:t.map(r=>{let{id:l}=r;return l});return(i=a==null?void 0:a.indexOf(e.id))!=null?i:-1}},createTable:e=>{e.setRowPinning=n=>e.options.onRowPinningChange==null?void 0:e.options.onRowPinningChange(n),e.resetRowPinning=n=>{var t,i;return e.setRowPinning(n?Dt():(t=(i=e.initialState)==null?void 0:i.rowPinning)!=null?t:Dt())},e.getIsSomeRowsPinned=n=>{var t;const i=e.getState().rowPinning;if(!n){var o,a;return!!((o=i.top)!=null&&o.length||(a=i.bottom)!=null&&a.length)}return!!((t=i[n])!=null&&t.length)},e._getPinnedRows=(n,t,i)=>{var o;return((o=e.options.keepPinnedRows)==null||o?(t??[]).map(r=>{const l=e.getRow(r,!0);return l.getIsAllParentsExpanded()?l:null}):(t??[]).map(r=>n.find(l=>l.id===r))).filter(Boolean).map(r=>({...r,position:i}))},e.getTopRows=R(()=>[e.getRowModel().rows,e.getState().rowPinning.top],(n,t)=>e._getPinnedRows(n,t,"top"),j(e.options,"debugRows","getTopRows")),e.getBottomRows=R(()=>[e.getRowModel().rows,e.getState().rowPinning.bottom],(n,t)=>e._getPinnedRows(n,t,"bottom"),j(e.options,"debugRows","getBottomRows")),e.getCenterRows=R(()=>[e.getRowModel().rows,e.getState().rowPinning.top,e.getState().rowPinning.bottom],(n,t,i)=>{const o=new Set([...t??[],...i??[]]);return n.filter(a=>!o.has(a.id))},j(e.options,"debugRows","getCenterRows"))}},Ma={getInitialState:e=>({rowSelection:{},...e}),getDefaultOptions:e=>({onRowSelectionChange:de("rowSelection",e),enableRowSelection:!0,enableMultiRowSelection:!0,enableSubRowSelection:!0}),createTable:e=>{e.setRowSelection=n=>e.options.onRowSelectionChange==null?void 0:e.options.onRowSelectionChange(n),e.resetRowSelection=n=>{var t;return e.setRowSelection(n?{}:(t=e.initialState.rowSelection)!=null?t:{})},e.toggleAllRowsSelected=n=>{e.setRowSelection(t=>{n=typeof n<"u"?n:!e.getIsAllRowsSelected();const i={...t},o=e.getPreGroupedRowModel().flatRows;return n?o.forEach(a=>{a.getCanSelect()&&(i[a.id]=!0)}):o.forEach(a=>{delete i[a.id]}),i})},e.toggleAllPageRowsSelected=n=>e.setRowSelection(t=>{const i=typeof n<"u"?n:!e.getIsAllPageRowsSelected(),o={...t};return e.getRowModel().rows.forEach(a=>{$t(o,a.id,i,!0,e)}),o}),e.getPreSelectedRowModel=()=>e.getCoreRowModel(),e.getSelectedRowModel=R(()=>[e.getState().rowSelection,e.getCoreRowModel()],(n,t)=>Object.keys(n).length?At(e,t):{rows:[],flatRows:[],rowsById:{}},j(e.options,"debugTable","getSelectedRowModel")),e.getFilteredSelectedRowModel=R(()=>[e.getState().rowSelection,e.getFilteredRowModel()],(n,t)=>Object.keys(n).length?At(e,t):{rows:[],flatRows:[],rowsById:{}},j(e.options,"debugTable","getFilteredSelectedRowModel")),e.getGroupedSelectedRowModel=R(()=>[e.getState().rowSelection,e.getSortedRowModel()],(n,t)=>Object.keys(n).length?At(e,t):{rows:[],flatRows:[],rowsById:{}},j(e.options,"debugTable","getGroupedSelectedRowModel")),e.getIsAllRowsSelected=()=>{const n=e.getFilteredRowModel().flatRows,{rowSelection:t}=e.getState();let i=!!(n.length&&Object.keys(t).length);return i&&n.some(o=>o.getCanSelect()&&!t[o.id])&&(i=!1),i},e.getIsAllPageRowsSelected=()=>{const n=e.getPaginationRowModel().flatRows.filter(o=>o.getCanSelect()),{rowSelection:t}=e.getState();let i=!!n.length;return i&&n.some(o=>!t[o.id])&&(i=!1),i},e.getIsSomeRowsSelected=()=>{var n;const t=Object.keys((n=e.getState().rowSelection)!=null?n:{}).length;return t>0&&t<e.getFilteredRowModel().flatRows.length},e.getIsSomePageRowsSelected=()=>{const n=e.getPaginationRowModel().flatRows;return e.getIsAllPageRowsSelected()?!1:n.filter(t=>t.getCanSelect()).some(t=>t.getIsSelected()||t.getIsSomeSelected())},e.getToggleAllRowsSelectedHandler=()=>n=>{e.toggleAllRowsSelected(n.target.checked)},e.getToggleAllPageRowsSelectedHandler=()=>n=>{e.toggleAllPageRowsSelected(n.target.checked)}},createRow:(e,n)=>{e.toggleSelected=(t,i)=>{const o=e.getIsSelected();n.setRowSelection(a=>{var r;if(t=typeof t<"u"?t:!o,e.getCanSelect()&&o===t)return a;const l={...a};return $t(l,e.id,t,(r=i==null?void 0:i.selectChildren)!=null?r:!0,n),l})},e.getIsSelected=()=>{const{rowSelection:t}=n.getState();return Ot(e,t)},e.getIsSomeSelected=()=>{const{rowSelection:t}=n.getState();return Rt(e,t)==="some"},e.getIsAllSubRowsSelected=()=>{const{rowSelection:t}=n.getState();return Rt(e,t)==="all"},e.getCanSelect=()=>{var t;return typeof n.options.enableRowSelection=="function"?n.options.enableRowSelection(e):(t=n.options.enableRowSelection)!=null?t:!0},e.getCanSelectSubRows=()=>{var t;return typeof n.options.enableSubRowSelection=="function"?n.options.enableSubRowSelection(e):(t=n.options.enableSubRowSelection)!=null?t:!0},e.getCanMultiSelect=()=>{var t;return typeof n.options.enableMultiRowSelection=="function"?n.options.enableMultiRowSelection(e):(t=n.options.enableMultiRowSelection)!=null?t:!0},e.getToggleSelectedHandler=()=>{const t=e.getCanSelect();return i=>{var o;t&&e.toggleSelected((o=i.target)==null?void 0:o.checked)}}}},$t=(e,n,t,i,o)=>{var a;const r=o.getRow(n,!0);t?(r.getCanMultiSelect()||Object.keys(e).forEach(l=>delete e[l]),r.getCanSelect()&&(e[n]=!0)):delete e[n],i&&(a=r.subRows)!=null&&a.length&&r.getCanSelectSubRows()&&r.subRows.forEach(l=>$t(e,l.id,t,i,o))};function At(e,n){const t=e.getState().rowSelection,i=[],o={},a=function(r,l){return r.map(s=>{var p;const d=Ot(s,t);if(d&&(i.push(s),o[s.id]=s),(p=s.subRows)!=null&&p.length&&(s={...s,subRows:a(s.subRows)}),d)return s}).filter(Boolean)};return{rows:a(n.rows),flatRows:i,rowsById:o}}function Ot(e,n){var t;return(t=n[e.id])!=null?t:!1}function Rt(e,n,t){var i;if(!((i=e.subRows)!=null&&i.length))return!1;let o=!0,a=!1;return e.subRows.forEach(r=>{if(!(a&&!o)&&(r.getCanSelect()&&(Ot(r,n)?a=!0:o=!1),r.subRows&&r.subRows.length)){const l=Rt(r,n);l==="all"?a=!0:(l==="some"&&(a=!0),o=!1)}}),o?"all":a?"some":!1}const jt=/([0-9]+)/gm,Da=(e,n,t)=>oi(Se(e.getValue(t)).toLowerCase(),Se(n.getValue(t)).toLowerCase()),$a=(e,n,t)=>oi(Se(e.getValue(t)),Se(n.getValue(t))),Aa=(e,n,t)=>Tt(Se(e.getValue(t)).toLowerCase(),Se(n.getValue(t)).toLowerCase()),Oa=(e,n,t)=>Tt(Se(e.getValue(t)),Se(n.getValue(t))),Ra=(e,n,t)=>{const i=e.getValue(t),o=n.getValue(t);return i>o?1:i<o?-1:0},ja=(e,n,t)=>Tt(e.getValue(t),n.getValue(t));function Tt(e,n){return e===n?0:e>n?1:-1}function Se(e){return typeof e=="number"?isNaN(e)||e===1/0||e===-1/0?"":String(e):typeof e=="string"?e:""}function oi(e,n){const t=e.split(jt).filter(Boolean),i=n.split(jt).filter(Boolean);for(;t.length&&i.length;){const o=t.shift(),a=i.shift(),r=parseInt(o,10),l=parseInt(a,10),s=[r,l].sort();if(isNaN(s[0])){if(o>a)return 1;if(a>o)return-1;continue}if(isNaN(s[1]))return isNaN(r)?-1:1;if(r>l)return 1;if(l>r)return-1}return t.length-i.length}const Oe={alphanumeric:Da,alphanumericCaseSensitive:$a,text:Aa,textCaseSensitive:Oa,datetime:Ra,basic:ja},Ta=[ma,_a,ya,ba,va,xa,Ea,ka,{getInitialState:e=>({sorting:[],...e}),getDefaultColumnDef:()=>({sortingFn:"auto",sortUndefined:1}),getDefaultOptions:e=>({onSortingChange:de("sorting",e),isMultiSortEvent:n=>n.shiftKey}),createColumn:(e,n)=>{e.getAutoSortingFn=()=>{const t=n.getFilteredRowModel().flatRows.slice(10);let i=!1;for(const o of t){const a=o==null?void 0:o.getValue(e.id);if(Object.prototype.toString.call(a)==="[object Date]")return Oe.datetime;if(typeof a=="string"&&(i=!0,a.split(jt).length>1))return Oe.alphanumeric}return i?Oe.text:Oe.basic},e.getAutoSortDir=()=>{const t=n.getFilteredRowModel().flatRows[0];return typeof(t==null?void 0:t.getValue(e.id))=="string"?"asc":"desc"},e.getSortingFn=()=>{var t,i;if(!e)throw new Error;return Ue(e.columnDef.sortingFn)?e.columnDef.sortingFn:e.columnDef.sortingFn==="auto"?e.getAutoSortingFn():(t=(i=n.options.sortingFns)==null?void 0:i[e.columnDef.sortingFn])!=null?t:Oe[e.columnDef.sortingFn]},e.toggleSorting=(t,i)=>{const o=e.getNextSortingOrder(),a=typeof t<"u"&&t!==null;n.setSorting(r=>{const l=r==null?void 0:r.find(u=>u.id===e.id),s=r==null?void 0:r.findIndex(u=>u.id===e.id);let p=[],d,f=a?t:o==="desc";if(r!=null&&r.length&&e.getCanMultiSort()&&i?l?d="toggle":d="add":r!=null&&r.length&&s!==r.length-1?d="replace":l?d="toggle":d="replace",d==="toggle"&&(a||o||(d="remove")),d==="add"){var g;p=[...r,{id:e.id,desc:f}],p.splice(0,p.length-((g=n.options.maxMultiSortColCount)!=null?g:Number.MAX_SAFE_INTEGER))}else d==="toggle"?p=r.map(u=>u.id===e.id?{...u,desc:f}:u):d==="remove"?p=r.filter(u=>u.id!==e.id):p=[{id:e.id,desc:f}];return p})},e.getFirstSortDir=()=>{var t,i;return((t=(i=e.columnDef.sortDescFirst)!=null?i:n.options.sortDescFirst)!=null?t:e.getAutoSortDir()==="desc")?"desc":"asc"},e.getNextSortingOrder=t=>{var i,o;const a=e.getFirstSortDir(),r=e.getIsSorted();return r?r!==a&&((i=n.options.enableSortingRemoval)==null||i)&&(!(t&&(o=n.options.enableMultiRemove)!=null)||o)?!1:r==="desc"?"asc":"desc":a},e.getCanSort=()=>{var t,i;return((t=e.columnDef.enableSorting)!=null?t:!0)&&((i=n.options.enableSorting)!=null?i:!0)&&!!e.accessorFn},e.getCanMultiSort=()=>{var t,i;return(t=(i=e.columnDef.enableMultiSort)!=null?i:n.options.enableMultiSort)!=null?t:!!e.accessorFn},e.getIsSorted=()=>{var t;const i=(t=n.getState().sorting)==null?void 0:t.find(o=>o.id===e.id);return i?i.desc?"desc":"asc":!1},e.getSortIndex=()=>{var t,i;return(t=(i=n.getState().sorting)==null?void 0:i.findIndex(o=>o.id===e.id))!=null?t:-1},e.clearSorting=()=>{n.setSorting(t=>t!=null&&t.length?t.filter(i=>i.id!==e.id):[])},e.getToggleSortingHandler=()=>{const t=e.getCanSort();return i=>{t&&(i.persist==null||i.persist(),e.toggleSorting==null||e.toggleSorting(void 0,e.getCanMultiSort()?n.options.isMultiSortEvent==null?void 0:n.options.isMultiSortEvent(i):!1))}}},createTable:e=>{e.setSorting=n=>e.options.onSortingChange==null?void 0:e.options.onSortingChange(n),e.resetSorting=n=>{var t,i;e.setSorting(n?[]:(t=(i=e.initialState)==null?void 0:i.sorting)!=null?t:[])},e.getPreSortedRowModel=()=>e.getGroupedRowModel(),e.getSortedRowModel=()=>(!e._getSortedRowModel&&e.options.getSortedRowModel&&(e._getSortedRowModel=e.options.getSortedRowModel(e)),e.options.manualSorting||!e._getSortedRowModel?e.getPreSortedRowModel():e._getSortedRowModel())}},ha,Fa,Pa,Ia,Ma,Sa];function za(e){var n,t;process.env.NODE_ENV!=="production"&&(e.debugAll||e.debugTable)&&console.info("Creating Table Instance...");const i=[...Ta,...(n=e._features)!=null?n:[]];let o={_features:i};const a=o._features.reduce((g,u)=>Object.assign(g,u.getDefaultOptions==null?void 0:u.getDefaultOptions(o)),{}),r=g=>o.options.mergeOptions?o.options.mergeOptions(a,g):{...a,...g};let s={...{},...(t=e.initialState)!=null?t:{}};o._features.forEach(g=>{var u;s=(u=g.getInitialState==null?void 0:g.getInitialState(s))!=null?u:s});const p=[];let d=!1;const f={_features:i,options:{...a,...e},initialState:s,_queue:g=>{p.push(g),d||(d=!0,Promise.resolve().then(()=>{for(;p.length;)p.shift()();d=!1}).catch(u=>setTimeout(()=>{throw u})))},reset:()=>{o.setState(o.initialState)},setOptions:g=>{const u=be(g,o.options);o.options=r(u)},getState:()=>o.options.state,setState:g=>{o.options.onStateChange==null||o.options.onStateChange(g)},_getRowId:(g,u,m)=>{var v;return(v=o.options.getRowId==null?void 0:o.options.getRowId(g,u,m))!=null?v:`${m?[m.id,u].join("."):u}`},getCoreRowModel:()=>(o._getCoreRowModel||(o._getCoreRowModel=o.options.getCoreRowModel(o)),o._getCoreRowModel()),getRowModel:()=>o.getPaginationRowModel(),getRow:(g,u)=>{let m=(u?o.getPrePaginationRowModel():o.getRowModel()).rowsById[g];if(!m&&(m=o.getCoreRowModel().rowsById[g],!m))throw process.env.NODE_ENV!=="production"?new Error(`getRow could not find row with ID: ${g}`):new Error;return m},_getDefaultColumnDef:R(()=>[o.options.defaultColumn],g=>{var u;return g=(u=g)!=null?u:{},{header:m=>{const v=m.header.column.columnDef;return v.accessorKey?v.accessorKey:v.accessorFn?v.id:null},cell:m=>{var v,P;return(v=(P=m.renderValue())==null||P.toString==null?void 0:P.toString())!=null?v:null},...o._features.reduce((m,v)=>Object.assign(m,v.getDefaultColumnDef==null?void 0:v.getDefaultColumnDef()),{}),...g}},j(e,"debugColumns","_getDefaultColumnDef")),_getColumnDefs:()=>o.options.columns,getAllColumns:R(()=>[o._getColumnDefs()],g=>{const u=function(m,v,P){return P===void 0&&(P=0),m.map(h=>{const O=fa(o,h,P,v),S=h;return O.columns=S.columns?u(S.columns,O,P+1):[],O})};return u(g)},j(e,"debugColumns","getAllColumns")),getAllFlatColumns:R(()=>[o.getAllColumns()],g=>g.flatMap(u=>u.getFlatColumns()),j(e,"debugColumns","getAllFlatColumns")),_getAllFlatColumnsById:R(()=>[o.getAllFlatColumns()],g=>g.reduce((u,m)=>(u[m.id]=m,u),{}),j(e,"debugColumns","getAllFlatColumnsById")),getAllLeafColumns:R(()=>[o.getAllColumns(),o._getOrderColumnsFn()],(g,u)=>{let m=g.flatMap(v=>v.getLeafColumns());return u(m)},j(e,"debugColumns","getAllLeafColumns")),getColumn:g=>{const u=o._getAllFlatColumnsById()[g];return process.env.NODE_ENV!=="production"&&!u&&console.error(`[Table] Column with id '${g}' does not exist.`),u}};Object.assign(o,f);for(let g=0;g<o._features.length;g++){const u=o._features[g];u==null||u.createTable==null||u.createTable(o)}return o}function Va(){return e=>R(()=>[e.options.data],n=>{const t={rows:[],flatRows:[],rowsById:{}},i=function(o,a,r){a===void 0&&(a=0);const l=[];for(let p=0;p<o.length;p++){const d=Wn(e,e._getRowId(o[p],p,r),o[p],p,a,void 0,r==null?void 0:r.id);if(t.flatRows.push(d),t.rowsById[d.id]=d,l.push(d),e.options.getSubRows){var s;d.originalSubRows=e.options.getSubRows(o[p],p),(s=d.originalSubRows)!=null&&s.length&&(d.subRows=i(d.originalSubRows,a+1,d))}}return l};return t.rows=i(n),t},j(e.options,"debugTable","getRowModel",()=>e._autoResetPageIndex()))}function Na(){return e=>R(()=>[e.getState().expanded,e.getPreExpandedRowModel(),e.options.paginateExpandedRows],(n,t,i)=>!t.rows.length||n!==!0&&!Object.keys(n??{}).length||!i?t:La(t),j(e.options,"debugTable","getExpandedRowModel"))}function La(e){const n=[],t=i=>{var o;n.push(i),(o=i.subRows)!=null&&o.length&&i.getIsExpanded()&&i.subRows.forEach(t)};return e.rows.forEach(t),{rows:n,flatRows:e.flatRows,rowsById:e.rowsById}}function Ha(){return e=>R(()=>[e.getState().grouping,e.getPreGroupedRowModel()],(n,t)=>{if(!t.rows.length||!n.length)return t.rows.forEach(s=>{s.depth=0,s.parentId=void 0}),t;const i=n.filter(s=>e.getColumn(s)),o=[],a={},r=function(s,p,d){if(p===void 0&&(p=0),p>=i.length)return s.map(m=>(m.depth=p,o.push(m),a[m.id]=m,m.subRows&&(m.subRows=r(m.subRows,p+1,m.id)),m));const f=i[p],g=qa(s,f);return Array.from(g.entries()).map((m,v)=>{let[P,h]=m,O=`${f}:${P}`;O=d?`${d}>${O}`:O;const S=r(h,p+1,O);S.forEach(L=>{L.parentId=O});const T=p?Un(h,L=>L.subRows):h,x=Wn(e,O,T[0].original,v,p,void 0,d);return Object.assign(x,{groupingColumnId:f,groupingValue:P,subRows:S,leafRows:T,getValue:L=>{if(i.includes(L)){if(x._valuesCache.hasOwnProperty(L))return x._valuesCache[L];if(h[0]){var V;x._valuesCache[L]=(V=h[0].getValue(L))!=null?V:void 0}return x._valuesCache[L]}if(x._groupingValuesCache.hasOwnProperty(L))return x._groupingValuesCache[L];const J=e.getColumn(L),Z=J==null?void 0:J.getAggregationFn();if(Z)return x._groupingValuesCache[L]=Z(L,T,h),x._groupingValuesCache[L]}}),S.forEach(L=>{o.push(L),a[L.id]=L}),x})},l=r(t.rows,0);return l.forEach(s=>{o.push(s),a[s.id]=s}),{rows:l,flatRows:o,rowsById:a}},j(e.options,"debugTable","getGroupedRowModel",()=>{e._queue(()=>{e._autoResetExpanded(),e._autoResetPageIndex()})}))}function qa(e,n){const t=new Map;return e.reduce((i,o)=>{const a=`${o.getGroupingValue(n)}`,r=i.get(a);return r?r.push(o):i.set(a,[o]),i},t)}/**
|
|
47
47
|
* react-table
|
|
48
48
|
*
|
|
49
49
|
* Copyright (c) TanStack
|
|
@@ -52,4 +52,4 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
52
52
|
* LICENSE.md file in the root directory of this source tree.
|
|
53
53
|
*
|
|
54
54
|
* @license MIT
|
|
55
|
-
*/function ri(e,n){return e?Ba(e)?ce.createElement(e,n):e:null}function Ba(e){return Ua(e)||typeof e=="function"||Ka(e)}function Ua(e){return typeof e=="function"&&(()=>{const n=Object.getPrototypeOf(e);return n.prototype&&n.prototype.isReactComponent})()}function Ka(e){return typeof e=="object"&&typeof e.$$typeof=="symbol"&&["react.memo","react.forward_ref"].includes(e.$$typeof.description)}function Wa(e){const n={state:{},onStateChange:()=>{},renderFallbackValue:null,...e},[t]=ce.useState(()=>({current:Va(n)})),[i,o]=ce.useState(()=>t.current.initialState);return t.current.setOptions(a=>({...a,...e,state:{...i,...e.state},onStateChange:r=>{o(r),e.onStateChange==null||e.onStateChange(r)}})),t.current}const li=({header:e})=>{var n;return{asc:c.jsx(q.Icon,{name:"chevron-up",children:"ascending"}),desc:c.jsx(q.Icon,{name:"chevron-down",children:"descending"})}[(n=e==null?void 0:e.column)==null?void 0:n.getIsSorted()]??null},Ya=({header:e})=>{var o;const n=e.column.getCanSort(),t=(o=e.column.columnDef.meta)==null?void 0:o.isInteractiveHeader,i=ri(e.column.columnDef.header,e.getContext());return c.jsx("th",{className:U("p-column-header",e.column.id),children:n&&!t?c.jsx(q.Button,{appearance:"link",className:"p-button--column-header",onClick:e.column.getToggleSortingHandler(),type:"button",children:c.jsxs(c.Fragment,{children:[i,c.jsx(li,{header:e})]})}):c.jsxs("span",{className:"p-container--column-header",children:[i,n&&!t&&c.jsx(li,{header:e})]})},e.id)},Re=({children:e})=>c.jsx("section",{className:"controls-bar u-flex u-flex--justify-between u-flex--wrap",children:c.jsx("div",{className:"p-form p-form--inline",children:e})}),Xa=({children:e})=>c.jsx("strong",{className:"controls-bar__description",children:e}),Qa=({children:e})=>c.jsx("div",{className:"u-flex u-flex--wrap u-flex--column-x-small controls-bar__right",children:e});Re.Left=Xa,Re.Right=Qa;const Ja=({currentPage:e,itemsPerPage:n,totalItems:t,handlePageSizeChange:i,dataContext:o,setCurrentPage:a,isPending:r,pageSizes:l=[20,30,50,100]})=>{const s=h.useMemo(()=>l,[]),u=h.useMemo(()=>s.map(p=>({label:`${p}/page`,value:p})),[s]),d=Math.ceil(t/n),f=p=>{const{value:m}=p.target;i(Number(m))},g=()=>e===d?n-(d*n-t):e<d?n:0;return c.jsxs(Re,{children:[c.jsxs(Re.Left,{children:["Showing ",g()," out of ",t," ",o]}),c.jsxs(Re.Right,{children:[c.jsx(rn,{currentPage:e,disabled:r,paginate:a,totalPages:d}),c.jsx(q.Select,{"aria-label":"Items per page",className:"u-no-margin--bottom",name:"Items per page",onChange:f,options:u,value:n})]})]})},Za=({table:e,...n})=>{if(!e)return null;const t=e.getCoreRowModel().rows.filter(o=>o.getCanSelect());let i;return e.getSelectedRowModel().rows.length===0?i="false":e.getSelectedRowModel().rows.length<t.length?i="mixed":i="true",c.jsxs("label",{className:"p-checkbox--inline p-table-checkbox--all",children:[c.jsx("input",{"aria-checked":i,"aria-label":"select all",className:"p-checkbox__input",disabled:t.length===0,type:"checkbox",checked:i==="true",onChange:()=>{const o=e.getCoreRowModel().rows.filter(r=>r.getCanSelect()),a=o.every(r=>r.getIsSelected());o.forEach(r=>r.toggleSelected(!a))},...n}),c.jsx("span",{className:"p-checkbox__label"})]})},er=({row:e,...n})=>{if(!e)return null;const t=e.subRows.filter(r=>r.getCanSelect()),i=t.filter(r=>r.getIsSelected()).length,o=t.length>0&&i===t.length,a=i>0&&!o;return c.jsxs("label",{"aria-disabled":!e.getCanSelect(),className:"p-checkbox--inline p-table-checkbox--group",children:[c.jsx("input",{"aria-checked":a?"mixed":void 0,className:"p-checkbox__input",type:"checkbox",checked:o,disabled:!e.getCanSelect()&&t.length===0,onChange:()=>{const r=!o;t.forEach(l=>l.toggleSelected(r))},...n}),c.jsx("span",{className:"p-checkbox__label"})]})},Pe=({row:e,disabledTooltip:n,isNested:t=!1,...i})=>{if(!e)return null;const o=typeof n=="string"?n:n(e);return c.jsx(q.Tooltip,{message:!e.getCanSelect()&&o,position:"btm-right",children:c.jsxs("label",{"aria-disabled":!e.getCanSelect(),className:"p-checkbox--inline p-table-checkbox",children:[c.jsx("input",{className:"p-checkbox__input",type:"checkbox",checked:e.getIsSelected(),disabled:!e.getCanSelect()||t,onChange:e.getToggleSelectedHandler(),...i}),c.jsx("span",{className:"p-checkbox__label"})]})})};Pe.All=Za,Pe.Group=er;const tr=({className:e,columns:n,containerRef:t,data:i,filterCells:o=()=>!0,filterHeaders:a=()=>!0,getSubRows:r,groupBy:l,isLoading:s,noData:u,pagination:d,pinGroup:f,sorting:g=[],selection:p,setSorting:m,showChevron:v=!1,variant:I="full-height",...w})=>{const j=h.useRef(null),[M,T]=h.useState("auto"),[x,L]=h.useState(!1),[V,J]=h.useState(l??[]),[Z,pe]=h.useState(g??[]),[ue,xe]=h.useState(!0),$=!!p,k=S=>{xe(D=>{const b=typeof S=="function"?S(D):S;if(b===!0)return!0;const _={...b};if(D!==!0)for(const F of Object.keys(D))F in _||(_[F]=!1);return _})};h.useEffect(()=>{V.length&&k(S=>{const b={...S===!0?{}:{...S}};for(const _ of i){const F=V.map(A=>`${A}:${_[A]}`).join(">");F in b||(b[F]=!0)}return b})},[i,V]);const B=h.useMemo(()=>{let S=[...n];if(s)return S;if($){const D=[{id:"p-generic-table__select",accessorKey:"id",enableSorting:!1,header:({table:b})=>l?"":c.jsx(Pe.All,{table:b}),cell:({row:b})=>{const _=p.rowSelectionLabelKey&&p.rowSelectionLabelKey in b.original?`select ${b.original[p.rowSelectionLabelKey]}`:"select row";return b.getIsGrouped()?null:c.jsx(Pe,{"aria-label":_,disabledTooltip:p.disabledSelectionTooltip??"",isNested:r!==void 0&&!!b.parentId,row:b})}},...S];if(l){const b=_=>l[0]in _.original?`select ${_.original[l[0]]}`:"select group";S=[{id:"p-generic-table__group-select",accessorKey:"id",enableSorting:!1,header:({table:_})=>c.jsx(Pe.All,{table:_}),cell:({row:_})=>_.getIsGrouped()?c.jsx(Pe.Group,{"aria-label":b(_),row:_}):null},...D]}else S=D}return l&&v&&(S=[{id:"p-generic-table__group-chevron",accessorKey:"id",enableSorting:!1,header:"",cell:({row:b})=>{const _=b.getIsExpanded();return b.getIsGrouped()?c.jsx(q.Tooltip,{message:_?"Collapse":"Expand",position:"btm-right",children:c.jsx(q.Icon,{name:_?q.ICONS.chevronUp:q.ICONS.chevronDown})}):null}},...S]),S},[$,n,s,l,r]),Q=h.useMemo(()=>V.length?[...i].sort((S,D)=>{for(const b of V){const _=S[b]??null,F=D[b]??null;if(_===null)return 1;if(F===null||_<F)return-1;if(_>F)return 1}return 0}):i,[i,V]),ee=h.useMemo(()=>Q.length?[...Q].sort((S,D)=>{if(f!=null&&f.length&&V.length)for(const{value:b,isTop:_}of f){const F=V[0],A=S[F]??null,H=D[F]??null;if(A===b&&H!==b)return _?-1:1;if(H===b&&A!==b)return _?1:-1}for(const{id:b,desc:_}of Z){const F=S[b]??null,A=D[b]??null;if(F===null&&A===null)return 0;if(F===null)return _?-1:1;if(A===null||F<A)return _?1:-1;if(F>A)return _?-1:1}return 0}):[],[Q,Z,f,V]);h.useLayoutEffect(()=>{const S=()=>{const _=j.current;if(!_)return;const F=(t==null?void 0:t.current)||document.querySelector("main");if(!F)return;const A=F.getBoundingClientRect(),H=_.getBoundingClientRect(),N=A.bottom-H.top,ie=_.scrollHeight>N;L(ie),T(I==="full-height"&&ie?`${N}px`:"auto")};S();const D=new ResizeObserver(S),b=j.current;return b&&D.observe(b),window.addEventListener("resize",S),()=>{window.removeEventListener("resize",S),b&&D.unobserve(b)}},[t,ee.length,s]);const se=I==="full-height"&&x?"full-height":"regular",ne=Wa({data:ee,columns:B,state:{grouping:V,expanded:ue,sorting:Z,rowSelection:p==null?void 0:p.rowSelection},manualPagination:!0,autoResetExpanded:!1,onExpandedChange:k,onSortingChange:S=>{pe(S),m&&m(S)},onGroupingChange:J,onRowSelectionChange:p==null?void 0:p.setRowSelection,manualSorting:!0,enableSorting:!0,enableExpanding:!0,getSubRows:r,getExpandedRowModel:La(),getCoreRowModel:Na(),getGroupedRowModel:qa(),groupedColumnMode:!1,enableRowSelection:(p==null?void 0:p.filterSelectable)??$,enableMultiRowSelection:(p==null?void 0:p.filterSelectable)??$,getRowId:S=>S.id.toString()}),y=()=>c.jsx("tr",{children:c.jsx("td",{className:"p-generic-table__loading",colSpan:B.length,children:c.jsx(q.Spinner,{text:"Loading..."})})}),P=()=>ne.getRowModel().rows.length<1?c.jsx("tr",{children:c.jsx("td",{className:"p-generic-table__no-data",colSpan:B.length,children:u})}):ne.getRowModel().rows.map(S=>{const{getIsGrouped:D,id:b,getVisibleCells:_,parentId:F}=S,A=!D(),H=(p==null?void 0:p.rowSelection)!==void 0&&Object.keys(p.rowSelection).includes(b);return c.jsx("tr",{"aria-rowindex":parseInt(b.replace(/\D/g,"")||"0",10)+1,"aria-selected":H,className:U({"p-generic-table__individual-row":A,"p-generic-table__group-row":!A,"p-generic-table__nested-row":r!==void 0&&!!F}),onClick:()=>{A||S.toggleExpanded()},role:"row",children:_().filter(N=>!A&&(N.column.id==="p-generic-table__group-select"||N.column.id==="p-generic-table__group-chevron")?!0:o(S,N.column)).map(N=>c.jsx("td",{className:U(`${N.column.id}`),children:ri(N.column.columnDef.cell,N.getContext())},N.id))},b)});return c.jsxs("div",{className:U("p-generic-table",e),"data-testid":"p-generic-table",...w,children:[d&&c.jsx(Ja,{currentPage:d.currentPage,dataContext:d.dataContext,handlePageSizeChange:d.handlePageSizeChange,isPending:d.isPending,itemsPerPage:d.itemsPerPage,setCurrentPage:d.setCurrentPage,totalItems:d.totalItems,pageSizes:d.pageSizes}),c.jsxs("table",{"aria-busy":s,"aria-label":w["aria-label"],"aria-describedby":"generic-table-description","aria-rowcount":ee.length+1,className:U("p-generic-table__table",{"p-generic-table__is-full-height":se==="full-height","p-generic-table__is-selectable":$,"p-generic-table__is-grouped":l!==void 0}),role:"grid",children:[c.jsx("thead",{children:ne.getHeaderGroups().map(S=>c.jsx("tr",{role:"row",children:S.headers.filter(a).map((D,b)=>c.jsxs(h.Fragment,{children:[c.jsx(Ya,{header:D}),$&&l&&(!v&&b===2||v&&b===3)?c.jsx("th",{className:"p-generic-table__select-alignment",role:"columnheader"}):null]},D.id))},S.id))}),c.jsx("tbody",{ref:j,style:{overflowY:"auto",maxHeight:M},children:s?y():P()})]})]})},si={DEFAULT:4,EXPANDED:15},ve={OPEN_PAREN:"(",CLOSE_PAREN:")",EQUALS:"=",COLON:":",COMMA:","},Xe=(e,n=e.length)=>{const t=nr(e,n),{token:i,tokenStart:o,tokenEnd:a}=ir(e,n);return{context:t,token:i,tokenStart:o,tokenEnd:a}},nr=(e,n)=>{let t=0;for(let i=n-1;i>=0;i--){const o=e[i];if(o===ve.CLOSE_PAREN)t++;else if(o===ve.OPEN_PAREN){if(t===0){const r=e.slice(0,i).trimEnd().match(/([a-zA-Z0-9_-]+)\s*:\s*$/);return(r==null?void 0:r[1])||""}t--}}return""},ir=(e,n)=>{let t=n,i=n;for(;i<e.length&&/[^\s=(),]/.test(e[i]);)i++;for(;t>0&&/[^\s=(),]/.test(e[t-1]);)t--;return{token:e.slice(t,i),tokenStart:t,tokenEnd:i}},ci=(e,n)=>{const t=e.charAt(n-1);return n>0&&(t===ve.CLOSE_PAREN||t===ve.COMMA)},or=({className:e,disabled:n=!1,search:t,setSearch:i,context:o,setContext:a,setToken:r,suggestions:l,isLoading:s=!1,placeholder:u,...d})=>{const[f,g]=h.useState({isVisible:!1,highlightedIndex:-1,showingMore:!1,cursorPosition:0}),p=h.useRef(null),m=h.useRef(null),v=h.useRef(null),I=h.useMemo(()=>{const $=f.showingMore?si.EXPANDED:si.DEFAULT,k=l.slice(0,$);return!f.showingMore&&l.length>$?[...k,{value:"Show more...",type:"more"}]:k},[l,f.showingMore]),w=h.useCallback($=>{g(typeof $=="function"?k=>({...k,...$(k)}):k=>({...k,...$}))},[]),j=h.useCallback($=>{p.current&&!p.current.contains($.target)&&w({isVisible:!1,highlightedIndex:-1})},[w]),M=h.useCallback(($,k)=>{const{tokenStart:B,tokenEnd:Q}=k;if($.type==="filter"){const se=$.value+ve.COLON+ve.OPEN_PAREN;return t.slice(0,B)+se+t.slice(Q)}if(o.length===0){const se=$.type+ve.COLON+ve.OPEN_PAREN+ve.EQUALS+$.value;return t.slice(0,B)+se+t.slice(Q)}const ee=t.charAt(B-1)===ve.EQUALS?$.value:ve.EQUALS+$.value;return t.slice(0,B)+ee+t.slice(Q)},[t,o]),T=h.useCallback($=>{const k=I[$];if(!k)return;if(k.type==="more"){w({showingMore:!0});return}const B=Xe(t,f.cursorPosition),Q=M(k,B),ee=B.tokenStart+(k.type==="filter"?k.value.length+2:o.length===0?k.type.length+k.value.length+3:k.value.length+1),{context:se,token:ne}=Xe(Q,ee);a(se),r(ne),i(Q),setTimeout(()=>{v.current&&(v.current.focus(),v.current.setSelectionRange(ee,ee))},0),w({highlightedIndex:0,showingMore:!1,isVisible:k.type==="filter",cursorPosition:ee})},[I,M,t,f.cursorPosition,o,a,r,i,w]),x=h.useCallback(()=>{if(!v.current)return;const $=v.current.selectionStart||0,{context:k,token:B}=Xe(t,$);a(k),r(B),w(Q=>({...Q,isVisible:!ci(t,$),cursorPosition:$}))},[t,a,r,w]),L=h.useCallback($=>{const{key:k}=$;if(f.isVisible){const B=I.length;switch(k){case"Tab":case"ArrowDown":$.preventDefault(),w({highlightedIndex:(f.highlightedIndex+1)%B});return;case"ArrowUp":$.preventDefault(),w({highlightedIndex:f.highlightedIndex<=0?B-1:f.highlightedIndex-1});return;case"Enter":$.preventDefault(),f.highlightedIndex>=0?T(f.highlightedIndex):w({isVisible:!1});return;case"Escape":$.preventDefault(),w({isVisible:!1,highlightedIndex:-1});return}}(k==="ArrowLeft"||k==="ArrowRight"||k==="Home"||k==="End")&&setTimeout(x,0)},[f,I.length,w,T,x]),V=h.useCallback($=>{const{key:k}=$;(k==="ArrowLeft"||k==="ArrowRight"||k==="Home"||k==="End")&&x()},[x]),J=h.useCallback(()=>{w({isVisible:!0,highlightedIndex:0})},[w]),Z=h.useCallback($=>{var ee;const k=((ee=v.current)==null?void 0:ee.selectionStart)||$.length,{context:B,token:Q}=Xe($,k);a(B),r(Q),i($),w({highlightedIndex:0,isVisible:!ci($,k),showingMore:!1,cursorPosition:k})},[a,r,i,w]),pe=h.useCallback(()=>{setTimeout(x,0)},[x]),ue=h.useCallback(()=>{w({isVisible:!1,highlightedIndex:-1})},[w]),xe=h.useCallback($=>{w({highlightedIndex:$})},[w]);return h.useEffect(()=>(document.addEventListener("mousedown",j),()=>document.removeEventListener("mousedown",j)),[j]),c.jsxs("div",{className:U("p-query-input",e),"data-testid":"p-query-input",ref:p,...d,children:[c.jsx(q.SearchBox,{disabled:n,placeholder:u,value:t,externallyControlled:!0,autoComplete:"off",id:"query-input",name:"query-input",ref:v,onFocus:J,onChange:Z,onKeyDown:L,onKeyUp:V,onClear:ue,onClick:pe,"aria-disabled":n,"aria-expanded":f.isVisible,"aria-haspopup":"listbox","aria-owns":"query-suggestions"}),f.isVisible&&l.length>0&&c.jsx("ul",{className:"p-query-input__list",ref:m,id:"query-suggestions",role:"listbox","aria-label":"Search suggestions",children:s?c.jsx("div",{className:"p-query-input__loading",children:c.jsx(q.Spinner,{text:"Loading..."})}):I.map(($,k)=>c.jsxs("li",{className:U("p-query-input__item",{highlight:k===f.highlightedIndex}),onClick:()=>T(k),onKeyDown:()=>T(k),onMouseEnter:()=>xe(k),role:"option","aria-selected":k===f.highlightedIndex,tabIndex:-1,children:[c.jsxs("span",{className:"p-query-input__item-label",children:[c.jsx("span",{className:U({"u-text--muted":$.type==="more"}),children:$.value}),$.type==="filter"&&c.jsx("span",{className:"u-text--muted",children:":()"})]}),$.type!=="more"&&c.jsx("span",{className:"u-text--muted u-align-text--right",children:$.type})]},`${$.value}-${k}`))})]})},ar=({value:e,unit:n},{binary:t=!1,convertTo:i,decimals:o=2,roundFunc:a="round"}={})=>{const r=e<0,l=Math.abs(e);if(l===0)return{value:0,unit:i||"B"};const s=t?1024:1e3,u=t?["B","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"]:["B","KB","MB","GB","TB","PB","EB","ZB","YB"],d=u.findIndex(v=>v===n)||0,f=l*Math.pow(s,d),g=i?u.findIndex(v=>v===i):Math.floor(Math.log(f)/Math.log(s));let p=f/Math.pow(s,g);if(p%1!==0){const v=Math.pow(10,o);p=Math[a](p*v)/v}return{value:r?-p:p,unit:u[g]}};K.ContentSection=De,K.DynamicTable=bt,K.ExternalLink=wi,K.FileUpload=Hn,K.FileUploadContainer=oa,K.FormSection=ze,K.GenericTable=tr,K.InputGroup=ot,K.MainToolbar=at,K.Meter=Qt,K.MultiSelect=la,K.MultiSelectDropdown=Gn,K.Navigation=ae,K.NavigationBar=en,K.NestedFormGroup=Qi,K.Pagination=an,K.PaginationContainer=rn,K.Placeholder=Zt,K.ProgressIndicator=Jt,K.QueryInput=or,K.Stepper=Ji,K.TableCaption=St,K.defaultFilledColors=fi,K.formatBytes=ar,K.meterColor=ye,K.testIds=Ce,Object.defineProperty(K,Symbol.toStringTag,{value:"Module"})});
|
|
55
|
+
*/function ai(e,n){return e?Ga(e)?ce.createElement(e,n):e:null}function Ga(e){return Ba(e)||typeof e=="function"||Ua(e)}function Ba(e){return typeof e=="function"&&(()=>{const n=Object.getPrototypeOf(e);return n.prototype&&n.prototype.isReactComponent})()}function Ua(e){return typeof e=="object"&&typeof e.$$typeof=="symbol"&&["react.memo","react.forward_ref"].includes(e.$$typeof.description)}function Ka(e){const n={state:{},onStateChange:()=>{},renderFallbackValue:null,...e},[t]=ce.useState(()=>({current:za(n)})),[i,o]=ce.useState(()=>t.current.initialState);return t.current.setOptions(a=>({...a,...e,state:{...i,...e.state},onStateChange:r=>{o(r),e.onStateChange==null||e.onStateChange(r)}})),t.current}const ri=({header:e})=>{var n;return{asc:c.jsx(q.Icon,{name:"chevron-up",children:"ascending"}),desc:c.jsx(q.Icon,{name:"chevron-down",children:"descending"})}[(n=e==null?void 0:e.column)==null?void 0:n.getIsSorted()]??null},Wa=({header:e})=>{var o;const n=e.column.getCanSort(),t=(o=e.column.columnDef.meta)==null?void 0:o.isInteractiveHeader,i=ai(e.column.columnDef.header,e.getContext());return c.jsx("th",{className:U("p-column-header",e.column.id),children:n&&!t?c.jsx(q.Button,{appearance:"link",className:"p-button--column-header",onClick:e.column.getToggleSortingHandler(),type:"button",children:c.jsxs(c.Fragment,{children:[i,c.jsx(ri,{header:e})]})}):c.jsxs("span",{className:"p-container--column-header",children:[i,n&&!t&&c.jsx(ri,{header:e})]})},e.id)},Re=({children:e})=>c.jsx("section",{className:"controls-bar u-flex u-flex--justify-between u-flex--wrap",children:c.jsx("div",{className:"p-form p-form--inline",children:e})}),Ya=({children:e})=>c.jsx("strong",{className:"controls-bar__description",children:e}),Xa=({children:e})=>c.jsx("div",{className:"u-flex u-flex--wrap u-flex--column-x-small controls-bar__right",children:e});Re.Left=Ya,Re.Right=Xa;const Qa=({currentPage:e,itemsPerPage:n,totalItems:t,handlePageSizeChange:i,dataContext:o,setCurrentPage:a,isPending:r,pageSizes:l=[20,30,50,100]})=>{const s=w.useMemo(()=>l,[]),p=w.useMemo(()=>s.map(u=>({label:`${u}/page`,value:u})),[s]),d=Math.ceil(t/n),f=u=>{const{value:m}=u.target;i(Number(m))},g=()=>e===d?n-(d*n-t):e<d?n:0;return c.jsxs(Re,{children:[c.jsxs(Re.Left,{children:["Showing ",g()," out of ",t," ",o]}),c.jsxs(Re.Right,{children:[c.jsx(rn,{currentPage:e,disabled:r,paginate:a,totalPages:d}),c.jsx(q.Select,{"aria-label":"Items per page",className:"u-no-margin--bottom",name:"Items per page",onChange:f,options:p,value:n})]})]})},Ja=({table:e,...n})=>{if(!e)return null;const t=e.getCoreRowModel().rows.filter(o=>o.getCanSelect());let i;return e.getSelectedRowModel().rows.length===0?i="false":e.getSelectedRowModel().rows.length<t.length?i="mixed":i="true",c.jsxs("label",{className:"p-checkbox--inline p-table-checkbox--all",children:[c.jsx("input",{"aria-checked":i,"aria-label":"select all",className:"p-checkbox__input",disabled:t.length===0,type:"checkbox",checked:i==="true",onChange:()=>{const o=e.getCoreRowModel().rows.filter(r=>r.getCanSelect()),a=o.every(r=>r.getIsSelected());o.forEach(r=>r.toggleSelected(!a))},...n}),c.jsx("span",{className:"p-checkbox__label"})]})},Za=({row:e,...n})=>{if(!e)return null;const t=e.subRows.filter(r=>r.getCanSelect()),i=t.filter(r=>r.getIsSelected()).length,o=t.length>0&&i===t.length,a=i>0&&!o;return c.jsxs("label",{"aria-disabled":!e.getCanSelect(),className:"p-checkbox--inline p-table-checkbox--group",children:[c.jsx("input",{"aria-checked":a?"mixed":void 0,className:"p-checkbox__input",type:"checkbox",checked:o,disabled:!e.getCanSelect()&&t.length===0,onChange:()=>{const r=!o;t.forEach(l=>l.toggleSelected(r))},...n}),c.jsx("span",{className:"p-checkbox__label"})]})},Pe=({row:e,disabledTooltip:n,isNested:t=!1,...i})=>{if(!e)return null;const o=typeof n=="string"?n:n(e);return c.jsx(q.Tooltip,{message:!e.getCanSelect()&&o,position:"btm-right",children:c.jsxs("label",{"aria-disabled":!e.getCanSelect(),className:"p-checkbox--inline p-table-checkbox",children:[c.jsx("input",{className:"p-checkbox__input",type:"checkbox",checked:e.getIsSelected(),disabled:!e.getCanSelect()||t,onChange:e.getToggleSelectedHandler(),...i}),c.jsx("span",{className:"p-checkbox__label"})]})})};Pe.All=Ja,Pe.Group=Za;const er=({className:e,columns:n,containerRef:t,data:i,filterCells:o=()=>!0,filterHeaders:a=()=>!0,getSubRows:r,groupBy:l,isLoading:s,noData:p,pagination:d,pinGroup:f,sorting:g=[],selection:u,setSorting:m,showChevron:v=!1,variant:P="full-height",...h})=>{const O=w.useRef(null),[S,T]=w.useState("auto"),[x,L]=w.useState(!1),[V,J]=w.useState(l??[]),[Z,pe]=w.useState(g??[]),[ue,xe]=w.useState(!0),$=!!u,F=C=>{xe(D=>{const b=typeof C=="function"?C(D):C;if(b===!0)return!0;const E={...b};if(D!==!0)for(const I of Object.keys(D))I in E||(E[I]=!1);return E})};w.useEffect(()=>{V.length&&F(C=>{const b={...C===!0?{}:{...C}};for(const E of i){const I=V.map(A=>`${A}:${E[A]}`).join(">");I in b||(b[I]=!0)}return b})},[i,V]);const B=w.useMemo(()=>{let C=[...n];if(s)return C;if($){const D=[{id:"p-generic-table__select",accessorKey:"id",enableSorting:!1,header:({table:b})=>l?"":c.jsx(Pe.All,{table:b}),cell:({row:b})=>{const E=u.rowSelectionLabelKey&&u.rowSelectionLabelKey in b.original?`select ${b.original[u.rowSelectionLabelKey]}`:"select row";return b.getIsGrouped()?null:c.jsx(Pe,{"aria-label":E,disabledTooltip:u.disabledSelectionTooltip??"",isNested:r!==void 0&&!!b.parentId,row:b})}},...C];if(l){const b=E=>l[0]in E.original?`select ${E.original[l[0]]}`:"select group";C=[{id:"p-generic-table__group-select",accessorKey:"id",enableSorting:!1,header:({table:E})=>c.jsx(Pe.All,{table:E}),cell:({row:E})=>E.getIsGrouped()?c.jsx(Pe.Group,{"aria-label":b(E),row:E}):null},...D]}else C=D}return l&&v&&(C=[{id:"p-generic-table__group-chevron",accessorKey:"id",enableSorting:!1,header:"",cell:({row:b})=>{const E=b.getIsExpanded();return b.getIsGrouped()?c.jsx(q.Tooltip,{message:E?"Collapse":"Expand",position:"btm-right",children:c.jsx(q.Icon,{name:E?q.ICONS.chevronUp:q.ICONS.chevronDown})}):null}},...C]),C},[$,n,s,l,r]),Q=w.useMemo(()=>V.length?[...i].sort((C,D)=>{for(const b of V){const E=C[b]??null,I=D[b]??null;if(E===null)return 1;if(I===null||E<I)return-1;if(E>I)return 1}return 0}):i,[i,V]),ee=w.useMemo(()=>Q.length?[...Q].sort((C,D)=>{if(f!=null&&f.length&&V.length)for(const{value:b,isTop:E}of f){const I=V[0],A=C[I]??null,H=D[I]??null;if(A===b&&H!==b)return E?-1:1;if(H===b&&A!==b)return E?1:-1}for(const{id:b,desc:E}of Z){const I=C[b]??null,A=D[b]??null;if(I===null&&A===null)return 0;if(I===null)return E?-1:1;if(A===null||I<A)return E?1:-1;if(I>A)return E?-1:1}return 0}):[],[Q,Z,f,V]);w.useLayoutEffect(()=>{const C=()=>{const E=O.current;if(!E)return;const I=(t==null?void 0:t.current)||document.querySelector("main");if(!I)return;const A=I.getBoundingClientRect(),H=E.getBoundingClientRect(),N=A.bottom-H.top,ie=E.scrollHeight>N;L(ie),T(P==="full-height"&&ie?`${N}px`:"auto")};C();const D=new ResizeObserver(C),b=O.current;return b&&D.observe(b),window.addEventListener("resize",C),()=>{window.removeEventListener("resize",C),b&&D.unobserve(b)}},[t,ee.length,s]);const se=P==="full-height"&&x?"full-height":"regular",ne=Ka({data:ee,columns:B,state:{grouping:V,expanded:ue,sorting:Z,rowSelection:u==null?void 0:u.rowSelection},manualPagination:!0,autoResetExpanded:!1,onExpandedChange:F,onSortingChange:C=>{pe(C),m&&m(C)},onGroupingChange:J,onRowSelectionChange:u==null?void 0:u.setRowSelection,manualSorting:!0,enableSorting:!0,enableExpanding:!0,getSubRows:r,getExpandedRowModel:Na(),getCoreRowModel:Va(),getGroupedRowModel:Ha(),groupedColumnMode:!1,enableRowSelection:(u==null?void 0:u.filterSelectable)??$,enableMultiRowSelection:(u==null?void 0:u.filterSelectable)??$,getRowId:C=>C.id.toString()}),y=()=>c.jsx("tr",{children:c.jsx("td",{className:"p-generic-table__loading",colSpan:B.length,children:c.jsx(q.Spinner,{text:"Loading..."})})}),M=()=>ne.getRowModel().rows.length<1?c.jsx("tr",{children:c.jsx("td",{className:"p-generic-table__no-data",colSpan:B.length,children:p})}):ne.getRowModel().rows.map(C=>{const{getIsGrouped:D,id:b,getVisibleCells:E,parentId:I}=C,A=!D(),H=(u==null?void 0:u.rowSelection)!==void 0&&Object.keys(u.rowSelection).includes(b);return c.jsx("tr",{"aria-rowindex":parseInt(b.replace(/\D/g,"")||"0",10)+1,"aria-selected":H,className:U({"p-generic-table__individual-row":A,"p-generic-table__group-row":!A,"p-generic-table__nested-row":r!==void 0&&!!I}),onClick:()=>{A||C.toggleExpanded()},role:"row",children:E().filter(N=>!A&&(N.column.id==="p-generic-table__group-select"||N.column.id==="p-generic-table__group-chevron")?!0:o(C,N.column)).map(N=>c.jsx("td",{className:U(`${N.column.id}`),children:ai(N.column.columnDef.cell,N.getContext())},N.id))},b)});return c.jsxs("div",{className:U("p-generic-table",e),"data-testid":"p-generic-table",...h,children:[d&&c.jsx(Qa,{currentPage:d.currentPage,dataContext:d.dataContext,handlePageSizeChange:d.handlePageSizeChange,isPending:d.isPending,itemsPerPage:d.itemsPerPage,setCurrentPage:d.setCurrentPage,totalItems:d.totalItems,pageSizes:d.pageSizes}),c.jsxs("table",{"aria-busy":s,"aria-label":h["aria-label"],"aria-describedby":"generic-table-description","aria-rowcount":ee.length+1,className:U("p-generic-table__table",{"p-generic-table__is-full-height":se==="full-height","p-generic-table__is-selectable":$,"p-generic-table__is-grouped":l!==void 0}),role:"grid",children:[c.jsx("thead",{children:ne.getHeaderGroups().map(C=>c.jsx("tr",{role:"row",children:C.headers.filter(a).map((D,b)=>c.jsxs(w.Fragment,{children:[c.jsx(Wa,{header:D}),$&&l&&(!v&&b===2||v&&b===3)?c.jsx("th",{className:"p-generic-table__select-alignment",role:"columnheader"}):null]},D.id))},C.id))}),c.jsx("tbody",{ref:O,style:{overflowY:"auto",maxHeight:S},children:s?y():M()})]})]})},li={DEFAULT:4,EXPANDED:15},ve={OPEN_PAREN:"(",CLOSE_PAREN:")",EQUALS:"=",COLON:":",COMMA:","},Xe=(e,n=e.length)=>{const t=tr(e,n),{token:i,tokenStart:o,tokenEnd:a}=nr(e,n);return{context:t,token:i,tokenStart:o,tokenEnd:a}},tr=(e,n)=>{let t=0;for(let i=n-1;i>=0;i--){const o=e[i];if(o===ve.CLOSE_PAREN)t++;else if(o===ve.OPEN_PAREN){if(t===0){const r=e.slice(0,i).trimEnd().match(/([a-zA-Z0-9_-]+)\s*:\s*$/);return(r==null?void 0:r[1])||""}t--}}return""},nr=(e,n)=>{let t=n,i=n;for(;i<e.length&&/[^\s=(),]/.test(e[i]);)i++;for(;t>0&&/[^\s=(),]/.test(e[t-1]);)t--;return{token:e.slice(t,i),tokenStart:t,tokenEnd:i}},si=(e,n)=>{const t=e.charAt(n-1);return n>0&&(t===ve.CLOSE_PAREN||t===ve.COMMA)},ir=({className:e,disabled:n=!1,search:t,setSearch:i,context:o,setContext:a,setToken:r,suggestions:l,isLoading:s=!1,placeholder:p,...d})=>{const[f,g]=w.useState({isVisible:!1,highlightedIndex:-1,showingMore:!1,cursorPosition:0}),u=w.useRef(null),m=w.useRef(null),v=w.useRef(null),P=w.useMemo(()=>{const $=f.showingMore?li.EXPANDED:li.DEFAULT,F=l.slice(0,$);return!f.showingMore&&l.length>$?[...F,{value:"Show more...",type:"more"}]:F},[l,f.showingMore]),h=w.useCallback($=>{g(typeof $=="function"?F=>({...F,...$(F)}):F=>({...F,...$}))},[]),O=w.useCallback($=>{u.current&&!u.current.contains($.target)&&h({isVisible:!1,highlightedIndex:-1})},[h]),S=w.useCallback(($,F)=>{const{tokenStart:B,tokenEnd:Q}=F;if($.type==="filter"){const se=$.value+ve.COLON+ve.OPEN_PAREN;return t.slice(0,B)+se+t.slice(Q)}if(o.length===0){const se=$.type+ve.COLON+ve.OPEN_PAREN+ve.EQUALS+$.value;return t.slice(0,B)+se+t.slice(Q)}const ee=t.charAt(B-1)===ve.EQUALS?$.value:ve.EQUALS+$.value;return t.slice(0,B)+ee+t.slice(Q)},[t,o]),T=w.useCallback($=>{const F=P[$];if(!F)return;if(F.type==="more"){h({showingMore:!0});return}const B=Xe(t,f.cursorPosition),Q=S(F,B),ee=B.tokenStart+(F.type==="filter"?F.value.length+2:o.length===0?F.type.length+F.value.length+3:F.value.length+1),{context:se,token:ne}=Xe(Q,ee);a(se),r(ne),i(Q),setTimeout(()=>{v.current&&(v.current.focus(),v.current.setSelectionRange(ee,ee))},0),h({highlightedIndex:0,showingMore:!1,isVisible:F.type==="filter",cursorPosition:ee})},[P,S,t,f.cursorPosition,o,a,r,i,h]),x=w.useCallback(()=>{if(!v.current)return;const $=v.current.selectionStart||0,{context:F,token:B}=Xe(t,$);a(F),r(B),h(Q=>({...Q,isVisible:!si(t,$),cursorPosition:$}))},[t,a,r,h]),L=w.useCallback($=>{const{key:F}=$;if(f.isVisible){const B=P.length;switch(F){case"Tab":case"ArrowDown":$.preventDefault(),h({highlightedIndex:(f.highlightedIndex+1)%B});return;case"ArrowUp":$.preventDefault(),h({highlightedIndex:f.highlightedIndex<=0?B-1:f.highlightedIndex-1});return;case"Enter":$.preventDefault(),f.highlightedIndex>=0?T(f.highlightedIndex):h({isVisible:!1});return;case"Escape":$.preventDefault(),h({isVisible:!1,highlightedIndex:-1});return}}(F==="ArrowLeft"||F==="ArrowRight"||F==="Home"||F==="End")&&setTimeout(x,0)},[f,P.length,h,T,x]),V=w.useCallback($=>{const{key:F}=$;(F==="ArrowLeft"||F==="ArrowRight"||F==="Home"||F==="End")&&x()},[x]),J=w.useCallback(()=>{h({isVisible:!0,highlightedIndex:0})},[h]),Z=w.useCallback($=>{var ee;const F=((ee=v.current)==null?void 0:ee.selectionStart)||$.length,{context:B,token:Q}=Xe($,F);a(B),r(Q),i($),h({highlightedIndex:0,isVisible:!si($,F),showingMore:!1,cursorPosition:F})},[a,r,i,h]),pe=w.useCallback(()=>{setTimeout(x,0)},[x]),ue=w.useCallback(()=>{h({isVisible:!1,highlightedIndex:-1})},[h]),xe=w.useCallback($=>{h({highlightedIndex:$})},[h]);return w.useEffect(()=>(document.addEventListener("mousedown",O),()=>document.removeEventListener("mousedown",O)),[O]),c.jsxs("div",{className:U("p-query-input",e),"data-testid":"p-query-input",ref:u,...d,children:[c.jsx(q.SearchBox,{disabled:n,placeholder:p,value:t,externallyControlled:!0,autoComplete:"off",id:"query-input",name:"query-input",ref:v,onFocus:J,onChange:Z,onKeyDown:L,onKeyUp:V,onClear:ue,onClick:pe,"aria-disabled":n,"aria-expanded":f.isVisible,"aria-haspopup":"listbox","aria-owns":"query-suggestions"}),f.isVisible&&l.length>0&&c.jsx("ul",{className:"p-query-input__list",ref:m,id:"query-suggestions",role:"listbox","aria-label":"Search suggestions",children:s?c.jsx("div",{className:"p-query-input__loading",children:c.jsx(q.Spinner,{text:"Loading..."})}):P.map(($,F)=>c.jsxs("li",{className:U("p-query-input__item",{highlight:F===f.highlightedIndex}),onClick:()=>T(F),onKeyDown:()=>T(F),onMouseEnter:()=>xe(F),role:"option","aria-selected":F===f.highlightedIndex,tabIndex:-1,children:[c.jsxs("span",{className:"p-query-input__item-label",children:[c.jsx("span",{className:U({"u-text--muted":$.type==="more"}),children:$.value}),$.type==="filter"&&c.jsx("span",{className:"u-text--muted",children:":()"})]}),$.type!=="more"&&c.jsx("span",{className:"u-text--muted u-align-text--right",children:$.type})]},`${$.value}-${F}`))})]})},or=({value:e,unit:n},{binary:t=!1,convertTo:i,decimals:o=2,roundFunc:a="round"}={})=>{const r=e<0,l=Math.abs(e);if(l===0)return{value:0,unit:i||"B"};const s=t?1024:1e3,p=t?["B","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"]:["B","KB","MB","GB","TB","PB","EB","ZB","YB"],d=p.findIndex(v=>v===n)||0,f=l*Math.pow(s,d),g=i?p.findIndex(v=>v===i):Math.floor(Math.log(f)/Math.log(s));let u=f/Math.pow(s,g);if(u%1!==0){const v=Math.pow(10,o);u=Math[a](u*v)/v}return{value:r?-u:u,unit:p[g]}};K.ContentSection=De,K.DynamicTable=bt,K.ExternalLink=hi,K.FileUpload=ia,K.FormSection=ze,K.GenericTable=er,K.InputGroup=ot,K.MainToolbar=at,K.Meter=Qt,K.MultiSelect=ra,K.MultiSelectDropdown=qn,K.Navigation=ae,K.NavigationBar=en,K.NestedFormGroup=Xi,K.Pagination=an,K.PaginationContainer=rn,K.Placeholder=Zt,K.ProgressIndicator=Jt,K.QueryInput=ir,K.Stepper=Qi,K.TableCaption=St,K.defaultFilledColors=gi,K.formatBytes=or,K.meterColor=ye,K.testIds=Ce,Object.defineProperty(K,Symbol.toStringTag,{value:"Module"})});
|