playbook_ui 14.15.0 → 14.16.0.pre.rc.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/app/pb_kits/playbook/pb_dialog/dialog.html.erb +5 -6
- data/app/pb_kits/playbook/pb_dialog/dialogHelper.js +2 -0
- data/app/pb_kits/playbook/pb_dialog/index.js +75 -0
- data/dist/chunks/{_typeahead-BhfaW1J9.js → _typeahead-RfKdit7E.js} +1 -1
- data/dist/chunks/{_weekday_stacked-CKRIELiF.js → _weekday_stacked-RWsNWtMH.js} +1 -1
- data/dist/chunks/lazysizes-B7xYodB-.js +1 -0
- data/dist/chunks/vendor.js +1 -1
- data/dist/playbook-doc.js +1 -1
- data/dist/playbook-rails-react-bindings.js +1 -1
- data/dist/playbook-rails.js +1 -1
- data/lib/playbook/version.rb +2 -2
- metadata +6 -5
- data/dist/chunks/lazysizes-DHz07jlL.js +0 -1
@@ -1,4 +1,4 @@
|
|
1
|
-
import{l as lazysizesExports}from"./lazysizes-DHz07jlL.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{w as buildAriaProps,x as buildDataProps,y as buildHtmlProps,z as classnames,A as globalProps,E as Draggable,F as buildCss,H as Collapsible,J as globalInlineProps,_ as __rest,K as Icon,N as Flex,O as Checkbox,Q as Body$1,S as Caption,U as Card,V as FlexItem,W as __awaiter$1,X as domSafeProps,Y as Tooltip$1,Z as Button,$ as Title,a0 as SectionSeparator,a1 as TextInput,a2 as PropTypes,a3 as noop$5,a4 as isEmpty,a5 as omitBy,a6 as PbReactPopover,a7 as CircleIconButton,a8 as HighchartsReact,a9 as Badge,aa as joinPresent,ab as titleize,ac as IconCircle,ad as Image,ae as Avatar,af as Radio}from"./_typeahead-BhfaW1J9.js";import{u as useCollapsible,j as getAllIcons,D as DateTime$1,a as datePickerHelper,k as useDropdown,m as map,p as partial,l as find$1,n as commonjsGlobal,o as getDefaultExportFromCjs,q as highchartsDarkTheme,r as highchartsTheme,s as noop$6,t as colors,i as PbTextarea}from"./lib-5OzNgeeu.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(lazysizesExports)}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&®ClassTest.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=_a=>{var{children:children}=_a,props=__rest(_a,["children"]);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 _a2,_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=((_a2=row.original)===null||_a2===void 0?void 0:_a2.children)&&!row.original.children.length?true:false;const isDataLoading=isExpandable&&(inlineRowLoading&&rowHasNoChildren)&&row.depth<(((_c=(_b=columnDefinitions[0])===null||_b===void 0?void 0:_b.cellAccessors)===null||_c===void 0?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||table===void 0?void 0:table.getRowModel().rows.length,JSON.stringify((table===null||table===void 0?void 0:table.getState().sorting)||[]),JSON.stringify((table===null||table===void 0?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 _a2;if(!isVirtualized||flattenedItems.length===0||index>=flattenedItems.length){return`item-${index}`}return((_a2=flattenedItems[index])===null||_a2===void 0?void 0:_a2.id)||`item-${index}`}});useEffect((()=>{if(isVirtualized&&virtualizer&&table&&containerRef.current){virtualizer.measure();containerRef.current.scrollTop=0}}),[isVirtualized,virtualizer,table,containerRef,JSON.stringify((table===null||table===void 0?void 0:table.getState().sorting)||[]),JSON.stringify((table===null||table===void 0?void 0:table.getState().expanded)||{})]);const contextValue=Object.assign(Object.assign({},props),{table:table,tableContainerRef:containerRef,virtualizer:isVirtualized?virtualizer:null,flattenedItems:flattenedItems,virtualizedRows:isVirtualized,enableVirtualization:isVirtualized});return jsx(AdvancedTableContext.Provider,Object.assign({value:contextValue},{children:children}),void 0)};
|
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,_ as __rest,w as Icon,F as Flex,x as Checkbox,y as Body$1,z as Caption,A as Card,E as FlexItem,H as __awaiter$1,J as domSafeProps,K as Tooltip$1,N as Button,O as Title,S as SectionSeparator,Q as TextInput,U as PropTypes,V as noop$5,W as isEmpty,X as omitBy,Y as PbReactPopover,Z as CircleIconButton,$ as HighchartsReact,a0 as Badge,a1 as joinPresent,a2 as titleize,a3 as IconCircle,a4 as Image,a5 as Avatar,a6 as Radio}from"./_typeahead-RfKdit7E.js";import{u as useCollapsible,j as getAllIcons,D as DateTime$1,a as datePickerHelper,k as useDropdown,m as map,p as partial,l as find$1,n as commonjsGlobal,o as getDefaultExportFromCjs,q as highchartsDarkTheme,r as highchartsTheme,s as noop$6,t as colors,i as PbTextarea}from"./lib-5OzNgeeu.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&®ClassTest.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=_a=>{var{children:children}=_a,props=__rest(_a,["children"]);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 _a2,_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=((_a2=row.original)===null||_a2===void 0?void 0:_a2.children)&&!row.original.children.length?true:false;const isDataLoading=isExpandable&&(inlineRowLoading&&rowHasNoChildren)&&row.depth<(((_c=(_b=columnDefinitions[0])===null||_b===void 0?void 0:_b.cellAccessors)===null||_c===void 0?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||table===void 0?void 0:table.getRowModel().rows.length,JSON.stringify((table===null||table===void 0?void 0:table.getState().sorting)||[]),JSON.stringify((table===null||table===void 0?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 _a2;if(!isVirtualized||flattenedItems.length===0||index>=flattenedItems.length){return`item-${index}`}return((_a2=flattenedItems[index])===null||_a2===void 0?void 0:_a2.id)||`item-${index}`}});useEffect((()=>{if(isVirtualized&&virtualizer&&table&&containerRef.current){virtualizer.measure();containerRef.current.scrollTop=0}}),[isVirtualized,virtualizer,table,containerRef,JSON.stringify((table===null||table===void 0?void 0:table.getState().sorting)||[]),JSON.stringify((table===null||table===void 0?void 0:table.getState().expanded)||{})]);const contextValue=Object.assign(Object.assign({},props),{table:table,tableContainerRef:containerRef,virtualizer:isVirtualized?virtualizer:null,flattenedItems:flattenedItems,virtualizedRows:isVirtualized,enableVirtualization:isVirtualized});return jsx(AdvancedTableContext.Provider,Object.assign({value:contextValue},{children:children}),void 0)};
|
2
2
|
/**
|
3
3
|
* table-core
|
4
4
|
*
|
@@ -0,0 +1 @@
|
|
1
|
+
var lazysizes={exports:{}};var hasRequiredLazysizes;function requireLazysizes(){if(hasRequiredLazysizes)return lazysizes.exports;hasRequiredLazysizes=1;(function(module){(function(window2,factory){var lazySizes=factory(window2,window2.document,Date);window2.lazySizes=lazySizes;if(module.exports){module.exports=lazySizes}})(typeof window!="undefined"?window:{},(function l(window2,document,Date2){var lazysizes2,lazySizesCfg;(function(){var prop;var lazySizesDefaults={lazyClass:"lazyload",loadedClass:"lazyloaded",loadingClass:"lazyloading",preloadClass:"lazypreload",errorClass:"lazyerror",autosizesClass:"lazyautosizes",fastLoadedClass:"ls-is-cached",iframeLoadMode:0,srcAttr:"data-src",srcsetAttr:"data-srcset",sizesAttr:"data-sizes",minSize:40,customMedia:{},init:true,expFactor:1.5,hFac:.8,loadMode:2,loadHidden:true,ricTimeout:0,throttleDelay:125};lazySizesCfg=window2.lazySizesConfig||window2.lazysizesConfig||{};for(prop in lazySizesDefaults){if(!(prop in lazySizesCfg)){lazySizesCfg[prop]=lazySizesDefaults[prop]}}})();if(!document||!document.getElementsByClassName){return{init:function(){},cfg:lazySizesCfg,noSupport:true}}var docElem=document.documentElement;var supportPicture=window2.HTMLPictureElement;var _addEventListener="addEventListener";var _getAttribute="getAttribute";var addEventListener=window2[_addEventListener].bind(window2);var setTimeout=window2.setTimeout;var requestAnimationFrame=window2.requestAnimationFrame||setTimeout;var requestIdleCallback=window2.requestIdleCallback;var regPicture=/^picture$/i;var loadEvents=["load","error","lazyincluded","_lazyloaded"];var regClassCache={};var forEach=Array.prototype.forEach;var hasClass=function(ele,cls){if(!regClassCache[cls]){regClassCache[cls]=new RegExp("(\\s|^)"+cls+"(\\s|$)")}return regClassCache[cls].test(ele[_getAttribute]("class")||"")&®ClassCache[cls]};var addClass=function(ele,cls){if(!hasClass(ele,cls)){ele.setAttribute("class",(ele[_getAttribute]("class")||"").trim()+" "+cls)}};var removeClass=function(ele,cls){var reg;if(reg=hasClass(ele,cls)){ele.setAttribute("class",(ele[_getAttribute]("class")||"").replace(reg," "))}};var addRemoveLoadEvents=function(dom,fn,add){var action=add?_addEventListener:"removeEventListener";if(add){addRemoveLoadEvents(dom,fn)}loadEvents.forEach((function(evt){dom[action](evt,fn)}))};var triggerEvent=function(elem,name,detail,noBubbles,noCancelable){var event=document.createEvent("Event");if(!detail){detail={}}detail.instance=lazysizes2;event.initEvent(name,!noBubbles,!noCancelable);event.detail=detail;elem.dispatchEvent(event);return event};var updatePolyfill=function(el,full){var polyfill;if(!supportPicture&&(polyfill=window2.picturefill||lazySizesCfg.pf)){if(full&&full.src&&!el[_getAttribute]("srcset")){el.setAttribute("srcset",full.src)}polyfill({reevaluate:true,elements:[el]})}else if(full&&full.src){el.src=full.src}};var getCSS=function(elem,style){return(getComputedStyle(elem,null)||{})[style]};var getWidth=function(elem,parent,width){width=width||elem.offsetWidth;while(width<lazySizesCfg.minSize&&parent&&!elem._lazysizesWidth){width=parent.offsetWidth;parent=parent.parentNode}return width};var rAF=function(){var running,waiting;var firstFns=[];var secondFns=[];var fns=firstFns;var run=function(){var runFns=fns;fns=firstFns.length?secondFns:firstFns;running=true;waiting=false;while(runFns.length){runFns.shift()()}running=false};var rafBatch=function(fn,queue){if(running&&!queue){fn.apply(this,arguments)}else{fns.push(fn);if(!waiting){waiting=true;(document.hidden?setTimeout:requestAnimationFrame)(run)}}};rafBatch._lsFlush=run;return rafBatch}();var rAFIt=function(fn,simple){return simple?function(){rAF(fn)}:function(){var that=this;var args=arguments;rAF((function(){fn.apply(that,args)}))}};var throttle=function(fn){var running;var lastTime=0;var gDelay=lazySizesCfg.throttleDelay;var rICTimeout=lazySizesCfg.ricTimeout;var run=function(){running=false;lastTime=Date2.now();fn()};var idleCallback=requestIdleCallback&&rICTimeout>49?function(){requestIdleCallback(run,{timeout:rICTimeout});if(rICTimeout!==lazySizesCfg.ricTimeout){rICTimeout=lazySizesCfg.ricTimeout}}:rAFIt((function(){setTimeout(run)}),true);return function(isPriority){var delay;if(isPriority=isPriority===true){rICTimeout=33}if(running){return}running=true;delay=gDelay-(Date2.now()-lastTime);if(delay<0){delay=0}if(isPriority||delay<9){idleCallback()}else{setTimeout(idleCallback,delay)}}};var debounce=function(func){var timeout,timestamp;var wait=99;var run=function(){timeout=null;func()};var later=function(){var last=Date2.now()-timestamp;if(last<wait){setTimeout(later,wait-last)}else{(requestIdleCallback||run)(run)}};return function(){timestamp=Date2.now();if(!timeout){timeout=setTimeout(later,wait)}}};var loader=function(){var preloadElems,isCompleted,resetPreloadingTimer,loadMode,started;var eLvW,elvH,eLtop,eLleft,eLright,eLbottom,isBodyHidden;var regImg=/^img$/i;var regIframe=/^iframe$/i;var supportScroll="onscroll"in window2&&!/(gle|ing)bot/.test(navigator.userAgent);var shrinkExpand=0;var currentExpand=0;var isLoading=0;var lowRuns=-1;var resetPreloading=function(e){isLoading--;if(!e||isLoading<0||!e.target){isLoading=0}};var isVisible=function(elem){if(isBodyHidden==null){isBodyHidden=getCSS(document.body,"visibility")=="hidden"}return isBodyHidden||!(getCSS(elem.parentNode,"visibility")=="hidden"&&getCSS(elem,"visibility")=="hidden")};var isNestedVisible=function(elem,elemExpand){var outerRect;var parent=elem;var visible=isVisible(elem);eLtop-=elemExpand;eLbottom+=elemExpand;eLleft-=elemExpand;eLright+=elemExpand;while(visible&&(parent=parent.offsetParent)&&parent!=document.body&&parent!=docElem){visible=(getCSS(parent,"opacity")||1)>0;if(visible&&getCSS(parent,"overflow")!="visible"){outerRect=parent.getBoundingClientRect();visible=eLright>outerRect.left&&eLleft<outerRect.right&&eLbottom>outerRect.top-1&&eLtop<outerRect.bottom+1}}return visible};var checkElements=function(){var eLlen,i,rect,autoLoadElem,loadedSomething,elemExpand,elemNegativeExpand,elemExpandVal,beforeExpandVal,defaultExpand,preloadExpand,hFac;var lazyloadElems=lazysizes2.elements;if((loadMode=lazySizesCfg.loadMode)&&isLoading<8&&(eLlen=lazyloadElems.length)){i=0;lowRuns++;for(;i<eLlen;i++){if(!lazyloadElems[i]||lazyloadElems[i]._lazyRace){continue}if(!supportScroll||lazysizes2.prematureUnveil&&lazysizes2.prematureUnveil(lazyloadElems[i])){unveilElement(lazyloadElems[i]);continue}if(!(elemExpandVal=lazyloadElems[i][_getAttribute]("data-expand"))||!(elemExpand=elemExpandVal*1)){elemExpand=currentExpand}if(!defaultExpand){defaultExpand=!lazySizesCfg.expand||lazySizesCfg.expand<1?docElem.clientHeight>500&&docElem.clientWidth>500?500:370:lazySizesCfg.expand;lazysizes2._defEx=defaultExpand;preloadExpand=defaultExpand*lazySizesCfg.expFactor;hFac=lazySizesCfg.hFac;isBodyHidden=null;if(currentExpand<preloadExpand&&isLoading<1&&lowRuns>2&&loadMode>2&&!document.hidden){currentExpand=preloadExpand;lowRuns=0}else if(loadMode>1&&lowRuns>1&&isLoading<6){currentExpand=defaultExpand}else{currentExpand=shrinkExpand}}if(beforeExpandVal!==elemExpand){eLvW=innerWidth+elemExpand*hFac;elvH=innerHeight+elemExpand;elemNegativeExpand=elemExpand*-1;beforeExpandVal=elemExpand}rect=lazyloadElems[i].getBoundingClientRect();if((eLbottom=rect.bottom)>=elemNegativeExpand&&(eLtop=rect.top)<=elvH&&(eLright=rect.right)>=elemNegativeExpand*hFac&&(eLleft=rect.left)<=eLvW&&(eLbottom||eLright||eLleft||eLtop)&&(lazySizesCfg.loadHidden||isVisible(lazyloadElems[i]))&&(isCompleted&&isLoading<3&&!elemExpandVal&&(loadMode<3||lowRuns<4)||isNestedVisible(lazyloadElems[i],elemExpand))){unveilElement(lazyloadElems[i]);loadedSomething=true;if(isLoading>9){break}}else if(!loadedSomething&&isCompleted&&!autoLoadElem&&isLoading<4&&lowRuns<4&&loadMode>2&&(preloadElems[0]||lazySizesCfg.preloadAfterLoad)&&(preloadElems[0]||!elemExpandVal&&(eLbottom||eLright||eLleft||eLtop||lazyloadElems[i][_getAttribute](lazySizesCfg.sizesAttr)!="auto"))){autoLoadElem=preloadElems[0]||lazyloadElems[i]}}if(autoLoadElem&&!loadedSomething){unveilElement(autoLoadElem)}}};var throttledCheckElements=throttle(checkElements);var switchLoadingClass=function(e){var elem=e.target;if(elem._lazyCache){delete elem._lazyCache;return}resetPreloading(e);addClass(elem,lazySizesCfg.loadedClass);removeClass(elem,lazySizesCfg.loadingClass);addRemoveLoadEvents(elem,rafSwitchLoadingClass);triggerEvent(elem,"lazyloaded")};var rafedSwitchLoadingClass=rAFIt(switchLoadingClass);var rafSwitchLoadingClass=function(e){rafedSwitchLoadingClass({target:e.target})};var changeIframeSrc=function(elem,src){var loadMode2=elem.getAttribute("data-load-mode")||lazySizesCfg.iframeLoadMode;if(loadMode2==0){elem.contentWindow.location.replace(src)}else if(loadMode2==1){elem.src=src}};var handleSources=function(source){var customMedia;var sourceSrcset=source[_getAttribute](lazySizesCfg.srcsetAttr);if(customMedia=lazySizesCfg.customMedia[source[_getAttribute]("data-media")||source[_getAttribute]("media")]){source.setAttribute("media",customMedia)}if(sourceSrcset){source.setAttribute("srcset",sourceSrcset)}};var lazyUnveil=rAFIt((function(elem,detail,isAuto,sizes,isImg){var src,srcset,parent,isPicture,event,firesLoad;if(!(event=triggerEvent(elem,"lazybeforeunveil",detail)).defaultPrevented){if(sizes){if(isAuto){addClass(elem,lazySizesCfg.autosizesClass)}else{elem.setAttribute("sizes",sizes)}}srcset=elem[_getAttribute](lazySizesCfg.srcsetAttr);src=elem[_getAttribute](lazySizesCfg.srcAttr);if(isImg){parent=elem.parentNode;isPicture=parent&®Picture.test(parent.nodeName||"")}firesLoad=detail.firesLoad||"src"in elem&&(srcset||src||isPicture);event={target:elem};addClass(elem,lazySizesCfg.loadingClass);if(firesLoad){clearTimeout(resetPreloadingTimer);resetPreloadingTimer=setTimeout(resetPreloading,2500);addRemoveLoadEvents(elem,rafSwitchLoadingClass,true)}if(isPicture){forEach.call(parent.getElementsByTagName("source"),handleSources)}if(srcset){elem.setAttribute("srcset",srcset)}else if(src&&!isPicture){if(regIframe.test(elem.nodeName)){changeIframeSrc(elem,src)}else{elem.src=src}}if(isImg&&(srcset||isPicture)){updatePolyfill(elem,{src:src})}}if(elem._lazyRace){delete elem._lazyRace}removeClass(elem,lazySizesCfg.lazyClass);rAF((function(){var isLoaded=elem.complete&&elem.naturalWidth>1;if(!firesLoad||isLoaded){if(isLoaded){addClass(elem,lazySizesCfg.fastLoadedClass)}switchLoadingClass(event);elem._lazyCache=true;setTimeout((function(){if("_lazyCache"in elem){delete elem._lazyCache}}),9)}if(elem.loading=="lazy"){isLoading--}}),true)}));var unveilElement=function(elem){if(elem._lazyRace){return}var detail;var isImg=regImg.test(elem.nodeName);var sizes=isImg&&(elem[_getAttribute](lazySizesCfg.sizesAttr)||elem[_getAttribute]("sizes"));var isAuto=sizes=="auto";if((isAuto||!isCompleted)&&isImg&&(elem[_getAttribute]("src")||elem.srcset)&&!elem.complete&&!hasClass(elem,lazySizesCfg.errorClass)&&hasClass(elem,lazySizesCfg.lazyClass)){return}detail=triggerEvent(elem,"lazyunveilread").detail;if(isAuto){autoSizer.updateElem(elem,true,elem.offsetWidth)}elem._lazyRace=true;isLoading++;lazyUnveil(elem,detail,isAuto,sizes,isImg)};var afterScroll=debounce((function(){lazySizesCfg.loadMode=3;throttledCheckElements()}));var altLoadmodeScrollListner=function(){if(lazySizesCfg.loadMode==3){lazySizesCfg.loadMode=2}afterScroll()};var onload=function(){if(isCompleted){return}if(Date2.now()-started<999){setTimeout(onload,999);return}isCompleted=true;lazySizesCfg.loadMode=3;throttledCheckElements();addEventListener("scroll",altLoadmodeScrollListner,true)};return{_:function(){started=Date2.now();lazysizes2.elements=document.getElementsByClassName(lazySizesCfg.lazyClass);preloadElems=document.getElementsByClassName(lazySizesCfg.lazyClass+" "+lazySizesCfg.preloadClass);addEventListener("scroll",throttledCheckElements,true);addEventListener("resize",throttledCheckElements,true);addEventListener("pageshow",(function(e){if(e.persisted){var loadingElements=document.querySelectorAll("."+lazySizesCfg.loadingClass);if(loadingElements.length&&loadingElements.forEach){requestAnimationFrame((function(){loadingElements.forEach((function(img){if(img.complete){unveilElement(img)}}))}))}}}));if(window2.MutationObserver){new MutationObserver(throttledCheckElements).observe(docElem,{childList:true,subtree:true,attributes:true})}else{docElem[_addEventListener]("DOMNodeInserted",throttledCheckElements,true);docElem[_addEventListener]("DOMAttrModified",throttledCheckElements,true);setInterval(throttledCheckElements,999)}addEventListener("hashchange",throttledCheckElements,true);["focus","mouseover","click","load","transitionend","animationend"].forEach((function(name){document[_addEventListener](name,throttledCheckElements,true)}));if(/d$|^c/.test(document.readyState)){onload()}else{addEventListener("load",onload);document[_addEventListener]("DOMContentLoaded",throttledCheckElements);setTimeout(onload,2e4)}if(lazysizes2.elements.length){checkElements();rAF._lsFlush()}else{throttledCheckElements()}},checkElems:throttledCheckElements,unveil:unveilElement,_aLSL:altLoadmodeScrollListner}}();var autoSizer=function(){var autosizesElems;var sizeElement=rAFIt((function(elem,parent,event,width){var sources,i,len;elem._lazysizesWidth=width;width+="px";elem.setAttribute("sizes",width);if(regPicture.test(parent.nodeName||"")){sources=parent.getElementsByTagName("source");for(i=0,len=sources.length;i<len;i++){sources[i].setAttribute("sizes",width)}}if(!event.detail.dataAttr){updatePolyfill(elem,event.detail)}}));var getSizeElement=function(elem,dataAttr,width){var event;var parent=elem.parentNode;if(parent){width=getWidth(elem,parent,width);event=triggerEvent(elem,"lazybeforesizes",{width:width,dataAttr:!!dataAttr});if(!event.defaultPrevented){width=event.detail.width;if(width&&width!==elem._lazysizesWidth){sizeElement(elem,parent,event,width)}}}};var updateElementsSizes=function(){var i;var len=autosizesElems.length;if(len){i=0;for(;i<len;i++){getSizeElement(autosizesElems[i])}}};var debouncedUpdateElementsSizes=debounce(updateElementsSizes);return{_:function(){autosizesElems=document.getElementsByClassName(lazySizesCfg.autosizesClass);addEventListener("resize",debouncedUpdateElementsSizes)},checkElems:debouncedUpdateElementsSizes,updateElem:getSizeElement}}();var init=function(){if(!init.i&&document.getElementsByClassName){init.i=true;autoSizer._();loader._()}};setTimeout((function(){if(lazySizesCfg.init){init()}}));lazysizes2={cfg:lazySizesCfg,autoSizer:autoSizer,loader:loader,init:init,uP:updatePolyfill,aC:addClass,rC:removeClass,hC:hasClass,fire:triggerEvent,gW:getWidth,rAF:rAF};return lazysizes2}))})(lazysizes);return lazysizes.exports}requireLazysizes();export{requireLazysizes as r};
|
data/dist/chunks/vendor.js
CHANGED
@@ -1 +1 @@
|
|
1
|
-
import"./_weekday_stacked-
|
1
|
+
import"./_weekday_stacked-RWsNWtMH.js";import"./lazysizes-B7xYodB-.js";import"./_typeahead-RfKdit7E.js";import"./lib-5OzNgeeu.js";import"react/jsx-runtime";import"react";import"react-dom";import"react-trix";import"trix";import"react-is";
|