playbook_ui 14.15.0.pre.alpha.play1949lodashremoval3of36746 → 14.15.0.pre.alpha.play1949lodashremoval3of36758

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 363360c157a79330efc2c8b4e60e45437e7fb282790e4a302da644da029d67f0
4
- data.tar.gz: e798b4832175f45fac621bbe16ac3c84d88ce499d55b7af35062125b95d4eadf
3
+ metadata.gz: 6c1e04d125fc583873d510ededd4f53884d47b8debf146b933fc7e91e380ed99
4
+ data.tar.gz: 202ab46a86392fe0fbfc5a0ec8089c33dc562f48579d1b18db855b769f5e0eaf
5
5
  SHA512:
6
- metadata.gz: 07ffd2c95fed2422c3a4a4659a5bfdfcc51c63875d00ab3b8efa6ee29a240b92c9003c816bd0254c3350207528542e978ec6cc78b898c58a271def99c4806c8c
7
- data.tar.gz: 5118481860bb78e617854ff8916c106ba455aff24bd8bf2dcdea257cde2a40bea09c797113c67a1073a87ddbbaa8dd2d074ec8a68fa946da121ba7295a2f3ea8
6
+ metadata.gz: c587c24ab590f8471ad5d1bb7fe6874e126a7a3da4f224efac7fe5ea7b3c1867c39e1c59dcba64a172fbcbc2c2ac39f2a72f7ad50329ee982d22e55bcb6962c5
7
+ data.tar.gz: 18d4482b5bcc8c53fd4deb953af572295dec9b6f41e45dc1a4ae2e2a34f5d4d8ed84a82b3a754a62b6b52b00657682cdf328e9a32cc7a0a8dcb363a8528a7f73
@@ -1,6 +1,7 @@
1
1
  import React, { useState } from "react";
2
2
 
3
3
  import Flex from '../../pb_flex/_flex'
4
+ import Image from '../../pb_image/_image'
4
5
  import Draggable from '../../pb_draggable/_draggable'
5
6
  import { DraggableProvider } from '../../pb_draggable/context'
6
7
 
@@ -1,4 +1,4 @@
1
- import { isEmpty, get, isString, uniqueId, omitBy, noop, merge, filter, find, partial } from './object';
1
+ import { isEmpty, get, isString, uniqueId, omitBy, noop, merge, filter, find, partial, map, cloneDeep, omit, debounce } from './object';
2
2
 
3
3
  describe('Lodash functions', () => {
4
4
  describe('isEmpty', () => {
@@ -234,4 +234,152 @@ describe('Lodash functions', () => {
234
234
  expect(joinPartial('b', 'c')).toBe('a_b_c');
235
235
  });
236
236
  });
237
+
238
+ describe('map', () => {
239
+ test('maps over an array with a function iteratee', () => {
240
+ const arr = [1, 2, 3];
241
+ const result = map(arr, (num) => num * 2);
242
+ expect(result).toEqual([2, 4, 6]);
243
+ });
244
+
245
+ test('maps over an array with a string iteratee', () => {
246
+ const arr = [{ value: 1 }, { value: 2 }, { value: 3 }];
247
+ const result = map(arr, 'value');
248
+ expect(result).toEqual([1, 2, 3]);
249
+ });
250
+
251
+ test('maps over an object with a function iteratee', () => {
252
+ const obj = { a: 1, b: 2, c: 3 };
253
+ const result = map(obj, (val, key) => key + val);
254
+ expect(result.sort()).toEqual(['a1', 'b2', 'c3'].sort());
255
+ });
256
+
257
+ test('maps over an object with a string iteratee', () => {
258
+ const obj = {
259
+ one: { num: 1 },
260
+ two: { num: 2 },
261
+ three: { num: 3 },
262
+ };
263
+ const result = map(obj, 'num');
264
+ expect(result.sort()).toEqual([1, 2, 3].sort());
265
+ });
266
+
267
+ test('returns original values if no iteratee provided', () => {
268
+ const arr = [1, 2, 3];
269
+ const result = map(arr);
270
+ expect(result).toEqual([1, 2, 3]);
271
+ });
272
+ });
273
+
274
+ describe('cloneDeep', () => {
275
+ test('clones primitive values', () => {
276
+ expect(cloneDeep(42)).toBe(42);
277
+ expect(cloneDeep('test')).toBe('test');
278
+ expect(cloneDeep(null)).toBe(null);
279
+ });
280
+
281
+ test('clones arrays deeply', () => {
282
+ const arr = [1, [2, 3]];
283
+ const cloned = cloneDeep(arr);
284
+ expect(cloned).toEqual(arr);
285
+ cloned[1][0] = 99;
286
+ expect(arr[1][0]).toBe(2);
287
+ });
288
+
289
+ test('clones objects deeply', () => {
290
+ const obj = { a: { b: 2 } };
291
+ const cloned = cloneDeep(obj);
292
+ expect(cloned).toEqual(obj);
293
+ cloned.a.b = 99;
294
+ expect(obj.a.b).toBe(2);
295
+ });
296
+
297
+ test('clones Date objects', () => {
298
+ const date = new Date();
299
+ const cloned = cloneDeep(date);
300
+ expect(cloned).not.toBe(date);
301
+ expect(cloned.getTime()).toBe(date.getTime());
302
+ });
303
+
304
+ test('clones RegExp objects', () => {
305
+ const regex = /test/gi;
306
+ const cloned = cloneDeep(regex);
307
+ expect(cloned).not.toBe(regex);
308
+ expect(cloned.source).toBe(regex.source);
309
+ expect(cloned.flags).toBe(regex.flags);
310
+ });
311
+ });
312
+
313
+ describe('omit', () => {
314
+ test('omits specified keys from object', () => {
315
+ const obj = { a: 1, b: 2, c: 3 };
316
+ expect(omit(obj, 'a', 'c')).toEqual({ b: 2 });
317
+ });
318
+
319
+ test('supports array of keys to omit', () => {
320
+ const obj = { a: 1, b: 2, c: 3 };
321
+ expect(omit(obj, ['b'])).toEqual({ a: 1, c: 3 });
322
+ });
323
+
324
+ test('returns empty object for null or non-object input', () => {
325
+ expect(omit(null, 'a')).toEqual({});
326
+ expect(omit("string", 'a')).toEqual({});
327
+ });
328
+
329
+ test('returns original object if no keys match', () => {
330
+ const obj = { a: 1, b: 2 };
331
+ expect(omit(obj, 'c')).toEqual({ a: 1, b: 2 });
332
+ });
333
+ });
334
+
335
+ describe('debounce', () => {
336
+ beforeEach(() => {
337
+ jest.useFakeTimers();
338
+ });
339
+
340
+ afterEach(() => {
341
+ jest.useRealTimers();
342
+ });
343
+
344
+ test('delays execution until wait time has passed', () => {
345
+ const func = jest.fn();
346
+ const debounced = debounce(func, 1000);
347
+ debounced();
348
+ expect(func).not.toHaveBeenCalled();
349
+ jest.advanceTimersByTime(500);
350
+ expect(func).not.toHaveBeenCalled();
351
+ jest.advanceTimersByTime(500);
352
+ expect(func).toHaveBeenCalledTimes(1);
353
+ });
354
+
355
+ test('calls function only once when called repeatedly', () => {
356
+ const func = jest.fn();
357
+ const debounced = debounce(func, 1000);
358
+ debounced();
359
+ debounced();
360
+ debounced();
361
+ jest.advanceTimersByTime(1000);
362
+ expect(func).toHaveBeenCalledTimes(1);
363
+ });
364
+
365
+ test('immediate option calls function on first call', () => {
366
+ const func = jest.fn();
367
+ const debounced = debounce(func, 1000, true);
368
+ debounced();
369
+ expect(func).toHaveBeenCalledTimes(1);
370
+ debounced();
371
+ debounced();
372
+ jest.advanceTimersByTime(1000);
373
+ expect(func).toHaveBeenCalledTimes(1);
374
+ });
375
+
376
+ test('subsequent call after wait period works with immediate option', () => {
377
+ const func = jest.fn();
378
+ const debounced = debounce(func, 1000, true);
379
+ debounced();
380
+ jest.advanceTimersByTime(1100);
381
+ debounced();
382
+ expect(func).toHaveBeenCalledTimes(2);
383
+ });
384
+ });
237
385
  });
@@ -178,82 +178,22 @@ export const map = <T, U>(
178
178
  return Object.keys(collection).map(key => fn(collection[key], key, collection))
179
179
  }
180
180
 
181
- export const debounce = <F extends (...args: any[]) => any>(
181
+ export function debounce<F extends (...args: any[]) => any>(
182
182
  func: F,
183
- wait = 0,
184
- options: { leading?: boolean; maxWait?: number; trailing?: boolean } = {}
185
- ): F & { cancel: () => void; flush: () => any } => {
186
- let timerId: ReturnType<typeof setTimeout> | null = null
187
- let lastArgs: any
188
- let lastThis: any
189
- let lastCallTime = 0
190
- let lastInvokeTime = 0
191
- let result: any
192
-
193
- const leading = !!options.leading
194
- const trailing = options.trailing === undefined ? true : !!options.trailing
195
- const maxWait = options.maxWait
196
-
197
- const invoke = (time: number) => {
198
- result = func.apply(lastThis, lastArgs)
199
- lastInvokeTime = time
200
- lastArgs = lastThis = null
201
- return result
202
- }
203
-
204
- const startTimer = (pendingFunc: () => void, delay: number) => setTimeout(pendingFunc, delay)
205
-
206
- const remainingWait = (time: number) => {
207
- const timeSinceLastCall = time - lastCallTime
208
- const timeSinceLastInvoke = time - lastInvokeTime
209
- const timeWaiting = wait - timeSinceLastCall
210
- return maxWait !== undefined ? Math.min(timeWaiting, maxWait - timeSinceLastInvoke) : timeWaiting
211
- }
212
-
213
- const shouldInvoke = (time: number) => {
214
- const timeSinceLastCall = time - lastCallTime
215
- const timeSinceLastInvoke = time - lastInvokeTime
216
- return lastCallTime === 0 ||
217
- timeSinceLastCall >= wait ||
218
- timeSinceLastCall < 0 ||
219
- (maxWait !== undefined && timeSinceLastInvoke >= maxWait)
220
- }
221
-
222
- const debounced = (...args: any[]) => {
223
- const time = Date.now()
224
- lastArgs = args
225
- // 'this' is not lexically captured in arrow functions, so if needed, bind explicitly
226
- lastThis = this
227
- lastCallTime = time
228
-
229
- if (shouldInvoke(time)) {
230
- if (timerId === null) {
231
- timerId = startTimer(() => {
232
- timerId = null
233
- invoke(Date.now())
234
- }, remainingWait(time))
235
- }
183
+ wait: number,
184
+ immediate?: boolean
185
+ ): (...args: Parameters<F>) => void {
186
+ let timeout: ReturnType<typeof setTimeout> | null;
187
+ return function(this: any, ...args: any[]) {
188
+ if (timeout) clearTimeout(timeout);
189
+ if (immediate && !timeout) {
190
+ func.apply(this, args);
236
191
  }
237
- return result
238
- }
239
-
240
- debounced.cancel = () => {
241
- if (timerId !== null) {
242
- clearTimeout(timerId)
243
- }
244
- timerId = null
245
- lastArgs = lastThis = null
246
- lastCallTime = 0
247
- }
248
-
249
- debounced.flush = () => {
250
- if (timerId !== null) {
251
- clearTimeout(timerId)
252
- timerId = null
253
- return invoke(Date.now())
254
- }
255
- return result
256
- }
257
-
258
- return debounced as F & { cancel: () => void; flush: () => any }
192
+ timeout = setTimeout(() => {
193
+ timeout = null;
194
+ if (!immediate) {
195
+ func.apply(this, args);
196
+ }
197
+ }, wait);
198
+ };
259
199
  }
@@ -1,4 +1,4 @@
1
- import{jsx as jsx$1,Fragment,jsxs}from"react/jsx-runtime";import*as React from"react";import React__default,{createContext,useReducer,useEffect,useMemo,useContext,createElement,useRef,forwardRef,useState,useLayoutEffect,useCallback,useImperativeHandle,Component,Fragment as Fragment$1}from"react";import{r as getDefaultExportFromCjs,x as filter,y as omit,u as useCollapsible,z as get,j as getAllIcons,q as commonjsGlobal,w as colors$1,t as highchartsTheme,A as merge,s as highchartsDarkTheme,B as getAugmentedNamespace,C as createPopper,E as uniqueId,F as typography,G as cloneDeep,l as isEmpty$1,H as isString}from"./lib-ChtLutkU.js";import*as ReactDOM from"react-dom";import ReactDOM__default,{createPortal}from"react-dom";import{TrixEditor}from"react-trix";import Trix from"trix";import require$$0 from"react-is";const initialState={items:[],dragData:{id:"",initialGroup:""},isDragging:"",activeContainer:""};const reducer=(state,action)=>{switch(action.type){case"SET_ITEMS":return{...state,items:action.payload};case"SET_DRAG_DATA":return{...state,dragData:action.payload};case"SET_IS_DRAGGING":return{...state,isDragging:action.payload};case"SET_ACTIVE_CONTAINER":return{...state,activeContainer:action.payload};case"CHANGE_CATEGORY":return{...state,items:state.items.map((item=>item.id===action.payload.itemId?{...item,container:action.payload.container}:item))};case"REORDER_ITEMS":{const{dragId:dragId,targetId:targetId}=action.payload;const newItems=[...state.items];const draggedItem=newItems.find((item=>item.id===dragId));const draggedIndex=newItems.indexOf(draggedItem);const targetIndex=newItems.findIndex((item=>item.id===targetId));newItems.splice(draggedIndex,1);newItems.splice(targetIndex,0,draggedItem);return{...state,items:newItems}}default:return state}};const DragContext=createContext({});const DraggableContext=()=>useContext(DragContext);const DraggableProvider=({children:children,initialItems:initialItems,onReorder:onReorder,onDragStart:onDragStart,onDragEnter:onDragEnter,onDragEnd:onDragEnd,onDrop:onDrop,onDragOver:onDragOver})=>{const[state,dispatch]=useReducer(reducer,initialState);useEffect((()=>{dispatch({type:"SET_ITEMS",payload:initialItems})}),[initialItems]);useEffect((()=>{onReorder(state.items)}),[state.items]);const handleDragStart=(id,container)=>{dispatch({type:"SET_DRAG_DATA",payload:{id:id,initialGroup:container}});dispatch({type:"SET_IS_DRAGGING",payload:id});if(onDragStart)onDragStart(id,container)};const handleDragEnter=(id,container)=>{if(state.dragData.id!==id){dispatch({type:"REORDER_ITEMS",payload:{dragId:state.dragData.id,targetId:id}});dispatch({type:"SET_DRAG_DATA",payload:{id:state.dragData.id,initialGroup:container}})}if(onDragEnter)onDragEnter(id,container)};const handleDragEnd=()=>{dispatch({type:"SET_IS_DRAGGING",payload:""});dispatch({type:"SET_ACTIVE_CONTAINER",payload:""});if(onDragEnd)onDragEnd()};const changeCategory=(itemId,container)=>{dispatch({type:"CHANGE_CATEGORY",payload:{itemId:itemId,container:container}})};const handleDrop=container=>{dispatch({type:"SET_IS_DRAGGING",payload:""});dispatch({type:"SET_ACTIVE_CONTAINER",payload:""});changeCategory(state.dragData.id,container);if(onDrop)onDrop(container)};const handleDragOver=(e,container)=>{e.preventDefault();dispatch({type:"SET_ACTIVE_CONTAINER",payload:container});if(onDragOver)onDragOver(e,container)};const contextValue=useMemo((()=>({items:state.items,dragData:state.dragData,isDragging:state.isDragging,activeContainer:state.activeContainer,handleDragStart:handleDragStart,handleDragEnter:handleDragEnter,handleDragEnd:handleDragEnd,handleDrop:handleDrop,handleDragOver:handleDragOver})),[state]);return jsx$1(DragContext.Provider,{value:contextValue,children:children})};var classnames$1={exports:{}};
1
+ import{jsx as jsx$1,Fragment,jsxs}from"react/jsx-runtime";import*as React from"react";import React__default,{createContext,useReducer,useEffect,useMemo,useContext,createElement,useRef,forwardRef,useState,useLayoutEffect,useCallback,useImperativeHandle,Component,Fragment as Fragment$1}from"react";import{r as getDefaultExportFromCjs,x as filter,y as omit,u as useCollapsible,z as get,j as getAllIcons,q as commonjsGlobal,w as colors$1,t as highchartsTheme,A as merge,s as highchartsDarkTheme,B as getAugmentedNamespace,C as createPopper,E as uniqueId,F as typography,G as cloneDeep,l as isEmpty$1,H as isString}from"./lib-DpO_YjaF.js";import*as ReactDOM from"react-dom";import ReactDOM__default,{createPortal}from"react-dom";import{TrixEditor}from"react-trix";import Trix from"trix";import require$$0 from"react-is";const initialState={items:[],dragData:{id:"",initialGroup:""},isDragging:"",activeContainer:""};const reducer=(state,action)=>{switch(action.type){case"SET_ITEMS":return{...state,items:action.payload};case"SET_DRAG_DATA":return{...state,dragData:action.payload};case"SET_IS_DRAGGING":return{...state,isDragging:action.payload};case"SET_ACTIVE_CONTAINER":return{...state,activeContainer:action.payload};case"CHANGE_CATEGORY":return{...state,items:state.items.map((item=>item.id===action.payload.itemId?{...item,container:action.payload.container}:item))};case"REORDER_ITEMS":{const{dragId:dragId,targetId:targetId}=action.payload;const newItems=[...state.items];const draggedItem=newItems.find((item=>item.id===dragId));const draggedIndex=newItems.indexOf(draggedItem);const targetIndex=newItems.findIndex((item=>item.id===targetId));newItems.splice(draggedIndex,1);newItems.splice(targetIndex,0,draggedItem);return{...state,items:newItems}}default:return state}};const DragContext=createContext({});const DraggableContext=()=>useContext(DragContext);const DraggableProvider=({children:children,initialItems:initialItems,onReorder:onReorder,onDragStart:onDragStart,onDragEnter:onDragEnter,onDragEnd:onDragEnd,onDrop:onDrop,onDragOver:onDragOver})=>{const[state,dispatch]=useReducer(reducer,initialState);useEffect((()=>{dispatch({type:"SET_ITEMS",payload:initialItems})}),[initialItems]);useEffect((()=>{onReorder(state.items)}),[state.items]);const handleDragStart=(id,container)=>{dispatch({type:"SET_DRAG_DATA",payload:{id:id,initialGroup:container}});dispatch({type:"SET_IS_DRAGGING",payload:id});if(onDragStart)onDragStart(id,container)};const handleDragEnter=(id,container)=>{if(state.dragData.id!==id){dispatch({type:"REORDER_ITEMS",payload:{dragId:state.dragData.id,targetId:id}});dispatch({type:"SET_DRAG_DATA",payload:{id:state.dragData.id,initialGroup:container}})}if(onDragEnter)onDragEnter(id,container)};const handleDragEnd=()=>{dispatch({type:"SET_IS_DRAGGING",payload:""});dispatch({type:"SET_ACTIVE_CONTAINER",payload:""});if(onDragEnd)onDragEnd()};const changeCategory=(itemId,container)=>{dispatch({type:"CHANGE_CATEGORY",payload:{itemId:itemId,container:container}})};const handleDrop=container=>{dispatch({type:"SET_IS_DRAGGING",payload:""});dispatch({type:"SET_ACTIVE_CONTAINER",payload:""});changeCategory(state.dragData.id,container);if(onDrop)onDrop(container)};const handleDragOver=(e,container)=>{e.preventDefault();dispatch({type:"SET_ACTIVE_CONTAINER",payload:container});if(onDragOver)onDragOver(e,container)};const contextValue=useMemo((()=>({items:state.items,dragData:state.dragData,isDragging:state.isDragging,activeContainer:state.activeContainer,handleDragStart:handleDragStart,handleDragEnter:handleDragEnter,handleDragEnd:handleDragEnd,handleDrop:handleDrop,handleDragOver:handleDragOver})),[state]);return jsx$1(DragContext.Provider,{value:contextValue,children:children})};var classnames$1={exports:{}};
2
2
  /*!
3
3
  Copyright (c) 2018 Jed Watson.
4
4
  Licensed under the MIT License (MIT), see
@@ -1,4 +1,4 @@
1
- import{r as requireLazysizes}from"./lazysizes-B7xYodB-.js";import{jsx,Fragment,jsxs}from"react/jsx-runtime";import*as React from"react";import React__default,{useEffect,createContext,useRef,useMemo,useContext,useState,useLayoutEffect,useCallback,createElement,forwardRef,useImperativeHandle,useReducer,Fragment as Fragment$1,isValidElement}from"react";import{k as buildAriaProps,l as buildDataProps,m as buildHtmlProps,n as classnames,p as globalProps,q as Draggable,t as buildCss,u as Collapsible,v as globalInlineProps,w as Icon,F as Flex,x as Checkbox,y as Body$1,z as Caption,A as Card,E as FlexItem,H as domSafeProps,J as Tooltip$1,K as Button,N as Title,S as SectionSeparator,O as TextInput,Q as Image,U as PropTypes,V as noop$5,W as PbReactPopover,X as CircleIconButton,Y as HighchartsReact,Z as Badge,_ as joinPresent,$ as titleize,a0 as IconCircle,a1 as Avatar,a2 as Radio}from"./_typeahead-C_orSAyx.js";import{u as useCollapsible,j as getAllIcons,D as DateTime$1,a as datePickerHelper,k as useDropdown,R as ReactDOMServer,l as isEmpty,o as omitBy,m as map,p as partial,n as find$1,q as commonjsGlobal,r as getDefaultExportFromCjs,s as highchartsDarkTheme,t as highchartsTheme,v as noop$6,w as colors,i as PbTextarea}from"./lib-ChtLutkU.js";import*as ReactDOM from"react-dom";import ReactDOM__default,{flushSync,createPortal}from"react-dom";var ls_attrchange={exports:{}};(function(module){(function(window2,factory){if(!window2){return}var globalInstall=function(){factory(window2.lazySizes);window2.removeEventListener("lazyunveilread",globalInstall,true)};factory=factory.bind(null,window2,window2.document);if(module.exports){factory(requireLazysizes())}else if(window2.lazySizes){globalInstall()}else{window2.addEventListener("lazyunveilread",globalInstall,true)}})(typeof window!="undefined"?window:0,(function(window2,document2,lazySizes){var addObserver=function(){var connect,disconnect,observer,connected;var lsCfg=lazySizes.cfg;var attributes={"data-bgset":1,"data-include":1,"data-poster":1,"data-bg":1,"data-script":1};var regClassTest="(\\s|^)("+lsCfg.loadedClass;var docElem=document2.documentElement;var setClass=function(target){lazySizes.rAF((function(){lazySizes.rC(target,lsCfg.loadedClass);if(lsCfg.unloadedClass){lazySizes.rC(target,lsCfg.unloadedClass)}lazySizes.aC(target,lsCfg.lazyClass);if(target.style.display=="none"||target.parentNode&&target.parentNode.style.display=="none"){setTimeout((function(){lazySizes.loader.unveil(target)}),0)}}))};var onMutation=function(mutations){var i,len,mutation,target;for(i=0,len=mutations.length;i<len;i++){mutation=mutations[i];target=mutation.target;if(!target.getAttribute(mutation.attributeName)){continue}if(target.localName=="source"&&target.parentNode){target=target.parentNode.querySelector("img")}if(target&&regClassTest.test(target.className)){setClass(target)}}};if(lsCfg.unloadedClass){regClassTest+="|"+lsCfg.unloadedClass}regClassTest+="|"+lsCfg.loadingClass+")(\\s|$)";regClassTest=new RegExp(regClassTest);attributes[lsCfg.srcAttr]=1;attributes[lsCfg.srcsetAttr]=1;if(window2.MutationObserver){observer=new MutationObserver(onMutation);connect=function(){if(!connected){connected=true;observer.observe(docElem,{subtree:true,attributes:true,attributeFilter:Object.keys(attributes)})}};disconnect=function(){if(connected){connected=false;observer.disconnect()}}}else{docElem.addEventListener("DOMAttrModified",function(){var runs;var modifications=[];var callMutations=function(){onMutation(modifications);modifications=[];runs=false};return function(e){if(connected&&attributes[e.attrName]&&e.newValue){modifications.push({target:e.target,attributeName:e.attrName});if(!runs){setTimeout(callMutations);runs=true}}}}(),true);connect=function(){connected=true};disconnect=function(){connected=false}}addEventListener("lazybeforeunveil",disconnect,true);addEventListener("lazybeforeunveil",connect);addEventListener("lazybeforesizes",disconnect,true);addEventListener("lazybeforesizes",connect);connect();removeEventListener("lazybeforeunveil",addObserver)};addEventListener("lazybeforeunveil",addObserver)}))})(ls_attrchange);const TableHead=props=>{const{aria:aria={},children:children,className:className,data:data={},htmlOptions:htmlOptions={},id:id,tag:tag="table"}=props;const ariaProps=buildAriaProps(aria);const dataProps=buildDataProps(data);const htmlProps=buildHtmlProps(htmlOptions);const classes=classnames("pb_table_thead",globalProps(props),className);const isTableTag=tag==="table";return jsx(Fragment,{children:isTableTag?jsx("thead",{...ariaProps,...dataProps,...htmlProps,className:classes,id:id,children:children}):jsx("div",{...ariaProps,...dataProps,...htmlProps,className:classes,id:id,children:children})})};const TableHeader$1=props=>{const{aria:aria={},children:children,className:className,data:data={},htmlOptions:htmlOptions={},id:id,tag:tag="table",text:text2}=props;const ariaProps=buildAriaProps(aria);const dataProps=buildDataProps(data);const htmlProps=buildHtmlProps(htmlOptions);const classes=classnames("pb_table_th",globalProps(props),className);const isTableTag=tag==="table";return jsx(Fragment,{children:isTableTag?jsx("th",{...ariaProps,...dataProps,...htmlProps,className:classes,id:id,children:text2||children}):jsx("div",{...ariaProps,...dataProps,...htmlProps,className:classes,id:id,children:text2||children})})};const TableBody$1=props=>{const{aria:aria={},children:children,className:className,data:data={},draggableContainer:draggableContainer=false,htmlOptions:htmlOptions={},id:id,tag:tag="table"}=props;const ariaProps=buildAriaProps(aria);const dataProps=buildDataProps(data);const htmlProps=buildHtmlProps(htmlOptions);const classes=classnames("pb_table_tbody",globalProps(props),className);const isTableTag=tag==="table";return jsx(Fragment,{children:isTableTag?draggableContainer?jsx(Draggable.Container,{...ariaProps,...dataProps,...htmlProps,className:classes,id:id,tag:"tbody",children:children}):jsx("tbody",{...ariaProps,...dataProps,...htmlProps,className:classes,id:id,children:children}):draggableContainer?jsx(Draggable.Container,{...ariaProps,...dataProps,...htmlProps,className:classes,id:id,children:children}):jsx("div",{...ariaProps,...dataProps,...htmlProps,className:classes,id:id,children:children})})};const TableRow=props=>{const{aria:aria={},children:children,collapsible:collapsible,collapsibleContent:collapsibleContent,collapsibleSideHighlight:collapsibleSideHighlight=true,className:className,data:data={},dark:dark=false,dragId:dragId,draggableItem:draggableItem=false,htmlOptions:htmlOptions={},id:id,toggleCellId:toggleCellId,sideHighlightColor:sideHighlightColor="none",tag:tag="table"}=props;const ariaProps=buildAriaProps(aria);const dataProps=buildDataProps(data);const htmlProps=buildHtmlProps(htmlOptions);const sideHighlightClass=sideHighlightColor!=""?`side_highlight_${sideHighlightColor}`:null;const[isCollapsed,setIsCollapsed]=useCollapsible(true);const collapsibleRow=collapsible&&isCollapsed===true?"collapsible_table_row":null;const classes=classnames(buildCss("pb_table_row_kit",sideHighlightClass),"pb_table_tr",collapsibleRow,globalProps(props),className);const isTableTag=tag==="table";const colSpan=React__default.Children.count(children);const handleRowClick=event=>{if(toggleCellId){const target=event.target;const clickedCell=target.closest(`#${toggleCellId}`);const isIconClick=target instanceof SVGElement&&(target.matches("svg.pb_custom_icon")||target.closest("svg.pb_custom_icon"));if(clickedCell||isIconClick){setIsCollapsed(!isCollapsed)}}else{setIsCollapsed(!isCollapsed)}};return jsx(Fragment,{children:collapsible?isTableTag?jsxs(Fragment,{children:[jsx("tr",{...ariaProps,...dataProps,...htmlProps,className:classes,id:id,onClick:e=>handleRowClick(e),style:{cursor:toggleCellId?"default":"pointer"},children:children}),jsx("tr",{children:jsxs(Collapsible,{collapsed:isCollapsed,dark:dark,htmlOptions:{colSpan:colSpan},padding:"none",tag:"td",children:[jsx("tr",{}),jsx(Collapsible.Content,{className:collapsibleSideHighlight?`table_collapsible_side_highlight`:"",dark:dark,margin:"none",padding:"none",children:collapsibleContent})]})})]}):jsxs(Fragment,{children:[jsx("div",{...ariaProps,...dataProps,...htmlProps,className:classes,id:id,onClick:handleRowClick,style:{cursor:"pointer"},children:children}),jsx("tr",{children:jsxs(Collapsible,{collapsed:isCollapsed,dark:dark,htmlOptions:{colSpan:colSpan},padding:"none",tag:"td",children:[jsx("tr",{}),jsx(Collapsible.Content,{className:collapsibleSideHighlight?`table_collapsible_side_highlight`:"",dark:dark,margin:"none",padding:"none",children:collapsibleContent})]})})]}):isTableTag?draggableItem?jsx(Draggable.Item,{...ariaProps,...dataProps,...htmlProps,className:classes,dragId:dragId,tag:"tr",children:children}):jsx("tr",{...ariaProps,...dataProps,...htmlProps,className:classes,id:id,children:children}):draggableItem?jsx(Draggable.Item,{...ariaProps,...dataProps,...htmlProps,className:classes,dragId:dragId,children:children}):jsx("div",{...ariaProps,...dataProps,...htmlProps,className:classes,id:id,children:children})})};const TableCell=props=>{const{aria:aria={},children:children,className:className,data:data={},htmlOptions:htmlOptions={},id:id,tag:tag="table",text:text2}=props;const ariaProps=buildAriaProps(aria);const dataProps=buildDataProps(data);const htmlProps=buildHtmlProps(htmlOptions);const classes=classnames("pb_table_td",globalProps(props),className);const isTableTag=tag==="table";return jsx(Fragment,{children:isTableTag?jsx("td",{...ariaProps,...dataProps,...htmlProps,className:classes,id:id,children:text2||children}):jsx("div",{...ariaProps,...dataProps,...htmlProps,className:classes,id:id,children:text2||children})})};const addDataTitle=()=>{const tables=document.querySelectorAll(".table-responsive-collapse");[].forEach.call(tables,(table=>{const headers=[];[].forEach.call(table.querySelectorAll("th"),(header=>{const colSpan=header.colSpan;for(let i=0;i<colSpan;i++){headers.push(header.textContent.replace(/\r?\n|\r/,""))}}));[].forEach.call(table.querySelectorAll("tbody tr"),(row=>{[].forEach.call(row.cells,((cell,headerIndex)=>{cell.setAttribute("data-title",headers[headerIndex])}))}))}))};const Table=props=>{const{aria:aria={},children:children,className:className,collapse:collapse="sm",container:container=true,dark:dark,data:data={},dataTable:dataTable=false,disableHover:disableHover=false,htmlOptions:htmlOptions={},id:id,outerPadding:outerPadding="",responsive:responsive="collapse",singleLine:singleLine=false,size:size="sm",sticky:sticky=false,stickyLeftColumn:stickyLeftColumn=[],stickyRightColumn:stickyRightColumn=[],striped:striped=false,tag:tag="table",verticalBorder:verticalBorder=false}=props;const ariaProps=buildAriaProps(aria);const dataProps=buildDataProps(data);const htmlProps=buildHtmlProps(htmlOptions);const tableCollapseCss=responsive!=="none"?`table-collapse-${collapse}`:"";const verticalBorderCss=verticalBorder?"vertical-border":"";const spaceCssName=outerPadding!=="none"?"space_":"";const outerPaddingCss=outerPadding?`outer_padding_${spaceCssName}${outerPadding}`:"";const isTableTag=tag==="table";const dynamicInlineProps=globalInlineProps(props);const stickyRightColumnReversed=stickyRightColumn.reverse();const classNames=classnames("pb_table",`table-${size}`,`table-responsive-${responsive}`,{"table-card":container,"table-dark":dark,data_table:dataTable,"single-line":singleLine,"no-hover":disableHover,"sticky-header":sticky,"sticky-left-column":stickyLeftColumn,"sticky-right-column":stickyRightColumn,striped:striped,[outerPaddingCss]:outerPadding!==""},globalProps(props),tableCollapseCss,verticalBorderCss,className);useEffect((()=>{const handleStickyLeftColumns=()=>{if(!stickyLeftColumn.length)return;let accumulatedWidth=0;stickyLeftColumn.forEach(((colId,index)=>{const isLastColumn=index===stickyLeftColumn.length-1;const header=document.querySelector(`th[id="${colId}"]`);const cells=document.querySelectorAll(`td[id="${colId}"]`);if(header){header.classList.add("sticky");header.style.left=`${accumulatedWidth}px`;if(!isLastColumn){header.classList.add("with-border-right");header.classList.remove("sticky-left-shadow")}else{header.classList.remove("with-border-right");header.classList.add("sticky-left-shadow")}accumulatedWidth+=header.offsetWidth}cells.forEach((cell=>{cell.classList.add("sticky");cell.style.left=`${accumulatedWidth-header.offsetWidth}px`;if(!isLastColumn){cell.classList.add("with-border-right");cell.classList.remove("sticky-left-shadow")}else{cell.classList.remove("with-border-right");cell.classList.add("sticky-left-shadow")}}))}))};setTimeout((()=>{handleStickyLeftColumns()}),10);window.addEventListener("resize",handleStickyLeftColumns);return()=>{window.removeEventListener("resize",handleStickyLeftColumns)}}),[stickyLeftColumn]);useEffect((()=>{const handleStickyRightColumns=()=>{if(!stickyRightColumn.length)return;let accumulatedWidth=0;stickyRightColumnReversed.forEach(((colId,index)=>{const isLastColumn=index===stickyRightColumn.length-1;const header=document.querySelector(`th[id="${colId}"]`);const cells=document.querySelectorAll(`td[id="${colId}"]`);if(header){header.classList.add("sticky");header.style.right=`${accumulatedWidth}px`;if(!isLastColumn){header.classList.add("with-border-left");header.classList.remove("sticky-right-shadow")}else{header.classList.remove("with-border-left");header.classList.add("sticky-right-shadow")}accumulatedWidth+=header.offsetWidth}cells.forEach((cell=>{cell.classList.add("sticky");cell.style.right=`${accumulatedWidth-header.offsetWidth}px`;if(!isLastColumn){cell.classList.add("with-border-left");cell.classList.remove("sticky-right-shadow")}else{cell.classList.remove("with-border-left");cell.classList.add("sticky-right-shadow")}}))}))};setTimeout((()=>{handleStickyRightColumns()}),10);window.addEventListener("resize",handleStickyRightColumns);return()=>{window.removeEventListener("resize",handleStickyRightColumns)}}),[stickyRightColumn]);useEffect((()=>{addDataTitle()}),[]);return jsx(Fragment,{children:responsive==="scroll"?jsx("div",{className:"table-responsive-scroll",children:isTableTag?jsx("table",{...ariaProps,...dataProps,...htmlProps,className:classNames,id:id,style:dynamicInlineProps,children:children}):jsx("div",{...ariaProps,...dataProps,...htmlProps,className:classNames,id:id,style:dynamicInlineProps,children:children})}):isTableTag?jsx("table",{...ariaProps,...dataProps,...htmlProps,className:classNames,id:id,style:dynamicInlineProps,children:children}):jsx("div",{...ariaProps,...dataProps,...htmlProps,className:classNames,id:id,style:dynamicInlineProps,children:children})})};Table.Head=TableHead;Table.Header=TableHeader$1;Table.Body=TableBody$1;Table.Row=TableRow;Table.Cell=TableCell;function memo$1(getDeps,fn,opts){let deps=opts.initialDeps??[];let result;return()=>{var _a,_b,_c,_d;let depTime;if(opts.key&&((_a=opts.debug)==null?void 0:_a.call(opts)))depTime=Date.now();const newDeps=getDeps();const depsChanged=newDeps.length!==deps.length||newDeps.some(((dep,index)=>deps[index]!==dep));if(!depsChanged){return result}deps=newDeps;let resultTime;if(opts.key&&((_b=opts.debug)==null?void 0:_b.call(opts)))resultTime=Date.now();result=fn(...newDeps);if(opts.key&&((_c=opts.debug)==null?void 0:_c.call(opts))){const depEndTime=Math.round((Date.now()-depTime)*100)/100;const resultEndTime=Math.round((Date.now()-resultTime)*100)/100;const resultFpsPercentage=resultEndTime/16;const pad=(str,num)=>{str=String(str);while(str.length<num){str=" "+str}return str};console.info(`%c⏱ ${pad(resultEndTime,5)} /${pad(depEndTime,5)} ms`,`\n font-size: .6rem;\n font-weight: bold;\n color: hsl(${Math.max(0,Math.min(120-120*resultFpsPercentage,120))}deg 100% 31%);`,opts==null?void 0:opts.key)}(_d=opts==null?void 0:opts.onChange)==null?void 0:_d.call(opts,result);return result}}function notUndefined(value,msg){if(value===void 0){throw new Error(`Unexpected undefined${""}`)}else{return value}}const approxEqual=(a,b)=>Math.abs(a-b)<1;const debounce$1=(targetWindow,fn,ms2)=>{let timeoutId;return function(...args){targetWindow.clearTimeout(timeoutId);timeoutId=targetWindow.setTimeout((()=>fn.apply(this,args)),ms2)}};const defaultKeyExtractor=index=>index;const defaultRangeExtractor=range=>{const start=Math.max(range.startIndex-range.overscan,0);const end=Math.min(range.endIndex+range.overscan,range.count-1);const arr=[];for(let i=start;i<=end;i++){arr.push(i)}return arr};const observeElementRect=(instance,cb)=>{const element=instance.scrollElement;if(!element){return}const targetWindow=instance.targetWindow;if(!targetWindow){return}const handler=rect=>{const{width:width,height:height}=rect;cb({width:Math.round(width),height:Math.round(height)})};handler(element.getBoundingClientRect());if(!targetWindow.ResizeObserver){return()=>{}}const observer=new targetWindow.ResizeObserver((entries=>{const run=()=>{const entry=entries[0];if(entry==null?void 0:entry.borderBoxSize){const box=entry.borderBoxSize[0];if(box){handler({width:box.inlineSize,height:box.blockSize});return}}handler(element.getBoundingClientRect())};instance.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(run):run()}));observer.observe(element,{box:"border-box"});return()=>{observer.unobserve(element)}};const addEventListenerOptions={passive:true};const supportsScrollend=typeof window=="undefined"?true:"onscrollend"in window;const observeElementOffset=(instance,cb)=>{const element=instance.scrollElement;if(!element){return}const targetWindow=instance.targetWindow;if(!targetWindow){return}let offset2=0;const fallback=instance.options.useScrollendEvent&&supportsScrollend?()=>void 0:debounce$1(targetWindow,(()=>{cb(offset2,false)}),instance.options.isScrollingResetDelay);const createHandler=isScrolling=>()=>{const{horizontal:horizontal,isRtl:isRtl}=instance.options;offset2=horizontal?element["scrollLeft"]*(isRtl&&-1||1):element["scrollTop"];fallback();cb(offset2,isScrolling)};const handler=createHandler(true);const endHandler=createHandler(false);endHandler();element.addEventListener("scroll",handler,addEventListenerOptions);const registerScrollendEvent=instance.options.useScrollendEvent&&supportsScrollend;if(registerScrollendEvent){element.addEventListener("scrollend",endHandler,addEventListenerOptions)}return()=>{element.removeEventListener("scroll",handler);if(registerScrollendEvent){element.removeEventListener("scrollend",endHandler)}}};const measureElement=(element,entry,instance)=>{if(entry==null?void 0:entry.borderBoxSize){const box=entry.borderBoxSize[0];if(box){const size=Math.round(box[instance.options.horizontal?"inlineSize":"blockSize"]);return size}}return Math.round(element.getBoundingClientRect()[instance.options.horizontal?"width":"height"])};const elementScroll=(offset2,{adjustments:adjustments=0,behavior:behavior},instance)=>{var _a,_b;const toOffset=offset2+adjustments;(_b=(_a=instance.scrollElement)==null?void 0:_a.scrollTo)==null?void 0:_b.call(_a,{[instance.options.horizontal?"left":"top"]:toOffset,behavior:behavior})};class Virtualizer{constructor(opts){this.unsubs=[];this.scrollElement=null;this.targetWindow=null;this.isScrolling=false;this.scrollToIndexTimeoutId=null;this.measurementsCache=[];this.itemSizeCache=new Map;this.pendingMeasuredCacheIndexes=[];this.scrollRect=null;this.scrollOffset=null;this.scrollDirection=null;this.scrollAdjustments=0;this.elementsCache=new Map;this.observer=(()=>{let _ro=null;const get=()=>{if(_ro){return _ro}if(!this.targetWindow||!this.targetWindow.ResizeObserver){return null}return _ro=new this.targetWindow.ResizeObserver((entries=>{entries.forEach((entry=>{const run=()=>{this._measureElement(entry.target,entry)};this.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(run):run()}))}))};return{disconnect:()=>{var _a;(_a=get())==null?void 0:_a.disconnect();_ro=null},observe:target=>{var _a;return(_a=get())==null?void 0:_a.observe(target,{box:"border-box"})},unobserve:target=>{var _a;return(_a=get())==null?void 0:_a.unobserve(target)}}})();this.range=null;this.setOptions=opts2=>{Object.entries(opts2).forEach((([key,value])=>{if(typeof value==="undefined")delete opts2[key]}));this.options={debug:false,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:false,getItemKey:defaultKeyExtractor,rangeExtractor:defaultRangeExtractor,onChange:()=>{},measureElement:measureElement,initialRect:{width:0,height:0},scrollMargin:0,gap:0,indexAttribute:"data-index",initialMeasurementsCache:[],lanes:1,isScrollingResetDelay:150,enabled:true,isRtl:false,useScrollendEvent:true,useAnimationFrameWithResizeObserver:false,...opts2}};this.notify=sync=>{var _a,_b;(_b=(_a=this.options).onChange)==null?void 0:_b.call(_a,this,sync)};this.maybeNotify=memo$1((()=>{this.calculateRange();return[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]}),(isScrolling=>{this.notify(isScrolling)}),{key:false,debug:()=>this.options.debug,initialDeps:[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]});this.cleanup=()=>{this.unsubs.filter(Boolean).forEach((d=>d()));this.unsubs=[];this.observer.disconnect();this.scrollElement=null;this.targetWindow=null};this._didMount=()=>()=>{this.cleanup()};this._willUpdate=()=>{var _a;const scrollElement=this.options.enabled?this.options.getScrollElement():null;if(this.scrollElement!==scrollElement){this.cleanup();if(!scrollElement){this.maybeNotify();return}this.scrollElement=scrollElement;if(this.scrollElement&&"ownerDocument"in this.scrollElement){this.targetWindow=this.scrollElement.ownerDocument.defaultView}else{this.targetWindow=((_a=this.scrollElement)==null?void 0:_a.window)??null}this.elementsCache.forEach((cached=>{this.observer.observe(cached)}));this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0});this.unsubs.push(this.options.observeElementRect(this,(rect=>{this.scrollRect=rect;this.maybeNotify()})));this.unsubs.push(this.options.observeElementOffset(this,((offset2,isScrolling)=>{this.scrollAdjustments=0;this.scrollDirection=isScrolling?this.getScrollOffset()<offset2?"forward":"backward":null;this.scrollOffset=offset2;this.isScrolling=isScrolling;this.maybeNotify()})))}};this.getSize=()=>{if(!this.options.enabled){this.scrollRect=null;return 0}this.scrollRect=this.scrollRect??this.options.initialRect;return this.scrollRect[this.options.horizontal?"width":"height"]};this.getScrollOffset=()=>{if(!this.options.enabled){this.scrollOffset=null;return 0}this.scrollOffset=this.scrollOffset??(typeof this.options.initialOffset==="function"?this.options.initialOffset():this.options.initialOffset);return this.scrollOffset};this.getFurthestMeasurement=(measurements,index)=>{const furthestMeasurementsFound=new Map;const furthestMeasurements=new Map;for(let m=index-1;m>=0;m--){const measurement=measurements[m];if(furthestMeasurementsFound.has(measurement.lane)){continue}const previousFurthestMeasurement=furthestMeasurements.get(measurement.lane);if(previousFurthestMeasurement==null||measurement.end>previousFurthestMeasurement.end){furthestMeasurements.set(measurement.lane,measurement)}else if(measurement.end<previousFurthestMeasurement.end){furthestMeasurementsFound.set(measurement.lane,true)}if(furthestMeasurementsFound.size===this.options.lanes){break}}return furthestMeasurements.size===this.options.lanes?Array.from(furthestMeasurements.values()).sort(((a,b)=>{if(a.end===b.end){return a.index-b.index}return a.end-b.end}))[0]:void 0};this.getMeasurementOptions=memo$1((()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey,this.options.enabled]),((count2,paddingStart,scrollMargin,getItemKey,enabled)=>{this.pendingMeasuredCacheIndexes=[];return{count:count2,paddingStart:paddingStart,scrollMargin:scrollMargin,getItemKey:getItemKey,enabled:enabled}}),{key:false});this.getMeasurements=memo$1((()=>[this.getMeasurementOptions(),this.itemSizeCache]),(({count:count2,paddingStart:paddingStart,scrollMargin:scrollMargin,getItemKey:getItemKey,enabled:enabled},itemSizeCache)=>{if(!enabled){this.measurementsCache=[];this.itemSizeCache.clear();return[]}if(this.measurementsCache.length===0){this.measurementsCache=this.options.initialMeasurementsCache;this.measurementsCache.forEach((item=>{this.itemSizeCache.set(item.key,item.size)}))}const min2=this.pendingMeasuredCacheIndexes.length>0?Math.min(...this.pendingMeasuredCacheIndexes):0;this.pendingMeasuredCacheIndexes=[];const measurements=this.measurementsCache.slice(0,min2);for(let i=min2;i<count2;i++){const key=getItemKey(i);const furthestMeasurement=this.options.lanes===1?measurements[i-1]:this.getFurthestMeasurement(measurements,i);const start=furthestMeasurement?furthestMeasurement.end+this.options.gap:paddingStart+scrollMargin;const measuredSize=itemSizeCache.get(key);const size=typeof measuredSize==="number"?measuredSize:this.options.estimateSize(i);const end=start+size;const lane=furthestMeasurement?furthestMeasurement.lane:i%this.options.lanes;measurements[i]={index:i,start:start,size:size,end:end,key:key,lane:lane}}this.measurementsCache=measurements;return measurements}),{key:false,debug:()=>this.options.debug});this.calculateRange=memo$1((()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset()]),((measurements,outerSize,scrollOffset)=>this.range=measurements.length>0&&outerSize>0?calculateRange({measurements:measurements,outerSize:outerSize,scrollOffset:scrollOffset}):null),{key:false,debug:()=>this.options.debug});this.getVirtualIndexes=memo$1((()=>{let startIndex=null;let endIndex=null;const range=this.calculateRange();if(range){startIndex=range.startIndex;endIndex=range.endIndex}return[this.options.rangeExtractor,this.options.overscan,this.options.count,startIndex,endIndex]}),((rangeExtractor,overscan,count2,startIndex,endIndex)=>startIndex===null||endIndex===null?[]:rangeExtractor({startIndex:startIndex,endIndex:endIndex,overscan:overscan,count:count2})),{key:false,debug:()=>this.options.debug});this.indexFromElement=node=>{const attributeName=this.options.indexAttribute;const indexStr=node.getAttribute(attributeName);if(!indexStr){console.warn(`Missing attribute name '${attributeName}={index}' on measured element.`);return-1}return parseInt(indexStr,10)};this._measureElement=(node,entry)=>{const index=this.indexFromElement(node);const item=this.measurementsCache[index];if(!item){return}const key=item.key;const prevNode=this.elementsCache.get(key);if(prevNode!==node){if(prevNode){this.observer.unobserve(prevNode)}this.observer.observe(node);this.elementsCache.set(key,node)}if(node.isConnected){this.resizeItem(index,this.options.measureElement(node,entry,this))}};this.resizeItem=(index,size)=>{const item=this.measurementsCache[index];if(!item){return}const itemSize=this.itemSizeCache.get(item.key)??item.size;const delta=size-itemSize;if(delta!==0){if(this.shouldAdjustScrollPositionOnItemSizeChange!==void 0?this.shouldAdjustScrollPositionOnItemSizeChange(item,delta,this):item.start<this.getScrollOffset()+this.scrollAdjustments){this._scrollToOffset(this.getScrollOffset(),{adjustments:this.scrollAdjustments+=delta,behavior:void 0})}this.pendingMeasuredCacheIndexes.push(item.index);this.itemSizeCache=new Map(this.itemSizeCache.set(item.key,size));this.notify(false)}};this.measureElement=node=>{if(!node){this.elementsCache.forEach(((cached,key)=>{if(!cached.isConnected){this.observer.unobserve(cached);this.elementsCache.delete(key)}}));return}this._measureElement(node,void 0)};this.getVirtualItems=memo$1((()=>[this.getVirtualIndexes(),this.getMeasurements()]),((indexes,measurements)=>{const virtualItems=[];for(let k=0,len=indexes.length;k<len;k++){const i=indexes[k];const measurement=measurements[i];virtualItems.push(measurement)}return virtualItems}),{key:false,debug:()=>this.options.debug});this.getVirtualItemForOffset=offset2=>{const measurements=this.getMeasurements();if(measurements.length===0){return void 0}return notUndefined(measurements[findNearestBinarySearch(0,measurements.length-1,(index=>notUndefined(measurements[index]).start),offset2)])};this.getOffsetForAlignment=(toOffset,align)=>{const size=this.getSize();const scrollOffset=this.getScrollOffset();if(align==="auto"){if(toOffset>=scrollOffset+size){align="end"}}if(align==="end"){toOffset-=size}const scrollSizeProp=this.options.horizontal?"scrollWidth":"scrollHeight";const scrollSize=this.scrollElement?"document"in this.scrollElement?this.scrollElement.document.documentElement[scrollSizeProp]:this.scrollElement[scrollSizeProp]:0;const maxOffset=scrollSize-size;return Math.max(Math.min(maxOffset,toOffset),0)};this.getOffsetForIndex=(index,align="auto")=>{index=Math.max(0,Math.min(index,this.options.count-1));const item=this.measurementsCache[index];if(!item){return void 0}const size=this.getSize();const scrollOffset=this.getScrollOffset();if(align==="auto"){if(item.end>=scrollOffset+size-this.options.scrollPaddingEnd){align="end"}else if(item.start<=scrollOffset+this.options.scrollPaddingStart){align="start"}else{return[scrollOffset,align]}}const centerOffset=item.start-this.options.scrollPaddingStart+(item.size-size)/2;switch(align){case"center":return[this.getOffsetForAlignment(centerOffset,align),align];case"end":return[this.getOffsetForAlignment(item.end+this.options.scrollPaddingEnd,align),align];default:return[this.getOffsetForAlignment(item.start-this.options.scrollPaddingStart,align),align]}};this.isDynamicMode=()=>this.elementsCache.size>0;this.cancelScrollToIndex=()=>{if(this.scrollToIndexTimeoutId!==null&&this.targetWindow){this.targetWindow.clearTimeout(this.scrollToIndexTimeoutId);this.scrollToIndexTimeoutId=null}};this.scrollToOffset=(toOffset,{align:align="start",behavior:behavior}={})=>{this.cancelScrollToIndex();if(behavior==="smooth"&&this.isDynamicMode()){console.warn("The `smooth` scroll behavior is not fully supported with dynamic size.")}this._scrollToOffset(this.getOffsetForAlignment(toOffset,align),{adjustments:void 0,behavior:behavior})};this.scrollToIndex=(index,{align:initialAlign="auto",behavior:behavior}={})=>{index=Math.max(0,Math.min(index,this.options.count-1));this.cancelScrollToIndex();if(behavior==="smooth"&&this.isDynamicMode()){console.warn("The `smooth` scroll behavior is not fully supported with dynamic size.")}const offsetAndAlign=this.getOffsetForIndex(index,initialAlign);if(!offsetAndAlign)return;const[offset2,align]=offsetAndAlign;this._scrollToOffset(offset2,{adjustments:void 0,behavior:behavior});if(behavior!=="smooth"&&this.isDynamicMode()&&this.targetWindow){this.scrollToIndexTimeoutId=this.targetWindow.setTimeout((()=>{this.scrollToIndexTimeoutId=null;const elementInDOM=this.elementsCache.has(this.options.getItemKey(index));if(elementInDOM){const[latestOffset]=notUndefined(this.getOffsetForIndex(index,align));if(!approxEqual(latestOffset,this.getScrollOffset())){this.scrollToIndex(index,{align:align,behavior:behavior})}}else{this.scrollToIndex(index,{align:align,behavior:behavior})}}))}};this.scrollBy=(delta,{behavior:behavior}={})=>{this.cancelScrollToIndex();if(behavior==="smooth"&&this.isDynamicMode()){console.warn("The `smooth` scroll behavior is not fully supported with dynamic size.")}this._scrollToOffset(this.getScrollOffset()+delta,{adjustments:void 0,behavior:behavior})};this.getTotalSize=()=>{var _a;const measurements=this.getMeasurements();let end;if(measurements.length===0){end=this.options.paddingStart}else{end=this.options.lanes===1?((_a=measurements[measurements.length-1])==null?void 0:_a.end)??0:Math.max(...measurements.slice(-this.options.lanes).map((m=>m.end)))}return Math.max(end-this.options.scrollMargin+this.options.paddingEnd,0)};this._scrollToOffset=(offset2,{adjustments:adjustments,behavior:behavior})=>{this.options.scrollToFn(offset2,{behavior:behavior,adjustments:adjustments},this)};this.measure=()=>{this.itemSizeCache=new Map;this.notify(false)};this.setOptions(opts)}}const findNearestBinarySearch=(low,high,getCurrentValue,value)=>{while(low<=high){const middle=(low+high)/2|0;const currentValue=getCurrentValue(middle);if(currentValue<value){low=middle+1}else if(currentValue>value){high=middle-1}else{return middle}}if(low>0){return low-1}else{return 0}};function calculateRange({measurements:measurements,outerSize:outerSize,scrollOffset:scrollOffset}){const count2=measurements.length-1;const getOffset2=index=>measurements[index].start;const startIndex=findNearestBinarySearch(0,count2,getOffset2,scrollOffset);let endIndex=startIndex;while(endIndex<count2&&measurements[endIndex].end<scrollOffset+outerSize){endIndex++}return{startIndex:startIndex,endIndex:endIndex}}const useIsomorphicLayoutEffect=typeof document!=="undefined"?React.useLayoutEffect:React.useEffect;function useVirtualizerBase(options){const rerender=React.useReducer((()=>({})),{})[1];const resolvedOptions={...options,onChange:(instance2,sync)=>{var _a;if(sync){flushSync(rerender)}else{rerender()}(_a=options.onChange)==null?void 0:_a.call(options,instance2,sync)}};const[instance]=React.useState((()=>new Virtualizer(resolvedOptions)));instance.setOptions(resolvedOptions);useIsomorphicLayoutEffect((()=>instance._didMount()),[]);useIsomorphicLayoutEffect((()=>instance._willUpdate()));return instance}function useVirtualizer(options){return useVirtualizerBase({observeElementRect:observeElementRect,observeElementOffset:observeElementOffset,scrollToFn:elementScroll,...options})}const getVirtualizedContainerStyles=maxHeight=>{let heightValue="600px";if(maxHeight){switch(maxHeight){case"xs":heightValue="200px";break;case"sm":heightValue="300px";break;case"md":heightValue="400px";break;case"lg":heightValue="500px";break;case"xl":heightValue="600px";break;case"xxl":heightValue="700px";break;case"xxxl":heightValue="800px";break;default:if(maxHeight!=="auto"){heightValue=maxHeight}}}return{overflow:"auto",position:"relative",height:heightValue,width:"100%"}};const getVirtualizedRowStyle=startPosition=>({position:"absolute",top:0,left:0,width:"100%",height:"40px",transform:`translateY(${startPosition}px)`,tableLayout:"fixed"});const getRowHeightEstimate=rowType=>{switch(rowType){case"header":return 40;case"loading":return 30;case"row":default:return 40}};const AdvancedTableContext=createContext({});const AdvancedTableProvider=({children:children,...props})=>{const tableContainerRef=useRef(null);const containerRef=props.tableContainerRef||tableContainerRef;const table=props.table;const isVirtualized=props.virtualizedRows||props.enableVirtualization;const flattenedItems=useMemo((()=>{if(!isVirtualized||!table){return[]}const tableRows=table.getRowModel().rows;const items=[];const subRowHeaders=props.subRowHeaders;const inlineRowLoading=props.inlineRowLoading;const columnDefinitions=props.columnDefinitions;tableRows.forEach(((row,index)=>{var _a,_b,_c;const isFirstChildofSubrow=row.depth>0&&row.index===0;if(isFirstChildofSubrow&&subRowHeaders){items.push({type:"header",row:row,id:`header-${row.id}-${index}`})}items.push({type:"row",row:row,id:`row-${row.id}-${index}`});const isExpandable=row.getIsExpanded();const rowHasNoChildren=((_a=row.original)==null?void 0:_a.children)&&!row.original.children.length?true:false;const isDataLoading=isExpandable&&(inlineRowLoading&&rowHasNoChildren)&&row.depth<(((_c=(_b=columnDefinitions[0])==null?void 0:_b.cellAccessors)==null?void 0:_c.length)||0);if(isDataLoading){items.push({type:"loading",row:row,id:`loading-${row.id}-${index}`})}}));return items}),[isVirtualized,table,props.subRowHeaders,props.inlineRowLoading,props.columnDefinitions,table==null?void 0:table.getRowModel().rows.length,JSON.stringify((table==null?void 0:table.getState().sorting)||[]),JSON.stringify((table==null?void 0:table.getState().expanded)||{})]);const virtualizer=useVirtualizer({count:isVirtualized&&flattenedItems.length>0?flattenedItems.length:0,getScrollElement:()=>containerRef.current,estimateSize:index=>{if(!isVirtualized||flattenedItems.length===0)return 0;const item=flattenedItems[index];if(!item)return getRowHeightEstimate("row");return getRowHeightEstimate(item.type)},overscan:10,getItemKey:index=>{var _a;if(!isVirtualized||flattenedItems.length===0||index>=flattenedItems.length){return`item-${index}`}return((_a=flattenedItems[index])==null?void 0:_a.id)||`item-${index}`}});useEffect((()=>{if(isVirtualized&&virtualizer&&table&&containerRef.current){virtualizer.measure();containerRef.current.scrollTop=0}}),[isVirtualized,virtualizer,table,containerRef,JSON.stringify((table==null?void 0:table.getState().sorting)||[]),JSON.stringify((table==null?void 0:table.getState().expanded)||{})]);const contextValue={...props,table:table,tableContainerRef:containerRef,virtualizer:isVirtualized?virtualizer:null,flattenedItems:flattenedItems,virtualizedRows:isVirtualized,enableVirtualization:isVirtualized};return jsx(AdvancedTableContext.Provider,{value:contextValue,children:children})};
1
+ import{r as requireLazysizes}from"./lazysizes-B7xYodB-.js";import{jsx,Fragment,jsxs}from"react/jsx-runtime";import*as React from"react";import React__default,{useEffect,createContext,useRef,useMemo,useContext,useState,useLayoutEffect,useCallback,createElement,forwardRef,useImperativeHandle,useReducer,Fragment as Fragment$1,isValidElement}from"react";import{k as buildAriaProps,l as buildDataProps,m as buildHtmlProps,n as classnames,p as globalProps,q as Draggable,t as buildCss,u as Collapsible,v as globalInlineProps,w as Icon,F as Flex,x as Checkbox,y as Body$1,z as Caption,A as Card,E as FlexItem,H as domSafeProps,J as Tooltip$1,K as Button,N as Title,S as SectionSeparator,O as TextInput,Q as Image,U as PropTypes,V as noop$5,W as PbReactPopover,X as CircleIconButton,Y as HighchartsReact,Z as Badge,_ as joinPresent,$ as titleize,a0 as IconCircle,a1 as Avatar,a2 as Radio}from"./_typeahead-tLz4QFO8.js";import{u as useCollapsible,j as getAllIcons,D as DateTime$1,a as datePickerHelper,k as useDropdown,R as ReactDOMServer,l as isEmpty,o as omitBy,m as map,p as partial,n as find$1,q as commonjsGlobal,r as getDefaultExportFromCjs,s as highchartsDarkTheme,t as highchartsTheme,v as noop$6,w as colors,i as PbTextarea}from"./lib-DpO_YjaF.js";import*as ReactDOM from"react-dom";import ReactDOM__default,{flushSync,createPortal}from"react-dom";var ls_attrchange={exports:{}};(function(module){(function(window2,factory){if(!window2){return}var globalInstall=function(){factory(window2.lazySizes);window2.removeEventListener("lazyunveilread",globalInstall,true)};factory=factory.bind(null,window2,window2.document);if(module.exports){factory(requireLazysizes())}else if(window2.lazySizes){globalInstall()}else{window2.addEventListener("lazyunveilread",globalInstall,true)}})(typeof window!="undefined"?window:0,(function(window2,document2,lazySizes){var addObserver=function(){var connect,disconnect,observer,connected;var lsCfg=lazySizes.cfg;var attributes={"data-bgset":1,"data-include":1,"data-poster":1,"data-bg":1,"data-script":1};var regClassTest="(\\s|^)("+lsCfg.loadedClass;var docElem=document2.documentElement;var setClass=function(target){lazySizes.rAF((function(){lazySizes.rC(target,lsCfg.loadedClass);if(lsCfg.unloadedClass){lazySizes.rC(target,lsCfg.unloadedClass)}lazySizes.aC(target,lsCfg.lazyClass);if(target.style.display=="none"||target.parentNode&&target.parentNode.style.display=="none"){setTimeout((function(){lazySizes.loader.unveil(target)}),0)}}))};var onMutation=function(mutations){var i,len,mutation,target;for(i=0,len=mutations.length;i<len;i++){mutation=mutations[i];target=mutation.target;if(!target.getAttribute(mutation.attributeName)){continue}if(target.localName=="source"&&target.parentNode){target=target.parentNode.querySelector("img")}if(target&&regClassTest.test(target.className)){setClass(target)}}};if(lsCfg.unloadedClass){regClassTest+="|"+lsCfg.unloadedClass}regClassTest+="|"+lsCfg.loadingClass+")(\\s|$)";regClassTest=new RegExp(regClassTest);attributes[lsCfg.srcAttr]=1;attributes[lsCfg.srcsetAttr]=1;if(window2.MutationObserver){observer=new MutationObserver(onMutation);connect=function(){if(!connected){connected=true;observer.observe(docElem,{subtree:true,attributes:true,attributeFilter:Object.keys(attributes)})}};disconnect=function(){if(connected){connected=false;observer.disconnect()}}}else{docElem.addEventListener("DOMAttrModified",function(){var runs;var modifications=[];var callMutations=function(){onMutation(modifications);modifications=[];runs=false};return function(e){if(connected&&attributes[e.attrName]&&e.newValue){modifications.push({target:e.target,attributeName:e.attrName});if(!runs){setTimeout(callMutations);runs=true}}}}(),true);connect=function(){connected=true};disconnect=function(){connected=false}}addEventListener("lazybeforeunveil",disconnect,true);addEventListener("lazybeforeunveil",connect);addEventListener("lazybeforesizes",disconnect,true);addEventListener("lazybeforesizes",connect);connect();removeEventListener("lazybeforeunveil",addObserver)};addEventListener("lazybeforeunveil",addObserver)}))})(ls_attrchange);const TableHead=props=>{const{aria:aria={},children:children,className:className,data:data={},htmlOptions:htmlOptions={},id:id,tag:tag="table"}=props;const ariaProps=buildAriaProps(aria);const dataProps=buildDataProps(data);const htmlProps=buildHtmlProps(htmlOptions);const classes=classnames("pb_table_thead",globalProps(props),className);const isTableTag=tag==="table";return jsx(Fragment,{children:isTableTag?jsx("thead",{...ariaProps,...dataProps,...htmlProps,className:classes,id:id,children:children}):jsx("div",{...ariaProps,...dataProps,...htmlProps,className:classes,id:id,children:children})})};const TableHeader$1=props=>{const{aria:aria={},children:children,className:className,data:data={},htmlOptions:htmlOptions={},id:id,tag:tag="table",text:text2}=props;const ariaProps=buildAriaProps(aria);const dataProps=buildDataProps(data);const htmlProps=buildHtmlProps(htmlOptions);const classes=classnames("pb_table_th",globalProps(props),className);const isTableTag=tag==="table";return jsx(Fragment,{children:isTableTag?jsx("th",{...ariaProps,...dataProps,...htmlProps,className:classes,id:id,children:text2||children}):jsx("div",{...ariaProps,...dataProps,...htmlProps,className:classes,id:id,children:text2||children})})};const TableBody$1=props=>{const{aria:aria={},children:children,className:className,data:data={},draggableContainer:draggableContainer=false,htmlOptions:htmlOptions={},id:id,tag:tag="table"}=props;const ariaProps=buildAriaProps(aria);const dataProps=buildDataProps(data);const htmlProps=buildHtmlProps(htmlOptions);const classes=classnames("pb_table_tbody",globalProps(props),className);const isTableTag=tag==="table";return jsx(Fragment,{children:isTableTag?draggableContainer?jsx(Draggable.Container,{...ariaProps,...dataProps,...htmlProps,className:classes,id:id,tag:"tbody",children:children}):jsx("tbody",{...ariaProps,...dataProps,...htmlProps,className:classes,id:id,children:children}):draggableContainer?jsx(Draggable.Container,{...ariaProps,...dataProps,...htmlProps,className:classes,id:id,children:children}):jsx("div",{...ariaProps,...dataProps,...htmlProps,className:classes,id:id,children:children})})};const TableRow=props=>{const{aria:aria={},children:children,collapsible:collapsible,collapsibleContent:collapsibleContent,collapsibleSideHighlight:collapsibleSideHighlight=true,className:className,data:data={},dark:dark=false,dragId:dragId,draggableItem:draggableItem=false,htmlOptions:htmlOptions={},id:id,toggleCellId:toggleCellId,sideHighlightColor:sideHighlightColor="none",tag:tag="table"}=props;const ariaProps=buildAriaProps(aria);const dataProps=buildDataProps(data);const htmlProps=buildHtmlProps(htmlOptions);const sideHighlightClass=sideHighlightColor!=""?`side_highlight_${sideHighlightColor}`:null;const[isCollapsed,setIsCollapsed]=useCollapsible(true);const collapsibleRow=collapsible&&isCollapsed===true?"collapsible_table_row":null;const classes=classnames(buildCss("pb_table_row_kit",sideHighlightClass),"pb_table_tr",collapsibleRow,globalProps(props),className);const isTableTag=tag==="table";const colSpan=React__default.Children.count(children);const handleRowClick=event=>{if(toggleCellId){const target=event.target;const clickedCell=target.closest(`#${toggleCellId}`);const isIconClick=target instanceof SVGElement&&(target.matches("svg.pb_custom_icon")||target.closest("svg.pb_custom_icon"));if(clickedCell||isIconClick){setIsCollapsed(!isCollapsed)}}else{setIsCollapsed(!isCollapsed)}};return jsx(Fragment,{children:collapsible?isTableTag?jsxs(Fragment,{children:[jsx("tr",{...ariaProps,...dataProps,...htmlProps,className:classes,id:id,onClick:e=>handleRowClick(e),style:{cursor:toggleCellId?"default":"pointer"},children:children}),jsx("tr",{children:jsxs(Collapsible,{collapsed:isCollapsed,dark:dark,htmlOptions:{colSpan:colSpan},padding:"none",tag:"td",children:[jsx("tr",{}),jsx(Collapsible.Content,{className:collapsibleSideHighlight?`table_collapsible_side_highlight`:"",dark:dark,margin:"none",padding:"none",children:collapsibleContent})]})})]}):jsxs(Fragment,{children:[jsx("div",{...ariaProps,...dataProps,...htmlProps,className:classes,id:id,onClick:handleRowClick,style:{cursor:"pointer"},children:children}),jsx("tr",{children:jsxs(Collapsible,{collapsed:isCollapsed,dark:dark,htmlOptions:{colSpan:colSpan},padding:"none",tag:"td",children:[jsx("tr",{}),jsx(Collapsible.Content,{className:collapsibleSideHighlight?`table_collapsible_side_highlight`:"",dark:dark,margin:"none",padding:"none",children:collapsibleContent})]})})]}):isTableTag?draggableItem?jsx(Draggable.Item,{...ariaProps,...dataProps,...htmlProps,className:classes,dragId:dragId,tag:"tr",children:children}):jsx("tr",{...ariaProps,...dataProps,...htmlProps,className:classes,id:id,children:children}):draggableItem?jsx(Draggable.Item,{...ariaProps,...dataProps,...htmlProps,className:classes,dragId:dragId,children:children}):jsx("div",{...ariaProps,...dataProps,...htmlProps,className:classes,id:id,children:children})})};const TableCell=props=>{const{aria:aria={},children:children,className:className,data:data={},htmlOptions:htmlOptions={},id:id,tag:tag="table",text:text2}=props;const ariaProps=buildAriaProps(aria);const dataProps=buildDataProps(data);const htmlProps=buildHtmlProps(htmlOptions);const classes=classnames("pb_table_td",globalProps(props),className);const isTableTag=tag==="table";return jsx(Fragment,{children:isTableTag?jsx("td",{...ariaProps,...dataProps,...htmlProps,className:classes,id:id,children:text2||children}):jsx("div",{...ariaProps,...dataProps,...htmlProps,className:classes,id:id,children:text2||children})})};const addDataTitle=()=>{const tables=document.querySelectorAll(".table-responsive-collapse");[].forEach.call(tables,(table=>{const headers=[];[].forEach.call(table.querySelectorAll("th"),(header=>{const colSpan=header.colSpan;for(let i=0;i<colSpan;i++){headers.push(header.textContent.replace(/\r?\n|\r/,""))}}));[].forEach.call(table.querySelectorAll("tbody tr"),(row=>{[].forEach.call(row.cells,((cell,headerIndex)=>{cell.setAttribute("data-title",headers[headerIndex])}))}))}))};const Table=props=>{const{aria:aria={},children:children,className:className,collapse:collapse="sm",container:container=true,dark:dark,data:data={},dataTable:dataTable=false,disableHover:disableHover=false,htmlOptions:htmlOptions={},id:id,outerPadding:outerPadding="",responsive:responsive="collapse",singleLine:singleLine=false,size:size="sm",sticky:sticky=false,stickyLeftColumn:stickyLeftColumn=[],stickyRightColumn:stickyRightColumn=[],striped:striped=false,tag:tag="table",verticalBorder:verticalBorder=false}=props;const ariaProps=buildAriaProps(aria);const dataProps=buildDataProps(data);const htmlProps=buildHtmlProps(htmlOptions);const tableCollapseCss=responsive!=="none"?`table-collapse-${collapse}`:"";const verticalBorderCss=verticalBorder?"vertical-border":"";const spaceCssName=outerPadding!=="none"?"space_":"";const outerPaddingCss=outerPadding?`outer_padding_${spaceCssName}${outerPadding}`:"";const isTableTag=tag==="table";const dynamicInlineProps=globalInlineProps(props);const stickyRightColumnReversed=stickyRightColumn.reverse();const classNames=classnames("pb_table",`table-${size}`,`table-responsive-${responsive}`,{"table-card":container,"table-dark":dark,data_table:dataTable,"single-line":singleLine,"no-hover":disableHover,"sticky-header":sticky,"sticky-left-column":stickyLeftColumn,"sticky-right-column":stickyRightColumn,striped:striped,[outerPaddingCss]:outerPadding!==""},globalProps(props),tableCollapseCss,verticalBorderCss,className);useEffect((()=>{const handleStickyLeftColumns=()=>{if(!stickyLeftColumn.length)return;let accumulatedWidth=0;stickyLeftColumn.forEach(((colId,index)=>{const isLastColumn=index===stickyLeftColumn.length-1;const header=document.querySelector(`th[id="${colId}"]`);const cells=document.querySelectorAll(`td[id="${colId}"]`);if(header){header.classList.add("sticky");header.style.left=`${accumulatedWidth}px`;if(!isLastColumn){header.classList.add("with-border-right");header.classList.remove("sticky-left-shadow")}else{header.classList.remove("with-border-right");header.classList.add("sticky-left-shadow")}accumulatedWidth+=header.offsetWidth}cells.forEach((cell=>{cell.classList.add("sticky");cell.style.left=`${accumulatedWidth-header.offsetWidth}px`;if(!isLastColumn){cell.classList.add("with-border-right");cell.classList.remove("sticky-left-shadow")}else{cell.classList.remove("with-border-right");cell.classList.add("sticky-left-shadow")}}))}))};setTimeout((()=>{handleStickyLeftColumns()}),10);window.addEventListener("resize",handleStickyLeftColumns);return()=>{window.removeEventListener("resize",handleStickyLeftColumns)}}),[stickyLeftColumn]);useEffect((()=>{const handleStickyRightColumns=()=>{if(!stickyRightColumn.length)return;let accumulatedWidth=0;stickyRightColumnReversed.forEach(((colId,index)=>{const isLastColumn=index===stickyRightColumn.length-1;const header=document.querySelector(`th[id="${colId}"]`);const cells=document.querySelectorAll(`td[id="${colId}"]`);if(header){header.classList.add("sticky");header.style.right=`${accumulatedWidth}px`;if(!isLastColumn){header.classList.add("with-border-left");header.classList.remove("sticky-right-shadow")}else{header.classList.remove("with-border-left");header.classList.add("sticky-right-shadow")}accumulatedWidth+=header.offsetWidth}cells.forEach((cell=>{cell.classList.add("sticky");cell.style.right=`${accumulatedWidth-header.offsetWidth}px`;if(!isLastColumn){cell.classList.add("with-border-left");cell.classList.remove("sticky-right-shadow")}else{cell.classList.remove("with-border-left");cell.classList.add("sticky-right-shadow")}}))}))};setTimeout((()=>{handleStickyRightColumns()}),10);window.addEventListener("resize",handleStickyRightColumns);return()=>{window.removeEventListener("resize",handleStickyRightColumns)}}),[stickyRightColumn]);useEffect((()=>{addDataTitle()}),[]);return jsx(Fragment,{children:responsive==="scroll"?jsx("div",{className:"table-responsive-scroll",children:isTableTag?jsx("table",{...ariaProps,...dataProps,...htmlProps,className:classNames,id:id,style:dynamicInlineProps,children:children}):jsx("div",{...ariaProps,...dataProps,...htmlProps,className:classNames,id:id,style:dynamicInlineProps,children:children})}):isTableTag?jsx("table",{...ariaProps,...dataProps,...htmlProps,className:classNames,id:id,style:dynamicInlineProps,children:children}):jsx("div",{...ariaProps,...dataProps,...htmlProps,className:classNames,id:id,style:dynamicInlineProps,children:children})})};Table.Head=TableHead;Table.Header=TableHeader$1;Table.Body=TableBody$1;Table.Row=TableRow;Table.Cell=TableCell;function memo$1(getDeps,fn,opts){let deps=opts.initialDeps??[];let result;return()=>{var _a,_b,_c,_d;let depTime;if(opts.key&&((_a=opts.debug)==null?void 0:_a.call(opts)))depTime=Date.now();const newDeps=getDeps();const depsChanged=newDeps.length!==deps.length||newDeps.some(((dep,index)=>deps[index]!==dep));if(!depsChanged){return result}deps=newDeps;let resultTime;if(opts.key&&((_b=opts.debug)==null?void 0:_b.call(opts)))resultTime=Date.now();result=fn(...newDeps);if(opts.key&&((_c=opts.debug)==null?void 0:_c.call(opts))){const depEndTime=Math.round((Date.now()-depTime)*100)/100;const resultEndTime=Math.round((Date.now()-resultTime)*100)/100;const resultFpsPercentage=resultEndTime/16;const pad=(str,num)=>{str=String(str);while(str.length<num){str=" "+str}return str};console.info(`%c⏱ ${pad(resultEndTime,5)} /${pad(depEndTime,5)} ms`,`\n font-size: .6rem;\n font-weight: bold;\n color: hsl(${Math.max(0,Math.min(120-120*resultFpsPercentage,120))}deg 100% 31%);`,opts==null?void 0:opts.key)}(_d=opts==null?void 0:opts.onChange)==null?void 0:_d.call(opts,result);return result}}function notUndefined(value,msg){if(value===void 0){throw new Error(`Unexpected undefined${""}`)}else{return value}}const approxEqual=(a,b)=>Math.abs(a-b)<1;const debounce$1=(targetWindow,fn,ms2)=>{let timeoutId;return function(...args){targetWindow.clearTimeout(timeoutId);timeoutId=targetWindow.setTimeout((()=>fn.apply(this,args)),ms2)}};const defaultKeyExtractor=index=>index;const defaultRangeExtractor=range=>{const start=Math.max(range.startIndex-range.overscan,0);const end=Math.min(range.endIndex+range.overscan,range.count-1);const arr=[];for(let i=start;i<=end;i++){arr.push(i)}return arr};const observeElementRect=(instance,cb)=>{const element=instance.scrollElement;if(!element){return}const targetWindow=instance.targetWindow;if(!targetWindow){return}const handler=rect=>{const{width:width,height:height}=rect;cb({width:Math.round(width),height:Math.round(height)})};handler(element.getBoundingClientRect());if(!targetWindow.ResizeObserver){return()=>{}}const observer=new targetWindow.ResizeObserver((entries=>{const run=()=>{const entry=entries[0];if(entry==null?void 0:entry.borderBoxSize){const box=entry.borderBoxSize[0];if(box){handler({width:box.inlineSize,height:box.blockSize});return}}handler(element.getBoundingClientRect())};instance.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(run):run()}));observer.observe(element,{box:"border-box"});return()=>{observer.unobserve(element)}};const addEventListenerOptions={passive:true};const supportsScrollend=typeof window=="undefined"?true:"onscrollend"in window;const observeElementOffset=(instance,cb)=>{const element=instance.scrollElement;if(!element){return}const targetWindow=instance.targetWindow;if(!targetWindow){return}let offset2=0;const fallback=instance.options.useScrollendEvent&&supportsScrollend?()=>void 0:debounce$1(targetWindow,(()=>{cb(offset2,false)}),instance.options.isScrollingResetDelay);const createHandler=isScrolling=>()=>{const{horizontal:horizontal,isRtl:isRtl}=instance.options;offset2=horizontal?element["scrollLeft"]*(isRtl&&-1||1):element["scrollTop"];fallback();cb(offset2,isScrolling)};const handler=createHandler(true);const endHandler=createHandler(false);endHandler();element.addEventListener("scroll",handler,addEventListenerOptions);const registerScrollendEvent=instance.options.useScrollendEvent&&supportsScrollend;if(registerScrollendEvent){element.addEventListener("scrollend",endHandler,addEventListenerOptions)}return()=>{element.removeEventListener("scroll",handler);if(registerScrollendEvent){element.removeEventListener("scrollend",endHandler)}}};const measureElement=(element,entry,instance)=>{if(entry==null?void 0:entry.borderBoxSize){const box=entry.borderBoxSize[0];if(box){const size=Math.round(box[instance.options.horizontal?"inlineSize":"blockSize"]);return size}}return Math.round(element.getBoundingClientRect()[instance.options.horizontal?"width":"height"])};const elementScroll=(offset2,{adjustments:adjustments=0,behavior:behavior},instance)=>{var _a,_b;const toOffset=offset2+adjustments;(_b=(_a=instance.scrollElement)==null?void 0:_a.scrollTo)==null?void 0:_b.call(_a,{[instance.options.horizontal?"left":"top"]:toOffset,behavior:behavior})};class Virtualizer{constructor(opts){this.unsubs=[];this.scrollElement=null;this.targetWindow=null;this.isScrolling=false;this.scrollToIndexTimeoutId=null;this.measurementsCache=[];this.itemSizeCache=new Map;this.pendingMeasuredCacheIndexes=[];this.scrollRect=null;this.scrollOffset=null;this.scrollDirection=null;this.scrollAdjustments=0;this.elementsCache=new Map;this.observer=(()=>{let _ro=null;const get=()=>{if(_ro){return _ro}if(!this.targetWindow||!this.targetWindow.ResizeObserver){return null}return _ro=new this.targetWindow.ResizeObserver((entries=>{entries.forEach((entry=>{const run=()=>{this._measureElement(entry.target,entry)};this.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(run):run()}))}))};return{disconnect:()=>{var _a;(_a=get())==null?void 0:_a.disconnect();_ro=null},observe:target=>{var _a;return(_a=get())==null?void 0:_a.observe(target,{box:"border-box"})},unobserve:target=>{var _a;return(_a=get())==null?void 0:_a.unobserve(target)}}})();this.range=null;this.setOptions=opts2=>{Object.entries(opts2).forEach((([key,value])=>{if(typeof value==="undefined")delete opts2[key]}));this.options={debug:false,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:false,getItemKey:defaultKeyExtractor,rangeExtractor:defaultRangeExtractor,onChange:()=>{},measureElement:measureElement,initialRect:{width:0,height:0},scrollMargin:0,gap:0,indexAttribute:"data-index",initialMeasurementsCache:[],lanes:1,isScrollingResetDelay:150,enabled:true,isRtl:false,useScrollendEvent:true,useAnimationFrameWithResizeObserver:false,...opts2}};this.notify=sync=>{var _a,_b;(_b=(_a=this.options).onChange)==null?void 0:_b.call(_a,this,sync)};this.maybeNotify=memo$1((()=>{this.calculateRange();return[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]}),(isScrolling=>{this.notify(isScrolling)}),{key:false,debug:()=>this.options.debug,initialDeps:[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]});this.cleanup=()=>{this.unsubs.filter(Boolean).forEach((d=>d()));this.unsubs=[];this.observer.disconnect();this.scrollElement=null;this.targetWindow=null};this._didMount=()=>()=>{this.cleanup()};this._willUpdate=()=>{var _a;const scrollElement=this.options.enabled?this.options.getScrollElement():null;if(this.scrollElement!==scrollElement){this.cleanup();if(!scrollElement){this.maybeNotify();return}this.scrollElement=scrollElement;if(this.scrollElement&&"ownerDocument"in this.scrollElement){this.targetWindow=this.scrollElement.ownerDocument.defaultView}else{this.targetWindow=((_a=this.scrollElement)==null?void 0:_a.window)??null}this.elementsCache.forEach((cached=>{this.observer.observe(cached)}));this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0});this.unsubs.push(this.options.observeElementRect(this,(rect=>{this.scrollRect=rect;this.maybeNotify()})));this.unsubs.push(this.options.observeElementOffset(this,((offset2,isScrolling)=>{this.scrollAdjustments=0;this.scrollDirection=isScrolling?this.getScrollOffset()<offset2?"forward":"backward":null;this.scrollOffset=offset2;this.isScrolling=isScrolling;this.maybeNotify()})))}};this.getSize=()=>{if(!this.options.enabled){this.scrollRect=null;return 0}this.scrollRect=this.scrollRect??this.options.initialRect;return this.scrollRect[this.options.horizontal?"width":"height"]};this.getScrollOffset=()=>{if(!this.options.enabled){this.scrollOffset=null;return 0}this.scrollOffset=this.scrollOffset??(typeof this.options.initialOffset==="function"?this.options.initialOffset():this.options.initialOffset);return this.scrollOffset};this.getFurthestMeasurement=(measurements,index)=>{const furthestMeasurementsFound=new Map;const furthestMeasurements=new Map;for(let m=index-1;m>=0;m--){const measurement=measurements[m];if(furthestMeasurementsFound.has(measurement.lane)){continue}const previousFurthestMeasurement=furthestMeasurements.get(measurement.lane);if(previousFurthestMeasurement==null||measurement.end>previousFurthestMeasurement.end){furthestMeasurements.set(measurement.lane,measurement)}else if(measurement.end<previousFurthestMeasurement.end){furthestMeasurementsFound.set(measurement.lane,true)}if(furthestMeasurementsFound.size===this.options.lanes){break}}return furthestMeasurements.size===this.options.lanes?Array.from(furthestMeasurements.values()).sort(((a,b)=>{if(a.end===b.end){return a.index-b.index}return a.end-b.end}))[0]:void 0};this.getMeasurementOptions=memo$1((()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey,this.options.enabled]),((count2,paddingStart,scrollMargin,getItemKey,enabled)=>{this.pendingMeasuredCacheIndexes=[];return{count:count2,paddingStart:paddingStart,scrollMargin:scrollMargin,getItemKey:getItemKey,enabled:enabled}}),{key:false});this.getMeasurements=memo$1((()=>[this.getMeasurementOptions(),this.itemSizeCache]),(({count:count2,paddingStart:paddingStart,scrollMargin:scrollMargin,getItemKey:getItemKey,enabled:enabled},itemSizeCache)=>{if(!enabled){this.measurementsCache=[];this.itemSizeCache.clear();return[]}if(this.measurementsCache.length===0){this.measurementsCache=this.options.initialMeasurementsCache;this.measurementsCache.forEach((item=>{this.itemSizeCache.set(item.key,item.size)}))}const min2=this.pendingMeasuredCacheIndexes.length>0?Math.min(...this.pendingMeasuredCacheIndexes):0;this.pendingMeasuredCacheIndexes=[];const measurements=this.measurementsCache.slice(0,min2);for(let i=min2;i<count2;i++){const key=getItemKey(i);const furthestMeasurement=this.options.lanes===1?measurements[i-1]:this.getFurthestMeasurement(measurements,i);const start=furthestMeasurement?furthestMeasurement.end+this.options.gap:paddingStart+scrollMargin;const measuredSize=itemSizeCache.get(key);const size=typeof measuredSize==="number"?measuredSize:this.options.estimateSize(i);const end=start+size;const lane=furthestMeasurement?furthestMeasurement.lane:i%this.options.lanes;measurements[i]={index:i,start:start,size:size,end:end,key:key,lane:lane}}this.measurementsCache=measurements;return measurements}),{key:false,debug:()=>this.options.debug});this.calculateRange=memo$1((()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset()]),((measurements,outerSize,scrollOffset)=>this.range=measurements.length>0&&outerSize>0?calculateRange({measurements:measurements,outerSize:outerSize,scrollOffset:scrollOffset}):null),{key:false,debug:()=>this.options.debug});this.getVirtualIndexes=memo$1((()=>{let startIndex=null;let endIndex=null;const range=this.calculateRange();if(range){startIndex=range.startIndex;endIndex=range.endIndex}return[this.options.rangeExtractor,this.options.overscan,this.options.count,startIndex,endIndex]}),((rangeExtractor,overscan,count2,startIndex,endIndex)=>startIndex===null||endIndex===null?[]:rangeExtractor({startIndex:startIndex,endIndex:endIndex,overscan:overscan,count:count2})),{key:false,debug:()=>this.options.debug});this.indexFromElement=node=>{const attributeName=this.options.indexAttribute;const indexStr=node.getAttribute(attributeName);if(!indexStr){console.warn(`Missing attribute name '${attributeName}={index}' on measured element.`);return-1}return parseInt(indexStr,10)};this._measureElement=(node,entry)=>{const index=this.indexFromElement(node);const item=this.measurementsCache[index];if(!item){return}const key=item.key;const prevNode=this.elementsCache.get(key);if(prevNode!==node){if(prevNode){this.observer.unobserve(prevNode)}this.observer.observe(node);this.elementsCache.set(key,node)}if(node.isConnected){this.resizeItem(index,this.options.measureElement(node,entry,this))}};this.resizeItem=(index,size)=>{const item=this.measurementsCache[index];if(!item){return}const itemSize=this.itemSizeCache.get(item.key)??item.size;const delta=size-itemSize;if(delta!==0){if(this.shouldAdjustScrollPositionOnItemSizeChange!==void 0?this.shouldAdjustScrollPositionOnItemSizeChange(item,delta,this):item.start<this.getScrollOffset()+this.scrollAdjustments){this._scrollToOffset(this.getScrollOffset(),{adjustments:this.scrollAdjustments+=delta,behavior:void 0})}this.pendingMeasuredCacheIndexes.push(item.index);this.itemSizeCache=new Map(this.itemSizeCache.set(item.key,size));this.notify(false)}};this.measureElement=node=>{if(!node){this.elementsCache.forEach(((cached,key)=>{if(!cached.isConnected){this.observer.unobserve(cached);this.elementsCache.delete(key)}}));return}this._measureElement(node,void 0)};this.getVirtualItems=memo$1((()=>[this.getVirtualIndexes(),this.getMeasurements()]),((indexes,measurements)=>{const virtualItems=[];for(let k=0,len=indexes.length;k<len;k++){const i=indexes[k];const measurement=measurements[i];virtualItems.push(measurement)}return virtualItems}),{key:false,debug:()=>this.options.debug});this.getVirtualItemForOffset=offset2=>{const measurements=this.getMeasurements();if(measurements.length===0){return void 0}return notUndefined(measurements[findNearestBinarySearch(0,measurements.length-1,(index=>notUndefined(measurements[index]).start),offset2)])};this.getOffsetForAlignment=(toOffset,align)=>{const size=this.getSize();const scrollOffset=this.getScrollOffset();if(align==="auto"){if(toOffset>=scrollOffset+size){align="end"}}if(align==="end"){toOffset-=size}const scrollSizeProp=this.options.horizontal?"scrollWidth":"scrollHeight";const scrollSize=this.scrollElement?"document"in this.scrollElement?this.scrollElement.document.documentElement[scrollSizeProp]:this.scrollElement[scrollSizeProp]:0;const maxOffset=scrollSize-size;return Math.max(Math.min(maxOffset,toOffset),0)};this.getOffsetForIndex=(index,align="auto")=>{index=Math.max(0,Math.min(index,this.options.count-1));const item=this.measurementsCache[index];if(!item){return void 0}const size=this.getSize();const scrollOffset=this.getScrollOffset();if(align==="auto"){if(item.end>=scrollOffset+size-this.options.scrollPaddingEnd){align="end"}else if(item.start<=scrollOffset+this.options.scrollPaddingStart){align="start"}else{return[scrollOffset,align]}}const centerOffset=item.start-this.options.scrollPaddingStart+(item.size-size)/2;switch(align){case"center":return[this.getOffsetForAlignment(centerOffset,align),align];case"end":return[this.getOffsetForAlignment(item.end+this.options.scrollPaddingEnd,align),align];default:return[this.getOffsetForAlignment(item.start-this.options.scrollPaddingStart,align),align]}};this.isDynamicMode=()=>this.elementsCache.size>0;this.cancelScrollToIndex=()=>{if(this.scrollToIndexTimeoutId!==null&&this.targetWindow){this.targetWindow.clearTimeout(this.scrollToIndexTimeoutId);this.scrollToIndexTimeoutId=null}};this.scrollToOffset=(toOffset,{align:align="start",behavior:behavior}={})=>{this.cancelScrollToIndex();if(behavior==="smooth"&&this.isDynamicMode()){console.warn("The `smooth` scroll behavior is not fully supported with dynamic size.")}this._scrollToOffset(this.getOffsetForAlignment(toOffset,align),{adjustments:void 0,behavior:behavior})};this.scrollToIndex=(index,{align:initialAlign="auto",behavior:behavior}={})=>{index=Math.max(0,Math.min(index,this.options.count-1));this.cancelScrollToIndex();if(behavior==="smooth"&&this.isDynamicMode()){console.warn("The `smooth` scroll behavior is not fully supported with dynamic size.")}const offsetAndAlign=this.getOffsetForIndex(index,initialAlign);if(!offsetAndAlign)return;const[offset2,align]=offsetAndAlign;this._scrollToOffset(offset2,{adjustments:void 0,behavior:behavior});if(behavior!=="smooth"&&this.isDynamicMode()&&this.targetWindow){this.scrollToIndexTimeoutId=this.targetWindow.setTimeout((()=>{this.scrollToIndexTimeoutId=null;const elementInDOM=this.elementsCache.has(this.options.getItemKey(index));if(elementInDOM){const[latestOffset]=notUndefined(this.getOffsetForIndex(index,align));if(!approxEqual(latestOffset,this.getScrollOffset())){this.scrollToIndex(index,{align:align,behavior:behavior})}}else{this.scrollToIndex(index,{align:align,behavior:behavior})}}))}};this.scrollBy=(delta,{behavior:behavior}={})=>{this.cancelScrollToIndex();if(behavior==="smooth"&&this.isDynamicMode()){console.warn("The `smooth` scroll behavior is not fully supported with dynamic size.")}this._scrollToOffset(this.getScrollOffset()+delta,{adjustments:void 0,behavior:behavior})};this.getTotalSize=()=>{var _a;const measurements=this.getMeasurements();let end;if(measurements.length===0){end=this.options.paddingStart}else{end=this.options.lanes===1?((_a=measurements[measurements.length-1])==null?void 0:_a.end)??0:Math.max(...measurements.slice(-this.options.lanes).map((m=>m.end)))}return Math.max(end-this.options.scrollMargin+this.options.paddingEnd,0)};this._scrollToOffset=(offset2,{adjustments:adjustments,behavior:behavior})=>{this.options.scrollToFn(offset2,{behavior:behavior,adjustments:adjustments},this)};this.measure=()=>{this.itemSizeCache=new Map;this.notify(false)};this.setOptions(opts)}}const findNearestBinarySearch=(low,high,getCurrentValue,value)=>{while(low<=high){const middle=(low+high)/2|0;const currentValue=getCurrentValue(middle);if(currentValue<value){low=middle+1}else if(currentValue>value){high=middle-1}else{return middle}}if(low>0){return low-1}else{return 0}};function calculateRange({measurements:measurements,outerSize:outerSize,scrollOffset:scrollOffset}){const count2=measurements.length-1;const getOffset2=index=>measurements[index].start;const startIndex=findNearestBinarySearch(0,count2,getOffset2,scrollOffset);let endIndex=startIndex;while(endIndex<count2&&measurements[endIndex].end<scrollOffset+outerSize){endIndex++}return{startIndex:startIndex,endIndex:endIndex}}const useIsomorphicLayoutEffect=typeof document!=="undefined"?React.useLayoutEffect:React.useEffect;function useVirtualizerBase(options){const rerender=React.useReducer((()=>({})),{})[1];const resolvedOptions={...options,onChange:(instance2,sync)=>{var _a;if(sync){flushSync(rerender)}else{rerender()}(_a=options.onChange)==null?void 0:_a.call(options,instance2,sync)}};const[instance]=React.useState((()=>new Virtualizer(resolvedOptions)));instance.setOptions(resolvedOptions);useIsomorphicLayoutEffect((()=>instance._didMount()),[]);useIsomorphicLayoutEffect((()=>instance._willUpdate()));return instance}function useVirtualizer(options){return useVirtualizerBase({observeElementRect:observeElementRect,observeElementOffset:observeElementOffset,scrollToFn:elementScroll,...options})}const getVirtualizedContainerStyles=maxHeight=>{let heightValue="600px";if(maxHeight){switch(maxHeight){case"xs":heightValue="200px";break;case"sm":heightValue="300px";break;case"md":heightValue="400px";break;case"lg":heightValue="500px";break;case"xl":heightValue="600px";break;case"xxl":heightValue="700px";break;case"xxxl":heightValue="800px";break;default:if(maxHeight!=="auto"){heightValue=maxHeight}}}return{overflow:"auto",position:"relative",height:heightValue,width:"100%"}};const getVirtualizedRowStyle=startPosition=>({position:"absolute",top:0,left:0,width:"100%",height:"40px",transform:`translateY(${startPosition}px)`,tableLayout:"fixed"});const getRowHeightEstimate=rowType=>{switch(rowType){case"header":return 40;case"loading":return 30;case"row":default:return 40}};const AdvancedTableContext=createContext({});const AdvancedTableProvider=({children:children,...props})=>{const tableContainerRef=useRef(null);const containerRef=props.tableContainerRef||tableContainerRef;const table=props.table;const isVirtualized=props.virtualizedRows||props.enableVirtualization;const flattenedItems=useMemo((()=>{if(!isVirtualized||!table){return[]}const tableRows=table.getRowModel().rows;const items=[];const subRowHeaders=props.subRowHeaders;const inlineRowLoading=props.inlineRowLoading;const columnDefinitions=props.columnDefinitions;tableRows.forEach(((row,index)=>{var _a,_b,_c;const isFirstChildofSubrow=row.depth>0&&row.index===0;if(isFirstChildofSubrow&&subRowHeaders){items.push({type:"header",row:row,id:`header-${row.id}-${index}`})}items.push({type:"row",row:row,id:`row-${row.id}-${index}`});const isExpandable=row.getIsExpanded();const rowHasNoChildren=((_a=row.original)==null?void 0:_a.children)&&!row.original.children.length?true:false;const isDataLoading=isExpandable&&(inlineRowLoading&&rowHasNoChildren)&&row.depth<(((_c=(_b=columnDefinitions[0])==null?void 0:_b.cellAccessors)==null?void 0:_c.length)||0);if(isDataLoading){items.push({type:"loading",row:row,id:`loading-${row.id}-${index}`})}}));return items}),[isVirtualized,table,props.subRowHeaders,props.inlineRowLoading,props.columnDefinitions,table==null?void 0:table.getRowModel().rows.length,JSON.stringify((table==null?void 0:table.getState().sorting)||[]),JSON.stringify((table==null?void 0:table.getState().expanded)||{})]);const virtualizer=useVirtualizer({count:isVirtualized&&flattenedItems.length>0?flattenedItems.length:0,getScrollElement:()=>containerRef.current,estimateSize:index=>{if(!isVirtualized||flattenedItems.length===0)return 0;const item=flattenedItems[index];if(!item)return getRowHeightEstimate("row");return getRowHeightEstimate(item.type)},overscan:10,getItemKey:index=>{var _a;if(!isVirtualized||flattenedItems.length===0||index>=flattenedItems.length){return`item-${index}`}return((_a=flattenedItems[index])==null?void 0:_a.id)||`item-${index}`}});useEffect((()=>{if(isVirtualized&&virtualizer&&table&&containerRef.current){virtualizer.measure();containerRef.current.scrollTop=0}}),[isVirtualized,virtualizer,table,containerRef,JSON.stringify((table==null?void 0:table.getState().sorting)||[]),JSON.stringify((table==null?void 0:table.getState().expanded)||{})]);const contextValue={...props,table:table,tableContainerRef:containerRef,virtualizer:isVirtualized?virtualizer:null,flattenedItems:flattenedItems,virtualizedRows:isVirtualized,enableVirtualization:isVirtualized};return jsx(AdvancedTableContext.Provider,{value:contextValue,children:children})};
2
2
  /**
3
3
  * table-core
4
4
  *
@@ -1,4 +1,4 @@
1
- import React__default,{useState}from"react";import{jsx,jsxs}from"react/jsx-runtime";var commonjsGlobal=typeof globalThis!=="undefined"?globalThis:typeof window!=="undefined"?window:typeof global!=="undefined"?global:typeof self!=="undefined"?self:{};function getDefaultExportFromCjs(x){return x&&x.__esModule&&Object.prototype.hasOwnProperty.call(x,"default")?x["default"]:x}function getAugmentedNamespace(n){if(n.__esModule)return n;var f=n.default;if(typeof f=="function"){var a=function a2(){if(this instanceof a2){return Reflect.construct(f,arguments,this.constructor)}return f.apply(this,arguments)};a.prototype=f.prototype}else a={};Object.defineProperty(a,"__esModule",{value:true});Object.keys(n).forEach((function(k){var d=Object.getOwnPropertyDescriptor(n,k);Object.defineProperty(a,k,d.get?d:{enumerable:true,get:function(){return n[k]}})}));return a}const isEmpty=obj=>[Object,Array].includes((obj||{}).constructor)&&!Object.entries(obj||{}).length;const get=(obj,path,defaultValue)=>{const travel=regexp=>String.prototype.split.call(path,regexp).filter(Boolean).reduce(((res,key)=>res!==null&&res!==void 0?res[key]:res),obj);const result=travel(/[,[\]]+?/)||travel(/[,[\].]+?/);return result===void 0||result===obj?defaultValue:result};const isString=str=>str!=null&&typeof str.valueOf()==="string";const uniqueId=(()=>{let counter=0;return(prefix="")=>`${prefix}${++counter}`})();const omitBy=(obj,predicate)=>{if(obj===null||typeof obj!=="object")return{};return Object.keys(obj).reduce(((result,key)=>{if(!predicate(obj[key],key)){result[key]=obj[key]}return result}),{})};const omit=(obj,...paths)=>{if(obj===null||typeof obj!=="object")return{};const keysToOmit=new Set;paths.forEach((p2=>{if(Array.isArray(p2)){p2.forEach((key=>keysToOmit.add(key)))}else{keysToOmit.add(p2)}}));const result={};for(const key in obj){if(!keysToOmit.has(key)){result[key]=obj[key]}}return result};const noop=()=>{};const cloneDeep=value=>{if(value===null||typeof value!=="object"){return value}if(Array.isArray(value)){return value.map(cloneDeep)}if(value instanceof Date){return new Date(value.getTime())}if(value instanceof RegExp){return new RegExp(value.source,value.flags)}const clonedObj={};for(const key in value){if(Object.prototype.hasOwnProperty.call(value,key)){clonedObj[key]=cloneDeep(value[key])}}return clonedObj};function merge(...objects){const isPlainObject=obj=>!!obj&&typeof obj==="object"&&!Array.isArray(obj);const result={};for(const obj of objects){if(!obj||typeof obj!=="object")continue;for(const key of Object.keys(obj)){const oldVal=result[key];const newVal=obj[key];if(Array.isArray(oldVal)&&Array.isArray(newVal)){result[key]=newVal}else if(isPlainObject(oldVal)&&isPlainObject(newVal)){result[key]=merge(oldVal,newVal)}else if(Array.isArray(oldVal)&&isPlainObject(newVal)){result[key]=oldVal}else if(isPlainObject(oldVal)&&Array.isArray(newVal)){result[key]=oldVal}else{result[key]=newVal}}}return result}const createIteratee=predicate=>{if(typeof predicate==="function"){return predicate}if(typeof predicate==="string"){return obj=>obj[predicate]}if(Array.isArray(predicate)){const[key,value]=predicate;return obj=>obj[key]===value}if(typeof predicate==="object"&&predicate!==null){return obj=>{for(const key in predicate){if(Object.prototype.hasOwnProperty.call(predicate,key)){if(obj[key]!==predicate[key])return false}}return true}}return()=>false};const filter=(array,predicate)=>{const iteratee=createIteratee(predicate);return array.filter(iteratee)};const find=(array,predicate)=>{const iteratee=createIteratee(predicate);return array.find(iteratee)};const partial=(fn2,...partials)=>{const placeholder=partial.placeholder;return(...args)=>{let argIndex=0;const finalArgs=partials.map((arg=>arg===placeholder?args[argIndex++]:arg));return fn2(...finalArgs.concat(args.slice(argIndex)))}};partial.placeholder=Symbol();const map=(collection,iteratee)=>{const fn2=typeof iteratee==="function"?iteratee:typeof iteratee==="string"?item=>item[iteratee]:item=>item;if(Array.isArray(collection)){return collection.map(((value,index)=>fn2(value,index,collection)))}return Object.keys(collection).map((key=>fn2(collection[key],key,collection)))};const debounce$2=(func,wait=0,options={})=>{let timerId=null;let lastArgs;let lastThis;let lastCallTime=0;let lastInvokeTime=0;let result;!!options.leading;options.trailing===void 0?true:!!options.trailing;const maxWait=options.maxWait;const invoke=time=>{result=func.apply(lastThis,lastArgs);lastInvokeTime=time;lastArgs=lastThis=null;return result};const startTimer=(pendingFunc,delay)=>setTimeout(pendingFunc,delay);const remainingWait=time=>{const timeSinceLastCall=time-lastCallTime;const timeSinceLastInvoke=time-lastInvokeTime;const timeWaiting=wait-timeSinceLastCall;return maxWait!==void 0?Math.min(timeWaiting,maxWait-timeSinceLastInvoke):timeWaiting};const shouldInvoke=time=>{const timeSinceLastCall=time-lastCallTime;const timeSinceLastInvoke=time-lastInvokeTime;return lastCallTime===0||timeSinceLastCall>=wait||timeSinceLastCall<0||maxWait!==void 0&&timeSinceLastInvoke>=maxWait};const debounced=(...args)=>{const time=Date.now();lastArgs=args;lastThis=void 0;lastCallTime=time;if(shouldInvoke(time)){if(timerId===null){timerId=startTimer((()=>{timerId=null;invoke(Date.now())}),remainingWait(time))}}return result};debounced.cancel=()=>{if(timerId!==null){clearTimeout(timerId)}timerId=null;lastArgs=lastThis=null;lastCallTime=0};debounced.flush=()=>{if(timerId!==null){clearTimeout(timerId);timerId=null;return invoke(Date.now())}return result};return debounced};const useCollapsible=(initial=true)=>{const[collapsed,setCollapsed]=useState(initial);const toggle=()=>setCollapsed((prev=>!prev));return[collapsed,toggle,setCollapsed]};var server_browser={exports:{}};var reactDomServer_browser_production_min={};
1
+ import React__default,{useState}from"react";import{jsx,jsxs}from"react/jsx-runtime";var commonjsGlobal=typeof globalThis!=="undefined"?globalThis:typeof window!=="undefined"?window:typeof global!=="undefined"?global:typeof self!=="undefined"?self:{};function getDefaultExportFromCjs(x){return x&&x.__esModule&&Object.prototype.hasOwnProperty.call(x,"default")?x["default"]:x}function getAugmentedNamespace(n){if(n.__esModule)return n;var f=n.default;if(typeof f=="function"){var a=function a2(){if(this instanceof a2){return Reflect.construct(f,arguments,this.constructor)}return f.apply(this,arguments)};a.prototype=f.prototype}else a={};Object.defineProperty(a,"__esModule",{value:true});Object.keys(n).forEach((function(k){var d=Object.getOwnPropertyDescriptor(n,k);Object.defineProperty(a,k,d.get?d:{enumerable:true,get:function(){return n[k]}})}));return a}const isEmpty=obj=>[Object,Array].includes((obj||{}).constructor)&&!Object.entries(obj||{}).length;const get=(obj,path,defaultValue)=>{const travel=regexp=>String.prototype.split.call(path,regexp).filter(Boolean).reduce(((res,key)=>res!==null&&res!==void 0?res[key]:res),obj);const result=travel(/[,[\]]+?/)||travel(/[,[\].]+?/);return result===void 0||result===obj?defaultValue:result};const isString=str=>str!=null&&typeof str.valueOf()==="string";const uniqueId=(()=>{let counter=0;return(prefix="")=>`${prefix}${++counter}`})();const omitBy=(obj,predicate)=>{if(obj===null||typeof obj!=="object")return{};return Object.keys(obj).reduce(((result,key)=>{if(!predicate(obj[key],key)){result[key]=obj[key]}return result}),{})};const omit=(obj,...paths)=>{if(obj===null||typeof obj!=="object")return{};const keysToOmit=new Set;paths.forEach((p2=>{if(Array.isArray(p2)){p2.forEach((key=>keysToOmit.add(key)))}else{keysToOmit.add(p2)}}));const result={};for(const key in obj){if(!keysToOmit.has(key)){result[key]=obj[key]}}return result};const noop=()=>{};const cloneDeep=value=>{if(value===null||typeof value!=="object"){return value}if(Array.isArray(value)){return value.map(cloneDeep)}if(value instanceof Date){return new Date(value.getTime())}if(value instanceof RegExp){return new RegExp(value.source,value.flags)}const clonedObj={};for(const key in value){if(Object.prototype.hasOwnProperty.call(value,key)){clonedObj[key]=cloneDeep(value[key])}}return clonedObj};function merge(...objects){const isPlainObject=obj=>!!obj&&typeof obj==="object"&&!Array.isArray(obj);const result={};for(const obj of objects){if(!obj||typeof obj!=="object")continue;for(const key of Object.keys(obj)){const oldVal=result[key];const newVal=obj[key];if(Array.isArray(oldVal)&&Array.isArray(newVal)){result[key]=newVal}else if(isPlainObject(oldVal)&&isPlainObject(newVal)){result[key]=merge(oldVal,newVal)}else if(Array.isArray(oldVal)&&isPlainObject(newVal)){result[key]=oldVal}else if(isPlainObject(oldVal)&&Array.isArray(newVal)){result[key]=oldVal}else{result[key]=newVal}}}return result}const createIteratee=predicate=>{if(typeof predicate==="function"){return predicate}if(typeof predicate==="string"){return obj=>obj[predicate]}if(Array.isArray(predicate)){const[key,value]=predicate;return obj=>obj[key]===value}if(typeof predicate==="object"&&predicate!==null){return obj=>{for(const key in predicate){if(Object.prototype.hasOwnProperty.call(predicate,key)){if(obj[key]!==predicate[key])return false}}return true}}return()=>false};const filter=(array,predicate)=>{const iteratee=createIteratee(predicate);return array.filter(iteratee)};const find=(array,predicate)=>{const iteratee=createIteratee(predicate);return array.find(iteratee)};const partial=(fn2,...partials)=>{const placeholder=partial.placeholder;return(...args)=>{let argIndex=0;const finalArgs=partials.map((arg=>arg===placeholder?args[argIndex++]:arg));return fn2(...finalArgs.concat(args.slice(argIndex)))}};partial.placeholder=Symbol();const map=(collection,iteratee)=>{const fn2=typeof iteratee==="function"?iteratee:typeof iteratee==="string"?item=>item[iteratee]:item=>item;if(Array.isArray(collection)){return collection.map(((value,index)=>fn2(value,index,collection)))}return Object.keys(collection).map((key=>fn2(collection[key],key,collection)))};function debounce$2(func,wait,immediate){let timeout;return function(...args){if(timeout)clearTimeout(timeout);timeout=setTimeout((()=>{timeout=null;{func.apply(this,args)}}),wait)}}const useCollapsible=(initial=true)=>{const[collapsed,setCollapsed]=useState(initial);const toggle=()=>setCollapsed((prev=>!prev));return[collapsed,toggle,setCollapsed]};var server_browser={exports:{}};var reactDomServer_browser_production_min={};
2
2
  /*
3
3
  object-assign
4
4
  (c) Sindre Sorhus
@@ -1 +1 @@
1
- import{P as PbEnhancedElement,d as debounce}from"./lib-ChtLutkU.js";const KIT_SELECTOR='[class^="pb_"][class*="_kit"]';const ERROR_MESSAGE_SELECTOR=".pb_body_kit_negative";const FORM_SELECTOR='form[data-pb-form-validation="true"]';const REQUIRED_FIELDS_SELECTOR="input[required],textarea[required],select[required]";const FIELD_EVENTS=["change","valid","invalid"];class PbFormValidation extends PbEnhancedElement{static get selector(){return FORM_SELECTOR}connect(){this.formValidationFields.forEach((field=>{FIELD_EVENTS.forEach((e=>{field.addEventListener(e,debounce((event=>{this.validateFormField(event)}),250),false)}))}))}validateFormField(event){event.preventDefault();const{target:target}=event;target.setCustomValidity("");const isValid=event.target.validity.valid;if(isValid){this.clearError(target)}else{this.showValidationMessage(target)}}showValidationMessage(target){const{parentElement:parentElement}=target;this.clearError(target);parentElement.closest(KIT_SELECTOR).classList.add("error");const errorMessageContainer=this.errorMessageContainer;if(target.dataset.message)target.setCustomValidity(target.dataset.message);errorMessageContainer.innerHTML=target.validationMessage;parentElement.appendChild(errorMessageContainer)}clearError(target){const{parentElement:parentElement}=target;parentElement.closest(KIT_SELECTOR).classList.remove("error");const errorMessageContainer=parentElement.querySelector(ERROR_MESSAGE_SELECTOR);if(errorMessageContainer)errorMessageContainer.remove()}get errorMessageContainer(){const errorContainer=document.createElement("div");const kitClassName=ERROR_MESSAGE_SELECTOR.replace(/\./,"");errorContainer.classList.add(kitClassName);return errorContainer}get formValidationFields(){return this._formValidationFields=this._formValidationFields||this.element.querySelectorAll(REQUIRED_FIELDS_SELECTOR)}}window.PbFormValidation=PbFormValidation;
1
+ import{P as PbEnhancedElement,d as debounce}from"./lib-DpO_YjaF.js";const KIT_SELECTOR='[class^="pb_"][class*="_kit"]';const ERROR_MESSAGE_SELECTOR=".pb_body_kit_negative";const FORM_SELECTOR='form[data-pb-form-validation="true"]';const REQUIRED_FIELDS_SELECTOR="input[required],textarea[required],select[required]";const FIELD_EVENTS=["change","valid","invalid"];class PbFormValidation extends PbEnhancedElement{static get selector(){return FORM_SELECTOR}connect(){this.formValidationFields.forEach((field=>{FIELD_EVENTS.forEach((e=>{field.addEventListener(e,debounce((event=>{this.validateFormField(event)}),250),false)}))}))}validateFormField(event){event.preventDefault();const{target:target}=event;target.setCustomValidity("");const isValid=event.target.validity.valid;if(isValid){this.clearError(target)}else{this.showValidationMessage(target)}}showValidationMessage(target){const{parentElement:parentElement}=target;this.clearError(target);parentElement.closest(KIT_SELECTOR).classList.add("error");const errorMessageContainer=this.errorMessageContainer;if(target.dataset.message)target.setCustomValidity(target.dataset.message);errorMessageContainer.innerHTML=target.validationMessage;parentElement.appendChild(errorMessageContainer)}clearError(target){const{parentElement:parentElement}=target;parentElement.closest(KIT_SELECTOR).classList.remove("error");const errorMessageContainer=parentElement.querySelector(ERROR_MESSAGE_SELECTOR);if(errorMessageContainer)errorMessageContainer.remove()}get errorMessageContainer(){const errorContainer=document.createElement("div");const kitClassName=ERROR_MESSAGE_SELECTOR.replace(/\./,"");errorContainer.classList.add(kitClassName);return errorContainer}get formValidationFields(){return this._formValidationFields=this._formValidationFields||this.element.querySelectorAll(REQUIRED_FIELDS_SELECTOR)}}window.PbFormValidation=PbFormValidation;
@@ -1 +1 @@
1
- import"./_weekday_stacked-D7pAcXO0.js";import"./lazysizes-B7xYodB-.js";import"./_typeahead-C_orSAyx.js";import"./lib-ChtLutkU.js";import"react/jsx-runtime";import"react";import"react-dom";import"react-trix";import"trix";import"react-is";
1
+ import"./_weekday_stacked-DLFmBReC.js";import"./lazysizes-B7xYodB-.js";import"./_typeahead-tLz4QFO8.js";import"./lib-DpO_YjaF.js";import"react/jsx-runtime";import"react";import"react-dom";import"react-trix";import"trix";import"react-is";