@perses-dev/table-plugin 0.13.0 → 0.14.0-beta.1
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/__mf/js/{Table.73b9cec1.js → Table.646f97de.js} +3 -3
- package/__mf/js/async/11.976870d0.js +7 -0
- package/__mf/js/async/11.976870d0.js.LICENSE.txt +102 -0
- package/__mf/js/async/121.b3a4c6cf.js +2 -0
- package/__mf/js/async/153.fa68a9e4.js +1 -0
- package/__mf/js/async/186.ab1e0cb3.js +2 -0
- package/__mf/js/async/192.942516a2.js +1 -0
- package/__mf/js/async/2.6b27d33f.js +1 -0
- package/__mf/js/async/235.c5bac291.js +1 -0
- package/__mf/js/async/274.f7dabfa6.js +2 -0
- package/__mf/js/async/321.96f362a6.js +1 -0
- package/__mf/js/async/35.ba7c1b06.js +1 -0
- package/__mf/js/async/356.d7fe5d24.js +1 -0
- package/__mf/js/async/392.e853a818.js +2 -0
- package/__mf/js/async/413.d44db4b1.js +1 -0
- package/__mf/js/async/465.8425c17a.js +1 -0
- package/__mf/js/async/470.21434f20.js +2 -0
- package/__mf/js/async/522.d6a7c203.js +22 -0
- package/__mf/js/async/534.aff242e9.js +1 -0
- package/__mf/js/async/54.e77ec040.js +1 -0
- package/__mf/js/async/587.0ff26337.js +1 -0
- package/__mf/js/async/616.4e891cf9.js +1 -0
- package/__mf/js/async/663.b3778d4c.js +1 -0
- package/__mf/js/async/700.ccacc909.js +3 -0
- package/__mf/js/async/{868.507e984c.js → 741.7feaa0ba.js} +6 -6
- package/__mf/js/async/862.4c658639.js +2 -0
- package/__mf/js/async/865.b9eb3de4.js +1 -0
- package/__mf/js/async/923.87e55609.js +1 -0
- package/__mf/js/async/941.08c16cb2.js +2 -0
- package/__mf/js/async/968.b7fe9818.js +1 -0
- package/__mf/js/async/985.6129a36c.js +37 -0
- package/__mf/js/async/__federation_expose_Table.f8d0feb7.js +1 -0
- package/__mf/js/async/lib-router.020a2a16.js +2 -0
- package/__mf/js/{main.7b15c841.js → main.276cd542.js} +2 -2
- package/lib/Table.d.ts +3 -3
- package/lib/Table.d.ts.map +1 -1
- package/lib/Table.js +4 -4
- package/lib/Table.js.map +1 -1
- package/lib/TableExportAction.d.ts +3 -3
- package/lib/TableExportAction.d.ts.map +1 -1
- package/lib/TableExportAction.js +6 -6
- package/lib/TableExportAction.js.map +1 -1
- package/lib/bootstrap.js +2 -2
- package/lib/components/CellsEditor/CellsEditor.d.ts +2 -2
- package/lib/components/CellsEditor/CellsEditor.d.ts.map +1 -1
- package/lib/components/CellsEditor/CellsEditor.js +1 -1
- package/lib/components/CellsEditor/CellsEditor.js.map +1 -1
- package/lib/components/CellsEditor/index.js +1 -1
- package/lib/components/CellsEditor/index.js.map +1 -1
- package/lib/components/ColumnsEditor/ColumnEditor.d.ts +5 -4
- package/lib/components/ColumnsEditor/ColumnEditor.d.ts.map +1 -1
- package/lib/components/ColumnsEditor/ColumnEditor.js +29 -15
- package/lib/components/ColumnsEditor/ColumnEditor.js.map +1 -1
- package/lib/components/ColumnsEditor/ColumnEditorContainer.d.ts +3 -3
- package/lib/components/ColumnsEditor/ColumnEditorContainer.d.ts.map +1 -1
- package/lib/components/ColumnsEditor/ColumnEditorContainer.js +11 -10
- package/lib/components/ColumnsEditor/ColumnEditorContainer.js.map +1 -1
- package/lib/components/ColumnsEditor/ColumnsEditor.d.ts +4 -3
- package/lib/components/ColumnsEditor/ColumnsEditor.d.ts.map +1 -1
- package/lib/components/ColumnsEditor/ColumnsEditor.js +7 -6
- package/lib/components/ColumnsEditor/ColumnsEditor.js.map +1 -1
- package/lib/components/ColumnsEditor/DataLinkEditorDialog.d.ts +2 -2
- package/lib/components/ColumnsEditor/DataLinkEditorDialog.d.ts.map +1 -1
- package/lib/components/ColumnsEditor/DataLinkEditorDialog.js +4 -4
- package/lib/components/ColumnsEditor/DataLinkEditorDialog.js.map +1 -1
- package/lib/components/ColumnsEditor/EmbeddedPanelOptionsEditor.d.ts +2 -2
- package/lib/components/ColumnsEditor/EmbeddedPanelOptionsEditor.d.ts.map +1 -1
- package/lib/components/ColumnsEditor/EmbeddedPanelOptionsEditor.js +4 -4
- package/lib/components/ColumnsEditor/EmbeddedPanelOptionsEditor.js.map +1 -1
- package/lib/components/ColumnsEditor/index.js +3 -3
- package/lib/components/ColumnsEditor/index.js.map +1 -1
- package/lib/components/ConditionalPanel.d.ts +3 -3
- package/lib/components/ConditionalPanel.d.ts.map +1 -1
- package/lib/components/ConditionalPanel.js +7 -7
- package/lib/components/ConditionalPanel.js.map +1 -1
- package/lib/components/EmbeddedPanel.d.ts +3 -3
- package/lib/components/EmbeddedPanel.d.ts.map +1 -1
- package/lib/components/EmbeddedPanel.js +4 -4
- package/lib/components/EmbeddedPanel.js.map +1 -1
- package/lib/components/TableCellsEditor.d.ts +3 -3
- package/lib/components/TableCellsEditor.d.ts.map +1 -1
- package/lib/components/TableCellsEditor.js +1 -1
- package/lib/components/TableCellsEditor.js.map +1 -1
- package/lib/components/TableColumnsEditor.d.ts +3 -3
- package/lib/components/TableColumnsEditor.d.ts.map +1 -1
- package/lib/components/TableColumnsEditor.js +3 -2
- package/lib/components/TableColumnsEditor.js.map +1 -1
- package/lib/components/TableItemSelectionActionsEditor.d.ts +2 -2
- package/lib/components/TableItemSelectionActionsEditor.d.ts.map +1 -1
- package/lib/components/TableItemSelectionActionsEditor.js +2 -2
- package/lib/components/TableItemSelectionActionsEditor.js.map +1 -1
- package/lib/components/TablePanel.d.ts +4 -4
- package/lib/components/TablePanel.d.ts.map +1 -1
- package/lib/components/TablePanel.js +196 -99
- package/lib/components/TablePanel.js.map +1 -1
- package/lib/components/TableSettingsEditor.d.ts +2 -2
- package/lib/components/TableSettingsEditor.d.ts.map +1 -1
- package/lib/components/TableSettingsEditor.js +16 -2
- package/lib/components/TableSettingsEditor.js.map +1 -1
- package/lib/components/TableTransformsEditor.d.ts +2 -2
- package/lib/components/TableTransformsEditor.d.ts.map +1 -1
- package/lib/components/TableTransformsEditor.js +2 -2
- package/lib/components/TableTransformsEditor.js.map +1 -1
- package/lib/components/index.js +9 -9
- package/lib/components/index.js.map +1 -1
- package/lib/getPluginModule.d.ts +1 -1
- package/lib/getPluginModule.d.ts.map +1 -1
- package/lib/getPluginModule.js +3 -1
- package/lib/getPluginModule.js.map +1 -1
- package/lib/index-federation.js +1 -1
- package/lib/index.js +4 -4
- package/lib/index.js.map +1 -1
- package/lib/models/index.js +2 -2
- package/lib/models/index.js.map +1 -1
- package/lib/models/model.d.ts +1 -1
- package/lib/models/model.d.ts.map +1 -1
- package/lib/models/model.js.map +1 -1
- package/lib/models/table-model.d.ts +4 -3
- package/lib/models/table-model.d.ts.map +1 -1
- package/lib/models/table-model.js +2 -2
- package/lib/models/table-model.js.map +1 -1
- package/lib/setup-tests.d.ts +1 -1
- package/lib/setup-tests.d.ts.map +1 -1
- package/lib/setup-tests.js +8 -2
- package/lib/setup-tests.js.map +1 -1
- package/lib/table-data-utils.d.ts +3 -3
- package/lib/table-data-utils.d.ts.map +1 -1
- package/lib/table-data-utils.js.map +1 -1
- package/lib/test/mock-query-results.d.ts +1 -1
- package/lib/test/mock-query-results.d.ts.map +1 -1
- package/lib/test/mock-query-results.js.map +1 -1
- package/mf-manifest.json +42 -84
- package/mf-stats.json +46 -93
- package/package.json +11 -11
- package/__mf/js/async/1432.4e515509.js +0 -1
- package/__mf/js/async/1589.124ce93d.js +0 -2
- package/__mf/js/async/1589.124ce93d.js.LICENSE.txt +0 -37
- package/__mf/js/async/1616.4828085d.js +0 -1
- package/__mf/js/async/2043.1f09864b.js +0 -2
- package/__mf/js/async/2043.1f09864b.js.LICENSE.txt +0 -24
- package/__mf/js/async/2082.231e8397.js +0 -1
- package/__mf/js/async/2842.a52597e6.js +0 -1
- package/__mf/js/async/392.b6035b41.js +0 -2
- package/__mf/js/async/3981.52e94742.js +0 -3
- package/__mf/js/async/4014.cf88a118.js +0 -7
- package/__mf/js/async/4014.cf88a118.js.LICENSE.txt +0 -39
- package/__mf/js/async/4121.e7df36d6.js +0 -2
- package/__mf/js/async/5002.3eb39a8c.js +0 -1
- package/__mf/js/async/5021.c663603d.js +0 -1
- package/__mf/js/async/5071.839a8f1a.js +0 -1
- package/__mf/js/async/5481.6496fac9.js +0 -2
- package/__mf/js/async/5587.a8a428db.js +0 -1
- package/__mf/js/async/6274.8edae86d.js +0 -2
- package/__mf/js/async/629.8cff215d.js +0 -1
- package/__mf/js/async/6811.9d4b123a.js +0 -38
- package/__mf/js/async/7177.e0e5ba2f.js +0 -1
- package/__mf/js/async/7192.692181c8.js +0 -1
- package/__mf/js/async/7413.c9310b8a.js +0 -1
- package/__mf/js/async/7968.3a9a982e.js +0 -1
- package/__mf/js/async/7978.116e4d81.js +0 -1
- package/__mf/js/async/7984.a8edc213.js +0 -22
- package/__mf/js/async/8356.152d5686.js +0 -1
- package/__mf/js/async/8470.b9762117.js +0 -2
- package/__mf/js/async/873.264fedc9.js +0 -1
- package/__mf/js/async/9051.c4deebd7.js +0 -1
- package/__mf/js/async/9235.c67cdb1d.js +0 -1
- package/__mf/js/async/941.cc458a98.js +0 -2
- package/__mf/js/async/9588.d23e2ed3.js +0 -1
- package/__mf/js/async/9701.9c4cea02.js +0 -1
- package/__mf/js/async/__federation_expose_Table.5d0cfb46.js +0 -1
- package/__mf/js/async/lib-router.3493bbf9.js +0 -2
- package/lib/cjs/Table.js +0 -62
- package/lib/cjs/TableExportAction.js +0 -180
- package/lib/cjs/bootstrap.js +0 -26
- package/lib/cjs/components/CellsEditor/CellsEditor.js +0 -30
- package/lib/cjs/components/CellsEditor/index.js +0 -30
- package/lib/cjs/components/ColumnsEditor/ColumnEditor.js +0 -289
- package/lib/cjs/components/ColumnsEditor/ColumnEditorContainer.js +0 -152
- package/lib/cjs/components/ColumnsEditor/ColumnsEditor.js +0 -108
- package/lib/cjs/components/ColumnsEditor/DataLinkEditorDialog.js +0 -139
- package/lib/cjs/components/ColumnsEditor/EmbeddedPanelOptionsEditor.js +0 -124
- package/lib/cjs/components/ColumnsEditor/index.js +0 -32
- package/lib/cjs/components/ConditionalPanel.js +0 -367
- package/lib/cjs/components/EmbeddedPanel.js +0 -52
- package/lib/cjs/components/TableCellsEditor.js +0 -36
- package/lib/cjs/components/TableColumnsEditor.js +0 -36
- package/lib/cjs/components/TableItemSelectionActionsEditor.js +0 -44
- package/lib/cjs/components/TablePanel.js +0 -845
- package/lib/cjs/components/TableSettingsEditor.js +0 -144
- package/lib/cjs/components/TableTransformsEditor.js +0 -36
- package/lib/cjs/components/index.js +0 -38
- package/lib/cjs/env.d.js +0 -14
- package/lib/cjs/getPluginModule.js +0 -39
- package/lib/cjs/index-federation.js +0 -55
- package/lib/cjs/index.js +0 -39
- package/lib/cjs/models/index.js +0 -31
- package/lib/cjs/models/model.js +0 -16
- package/lib/cjs/models/table-model.js +0 -278
- package/lib/cjs/setup-tests.js +0 -19
- package/lib/cjs/table-data-utils.js +0 -84
- package/lib/cjs/test/mock-query-results.js +0 -524
- /package/__mf/css/async/{4014.85c2cbf6.css → 11.85c2cbf6.css} +0 -0
- /package/__mf/js/async/{4121.e7df36d6.js.LICENSE.txt → 121.b3a4c6cf.js.LICENSE.txt} +0 -0
- /package/__mf/js/async/{6274.8edae86d.js.LICENSE.txt → 274.f7dabfa6.js.LICENSE.txt} +0 -0
- /package/__mf/js/async/{392.b6035b41.js.LICENSE.txt → 392.e853a818.js.LICENSE.txt} +0 -0
- /package/__mf/js/async/{8470.b9762117.js.LICENSE.txt → 470.21434f20.js.LICENSE.txt} +0 -0
- /package/__mf/js/async/{7984.a8edc213.js.LICENSE.txt → 522.d6a7c203.js.LICENSE.txt} +0 -0
- /package/__mf/js/async/{868.507e984c.js.LICENSE.txt → 741.7feaa0ba.js.LICENSE.txt} +0 -0
- /package/__mf/js/async/{5481.6496fac9.js.LICENSE.txt → 862.4c658639.js.LICENSE.txt} +0 -0
- /package/__mf/js/async/{941.cc458a98.js.LICENSE.txt → 941.08c16cb2.js.LICENSE.txt} +0 -0
- /package/__mf/js/async/{lib-router.3493bbf9.js.LICENSE.txt → lib-router.020a2a16.js.LICENSE.txt} +0 -0
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/*! For license information please see 862.4c658639.js.LICENSE.txt */
|
|
2
|
+
"use strict";(self.chunk_Table_0_14_0_beta_1=self.chunk_Table_0_14_0_beta_1||[]).push([["862"],{32473(t,e,s){var r=s(70451),i="function"==typeof Object.is?Object.is:function(t,e){return t===e&&(0!==t||1/t==1/e)||t!=t&&e!=e},n=r.useState,u=r.useEffect,a=r.useLayoutEffect,o=r.useDebugValue;function l(t){var e=t.getSnapshot;t=t.value;try{var s=e();return!i(t,s)}catch(t){return!0}}var h="u"<typeof window||void 0===window.document||void 0===window.document.createElement?function(t,e){return e()}:function(t,e){var s=e(),r=n({inst:{value:s,getSnapshot:e}}),i=r[0].inst,h=r[1];return a(function(){i.value=s,i.getSnapshot=e,l(i)&&h({inst:i})},[t,s,e]),u(function(){return l(i)&&h({inst:i}),t(function(){l(i)&&h({inst:i})})},[t]),o(s),s};e.useSyncExternalStore=void 0!==r.useSyncExternalStore?r.useSyncExternalStore:h},43676(t,e,s){t.exports=s(32473)},76693(t,e,s){let r,i,n,u,a,o;s.r(e),s.d(e,{isError:()=>x,useQueryErrorResetBoundary:()=>tQ,IsRestoringProvider:()=>tC,dehydrate:()=>th,isServer:()=>h,parseFilterArgs:()=>m,parseMutationFilterArgs:()=>b,queryOptions:()=>tj,infiniteQueryOptions:()=>tH,useSuspenseQuery:()=>tK,QueriesObserver:()=>tn,defaultContext:()=>tp,QueryClient:()=>$,Query:()=>G,Hydrate:()=>tB,useInfiniteQuery:()=>tV,useIsMutating:()=>tG,CancelledError:()=>L,usePrefetchQuery:()=>tX,useQueryClient:()=>tm,isCancelledError:()=>j,matchQuery:()=>g,MutationCache:()=>V,MutationObserver:()=>ta,defaultShouldDehydrateQuery:()=>tl,mutationOptions:()=>tz,notifyManager:()=>B,QueryCache:()=>z,useQueries:()=>tI,parseQueryArgs:()=>y,replaceEqualDeep:()=>Q,defaultShouldDehydrateMutation:()=>to,hydrate:()=>tc,useHydrate:()=>t_,useQuery:()=>tU,onlineManager:()=>U,InfiniteQueryObserver:()=>tu,QueryClientProvider:()=>tb,hashQueryKey:()=>R,QueryObserver:()=>tt,useIsRestoring:()=>tO,useSuspenseInfiniteQuery:()=>tk,useSuspenseQueries:()=>tL,parseMutationArgs:()=>v,focusManager:()=>I,useIsFetching:()=>tN,useMutation:()=>tW,usePrefetchInfiniteQuery:()=>tY,QueryErrorResetBoundary:()=>tE});class l{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(t){let e={listener:t};return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}}let h="u"<typeof window||"Deno"in window;function c(){}function d(t){return"number"==typeof t&&t>=0&&t!==1/0}function f(t,e){return t.filter(t=>!e.includes(t))}function p(t,e){return Math.max(t+(e||0)-Date.now(),0)}function y(t,e,s){return M(t)?"function"==typeof e?{...s,queryKey:t,queryFn:e}:{...e,queryKey:t}:t}function v(t,e,s){return M(t)?"function"==typeof e?{...s,mutationKey:t,mutationFn:e}:{...e,mutationKey:t}:"function"==typeof t?{...e,mutationFn:t}:{...t}}function m(t,e,s){return M(t)?[{...e,queryKey:t},s]:[t||{},e]}function b(t,e,s){return M(t)?[{...e,mutationKey:t},s]:[t||{},e]}function g(t,e){let{type:s="all",exact:r,fetchStatus:i,predicate:n,queryKey:u,stale:a}=t;if(M(u))if(r){if(e.queryHash!==C(u,e.options))return!1}else{var o;if(o=e.queryKey,!S(o,u))return!1}if("all"!==s){let t=e.isActive();if("active"===s&&!t||"inactive"===s&&t)return!1}return("boolean"!=typeof a||e.isStale()===a)&&(void 0===i||i===e.state.fetchStatus)&&(!n||!!n(e))}function O(t,e){let{exact:s,fetching:r,predicate:i,mutationKey:n}=t;if(M(n)){if(!e.options.mutationKey)return!1;if(s){if(R(e.options.mutationKey)!==R(n))return!1}else{var u;if(u=e.options.mutationKey,!S(u,n))return!1}}return("boolean"!=typeof r||"loading"===e.state.status===r)&&(!i||!!i(e))}function C(t,e){return((null==e?void 0:e.queryKeyHashFn)||R)(t)}function R(t){return JSON.stringify(t,(t,e)=>w(e)?Object.keys(e).sort().reduce((t,s)=>(t[s]=e[s],t),{}):e)}function S(t,e){return t===e||typeof t==typeof e&&!!t&&!!e&&"object"==typeof t&&"object"==typeof e&&!Object.keys(e).some(s=>!S(t[s],e[s]))}function Q(t,e,s=0){if(t===e)return t;if(s>500)return e;let r=q(t)&&q(e);if(r||w(t)&&w(e)){let i=r?t.length:Object.keys(t).length,n=r?e:Object.keys(e),u=n.length,a=r?[]:{},o=0;for(let i=0;i<u;i++){let u=r?i:n[i];a[u]=Q(t[u],e[u],s+1),a[u]===t[u]&&o++}return i===u&&o===i?t:a}return e}function E(t,e){if(t&&!e||e&&!t)return!1;for(let s in t)if(t[s]!==e[s])return!1;return!0}function q(t){return Array.isArray(t)&&t.length===Object.keys(t).length}function w(t){if(!P(t))return!1;let e=t.constructor;if(void 0===e)return!0;let s=e.prototype;return!!P(s)&&!!s.hasOwnProperty("isPrototypeOf")}function P(t){return"[object Object]"===Object.prototype.toString.call(t)}function M(t){return Array.isArray(t)}function x(t){return t instanceof Error}function F(t){return new Promise(e=>{setTimeout(e,t)})}function D(t){F(0).then(t)}function A(t,e,s){return null!=s.isDataEqual&&s.isDataEqual(t,e)?t:"function"==typeof s.structuralSharing?s.structuralSharing(t,e):!1!==s.structuralSharing?Q(t,e):e}let I=new class extends l{constructor(){super(),this.setup=t=>{if(!h&&window.addEventListener){let e=()=>t();return window.addEventListener("visibilitychange",e,!1),window.addEventListener("focus",e,!1),()=>{window.removeEventListener("visibilitychange",e),window.removeEventListener("focus",e)}}}}onSubscribe(){this.cleanup||this.setEventListener(this.setup)}onUnsubscribe(){if(!this.hasListeners()){var t;null==(t=this.cleanup)||t.call(this),this.cleanup=void 0}}setEventListener(t){var e;this.setup=t,null==(e=this.cleanup)||e.call(this),this.cleanup=t(t=>{"boolean"==typeof t?this.setFocused(t):this.onFocus()})}setFocused(t){this.focused!==t&&(this.focused=t,this.onFocus())}onFocus(){this.listeners.forEach(({listener:t})=>{t()})}isFocused(){return"boolean"==typeof this.focused?this.focused:"u"<typeof document||[void 0,"visible","prerender"].includes(document.visibilityState)}},T=["online","offline"],U=new class extends l{constructor(){super(),this.setup=t=>{if(!h&&window.addEventListener){let e=()=>t();return T.forEach(t=>{window.addEventListener(t,e,!1)}),()=>{T.forEach(t=>{window.removeEventListener(t,e)})}}}}onSubscribe(){this.cleanup||this.setEventListener(this.setup)}onUnsubscribe(){if(!this.hasListeners()){var t;null==(t=this.cleanup)||t.call(this),this.cleanup=void 0}}setEventListener(t){var e;this.setup=t,null==(e=this.cleanup)||e.call(this),this.cleanup=t(t=>{"boolean"==typeof t?this.setOnline(t):this.onOnline()})}setOnline(t){this.online!==t&&(this.online=t,this.onOnline())}onOnline(){this.listeners.forEach(({listener:t})=>{t()})}isOnline(){return"boolean"==typeof this.online?this.online:"u"<typeof navigator||void 0===navigator.onLine||navigator.onLine}};function K(t){return Math.min(1e3*2**t,3e4)}function k(t){return(null!=t?t:"online")!=="online"||U.isOnline()}class L{constructor(t){this.revert=null==t?void 0:t.revert,this.silent=null==t?void 0:t.silent}}function j(t){return t instanceof L}function H(t){let e,s,r,i=!1,n=0,u=!1,a=new Promise((t,e)=>{s=t,r=e}),o=()=>!I.isFocused()||"always"!==t.networkMode&&!U.isOnline(),l=r=>{u||(u=!0,null==t.onSuccess||t.onSuccess(r),null==e||e(),s(r))},h=s=>{u||(u=!0,null==t.onError||t.onError(s),null==e||e(),r(s))},c=()=>new Promise(s=>{e=t=>{let e=u||!o();return e&&s(t),e},null==t.onPause||t.onPause()}).then(()=>{e=void 0,u||null==t.onContinue||t.onContinue()}),d=()=>{let e;if(!u){try{e=t.fn()}catch(t){e=Promise.reject(t)}Promise.resolve(e).then(l).catch(e=>{var s,r;if(u)return;let a=null!=(s=t.retry)?s:3,l=null!=(r=t.retryDelay)?r:K,f="function"==typeof l?l(n,e):l,p=!0===a||"number"==typeof a&&n<a||"function"==typeof a&&a(n,e);i||!p?h(e):(n++,null==t.onFail||t.onFail(n,e),F(f).then(()=>{if(o())return c()}).then(()=>{i?h(e):d()}))})}};return k(t.networkMode)?d():c().then(d),{promise:a,cancel:e=>{u||(h(new L(e)),null==t.abort||t.abort())},continue:()=>(null==e?void 0:e())?a:Promise.resolve(),cancelRetry:()=>{i=!0},continueRetry:()=>{i=!1}}}let _=console,B=(r=[],i=0,n=t=>{t()},u=t=>{t()},a=t=>{i?r.push(t):D(()=>{n(t)})},o=()=>{let t=r;r=[],t.length&&D(()=>{u(()=>{t.forEach(t=>{n(t)})})})},{batch:t=>{let e;i++;try{e=t()}finally{--i||o()}return e},batchCalls:t=>(...e)=>{a(()=>{t(...e)})},schedule:a,setNotifyFunction:t=>{n=t},setBatchNotifyFunction:t=>{u=t}});class N{destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),d(this.cacheTime)&&(this.gcTimeout=setTimeout(()=>{this.optionalRemove()},this.cacheTime))}updateCacheTime(t){this.cacheTime=Math.max(this.cacheTime||0,null!=t?t:h?1/0:3e5)}clearGcTimeout(){this.gcTimeout&&(clearTimeout(this.gcTimeout),this.gcTimeout=void 0)}}class G extends N{constructor(t){super(),this.abortSignalConsumed=!1,this.defaultOptions=t.defaultOptions,this.setOptions(t.options),this.observers=[],this.cache=t.cache,this.logger=t.logger||_,this.queryKey=t.queryKey,this.queryHash=t.queryHash,this.initialState=t.state||function(t){let e="function"==typeof t.initialData?t.initialData():t.initialData,s=void 0!==e,r=s?"function"==typeof t.initialDataUpdatedAt?t.initialDataUpdatedAt():t.initialDataUpdatedAt:0;return{data:e,dataUpdateCount:0,dataUpdatedAt:s?null!=r?r:Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:s?"success":"loading",fetchStatus:"idle"}}(this.options),this.state=this.initialState,this.scheduleGc()}get meta(){return this.options.meta}setOptions(t){this.options={...this.defaultOptions,...t},this.updateCacheTime(this.options.cacheTime)}optionalRemove(){this.observers.length||"idle"!==this.state.fetchStatus||this.cache.remove(this)}setData(t,e){let s=A(this.state.data,t,this.options);return this.dispatch({data:s,type:"success",dataUpdatedAt:null==e?void 0:e.updatedAt,manual:null==e?void 0:e.manual}),s}setState(t,e){this.dispatch({type:"setState",state:t,setStateOptions:e})}cancel(t){var e;let s=this.promise;return null==(e=this.retryer)||e.cancel(t),s?s.then(c).catch(c):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(this.initialState)}isActive(){return this.observers.some(t=>!1!==t.options.enabled)}isDisabled(){return this.getObserversCount()>0&&!this.isActive()}isStale(){return this.state.isInvalidated||!this.state.dataUpdatedAt||this.observers.some(t=>t.getCurrentResult().isStale)}isStaleByTime(t=0){return this.state.isInvalidated||!this.state.dataUpdatedAt||!p(this.state.dataUpdatedAt,t)}onFocus(){var t;let e=this.observers.find(t=>t.shouldFetchOnWindowFocus());e&&e.refetch({cancelRefetch:!1}),null==(t=this.retryer)||t.continue()}onOnline(){var t;let e=this.observers.find(t=>t.shouldFetchOnReconnect());e&&e.refetch({cancelRefetch:!1}),null==(t=this.retryer)||t.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),this.cache.notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(e=>e!==t),this.observers.length||(this.retryer&&(this.abortSignalConsumed?this.retryer.cancel({revert:!0}):this.retryer.cancelRetry()),this.scheduleGc()),this.cache.notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.dispatch({type:"invalidate"})}fetch(t,e){var s,r,i,n;if("idle"!==this.state.fetchStatus){if(this.state.dataUpdatedAt&&null!=e&&e.cancelRefetch)this.cancel({silent:!0});else if(this.promise)return null==(i=this.retryer)||i.continueRetry(),this.promise}if(t&&this.setOptions(t),!this.options.queryFn){let t=this.observers.find(t=>t.options.queryFn);t&&this.setOptions(t.options)}let u=function(){if("function"==typeof AbortController)return new AbortController}(),a={queryKey:this.queryKey,pageParam:void 0,meta:this.meta},o=t=>{Object.defineProperty(t,"signal",{enumerable:!0,get:()=>{if(u)return this.abortSignalConsumed=!0,u.signal}})};o(a);let l=()=>this.options.queryFn?(this.abortSignalConsumed=!1,this.options.queryFn(a)):Promise.reject("Missing queryFn for queryKey '"+this.options.queryHash+"'"),h={fetchOptions:e,options:this.options,queryKey:this.queryKey,state:this.state,fetchFn:l};o(h),null==(s=this.options.behavior)||s.onFetch(h),this.revertState=this.state,("idle"===this.state.fetchStatus||this.state.fetchMeta!==(null==(r=h.fetchOptions)?void 0:r.meta))&&this.dispatch({type:"fetch",meta:null==(n=h.fetchOptions)?void 0:n.meta});let c=t=>{if(j(t)&&t.silent||this.dispatch({type:"error",error:t}),!j(t)){var e,s,r,i;null==(e=(s=this.cache.config).onError)||e.call(s,t,this),null==(r=(i=this.cache.config).onSettled)||r.call(i,this.state.data,t,this)}this.isFetchingOptimistic||this.scheduleGc(),this.isFetchingOptimistic=!1};return this.retryer=H({fn:h.fetchFn,abort:null==u?void 0:u.abort.bind(u),onSuccess:t=>{var e,s,r,i;void 0===t?c(Error(this.queryHash+" data is undefined")):(this.setData(t),null==(e=(s=this.cache.config).onSuccess)||e.call(s,t,this),null==(r=(i=this.cache.config).onSettled)||r.call(i,t,this.state.error,this),this.isFetchingOptimistic||this.scheduleGc(),this.isFetchingOptimistic=!1)},onError:c,onFail:(t,e)=>{this.dispatch({type:"failed",failureCount:t,error:e})},onPause:()=>{this.dispatch({type:"pause"})},onContinue:()=>{this.dispatch({type:"continue"})},retry:h.options.retry,retryDelay:h.options.retryDelay,networkMode:h.options.networkMode}),this.promise=this.retryer.promise,this.promise}dispatch(t){let e=e=>{var s,r;switch(t.type){case"failed":return{...e,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...e,fetchStatus:"paused"};case"continue":return{...e,fetchStatus:"fetching"};case"fetch":return{...e,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null!=(s=t.meta)?s:null,fetchStatus:k(this.options.networkMode)?"fetching":"paused",...!e.dataUpdatedAt&&{error:null,status:"loading"}};case"success":return{...e,data:t.data,dataUpdateCount:e.dataUpdateCount+1,dataUpdatedAt:null!=(r=t.dataUpdatedAt)?r:Date.now(),error:null,isInvalidated:!1,status:"success",...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":let i=t.error;if(j(i)&&i.revert&&this.revertState)return{...this.revertState,fetchStatus:"idle"};return{...e,error:i,errorUpdateCount:e.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:e.fetchFailureCount+1,fetchFailureReason:i,fetchStatus:"idle",status:"error"};case"invalidate":return{...e,isInvalidated:!0};case"setState":return{...e,...t.state}}};this.state=e(this.state),B.batch(()=>{this.observers.forEach(e=>{e.onQueryUpdate(t)}),this.cache.notify({query:this,type:"updated",action:t})})}}class z extends l{constructor(t){super(),this.config=t||{},this.queries=[],this.queriesMap={}}build(t,e,s){var r;let i=e.queryKey,n=null!=(r=e.queryHash)?r:C(i,e),u=this.get(n);return u||(u=new G({cache:this,logger:t.getLogger(),queryKey:i,queryHash:n,options:t.defaultQueryOptions(e),state:s,defaultOptions:t.getQueryDefaults(i)}),this.add(u)),u}add(t){this.queriesMap[t.queryHash]||(this.queriesMap[t.queryHash]=t,this.queries.push(t),this.notify({type:"added",query:t}))}remove(t){let e=this.queriesMap[t.queryHash];e&&(t.destroy(),this.queries=this.queries.filter(e=>e!==t),e===t&&delete this.queriesMap[t.queryHash],this.notify({type:"removed",query:t}))}clear(){B.batch(()=>{this.queries.forEach(t=>{this.remove(t)})})}get(t){return this.queriesMap[t]}getAll(){return this.queries}find(t,e){let[s]=m(t,e);return void 0===s.exact&&(s.exact=!0),this.queries.find(t=>g(s,t))}findAll(t,e){let[s]=m(t,e);return Object.keys(s).length>0?this.queries.filter(t=>g(s,t)):this.queries}notify(t){B.batch(()=>{this.listeners.forEach(({listener:e})=>{e(t)})})}onFocus(){B.batch(()=>{this.queries.forEach(t=>{t.onFocus()})})}onOnline(){B.batch(()=>{this.queries.forEach(t=>{t.onOnline()})})}}class W extends N{constructor(t){super(),this.defaultOptions=t.defaultOptions,this.mutationId=t.mutationId,this.mutationCache=t.mutationCache,this.logger=t.logger||_,this.observers=[],this.state=t.state||J(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options={...this.defaultOptions,...t},this.updateCacheTime(this.options.cacheTime)}get meta(){return this.options.meta}setState(t){this.dispatch({type:"setState",state:t})}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),this.mutationCache.notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){this.observers=this.observers.filter(e=>e!==t),this.scheduleGc(),this.mutationCache.notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){this.observers.length||("loading"===this.state.status?this.scheduleGc():this.mutationCache.remove(this))}continue(){var t,e;return null!=(t=null==(e=this.retryer)?void 0:e.continue())?t:this.execute()}async execute(){var t,e,s,r,i,n,u,a,o,l,h,c,d,f,p,y,v,m,b,g;let O=()=>{var t;return this.retryer=H({fn:()=>this.options.mutationFn?this.options.mutationFn(this.state.variables):Promise.reject("No mutationFn found"),onFail:(t,e)=>{this.dispatch({type:"failed",failureCount:t,error:e})},onPause:()=>{this.dispatch({type:"pause"})},onContinue:()=>{this.dispatch({type:"continue"})},retry:null!=(t=this.options.retry)?t:0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode}),this.retryer.promise},C="loading"===this.state.status;try{if(!C){this.dispatch({type:"loading",variables:this.options.variables}),await (null==(o=(l=this.mutationCache.config).onMutate)?void 0:o.call(l,this.state.variables,this));let t=await (null==(h=(c=this.options).onMutate)?void 0:h.call(c,this.state.variables));t!==this.state.context&&this.dispatch({type:"loading",context:t,variables:this.state.variables})}let d=await O();return await (null==(t=(e=this.mutationCache.config).onSuccess)?void 0:t.call(e,d,this.state.variables,this.state.context,this)),await (null==(s=(r=this.options).onSuccess)?void 0:s.call(r,d,this.state.variables,this.state.context)),await (null==(i=(n=this.mutationCache.config).onSettled)?void 0:i.call(n,d,null,this.state.variables,this.state.context,this)),await (null==(u=(a=this.options).onSettled)?void 0:u.call(a,d,null,this.state.variables,this.state.context)),this.dispatch({type:"success",data:d}),d}catch(t){try{throw await (null==(d=(f=this.mutationCache.config).onError)?void 0:d.call(f,t,this.state.variables,this.state.context,this)),await (null==(p=(y=this.options).onError)?void 0:p.call(y,t,this.state.variables,this.state.context)),await (null==(v=(m=this.mutationCache.config).onSettled)?void 0:v.call(m,void 0,t,this.state.variables,this.state.context,this)),await (null==(b=(g=this.options).onSettled)?void 0:b.call(g,void 0,t,this.state.variables,this.state.context)),t}finally{this.dispatch({type:"error",error:t})}}}dispatch(t){let e=e=>{switch(t.type){case"failed":return{...e,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...e,isPaused:!0};case"continue":return{...e,isPaused:!1};case"loading":return{...e,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:!k(this.options.networkMode),status:"loading",variables:t.variables};case"success":return{...e,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...e,data:void 0,error:t.error,failureCount:e.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"};case"setState":return{...e,...t.state}}};this.state=e(this.state),B.batch(()=>{this.observers.forEach(e=>{e.onMutationUpdate(t)}),this.mutationCache.notify({mutation:this,type:"updated",action:t})})}}function J(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0}}class V extends l{constructor(t){super(),this.config=t||{},this.mutations=[],this.mutationId=0}build(t,e,s){let r=new W({mutationCache:this,logger:t.getLogger(),mutationId:++this.mutationId,options:t.defaultMutationOptions(e),state:s,defaultOptions:e.mutationKey?t.getMutationDefaults(e.mutationKey):void 0});return this.add(r),r}add(t){this.mutations.push(t),this.notify({type:"added",mutation:t})}remove(t){this.mutations=this.mutations.filter(e=>e!==t),this.notify({type:"removed",mutation:t})}clear(){B.batch(()=>{this.mutations.forEach(t=>{this.remove(t)})})}getAll(){return this.mutations}find(t){return void 0===t.exact&&(t.exact=!0),this.mutations.find(e=>O(t,e))}findAll(t){return this.mutations.filter(e=>O(t,e))}notify(t){B.batch(()=>{this.listeners.forEach(({listener:e})=>{e(t)})})}resumePausedMutations(){var t;return this.resuming=(null!=(t=this.resuming)?t:Promise.resolve()).then(()=>{let t=this.mutations.filter(t=>t.state.isPaused);return B.batch(()=>t.reduce((t,e)=>t.then(()=>e.continue().catch(c)),Promise.resolve()))}).then(()=>{this.resuming=void 0}),this.resuming}}function X(){return{onFetch:t=>{t.fetchFn=()=>{var e,s,r,i,n,u;let a,o=null==(e=t.fetchOptions)||null==(s=e.meta)?void 0:s.refetchPage,l=null==(r=t.fetchOptions)||null==(i=r.meta)?void 0:i.fetchMore,h=null==l?void 0:l.pageParam,c=(null==l?void 0:l.direction)==="forward",d=(null==l?void 0:l.direction)==="backward",f=(null==(n=t.state.data)?void 0:n.pages)||[],p=(null==(u=t.state.data)?void 0:u.pageParams)||[],y=p,v=!1,m=t.options.queryFn||(()=>Promise.reject("Missing queryFn for queryKey '"+t.options.queryHash+"'")),b=(t,e,s,r)=>(y=r?[e,...y]:[...y,e],r?[s,...t]:[...t,s]),g=(e,s,r,i)=>{if(v)return Promise.reject("Cancelled");if(void 0===r&&!s&&e.length)return Promise.resolve(e);let n={queryKey:t.queryKey,pageParam:r,meta:t.options.meta};return Object.defineProperty(n,"signal",{enumerable:!0,get:()=>{var e,s;return null!=(e=t.signal)&&e.aborted?v=!0:null==(s=t.signal)||s.addEventListener("abort",()=>{v=!0}),t.signal}}),Promise.resolve(m(n)).then(t=>b(e,r,t,i))};if(f.length)if(c){let e=void 0!==h,s=e?h:Y(t.options,f);a=g(f,e,s)}else if(d){let e=void 0!==h,s=e?h:Z(t.options,f);a=g(f,e,s,!0)}else{y=[];let e=void 0===t.options.getNextPageParam;a=!o||!f[0]||o(f[0],0,f)?g([],e,p[0]):Promise.resolve(b([],p[0],f[0]));for(let s=1;s<f.length;s++)a=a.then(r=>{if(!o||!f[s]||o(f[s],s,f)){let i=e?p[s]:Y(t.options,r);return g(r,e,i)}return Promise.resolve(b(r,p[s],f[s]))})}else a=g([]);return a.then(t=>({pages:t,pageParams:y}))}}}}function Y(t,e){return null==t.getNextPageParam?void 0:t.getNextPageParam(e[e.length-1],e)}function Z(t,e){return null==t.getPreviousPageParam?void 0:t.getPreviousPageParam(e[0],e)}class ${constructor(t={}){this.queryCache=t.queryCache||new z,this.mutationCache=t.mutationCache||new V,this.logger=t.logger||_,this.defaultOptions=t.defaultOptions||{},this.queryDefaults=[],this.mutationDefaults=[],this.mountCount=0}mount(){this.mountCount++,1===this.mountCount&&(this.unsubscribeFocus=I.subscribe(()=>{I.isFocused()&&(this.resumePausedMutations(),this.queryCache.onFocus())}),this.unsubscribeOnline=U.subscribe(()=>{U.isOnline()&&(this.resumePausedMutations(),this.queryCache.onOnline())}))}unmount(){var t,e;this.mountCount--,0===this.mountCount&&(null==(t=this.unsubscribeFocus)||t.call(this),this.unsubscribeFocus=void 0,null==(e=this.unsubscribeOnline)||e.call(this),this.unsubscribeOnline=void 0)}isFetching(t,e){let[s]=m(t,e);return s.fetchStatus="fetching",this.queryCache.findAll(s).length}isMutating(t){return this.mutationCache.findAll({...t,fetching:!0}).length}getQueryData(t,e){var s;return null==(s=this.queryCache.find(t,e))?void 0:s.state.data}ensureQueryData(t,e,s){let r=y(t,e,s),i=this.getQueryData(r.queryKey);return i?Promise.resolve(i):this.fetchQuery(r)}getQueriesData(t){return this.getQueryCache().findAll(t).map(({queryKey:t,state:e})=>[t,e.data])}setQueryData(t,e,s){let r=this.queryCache.find(t),i=null==r?void 0:r.state.data,n="function"==typeof e?e(i):e;if(void 0===n)return;let u=y(t),a=this.defaultQueryOptions(u);return this.queryCache.build(this,a).setData(n,{...s,manual:!0})}setQueriesData(t,e,s){return B.batch(()=>this.getQueryCache().findAll(t).map(({queryKey:t})=>[t,this.setQueryData(t,e,s)]))}getQueryState(t,e){var s;return null==(s=this.queryCache.find(t,e))?void 0:s.state}removeQueries(t,e){let[s]=m(t,e),r=this.queryCache;B.batch(()=>{r.findAll(s).forEach(t=>{r.remove(t)})})}resetQueries(t,e,s){let[r,i]=m(t,e,s),n=this.queryCache,u={type:"active",...r};return B.batch(()=>(n.findAll(r).forEach(t=>{t.reset()}),this.refetchQueries(u,i)))}cancelQueries(t,e,s){let[r,i={}]=m(t,e,s);return void 0===i.revert&&(i.revert=!0),Promise.all(B.batch(()=>this.queryCache.findAll(r).map(t=>t.cancel(i)))).then(c).catch(c)}invalidateQueries(t,e,s){let[r,i]=m(t,e,s);return B.batch(()=>{var t,e;if(this.queryCache.findAll(r).forEach(t=>{t.invalidate()}),"none"===r.refetchType)return Promise.resolve();let s={...r,type:null!=(t=null!=(e=r.refetchType)?e:r.type)?t:"active"};return this.refetchQueries(s,i)})}refetchQueries(t,e,s){let[r,i]=m(t,e,s),n=Promise.all(B.batch(()=>this.queryCache.findAll(r).filter(t=>!t.isDisabled()).map(t=>{var e;return t.fetch(void 0,{...i,cancelRefetch:null==(e=null==i?void 0:i.cancelRefetch)||e,meta:{refetchPage:r.refetchPage}})}))).then(c);return null!=i&&i.throwOnError||(n=n.catch(c)),n}fetchQuery(t,e,s){let r=y(t,e,s),i=this.defaultQueryOptions(r);void 0===i.retry&&(i.retry=!1);let n=this.queryCache.build(this,i);return n.isStaleByTime(i.staleTime)?n.fetch(i):Promise.resolve(n.state.data)}prefetchQuery(t,e,s){return this.fetchQuery(t,e,s).then(c).catch(c)}fetchInfiniteQuery(t,e,s){let r=y(t,e,s);return r.behavior=X(),this.fetchQuery(r)}prefetchInfiniteQuery(t,e,s){return this.fetchInfiniteQuery(t,e,s).then(c).catch(c)}resumePausedMutations(){return this.mutationCache.resumePausedMutations()}getQueryCache(){return this.queryCache}getMutationCache(){return this.mutationCache}getLogger(){return this.logger}getDefaultOptions(){return this.defaultOptions}setDefaultOptions(t){this.defaultOptions=t}setQueryDefaults(t,e){let s=this.queryDefaults.find(e=>R(t)===R(e.queryKey));s?s.defaultOptions=e:this.queryDefaults.push({queryKey:t,defaultOptions:e})}getQueryDefaults(t){if(!t)return;let e=this.queryDefaults.find(e=>S(t,e.queryKey));return null==e?void 0:e.defaultOptions}setMutationDefaults(t,e){let s=this.mutationDefaults.find(e=>R(t)===R(e.mutationKey));s?s.defaultOptions=e:this.mutationDefaults.push({mutationKey:t,defaultOptions:e})}getMutationDefaults(t){if(!t)return;let e=this.mutationDefaults.find(e=>S(t,e.mutationKey));return null==e?void 0:e.defaultOptions}defaultQueryOptions(t){if(null!=t&&t._defaulted)return t;let e={...this.defaultOptions.queries,...this.getQueryDefaults(null==t?void 0:t.queryKey),...t,_defaulted:!0};return!e.queryHash&&e.queryKey&&(e.queryHash=C(e.queryKey,e)),void 0===e.refetchOnReconnect&&(e.refetchOnReconnect="always"!==e.networkMode),void 0===e.useErrorBoundary&&(e.useErrorBoundary=!!e.suspense),e}defaultMutationOptions(t){return null!=t&&t._defaulted?t:{...this.defaultOptions.mutations,...this.getMutationDefaults(null==t?void 0:t.mutationKey),...t,_defaulted:!0}}clear(){this.queryCache.clear(),this.mutationCache.clear()}}class tt extends l{constructor(t,e){super(),this.client=t,this.options=e,this.trackedProps=new Set,this.selectError=null,this.bindMethods(),this.setOptions(e)}bindMethods(){this.remove=this.remove.bind(this),this.refetch=this.refetch.bind(this)}onSubscribe(){1===this.listeners.size&&(this.currentQuery.addObserver(this),te(this.currentQuery,this.options)&&this.executeFetch(),this.updateTimers())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return ts(this.currentQuery,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return ts(this.currentQuery,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.clearStaleTimeout(),this.clearRefetchInterval(),this.currentQuery.removeObserver(this)}setOptions(t,e){let s=this.options,r=this.currentQuery;if(this.options=this.client.defaultQueryOptions(t),E(s,this.options)||this.client.getQueryCache().notify({type:"observerOptionsUpdated",query:this.currentQuery,observer:this}),void 0!==this.options.enabled&&"boolean"!=typeof this.options.enabled)throw Error("Expected enabled to be a boolean");this.options.queryKey||(this.options.queryKey=s.queryKey),this.updateQuery();let i=this.hasListeners();i&&tr(this.currentQuery,r,this.options,s)&&this.executeFetch(),this.updateResult(e),i&&(this.currentQuery!==r||this.options.enabled!==s.enabled||this.options.staleTime!==s.staleTime)&&this.updateStaleTimeout();let n=this.computeRefetchInterval();i&&(this.currentQuery!==r||this.options.enabled!==s.enabled||n!==this.currentRefetchInterval)&&this.updateRefetchInterval(n)}getOptimisticResult(t){var e,s,r;let i=this.client.getQueryCache().build(this.client,t),n=this.createResult(i,t);return e=this,s=n,(r=t).keepPreviousData||(void 0!==r.placeholderData?!s.isPlaceholderData:E(e.getCurrentResult(),s))||(this.currentResult=n,this.currentResultOptions=this.options,this.currentResultState=this.currentQuery.state),n}getCurrentResult(){return this.currentResult}trackResult(t){let e={};return Object.keys(t).forEach(s=>{Object.defineProperty(e,s,{configurable:!1,enumerable:!0,get:()=>(this.trackedProps.add(s),t[s])})}),e}getCurrentQuery(){return this.currentQuery}remove(){this.client.getQueryCache().remove(this.currentQuery)}refetch({refetchPage:t,...e}={}){return this.fetch({...e,meta:{refetchPage:t}})}fetchOptimistic(t){let e=this.client.defaultQueryOptions(t),s=this.client.getQueryCache().build(this.client,e);return s.isFetchingOptimistic=!0,s.fetch().then(()=>this.createResult(s,e))}fetch(t){var e;return this.executeFetch({...t,cancelRefetch:null==(e=t.cancelRefetch)||e}).then(()=>(this.updateResult(),this.currentResult))}executeFetch(t){this.updateQuery();let e=this.currentQuery.fetch(this.options,t);return null!=t&&t.throwOnError||(e=e.catch(c)),e}updateStaleTimeout(){if(this.clearStaleTimeout(),h||this.currentResult.isStale||!d(this.options.staleTime))return;let t=p(this.currentResult.dataUpdatedAt,this.options.staleTime);this.staleTimeoutId=setTimeout(()=>{this.currentResult.isStale||this.updateResult()},t+1)}computeRefetchInterval(){var t;return"function"==typeof this.options.refetchInterval?this.options.refetchInterval(this.currentResult.data,this.currentQuery):null!=(t=this.options.refetchInterval)&&t}updateRefetchInterval(t){this.clearRefetchInterval(),this.currentRefetchInterval=t,!h&&!1!==this.options.enabled&&d(this.currentRefetchInterval)&&0!==this.currentRefetchInterval&&(this.refetchIntervalId=setInterval(()=>{(this.options.refetchIntervalInBackground||I.isFocused())&&this.executeFetch()},this.currentRefetchInterval))}updateTimers(){this.updateStaleTimeout(),this.updateRefetchInterval(this.computeRefetchInterval())}clearStaleTimeout(){this.staleTimeoutId&&(clearTimeout(this.staleTimeoutId),this.staleTimeoutId=void 0)}clearRefetchInterval(){this.refetchIntervalId&&(clearInterval(this.refetchIntervalId),this.refetchIntervalId=void 0)}createResult(t,e){let s,r=this.currentQuery,i=this.options,n=this.currentResult,u=this.currentResultState,a=this.currentResultOptions,o=t!==r,l=o?t.state:this.currentQueryInitialState,h=o?this.currentResult:this.previousQueryResult,{state:c}=t,{dataUpdatedAt:d,error:f,errorUpdatedAt:p,fetchStatus:y,status:v}=c,m=!1,b=!1;if(e._optimisticResults){let s=this.hasListeners(),n=!s&&te(t,e),u=s&&tr(t,r,e,i);(n||u)&&(y=k(t.options.networkMode)?"fetching":"paused",d||(v="loading")),"isRestoring"===e._optimisticResults&&(y="idle")}if(e.keepPreviousData&&!c.dataUpdatedAt&&null!=h&&h.isSuccess&&"error"!==v)s=h.data,d=h.dataUpdatedAt,v=h.status,m=!0;else if(e.select&&void 0!==c.data)if(n&&c.data===(null==u?void 0:u.data)&&e.select===this.selectFn)s=this.selectResult;else try{this.selectFn=e.select,s=e.select(c.data),s=A(null==n?void 0:n.data,s,e),this.selectResult=s,this.selectError=null}catch(t){this.selectError=t}else s=c.data;if(void 0!==e.placeholderData&&void 0===s&&"loading"===v){let t;if(null!=n&&n.isPlaceholderData&&e.placeholderData===(null==a?void 0:a.placeholderData))t=n.data;else if(t="function"==typeof e.placeholderData?e.placeholderData():e.placeholderData,e.select&&void 0!==t)try{t=e.select(t),this.selectError=null}catch(t){this.selectError=t}void 0!==t&&(v="success",s=A(null==n?void 0:n.data,t,e),b=!0)}this.selectError&&(f=this.selectError,s=this.selectResult,p=Date.now(),v="error");let g="fetching"===y,O="loading"===v,C="error"===v;return{status:v,fetchStatus:y,isLoading:O,isSuccess:"success"===v,isError:C,isInitialLoading:O&&g,data:s,dataUpdatedAt:d,error:f,errorUpdatedAt:p,failureCount:c.fetchFailureCount,failureReason:c.fetchFailureReason,errorUpdateCount:c.errorUpdateCount,isFetched:c.dataUpdateCount>0||c.errorUpdateCount>0,isFetchedAfterMount:c.dataUpdateCount>l.dataUpdateCount||c.errorUpdateCount>l.errorUpdateCount,isFetching:g,isRefetching:g&&!O,isLoadingError:C&&0===c.dataUpdatedAt,isPaused:"paused"===y,isPlaceholderData:b,isPreviousData:m,isRefetchError:C&&0!==c.dataUpdatedAt,isStale:ti(t,e),refetch:this.refetch,remove:this.remove}}updateResult(t){let e=this.currentResult,s=this.createResult(this.currentQuery,this.options);if(this.currentResultState=this.currentQuery.state,this.currentResultOptions=this.options,E(s,e))return;this.currentResult=s;let r={cache:!0},i=()=>{if(!e)return!0;let{notifyOnChangeProps:t}=this.options,s="function"==typeof t?t():t;if("all"===s||!s&&!this.trackedProps.size)return!0;let r=new Set(null!=s?s:this.trackedProps);return this.options.useErrorBoundary&&r.add("error"),Object.keys(this.currentResult).some(t=>this.currentResult[t]!==e[t]&&r.has(t))};(null==t?void 0:t.listeners)!==!1&&i()&&(r.listeners=!0),this.notify({...r,...t})}updateQuery(){let t=this.client.getQueryCache().build(this.client,this.options);if(t===this.currentQuery)return;let e=this.currentQuery;this.currentQuery=t,this.currentQueryInitialState=t.state,this.previousQueryResult=this.currentResult,this.hasListeners()&&(null==e||e.removeObserver(this),t.addObserver(this))}onQueryUpdate(t){let e={};"success"===t.type?e.onSuccess=!t.manual:"error"!==t.type||j(t.error)||(e.onError=!0),this.updateResult(e),this.hasListeners()&&this.updateTimers()}notify(t){B.batch(()=>{var e,s,r,i,n,u,a,o;t.onSuccess?(null==(e=(s=this.options).onSuccess)||e.call(s,this.currentResult.data),null==(r=(i=this.options).onSettled)||r.call(i,this.currentResult.data,null)):t.onError&&(null==(n=(u=this.options).onError)||n.call(u,this.currentResult.error),null==(a=(o=this.options).onSettled)||a.call(o,void 0,this.currentResult.error)),t.listeners&&this.listeners.forEach(({listener:t})=>{t(this.currentResult)}),t.cache&&this.client.getQueryCache().notify({query:this.currentQuery,type:"observerResultsUpdated"})})}}function te(t,e){return!1!==e.enabled&&!t.state.dataUpdatedAt&&("error"!==t.state.status||!1!==e.retryOnMount)||t.state.dataUpdatedAt>0&&ts(t,e,e.refetchOnMount)}function ts(t,e,s){if(!1!==e.enabled){let r="function"==typeof s?s(t):s;return"always"===r||!1!==r&&ti(t,e)}return!1}function tr(t,e,s,r){return!1!==s.enabled&&(t!==e||!1===r.enabled)&&(!s.suspense||"error"!==t.state.status)&&ti(t,s)}function ti(t,e){return t.isStaleByTime(e.staleTime)}class tn extends l{constructor(t,e){super(),this.client=t,this.queries=[],this.result=[],this.observers=[],this.observersMap={},e&&this.setQueries(e)}onSubscribe(){1===this.listeners.size&&this.observers.forEach(t=>{t.subscribe(e=>{this.onUpdate(t,e)})})}onUnsubscribe(){this.listeners.size||this.destroy()}destroy(){this.listeners=new Set,this.observers.forEach(t=>{t.destroy()})}setQueries(t,e){this.queries=t,B.batch(()=>{let t=this.observers,s=this.findMatchingObservers(this.queries);s.forEach(t=>t.observer.setOptions(t.defaultedQueryOptions,e));let r=s.map(t=>t.observer),i=Object.fromEntries(r.map(t=>[t.options.queryHash,t])),n=r.map(t=>t.getCurrentResult()),u=r.some((e,s)=>e!==t[s]);t.length===r.length&&!u||(this.observers=r,this.observersMap=i,this.result=n,this.hasListeners()&&(f(t,r).forEach(t=>{t.destroy()}),f(r,t).forEach(t=>{t.subscribe(e=>{this.onUpdate(t,e)})}),this.notify()))})}getCurrentResult(){return this.result}getQueries(){return this.observers.map(t=>t.getCurrentQuery())}getObservers(){return this.observers}getOptimisticResult(t){return this.findMatchingObservers(t).map(t=>t.observer.getOptimisticResult(t.defaultedQueryOptions))}findMatchingObservers(t){let e=this.observers,s=new Map(e.map(t=>[t.options.queryHash,t])),r=t.map(t=>this.client.defaultQueryOptions(t)),i=r.flatMap(t=>{let e=s.get(t.queryHash);return null!=e?[{defaultedQueryOptions:t,observer:e}]:[]}),n=new Set(i.map(t=>t.defaultedQueryOptions.queryHash)),u=r.filter(t=>!n.has(t.queryHash)),a=new Set(i.map(t=>t.observer)),o=e.filter(t=>!a.has(t)),l=t=>{let e=this.client.defaultQueryOptions(t),s=this.observersMap[e.queryHash];return null!=s?s:new tt(this.client,e)},h=u.map((t,e)=>{if(t.keepPreviousData){let s=o[e];if(void 0!==s)return{defaultedQueryOptions:t,observer:s}}return{defaultedQueryOptions:t,observer:l(t)}});return i.concat(h).sort((t,e)=>r.indexOf(t.defaultedQueryOptions)-r.indexOf(e.defaultedQueryOptions))}onUpdate(t,e){let s=this.observers.indexOf(t);if(-1!==s){var r;let t;this.result=(r=this.result,(t=r.slice(0))[s]=e,t),this.notify()}}notify(){B.batch(()=>{this.listeners.forEach(({listener:t})=>{t(this.result)})})}}class tu extends tt{constructor(t,e){super(t,e)}bindMethods(){super.bindMethods(),this.fetchNextPage=this.fetchNextPage.bind(this),this.fetchPreviousPage=this.fetchPreviousPage.bind(this)}setOptions(t,e){super.setOptions({...t,behavior:X()},e)}getOptimisticResult(t){return t.behavior=X(),super.getOptimisticResult(t)}fetchNextPage({pageParam:t,...e}={}){return this.fetch({...e,meta:{fetchMore:{direction:"forward",pageParam:t}}})}fetchPreviousPage({pageParam:t,...e}={}){return this.fetch({...e,meta:{fetchMore:{direction:"backward",pageParam:t}}})}createResult(t,e){var s,r,i,n,u,a;let{state:o}=t,l=super.createResult(t,e),{isFetching:h,isRefetching:c}=l,d=h&&(null==(s=o.fetchMeta)||null==(r=s.fetchMore)?void 0:r.direction)==="forward",f=h&&(null==(i=o.fetchMeta)||null==(n=i.fetchMore)?void 0:n.direction)==="backward";return{...l,fetchNextPage:this.fetchNextPage,fetchPreviousPage:this.fetchPreviousPage,hasNextPage:function(t,e){if(t.getNextPageParam&&Array.isArray(e)){let s=Y(t,e);return null!=s&&!1!==s}}(e,null==(u=o.data)?void 0:u.pages),hasPreviousPage:function(t,e){if(t.getPreviousPageParam&&Array.isArray(e)){let s=Z(t,e);return null!=s&&!1!==s}}(e,null==(a=o.data)?void 0:a.pages),isFetchingNextPage:d,isFetchingPreviousPage:f,isRefetching:c&&!d&&!f}}}class ta extends l{constructor(t,e){super(),this.client=t,this.setOptions(e),this.bindMethods(),this.updateResult()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(t){var e;let s=this.options;this.options=this.client.defaultMutationOptions(t),E(s,this.options)||this.client.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.currentMutation,observer:this}),null==(e=this.currentMutation)||e.setOptions(this.options)}onUnsubscribe(){if(!this.hasListeners()){var t;null==(t=this.currentMutation)||t.removeObserver(this)}}onMutationUpdate(t){this.updateResult();let e={listeners:!0};"success"===t.type?e.onSuccess=!0:"error"===t.type&&(e.onError=!0),this.notify(e)}getCurrentResult(){return this.currentResult}reset(){this.currentMutation=void 0,this.updateResult(),this.notify({listeners:!0})}mutate(t,e){return this.mutateOptions=e,this.currentMutation&&this.currentMutation.removeObserver(this),this.currentMutation=this.client.getMutationCache().build(this.client,{...this.options,variables:void 0!==t?t:this.options.variables}),this.currentMutation.addObserver(this),this.currentMutation.execute()}updateResult(){let t=this.currentMutation?this.currentMutation.state:J(),e="loading"===t.status,s={...t,isLoading:e,isPending:e,isSuccess:"success"===t.status,isError:"error"===t.status,isIdle:"idle"===t.status,mutate:this.mutate,reset:this.reset};this.currentResult=s}notify(t){B.batch(()=>{if(this.mutateOptions&&this.hasListeners()){var e,s,r,i,n,u,a,o;t.onSuccess?(null==(e=(s=this.mutateOptions).onSuccess)||e.call(s,this.currentResult.data,this.currentResult.variables,this.currentResult.context),null==(r=(i=this.mutateOptions).onSettled)||r.call(i,this.currentResult.data,null,this.currentResult.variables,this.currentResult.context)):t.onError&&(null==(n=(u=this.mutateOptions).onError)||n.call(u,this.currentResult.error,this.currentResult.variables,this.currentResult.context),null==(a=(o=this.mutateOptions).onSettled)||a.call(o,void 0,this.currentResult.error,this.currentResult.variables,this.currentResult.context))}t.listeners&&this.listeners.forEach(({listener:t})=>{t(this.currentResult)})})}}function to(t){return t.state.isPaused}function tl(t){return"success"===t.state.status}function th(t,e={}){let s=[],r=[];if(!1!==e.dehydrateMutations){let r=e.shouldDehydrateMutation||to;t.getMutationCache().getAll().forEach(t=>{r(t)&&s.push({mutationKey:t.options.mutationKey,state:t.state})})}if(!1!==e.dehydrateQueries){let s=e.shouldDehydrateQuery||tl;t.getQueryCache().getAll().forEach(t=>{s(t)&&r.push({state:t.state,queryKey:t.queryKey,queryHash:t.queryHash})})}return{mutations:s,queries:r}}function tc(t,e,s){if("object"!=typeof e||null===e)return;let r=t.getMutationCache(),i=t.getQueryCache(),n=e.mutations||[],u=e.queries||[];n.forEach(e=>{var i;r.build(t,{...null==s||null==(i=s.defaultOptions)?void 0:i.mutations,mutationKey:e.mutationKey},e.state)}),u.forEach(({queryKey:e,state:r,queryHash:n})=>{var u;let a=i.get(n);if(a){if(a.state.dataUpdatedAt<r.dataUpdatedAt){let{fetchStatus:t,...e}=r;a.setState(e)}return}i.build(t,{...null==s||null==(u=s.defaultOptions)?void 0:u.queries,queryKey:e,queryHash:n},{...r,fetchStatus:"idle"})})}var td=s(70451);let tf=s(43676).useSyncExternalStore,tp=td.createContext(void 0),ty=td.createContext(!1);function tv(t,e){return t||(e&&"u">typeof window?(window.ReactQueryClientContext||(window.ReactQueryClientContext=tp),window.ReactQueryClientContext):tp)}let tm=({context:t}={})=>{let e=td.useContext(tv(t,td.useContext(ty)));if(!e)throw Error("No QueryClient set, use QueryClientProvider to set one");return e},tb=({client:t,children:e,context:s,contextSharing:r=!1})=>{td.useEffect(()=>(t.mount(),()=>{t.unmount()}),[t]);let i=tv(s,r);return td.createElement(ty.Provider,{value:!s&&r},td.createElement(i.Provider,{value:t},e))},tg=td.createContext(!1),tO=()=>td.useContext(tg),tC=tg.Provider;function tR(){let t=!1;return{clearReset:()=>{t=!1},reset:()=>{t=!0},isReset:()=>t}}let tS=td.createContext(tR()),tQ=()=>td.useContext(tS),tE=({children:t})=>{let[e]=td.useState(()=>tR());return td.createElement(tS.Provider,{value:e},"function"==typeof t?t(e):t)};function tq(t,e){return"function"==typeof t?t(...e):!!t}let tw=(t,e)=>{(t.suspense||t.useErrorBoundary)&&!e.isReset()&&(t.retryOnMount=!1)},tP=t=>{td.useEffect(()=>{t.clearReset()},[t])},tM=({result:t,errorResetBoundary:e,useErrorBoundary:s,query:r})=>t.isError&&!e.isReset()&&!t.isFetching&&tq(s,[t.error,r]),tx=t=>{t.suspense&&("number"!=typeof t.staleTime&&(t.staleTime=1e3),"number"==typeof t.cacheTime&&(t.cacheTime=Math.max(t.cacheTime,1e3)))},tF=(t,e)=>t.isLoading&&t.isFetching&&!e,tD=(t,e,s)=>(null==t?void 0:t.suspense)&&tF(e,s),tA=(t,e,s)=>e.fetchOptimistic(t).then(({data:e})=>{null==t.onSuccess||t.onSuccess(e),null==t.onSettled||t.onSettled(e,null)}).catch(e=>{s.clearReset(),null==t.onError||t.onError(e),null==t.onSettled||t.onSettled(void 0,e)});function tI({queries:t,context:e}){let s=tm({context:e}),r=tO(),i=tQ(),n=td.useMemo(()=>t.map(t=>{let e=s.defaultQueryOptions(t);return e._optimisticResults=r?"isRestoring":"optimistic",e}),[t,s,r]);n.forEach(t=>{tx(t),tw(t,i)}),tP(i);let[u]=td.useState(()=>new tn(s,n)),a=u.getOptimisticResult(n);tf(td.useCallback(t=>r?()=>void 0:u.subscribe(B.batchCalls(t)),[u,r]),()=>u.getCurrentResult(),()=>u.getCurrentResult()),td.useEffect(()=>{u.setQueries(n,{listeners:!1})},[n,u]);let o=a.some((t,e)=>tD(n[e],t,r))?a.flatMap((t,e)=>{let s=n[e],a=u.getObservers()[e];if(s&&a)if(tD(s,t,r))return tA(s,a,i);else tF(t,r)&&tA(s,a,i);return[]}):[];if(o.length>0)throw Promise.all(o);let l=u.getQueries(),h=a.find((t,e)=>{var s,r;return tM({result:t,errorResetBoundary:i,useErrorBoundary:null!=(s=null==(r=n[e])?void 0:r.useErrorBoundary)&&s,query:l[e]})});if(null!=h&&h.error)throw h.error;return a}function tT(t,e){let s=tm({context:t.context}),r=tO(),i=tQ(),n=s.defaultQueryOptions(t);n._optimisticResults=r?"isRestoring":"optimistic",n.onError&&(n.onError=B.batchCalls(n.onError)),n.onSuccess&&(n.onSuccess=B.batchCalls(n.onSuccess)),n.onSettled&&(n.onSettled=B.batchCalls(n.onSettled)),tx(n),tw(n,i),tP(i);let[u]=td.useState(()=>new e(s,n)),a=u.getOptimisticResult(n);if(tf(td.useCallback(t=>{let e=r?()=>void 0:u.subscribe(B.batchCalls(t));return u.updateResult(),e},[u,r]),()=>u.getCurrentResult(),()=>u.getCurrentResult()),td.useEffect(()=>{u.setOptions(n,{listeners:!1})},[n,u]),tD(n,a,r))throw tA(n,u,i);if(tM({result:a,errorResetBoundary:i,useErrorBoundary:n.useErrorBoundary,query:u.getCurrentQuery()}))throw a.error;return n.notifyOnChangeProps?a:u.trackResult(a)}function tU(t,e,s){return tT(y(t,e,s),tt)}function tK(t){return tT({...t,enabled:!0,useErrorBoundary:!0,suspense:!0,placeholderData:void 0,networkMode:"always",onSuccess:void 0,onError:void 0,onSettled:void 0},tt)}function tk(t){return tT({...t,enabled:!0,suspense:!0,useErrorBoundary:!0,networkMode:"always"},tu)}function tL({queries:t,context:e}){return tI({queries:t.map(t=>({...t,enabled:!0,useErrorBoundary:!0,suspense:!0,placeholderData:void 0,networkMode:"always"})),context:e})}function tj(t){return t}function tH(t){return t}function t_(t,e={}){let s=tm({context:e.context}),r=td.useRef(e);r.current=e,td.useMemo(()=>{t&&tc(s,t,r.current)},[s,t])}let tB=({children:t,options:e,state:s})=>(t_(s,e),t);function tN(t,e,s){let[r,i={}]=m(t,e,s),n=tm({context:i.context}),u=n.getQueryCache();return tf(td.useCallback(t=>u.subscribe(B.batchCalls(t)),[u]),()=>n.isFetching(r),()=>n.isFetching(r))}function tG(t,e,s){let[r,i={}]=b(t,e,s),n=tm({context:i.context}),u=n.getMutationCache();return tf(td.useCallback(t=>u.subscribe(B.batchCalls(t)),[u]),()=>n.isMutating(r),()=>n.isMutating(r))}function tz(t){return t}function tW(t,e,s){let r=v(t,e,s),i=tm({context:r.context}),[n]=td.useState(()=>new ta(i,r));td.useEffect(()=>{n.setOptions(r)},[n,r]);let u=tf(td.useCallback(t=>n.subscribe(B.batchCalls(t)),[n]),()=>n.getCurrentResult(),()=>n.getCurrentResult()),a=td.useCallback((t,e)=>{n.mutate(t,e).catch(tJ)},[n]);if(u.error&&tq(n.options.useErrorBoundary,[u.error]))throw u.error;return{...u,mutate:a,mutateAsync:u.mutate}}function tJ(){}function tV(t,e,s){return tT(y(t,e,s),tu)}function tX(t){let e=tm();e.getQueryState(t.queryKey)||e.prefetchQuery(t)}function tY(t){let e=tm();e.getQueryState(t.queryKey)||e.prefetchInfiniteQuery(t)}}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.chunk_Table_0_14_0_beta_1=self.chunk_Table_0_14_0_beta_1||[]).push([["865"],{68150(e,t,r){r.d(t,{A:()=>m});var a=r(70451),o=r(11750),n=r(81023),s=r(77308),l=r(72052),i=r(11502),u=r(29009),d=r(46733);function c(e){return(0,d.Ay)("MuiCard",e)}(0,u.A)("MuiCard",["root"]);var p=r(62540);let f=(0,s.A)(i.A,{name:"MuiCard",slot:"Root",overridesResolver:(e,t)=>t.root})({overflow:"hidden"}),m=a.forwardRef(function(e,t){let r=(0,l.b)({props:e,name:"MuiCard"}),{className:a,raised:s=!1,...i}=r,u={...r,raised:s},d=(e=>{let{classes:t}=e;return(0,n.A)({root:["root"]},c,t)})(u);return(0,p.jsx)(f,{className:(0,o.A)(d.root,a),elevation:s?8:void 0,ref:t,ownerState:u,...i})})},32189(e,t,r){r.d(t,{A:()=>f});var a=r(70451),o=r(11750),n=r(81023),s=r(77308),l=r(72052),i=r(29009),u=r(46733);function d(e){return(0,u.Ay)("MuiCardContent",e)}(0,i.A)("MuiCardContent",["root"]);var c=r(62540);let p=(0,s.A)("div",{name:"MuiCardContent",slot:"Root",overridesResolver:(e,t)=>t.root})({padding:16,"&:last-child":{paddingBottom:24}}),f=a.forwardRef(function(e,t){let r=(0,l.b)({props:e,name:"MuiCardContent"}),{className:a,component:s="div",...i}=r,u={...r,component:s},f=(e=>{let{classes:t}=e;return(0,n.A)({root:["root"]},d,t)})(u);return(0,c.jsx)(p,{as:s,className:(0,o.A)(f.root,a),ownerState:u,ref:t,...i})})},35875(e,t,r){r.d(t,{A:()=>b});var a=r(70451),o=r(81023),n=r(47599),s=r(88091),l=r(77308),i=r(72052),u=r(29009),d=r(46733);function c(e){return(0,d.Ay)("MuiCardHeader",e)}let p=(0,u.A)("MuiCardHeader",["root","avatar","action","content","title","subheader"]);var f=r(73397),m=r(62540);let h=(0,l.A)("div",{name:"MuiCardHeader",slot:"Root",overridesResolver:(e,t)=>[{[`& .${p.title}`]:t.title},{[`& .${p.subheader}`]:t.subheader},t.root]})({display:"flex",alignItems:"center",padding:16}),y=(0,l.A)("div",{name:"MuiCardHeader",slot:"Avatar",overridesResolver:(e,t)=>t.avatar})({display:"flex",flex:"0 0 auto",marginRight:16}),g=(0,l.A)("div",{name:"MuiCardHeader",slot:"Action",overridesResolver:(e,t)=>t.action})({flex:"0 0 auto",alignSelf:"flex-start",marginTop:-4,marginRight:-8,marginBottom:-4}),v=(0,l.A)("div",{name:"MuiCardHeader",slot:"Content",overridesResolver:(e,t)=>t.content})({flex:"1 1 auto",[`.${n.A.root}:where(& .${p.title})`]:{display:"block"},[`.${n.A.root}:where(& .${p.subheader})`]:{display:"block"}}),b=a.forwardRef(function(e,t){let r=(0,i.b)({props:e,name:"MuiCardHeader"}),{action:a,avatar:n,component:l="div",disableTypography:u=!1,subheader:d,subheaderTypographyProps:p,title:b,titleTypographyProps:j,slots:M={},slotProps:k={},...w}=r,A={...r,component:l,disableTypography:u},O=(e=>{let{classes:t}=e;return(0,o.A)({root:["root"],avatar:["avatar"],action:["action"],content:["content"],title:["title"],subheader:["subheader"]},c,t)})(A),P={slots:M,slotProps:{title:j,subheader:p,...k}},S=b,[I,C]=(0,f.A)("title",{className:O.title,elementType:s.A,externalForwardedProps:P,ownerState:A,additionalProps:{variant:n?"body2":"h5",component:"span"}});null==S||S.type===s.A||u||(S=(0,m.jsx)(I,{...C,children:S}));let R=d,[_,x]=(0,f.A)("subheader",{className:O.subheader,elementType:s.A,externalForwardedProps:P,ownerState:A,additionalProps:{variant:n?"body2":"body1",color:"textSecondary",component:"span"}});null==R||R.type===s.A||u||(R=(0,m.jsx)(_,{...x,children:R}));let[Y,F]=(0,f.A)("root",{ref:t,className:O.root,elementType:h,externalForwardedProps:{...P,...w,component:l},ownerState:A}),[H,V]=(0,f.A)("avatar",{className:O.avatar,elementType:y,externalForwardedProps:P,ownerState:A}),[T,L]=(0,f.A)("content",{className:O.content,elementType:v,externalForwardedProps:P,ownerState:A}),[N,$]=(0,f.A)("action",{className:O.action,elementType:g,externalForwardedProps:P,ownerState:A});return(0,m.jsxs)(Y,{...F,children:[n&&(0,m.jsx)(H,{...V,children:n}),(0,m.jsxs)(T,{...L,children:[S,R]}),a&&(0,m.jsx)(N,{...$,children:a})]})})},45158(e,t,r){r.d(t,{A:()=>h});var a=r(70451),o=r(11750),n=r(81023),s=r(77308),l=r(72052),i=r(29009),u=r(46733);function d(e){return(0,u.Ay)("MuiFormGroup",e)}(0,i.A)("MuiFormGroup",["root","row","error"]);var c=r(42872),p=r(87842),f=r(62540);let m=(0,s.A)("div",{name:"MuiFormGroup",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:r}=e;return[t.root,r.row&&t.row]}})({display:"flex",flexDirection:"column",flexWrap:"wrap",variants:[{props:{row:!0},style:{flexDirection:"row"}}]}),h=a.forwardRef(function(e,t){let r=(0,l.b)({props:e,name:"MuiFormGroup"}),{className:a,row:s=!1,...i}=r,u=(0,c.A)(),h=(0,p.A)({props:r,muiFormControl:u,states:["error"]}),y={...r,row:s,error:h.error},g=(e=>{let{classes:t,row:r,error:a}=e;return(0,n.A)({root:["root",r&&"row",a&&"error"]},d,t)})(y);return(0,f.jsx)(m,{className:(0,o.A)(g.root,a),ownerState:y,ref:t,...i})})},4178(e,t,r){var a;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,t.default=(0,((a=r(1448))&&a.__esModule?a:{default:a}).default)("M13 14H11V9H13M13 18H11V16H13M1 21H23L12 2L1 21Z","Alert")},46001(e,t,r){var a;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,t.default=(0,((a=r(1448))&&a.__esModule?a:{default:a}).default)("M11,4H13V16L18.5,10.5L19.92,11.92L12,19.84L4.08,11.92L5.5,10.5L11,16V4Z","ArrowDown")},65168(e,t,r){var a;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,t.default=(0,((a=r(1448))&&a.__esModule?a:{default:a}).default)("M13,20H11V8L5.5,13.5L4.08,12.08L12,4.16L19.92,12.08L18.5,13.5L13,8V20Z","ArrowUp")},10571(e,t,r){var a;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,t.default=(0,((a=r(1448))&&a.__esModule?a:{default:a}).default)("M14,3V5H17.59L7.76,14.83L9.17,16.24L19,6.41V10H21V3M19,19H5V5H12V3H5C3.89,3 3,3.9 3,5V19A2,2 0 0,0 5,21H19A2,2 0 0,0 21,19V12H19V19Z","OpenInNew")},49603(e,t,r){var a;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,t.default=(0,((a=r(1448))&&a.__esModule?a:{default:a}).default)("M20.71,7.04C21.1,6.65 21.1,6 20.71,5.63L18.37,3.29C18,2.9 17.35,2.9 16.96,3.29L15.12,5.12L18.87,8.87M3,17.25V21H6.75L17.81,9.93L14.06,6.18L3,17.25Z","Pencil")},4150(e,t,r){var a;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,t.default=(0,((a=r(1448))&&a.__esModule?a:{default:a}).default)("M9,3V4H4V6H5V19A2,2 0 0,0 7,21H17A2,2 0 0,0 19,19V6H20V4H15V3H9M9,8H11V17H9V8M13,8H15V17H13V8Z","TrashCan")},96945(e,t,r){let a,o,n;function s(e,t){if(null==e)return e;if(0===e.length&&(!t||t&&""!==e))return null;let r=e instanceof Array?e[0]:e;return null==r||t||""!==r?r:null}r.d(t,{useQueryParams:()=>k,JsonParam:()=>i,useQueryParam:()=>w,StringParam:()=>l});let l={encode:function(e){return null==e?e:String(e)},decode:function(e){let t=s(e,!0);return null==t?t:String(t)}},i={encode:function(e){return null==e?e:JSON.stringify(e)},decode:function(e){let t=s(e);if(null==t)return t;let r=null;try{r=JSON.parse(t)}catch(e){}return r}};'{}[],":'.split("").map(e=>[e,encodeURIComponent(e)]);var u=r(70451);let d=new class{constructor(){this.paramsMap=new Map,this.registeredParams=new Map}set(e,t,r,a){this.paramsMap.set(e,{stringified:t,decoded:r,decode:a})}has(e,t,r){if(!this.paramsMap.has(e))return!1;let a=this.paramsMap.get(e);return!!a&&a.stringified===t&&(null==r||a.decode===r)}get(e){var t;if(this.paramsMap.has(e))return null==(t=this.paramsMap.get(e))?void 0:t.decoded}registerParams(e){for(let t of e){let e=this.registeredParams.get(t)||0;this.registeredParams.set(t,e+1)}}unregisterParams(e){for(let t of e){let e=(this.registeredParams.get(t)||0)-1;e<=0?(this.registeredParams.delete(t),this.paramsMap.has(t)&&this.paramsMap.delete(t)):this.registeredParams.set(t,e)}}clear(){this.paramsMap.clear(),this.registeredParams.clear()}};function c(e,t,r,a){var o;if(!r||!t.length)return e;let n={...e},s=!1;for(let e of t)Object.prototype.hasOwnProperty.call(n,e)||(n[e]=null!=(o=r[e])?o:a,s=!0);return s?n:e}let p=Object.prototype.hasOwnProperty;function f(e,t){return e===t?0!==e||0!==t||1/e==1/t:e!=e&&t!=t}function m(e,t,r){var a,o;if(f(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;let n=Object.keys(e),s=Object.keys(t);if(n.length!==s.length)return!1;for(let s=0;s<n.length;s++){let l=null!=(o=null==(a=null==r?void 0:r[n[s]])?void 0:a.equals)?o:f;if(!p.call(t,n[s])||!l(e[n[s]],t[n[s]]))return!1}return!0}function h(e,t,r){let a={};for(let o of Object.keys(t)){let n,s=t[o],l=e[o];if(r.has(o,l,s.decode))n=r.get(o);else{if(n=s.decode(l),s.equals&&r.has(o,l)){let e=r.get(o);s.equals(n,e)&&(n=e)}void 0!==n&&r.set(o,l,n,s.decode)}void 0===n&&void 0!==s.default&&(n=s.default),a[o]=n}return a}function y(){let e;return function(t,r,a){let o=h(t,r,a);return null!=e&&m(e,o)?e:(e=o,o)}}let g={},v=(e,t,r)=>{if(a===t&&n===e&&o===r)return g;a=t,n=e;let s=e(null!=t?t:"");o=r;let l=function(e){if(e)return Object.fromEntries(e.split("\n").map(e=>e.split("\0")))}(r);for(let[e,t]of Object.entries(s)){(null==l?void 0:l[e])&&(delete s[e],s[e=l[e]]=t);let r=g[e];m(t,r)&&(s[e]=r)}return g=s,s},b={adapter:{},options:{searchStringToObject:function(e){let t=new URLSearchParams(e),r={};for(let[e,a]of t)Object.prototype.hasOwnProperty.call(r,e)?Array.isArray(r[e])?r[e].push(a):r[e]=[r[e],a]:r[e]=a;return r},objectToSearchString:function(e){let t=new URLSearchParams;for(let[r,a]of Object.entries(e))if(void 0!==a&&null!==a)if(Array.isArray(a))for(let e of a)t.append(r,null!=e?e:"");else t.append(r,a);return t.toString()},updateType:"pushIn",includeKnownParams:void 0,includeAllParams:!1,removeDefaultsFromUrl:!1,enableBatching:!1,skipUpdateWhenNoChange:!0}},j=u.createContext(b),M=[];function k(e,t){let{adapter:r,options:a}=function(){let e=u.useContext(j);if(void 0===e||e===b)throw Error("useQueryParams must be used within a QueryParamProvider");return e}(),[o]=(0,u.useState)(y),{paramConfigMap:n,options:s}=function(e,t){let r;return{paramConfigMap:r=void 0===e?{}:Array.isArray(e)?Object.fromEntries(e.map(e=>[e,"inherit"])):e,options:t}}(e,t),i=(0,u.useMemo)(()=>{var e;let t;return null==(e=s)&&(e={}),t={...a,...e},e.params&&a.params&&(t.params={...a.params,...e.params}),t},[a,s]),p=function(e,t){var r,a,o;let n={},s=!1,i=Object.keys(e);if(t.includeKnownParams||!1!==t.includeKnownParams&&0===i.length){let e=Object.keys(null!=(r=t.params)?r:{});i.push(...e)}for(let r of i){let i=e[r];if(null!=i&&"object"==typeof i){n[r]=i;continue}s=!0,n[r]=null!=(o=null==(a=t.params)?void 0:a[r])?o:l}return s?n:e}(n,i),f=v(i.searchStringToObject,r.location.search,function(e){let t;for(let r in e)if(e[r].urlName){let a=e[r].urlName,o=`${a}\0${r}`;t?t.push(o):t=[o]}return t?t.join("\n"):void 0}(p));i.includeAllParams&&(p=c(p,Object.keys(f),i.params,l));let m=o(f,p,d),g=Object.keys(p).join("\0");(0,u.useEffect)(()=>{let e=g.split("\0");return d.registerParams(e),()=>{d.unregisterParams(e)}},[g]);let k={adapter:r,paramConfigMap:p,options:i},w=(0,u.useRef)(k);null==w.current&&(w.current=k),(0,u.useEffect)(()=>{w.current.adapter=r,w.current.paramConfigMap=p,w.current.options=i},[r,p,i]);let[A]=(0,u.useState)(()=>(e,t)=>{let{adapter:r,paramConfigMap:a,options:o}=w.current;null==t&&(t=o.updateType),function(e,{immediate:t}={}){M.push(e),1===M.length&&(t?e=>e():e=>setTimeout(()=>e(),0))(()=>{let t,r=M.slice();M.length=0;let a=r[0].currentSearchString;for(let e=0;e<r.length;++e)t=function({changes:e,updateType:t,currentSearchString:r,paramConfigMap:a,options:o}){let n,s,l,{searchStringToObject:i,objectToSearchString:u}=o;null==t&&(t=o.updateType);let p=v(i,r),f=c(a,Object.keys(e),o.params);return s="function"==typeof e?e(h(p,f,d)):e,n=function(e,t){let r={};for(let a of Object.keys(t)){let o=t[a];e[a]?r[a]=e[a].encode(t[a]):r[a]=null==o?o:String(o)}return r}(f,s),o.removeDefaultsFromUrl&&function(e,t){var r;for(let a in e)(null==(r=t[a])?void 0:r.default)!==void 0&&void 0!==e[a]&&t[a].encode(t[a].default)===e[a]&&(e[a]=void 0)}(n,f),n=function(e,t){var r;let a={};for(let o in e)(null==(r=t[o])?void 0:r.urlName)!=null?a[t[o].urlName]=e[o]:a[o]=e[o];return a}(n,f),(null==(l=u("push"===t||"replace"===t?n:{...p,...n}))?void 0:l.length)&&"?"!==l[0]&&(l=`?${l}`),null!=l?l:""}(0===e?r[e]:{...r[e],currentSearchString:t});e.options.skipUpdateWhenNoChange&&t===a||function({searchString:e,adapter:t,navigate:r,updateType:a}){let o={...t.location,search:e};r&&("string"==typeof a&&a.startsWith("replace")?t.replace(o):t.push(o))}({searchString:null!=t?t:"",adapter:r[r.length-1].adapter,navigate:!0,updateType:r[r.length-1].updateType})})}({changes:e,updateType:t,currentSearchString:r.location.search,paramConfigMap:a,options:o,adapter:r},{immediate:!o.enableBatching})});return[m,A]}let w=(e,t,r)=>{let[a,o]=k((0,u.useMemo)(()=>({[e]:null!=t?t:"inherit"}),[e,t]),r);return[a[e],(0,u.useCallback)((t,r)=>"function"==typeof t?o(r=>{let a=t(r[e]);return{[e]:a}},r):o({[e]:t},r),[e,o])]}},42338(e,t,r){r.d(t,{u:()=>s});var a=r(25511),o=r(72694),n=function(e,t){for(var r={};e.length;){var a=e[0],n=a.code,s=a.message,l=a.path.join(".");if(!r[l])if("unionErrors"in a){var i=a.unionErrors[0].errors[0];r[l]={message:i.message,type:i.code}}else r[l]={message:s,type:n};if("unionErrors"in a&&a.unionErrors.forEach(function(t){return t.errors.forEach(function(t){return e.push(t)})}),t){var u=r[l].types,d=u&&u[a.code];r[l]=(0,o.appendErrors)(l,t,r,n,d?[].concat(d,a.message):a.message)}e.shift()}return r},s=function(e,t,r){return void 0===r&&(r={}),function(o,s,l){try{return Promise.resolve(function(n){try{var s=Promise.resolve(e["sync"===r.mode?"parse":"parseAsync"](o,t)).then(function(e){return l.shouldUseNativeValidation&&(0,a.validateFieldsNatively)({},l),{errors:{},values:r.raw?o:e}})}catch(e){return n(e)}return s&&s.then?s.then(void 0,n):s}(function(e){if(Array.isArray(null==e?void 0:e.errors))return{values:{},errors:(0,a.toNestErrors)(n(e.errors,!l.shouldUseNativeValidation&&"all"===l.criteriaMode),l)};throw e}))}catch(e){return Promise.reject(e)}}}},79756(e,t,r){async function a(...e){let t=await globalThis.fetch(...e);if(!1===t.ok){let e=t.headers.get("content-type");if(e?.includes("application/json")){let e=await t.clone().json();if(e.error)throw new n(e.error,t.status);if(e.message)throw new n(e.message,t.status)}let r=await t.clone().text();if(r)throw new n(r,t.status);throw new o(t)}return t}r.d(t,{to:()=>l,st:()=>H,oy:()=>y,Q9:()=>g,hd:()=>a,Ml:()=>i});class o extends Error{status;constructor(e){super(`${e.status} ${e.statusText}`),this.status=e.status,Object.setPrototypeOf(this,o.prototype)}}class n extends Error{status;constructor(e,t){super(e),this.status=t,Object.setPrototypeOf(this,n.prototype)}}function s(e){return"object"==typeof e&&null!==e}function l(e){return s(e)&&s(e.proxy)&&"HTTPProxy"===e.proxy.kind&&s(e.proxy.spec)&&"string"==typeof e.proxy.spec.url}function i({project:e,dashboard:t}={}){return async(r,o)=>{let n=o.startsWith("/")?o:`/${o}`,s=r.plugin.spec;if("object"==typeof s&&null!==s&&"string"==typeof s.directUrl)await a(new URL(n,s.directUrl).toString(),{method:"GET",headers:{"Content-Type":"application/json"}});else if(l(s)){let o=function({project:e,dashboard:t,name:r}){let a="u">typeof window&&window.PERSES_APP_CONFIG?.api_prefix||"",o=`${!e&&!t?"globaldatasources":"datasources"}`;return t&&(o=`dashboards/${encodeURIComponent(t)}/${o}`),e&&(o=`projects/${encodeURIComponent(e)}/${o}`),o=void 0===r?`unsaved/${o}`:`${o}/${encodeURIComponent(r)}`,`${a}/proxy/${o}`}({project:e,dashboard:t});await a(`${o}${n}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({method:"GET",spec:r,body:null})})}else throw Error(`Unsupported datasource spec type for plugin kind '${r.plugin.kind}'`)}}var u=r(42636),d=r(59140);let c=d.Yj().min(1,"Required").max(75,"Must be 75 or fewer characters long").regex(/^[a-zA-Z0-9_.-]+$/,"Must only contains alphanumerical characters and special characters _ . -"),p=d.Ik({name:c}),f=p.extend({project:c}),m=d.Ik({kind:d.eu("Datasource"),metadata:f,spec:u.datasourceSpecSchema}),h=d.Ik({kind:d.eu("GlobalDatasource"),metadata:p,spec:u.datasourceSpecSchema});d.gM("kind",[m,h]);let y=d.Ik({name:d.Yj().min(1),spec:u.datasourceSpecSchema});function g(e){return d.Ik({name:d.Yj().min(1),spec:(0,u.buildDatasourceSpecSchema)(e)})}let v=d.Ik({password:d.Yj().optional()}),b=d.Ik({issuer:d.Yj().optional(),email:d.Yj().optional(),subject:d.Yj().optional()}),j=d.Ik({firstName:d.Yj().optional(),lastName:d.Yj().optional(),nativeProvider:v.optional(),oauthProviders:d.YO(b).optional()});d.Ik({kind:d.eu("User"),metadata:p,spec:j});var M=r(37830);let k=d.Ik({basicAuth:d.Ik({username:d.Yj().min(1),password:d.Yj().optional(),passwordFile:d.Yj().optional()}).superRefine((e,t)=>{e.password&&e.password.length>0&&e.passwordFile&&e.passwordFile.length>0&&(t.addIssue({code:M.eq.custom,message:"Only one of the fields must be defined",path:["password"]}),t.addIssue({code:M.eq.custom,message:"Only one of the fields must be defined",path:["passwordFile"]}))}).optional(),authorization:d.Ik({type:d.Yj().optional(),credentials:d.Yj().optional(),credentialsFile:d.Yj().optional()}).superRefine((e,t)=>{e.credentials&&e.credentials.length>0&&e.credentialsFile&&e.credentialsFile.length>0&&(t.addIssue({code:M.eq.custom,message:"Only one of the fields must be defined",path:["credentials"]}),t.addIssue({code:M.eq.custom,message:"Only one of the fields must be defined",path:["credentialsFile"]}))}).optional(),oauth:d.Ik({clientID:d.Yj().min(1),clientSecret:d.Yj().optional(),clientSecretFile:d.Yj().optional(),tokenURL:d.Yj().min(1),scopes:d.YO(d.Yj().nonempty()).default([]),endpointParams:d.g1(d.Yj().nonempty(),d.YO(d.Yj())).default({}).optional(),authStyle:d.KC([d.eu(0),d.eu(1),d.eu(2)]).optional()}).superRefine((e,t)=>{e.clientSecret&&e.clientSecret.length>0&&e.clientSecretFile&&e.clientSecretFile.length>0&&(t.addIssue({code:M.eq.custom,message:"Only one of the fields must be defined",path:["clientSecret"]}),t.addIssue({code:M.eq.custom,message:"Only one of the fields must be defined",path:["clientSecretFile"]}))}).optional(),tlsConfig:d.Ik({ca:d.Yj().optional(),cert:d.Yj().optional(),key:d.Yj().optional(),caFile:d.Yj().optional(),certFile:d.Yj().optional(),keyFile:d.Yj().optional(),serverName:d.Yj().optional(),insecureSkipVerify:d.zM().optional()}).superRefine((e,t)=>{e.ca&&e.ca.length>0&&e.caFile&&e.caFile.length>0&&(t.addIssue({code:M.eq.custom,message:"Only one of the fields must be defined",path:["ca"]}),t.addIssue({code:M.eq.custom,message:"Only one of the fields must be defined",path:["caFile"]})),e.cert&&e.cert.length>0&&e.certFile&&e.certFile.length>0&&(t.addIssue({code:M.eq.custom,message:"Only one of the fields must be defined",path:["cert"]}),t.addIssue({code:M.eq.custom,message:"Only one of the fields must be defined",path:["certFile"]})),e.key&&e.key.length>0&&e.keyFile&&e.keyFile.length>0&&(t.addIssue({code:M.eq.custom,message:"Only one of the fields must be defined",path:["key"]}),t.addIssue({code:M.eq.custom,message:"Only one of the fields must be defined",path:["keyFile"]}))}).optional()}).superRefine((e,t)=>{e.basicAuth&&e.authorization&&e.oauth&&(t.addIssue({code:M.eq.custom,message:"Only one of the fields must be defined",path:["basicAuth"]}),t.addIssue({code:M.eq.custom,message:"Only one of the fields must be defined",path:["authorization"]}),t.addIssue({code:M.eq.custom,message:"Only one of the fields must be defined",path:["oauth"]}))}),w=d.Ik({kind:d.eu("Secret"),metadata:f,spec:k}),A=d.Ik({kind:d.eu("GlobalSecret"),metadata:p,spec:k});d.gM("kind",[w,A]);let O=d.Ik({actions:d.YO(d.k5(["*","create","read","update","delete"])).nonempty("Must contains at least 1 action"),scopes:d.YO(d.k5(["*","Dashboard","Datasource","EphemeralDashboard","Folder","GlobalDatasource","GlobalRole","GlobalRoleBinding","GlobalSecret","GlobalVariable","Project","Role","RoleBinding","Secret","User","Variable"])).nonempty("Must contains at least 1 scope")}),P=d.Ik({permissions:d.YO(O)}),S=d.Ik({kind:d.eu("Role"),metadata:f,spec:P}),I=d.Ik({kind:d.eu("GlobalRole"),metadata:p,spec:P});d.gM("kind",[S,I]);let C=d.Ik({kind:d.k5(["User"]),name:c}),R=d.Ik({role:c,subjects:d.YO(C).nonempty()}),_=d.Ik({kind:d.eu("RoleBinding"),metadata:f,spec:R}),x=d.Ik({kind:d.eu("GlobalRoleBinding"),metadata:p,spec:R});d.gM("kind",[_,x]),r(62540);var Y=r(70451);let F=(0,Y.createContext)(a);function H(){let e=(0,Y.useContext)(F),t=(0,Y.useCallback)(async(...t)=>{let r=await e(...t);return await r.json()},[e]);return{fetch:e,fetchJson:t}}}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.chunk_Table_0_14_0_beta_1=self.chunk_Table_0_14_0_beta_1||[]).push([["923"],{75198(e,a,n){n.r(a),n.d(a,{ONE_WEEK_IN_MS:()=>u,querySpecSchema:()=>Q,annotationDisplaySchema:()=>N,buildPanelSpecSchema:()=>F,resolvePanelRef:()=>_,variableDefinitionSchema:()=>ei,variableTextSchema:()=>ea,isTimeSeriesValueTuple:()=>j,otlpresourcev1:()=>i,parseDurationString:()=>c,isValidQueryPluginType:()=>v,ONE_YEAR_IN_MS:()=>p,DURATION_REGEX:()=>d,createPanelRef:()=>g,getSuggestedStepMs:()=>Y,otlpcommonv1:()=>t,variableListSpecSchema:()=>J,variableDisplaySchema:()=>H,DEFAULT_ALL_VALUE:()=>"$__all",ONE_HOUR_IN_MS:()=>o,convertTimeToDuration:()=>h,ONE_MINUTE_IN_MS:()=>6e4,intervalToDuration:()=>M,getPanelKeyFromRef:()=>x,isDurationString:()=>m,panelSpecSchema:()=>K,buildVariableDefinitionSchema:()=>es,otlptracev1:()=>s,annotationSpecSchema:()=>w,buildDatasourceSpecSchema:()=>U,panelDisplaySpec:()=>P,panelDefinitionSchema:()=>B,buildVariableListSchema:()=>Z,datasourceSpecSchema:()=>L,buildVariableSpecSchema:()=>et,isAbsoluteTimeRange:()=>f,ONE_SECOND_IN_MS:()=>1e3,displaySchema:()=>z,variableListSchema:()=>X,variableTextSpecSchema:()=>ee,isValidTraceId:()=>T,roundStepInterval:()=>I,durationValidationSchema:()=>C,toAbsoluteTimeRange:()=>k,buildVariableListSpecSchema:()=>W,buildAnnotationSpecSchema:()=>$,buildPanelDefinitionSchema:()=>G,isRelativeTimeRange:()=>y,linkSchema:()=>q,variableSpecSchema:()=>en,formatDuration:()=>S,ONE_DAY_IN_MS:()=>r,pluginSchema:()=>R,pluginDefinitionMetadataSchema:()=>A});var t={};n.r(t);var i={};n.r(i);var s={};n.r(s),n.d(s,{StatusCodeError:()=>E,StatusCodeOk:()=>D,StatusCodeUnset:()=>O});var l=n(94461);let o=36e5,r=864e5,u=6048e5,p=31536e6,d=/^(?:(\d+)y)?(?:(\d+)w)?(?:(\d+)d)?(?:(\d+)h)?(?:(\d+)m)?(?:(\d+)s)?(?:(\d+)ms)?$/;function c(e){let a=d.exec(e);if(null===a)throw Error(`Invalid duration string '${e}'`);return{years:parseInt(a[1]??"0"),months:0,weeks:parseInt(a[2]??"0"),days:parseInt(a[3]??"0"),hours:parseInt(a[4]??"0"),minutes:parseInt(a[5]??"0"),seconds:parseInt(a[6]??"0")+parseInt(a[7]??"0")/1e3}}function m(e){return""!==e&&d.test(e)}function S(e){let a=[];if(e.years&&a.push(`${e.years}y`),e.weeks&&a.push(`${e.weeks}w`),e.days&&a.push(`${e.days}d`),e.hours&&a.push(`${e.hours}h`),e.minutes&&a.push(`${e.minutes}m`),e.seconds){let n=Math.trunc(e.seconds);n&&a.push(`${n}s`);let t=Math.round((e.seconds-n)*1e3);t&&a.push(`${t}ms`)}return a.join("")}function M(e){return h(e.end.valueOf()-e.start.valueOf())}function h(e){let a=Math.trunc(e/p);a>0&&(e-=a*p);let n=Math.trunc(e/u);n>0&&(e-=n*u);let t=Math.trunc(e/r);t>0&&(e-=t*r);let i=Math.trunc(e/o);i>0&&(e-=i*o);let s=Math.trunc(e/6e4);return s>0&&(e-=6e4*s),{years:a,months:0,weeks:n,days:t,hours:i,minutes:s,seconds:e/1e3}}function y(e){return void 0!==e.pastDuration}function f(e){return void 0!==e.start&&void 0!==e.end}function k(e){let a=e.end??new Date;return{start:(0,l.sub)(a,c(e.pastDuration)),end:a}}let b=[{maxMs:15,roundedStepMs:10,display:"0.01s"},{maxMs:35,roundedStepMs:20,display:"0.02s"},{maxMs:75,roundedStepMs:50,display:"0.05s"},{maxMs:150,roundedStepMs:100,display:"0.1s"},{maxMs:350,roundedStepMs:200,display:"0.2s"},{maxMs:750,roundedStepMs:500,display:"0.5s"},{maxMs:1500,roundedStepMs:1e3,display:"1s"},{maxMs:3500,roundedStepMs:2e3,display:"2s"},{maxMs:7500,roundedStepMs:5e3,display:"5s"},{maxMs:12500,roundedStepMs:1e4,display:"10s"},{maxMs:17500,roundedStepMs:15e3,display:"15s"},{maxMs:25e3,roundedStepMs:2e4,display:"20s"},{maxMs:45e3,roundedStepMs:3e4,display:"30s"},{maxMs:9e4,roundedStepMs:6e4,display:"1m"},{maxMs:21e4,roundedStepMs:12e4,display:"2m"},{maxMs:45e4,roundedStepMs:3e5,display:"5m"},{maxMs:75e4,roundedStepMs:6e5,display:"10m"},{maxMs:75e4,roundedStepMs:9e5,display:"15m"},{maxMs:15e5,roundedStepMs:12e5,display:"20m"},{maxMs:27e5,roundedStepMs:18e5,display:"30m"},{maxMs:54e5,roundedStepMs:36e5,display:"1h"},{maxMs:9e6,roundedStepMs:72e5,display:"2h"},{maxMs:162e5,roundedStepMs:108e5,display:"3h"},{maxMs:324e5,roundedStepMs:216e5,display:"6h"},{maxMs:864e5,roundedStepMs:432e5,display:"12h"},{maxMs:6048e5,roundedStepMs:864e5,display:"1d"},{maxMs:18144e5,roundedStepMs:6048e5,display:"1w"},{maxMs:36288e5,roundedStepMs:2592e6,display:"30d"},{maxMs:63072e6,roundedStepMs:31536e6,display:"1y"}];function I(e){for(let{maxMs:a,roundedStepMs:n}of b)if(e<a)return n;return 15e3}function Y(e,a){return I(Math.floor((e.end.valueOf()-e.start.valueOf())/a))}function _(e,a){let n=x(a),t=e.panels[n];if(void 0===t)throw Error(`Could not resolve panels reference ${a.$ref}`);return t}function x(e){return e.$ref.substring(14)}function g(e){return{$ref:`#/spec/panels/${e}`}}function v(e){return["TimeSeriesQuery","TraceQuery","ProfileQuery","LogQuery","AlertsQuery","SilencesQuery","JsonQuery"].includes(e)}function j(e){return 2===e.length}function T(e){return/^[0-9a-fA-F]+$/.test(e)}let O="STATUS_CODE_UNSET",D="STATUS_CODE_OK",E="STATUS_CODE_ERROR";var V=n(59140);let A=V.Ik({version:V.Yj().optional(),registry:V.Yj().optional()}),R=V.Ik({kind:V.Yj().min(1,"Required"),metadata:A.optional(),spec:V.g1(V.Yj(),V.bz())}),N=V.Ik({name:V.Yj(),description:V.Yj().optional(),hidden:V.zM().optional(),color:V.Yj().optional()});function $(e){return V.Ik({display:N,plugin:e})}let w=V.Ik({display:N,plugin:R}),z=V.Ik({name:V.Yj().optional(),description:V.Yj().optional()}),L=V.Ik({display:z.optional(),default:V.zM(),plugin:R});function U(e){return V.Ik({display:z.optional(),default:V.zM(),plugin:e})}let C=V.Yj().min(1,"Required").regex(d,"Must be a valid duration string"),P=V.Ik({name:V.Yj().optional(),description:V.Yj().optional()}),Q=V.Ik({kind:V.Yj().min(1),spec:V.Ik({name:V.Yj().optional(),plugin:R})}),q=V.Ik({name:V.Yj().optional(),url:V.Yj().min(1),tooltip:V.Yj().optional(),renderVariables:V.zM().optional(),targetBlank:V.zM().optional()}),K=V.Ik({display:P.optional(),plugin:R,queries:V.YO(Q).optional(),links:V.YO(q).optional(),annotations:V.YO(w).optional()});function F(e){return V.Ik({display:P.optional(),plugin:e,queries:V.YO(Q).optional(),links:V.YO(q).optional(),annotations:V.YO(w).optional()})}let B=V.Ik({kind:V.eu("Panel"),spec:K});function G(e){return V.Ik({kind:V.eu("Panel"),spec:F(e)})}let H=V.Ik({name:V.Yj().optional(),description:V.Yj().optional(),hidden:V.zM().optional()}),J=V.Ik({name:V.Yj().min(1),display:H.optional(),defaultValue:V.Yj().or(V.YO(V.Yj())).optional(),allowAllValue:V.zM(),allowMultiple:V.zM(),customAllValue:V.Yj().optional(),capturingRegexp:V.Yj().optional(),sort:V.k5(["none","alphabetical-asc","alphabetical-desc","numerical-asc","numerical-desc","alphabetical-ci-asc","alphabetical-ci-desc"]).optional(),plugin:R});function W(e){return V.Ik({name:V.Yj().min(1),display:H.optional(),defaultValue:V.Yj().or(V.YO(V.Yj())).optional(),allowAllValue:V.zM(),allowMultiple:V.zM(),customAllValue:V.Yj().optional(),capturingRegexp:V.Yj().optional(),sort:V.k5(["none","alphabetical-asc","alphabetical-desc","numerical-asc","numerical-desc","alphabetical-ci-asc","alphabetical-ci-desc"]).optional(),plugin:e})}let X=V.Ik({kind:V.eu("ListVariable"),spec:J});function Z(e){return V.Ik({kind:V.eu("ListVariable"),spec:W(e)})}let ee=V.Ik({name:V.Yj().min(1),display:H.optional(),value:V.Yj(),constant:V.zM().optional()}),ea=V.Ik({kind:V.eu("TextVariable"),spec:ee}),en=V.gM("kind",[ea,X]);function et(e){return V.KC([ea,Z(e)])}let ei=en;function es(e){return V.gM("kind",[V.Ik({kind:V.eu("ListVariable"),spec:W(e)}),V.Ik({kind:V.eu("TextVariable"),spec:ee})])}}}]);
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/*! For license information please see 941.08c16cb2.js.LICENSE.txt */
|
|
2
|
+
"use strict";(self.chunk_Table_0_14_0_beta_1=self.chunk_Table_0_14_0_beta_1||[]).push([["941"],{7470(e,r,t){var o=t(20231);r.createRoot=o.createRoot,r.hydrateRoot=o.hydrateRoot},2192(e,r,t){var o=t(70451),_=Symbol.for("react.element"),a=Symbol.for("react.fragment"),n=Object.prototype.hasOwnProperty,f=o.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,l={key:!0,ref:!0,__self:!0,__source:!0};function s(e,r,t){var o,a={},s=null,c=null;for(o in void 0!==t&&(s=""+t),void 0!==r.key&&(s=""+r.key),void 0!==r.ref&&(c=r.ref),r)n.call(r,o)&&!l.hasOwnProperty(o)&&(a[o]=r[o]);if(e&&e.defaultProps)for(o in r=e.defaultProps)void 0===a[o]&&(a[o]=r[o]);return{$$typeof:_,type:e,key:s,ref:c,props:a,_owner:f.current}}r.Fragment=a,r.jsx=s,r.jsxs=s},62540(e,r,t){e.exports=t(2192)},86604(e,r,t){t.r(r);var o=t(62540),_=t(70451),a=t.n(_);t(7470).createRoot(document.getElementById("root")).render((0,o.jsx)(a().StrictMode,{}))}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.chunk_Table_0_14_0_beta_1=self.chunk_Table_0_14_0_beta_1||[]).push([["968"],{75150(e,t,s){s.r(t),s.d(t,{toNestErrors:()=>a,validateFieldsNatively:()=>l});var i=s(72694);let r=(e,t,s)=>{if(e&&"reportValidity"in e){let r=(0,i.get)(s,t);e.setCustomValidity(r&&r.message||""),e.reportValidity()}},l=(e,t)=>{for(let s in t.fields){let i=t.fields[s];i&&i.ref&&"reportValidity"in i.ref?r(i.ref,s,e):i.refs&&i.refs.forEach(t=>r(t,s,e))}},a=(e,t)=>{t.shouldUseNativeValidation&&l(e,t);let s={};for(let r in e){let l=(0,i.get)(t.fields,r),a=Object.assign(e[r]||{},{ref:l&&l.ref});if(f(t.names||Object.keys(e),r)){let e=Object.assign({},(0,i.get)(s,r));(0,i.set)(e,"root",a),(0,i.set)(s,r,e)}else(0,i.set)(s,r,a)}return s},f=(e,t)=>e.some(e=>e.startsWith(t+"."))}}]);
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
(self.chunk_Table_0_14_0_beta_1=self.chunk_Table_0_14_0_beta_1||[]).push([["985"],{42927(e,t,r){"use strict";r.d(t,{A:()=>R});var n=r(70451),o=r(11750),a=r(81023),i=r(59238),s=r(32560),l=r(22402),p=r(62540);let c=(0,l.A)((0,p.jsx)("path",{d:"M19 5v14H5V5h14m0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z"}),"CheckBoxOutlineBlank"),u=(0,l.A)((0,p.jsx)("path",{d:"M19 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.11 0 2-.9 2-2V5c0-1.1-.89-2-2-2zm-9 14l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"}),"CheckBox"),d=(0,l.A)((0,p.jsx)("path",{d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-2 10H7v-2h10v2z"}),"IndeterminateCheckBox");var h=r(24726),m=r(83926),y=r(29009),v=r(46733);function f(e){return(0,v.Ay)("MuiCheckbox",e)}let b=(0,y.A)("MuiCheckbox",["root","checked","disabled","indeterminate","colorPrimary","colorSecondary","sizeSmall","sizeMedium"]);var A=r(77308),g=r(23434),k=r(26952),x=r(72052),C=r(64606),w=r(73397);let M=(0,A.A)(s.A,{shouldForwardProp:e=>(0,m.A)(e)||"classes"===e,name:"MuiCheckbox",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:r}=e;return[t.root,r.indeterminate&&t.indeterminate,t[`size${(0,h.A)(r.size)}`],"default"!==r.color&&t[`color${(0,h.A)(r.color)}`]]}})((0,g.A)(({theme:e})=>({color:(e.vars||e).palette.text.secondary,variants:[{props:{color:"default",disableRipple:!1},style:{"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.activeChannel} / ${e.vars.palette.action.hoverOpacity})`:(0,i.X4)(e.palette.action.active,e.palette.action.hoverOpacity)}}},...Object.entries(e.palette).filter((0,k.A)()).map(([t])=>({props:{color:t,disableRipple:!1},style:{"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette[t].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:(0,i.X4)(e.palette[t].main,e.palette.action.hoverOpacity)}}})),...Object.entries(e.palette).filter((0,k.A)()).map(([t])=>({props:{color:t},style:{[`&.${b.checked}, &.${b.indeterminate}`]:{color:(e.vars||e).palette[t].main},[`&.${b.disabled}`]:{color:(e.vars||e).palette.action.disabled}}})),{props:{disableRipple:!1},style:{"&:hover":{"@media (hover: none)":{backgroundColor:"transparent"}}}}]}))),$=(0,p.jsx)(u,{}),S=(0,p.jsx)(c,{}),_=(0,p.jsx)(d,{}),R=n.forwardRef(function(e,t){let r=(0,x.b)({props:e,name:"MuiCheckbox"}),{checkedIcon:i=$,color:s="primary",icon:l=S,indeterminate:c=!1,indeterminateIcon:u=_,inputProps:d,size:m="medium",disableRipple:y=!1,className:v,slots:b={},slotProps:A={},...g}=r,k=c?u:l,R=c?u:i,L={...r,disableRipple:y,color:s,indeterminate:c,size:m},O=(e=>{let{classes:t,indeterminate:r,color:n,size:o}=e,i={root:["root",r&&"indeterminate",`color${(0,h.A)(n)}`,`size${(0,h.A)(o)}`]},s=(0,a.A)(i,f,t);return{...t,...s}})(L),P=A.input??d,[V,z]=(0,w.A)("root",{ref:t,elementType:M,className:(0,o.A)(O.root,v),shouldForwardComponentProp:!0,externalForwardedProps:{slots:b,slotProps:A,...g},ownerState:L,additionalProps:{type:"checkbox",icon:n.cloneElement(k,{fontSize:k.props.fontSize??m}),checkedIcon:n.cloneElement(R,{fontSize:R.props.fontSize??m}),disableRipple:y,slots:b,slotProps:{input:(0,C.A)("function"==typeof P?P(L):P,{"data-indeterminate":c})}}});return(0,p.jsx)(V,{...z,classes:O})})},57438(e,t,r){"use strict";r.d(t,{A:()=>g});var n=r(70451),o=r(11750),a=r(59238),i=r(81023),s=r(93399),l=r(24726),p=r(77308),c=r(56599),u=r(23434),d=r(26952),h=r(72052),m=r(88091),y=r(82561),v=r(95279),f=r(62540);let b={primary:!0,secondary:!0,error:!0,info:!0,success:!0,warning:!0,textPrimary:!0,textSecondary:!0,textDisabled:!0},A=(0,p.A)(m.A,{name:"MuiLink",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:r}=e;return[t.root,t[`underline${(0,l.A)(r.underline)}`],"button"===r.component&&t.button]}})((0,u.A)(({theme:e})=>({variants:[{props:{underline:"none"},style:{textDecoration:"none"}},{props:{underline:"hover"},style:{textDecoration:"none","&:hover":{textDecoration:"underline"}}},{props:{underline:"always"},style:{textDecoration:"underline","&:hover":{textDecorationColor:"inherit"}}},{props:({underline:e,ownerState:t})=>"always"===e&&"inherit"!==t.color,style:{textDecorationColor:"var(--Link-underlineColor)"}},...Object.entries(e.palette).filter((0,d.A)()).map(([t])=>({props:{underline:"always",color:t},style:{"--Link-underlineColor":e.vars?`rgba(${e.vars.palette[t].mainChannel} / 0.4)`:(0,a.X4)(e.palette[t].main,.4)}})),{props:{underline:"always",color:"textPrimary"},style:{"--Link-underlineColor":e.vars?`rgba(${e.vars.palette.text.primaryChannel} / 0.4)`:(0,a.X4)(e.palette.text.primary,.4)}},{props:{underline:"always",color:"textSecondary"},style:{"--Link-underlineColor":e.vars?`rgba(${e.vars.palette.text.secondaryChannel} / 0.4)`:(0,a.X4)(e.palette.text.secondary,.4)}},{props:{underline:"always",color:"textDisabled"},style:{"--Link-underlineColor":(e.vars||e).palette.text.disabled}},{props:{component:"button"},style:{position:"relative",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle",MozAppearance:"none",WebkitAppearance:"none","&::-moz-focus-inner":{borderStyle:"none"},[`&.${y.A.focusVisible}`]:{outline:"auto"}}}]}))),g=n.forwardRef(function(e,t){let r=(0,h.b)({props:e,name:"MuiLink"}),p=(0,c.A)(),{className:u,color:d="primary",component:m="a",onBlur:g,onFocus:k,TypographyClasses:x,underline:C="always",variant:w="inherit",sx:M,...$}=r,[S,_]=n.useState(!1),R={...r,color:d,component:m,focusVisible:S,underline:C,variant:w},L=(e=>{let{classes:t,component:r,focusVisible:n,underline:o}=e,a={root:["root",`underline${(0,l.A)(o)}`,"button"===r&&"button",n&&"focusVisible"]};return(0,i.A)(a,y.t,t)})(R);return(0,f.jsx)(A,{color:d,className:(0,o.A)(L.root,u),classes:x,component:m,onBlur:e=>{(0,s.A)(e.target)||_(!1),g&&g(e)},onFocus:e=>{(0,s.A)(e.target)&&_(!0),k&&k(e)},ref:t,ownerState:R,variant:w,...$,sx:[...void 0===b[d]?[{color:d}]:[],...Array.isArray(M)?M:[M]],style:{...$.style,..."always"===C&&"inherit"!==d&&!b[d]&&{"--Link-underlineColor":(({theme:e,ownerState:t})=>{let r=t.color,n=(0,v.Yn)(e,`palette.${r}.main`,!1)||(0,v.Yn)(e,`palette.${r}`,!1)||t.color,o=(0,v.Yn)(e,`palette.${r}.mainChannel`)||(0,v.Yn)(e,`palette.${r}Channel`);return"vars"in e&&o?`rgba(${o} / 0.4)`:(0,a.X4)(n,.4)})({theme:p,ownerState:R})}}})})},82561(e,t,r){"use strict";r.d(t,{A:()=>i,t:()=>a});var n=r(29009),o=r(46733);function a(e){return(0,o.Ay)("MuiLink",e)}let i=(0,n.A)("MuiLink",["root","underlineNone","underlineHover","underlineAlways","button","focusVisible"])},33313(e,t,r){"use strict";r.d(t,{A:()=>g});var n=r(70451),o=r(11750),a=r(81023),i=r(59238),s=r(69402),l=r(77308),p=r(23434),c=r(72052),u=r(29009),d=r(46733);function h(e){return(0,d.Ay)("MuiSkeleton",e)}(0,u.A)("MuiSkeleton",["root","text","rectangular","rounded","circular","pulse","wave","withChildren","fitContent","heightAuto"]);var m=r(62540);let y=(0,s.keyframes)`
|
|
2
|
+
0% {
|
|
3
|
+
opacity: 1;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
50% {
|
|
7
|
+
opacity: 0.4;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
100% {
|
|
11
|
+
opacity: 1;
|
|
12
|
+
}
|
|
13
|
+
`,v=(0,s.keyframes)`
|
|
14
|
+
0% {
|
|
15
|
+
transform: translateX(-100%);
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
50% {
|
|
19
|
+
/* +0.5s of delay between each loop */
|
|
20
|
+
transform: translateX(100%);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
100% {
|
|
24
|
+
transform: translateX(100%);
|
|
25
|
+
}
|
|
26
|
+
`,f="string"!=typeof y?(0,s.css)`
|
|
27
|
+
animation: ${y} 2s ease-in-out 0.5s infinite;
|
|
28
|
+
`:null,b="string"!=typeof v?(0,s.css)`
|
|
29
|
+
&::after {
|
|
30
|
+
animation: ${v} 2s linear 0.5s infinite;
|
|
31
|
+
}
|
|
32
|
+
`:null,A=(0,l.A)("span",{name:"MuiSkeleton",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:r}=e;return[t.root,t[r.variant],!1!==r.animation&&t[r.animation],r.hasChildren&&t.withChildren,r.hasChildren&&!r.width&&t.fitContent,r.hasChildren&&!r.height&&t.heightAuto]}})((0,p.A)(({theme:e})=>{let t=String(e.shape.borderRadius).match(/[\d.\-+]*\s*(.*)/)[1]||"px",r=parseFloat(e.shape.borderRadius);return{display:"block",backgroundColor:e.vars?e.vars.palette.Skeleton.bg:(0,i.X4)(e.palette.text.primary,"light"===e.palette.mode?.11:.13),height:"1.2em",variants:[{props:{variant:"text"},style:{marginTop:0,marginBottom:0,height:"auto",transformOrigin:"0 55%",transform:"scale(1, 0.60)",borderRadius:`${r}${t}/${Math.round(r/.6*10)/10}${t}`,"&:empty:before":{content:'"\\00a0"'}}},{props:{variant:"circular"},style:{borderRadius:"50%"}},{props:{variant:"rounded"},style:{borderRadius:(e.vars||e).shape.borderRadius}},{props:({ownerState:e})=>e.hasChildren,style:{"& > *":{visibility:"hidden"}}},{props:({ownerState:e})=>e.hasChildren&&!e.width,style:{maxWidth:"fit-content"}},{props:({ownerState:e})=>e.hasChildren&&!e.height,style:{height:"auto"}},{props:{animation:"pulse"},style:f||{animation:`${y} 2s ease-in-out 0.5s infinite`}},{props:{animation:"wave"},style:{position:"relative",overflow:"hidden",WebkitMaskImage:"-webkit-radial-gradient(white, black)","&::after":{background:`linear-gradient(
|
|
33
|
+
90deg,
|
|
34
|
+
transparent,
|
|
35
|
+
${(e.vars||e).palette.action.hover},
|
|
36
|
+
transparent
|
|
37
|
+
)`,content:'""',position:"absolute",transform:"translateX(-100%)",bottom:0,left:0,right:0,top:0}}},{props:{animation:"wave"},style:b||{"&::after":{animation:`${v} 2s linear 0.5s infinite`}}}]}})),g=n.forwardRef(function(e,t){let r=(0,c.b)({props:e,name:"MuiSkeleton"}),{animation:n="pulse",className:i,component:s="span",height:l,style:p,variant:u="text",width:d,...y}=r,v={...r,animation:n,component:s,variant:u,hasChildren:!!y.children},f=(e=>{let{classes:t,variant:r,animation:n,hasChildren:o,width:i,height:s}=e;return(0,a.A)({root:["root",r,n,o&&"withChildren",o&&!i&&"fitContent",o&&!s&&"heightAuto"]},h,t)})(v);return(0,m.jsx)(A,{as:s,ref:t,className:(0,o.A)(f.root,i),ownerState:v,...y,style:{width:d,height:l,...p}})})},8072(e,t,r){"use strict";r.d(t,{A:()=>p});var n=r(70451),o=r(31789),a=r(70320),i=r(45827);let s={...n}.useSyncExternalStore;function l(e={}){let{themeId:t}=e;return function(e,r={}){let l=(0,i.A)();l&&t&&(l=l[t]||l);let p="u">typeof window&&void 0!==window.matchMedia,{defaultMatches:c=!1,matchMedia:u=p?window.matchMedia:null,ssrMatchMedia:d=null,noSsr:h=!1}=(0,a.A)({name:"MuiUseMediaQuery",props:r,theme:l}),m="function"==typeof e?e(l):e;return(m=m.replace(/^@media( ?)/m,"")).includes("print")&&console.warn("MUI: You have provided a `print` query to the `useMediaQuery` hook.\nUsing the print media query to modify print styles can lead to unexpected results.\nConsider using the `displayPrint` field in the `sx` prop instead.\nMore information about `displayPrint` on our docs: https://mui.com/system/display/#display-in-print."),(void 0!==s?function(e,t,r,o,a){let i=n.useCallback(()=>t,[t]),l=n.useMemo(()=>{if(a&&r)return()=>r(e).matches;if(null!==o){let{matches:t}=o(e);return()=>t}return i},[i,e,o,a,r]),[p,c]=n.useMemo(()=>{if(null===r)return[i,()=>()=>{}];let t=r(e);return[()=>t.matches,e=>(t.addEventListener("change",e),()=>{t.removeEventListener("change",e)})]},[i,r,e]);return s(c,p,l)}:function(e,t,r,a,i){let[s,l]=n.useState(()=>i&&r?r(e).matches:a?a(e).matches:t);return(0,o.A)(()=>{if(!r)return;let t=r(e),n=()=>{l(t.matches)};return n(),t.addEventListener("change",n),()=>{t.removeEventListener("change",n)}},[e,r]),s})(m,c,u,d,h)}}l();let p=l({themeId:r(93724).A})},29917(e,t,r){"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,t.default=(0,((n=r(1448))&&n.__esModule?n:{default:n}).default)("M16,12V4H17V2H7V4H8V12L6,14V16H11.2V22H12.8V16H18V14L16,12M8.8,14L10,12.8V4H14V12.8L15.2,14H8.8Z","PinOutline")},40362(e,t,r){"use strict";var n=r(56441);function o(){}function a(){}a.resetWarningCache=o,e.exports=function(){function e(e,t,r,o,a,i){if(i!==n){var s=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 s.name="Invariant Violation",s}}function t(){return e}e.isRequired=e;var r={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:a,resetWarningCache:o};return r.PropTypes=r,r}},62688(e,t,r){e.exports=r(40362)()},56441(e){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.chunk_Table_0_14_0_beta_1=self.chunk_Table_0_14_0_beta_1||[]).push([["669"],{54042(e,t,n){var l;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,t.default=(0,((l=n(1448))&&l.__esModule?l:{default:l}).default)("M5,20H19V18H5M19,9H15V3H9V9H5L12,16L19,9Z","Download")},42524(e,t,n){var l;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,t.default=(0,((l=n(1448))&&l.__esModule?l:{default:l}).default)("M19,13H5V11H19V13Z","Minus")},38019(e,t,n){n.r(t),n.d(t,{Table:()=>el});var l=n(62540),i=n(54381),o=n(315),r=n(93648),a=n(97653),s=n(88091),d=n(47095),u=n(65211),c=n(6227),h=n(7013),p=n(56875),g=n(86067),x=n(86742),f=n(70451),m=n.n(f);function v(e){let t=e.trim();if(""===t)return;let n=Number(t);return Number.isNaN(n)?void 0:n}function b(e,t){for(let l of t)if(function(e,t){var n,l,i,o,r,a,s;switch(e.kind){case"Value":return(null==(n=e.spec)?void 0:n.value)===String(t);case"Range":{if(Number.isNaN(Number(t)))return!1;let n=Number(t);if((null==(l=e.spec)?void 0:l.min)!==void 0&&(null==(i=e.spec)?void 0:i.max)!==void 0)return n>=+e.spec.min&&n<=+e.spec.max;if((null==(o=e.spec)?void 0:o.min)!==void 0)return n>=+e.spec.min;if((null==(r=e.spec)?void 0:r.max)!==void 0)return n<=+e.spec.max;return!1}case"Regex":if(!(null==(a=e.spec)?void 0:a.expr))return!1;try{return new RegExp(e.spec.expr).test(String(t))}catch{return!1}case"Misc":switch(null==(s=e.spec)?void 0:s.value){case"empty":return""===t;case"null":return null==t;case"NaN":return Number.isNaN(t);case"true":return!0===t;case"false":return!1===t;default:return!1}default:return!1}}(l.condition,e)){let t;if("Misc"===l.condition.kind){var n;switch(null==(n=l.condition.spec)?void 0:n.value){case"null":t="null";break;case"NaN":t="NaN"}}return function(e,t,n){let l=t.text||n||String(e);return{text:`${t.prefix??""}${l}${t.suffix??""}`,textColor:t.textColor,backgroundColor:t.backgroundColor}}(e,l,t)}}function j(e){let{cell:t,onChange:n,onDelete:c,...h}=e;return(0,l.jsxs)(i.A,{container:!0,spacing:2,...h,children:[(0,l.jsx)(i.A,{size:{xs:5},children:(0,l.jsxs)(o.A,{direction:"row",gap:1,width:"100%",children:[(0,l.jsxs)(r.A,{select:!0,label:"Type",value:t.condition.kind,onChange:e=>n({...t,condition:{kind:e.target.value}}),required:!0,sx:{width:"120px"},children:[(0,l.jsx)(a.A,{value:"Value",children:(0,l.jsxs)(o.A,{children:[(0,l.jsx)(s.A,{children:"Value"}),"Value"!==t.condition.kind&&(0,l.jsx)(s.A,{variant:"caption",children:"Matches an exact text value"})]})}),(0,l.jsx)(a.A,{value:"Range",children:(0,l.jsxs)(o.A,{children:[(0,l.jsx)(s.A,{children:"Range"}),"Range"!==t.condition.kind&&(0,l.jsx)(s.A,{variant:"caption",children:"Matches against a numerical range"})]})}),(0,l.jsx)(a.A,{value:"Regex",children:(0,l.jsxs)(o.A,{children:[(0,l.jsx)(s.A,{children:"Regex"}),"Regex"!==t.condition.kind&&(0,l.jsx)(s.A,{variant:"caption",children:"Matches against a regular expression"})]})}),(0,l.jsx)(a.A,{value:"Misc",children:(0,l.jsxs)(o.A,{children:[(0,l.jsx)(s.A,{children:"Misc"}),"Misc"!==t.condition.kind&&(0,l.jsx)(s.A,{variant:"caption",children:"Matches against empty, null and NaN values"})]})})]}),function(e,t){var n,l,i,d,u;let c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"small";return"Value"===e.kind?m().createElement(r.A,{label:"Value",placeholder:"Exact value",value:(null==(n=e.spec)?void 0:n.value)??"",onChange:n=>t({...e,spec:{value:n.target.value}}),fullWidth:!0,size:c}):"Range"===e.kind?m().createElement(o.A,{gap:1,direction:"row"},[m().createElement(r.A,{key:"min",label:"From",placeholder:"Start of range",value:(null==(l=e.spec)?void 0:l.min)??"",onChange:n=>{let l=v(n.target.value);t({...e,spec:{...e.spec,min:l}})},type:"number",slotProps:{htmlInput:{step:"any"}},fullWidth:!0,size:c}),m().createElement(r.A,{key:"max",label:"To",placeholder:"End of range (inclusive)",value:(null==(i=e.spec)?void 0:i.max)??"",onChange:n=>{let l=v(n.target.value);t({...e,spec:{...e.spec,max:l}})},type:"number",slotProps:{htmlInput:{step:"any"}},fullWidth:!0,size:c})]):"Regex"===e.kind?m().createElement(r.A,{label:"Regular Expression",placeholder:"JavaScript regular expression",value:(null==(d=e.spec)?void 0:d.expr)??"",onChange:n=>t({...e,spec:{expr:n.target.value}}),fullWidth:!0,size:c}):"Misc"===e.kind?m().createElement(r.A,{select:!0,label:"Value",value:(null==(u=e.spec)?void 0:u.value)??"",onChange:n=>t({...e,spec:{value:n.target.value}}),fullWidth:!0,size:c},[{value:"empty",label:"Empty",caption:"Matches empty string"},{value:"null",label:"Null",caption:"Matches null or undefined"},{value:"NaN",label:"NaN",caption:"Matches Not a Number value"},{value:"true",label:"True",caption:"Matches true boolean"},{value:"false",label:"False",caption:"Matches false boolean"}].map(e=>m().createElement(a.A,{key:e.value,value:e.value},m().createElement(o.A,{key:"stack"},[m().createElement(s.A,{key:"title"},e.label),m().createElement(s.A,{key:"caption",variant:"caption"},e.caption)])))):null}(t.condition,e=>n({...t,condition:e}),"small")]})}),(0,l.jsx)(i.A,{size:{xs:4},children:(0,l.jsxs)(o.A,{spacing:1,children:[(0,l.jsx)(r.A,{label:"Display text",value:t.text,onChange:e=>n({...t,text:e.target.value}),fullWidth:!0,size:"small"}),(0,l.jsxs)(o.A,{direction:"row",spacing:1,children:[(0,l.jsx)(r.A,{label:"Prefix",placeholder:"$",value:t.prefix??"",onChange:e=>n({...t,prefix:e.target.value}),size:"small"}),(0,l.jsx)(r.A,{label:"Suffix",placeholder:"%",value:t.suffix??"",onChange:e=>n({...t,suffix:e.target.value}),size:"small"})]})]})}),(0,l.jsx)(i.A,{size:{xs:1},children:(0,l.jsx)(o.A,{direction:"row",justifyContent:"center",gap:1,children:t.textColor?(0,l.jsx)(p.OptionsColorPicker,{label:"Text Color",color:t.textColor??"#000",onColorChange:e=>n({...t,textColor:e}),onClear:()=>n({...t,textColor:void 0})}):(0,l.jsx)(d.A,{onClick:()=>n({...t,textColor:"#000"}),children:(0,l.jsx)(x.default,{})})})}),(0,l.jsx)(i.A,{size:{xs:1},children:(0,l.jsx)(o.A,{direction:"row",justifyContent:"center",children:t.backgroundColor?(0,l.jsx)(p.OptionsColorPicker,{label:"Background Color",color:t.backgroundColor??"#fff",onColorChange:e=>n({...t,backgroundColor:e}),onClear:()=>n({...t,backgroundColor:void 0})}):(0,l.jsx)(d.A,{onClick:()=>n({...t,backgroundColor:"#000"}),children:(0,l.jsx)(x.default,{})})})}),(0,l.jsx)(i.A,{size:{xs:1},textAlign:"end",children:(0,l.jsx)(u.A,{title:"Remove cell settings",placement:"top",children:(0,l.jsx)(d.A,{size:"small",sx:{marginLeft:"auto"},onClick:c,children:(0,l.jsx)(g.default,{})},"delete-cell-button")})})]})}function C(e){let{cellSettings:t=[],onChange:n,addButtonText:r="Add Conditional Format"}=e;return(0,l.jsxs)(o.A,{spacing:3,sx:{mt:2},children:[(0,l.jsxs)(i.A,{container:!0,spacing:3,children:[(0,l.jsx)(i.A,{size:{xs:5},children:(0,l.jsx)(s.A,{variant:"subtitle1",children:"Condition"})}),(0,l.jsx)(i.A,{size:{xs:4},children:(0,l.jsx)(s.A,{variant:"subtitle1",children:"Display Text"})}),(0,l.jsx)(i.A,{size:{xs:1},textAlign:"center",children:(0,l.jsx)(s.A,{variant:"subtitle1",children:"Color"})}),(0,l.jsx)(i.A,{size:{xs:1},textAlign:"center",children:(0,l.jsx)(s.A,{variant:"subtitle1",children:"Background"})}),(0,l.jsx)(i.A,{size:{xs:1}})]}),(0,l.jsx)(o.A,{gap:1.5,divider:(0,l.jsx)(c.A,{flexItem:!0,orientation:"horizontal"}),children:t.map((e,i)=>(0,l.jsx)(j,{cell:e,onChange:e=>{let l;(l=[...t])[i]=e,n(l)},onDelete:()=>{let e;(e=[...t]).splice(i,1),n(e.length>0?e:void 0)}},i))}),(0,l.jsx)(h.A,{variant:"outlined",startIcon:(0,l.jsx)(x.default,{}),sx:{marginTop:1},onClick:()=>{let e=[...t];e.push({condition:{kind:"Value",spec:{value:""}}}),n(e)},children:r})]})}function y(e){let{cellSettings:t,onChange:n}=e;return(0,l.jsx)(C,{cellSettings:t,onChange:e=>n(e||[])})}var A=n(68003),S=n(12138),k=n(9222),w=n(42524);let E=e=>{let{onChange:t,column:n,column:{dataLink:i}}=e;if(!i)return(0,l.jsxs)(o.A,{sx:{width:"100%",alignItems:"center"},direction:"row",children:[(0,l.jsx)(s.A,{flex:1,variant:"subtitle1",mb:2,fontStyle:"italic",children:"No link defined"}),(0,l.jsx)(d.A,{style:{width:"fit-content",height:"fit-content"},onClick:()=>t({...n,dataLink:{url:"",openNewTab:!0,title:""}}),children:(0,l.jsx)(x.default,{})})]});let{url:r,openNewTab:a,title:u}=i;return(0,l.jsxs)(o.A,{sx:{width:"100%",alignItems:"center"},direction:"row",children:[(0,l.jsx)(p.LinkEditorForm,{mode:"inline",url:{label:"Url",onChange:e=>{t({...n,dataLink:{...i,url:e}})},value:r,placeholder:"URL",error:{hasError:!1,helperText:""}},name:{label:"Name",onChange:e=>{t({...n,dataLink:{...i,title:e}})},value:u??"",placeholder:"Name"},newTabOpen:{label:"Open in new tab",onChange:e=>{t({...n,dataLink:{...i,openNewTab:e}})},value:a}}),(0,l.jsx)(d.A,{style:{width:"fit-content",height:"fit-content"},onClick:()=>{t({...n,dataLink:void 0})},children:(0,l.jsx)(w.default,{})})]})};var O=n(25742),M=n(25632),z=n.n(M);function R(e,t){let n=e.createInitialOptions()??{};return z()({},n,t??{})}function T(e){let{kind:t,spec:n,onChange:i}=e,{data:r,isLoading:a,isError:d,error:u}=(0,k.usePlugin)("Panel",t),c=(0,f.useMemo)(()=>r?R(r,n):n,[r,n]),h=(0,f.useRef)(i);if(h.current=i,(0,f.useEffect)(()=>{r&&(null==n||"object"==typeof n&&0===Object.keys(n).length)&&h.current(R(r,n))},[r,t,n]),a)return(0,l.jsxs)(o.A,{direction:"row",alignItems:"center",spacing:1,sx:{py:1},children:[(0,l.jsx)(O.A,{size:22}),(0,l.jsx)(s.A,{variant:"body2",color:"text.secondary",children:"Loading panel settings…"})]});if(d||!r)return(0,l.jsx)(s.A,{variant:"body2",color:"error",children:(null==u?void 0:u.message)??"Could not load panel plugin."});let p=r.panelOptionsEditorComponents??[];return 0===p.length?(0,l.jsx)(s.A,{variant:"body2",color:"text.secondary",children:"This visualization has no editable settings."}):(0,l.jsx)(o.A,{spacing:2.5,sx:{width:"100%",py:1},children:(0,l.jsx)(k.OptionsEditorTabs,{tabs:p.map(e=>{let t=e.content;return{label:e.label,content:(0,l.jsx)(t,{value:c,onChange:e=>{i(e)}})}})})})}let N={unit:"decimal",shortValues:!0};function D(e){var t,n;let{column:i,onChange:a,defaultEnableSorting:d=!1,...u}=e,[c,g]=(0,f.useState)(void 0===i.width||"auto"===i.width?100:i.width),x=i.enableSorting??d;return(0,l.jsxs)(o.A,{...u,children:[(0,l.jsxs)(p.OptionsEditorGrid,{children:[(0,l.jsx)(p.OptionsEditorColumn,{children:(0,l.jsxs)(p.OptionsEditorGroup,{title:"Column",children:[(0,l.jsx)(p.OptionsEditorControl,{label:"Name*",control:(0,l.jsx)(r.A,{value:i.name,onChange:e=>a({...i,name:e.target.value}),required:!0})}),(0,l.jsx)(p.OptionsEditorControl,{label:"Header",control:(0,l.jsx)(r.A,{value:i.header??"",onChange:e=>a({...i,header:e.target.value?e.target.value:void 0})})}),(0,l.jsx)(p.OptionsEditorControl,{label:"Header Tooltip",control:(0,l.jsx)(r.A,{value:i.headerDescription??"",onChange:e=>a({...i,headerDescription:e.target.value?e.target.value:void 0})})}),(0,l.jsx)(p.OptionsEditorControl,{label:"Cell Tooltip",control:(0,l.jsx)(r.A,{value:i.cellDescription??"",onChange:e=>a({...i,cellDescription:e.target.value?e.target.value:void 0})})}),(0,l.jsx)(p.OptionsEditorControl,{label:"Enable sorting",control:(0,l.jsx)(A.A,{checked:x,onChange:e=>(function(e){if(e===d){let{enableSorting:e,...t}=i;a(t);return}a({...i,enableSorting:e})})(e.target.checked)})}),void 0===i.enableSorting&&(0,l.jsx)(s.A,{variant:"caption",color:"text.secondary",children:"Inherits from General Settings"}),x&&(0,l.jsx)(p.OptionsEditorControl,{label:"Default Sort",control:(0,l.jsx)(p.SortSelectorButtons,{size:"medium",value:i.sort,sx:{margin:.5},onChange:e=>a({...i,sort:e})})})]})}),(0,l.jsx)(p.OptionsEditorColumn,{children:(0,l.jsxs)(p.OptionsEditorGroup,{title:"Visual",children:[(0,l.jsx)(p.OptionsEditorControl,{label:"Show column",control:(0,l.jsx)(A.A,{checked:!i.hide,onChange:e=>a({...i,hide:!e.target.checked})})}),(0,l.jsx)(p.OptionsEditorControl,{label:"Cell display",control:(0,l.jsxs)(o.A,{spacing:1,children:[(0,l.jsxs)(S.A,{"aria-label":"Cell display",size:"small",children:[(0,l.jsx)(h.A,{variant:i.plugin?"outlined":"contained",onClick:()=>a({...i,plugin:void 0}),children:"Text"}),(0,l.jsx)(h.A,{variant:i.plugin?"contained":"outlined",onClick:()=>a({...i,plugin:{kind:"GaugeChart",spec:{}}}),children:"Visualization"})]}),(0,l.jsx)(s.A,{variant:"caption",color:"text.secondary",sx:{maxWidth:360},children:"Visualizations reuse panel settings (thresholds, units, colors). Text mode uses value formatting below."})]})}),i.plugin?(0,l.jsx)(p.OptionsEditorControl,{label:"Visualization type",control:(0,l.jsx)(k.PluginKindSelect,{pluginTypes:["Panel"],size:"small",value:{type:"Panel",kind:i.plugin.kind},onChange:e=>a({...i,plugin:{kind:e.kind,spec:{}}})})}):(0,l.jsx)(p.FormatControls,{value:i.format??N,onChange:e=>a({...i,format:e})}),(0,l.jsx)(p.OptionsEditorControl,{label:"Alignment",control:(0,l.jsx)(p.AlignSelector,{size:"small",value:i.align??"left",onChange:e=>a({...i,align:e})})}),(0,l.jsx)(p.OptionsEditorControl,{label:"Custom width",control:(0,l.jsx)(A.A,{checked:void 0!==i.width&&"auto"!==i.width,onChange:e=>a({...i,width:e.target.checked?c:"auto"})})}),void 0!==i.width&&"auto"!==i.width&&(0,l.jsx)(p.OptionsEditorControl,{label:"Width",control:(0,l.jsx)(r.A,{type:"number",value:c,slotProps:{htmlInput:{min:1}},onChange:e=>{g(+e.target.value),a({...i,width:+e.target.value})}})})]})}),(0,l.jsx)(p.OptionsEditorColumn,{children:(0,l.jsx)(p.OptionsEditorGroup,{title:"Link",children:(0,l.jsx)(E,{column:i,onChange:a})})})]}),(null==(t=i.plugin)?void 0:t.kind)==="GaugeChart"&&(0,l.jsx)(o.A,{sx:{px:8,mt:4,width:"100%"},spacing:2,children:(0,l.jsx)(p.OptionsEditorGroup,{title:"Visualization settings",children:(0,l.jsx)(T,{kind:"GaugeChart",spec:i.plugin.spec,onChange:e=>a({...i,plugin:{kind:"GaugeChart",spec:e}})})})}),(0,l.jsx)(o.A,{sx:{px:8,mt:3*((null==(n=i.plugin)?void 0:n.kind)==="GaugeChart")},children:(0,l.jsx)(p.OptionsEditorGroup,{title:"Conditional Cell Format",children:(0,l.jsx)(C,{cellSettings:i.cellSettings,onChange:e=>a({...i,cellSettings:e})})})})]})}var V=n(87275),I=n(11061),L=n(78536),F=n(1355);function $(e){let{column:t,isCollapsed:n,onChange:i,onCollapse:r,onDelete:a,onMoveUp:h,onMoveDown:x,defaultEnableSorting:f}=e;return(0,l.jsxs)(p.DragAndDropElement,{data:t,children:[(0,l.jsxs)(o.A,{direction:"row",alignItems:"center",borderBottom:1,borderColor:e=>e.palette.divider,justifyContent:"space-between",gap:4,children:[(0,l.jsxs)(o.A,{direction:"row",gap:1,children:[(0,l.jsx)(d.A,{"data-testid":`column-toggle#${t.name}`,size:"small",onClick:()=>r(!n),children:n?(0,l.jsx)(I.default,{}):(0,l.jsx)(V.default,{})}),(0,l.jsxs)(s.A,{variant:"overline",component:"h4",sx:{textTransform:"none"},children:["COLUMN:"," ",t.header?(0,l.jsxs)("span",{children:[(0,l.jsx)("strong",{children:t.header})," (",t.name,")"]}):(0,l.jsx)("strong",{children:t.name})]})]}),(0,l.jsxs)(o.A,{direction:"row",gap:1,children:[n&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(u.A,{title:t.hide?"Show column":"Hide column",placement:"top",children:(0,l.jsx)(d.A,{size:"small",sx:{marginLeft:"auto"},onClick:function(){i({...t,hide:!t.hide})},children:t.hide?(0,l.jsx)(L.default,{}):(0,l.jsx)(F.default,{})},"hide-column")}),(0,l.jsx)(c.A,{flexItem:!0,orientation:"vertical",variant:"middle"})]}),(0,l.jsx)(u.A,{title:"Remove column settings",placement:"top",children:(0,l.jsx)(d.A,{size:"small",sx:{marginLeft:"auto"},onClick:a,children:(0,l.jsx)(g.default,{})},"delete-column-button")}),(0,l.jsx)(u.A,{title:"Reorder column settings",placement:"top",children:(0,l.jsx)(p.DragButton,{onMoveUp:h,onMoveDown:x,menuSx:{".MuiPaper-root":{backgroundColor:e=>e.palette.background.lighter}}},"reorder-column-button")})]})]}),!n&&(0,l.jsx)("div",{children:(0,l.jsx)(D,{column:t,onChange:i,defaultEnableSorting:f})})]})}function _(e){let{columnSettings:t,onChange:n,defaultEnableSorting:i}=e,[r,a]=(0,f.useState)(t.map(()=>!0));return(0,p.useDragAndDropMonitor)({elements:t,accessKey:"name",onChange:n}),(0,l.jsxs)(o.A,{spacing:1,children:[t.map((e,o)=>(0,l.jsx)($,{column:e,isCollapsed:r[o]??!0,defaultEnableSorting:i,onChange:e=>{let l;(l=[...t])[o]=e,n(l)},onDelete:()=>{let e;(e=[...t]).splice(o,1),n(e),a(e=>(e.splice(o,1),[...e]))},onCollapse:e=>{a(t=>(t[o]=e,[...t]))},onMoveUp:()=>n((0,p.handleMoveUp)(e,t)),onMoveDown:()=>n((0,p.handleMoveDown)(e,t))},o)),(0,l.jsx)(h.A,{variant:"contained",startIcon:(0,l.jsx)(x.default,{}),sx:{marginTop:1},onClick:function(){let e=`column_${Object.keys(t).length}`,l=[...t];l.push({name:e}),n(l),a(e=>(e.push(!1),[...e]))},children:"Add Column Settings"})]})}var H=n(26566),P=n(85180);function W(e){let{kind:t,spec:n,queryResults:i}=e,{ref:o,width:r=1,height:a=1}=(0,P.A)();return(0,l.jsx)("div",{ref:o,style:{height:"100%"},children:(0,l.jsx)(p.ErrorBoundary,{FallbackComponent:p.ErrorAlert,children:(0,l.jsx)(H.PanelPluginLoader,{kind:t,contentDimensions:{width:r,height:a},spec:n,queryResults:i})})})}var G=n(74628),B=n(56599),U=n(20231);function K(e){return(e.columnSettings??[]).some(e=>e.plugin)?"range":"instant"}function q(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},{forExport:l=!1}=n,i=K(t);return e.flatMap((e,t)=>{var n;return((null==(n=e.data)?void 0:n.series)??[]).map(n=>({data:e,ts:n,queryIndex:t}))}).map(n=>{let o,{data:r,ts:a,queryIndex:s}=n,d=a.values[a.values.length-1];if(void 0===d)return{...a.labels};let u=1===e.length?"value":`value #${s+1}`,c=1===e.length?a.labels:Object.entries(a.labels??{}).reduce((e,t)=>{let[n,l]=t;return n&&(e[`${n} #${s+1}`]=l),e},{});if(l)o=d[1];else{var h;o=(null==(h=(t.columnSettings??[]).find(e=>e.name===u))?void 0:h.plugin)?{...r,data:{...r.data,series:r.data.series.filter(e=>e===a)}}:d[1]}return"instant"===i?{timestamp:d[0],[u]:o,...c}:{[u]:o,...c}})}function Q(e){if("number"==typeof e&&Number.isFinite(e))return e;if("string"==typeof e){let t=Number(e);if(Number.isFinite(t))return t}}function Z(e){return"object"==typeof e&&null!==e&&void 0!==e.definition&&void 0!==e.data}function J(e){if(Z(e)){var t,n;let l=null==(t=e.data)?void 0:t.series,i=null==l?void 0:l[0];if(!(null==i||null==(n=i.values)?void 0:n.length))return;let o=k.CalculationsMap["last-number"];if("function"!=typeof o)return;let r=o(i.values);return"number"==typeof r?r:void 0}return Q(e)}function X(e){let{value:t,range:n,fillColor:i,format:o}=e;if(void 0===t)return(0,l.jsx)(l.Fragment,{});let r=0;return void 0!==n&&(r=n.max===n.min?100:(t-n.min)/(n.max-n.min)*100),r=Math.max(0,Math.min(100,r)),(0,l.jsxs)(G.A,{sx:{display:"flex",alignItems:"center",width:"100%",gap:1},children:[(0,l.jsx)(G.A,{sx:{flexGrow:1,borderRadius:1,backgroundColor:"rgba(127,127,127,0.20)",height:24,overflow:"hidden"},children:(0,l.jsx)(G.A,{sx:{width:`${r}%`,height:"100%",backgroundColor:i??"success.main",borderRadius:1}})}),(0,l.jsx)(s.A,{variant:"body2",sx:{minWidth:52,textAlign:"right"},children:o?(0,p.formatValue)(t,o):t.toFixed(2)})]})}function Y(e){let{allValues:t,selectedValues:n,onFilterChange:i,theme:o}=e,[r,a]=(0,f.useState)(""),s=[...new Set(t)].filter(e=>null!==e).toSorted(),d=r?s.filter(e=>String(e.formatted).toLowerCase().includes(r.toLowerCase())):s;return 0===s.length?(0,l.jsx)("div",{"data-filter-dropdown":!0,style:{width:200,padding:10,backgroundColor:o.palette.background.paper,border:`1px solid ${o.palette.divider}`,borderRadius:4,boxShadow:o.shadows[4]},children:(0,l.jsx)("div",{style:{color:o.palette.text.secondary,fontSize:14},children:"No values found"})}):(0,l.jsxs)("div",{"data-filter-dropdown":!0,style:{width:200,padding:10,backgroundColor:o.palette.background.paper,border:`1px solid ${o.palette.divider}`,borderRadius:4,boxShadow:o.shadows[4],maxHeight:250,overflowY:"auto"},children:[(0,l.jsx)("input",{type:"text",placeholder:"Search...",value:r,onChange:e=>a(e.target.value),style:{width:"100%",padding:"6px 8px",marginBottom:8,fontSize:13,border:`1px solid ${o.palette.divider}`,borderRadius:4,backgroundColor:o.palette.background.default,color:o.palette.text.primary,boxSizing:"border-box"}}),(0,l.jsx)("div",{style:{marginBottom:8,fontSize:14,fontWeight:"bold"},children:(0,l.jsxs)("label",{style:{display:"flex",alignItems:"center",cursor:"pointer"},children:[(0,l.jsx)("input",{type:"checkbox",checked:n.length===s.length&&s.length>0,onChange:e=>i(e.target.checked?s.map(e=>e.original):[]),style:{marginRight:8}}),(0,l.jsxs)("span",{style:{color:o.palette.text.primary},children:["Select All (",s.length,")"]})]})}),(0,l.jsx)("hr",{style:{margin:"8px 0",border:"none",borderTop:`1px solid ${o.palette.divider}`}}),d.map((e,t)=>(0,l.jsx)("div",{style:{marginBottom:4},children:(0,l.jsxs)(G.A,{component:"label",sx:{display:"flex",alignItems:"center",cursor:"pointer",padding:"2px 0",borderRadius:"2px","&:hover":{backgroundColor:o.palette.action.hover}},children:[(0,l.jsx)("input",{type:"checkbox",checked:n.includes(e.original),onChange:t=>{t.target.checked?i([...n,e.original]):i(n.filter(t=>t!==e.original))},style:{marginRight:8}}),(0,l.jsx)("span",{style:{fontSize:14,color:o.palette.text.primary},children:null==e||""===e.formatted?"(empty)":String(e.formatted)})]})},`value-${t}`))]})}function ee(e,t,n,i){let o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:[],r=arguments.length>5&&void 0!==arguments[5]&&arguments[5];for(let a of t)if(a.name===e){if(a.hide)return;let{name:e,header:t,headerDescription:s,enableSorting:d,width:u,align:c,dataLink:h}=a;return{accessorKey:e,header:t??e,headerDescription:s,enableSorting:d??r,width:u,align:c,dataLink:h?{...h,url:(0,k.replaceVariablesInString)(h.url,n)}:void 0,...function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],i=e.plugin;return void 0!==i?{cell:o=>{let r=o.getValue();if("GaugeChart"===i.kind){var a;let o=J(r),s=function(e,t,n){let l=b(e,t);if(null==n?void 0:n.length){let t=b(e,n);t&&(l=t)}return(null==l?void 0:l.backgroundColor)??(null==l?void 0:l.textColor)}(o,n,e.cellSettings);return(0,l.jsx)(X,{value:o,range:t,fillColor:s,format:(null==(a=i.spec)?void 0:a.format)??e.format})}let s=Z(r)?r:function(e,t){let n=Q(e);if(void 0===n)return;let l=Date.now();return{definition:{kind:"TimeSeriesQuery",spec:{plugin:{kind:"PrometheusTimeSeriesQuery",spec:{query:""}}}},data:{timeRange:{start:new Date(l),end:new Date(l)},stepMs:1,series:[{name:t,values:[[l,n]],labels:{}}]}}}(r,e.name);return s?(0,l.jsx)(W,{kind:i.kind,spec:i.spec,queryResults:[s]}):(0,l.jsx)(l.Fragment,{})},cellDescription:e.cellDescription?()=>`${e.cellDescription}`:()=>""}:{cell:t=>{let n=t.getValue();return"number"==typeof n&&e.format?(0,p.formatValue)(n,e.format):n},cellDescription:e.cellDescription?()=>`${e.cellDescription}`:void 0}}(a,i[e],o)}}return{accessorKey:e,header:e,enableSorting:r}}function et(e){let{label:t,defaultValue:n,value:i,onChange:o}=e;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(p.OptionsEditorControl,{label:`Auto Columns ${t}`,control:(0,l.jsx)(A.A,{checked:void 0===i||"auto"===i,onChange:function(e,t){if(t)return o("auto");o(n)}})}),void 0!==i&&"auto"!==i&&(0,l.jsx)(p.OptionsEditorControl,{label:`Default Columns ${t}`,control:(0,l.jsx)(r.A,{type:"number",value:i??n,slotProps:{input:{inputProps:{min:1,step:1}}},onChange:e=>o(parseInt(e.target.value))})})]})}var en=n(54042);let el={PanelComponent:function(e){var t,n;let{contentDimensions:i,spec:o,queryResults:r}=e,a=(0,B.A)(),d=(0,k.useAllVariableValues)(),u=(null==(t=o.selection)?void 0:t.enabled)??!1,{selectionMap:c,setSelection:h,clearSelection:g}=(0,p.useSelection)(),x=o.actions?o.actions:void 0,m=(null==x?void 0:x.enabled)&&x.displayWithItem?x.actionsList:[],{getItemActionButtons:v,confirmDialog:j,actionButtons:C}=(0,H.useSelectionItemActions)({actions:m,variableState:d}),y=(0,f.useRef)([]),A=(0,f.useRef)(null),S=(0,f.useRef)(null),w=(0,f.useRef)([]),E=(0,f.useMemo)(()=>{let e={};return c.forEach((t,n)=>{e[n]=!0}),e},[c]),O=(0,f.useCallback)(e=>{let t=[];for(let[n,l]of Object.entries(e))if(l){let e=parseInt(n,10);void 0!==y.current[e]&&t.push({id:n,item:y.current[e]})}0===t.length?g():h(t)},[h,g]),M=(0,f.useMemo)(()=>q(r,o),[r,o]),z=(0,f.useMemo)(()=>(0,p.transformData)(M,o.transforms??[]),[M,o.transforms]),R=(0,f.useMemo)(()=>{let e=[];for(let t of z)for(let n of Object.keys(t))e.includes(n)||e.push(n);for(let t of o.columnSettings??[])e.includes(t.name)||e.push(t.name);return e},[z,o.columnSettings]),T=(0,f.useMemo)(()=>{let e={},t=null==o?void 0:o.columnSettings;if(t)for(let n=0;n<t.length;n++){let{name:l,format:i}=t[n]||{};l&&i&&(e[l]=i)}return e},[o]),N=(0,f.useMemo)(()=>{let e={};for(let t of R){let n=null==T?void 0:T[t];e[t]=[];let l=new Map;for(let i of z){let o=i[t];""!==o&&null!=o&&(l.get(String(o))||("string"==typeof o||"number"==typeof o)&&(e[t].push({original:o,formatted:n&&"number"==typeof o?(0,p.formatValue)(o,n):o}),l.set(String(o),!0)))}}return e},[z,R,T]),D=(0,f.useMemo)(()=>{let e={};for(let t of R){let n=1/0,l=-1/0;for(let e of z){let i=J(e[t]);void 0!==i&&(n=Math.min(n,i),l=Math.max(l,i))}n!==1/0&&l!==-1/0&&(e[t]={min:n,max:l})}return e},[z,R]),V=(0,f.useMemo)(()=>{let e=[],t=new Set;for(let n of o.columnSettings??[]){if(t.has(n.name))continue;let l=ee(n.name,o.columnSettings??[],d,D,o.cellSettings??[],o.enableSorting??!1);void 0!==l&&(e.push(l),t.add(n.name))}if(!o.defaultColumnHidden){for(let n of R)if(!t.has(n)){let t=ee(n,o.columnSettings??[],d,D,o.cellSettings??[],o.enableSorting??!1);void 0!==t&&e.push(t)}}return e},[R,o.columnSettings,o.defaultColumnHidden,o.enableSorting,d,D,o.cellSettings]),[I,L]=(0,f.useState)([]),F=(0,f.useMemo)(()=>o.enableFiltering&&0!==I.length?z.filter(e=>I.every(t=>{let n=e[t.id],l=t.value;return!l||0===l.length||l.includes(n)})):z,[z,I,o.enableFiltering]),$=(0,f.useMemo)(()=>{var e,t,n;if(void 0===o.cellSettings&&!(null==(e=o.columnSettings)?void 0:e.some(e=>void 0!==e.cellSettings)))return{};let l={},i=0;for(let e of F){for(let[r,a]of Object.entries({...R.reduce((e,t)=>(e[t]=void 0,e),{}),...e})){let e=b(a,o.cellSettings??[]),s=null==(t=o.columnSettings)?void 0:t.find(e=>e.name===r);if(null==s||null==(n=s.cellSettings)?void 0:n.length){let t=b(a,s.cellSettings);t&&(e=t)}e&&(l[`${i}_${r}`]=e)}i++}return l},[F,R,o.cellSettings,o.columnSettings]),[_,P]=(0,f.useState)((null==(n=o.columnSettings)?void 0:n.filter(e=>void 0!==e.sort).map(e=>({id:e.name,desc:"desc"===e.sort})))??[]),[W,K]=(0,f.useState)({}),[Q,Z]=(0,f.useState)(null),X=()=>{K({}),Z(null)};(0,f.useEffect)(()=>{if(!Q)return;let e=e=>{let t=e.target;t.closest("[data-filter-dropdown]")||t.closest("button")||X()},t=setTimeout(()=>{document.addEventListener("click",e)},100);return()=>{clearTimeout(t),document.removeEventListener("click",e)}},[Q]),y.current=F;let[et,en]=(0,f.useState)(o.pagination?{pageIndex:0,pageSize:10}:void 0);return((0,f.useEffect)(()=>{o.pagination&&!et?en({pageIndex:0,pageSize:10}):!o.pagination&&et&&en(void 0)},[o.pagination,et]),(0,f.useEffect)(()=>{var e;if(!o.enableFiltering)return;let t=null==(e=A.current)?void 0:e.querySelector(".MuiTableContainer-root"),n=S.current;if(!t||!n)return;let l=()=>{n.style.transform=`translateX(-${t.scrollLeft}px)`,Z(e=>null===e?e:null),K(e=>0===Object.keys(e).length?e:{})};return l(),t.addEventListener("scroll",l,{passive:!0}),()=>{t.removeEventListener("scroll",l)}},[o.enableFiltering,V,i]),(0,f.useEffect)(()=>{var e;if(!o.enableFiltering)return;let t=null==(e=A.current)?void 0:e.querySelector(".MuiTableContainer-root");if(!t)return;let n=t.querySelector("thead tr");if(!n)return;let l=()=>{let e=t.querySelectorAll("thead tr th");V.forEach((t,n)=>{let l=e[n],i=w.current[n];if(!l||!i)return;let o=`${l.getBoundingClientRect().width}px`;i.style.width=o,i.style.minWidth=o,i.style.maxWidth=o})};l();let i=new ResizeObserver(l);return n&&i.observe(n),()=>{i.disconnect()}},[o.enableFiltering,V,i,u,C]),void 0===i)?null:(null==z?void 0:z.length)?(0,l.jsxs)("div",{ref:A,style:{display:"contents"},children:[j,o.enableFiltering&&(0,l.jsx)("div",{style:{overflow:"hidden",background:a.palette.background.default,borderBottom:`1px solid ${a.palette.divider}`,width:i.width,boxSizing:"border-box"},children:(0,l.jsx)("div",{ref:S,style:{display:"flex",width:"max-content",willChange:"transform"},children:V.map((e,t)=>{var n;let i,r=(n=e.accessorKey,(i=I.find(e=>e.id===n))?i.value:[]),s=e.width||o.defaultColumnWidth,d=W[e.accessorKey];return(0,l.jsxs)("div",{ref:e=>{w.current[t]=e},style:{padding:"8px",borderRight:t<V.length-1?`1px solid ${a.palette.divider}`:"none",width:s,minWidth:s,maxWidth:s,display:"flex",alignItems:"center",position:"relative",boxSizing:"border-box",flex:"none"},children:[(0,l.jsx)("span",{style:{marginRight:8,fontSize:"12px",color:a.palette.text.secondary,flex:1,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:r.length?`${r.length} items`:"All"}),(0,l.jsx)("button",{onClick:t=>{var n;n=e.accessorKey,(t.preventDefault(),t.stopPropagation(),Q===n)?X():(K({...W,[n]:t.currentTarget}),Z(n))},style:{border:`1px solid ${a.palette.divider}`,background:a.palette.background.paper,cursor:"pointer",fontSize:"12px",color:r.length?a.palette.primary.main:a.palette.text.secondary,padding:"4px 8px",borderRadius:"4px",minWidth:"20px",height:"24px",flexShrink:0,transition:"all 0.2s ease"},onMouseEnter:e=>{e.currentTarget.style.background=a.palette.action.hover},onMouseLeave:e=>{e.currentTarget.style.background=a.palette.background.paper},type:"button",children:"▼"}),Q===e.accessorKey&&d&&(0,U.createPortal)((0,l.jsx)("div",{style:{position:"fixed",top:d.getBoundingClientRect().bottom+4,left:d.getBoundingClientRect().left,zIndex:a.zIndex.modal},children:(0,l.jsx)(Y,{allValues:N[e.accessorKey]||[],selectedValues:r,onFilterChange:t=>{var n;let l;return n=e.accessorKey,l=I.filter(e=>e.id!==n),void(t.length>0&&l.push({id:n,value:t}),L(l))},theme:a})}),document.body)]},`column-${e.accessorKey}`)})})}),(0,l.jsx)(p.Table,{data:F,columns:V,cellConfigs:$,height:o.enableFiltering?i.height-40:i.height,width:i.width,density:o.density,defaultColumnWidth:o.defaultColumnWidth,defaultColumnHeight:o.defaultColumnHeight,sorting:_,onSortingChange:P,pagination:et,onPaginationChange:en,checkboxSelection:u,rowSelection:E,onRowSelectionChange:O,getItemActions:e=>{let{id:t,data:n}=e;return v({id:t,data:n})},hasItemActions:C&&C.length>0})]}):(0,l.jsx)(G.A,{sx:{display:"flex",justifyContent:"center",alignItems:"center",height:"100%"},children:(0,l.jsx)(s.A,{children:"No data"})})},supportedQueryTypes:["TimeSeriesQuery"],queryOptions:function(e){return{mode:K(e)}},panelOptionsEditorComponents:[{label:"General Settings",content:function(e){let{onChange:t,value:n}=e;return(0,l.jsx)(p.OptionsEditorGrid,{children:(0,l.jsx)(p.OptionsEditorColumn,{children:(0,l.jsxs)(p.OptionsEditorGroup,{title:"Display",children:[(0,l.jsx)(p.DensitySelector,{value:n.density,onChange:function(e){t({...n,density:e})}}),(0,l.jsx)(p.OptionsEditorControl,{label:"Pagination",control:(0,l.jsx)(A.A,{checked:!!n.pagination,onChange:function(e,l){t({...n,pagination:l})}})}),(0,l.jsx)(p.OptionsEditorControl,{label:"Columns Hidden by Default",control:(0,l.jsx)(A.A,{checked:!!n.defaultColumnHidden,onChange:function(e,l){t({...n,defaultColumnHidden:l})}})}),(0,l.jsx)(p.OptionsEditorControl,{label:"Enable Column Filtering",control:(0,l.jsx)(A.A,{checked:!!n.enableFiltering,onChange:function(e,l){t({...n,enableFiltering:l})}})}),(0,l.jsx)(p.OptionsEditorControl,{label:"Enable Sorting",control:(0,l.jsx)(A.A,{checked:!!n.enableSorting,onChange:function(e,l){var i;t({...n,enableSorting:l,columnSettings:null==(i=n.columnSettings)?void 0:i.map(e=>{let{enableSorting:t,...n}=e;return n})})}})}),(0,l.jsx)(et,{label:"Width",defaultValue:p.DEFAULT_COLUMN_WIDTH,value:n.defaultColumnWidth,onChange:function(e){t({...n,defaultColumnWidth:e})}}),(0,l.jsx)(et,{label:"Height",defaultValue:p.DEFAULT_COLUMN_HEIGHT,value:n.defaultColumnHeight,onChange:function(e){t({...n,defaultColumnHeight:e})}})]})})})}},{label:"Column Settings",content:function(e){let{onChange:t,value:n}=e;return(0,l.jsx)(_,{columnSettings:n.columnSettings??[],onChange:function(e){t({...n,columnSettings:e})},defaultEnableSorting:n.enableSorting})}},{label:"Cell Settings",content:function(e){let{onChange:t,value:n}=e;return(0,l.jsx)(y,{cellSettings:n.cellSettings??[],onChange:function(e){t({...n,cellSettings:e})}})}},{label:"Transforms",content:function(e){let{value:t,onChange:n}=e;return(0,l.jsx)(p.TransformsEditor,{value:t.transforms??[],onChange:function(e){n({...t,transforms:e})}})}},{label:"Item Actions",content:function(e){let{value:t,onChange:n}=e;return(0,l.jsx)(k.ItemSelectionActionsEditor,{actionOptions:t.actions,onChangeActions:function(e){n({...t,actions:e})},selectionOptions:t.selection,onChangeSelection:function(e){n({...t,selection:e})}})}}],createInitialOptions:function(){return{density:"standard",enableFiltering:!0}},actions:[{component:e=>{let{queryResults:t,spec:n,definition:i}=e,o=(0,f.useMemo)(()=>(function(e,t){let n=q(e,t,{forExport:!0}),l=(0,p.transformData)(n,t.transforms??[]),i=[];for(let e of l)for(let t of Object.keys(e))i.includes(t)||i.push(t);let o=t.columnSettings??[],r=[],a=new Set;for(let e of o)!a.has(e.name)&&(a.add(e.name),e.hide||r.push({key:e.name,header:e.header??e.name}));if(!t.defaultColumnHidden)for(let e of i)a.has(e)||r.push({key:e,header:e});return{data:l,columns:r}})(t,n),[t,n]),r=o.data.length>0&&o.columns.length>0,a=(0,f.useCallback)(()=>{if(r)try{var e,t;let n=(null==i||null==(t=i.spec)||null==(e=t.display)?void 0:e.name)||"Table Data",{data:l,columns:r}=o,a=r.map(e=>(0,k.escapeCsvValue)(e.header)).join(","),s=l.map(e=>r.map(t=>(0,k.escapeCsvValue)(e[t.key])).join(",")),d=[a,...s].join("\n")+"\n",u=new Blob([d],{type:"text/csv;charset=utf-8"}),c=(0,k.sanitizeFilename)(n),h=`${c}_data.csv`,p=URL.createObjectURL(u);try{let e=document.createElement("a");e.href=p,e.download=h,document.body.appendChild(e),e.click(),document.body.removeChild(e)}finally{URL.revokeObjectURL(p)}}catch(e){console.error("Table CSV export failed:",e)}},[r,o,i]);return r?(0,l.jsx)(p.InfoTooltip,{description:"Export as CSV",children:(0,l.jsx)(d.A,{size:"small",onClick:a,"aria-label":"Export table data as CSV",children:(0,l.jsx)(en.default,{fontSize:"inherit"})})}):null},location:"header"}]}}}]);
|