@ni/spright-components 2.0.6 → 2.0.8

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.
@@ -5756,7 +5756,7 @@ if(i.isAtom){if(!o&&Ow.isSelectable(i))return Ow.create(t,n-(s<0?i.nodeSize:0))}
5756
5756
  if(e)return e}n+=i.nodeSize*s}return null}function Bw(t,e,n){let i=t.steps.length-1
5757
5757
  if(i<e)return
5758
5758
  let s,o=t.steps[i];(o instanceof tw||o instanceof ew)&&(t.mapping.maps[i].forEach(((t,e,n,i)=>{null==s&&(s=i)})),t.setSelection(Mw.near(t.doc.resolve(s),n)))}class Pw extends _w{constructor(t){super(t.doc),this.curSelectionFor=0,this.updated=0,this.meta=Object.create(null),this.time=Date.now(),this.curSelection=t.selection,this.storedMarks=t.storedMarks}get selection(){return this.curSelectionFor<this.steps.length&&(this.curSelection=this.curSelection.map(this.doc,this.mapping.slice(this.curSelectionFor)),this.curSelectionFor=this.steps.length),this.curSelection}setSelection(t){if(t.$from.doc!=this.doc)throw new RangeError("Selection passed to setSelection must point at the current document")
5759
- return this.curSelection=t,this.curSelectionFor=this.steps.length,this.updated=-3&(1|this.updated),this.storedMarks=null,this}get selectionSet(){return(1&this.updated)>0}setStoredMarks(t){return this.storedMarks=t,this.updated|=2,this}ensureMarks(t){return Bb.sameSet(this.storedMarks||this.selection.$from.marks(),t)||this.setStoredMarks(t),this}addStoredMark(t){return this.ensureMarks(t.addToSet(this.storedMarks||this.selection.$head.marks()))}removeStoredMark(t){return this.ensureMarks(t.removeFromSet(this.storedMarks||this.selection.$head.marks()))}get storedMarksSet(){return(2&this.updated)>0}addStep(t,e){super.addStep(t,e),this.updated=-3&this.updated,this.storedMarks=null}setTime(t){return this.time=t,this}replaceSelection(t){return this.selection.replace(this,t),this}replaceSelectionWith(t,e=!0){let n=this.selection
5759
+ return this.curSelection=t,this.curSelectionFor=this.steps.length,this.updated=-3&this.updated|1,this.storedMarks=null,this}get selectionSet(){return(1&this.updated)>0}setStoredMarks(t){return this.storedMarks=t,this.updated|=2,this}ensureMarks(t){return Bb.sameSet(this.storedMarks||this.selection.$from.marks(),t)||this.setStoredMarks(t),this}addStoredMark(t){return this.ensureMarks(t.addToSet(this.storedMarks||this.selection.$head.marks()))}removeStoredMark(t){return this.ensureMarks(t.removeFromSet(this.storedMarks||this.selection.$head.marks()))}get storedMarksSet(){return(2&this.updated)>0}addStep(t,e){super.addStep(t,e),this.updated=-3&this.updated,this.storedMarks=null}setTime(t){return this.time=t,this}replaceSelection(t){return this.selection.replace(this,t),this}replaceSelectionWith(t,e=!0){let n=this.selection
5760
5760
  return e&&(t=t.mark(this.storedMarks||(n.empty?n.$from.marks():n.$from.marksAcross(n.$to)||Bb.none))),n.replaceWith(this,t),this}deleteSelection(){return this.selection.replace(this),this}insertText(t,e,n){let i=this.doc.type.schema
5761
5761
  if(null==e)return t?this.replaceSelectionWith(i.text(t),!0):this.deleteSelection()
5762
5762
  {if(null==n&&(n=e),n=null==n?e:n,!t)return this.deleteRange(e,n)
@@ -6777,7 +6777,7 @@ return{...i,...s}}}}function WS(t){return Object.fromEntries(Object.entries(t).f
6777
6777
  const i=t.parentOffset
6778
6778
  return t.parent.nodesBetween(Math.max(0,i-e),i,((t,e,s,o)=>{var r,a
6779
6779
  const l=(null===(a=(r=t.type.spec).toText)||void 0===a?void 0:a.call(r,{node:t,pos:e,parent:s,index:o}))||t.textContent||"%leaf%"
6780
- n+=l.slice(0,Math.max(0,i-e))})),n}
6780
+ n+=t.isAtom?l:l.slice(0,Math.max(0,i-e))})),n}
6781
6781
  function YS(t){return"[object RegExp]"===Object.prototype.toString.call(t)}class XS{constructor(t){this.find=t.find,this.handler=t.handler}}const JS=(t,e)=>{if(YS(e))return e.exec(t)
6782
6782
  const n=e(t)
6783
6783
  if(!n)return null
@@ -7198,7 +7198,7 @@ return this.capturedTransaction=null,e}dispatchTransaction(t){if(this.view.isDes
7198
7198
  if(this.isCapturingTransaction)return this.capturedTransaction?void t.steps.forEach((t=>{var e
7199
7199
  return null===(e=this.capturedTransaction)||void 0===e?void 0:e.step(t)})):void(this.capturedTransaction=t)
7200
7200
  const e=this.state.apply(t),n=!this.state.selection.eq(e.selection)
7201
- this.view.updateState(e),this.emit("transaction",{editor:this,transaction:t}),n&&this.emit("selectionUpdate",{editor:this,transaction:t})
7201
+ this.emit("beforeTransaction",{editor:this,transaction:t,nextState:e}),this.view.updateState(e),this.emit("transaction",{editor:this,transaction:t}),n&&this.emit("selectionUpdate",{editor:this,transaction:t})
7202
7202
  const i=t.getMeta("focus"),s=t.getMeta("blur")
7203
7203
  i&&this.emit("focus",{editor:this,event:i.event,transaction:t}),s&&this.emit("blur",{editor:this,event:s.event,transaction:t}),t.docChanged&&!t.getMeta("preventUpdate")&&this.emit("update",{editor:this,transaction:t})}getAttributes(t){return D_(this.state,t)}isActive(t,e){const n="string"==typeof t?t:null,i="string"==typeof t?e:t
7204
7204
  return function(t,e,n={}){if(!e)return S_(t,null,n)||R_(t,null,n)
@@ -7801,7 +7801,7 @@ a=e-1}}return-1}const lM=rM(ZI)
7801
7801
  function cM(t,e=eM.Legacy){return lM(t,e)}function dM(t){return"[object String]"===function(t){return Object.prototype.toString.call(t)}(t)}rM(KI)
7802
7802
  const hM=Object.prototype.hasOwnProperty
7803
7803
  function uM(t){return Array.prototype.slice.call(arguments,1).forEach((function(e){if(e){if("object"!=typeof e)throw new TypeError(e+"must be object")
7804
- Object.keys(e).forEach((function(n){t[n]=e[n]}))}})),t}function pM(t,e,n){return[].concat(t.slice(0,e),n,t.slice(e+1))}function fM(t){return!(t>=55296&&t<=57343)&&(!(t>=64976&&t<=65007)&&(65535!=(65535&t)&&65534!=(65535&t)&&(!(t>=0&&t<=8)&&(11!==t&&(!(t>=14&&t<=31)&&(!(t>=127&&t<=159)&&!(t>1114111)))))))}function mM(t){if(t>65535){const e=55296+((t-=65536)>>10),n=56320+(1023&t)
7804
+ Object.keys(e).forEach((function(n){t[n]=e[n]}))}})),t}function pM(t,e,n){return[].concat(t.slice(0,e),n,t.slice(e+1))}function fM(t){return!(t>=55296&&t<=57343)&&(!(t>=64976&&t<=65007)&&(!!(65535&~t&&65534!=(65535&t))&&(!(t>=0&&t<=8)&&(11!==t&&(!(t>=14&&t<=31)&&(!(t>=127&&t<=159)&&!(t>1114111)))))))}function mM(t){if(t>65535){const e=55296+((t-=65536)>>10),n=56320+(1023&t)
7805
7805
  return String.fromCharCode(e,n)}return String.fromCharCode(t)}const gM=/\\([!"#$%&'()*+,\-./:;<=>?@[\\\]^_`{|}~])/g,vM=new RegExp(gM.source+"|"+/&([a-z#][a-z0-9]{1,31});/gi.source,"gi"),bM=/^#((?:x[a-f0-9]{1,8}|[0-9]{1,8}))$/i
7806
7806
  function yM(t){return t.indexOf("\\")<0&&t.indexOf("&")<0?t:t.replace(vM,(function(t,e,n){return e||function(t,e){if(35===e.charCodeAt(0)&&bM.test(e)){const n="x"===e[1].toLowerCase()?parseInt(e.slice(2),16):parseInt(e.slice(1),10)
7807
7807
  return fM(n)?mM(n):t}const n=cM(t)
@@ -8599,11 +8599,11 @@ return e[0]+t+e[1]}repeat(t,e){let n=""
8599
8599
  for(let i=0;i<e;i++)n+=t
8600
8600
  return n}markString(t,e,n,i){let s=this.getMark(t.type.name),o=e?s.open:s.close
8601
8601
  return"string"==typeof o?o:o(this,t,n,i)}getEnclosingWhitespace(t){return{leading:(t.match(/^(\s+)/)||[void 0])[0],trailing:(t.match(/(\s+)$/)||[void 0])[0]}}}var IE
8602
- class ME{static parseMarkdownToDOM(t,e){try{ME.setup(e)
8602
+ class ME{static parseMarkdownToDOM(t,e){try{IE.setup(e)
8603
8603
  const n=this.markdownParser.parse(t)
8604
- return null===n?{fragment:document.createDocumentFragment(),mentionedHrefs:Array.from(ME.mentionedHrefs)}:{fragment:this.domSerializer.serializeFragment(n.content),mentionedHrefs:Array.from(ME.mentionedHrefs)}}finally{ME.cleanup()}}static initializeMarkdownParser(){const t=wE.tokenizer.configure("zero").enable(["emphasis","list","escape","autolink","newline"])
8605
- return t.normalizeLinkText=t=>t,new bE(this.updatedSchema,t,wE.tokens)}static getCustomSchemaConfiguration(){return new ky({nodes:uE.spec.nodes,marks:{link:{attrs:{href:{},rel:{default:"noopener noreferrer"},class:{default:""}},inclusive:!1,excludes:"_",toDOM(t){const e=t.attrs.href,n=ME.mentionConfigs?.find((t=>t.isValidMentionHref(e))),i=n?.getDisplayName(e)
8606
- return n&&i?(ME.mentionedHrefs.add(e),[n.viewElement,{"mention-href":e,"mention-label":i}]):[ih,{href:ME.startsWithHttpOrHttps(e)?e:null,rel:t.attrs.rel,class:e,"underline-hidden":!ME.startsWithHttpOrHttps(e)||null}]}},em:uE.spec.marks.get("em"),strong:uE.spec.marks.get("strong")}})}static setup(t){ME.mentionConfigs=t,ME.mentionedHrefs.clear()}static cleanup(){ME.mentionConfigs=void 0,ME.mentionedHrefs.clear()}static startsWithHttpOrHttps(t){return/^https?:\/\//i.test(t)}}IE=ME,ME.mentionedHrefs=new Set,ME.updatedSchema=IE.getCustomSchemaConfiguration(),ME.markdownParser=IE.initializeMarkdownParser(),ME.domSerializer=Fy.fromSchema(IE.updatedSchema)
8604
+ return null===n?{fragment:document.createDocumentFragment(),mentionedHrefs:Array.from(IE.mentionedHrefs)}:{fragment:this.domSerializer.serializeFragment(n.content),mentionedHrefs:Array.from(IE.mentionedHrefs)}}finally{IE.cleanup()}}static initializeMarkdownParser(){const t=wE.tokenizer.configure("zero").enable(["emphasis","list","escape","autolink","newline"])
8605
+ return t.normalizeLinkText=t=>t,new bE(this.updatedSchema,t,wE.tokens)}static getCustomSchemaConfiguration(){return new ky({nodes:uE.spec.nodes,marks:{link:{attrs:{href:{},rel:{default:"noopener noreferrer"},class:{default:""}},inclusive:!1,excludes:"_",toDOM(t){const e=t.attrs.href,n=IE.mentionConfigs?.find((t=>t.isValidMentionHref(e))),i=n?.getDisplayName(e)
8606
+ return n&&i?(IE.mentionedHrefs.add(e),[n.viewElement,{"mention-href":e,"mention-label":i}]):[ih,{href:IE.startsWithHttpOrHttps(e)?e:null,rel:t.attrs.rel,class:e,"underline-hidden":!IE.startsWithHttpOrHttps(e)||null}]}},em:uE.spec.marks.get("em"),strong:uE.spec.marks.get("strong")}})}static setup(t){IE.mentionConfigs=t,IE.mentionedHrefs.clear()}static cleanup(){IE.mentionConfigs=void 0,IE.mentionedHrefs.clear()}static startsWithHttpOrHttps(t){return/^https?:\/\//i.test(t)}}IE=ME,ME.mentionedHrefs=new Set,ME.updatedSchema=IE.getCustomSchemaConfiguration(),ME.markdownParser=IE.initializeMarkdownParser(),ME.domSerializer=Fy.fromSchema(IE.updatedSchema)
8607
8607
  class $E{constructor(t){this.markdownSerializer=this.initializeMarkdownSerializerForTipTap(t)}serializeDOMToMarkdown(t){return this.markdownSerializer.serialize(t)}initializeMarkdownSerializerForTipTap(t){const e=function(t,e){const n=e.attrs.href
8608
8608
  t.write(`<${n}>`)},n={bulletList:kE.nodes.bullet_list,listItem:kE.nodes.list_item,orderedList:function(t,e){const n=e.attrs.start||1,i=String(n+e.childCount-1).length,s=t.repeat(" ",i+2)
8609
8609
  t.renderList(e,s,(e=>{const s=String(n+e)
@@ -11281,17 +11281,7 @@ return l(),n.addEventListener("scroll",a,yF),n.addEventListener("scrollend",l,yF
11281
11281
  if(t){return Math.round(t[n.options.horizontal?"inlineSize":"blockSize"])}}return Math.round(t.getBoundingClientRect()[n.options.horizontal?"width":"height"])},kF=(t,{adjustments:e=0,behavior:n},i)=>{var s,o
11282
11282
  const r=t+e
11283
11283
  null==(o=null==(s=i.scrollElement)?void 0:s.scrollTo)||o.call(s,{[i.options.horizontal?"left":"top"]:r,behavior:n})}
11284
- const SF=(t,e,n,i)=>{for(;t<=e;){const s=(t+e)/2|0,o=n(s)
11285
- if(o<i)t=s+1
11286
- else{if(!(o>i))return s
11287
- e=s-1}}return t>0?t-1:0}
11288
- class _F{get pageSize(){return this._pageSize}get rowHeight(){return parseFloat(Cl.getValueFor(this.table))+2*parseFloat($l.getValueFor(this.table))}constructor(t,e){this.visibleItems=[],this.scrollHeight=0,this.headerContainerMarginRight=0,this.rowContainerYOffset=0,this._pageSize=0,this.table=t,this.tanStackTable=e,this.viewportResizeObserver=new ResizeObserver((t=>{const e=t[0]?.borderBoxSize[0]
11289
- if(e){this.updatePageSize()
11290
- const t=e.inlineSize
11291
- this.headerContainerMarginRight=t-this.table.viewport.clientWidth}}))}connect(){this.viewportResizeObserver.observe(this.table.viewport),this.updateVirtualizer()
11292
- const t=this.virtualizer.scrollOffset
11293
- null!==t&&this.table.viewport.scrollTo({top:t})}disconnect(){this.viewportResizeObserver.disconnect()}dataChanged(){this.table.$fastController.isConnected&&this.updateVirtualizer()}scrollToIndex(t,e){this.virtualizer?.scrollToIndex(t,e)}updateVirtualizer(){const t=this.createVirtualizerOptions()
11294
- this.virtualizer?this.virtualizer.setOptions(t):this.virtualizer=new class{constructor(t){this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.isScrolling=!1,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 t=null
11284
+ let SF=class{constructor(t){this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.isScrolling=!1,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 t=null
11295
11285
  const e=()=>t||(this.targetWindow&&this.targetWindow.ResizeObserver?t=new this.targetWindow.ResizeObserver((t=>{t.forEach((t=>{this._measureElement(t.target,t)}))})):null)
11296
11286
  return{disconnect:()=>{var t
11297
11287
  return null==(t=e())?void 0:t.disconnect()},observe:t=>{var n
@@ -11316,10 +11306,10 @@ for(let s=a;s<t;s++){let t=null==(r=this.measurementsCache[s])?void 0:r.measureE
11316
11306
  t||(t=t=>{const e=i(s),n=this.elementsCache.get(e)
11317
11307
  t?(n!==t&&(n&&this.observer.unobserve(n),this.observer.observe(t),this.elementsCache.set(e,t)),t.isConnected&&this.resizeItem(s,this.options.measureElement(t,void 0,this))):n&&(this.observer.unobserve(n),this.elementsCache.delete(e))})
11318
11308
  const a=i(s),c=1===this.options.lanes?l[s-1]:this.getFurthestMeasurement(l,s),d=c?c.end+this.options.gap:e+n,h=o.get(a),u="number"==typeof h?h:this.options.estimateSize(s),p=d+u,f=c?c.lane:s%this.options.lanes
11319
- l[s]={index:s,start:d,size:u,end:p,key:a,lane:f,measureElement:t}}return this.measurementsCache=l,l}),{key:!1,debug:()=>this.options.debug}),this.calculateRange=pF((()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset()]),((t,e,n)=>this.range=t.length>0&&e>0?function({measurements:t,outerSize:e,scrollOffset:n}){const i=t.length-1,s=SF(0,i,(e=>t[e].start),n)
11320
- let o=s
11321
- for(;o<i&&t[o].end<n+e;)o++
11322
- return{startIndex:s,endIndex:o}}({measurements:t,outerSize:e,scrollOffset:n}):null),{key:!1,debug:()=>this.options.debug}),this.getIndexes=pF((()=>[this.options.rangeExtractor,this.calculateRange(),this.options.overscan,this.options.count]),((t,e,n,i)=>null===e?[]:t({startIndex:e.startIndex,endIndex:e.endIndex,overscan:n,count:i})),{key:!1,debug:()=>this.options.debug}),this.indexFromElement=t=>{const e=this.options.indexAttribute,n=t.getAttribute(e)
11309
+ l[s]={index:s,start:d,size:u,end:p,key:a,lane:f,measureElement:t}}return this.measurementsCache=l,l}),{key:!1,debug:()=>this.options.debug}),this.calculateRange=pF((()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset()]),((t,e,n)=>this.range=t.length>0&&e>0?function({measurements:t,outerSize:e,scrollOffset:n}){const i=t.length-1,s=e=>t[e].start,o=_F(0,i,s,n)
11310
+ let r=o
11311
+ for(;r<i&&t[r].end<n+e;)r++
11312
+ return{startIndex:o,endIndex:r}}({measurements:t,outerSize:e,scrollOffset:n}):null),{key:!1,debug:()=>this.options.debug}),this.getIndexes=pF((()=>[this.options.rangeExtractor,this.calculateRange(),this.options.overscan,this.options.count]),((t,e,n,i)=>null===e?[]:t({startIndex:e.startIndex,endIndex:e.endIndex,overscan:n,count:i})),{key:!1,debug:()=>this.options.debug}),this.indexFromElement=t=>{const e=this.options.indexAttribute,n=t.getAttribute(e)
11323
11313
  return n?parseInt(n,10):(console.warn(`Missing attribute name '${e}={index}' on measured element.`),-1)},this._measureElement=(t,e)=>{const n=this.indexFromElement(t),i=this.getMeasurements()[n]
11324
11314
  if(!i||!t.isConnected)return void this.elementsCache.forEach(((e,n)=>{e===t&&(this.observer.unobserve(t),this.elementsCache.delete(n))}))
11325
11315
  const s=this.elementsCache.get(i.key)
@@ -11329,7 +11319,7 @@ const i=e-(this.itemSizeCache.get(n.key)??n.size)
11329
11319
  0!==i&&((void 0!==this.shouldAdjustScrollPositionOnItemSizeChange?this.shouldAdjustScrollPositionOnItemSizeChange(n,i,this):n.start<this.getScrollOffset()+this.scrollAdjustments)&&this._scrollToOffset(this.getScrollOffset(),{adjustments:this.scrollAdjustments+=i,behavior:void 0}),this.pendingMeasuredCacheIndexes.push(n.index),this.itemSizeCache=new Map(this.itemSizeCache.set(n.key,e)),this.notify(!0,!1))},this.measureElement=t=>{t&&this._measureElement(t,void 0)},this.getVirtualItems=pF((()=>[this.getIndexes(),this.getMeasurements()]),((t,e)=>{const n=[]
11330
11320
  for(let i=0,s=t.length;i<s;i++){const s=e[t[i]]
11331
11321
  n.push(s)}return n}),{key:!1,debug:()=>this.options.debug}),this.getVirtualItemForOffset=t=>{const e=this.getMeasurements()
11332
- if(0!==e.length)return fF(e[SF(0,e.length-1,(t=>fF(e[t]).start),t)])},this.getOffsetForAlignment=(t,e)=>{const n=this.getSize(),i=this.getScrollOffset()
11322
+ if(0!==e.length)return fF(e[_F(0,e.length-1,(t=>fF(e[t]).start),t)])},this.getOffsetForAlignment=(t,e)=>{const n=this.getSize(),i=this.getScrollOffset()
11333
11323
  "auto"===e&&(e=t<=i?"start":t>=i+n?"end":"start"),"start"===e||("end"===e?t-=n:"center"===e&&(t-=n/2))
11334
11324
  const s=this.options.horizontal?"scrollWidth":"scrollHeight",o=(this.scrollElement?"document"in this.scrollElement?this.scrollElement.document.documentElement[s]:this.scrollElement[s]:0)-n
11335
11325
  return Math.max(Math.min(o,t),0)},this.getOffsetForIndex=(t,e="auto")=>{t=Math.max(0,Math.min(t,this.options.count-1))
@@ -11343,22 +11333,34 @@ return[this.getOffsetForAlignment(o,e),e]},this.isDynamicMode=()=>this.elementsC
11343
11333
  const i=this.getOffsetForIndex(t,e)
11344
11334
  if(!i)return
11345
11335
  const[s,o]=i
11346
- this._scrollToOffset(s,{adjustments:void 0,behavior:n}),"smooth"!==n&&this.isDynamicMode()&&this.targetWindow&&(this.scrollToIndexTimeoutId=this.targetWindow.setTimeout((()=>{if(this.scrollToIndexTimeoutId=null,this.elementsCache.has(this.options.getItemKey(t))){const[s]=fF(this.getOffsetForIndex(t,o))
11336
+ this._scrollToOffset(s,{adjustments:void 0,behavior:n}),"smooth"!==n&&this.isDynamicMode()&&this.targetWindow&&(this.scrollToIndexTimeoutId=this.targetWindow.setTimeout((()=>{this.scrollToIndexTimeoutId=null
11337
+ if(this.elementsCache.has(this.options.getItemKey(t))){const[s]=fF(this.getOffsetForIndex(t,o))
11347
11338
  e=s,i=this.getScrollOffset(),Math.abs(e-i)<1||this.scrollToIndex(t,{align:o,behavior:n})}else this.scrollToIndex(t,{align:o,behavior:n})
11348
11339
  var e,i})))},this.scrollBy=(t,{behavior:e}={})=>{this.cancelScrollToIndex(),"smooth"===e&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getScrollOffset()+t,{adjustments:void 0,behavior:e})},this.getTotalSize=()=>{var t
11349
11340
  const e=this.getMeasurements()
11350
11341
  let n
11351
11342
  return n=0===e.length?this.options.paddingStart:1===this.options.lanes?(null==(t=e[e.length-1])?void 0:t.end)??0:Math.max(...e.slice(-this.options.lanes).map((t=>t.end))),n-this.options.scrollMargin+this.options.paddingEnd},this._scrollToOffset=(t,{adjustments:e,behavior:n})=>{this.options.scrollToFn(t,{behavior:n,adjustments:e},this)},this.measure=()=>{var t,e
11352
- this.itemSizeCache=new Map,null==(e=(t=this.options).onChange)||e.call(t,this,!1)},this.setOptions(t)}}(t),this.virtualizer._willUpdate(),this.handleVirtualizerChange()}createVirtualizerOptions(){const t=this.rowHeight
11343
+ this.itemSizeCache=new Map,null==(e=(t=this.options).onChange)||e.call(t,this,!1)},this.setOptions(t)}}
11344
+ const _F=(t,e,n,i)=>{for(;t<=e;){const s=(t+e)/2|0,o=n(s)
11345
+ if(o<i)t=s+1
11346
+ else{if(!(o>i))return s
11347
+ e=s-1}}return t>0?t-1:0}
11348
+ class IF{get pageSize(){return this._pageSize}get rowHeight(){return parseFloat(Cl.getValueFor(this.table))+2*parseFloat($l.getValueFor(this.table))}constructor(t,e){this.visibleItems=[],this.scrollHeight=0,this.headerContainerMarginRight=0,this.rowContainerYOffset=0,this._pageSize=0,this.table=t,this.tanStackTable=e,this.viewportResizeObserver=new ResizeObserver((t=>{const e=t[0]?.borderBoxSize[0]
11349
+ if(e){this.updatePageSize()
11350
+ const t=e.inlineSize
11351
+ this.headerContainerMarginRight=t-this.table.viewport.clientWidth}}))}connect(){this.viewportResizeObserver.observe(this.table.viewport),this.updateVirtualizer()
11352
+ const t=this.virtualizer.scrollOffset
11353
+ null!==t&&this.table.viewport.scrollTo({top:t})}disconnect(){this.viewportResizeObserver.disconnect()}dataChanged(){this.table.$fastController.isConnected&&this.updateVirtualizer()}scrollToIndex(t,e){this.virtualizer?.scrollToIndex(t,e)}updateVirtualizer(){const t=this.createVirtualizerOptions()
11354
+ this.virtualizer?this.virtualizer.setOptions(t):this.virtualizer=new SF(t),this.virtualizer._willUpdate(),this.handleVirtualizerChange()}createVirtualizerOptions(){const t=this.rowHeight
11353
11355
  return{count:this.tanStackTable.getRowModel().rows.length,getScrollElement:()=>this.table.viewport,estimateSize:e=>t,enableSmoothScroll:!0,overscan:3,scrollingDelay:5,scrollToFn:kF,observeElementOffset:xF,observeElementRect:bF,onChange:()=>this.handleVirtualizerChange()}}handleVirtualizerChange(){const t=this.virtualizer
11354
11356
  this.visibleItems=t.getVirtualItems(),this.scrollHeight=t.getTotalSize()
11355
11357
  let e=0
11356
- if(this.visibleItems.length>0){e=this.visibleItems[0].start}this.rowContainerYOffset=e}updatePageSize(){this._pageSize=Math.round(this.table.viewport.clientHeight/this.rowHeight)}}function IF(t){switch(t){case DR:return $F
11357
- case AR:return MF
11358
- default:return $F}}function MF(t,e,n){const i=t.getValue(n),s=e.getValue(n)
11359
- return"string"==typeof i&&"string"==typeof s?i.localeCompare(s):i===s?0:void 0===i||null===i&&void 0!==s?-1:1}function $F(t,e,n){const i=t.getValue(n),s=e.getValue(n)
11360
- return Object.is(i,s)?0:void 0===i?-1:void 0===s?1:null===i?-1:null===s?1:Number.isNaN(i)?-1:Number.isNaN(s)?1:0===i&&0===s?Object.is(i,-0)?-1:1:i>s?1:-1}t([C],_F.prototype,"visibleItems",void 0),t([C],_F.prototype,"scrollHeight",void 0),t([C],_F.prototype,"headerContainerMarginRight",void 0),t([C],_F.prototype,"rowContainerYOffset",void 0)
11361
- class EF{constructor(t){this.table=t,this.isColumnBeingSized=!1,this.visibleColumns=[],this.currentTotalDelta=0,this.dragStart=0,this.initialColumnWidths=[],this.onDividerMouseMove=t=>{const e=t
11358
+ if(this.visibleItems.length>0){e=this.visibleItems[0].start}this.rowContainerYOffset=e}updatePageSize(){this._pageSize=Math.round(this.table.viewport.clientHeight/this.rowHeight)}}function MF(t){switch(t){case DR:return EF
11359
+ case AR:return $F
11360
+ default:return EF}}function $F(t,e,n){const i=t.getValue(n),s=e.getValue(n)
11361
+ return"string"==typeof i&&"string"==typeof s?i.localeCompare(s):i===s?0:void 0===i||null===i&&void 0!==s?-1:1}function EF(t,e,n){const i=t.getValue(n),s=e.getValue(n)
11362
+ return Object.is(i,s)?0:void 0===i?-1:void 0===s?1:null===i?-1:null===s?1:Number.isNaN(i)?-1:Number.isNaN(s)?1:0===i&&0===s?Object.is(i,-0)?-1:1:i>s?1:-1}t([C],IF.prototype,"visibleItems",void 0),t([C],IF.prototype,"scrollHeight",void 0),t([C],IF.prototype,"headerContainerMarginRight",void 0),t([C],IF.prototype,"rowContainerYOffset",void 0)
11363
+ class DF{constructor(t){this.table=t,this.isColumnBeingSized=!1,this.visibleColumns=[],this.currentTotalDelta=0,this.dragStart=0,this.initialColumnWidths=[],this.onDividerMouseMove=t=>{const e=t
11362
11364
  for(let t=0;t<this.visibleColumns.length;t++)this.visibleColumns[t].columnInternals.currentPixelWidth=this.initialColumnWidths[t]?.initialPixelWidth
11363
11365
  this.currentTotalDelta=this.getAllowedSizeDelta(e.clientX-this.dragStart),this.performCascadeSizeLeft(this.leftColumnIndex,this.currentTotalDelta),this.performCascadeSizeRight(this.rightColumnIndex,this.currentTotalDelta)
11364
11366
  const n=this.getTotalColumnFixedWidth()-this.initialColumnTotalWidth
@@ -11395,10 +11397,10 @@ for(const t of this.visibleColumns)this.initialColumnWidths.push({initalColumnFr
11395
11397
  const t=this.gridSizedColumns.reduce(((t,e)=>t+e.columnInternals.currentPixelWidth),0),e=t/this.gridSizedColumns.length
11396
11398
  let n=0
11397
11399
  for(let t=0;t<this.visibleColumns.length&&n<this.gridSizedColumns.length;t++){const i=this.visibleColumns[t]
11398
- i===this.gridSizedColumns[n]&&(n+=1,i.columnInternals.currentFractionalWidth=i.columnInternals.currentPixelWidth/e,i.columnInternals.currentPixelWidth=void 0)}}getVisibleColumns(){return this.table.columns.filter((t=>!t.columnHidden))}getLeftColumnIndexFromDivider(t){return Math.floor(t/2)}}t([C],EF.prototype,"isColumnBeingSized",void 0),t([C],EF.prototype,"activeColumnIndex",void 0),t([C],EF.prototype,"activeColumnDivider",void 0)
11399
- const DF=(t,...e)=>{for(const n of e)if(t===n)return!0
11400
- return!1},AF=["rowIds","rowParentIds","groupRows","columnIds","columnHidden","columnSort","columnSortDisabled","columnWidths","columnDefinition","actionMenuSlots","selectionMode"]
11401
- class TF extends RE{constructor(t){super(AF),this.table=t,this.updateQueued=!1}get updateRowIds(){return this.isTracked("rowIds")}get updateRowParentIds(){return this.isTracked("rowParentIds")}get updateGroupRows(){return this.isTracked("groupRows")}get updateColumnIds(){return this.isTracked("columnIds")}get updateColumnSort(){return this.isTracked("columnSort")}get updateColumnWidths(){return this.isTracked("columnWidths")}get updateColumnDefinition(){return this.isTracked("columnDefinition")}get updateActionMenuSlots(){return this.isTracked("actionMenuSlots")}get updateSelectionMode(){return this.isTracked("selectionMode")}get requiresTanStackUpdate(){return this.isTracked("rowIds")||this.isTracked("rowParentIds")||this.isTracked("columnSort")||this.isTracked("columnDefinition")||this.isTracked("groupRows")||this.isTracked("selectionMode")}get requiresTanStackDataReset(){return this.isTracked("rowIds")||this.isTracked("columnDefinition")||this.isTracked("rowParentIds")}get requiresKeyboardFocusReset(){return this.isTracked("columnSortDisabled")||this.isTracked("columnDefinition")||this.isTracked("columnHidden")||this.isTracked("selectionMode")||this.isTracked("actionMenuSlots")}trackAllStateChanged(){this.trackAll(),this.queueUpdate()}get hasPendingUpdates(){return this.updateQueued}trackColumnPropertyChanged(t){DF(t,"columnId")?this.track("columnIds"):VR(t,"operandDataRecordFieldName","sortOperation")?this.track("columnDefinition"):VR(t,"sortingDisabled")?(this.track("columnSort"),this.track("columnSortDisabled")):VR(t,"currentSortDirection","currentSortIndex")?this.track("columnSort"):VR(t,"currentFractionalWidth","currentPixelWidth","minPixelWidth","resizingDisabled")?this.track("columnWidths"):DF(t,"columnHidden")?(this.track("columnWidths"),this.track("columnHidden")):DF(t,"actionMenuSlot")?this.track("actionMenuSlots"):VR(t,"groupIndex","groupingDisabled")&&this.track("groupRows"),this.queueUpdate()}trackColumnInstancesChanged(){this.track("columnIds"),this.track("columnDefinition"),this.track("columnSort"),this.track("columnSortDisabled"),this.track("columnWidths"),this.track("actionMenuSlots"),this.track("groupRows"),this.queueUpdate()}trackIdFieldNameChanged(){this.track("rowIds"),this.queueUpdate()}trackParentIdFieldNameChanged(){this.track("rowParentIds"),this.queueUpdate()}trackSelectionModeChanged(){this.track("selectionMode"),this.queueUpdate()}queueUpdate(){this.table.$fastController.isConnected&&(this.updateQueued||(this.updateQueued=!0,b.queueUpdate((()=>{this.table.update(),this.untrackAll(),this.updateQueued=!1}))))}}class OF{constructor(t){this.tanStackTable=t}reset(){}toggleIsRowSelected(t,e){t.isGroupRow&&t.selectionState===bR?this.deselectAllLeafRows(t.id):this.tanStackTable.getRow(t.id).toggleSelected(e,{selectChildren:t.isGroupRow})}selectSingleRow(t){if(t.isGroupRow)throw new Error("function not intended to select grouped rows")
11400
+ i===this.gridSizedColumns[n]&&(n+=1,i.columnInternals.currentFractionalWidth=i.columnInternals.currentPixelWidth/e,i.columnInternals.currentPixelWidth=void 0)}}getVisibleColumns(){return this.table.columns.filter((t=>!t.columnHidden))}getLeftColumnIndexFromDivider(t){return Math.floor(t/2)}}t([C],DF.prototype,"isColumnBeingSized",void 0),t([C],DF.prototype,"activeColumnIndex",void 0),t([C],DF.prototype,"activeColumnDivider",void 0)
11401
+ const AF=(t,...e)=>{for(const n of e)if(t===n)return!0
11402
+ return!1},TF=["rowIds","rowParentIds","groupRows","columnIds","columnHidden","columnSort","columnSortDisabled","columnWidths","columnDefinition","actionMenuSlots","selectionMode"]
11403
+ class OF extends RE{constructor(t){super(TF),this.table=t,this.updateQueued=!1}get updateRowIds(){return this.isTracked("rowIds")}get updateRowParentIds(){return this.isTracked("rowParentIds")}get updateGroupRows(){return this.isTracked("groupRows")}get updateColumnIds(){return this.isTracked("columnIds")}get updateColumnSort(){return this.isTracked("columnSort")}get updateColumnWidths(){return this.isTracked("columnWidths")}get updateColumnDefinition(){return this.isTracked("columnDefinition")}get updateActionMenuSlots(){return this.isTracked("actionMenuSlots")}get updateSelectionMode(){return this.isTracked("selectionMode")}get requiresTanStackUpdate(){return this.isTracked("rowIds")||this.isTracked("rowParentIds")||this.isTracked("columnSort")||this.isTracked("columnDefinition")||this.isTracked("groupRows")||this.isTracked("selectionMode")}get requiresTanStackDataReset(){return this.isTracked("rowIds")||this.isTracked("columnDefinition")||this.isTracked("rowParentIds")}get requiresKeyboardFocusReset(){return this.isTracked("columnSortDisabled")||this.isTracked("columnDefinition")||this.isTracked("columnHidden")||this.isTracked("selectionMode")||this.isTracked("actionMenuSlots")}trackAllStateChanged(){this.trackAll(),this.queueUpdate()}get hasPendingUpdates(){return this.updateQueued}trackColumnPropertyChanged(t){AF(t,"columnId")?this.track("columnIds"):VR(t,"operandDataRecordFieldName","sortOperation")?this.track("columnDefinition"):VR(t,"sortingDisabled")?(this.track("columnSort"),this.track("columnSortDisabled")):VR(t,"currentSortDirection","currentSortIndex")?this.track("columnSort"):VR(t,"currentFractionalWidth","currentPixelWidth","minPixelWidth","resizingDisabled")?this.track("columnWidths"):AF(t,"columnHidden")?(this.track("columnWidths"),this.track("columnHidden")):AF(t,"actionMenuSlot")?this.track("actionMenuSlots"):VR(t,"groupIndex","groupingDisabled")&&this.track("groupRows"),this.queueUpdate()}trackColumnInstancesChanged(){this.track("columnIds"),this.track("columnDefinition"),this.track("columnSort"),this.track("columnSortDisabled"),this.track("columnWidths"),this.track("actionMenuSlots"),this.track("groupRows"),this.queueUpdate()}trackIdFieldNameChanged(){this.track("rowIds"),this.queueUpdate()}trackParentIdFieldNameChanged(){this.track("rowParentIds"),this.queueUpdate()}trackSelectionModeChanged(){this.track("selectionMode"),this.queueUpdate()}queueUpdate(){this.table.$fastController.isConnected&&(this.updateQueued||(this.updateQueued=!0,b.queueUpdate((()=>{this.table.update(),this.untrackAll(),this.updateQueued=!1}))))}}class RF{constructor(t){this.tanStackTable=t}reset(){}toggleIsRowSelected(t,e){t.isGroupRow&&t.selectionState===bR?this.deselectAllLeafRows(t.id):this.tanStackTable.getRow(t.id).toggleSelected(e,{selectChildren:t.isGroupRow})}selectSingleRow(t){if(t.isGroupRow)throw new Error("function not intended to select grouped rows")
11402
11404
  const e=this.tanStackTable.getState().rowSelection,n=[]
11403
11405
  if(Object.entries(e).forEach((([t,e])=>{e&&n.push(t)})),1===n.length&&n[0]===t.id)return!1
11404
11406
  const i={}
@@ -11408,7 +11410,7 @@ this.tanStackTable.setRowSelection(i)}getAllLeafRowIds(t){const e=this.tanStackT
11408
11410
  return e?.getIsGrouped()?e.getLeafRows().filter((t=>!t.getIsGrouped())).map((t=>t.id)):[]}getAllOrderedRows(){const t=this.tanStackTable.getPreExpandedRowModel().rows
11409
11411
  return this.getOrderedRows(t)}getOrderedRows(t){const e=[]
11410
11412
  for(const n of t)e.push(n),n.subRows?.length&&e.push(...this.getOrderedRows(n.subRows))
11411
- return e}}class RF extends OF{handleRowSelectionToggle(t,e,n){return!1}handleRowClick(t,e,n){return!1}handleActionMenuOpening(t){return!1}}class FF extends OF{handleRowSelectionToggle(t,e,n){return n&&this.tryUpdateRangeSelection(t.id,!0)||(this.shiftSelectStartRowId=e?t.id:void 0,this.previousShiftSelectRowEndId=void 0,this.toggleIsRowSelected(t,e)),!0}handleRowClick(t,e,n){if(e){const e=n
11413
+ return e}}class FF extends RF{handleRowSelectionToggle(t,e,n){return!1}handleRowClick(t,e,n){return!1}handleActionMenuOpening(t){return!1}}class NF extends RF{handleRowSelectionToggle(t,e,n){return n&&this.tryUpdateRangeSelection(t.id,!0)||(this.shiftSelectStartRowId=e?t.id:void 0,this.previousShiftSelectRowEndId=void 0,this.toggleIsRowSelected(t,e)),!0}handleRowClick(t,e,n){if(e){const e=n
11412
11414
  if(this.tryUpdateRangeSelection(t.id,e))return!0}if(n){const e=t.selectionState!==bR
11413
11415
  return this.shiftSelectStartRowId=e?t.id:void 0,this.previousShiftSelectRowEndId=void 0,this.toggleIsRowSelected(t),!0}return this.shiftSelectStartRowId=t.id,this.previousShiftSelectRowEndId=void 0,this.selectSingleRow(t)}handleActionMenuOpening(t){return t.selectionState!==bR&&this.selectSingleRow(t)}reset(){this.shiftSelectStartRowId=void 0,this.previousShiftSelectRowEndId=void 0}tryUpdateRangeSelection(t,e){if(void 0===this.shiftSelectStartRowId)return!1
11414
11416
  const n=this.getAllOrderedRows(),i=this.getRowIndexForId(this.shiftSelectStartRowId,n)
@@ -11420,20 +11422,20 @@ this.updateSelectionStateForRange(t,n,s,i,!0)}updateSelectionStateForRange(t,e,n
11420
11422
  const o=Math.min(e,n),r=Math.max(e,n)
11421
11423
  for(let e=o;e<=r;e++){const n=i[e]
11422
11424
  n.getIsGrouped()||this.updateSelectionStateForRow(t,n.id,s)}const a=i[n]
11423
- a.getIsGrouped()&&this.getAllLeafRowIds(a.id).forEach((e=>this.updateSelectionStateForRow(t,e,s)))}updateSelectionStateForRow(t,e,n){n?t[e]=!0:delete t[e]}getRowIndexForId(t,e){return t?e.findIndex((e=>e.id===t)):-1}}class NF extends OF{handleRowSelectionToggle(t,e,n){return this.toggleIsRowSelected(t,e),!0}handleRowClick(t,e,n){return this.selectSingleRow(t)}handleActionMenuOpening(t){return this.handleRowClick(t,!1,!1)}}class LF{constructor(t,e){this.tanStackTable=t,this.selectionManager=this.createSelectionManager(e)}handleRowSelectionToggle(t,e,n){return!!t&&this.selectionManager.handleRowSelectionToggle(t,e,n)}handleRowClick(t,e,n){return!!t&&this.selectionManager.handleRowClick(t,e,n)}handleActionMenuOpening(t){return!!t&&this.selectionManager.handleActionMenuOpening(t)}handleSelectionModeChanged(t){this.selectionManager=this.createSelectionManager(t)}handleSelectionReset(){this.selectionManager.reset()}getCurrentSelectedRecordIds(){const t=this.tanStackTable.options.state.rowSelection
11425
+ a.getIsGrouped()&&this.getAllLeafRowIds(a.id).forEach((e=>this.updateSelectionStateForRow(t,e,s)))}updateSelectionStateForRow(t,e,n){n?t[e]=!0:delete t[e]}getRowIndexForId(t,e){return t?e.findIndex((e=>e.id===t)):-1}}class LF extends RF{handleRowSelectionToggle(t,e,n){return this.toggleIsRowSelected(t,e),!0}handleRowClick(t,e,n){return this.selectSingleRow(t)}handleActionMenuOpening(t){return this.handleRowClick(t,!1,!1)}}class BF{constructor(t,e){this.tanStackTable=t,this.selectionManager=this.createSelectionManager(e)}handleRowSelectionToggle(t,e,n){return!!t&&this.selectionManager.handleRowSelectionToggle(t,e,n)}handleRowClick(t,e,n){return!!t&&this.selectionManager.handleRowClick(t,e,n)}handleActionMenuOpening(t){return!!t&&this.selectionManager.handleActionMenuOpening(t)}handleSelectionModeChanged(t){this.selectionManager=this.createSelectionManager(t)}handleSelectionReset(){this.selectionManager.reset()}getCurrentSelectedRecordIds(){const t=this.tanStackTable.options.state.rowSelection
11424
11426
  if(!t)return[]
11425
11427
  const e=[]
11426
- return Object.entries(t).forEach((([t,n])=>{n&&e.push(t)})),e}createSelectionManager(t){switch(t){case gR.multiple:return new FF(this.tanStackTable)
11427
- case gR.single:return new NF(this.tanStackTable)
11428
- case gR.none:return new RF(this.tanStackTable)
11429
- default:throw new Error("unknown selection mode found")}}}function BF(t,e){const n=e,i=[],s={},o=new Set
11428
+ return Object.entries(t).forEach((([t,n])=>{n&&e.push(t)})),e}createSelectionManager(t){switch(t){case gR.multiple:return new NF(this.tanStackTable)
11429
+ case gR.single:return new LF(this.tanStackTable)
11430
+ case gR.none:return new FF(this.tanStackTable)
11431
+ default:throw new Error("unknown selection mode found")}}}function PF(t,e){const n=e,i=[],s={},o=new Set
11430
11432
  for(let e=0;e<t.length;e++){const r=t[e],a=r[n.id],l=r[n.parentId]
11431
11433
  Object.prototype.hasOwnProperty.call(s,a)||(s[a]={subRows:[],clientRecord:void 0,originalIndex:void 0}),o&&o.delete(a),s[a].clientRecord=r
11432
11434
  const c=s[a]
11433
11435
  c.originalIndex=e,null==l?i.push(c):(Object.prototype.hasOwnProperty.call(s,l)||(s[l]={subRows:[],clientRecord:void 0,originalIndex:void 0},o&&o.add(l)),s[l].subRows.push(c))}if(o?.size){const t=Array.from(o.values()).join(",")
11434
- throw new Error(`The items array contains orphans that point to the following parentIds: [${t}]. These parentIds do not exist in the items array.`)}if(PF(i)<Object.keys(s).length)throw new Error("The items array contains nodes with a circular parent/child relationship.")
11435
- return i}function PF(t){return t.reduce(((t,e)=>t+1+(e.subRows&&PF(e.subRows))),0)}class zF{constructor(t,e,n){if(this.isDataFlat=!1,"string"==typeof e&&"string"==typeof n)try{this._hierarchicalData=BF(t,{id:e,parentId:n}),this.isDataFlat=!1,this._parentIdConfigurationValid=!0}catch{this.isDataFlat=!0,this._hierarchicalData=t.map(((t,e)=>({clientRecord:{...t},originalIndex:e}))),this._parentIdConfigurationValid=!1}else this.isDataFlat=!0,this._hierarchicalData=t.map(((t,e)=>({clientRecord:{...t},originalIndex:e}))),this._parentIdConfigurationValid=!0}get hierarchicalData(){return this._hierarchicalData}get parentIdConfigurationValid(){return this._parentIdConfigurationValid}getAllRecords(t=!1){const e=[]
11436
- return this.getAllNodes(this._hierarchicalData,e),this.isDataFlat||!t?e.map((t=>t.clientRecord)):e.sort(((t,e)=>t.originalIndex-e.originalIndex)).map((t=>t.clientRecord))}getAllNodes(t,e){for(const n of t)e.push(n),n.subRows&&this.getAllNodes(n.subRows,e)}}class VF{constructor(t){this.tanStackTable=t,this.explicitExpansionStates=new Map,this.hierarchyOptions=new Map,this.isHierarchyEnabled=!1,this.parentRowsWithChildren=new Set}isRowExpanded(t){if(!this.isRowExpandable(t))return!1
11436
+ throw new Error(`The items array contains orphans that point to the following parentIds: [${t}]. These parentIds do not exist in the items array.`)}if(zF(i)<Object.keys(s).length)throw new Error("The items array contains nodes with a circular parent/child relationship.")
11437
+ return i}function zF(t){return t.reduce(((t,e)=>t+1+(e.subRows&&zF(e.subRows))),0)}class VF{constructor(t,e,n){if(this.isDataFlat=!1,"string"==typeof e&&"string"==typeof n)try{this._hierarchicalData=PF(t,{id:e,parentId:n}),this.isDataFlat=!1,this._parentIdConfigurationValid=!0}catch{this.isDataFlat=!0,this._hierarchicalData=t.map(((t,e)=>({clientRecord:{...t},originalIndex:e}))),this._parentIdConfigurationValid=!1}else this.isDataFlat=!0,this._hierarchicalData=t.map(((t,e)=>({clientRecord:{...t},originalIndex:e}))),this._parentIdConfigurationValid=!0}get hierarchicalData(){return this._hierarchicalData}get parentIdConfigurationValid(){return this._parentIdConfigurationValid}getAllRecords(t=!1){const e=[]
11438
+ return this.getAllNodes(this._hierarchicalData,e),this.isDataFlat||!t?e.map((t=>t.clientRecord)):e.sort(((t,e)=>t.originalIndex-e.originalIndex)).map((t=>t.clientRecord))}getAllNodes(t,e){for(const n of t)e.push(n),n.subRows&&this.getAllNodes(n.subRows,e)}}class HF{constructor(t){this.tanStackTable=t,this.explicitExpansionStates=new Map,this.hierarchyOptions=new Map,this.isHierarchyEnabled=!1,this.parentRowsWithChildren=new Set}isRowExpanded(t){if(!this.isRowExpandable(t))return!1
11437
11439
  return this.explicitExpansionStates.get(t.id)??this.getDefaultExpansionState(t)}toggleRowExpansion(t){if(!this.isRowExpandable(t))return
11438
11440
  const e=this.isRowExpanded(t)
11439
11441
  this.explicitExpansionStates.set(t.id,!e),t.toggleExpanded()}collapseAll(){this.resetExpansionState()
@@ -11448,8 +11450,8 @@ for(const{recordId:n,options:i}of t){e.set(n,i)
11448
11450
  const t=this.hierarchyOptions.get(n)?.delayedHierarchyState,s=i.delayedHierarchyState
11449
11451
  t!==fR||s!==pR||this.parentRowsWithChildren.has(n)||this.explicitExpansionStates.delete(n)}this.hierarchyOptions=e}isRowExpandable(t){return t.subRows.length>0||this.canLoadDelayedChildren(t.id)}setHierarchyEnabled(t){this.isHierarchyEnabled=t}isLoadingChildren(t){return!!this.isHierarchyEnabled&&(this.hierarchyOptions.get(t)?.delayedHierarchyState===fR??!1)}canLoadDelayedChildren(t){if(!this.isHierarchyEnabled)return!1
11450
11452
  const e=this.hierarchyOptions.get(t)?.delayedHierarchyState
11451
- return e!==uR}getDefaultExpansionState(t){return 0!==t.subRows.length}}class HF extends OE{isValid(){return this.noneTracked()}getValidationFlags(){return this.getTrackedItems()}}class UF extends HF{constructor(t){super(t),this.isColumnValid=!0}getValidity(){return this.getValidationFlags()}onTrackingChange(){super.onTrackingChange(),this.isColumnValid=this.isValid()}setConditionValue(t,e){e?this.track(t):this.untrack(t)}}t([C],UF.prototype,"isColumnValid",void 0)
11452
- class qF{get inNavigationMode(){return this.focusType!==$R&&this.focusType!==ER}constructor(t,e){this.table=t,this.virtualizer=e,this.focusType=CR,this.headerActionIndex=-1,this.rowIndex=-1,this.cellContentIndex=-1,this.columnIndex=-1,this.focusWithinTable=!1,this.isCurrentlyFocusingElement=!1,this.visibleRowNotifiers=[],this.onTableFocusIn=t=>{this.focusWithinTable=!0,this.updateFocusStateFromActiveElement(!1)
11453
+ return e!==uR}getDefaultExpansionState(t){return 0!==t.subRows.length}}class UF extends OE{isValid(){return this.noneTracked()}getValidationFlags(){return this.getTrackedItems()}}class qF extends UF{constructor(t){super(t),this.isColumnValid=!0}getValidity(){return this.getValidationFlags()}onTrackingChange(){super.onTrackingChange(),this.isColumnValid=this.isValid()}setConditionValue(t,e){e?this.track(t):this.untrack(t)}}t([C],qF.prototype,"isColumnValid",void 0)
11454
+ class jF{get inNavigationMode(){return this.focusType!==$R&&this.focusType!==ER}constructor(t,e){this.table=t,this.virtualizer=e,this.focusType=CR,this.headerActionIndex=-1,this.rowIndex=-1,this.cellContentIndex=-1,this.columnIndex=-1,this.focusWithinTable=!1,this.isCurrentlyFocusingElement=!1,this.visibleRowNotifiers=[],this.onTableFocusIn=t=>{this.focusWithinTable=!0,this.updateFocusStateFromActiveElement(!1)
11453
11455
  const e=void 0!==this.table.openActionMenuRecordId
11454
11456
  if((t.target===this.table||this.focusType===CR)&&!e){let t=!0
11455
11457
  this.hasRowOrCellFocusType()&&this.scrollToAndFocusRow(this.rowIndex)&&(t=!1),t&&!this.setFocusOnHeader()&&this.table.blur()}},this.onTableFocusOut=()=>{this.focusWithinTable=!1},this.onCellActionMenuBlur=t=>{t.stopPropagation()
@@ -11581,7 +11583,7 @@ const i=e??this.columnIndex,s=n??this.rowIndex
11581
11583
  return i>=0&&i<t.cells.length&&(this.focusType=MR,this.setRowCellFocusState(i,s,!0),!0)}trySetCellContentFocus(t,e,n,i){if(!t)return!1
11582
11584
  const s=n??this.columnIndex,o=i??this.rowIndex
11583
11585
  return s>=0&&s<t.cells.length&&e>=0&&e<t.cells[s].cell.cellView.tabbableChildren.length&&(this.setCellContentFocusState(e,o,s,!0),!0)}trySetCellActionMenuFocus(t,e,n){const i=e??this.columnIndex,s=n??this.rowIndex
11584
- return!!(i>=0&&i<t.cells.length&&t.cells[i].actionMenuButton)&&(this.setCellActionMenuFocusState(s,i,!0),!0)}setCellActionMenuFocusState(t,e,n){this.focusType=$R,this.setRowCellFocusState(e,t,n)}setCellContentFocusState(t,e,n,i){this.focusType=ER,this.cellContentIndex=t,this.setRowCellFocusState(n,e,i)}setRowFocusState(t){this.focusType=_R,void 0!==t&&(this.rowIndex=t)}setCellFocusState(t,e,n){this.focusType=MR,this.setRowCellFocusState(t,e,n)}setRowCellFocusState(t,e,n){this.rowIndex=e,this.columnIndex=t,n&&this.focusCurrentRow(!0)}isResolvedRowType(t){return t instanceof sF||t instanceof cF}}let jF=class extends We{get validity(){return this.tableValidator.getValidity()}get showRowOperationColumn(){return this.selectionMode===gR.multiple||this.showCollapseAll}get collapseButtonVisibility(){return this.canHaveCollapsibleRows?this.showCollapseAll?"visible":"":"hidden-size-reduced"}constructor(){super(),this.selectionMode=gR.none,this.tableData=[],this.columns=[],this.childItems=[],this.rowElements=[],this.canRenderRows=!0,this.scrollX=0,this.selectionState=vR,this.showCollapseAll=!1,this.canHaveCollapsibleRows=!1,this.visibleColumns=[],this.tableScrollableMinWidth=0,this.windowShiftKeyDown=!1,this.tableValidator=new UR,this.tableUpdateTracker=new TF(this),this.columnNotifiers=[],this.isInitialized=!1,this.ignoreSelectionChangeEvents=!1,this.requestedSlots=new Map,this.actionMenuSlots=[],this.onViewPortScroll=t=>{this.scrollX=t.target.scrollLeft},this.onKeyDown=t=>{this.windowShiftKeyDown=t.shiftKey},this.onKeyUp=t=>{this.windowShiftKeyDown=t.shiftKey},this.onBlur=()=>{this.windowShiftKeyDown=!1},this.getRowCanExpand=t=>this.expansionManager.isRowExpandable(t),this.getIsRowExpanded=t=>this.expansionManager.isRowExpanded(t),this.handleRowSelectionChange=t=>{const e=t instanceof Function?t(this.table.getState().rowSelection):t
11586
+ return!!(i>=0&&i<t.cells.length&&t.cells[i].actionMenuButton)&&(this.setCellActionMenuFocusState(s,i,!0),!0)}setCellActionMenuFocusState(t,e,n){this.focusType=$R,this.setRowCellFocusState(e,t,n)}setCellContentFocusState(t,e,n,i){this.focusType=ER,this.cellContentIndex=t,this.setRowCellFocusState(n,e,i)}setRowFocusState(t){this.focusType=_R,void 0!==t&&(this.rowIndex=t)}setCellFocusState(t,e,n){this.focusType=MR,this.setRowCellFocusState(t,e,n)}setRowCellFocusState(t,e,n){this.rowIndex=e,this.columnIndex=t,n&&this.focusCurrentRow(!0)}isResolvedRowType(t){return t instanceof sF||t instanceof cF}}let WF=class extends We{get validity(){return this.tableValidator.getValidity()}get showRowOperationColumn(){return this.selectionMode===gR.multiple||this.showCollapseAll}get collapseButtonVisibility(){return this.canHaveCollapsibleRows?this.showCollapseAll?"visible":"":"hidden-size-reduced"}constructor(){super(),this.selectionMode=gR.none,this.tableData=[],this.columns=[],this.childItems=[],this.rowElements=[],this.canRenderRows=!0,this.scrollX=0,this.selectionState=vR,this.showCollapseAll=!1,this.canHaveCollapsibleRows=!1,this.visibleColumns=[],this.tableScrollableMinWidth=0,this.windowShiftKeyDown=!1,this.tableValidator=new UR,this.tableUpdateTracker=new OF(this),this.columnNotifiers=[],this.isInitialized=!1,this.ignoreSelectionChangeEvents=!1,this.requestedSlots=new Map,this.actionMenuSlots=[],this.onViewPortScroll=t=>{this.scrollX=t.target.scrollLeft},this.onKeyDown=t=>{this.windowShiftKeyDown=t.shiftKey},this.onKeyUp=t=>{this.windowShiftKeyDown=t.shiftKey},this.onBlur=()=>{this.windowShiftKeyDown=!1},this.getRowCanExpand=t=>this.expansionManager.isRowExpandable(t),this.getIsRowExpanded=t=>this.expansionManager.isRowExpanded(t),this.handleRowSelectionChange=t=>{const e=t instanceof Function?t(this.table.getState().rowSelection):t
11585
11587
  this.updateTableOptions({state:{rowSelection:e}})},this.handleExpandedChange=t=>{const e=t instanceof Function?t(this.table.getState().expanded):t
11586
11588
  this.updateTableOptions({state:{expanded:e}})},this.options={data:[],onStateChange:t=>{},onRowSelectionChange:this.handleRowSelectionChange,onExpandedChange:this.handleExpandedChange,getCoreRowModel:t=>gO((()=>[t.options.data]),(e=>{const n={rows:[],flatRows:[],rowsById:{}},i=function(e,s,o){void 0===s&&(s=0)
11587
11589
  const r=[]
@@ -11604,11 +11606,11 @@ d=n&&i?0:n?l:-l}}if(0===d&&(d=a.sortingFn(t,e,s.id)),0!==d)return c&&(d*=-1),a.i
11604
11606
  s.push(t),null!=(e=t.subRows)&&e.length&&(t.subRows=a(t.subRows))})),e}
11605
11607
  return{rows:a(n.rows),flatRows:s,rowsById:n.rowsById}}),vO(t.options,"debugTable",0,(()=>t._autoResetPageIndex()))),getGroupedRowModel:hR(),getExpandedRowModel:t=>gO((()=>[t.getState().expanded,t.getPreExpandedRowModel(),t.options.paginateExpandedRows]),((t,e,n)=>!e.rows.length||!0!==t&&!Object.keys(null!=t?t:{}).length?e:n?function(t){const e=[],n=t=>{var i
11606
11608
  e.push(t),null!=(i=t.subRows)&&i.length&&t.getIsExpanded()&&t.subRows.forEach(n)}
11607
- return t.rows.forEach(n),{rows:e,flatRows:t.flatRows,rowsById:t.rowsById}}(e):e),vO(t.options,"debugTable")),getRowCanExpand:this.getRowCanExpand,getIsRowExpanded:this.getIsRowExpanded,getSubRows:t=>t.subRows,columns:[],state:{rowSelection:{},grouping:[],expanded:!0},enableRowSelection:t=>!t.getIsGrouped(),enableMultiRowSelection:!1,enableSubRowSelection:!1,enableSorting:!0,enableGrouping:!0,renderFallbackValue:null,autoResetAll:!1},this.table=dR(this.options),this.virtualizer=new _F(this,this.table),this.keyboardNavigationManager=new qF(this,this.virtualizer),this.layoutManager=new EF(this),this.layoutManagerNotifier=x.getNotifier(this.layoutManager),this.layoutManagerNotifier.subscribe(this,"isColumnBeingSized"),this.selectionManager=new LF(this.table,this.selectionMode),this.expansionManager=new VF(this.table)}async setData(t){await this.processPendingUpdates()
11609
+ return t.rows.forEach(n),{rows:e,flatRows:t.flatRows,rowsById:t.rowsById}}(e):e),vO(t.options,"debugTable")),getRowCanExpand:this.getRowCanExpand,getIsRowExpanded:this.getIsRowExpanded,getSubRows:t=>t.subRows,columns:[],state:{rowSelection:{},grouping:[],expanded:!0},enableRowSelection:t=>!t.getIsGrouped(),enableMultiRowSelection:!1,enableSubRowSelection:!1,enableSorting:!0,enableGrouping:!0,renderFallbackValue:null,autoResetAll:!1},this.table=dR(this.options),this.virtualizer=new IF(this,this.table),this.keyboardNavigationManager=new jF(this,this.virtualizer),this.layoutManager=new DF(this),this.layoutManagerNotifier=x.getNotifier(this.layoutManager),this.layoutManagerNotifier.subscribe(this,"isColumnBeingSized"),this.selectionManager=new BF(this.table,this.selectionMode),this.expansionManager=new HF(this.table)}async setData(t){await this.processPendingUpdates()
11608
11610
  const e=this.calculateTanStackData(t)
11609
11611
  this.updateTableOptions(e)}async getSelectedRecordIds(){return await this.processPendingUpdates(),this.selectionManager.getCurrentSelectedRecordIds()}async setSelectedRecordIds(t){await this.processPendingUpdates(),this.selectionMode!==gR.none&&this.updateTableOptions({state:{rowSelection:this.calculateTanStackSelectionState(t)}})}async setRecordHierarchyOptions(t){await this.processPendingUpdates()
11610
11612
  const e=structuredClone(t),n=this.tableValidator.getOptionsWithPresentIds(e)
11611
- this.expansionManager.setHierarchyOptions(n),this.refreshRows()}connectedCallback(){super.connectedCallback(),this.initialize(),this.virtualizer.connect(),this.viewport.addEventListener("scroll",this.onViewPortScroll,{passive:!0}),this.keyboardNavigationManager.connect(),window.addEventListener("keydown",this.onKeyDown),window.addEventListener("keyup",this.onKeyUp),window.addEventListener("blur",this.onBlur)}disconnectedCallback(){super.disconnectedCallback(),this.virtualizer.disconnect(),this.keyboardNavigationManager.disconnect(),this.viewport.removeEventListener("scroll",this.onViewPortScroll),window.removeEventListener("keydown",this.onKeyDown),window.removeEventListener("keyup",this.onKeyUp),window.removeEventListener("blur",this.onBlur)}checkValidity(){return this.tableValidator.isValid()}handleChange(t,e){(t instanceof HR||t instanceof zR)&&"string"==typeof e?this.tableUpdateTracker.trackColumnPropertyChanged(e):t instanceof UF&&"isColumnValid"===e?this.tableValidator.validateColumnConfigurations(this.columns):t instanceof EF&&"isColumnBeingSized"===e&&!this.layoutManager.isColumnBeingSized&&this.emitColumnConfigurationChangeEvent()}onRowSelectionToggle(t,e){e.stopImmediatePropagation()
11613
+ this.expansionManager.setHierarchyOptions(n),this.refreshRows()}connectedCallback(){super.connectedCallback(),this.initialize(),this.virtualizer.connect(),this.viewport.addEventListener("scroll",this.onViewPortScroll,{passive:!0}),this.keyboardNavigationManager.connect(),window.addEventListener("keydown",this.onKeyDown),window.addEventListener("keyup",this.onKeyUp),window.addEventListener("blur",this.onBlur)}disconnectedCallback(){super.disconnectedCallback(),this.virtualizer.disconnect(),this.keyboardNavigationManager.disconnect(),this.viewport.removeEventListener("scroll",this.onViewPortScroll),window.removeEventListener("keydown",this.onKeyDown),window.removeEventListener("keyup",this.onKeyUp),window.removeEventListener("blur",this.onBlur)}checkValidity(){return this.tableValidator.isValid()}handleChange(t,e){(t instanceof HR||t instanceof zR)&&"string"==typeof e?this.tableUpdateTracker.trackColumnPropertyChanged(e):t instanceof qF&&"isColumnValid"===e?this.tableValidator.validateColumnConfigurations(this.columns):t instanceof DF&&"isColumnBeingSized"===e&&!this.layoutManager.isColumnBeingSized&&this.emitColumnConfigurationChangeEvent()}onRowSelectionToggle(t,e){e.stopImmediatePropagation()
11612
11614
  this.selectionManager.handleRowSelectionToggle(this.tableData[t],e.detail.newState,this.windowShiftKeyDown)&&this.emitSelectionChangeEvent()}onRowClick(t,e){return this.selectionManager.handleRowClick(this.tableData[t],e.shiftKey,e.ctrlKey||e.metaKey)&&this.emitSelectionChangeEvent(),!0}onRowFocusIn(t){this.keyboardNavigationManager.onRowFocusIn(t)}onRowBlur(t){this.keyboardNavigationManager.onRowBlur(t)}onAllRowsSelectionChange(t){t.stopPropagation(),this.ignoreSelectionChangeEvents||(this.table.toggleAllRowsSelected(this.selectionCheckbox.checked),this.emitSelectionChangeEvent())}onRowActionMenuBeforeToggle(t,e){e.stopImmediatePropagation(),this.handleActionMenuBeforeToggleEvent(t,e)}onRowActionMenuToggle(t){t.stopImmediatePropagation(),this.handleRowActionMenuToggleEvent(t)}onRowSlotsRequest(t){t.stopImmediatePropagation()
11613
11615
  for(const e of t.detail.slots){const n=LR(t.detail.columnInternalId,e.slot)
11614
11616
  this.requestedSlots.set(e.name,{recordId:t.detail.recordId,uniqueSlot:n})}this.refreshRows()}handleCollapseAllRows(){this.expansionManager.collapseAll()}onRightDividerMouseDown(t,e){0===t.button&&this.layoutManager.beginColumnInteractiveSize(t.clientX,this.getRightDividerIndex(e))}onLeftDividerMouseDown(t,e){0===t.button&&this.layoutManager.beginColumnInteractiveSize(t.clientX,this.getLeftDividerIndex(e))}getLeftDividerIndex(t){return 2*t-1}getRightDividerIndex(t){return 2*t}handleGroupRowExpanded(t,e){this.toggleRowExpanded(t),e.stopPropagation()}handleRowExpanded(t){this.toggleRowExpanded(t)}toggleColumnSort(t,e){if(t.columnInternals.sortingDisabled)return
@@ -11620,7 +11622,7 @@ e?n[i].columnInternals.currentSortIndex=i:s===t?s.columnInternals.currentSortInd
11620
11622
  return e.key===Ta&&this.toggleColumnSort(t,n),!0}update(){if(this.validate(),this.tableUpdateTracker.requiresTanStackUpdate&&this.updateTanStack(),this.tableUpdateTracker.updateRowParentIds||this.tableUpdateTracker.updateGroupRows){const t=this.isHierarchyEnabled(),e=this.columns.some((t=>!t.columnInternals.groupingDisabled))
11621
11623
  this.canHaveCollapsibleRows=t||e}this.tableUpdateTracker.updateActionMenuSlots&&this.updateActionMenuSlots(),this.tableUpdateTracker.updateColumnWidths&&(this.rowGridColumns=this.layoutManager.getGridTemplateColumns(),this.visibleColumns=this.columns.filter((t=>!t.columnHidden))),this.tableUpdateTracker.requiresKeyboardFocusReset&&this.keyboardNavigationManager.resetFocusState()}get ariaMultiSelectable(){switch(this.selectionMode){case gR.multiple:return"true"
11622
11624
  case gR.single:return"false"
11623
- default:return null}}getHeaderContainerElements(){return this.columnHeadersContainer.querySelectorAll(".header-container")}calculateTanStackData(t){this.dataHierarchyManager=new zF(t,this.idFieldName,this.parentIdFieldName)
11625
+ default:return null}}getHeaderContainerElements(){return this.columnHeadersContainer.querySelectorAll(".header-container")}calculateTanStackData(t){this.dataHierarchyManager=new VF(t,this.idFieldName,this.parentIdFieldName)
11624
11626
  const e=this.dataHierarchyManager.hierarchicalData
11625
11627
  this.tableValidator.setParentIdConfigurationValidity(this.dataHierarchyManager.parentIdConfigurationValid)
11626
11628
  const n={data:e}
@@ -11659,14 +11661,14 @@ if(void 0!==e)return this.columns.find((t=>t.columnInternals.uniqueId===e))}upda
11659
11661
  this.expansionManager.processDataUpdate(t)}this.refreshRows()}toggleRowExpanded(t){const e=this.table.getRowModel().rows[t]
11660
11662
  this.expansionManager.toggleRowExpansion(e)}calculateTanStackSortState(){const t=this.getColumnsParticipatingInSorting().sort(((t,e)=>t.columnInternals.currentSortIndex-e.columnInternals.currentSortIndex))
11661
11663
  return this.firstSortedColumn=t.length?t[0]:void 0,t.map((t=>({id:t.columnInternals.uniqueId,desc:t.columnInternals.currentSortDirection===mR.descending})))}calculateTanStackGroupingState(){return this.getColumnsParticipatingInGrouping().sort(((t,e)=>t.columnInternals.groupIndex-e.columnInternals.groupIndex)).map((t=>t.columnInternals.uniqueId))}calculateTanStackRowIdFunction(){return null===this.idFieldName||void 0===this.idFieldName?void 0:t=>t.clientRecord[this.idFieldName]}calculateTanStackColumns(){return this.columns.map((t=>({id:t.columnInternals.uniqueId,accessorFn:e=>{const n=t.columnInternals.operandDataRecordFieldName
11662
- if("string"==typeof n)return e.clientRecord[n]},sortingFn:IF(t.columnInternals.sortOperation),sortUndefined:!1})))}calculateTanStackSelectionState(t){if(this.selectionMode===gR.none)return{}
11664
+ if("string"==typeof n)return e.clientRecord[n]},sortingFn:MF(t.columnInternals.sortOperation),sortUndefined:!1})))}calculateTanStackSelectionState(t){if(this.selectionMode===gR.none)return{}
11663
11665
  const e={},n=this.tableValidator.getPresentRecordIds(t)
11664
11666
  for(const t of n)if(e[t]=!0,this.selectionMode===gR.single)break
11665
11667
  return e}}
11666
- t([ft({attribute:"id-field-name"})],jF.prototype,"idFieldName",void 0),t([ft({attribute:"parent-id-field-name"})],jF.prototype,"parentIdFieldName",void 0),t([ft({attribute:"selection-mode"})],jF.prototype,"selectionMode",void 0),t([C],jF.prototype,"tableData",void 0),t([C],jF.prototype,"columns",void 0),t([C],jF.prototype,"childItems",void 0),t([C],jF.prototype,"rowElements",void 0),t([C],jF.prototype,"openActionMenuRecordId",void 0),t([C],jF.prototype,"canRenderRows",void 0),t([C],jF.prototype,"scrollX",void 0),t([C],jF.prototype,"rowGridColumns",void 0),t([C],jF.prototype,"selectionState",void 0),t([C],jF.prototype,"selectionCheckbox",void 0),t([C],jF.prototype,"collapseAllButton",void 0),t([C],jF.prototype,"showCollapseAll",void 0),t([C],jF.prototype,"canHaveCollapsibleRows",void 0),t([k],jF.prototype,"collapseButtonVisibility",null),t([C],jF.prototype,"firstSortedColumn",void 0),t([C],jF.prototype,"visibleColumns",void 0),t([C],jF.prototype,"tableScrollableMinWidth",void 0),t([C],jF.prototype,"windowShiftKeyDown",void 0)
11667
- const WF=jF.compose({baseName:"table",template:uF,styles:qR})
11668
- _i.getOrCreate().withPrefix("nimble").register(WF())
11669
- const GF=Mt`
11668
+ t([ft({attribute:"id-field-name"})],WF.prototype,"idFieldName",void 0),t([ft({attribute:"parent-id-field-name"})],WF.prototype,"parentIdFieldName",void 0),t([ft({attribute:"selection-mode"})],WF.prototype,"selectionMode",void 0),t([C],WF.prototype,"tableData",void 0),t([C],WF.prototype,"columns",void 0),t([C],WF.prototype,"childItems",void 0),t([C],WF.prototype,"rowElements",void 0),t([C],WF.prototype,"openActionMenuRecordId",void 0),t([C],WF.prototype,"canRenderRows",void 0),t([C],WF.prototype,"scrollX",void 0),t([C],WF.prototype,"rowGridColumns",void 0),t([C],WF.prototype,"selectionState",void 0),t([C],WF.prototype,"selectionCheckbox",void 0),t([C],WF.prototype,"collapseAllButton",void 0),t([C],WF.prototype,"showCollapseAll",void 0),t([C],WF.prototype,"canHaveCollapsibleRows",void 0),t([k],WF.prototype,"collapseButtonVisibility",null),t([C],WF.prototype,"firstSortedColumn",void 0),t([C],WF.prototype,"visibleColumns",void 0),t([C],WF.prototype,"tableScrollableMinWidth",void 0),t([C],WF.prototype,"windowShiftKeyDown",void 0)
11669
+ const GF=WF.compose({baseName:"table",template:uF,styles:qR})
11670
+ _i.getOrCreate().withPrefix("nimble").register(GF())
11671
+ const ZF=Mt`
11670
11672
  ${Vs("contents")}
11671
11673
 
11672
11674
  .header-content {
@@ -11674,14 +11676,14 @@ const GF=Mt`
11674
11676
  overflow: hidden;
11675
11677
  text-overflow: ellipsis;
11676
11678
  }
11677
- `,ZF=Q`<span
11679
+ `,KF=Q`<span
11678
11680
  ${Ag("hasOverflow")}
11679
11681
  class="header-content"
11680
11682
  title=${t=>t.hasOverflow&&t.headerTextContent?t.headerTextContent:null}
11681
11683
  >
11682
11684
  <slot ${Ut("contentSlot")}></slot>
11683
11685
  </span>`
11684
- function KF(t){class e extends t{fractionalWidthChanged(){this.columnInternals.fractionalWidth=this.fractionalWidth??OR}minPixelWidthChanged(){this.columnInternals.minPixelWidth=this.minPixelWidth??TR}}return ft({attribute:"fractional-width",converter:ut})(e.prototype,"fractionalWidth"),ft({attribute:"min-pixel-width",converter:ut})(e.prototype,"minPixelWidth"),e}function YF(t){class e extends t{constructor(){super(...arguments),this.groupingDisabled=!1}groupingDisabledChanged(){this.columnInternals.groupingDisabled=this.groupingDisabled}groupIndexChanged(){this.columnInternals.groupIndex=this.groupIndex??void 0}}return ft({attribute:"grouping-disabled",mode:"boolean"})(e.prototype,"groupingDisabled"),ft({attribute:"group-index",converter:ut})(e.prototype,"groupIndex"),e}function XF(t){class e extends t{}return ft({attribute:"placeholder"})(e.prototype,"placeholder"),e}const JF=Mt`
11686
+ function YF(t){class e extends t{fractionalWidthChanged(){this.columnInternals.fractionalWidth=this.fractionalWidth??OR}minPixelWidthChanged(){this.columnInternals.minPixelWidth=this.minPixelWidth??TR}}return ft({attribute:"fractional-width",converter:ut})(e.prototype,"fractionalWidth"),ft({attribute:"min-pixel-width",converter:ut})(e.prototype,"minPixelWidth"),e}function XF(t){class e extends t{constructor(){super(...arguments),this.groupingDisabled=!1}groupingDisabledChanged(){this.columnInternals.groupingDisabled=this.groupingDisabled}groupIndexChanged(){this.columnInternals.groupIndex=this.groupIndex??void 0}}return ft({attribute:"grouping-disabled",mode:"boolean"})(e.prototype,"groupingDisabled"),ft({attribute:"group-index",converter:ut})(e.prototype,"groupIndex"),e}function JF(t){class e extends t{}return ft({attribute:"placeholder"})(e.prototype,"placeholder"),e}const QF=Mt`
11685
11687
  ${Vs("flex")}
11686
11688
 
11687
11689
  :host {
@@ -11710,7 +11712,7 @@ function KF(t){class e extends t{fractionalWidthChanged(){this.columnInternals.f
11710
11712
  font: ${Oc};
11711
11713
  color: ${Rc};
11712
11714
  }
11713
- `,QF=Q`
11715
+ `,tN=Q`
11714
11716
  <template
11715
11717
  @click="${(t,e)=>("string"==typeof t.cellRecord?.href&&e.event.stopPropagation(),!0)}"
11716
11718
  class="${t=>t.isPlaceholder?"placeholder":""}"
@@ -11744,19 +11746,19 @@ function KF(t){class e extends t{fractionalWidthChanged(){this.columnInternals.f
11744
11746
  </span>`)}
11745
11747
  </template>
11746
11748
  `
11747
- class tN extends NR{constructor(){super(...arguments),this.hasOverflow=!1,this.isPlaceholder=!1}get text(){const t=this.cellRecord?.label??this.cellRecord?.href
11748
- return null==t&&this.columnConfig?.placeholder?(this.isPlaceholder=!0,this.columnConfig.placeholder):(this.isPlaceholder=!1,"string"==typeof this.cellRecord?.label?this.cellRecord.label:"string"==typeof this.cellRecord?.href?this.cellRecord.href:"")}get showAnchor(){return"string"==typeof this.cellRecord?.href}get tabbableChildren(){return this.showAnchor?[this.anchor]:[]}}t([C],tN.prototype,"hasOverflow",void 0),t([C],tN.prototype,"isPlaceholder",void 0),t([k],tN.prototype,"text",null),t([k],tN.prototype,"showAnchor",null)
11749
- const eN=tN.compose({baseName:"table-column-anchor-cell-view",template:QF,styles:JF})
11750
- _i.getOrCreate().withPrefix("nimble").register(eN())
11751
- class nN extends RR{constructor(){super(...arguments),this.hasOverflow=!1,this.text=zv.getValueFor(this),this.noValuePlaceholderLabelSubscriber={handleChange:()=>{this.applyPlaceholderTextIfNeeded()}},this.emptyPlaceholderLabelSubscriber={handleChange:()=>{this.applyPlaceholderTextIfNeeded()}}}connectedCallback(){super.connectedCallback(),zv.subscribe(this.noValuePlaceholderLabelSubscriber,this),Vv.subscribe(this.emptyPlaceholderLabelSubscriber,this),this.applyPlaceholderTextIfNeeded()}disconnectedCallback(){super.disconnectedCallback(),zv.unsubscribe(this.noValuePlaceholderLabelSubscriber),Vv.unsubscribe(this.emptyPlaceholderLabelSubscriber)}columnConfigChanged(){this.applyPlaceholderTextIfNeeded()||this.updateText()}groupHeaderValueChanged(){this.applyPlaceholderTextIfNeeded()||this.updateText()}applyPlaceholderTextIfNeeded(){return null===this.groupHeaderValue||void 0===this.groupHeaderValue?(this.text=zv.getValueFor(this),!0):""===this.groupHeaderValue&&(this.text=Vv.getValueFor(this),!0)}}t([C],nN.prototype,"hasOverflow",void 0),t([C],nN.prototype,"text",void 0)
11752
- const iN=Q`
11749
+ class eN extends NR{constructor(){super(...arguments),this.hasOverflow=!1,this.isPlaceholder=!1}get text(){const t=this.cellRecord?.label??this.cellRecord?.href
11750
+ return null==t&&this.columnConfig?.placeholder?(this.isPlaceholder=!0,this.columnConfig.placeholder):(this.isPlaceholder=!1,"string"==typeof this.cellRecord?.label?this.cellRecord.label:"string"==typeof this.cellRecord?.href?this.cellRecord.href:"")}get showAnchor(){return"string"==typeof this.cellRecord?.href}get tabbableChildren(){return this.showAnchor?[this.anchor]:[]}}t([C],eN.prototype,"hasOverflow",void 0),t([C],eN.prototype,"isPlaceholder",void 0),t([k],eN.prototype,"text",null),t([k],eN.prototype,"showAnchor",null)
11751
+ const nN=eN.compose({baseName:"table-column-anchor-cell-view",template:tN,styles:QF})
11752
+ _i.getOrCreate().withPrefix("nimble").register(nN())
11753
+ class iN extends RR{constructor(){super(...arguments),this.hasOverflow=!1,this.text=zv.getValueFor(this),this.noValuePlaceholderLabelSubscriber={handleChange:()=>{this.applyPlaceholderTextIfNeeded()}},this.emptyPlaceholderLabelSubscriber={handleChange:()=>{this.applyPlaceholderTextIfNeeded()}}}connectedCallback(){super.connectedCallback(),zv.subscribe(this.noValuePlaceholderLabelSubscriber,this),Vv.subscribe(this.emptyPlaceholderLabelSubscriber,this),this.applyPlaceholderTextIfNeeded()}disconnectedCallback(){super.disconnectedCallback(),zv.unsubscribe(this.noValuePlaceholderLabelSubscriber),Vv.unsubscribe(this.emptyPlaceholderLabelSubscriber)}columnConfigChanged(){this.applyPlaceholderTextIfNeeded()||this.updateText()}groupHeaderValueChanged(){this.applyPlaceholderTextIfNeeded()||this.updateText()}applyPlaceholderTextIfNeeded(){return null===this.groupHeaderValue||void 0===this.groupHeaderValue?(this.text=zv.getValueFor(this),!0):""===this.groupHeaderValue&&(this.text=Vv.getValueFor(this),!0)}}t([C],iN.prototype,"hasOverflow",void 0),t([C],iN.prototype,"text",void 0)
11754
+ const sN=Q`
11753
11755
  <span
11754
11756
  ${Ag("hasOverflow")}
11755
11757
  title="${t=>t.hasOverflow&&t.text?t.text:null}"
11756
11758
  >
11757
11759
  ${t=>t.text}
11758
11760
  </span>
11759
- `,sN=Mt`
11761
+ `,oN=Mt`
11760
11762
  ${Vs("flex")}
11761
11763
 
11762
11764
  span {
@@ -11767,19 +11769,19 @@ const iN=Q`
11767
11769
  text-overflow: ellipsis;
11768
11770
  }
11769
11771
  `
11770
- const oN=class extends nN{updateText(){this.text="string"==typeof this.groupHeaderValue?this.groupHeaderValue:""}}.compose({baseName:"table-column-text-group-header-view",template:iN,styles:sN})
11771
- _i.getOrCreate().withPrefix("nimble").register(oN())
11772
- const rN="nimble-table-column-text-group-header-view"
11773
- function aN(t){class e extends t{constructor(){super(...arguments),this.sortingDisabled=!1,this.sortDirection=mR.none}sortingDisabledChanged(){this.columnInternals.sortingDisabled=this.sortingDisabled,this.sortingDisabled?(this.columnInternals.currentSortDirection=mR.none,this.columnInternals.currentSortIndex=void 0):(this.columnInternals.currentSortDirection=this.sortDirection,this.columnInternals.currentSortIndex=this.sortIndex??void 0)}sortDirectionChanged(){this.sortingDisabled||(this.columnInternals.currentSortDirection=this.sortDirection)}sortIndexChanged(){this.sortingDisabled||(this.columnInternals.currentSortIndex=this.sortIndex??void 0)}}return ft({attribute:"sorting-disabled",mode:"boolean"})(e.prototype,"sortingDisabled"),ft({attribute:"sort-index",converter:ut})(e.prototype,"sortIndex"),ft({attribute:"sort-direction"})(e.prototype,"sortDirection"),e}function lN(t){class e extends t{constructor(){super(...arguments),this.customSortOrderColumnChangeHandler={handleChange:this.handleCustomSortOrderColumnChange.bind(this)}}getResolvedOperandDataRecordFieldName(t){return"string"==typeof this.sortByFieldName?this.sortByFieldName:t}getResolvedSortOperation(t){return"string"==typeof this.sortByFieldName?DR:t}sortByFieldNameChanged(){this.handleSortConfigurationChange(),this.updateCustomColumnSortingValidity(),"string"!=typeof this.sortByFieldName||this.customSortOrderColumnNotifier?(this.customSortOrderColumnNotifier?.unsubscribe(this.customSortOrderColumnChangeHandler),this.customSortOrderColumnNotifier=void 0):(this.customSortOrderColumnNotifier=x.getNotifier(this.columnInternals),this.customSortOrderColumnNotifier.subscribe(this.customSortOrderColumnChangeHandler))}handleCustomSortOrderColumnChange(t,e){"groupingDisabled"===e&&this.updateCustomColumnSortingValidity()}updateCustomColumnSortingValidity(){const t="string"==typeof this.sortByFieldName
11774
- !!this.columnInternals.groupingDisabled||!t?this.columnInternals.validator.untrack("invalidCustomSortWithGrouping"):this.columnInternals.validator.track("invalidCustomSortWithGrouping")}}return ft({attribute:"sort-by-field-name"})(e.prototype,"sortByFieldName"),e}const cN=["invalidCustomSortWithGrouping"]
11775
- class dN extends UF{constructor(){super(cN)}}class hN extends(YF(KF(XF(aN(lN(HR)))))){constructor(){super(...arguments),this.underlineHidden=!1,this.defaultSortOperation=AR}placeholderChanged(){this.updateColumnConfig()}handleSortConfigurationChange(){this.updateColumnInternalsSortConfiguration()}getColumnInternalsOptions(){return{cellRecordFieldNames:["label","href"],cellViewTag:"nimble-table-column-anchor-cell-view",groupHeaderViewTag:rN,delegatedEvents:["click"],sortOperation:this.getResolvedSortOperation(this.defaultSortOperation),validator:new dN}}labelFieldNameChanged(){this.columnInternals.dataRecordFieldNames=[this.labelFieldName,this.hrefFieldName],this.updateColumnInternalsSortConfiguration()}hrefFieldNameChanged(){this.columnInternals.dataRecordFieldNames=[this.labelFieldName,this.hrefFieldName]}appearanceChanged(){this.updateColumnConfig()}underlineHiddenChanged(){this.updateColumnConfig()}hreflangChanged(){this.updateColumnConfig()}pingChanged(){this.updateColumnConfig()}referrerpolicyChanged(){this.updateColumnConfig()}relChanged(){this.updateColumnConfig()}targetChanged(){this.updateColumnConfig()}typeChanged(){this.updateColumnConfig()}downloadChanged(){this.updateColumnConfig()}updateColumnConfig(){this.columnInternals.columnConfig={appearance:this.appearance,underlineHidden:this.underlineHidden,hreflang:this.hreflang,ping:this.ping,referrerpolicy:this.referrerpolicy,rel:this.rel,target:this.target,type:this.type,download:this.download,placeholder:this.placeholder}}updateColumnInternalsSortConfiguration(){this.columnInternals.operandDataRecordFieldName=this.getResolvedOperandDataRecordFieldName(this.labelFieldName),this.columnInternals.sortOperation=this.getResolvedSortOperation(this.defaultSortOperation)}}t([ft({attribute:"label-field-name"})],hN.prototype,"labelFieldName",void 0),t([ft({attribute:"href-field-name"})],hN.prototype,"hrefFieldName",void 0),t([ft],hN.prototype,"appearance",void 0),t([ft({attribute:"underline-hidden",mode:"boolean"})],hN.prototype,"underlineHidden",void 0),t([ft],hN.prototype,"hreflang",void 0),t([ft],hN.prototype,"ping",void 0),t([ft],hN.prototype,"referrerpolicy",void 0),t([ft],hN.prototype,"rel",void 0),t([ft],hN.prototype,"target",void 0),t([ft],hN.prototype,"type",void 0),t([ft],hN.prototype,"download",void 0)
11776
- const uN=hN.compose({baseName:"table-column-anchor",template:ZF,styles:GF})
11777
- _i.getOrCreate().withPrefix("nimble").register(uN())
11778
- class pN extends HR{fieldNameChanged(){this.columnInternals.dataRecordFieldNames=[this.fieldName],this.columnInternals.operandDataRecordFieldName=this.fieldName}}function fN(t){return YF(KF(XF(aN(t))))}function mN(t,e){if("number"!=typeof e)return""
11779
- try{return t.format(e)}catch(t){return""}}t([ft({attribute:"field-name"})],pN.prototype,"fieldName",void 0)
11780
- const gN=class extends nN{updateText(){this.columnConfig?this.text=mN(this.columnConfig.formatter,this.groupHeaderValue):this.text=""}}.compose({baseName:"table-column-date-text-group-header-view",template:iN,styles:sN})
11781
- _i.getOrCreate().withPrefix("nimble").register(gN())
11782
- const vN=Q`
11772
+ const rN=class extends iN{updateText(){this.text="string"==typeof this.groupHeaderValue?this.groupHeaderValue:""}}.compose({baseName:"table-column-text-group-header-view",template:sN,styles:oN})
11773
+ _i.getOrCreate().withPrefix("nimble").register(rN())
11774
+ const aN="nimble-table-column-text-group-header-view"
11775
+ function lN(t){class e extends t{constructor(){super(...arguments),this.sortingDisabled=!1,this.sortDirection=mR.none}sortingDisabledChanged(){this.columnInternals.sortingDisabled=this.sortingDisabled,this.sortingDisabled?(this.columnInternals.currentSortDirection=mR.none,this.columnInternals.currentSortIndex=void 0):(this.columnInternals.currentSortDirection=this.sortDirection,this.columnInternals.currentSortIndex=this.sortIndex??void 0)}sortDirectionChanged(){this.sortingDisabled||(this.columnInternals.currentSortDirection=this.sortDirection)}sortIndexChanged(){this.sortingDisabled||(this.columnInternals.currentSortIndex=this.sortIndex??void 0)}}return ft({attribute:"sorting-disabled",mode:"boolean"})(e.prototype,"sortingDisabled"),ft({attribute:"sort-index",converter:ut})(e.prototype,"sortIndex"),ft({attribute:"sort-direction"})(e.prototype,"sortDirection"),e}function cN(t){class e extends t{constructor(){super(...arguments),this.customSortOrderColumnChangeHandler={handleChange:this.handleCustomSortOrderColumnChange.bind(this)}}getResolvedOperandDataRecordFieldName(t){return"string"==typeof this.sortByFieldName?this.sortByFieldName:t}getResolvedSortOperation(t){return"string"==typeof this.sortByFieldName?DR:t}sortByFieldNameChanged(){this.handleSortConfigurationChange(),this.updateCustomColumnSortingValidity(),"string"!=typeof this.sortByFieldName||this.customSortOrderColumnNotifier?(this.customSortOrderColumnNotifier?.unsubscribe(this.customSortOrderColumnChangeHandler),this.customSortOrderColumnNotifier=void 0):(this.customSortOrderColumnNotifier=x.getNotifier(this.columnInternals),this.customSortOrderColumnNotifier.subscribe(this.customSortOrderColumnChangeHandler))}handleCustomSortOrderColumnChange(t,e){"groupingDisabled"===e&&this.updateCustomColumnSortingValidity()}updateCustomColumnSortingValidity(){const t="string"==typeof this.sortByFieldName
11776
+ !!this.columnInternals.groupingDisabled||!t?this.columnInternals.validator.untrack("invalidCustomSortWithGrouping"):this.columnInternals.validator.track("invalidCustomSortWithGrouping")}}return ft({attribute:"sort-by-field-name"})(e.prototype,"sortByFieldName"),e}const dN=["invalidCustomSortWithGrouping"]
11777
+ class hN extends qF{constructor(){super(dN)}}class uN extends(XF(YF(JF(lN(cN(HR)))))){constructor(){super(...arguments),this.underlineHidden=!1,this.defaultSortOperation=AR}placeholderChanged(){this.updateColumnConfig()}handleSortConfigurationChange(){this.updateColumnInternalsSortConfiguration()}getColumnInternalsOptions(){return{cellRecordFieldNames:["label","href"],cellViewTag:"nimble-table-column-anchor-cell-view",groupHeaderViewTag:aN,delegatedEvents:["click"],sortOperation:this.getResolvedSortOperation(this.defaultSortOperation),validator:new hN}}labelFieldNameChanged(){this.columnInternals.dataRecordFieldNames=[this.labelFieldName,this.hrefFieldName],this.updateColumnInternalsSortConfiguration()}hrefFieldNameChanged(){this.columnInternals.dataRecordFieldNames=[this.labelFieldName,this.hrefFieldName]}appearanceChanged(){this.updateColumnConfig()}underlineHiddenChanged(){this.updateColumnConfig()}hreflangChanged(){this.updateColumnConfig()}pingChanged(){this.updateColumnConfig()}referrerpolicyChanged(){this.updateColumnConfig()}relChanged(){this.updateColumnConfig()}targetChanged(){this.updateColumnConfig()}typeChanged(){this.updateColumnConfig()}downloadChanged(){this.updateColumnConfig()}updateColumnConfig(){this.columnInternals.columnConfig={appearance:this.appearance,underlineHidden:this.underlineHidden,hreflang:this.hreflang,ping:this.ping,referrerpolicy:this.referrerpolicy,rel:this.rel,target:this.target,type:this.type,download:this.download,placeholder:this.placeholder}}updateColumnInternalsSortConfiguration(){this.columnInternals.operandDataRecordFieldName=this.getResolvedOperandDataRecordFieldName(this.labelFieldName),this.columnInternals.sortOperation=this.getResolvedSortOperation(this.defaultSortOperation)}}t([ft({attribute:"label-field-name"})],uN.prototype,"labelFieldName",void 0),t([ft({attribute:"href-field-name"})],uN.prototype,"hrefFieldName",void 0),t([ft],uN.prototype,"appearance",void 0),t([ft({attribute:"underline-hidden",mode:"boolean"})],uN.prototype,"underlineHidden",void 0),t([ft],uN.prototype,"hreflang",void 0),t([ft],uN.prototype,"ping",void 0),t([ft],uN.prototype,"referrerpolicy",void 0),t([ft],uN.prototype,"rel",void 0),t([ft],uN.prototype,"target",void 0),t([ft],uN.prototype,"type",void 0),t([ft],uN.prototype,"download",void 0)
11778
+ const pN=uN.compose({baseName:"table-column-anchor",template:KF,styles:ZF})
11779
+ _i.getOrCreate().withPrefix("nimble").register(pN())
11780
+ class fN extends HR{fieldNameChanged(){this.columnInternals.dataRecordFieldNames=[this.fieldName],this.columnInternals.operandDataRecordFieldName=this.fieldName}}function mN(t){return XF(YF(JF(lN(t))))}function gN(t,e){if("number"!=typeof e)return""
11781
+ try{return t.format(e)}catch(t){return""}}t([ft({attribute:"field-name"})],fN.prototype,"fieldName",void 0)
11782
+ const vN=class extends iN{updateText(){this.columnConfig?this.text=gN(this.columnConfig.formatter,this.groupHeaderValue):this.text=""}}.compose({baseName:"table-column-date-text-group-header-view",template:sN,styles:oN})
11783
+ _i.getOrCreate().withPrefix("nimble").register(vN())
11784
+ const bN=Q`
11783
11785
  <template
11784
11786
  class="
11785
11787
  ${t=>t.alignment===xR?"right-align":""}
@@ -11793,7 +11795,7 @@ const vN=Q`
11793
11795
  ${t=>t.text}
11794
11796
  </span>
11795
11797
  </template>
11796
- `,bN=Mt`
11798
+ `,yN=Mt`
11797
11799
  ${Vs("flex")}
11798
11800
 
11799
11801
  :host {
@@ -11817,22 +11819,22 @@ const vN=Q`
11817
11819
  color: ${Rc};
11818
11820
  }
11819
11821
  `
11820
- class yN extends NR{constructor(){super(...arguments),this.hasOverflow=!1,this.text="",this.alignment=wR,this.isPlaceholder=!1}columnConfigChanged(){this.applyPlaceholderTextIfNeeded()||this.updateText()}cellRecordChanged(){this.applyPlaceholderTextIfNeeded()||this.updateText()}applyPlaceholderTextIfNeeded(){const t=this.cellRecord?.value,e=this.columnConfig?.placeholder
11821
- return"string"==typeof e&&null==t?(this.text=e,this.isPlaceholder=!0):this.isPlaceholder=!1,this.isPlaceholder}}t([C],yN.prototype,"hasOverflow",void 0),t([C],yN.prototype,"text",void 0),t([C],yN.prototype,"alignment",void 0),t([C],yN.prototype,"isPlaceholder",void 0)
11822
- const wN=class extends yN{updateText(){this.columnConfig?this.text=mN(this.columnConfig.formatter,this.cellRecord?.value):this.text=""}}.compose({baseName:"table-column-date-text-cell-view",template:vN,styles:bN})
11823
- _i.getOrCreate().withPrefix("nimble").register(wN())
11824
- const xN=void 0,CN=["invalidCustomOptionsCombination"]
11825
- class kN extends UF{constructor(){super(CN)}setCustomOptionsValidity(t){this.setConditionValue("invalidCustomOptionsCombination",!t)}}const SN={toView:t=>"boolean"==typeof t?t.toString():null,fromView:t=>"true"===t||!0===t||"false"!==t&&!1!==t&&void 0}
11826
- class _N extends(fN(pN)){constructor(){super(...arguments),this.langSubscriber={handleChange:()=>{this.updateColumnConfig()}}}connectedCallback(){super.connectedCallback(),Ga.subscribe(this.langSubscriber,this),this.updateColumnConfig()}disconnectedCallback(){super.disconnectedCallback(),Ga.unsubscribe(this.langSubscriber,this)}placeholderChanged(){this.updateColumnConfig()}getColumnInternalsOptions(){return{cellRecordFieldNames:["value"],cellViewTag:"nimble-table-column-date-text-cell-view",groupHeaderViewTag:"nimble-table-column-date-text-group-header-view",delegatedEvents:[],sortOperation:DR,validator:new kN}}formatChanged(){this.updateColumnConfig()}customLocaleMatcherChanged(){this.updateColumnConfig()}customWeekdayChanged(){this.updateColumnConfig()}customEraChanged(){this.updateColumnConfig()}customYearChanged(){this.updateColumnConfig()}customMonthChanged(){this.updateColumnConfig()}customDayChanged(){this.updateColumnConfig()}customHourChanged(){this.updateColumnConfig()}customMinuteChanged(){this.updateColumnConfig()}customSecondChanged(){this.updateColumnConfig()}customTimeZoneNameChanged(){this.updateColumnConfig()}customFormatMatcherChanged(){this.updateColumnConfig()}customHour12Changed(){this.updateColumnConfig()}customTimeZoneChanged(){this.updateColumnConfig()}customCalendarChanged(){this.updateColumnConfig()}customDayPeriodChanged(){this.updateColumnConfig()}customNumberingSystemChanged(){this.updateColumnConfig()}customDateStyleChanged(){this.updateColumnConfig()}customTimeStyleChanged(){this.updateColumnConfig()}customHourCycleChanged(){this.updateColumnConfig()}updateColumnConfig(){const t=this.createFormatter()
11822
+ class wN extends NR{constructor(){super(...arguments),this.hasOverflow=!1,this.text="",this.alignment=wR,this.isPlaceholder=!1}columnConfigChanged(){this.applyPlaceholderTextIfNeeded()||this.updateText()}cellRecordChanged(){this.applyPlaceholderTextIfNeeded()||this.updateText()}applyPlaceholderTextIfNeeded(){const t=this.cellRecord?.value,e=this.columnConfig?.placeholder
11823
+ return"string"==typeof e&&null==t?(this.text=e,this.isPlaceholder=!0):this.isPlaceholder=!1,this.isPlaceholder}}t([C],wN.prototype,"hasOverflow",void 0),t([C],wN.prototype,"text",void 0),t([C],wN.prototype,"alignment",void 0),t([C],wN.prototype,"isPlaceholder",void 0)
11824
+ const xN=class extends wN{updateText(){this.columnConfig?this.text=gN(this.columnConfig.formatter,this.cellRecord?.value):this.text=""}}.compose({baseName:"table-column-date-text-cell-view",template:bN,styles:yN})
11825
+ _i.getOrCreate().withPrefix("nimble").register(xN())
11826
+ const CN=void 0,kN=["invalidCustomOptionsCombination"]
11827
+ class SN extends qF{constructor(){super(kN)}setCustomOptionsValidity(t){this.setConditionValue("invalidCustomOptionsCombination",!t)}}const _N={toView:t=>"boolean"==typeof t?t.toString():null,fromView:t=>"true"===t||!0===t||"false"!==t&&!1!==t&&void 0}
11828
+ class IN extends(mN(fN)){constructor(){super(...arguments),this.langSubscriber={handleChange:()=>{this.updateColumnConfig()}}}connectedCallback(){super.connectedCallback(),Ga.subscribe(this.langSubscriber,this),this.updateColumnConfig()}disconnectedCallback(){super.disconnectedCallback(),Ga.unsubscribe(this.langSubscriber,this)}placeholderChanged(){this.updateColumnConfig()}getColumnInternalsOptions(){return{cellRecordFieldNames:["value"],cellViewTag:"nimble-table-column-date-text-cell-view",groupHeaderViewTag:"nimble-table-column-date-text-group-header-view",delegatedEvents:[],sortOperation:DR,validator:new SN}}formatChanged(){this.updateColumnConfig()}customLocaleMatcherChanged(){this.updateColumnConfig()}customWeekdayChanged(){this.updateColumnConfig()}customEraChanged(){this.updateColumnConfig()}customYearChanged(){this.updateColumnConfig()}customMonthChanged(){this.updateColumnConfig()}customDayChanged(){this.updateColumnConfig()}customHourChanged(){this.updateColumnConfig()}customMinuteChanged(){this.updateColumnConfig()}customSecondChanged(){this.updateColumnConfig()}customTimeZoneNameChanged(){this.updateColumnConfig()}customFormatMatcherChanged(){this.updateColumnConfig()}customHour12Changed(){this.updateColumnConfig()}customTimeZoneChanged(){this.updateColumnConfig()}customCalendarChanged(){this.updateColumnConfig()}customDayPeriodChanged(){this.updateColumnConfig()}customNumberingSystemChanged(){this.updateColumnConfig()}customDateStyleChanged(){this.updateColumnConfig()}customTimeStyleChanged(){this.updateColumnConfig()}customHourCycleChanged(){this.updateColumnConfig()}updateColumnConfig(){const t=this.createFormatter()
11827
11829
  if(t){const e={formatter:t,placeholder:this.placeholder}
11828
11830
  this.columnInternals.columnConfig=e,this.columnInternals.validator.setCustomOptionsValidity(!0)}else this.columnInternals.columnConfig=void 0,this.columnInternals.validator.setCustomOptionsValidity(!1)}createFormatter(){let t
11829
- t=this.format===xN?{dateStyle:"medium",timeStyle:"medium"}:this.getCustomFormattingOptions()
11830
- try{return new Intl.DateTimeFormat(Ga.getValueFor(this),t)}catch(t){return}}getCustomFormattingOptions(){return{localeMatcher:this.customLocaleMatcher??void 0,weekday:this.customWeekday??void 0,era:this.customEra??void 0,year:this.customYear??void 0,month:this.customMonth??void 0,day:this.customDay??void 0,hour:this.customHour??void 0,minute:this.customMinute??void 0,second:this.customSecond??void 0,timeZoneName:this.customTimeZoneName??void 0,formatMatcher:this.customFormatMatcher??void 0,hour12:this.customHour12??void 0,timeZone:this.customTimeZone??void 0,calendar:this.customCalendar??void 0,dayPeriod:this.customDayPeriod??void 0,numberingSystem:this.customNumberingSystem??void 0,dateStyle:this.customDateStyle??void 0,timeStyle:this.customTimeStyle??void 0,hourCycle:this.customHourCycle??void 0}}}t([ft],_N.prototype,"format",void 0),t([ft({attribute:"custom-locale-matcher"})],_N.prototype,"customLocaleMatcher",void 0),t([ft({attribute:"custom-weekday"})],_N.prototype,"customWeekday",void 0),t([ft({attribute:"custom-era"})],_N.prototype,"customEra",void 0),t([ft({attribute:"custom-year"})],_N.prototype,"customYear",void 0),t([ft({attribute:"custom-month"})],_N.prototype,"customMonth",void 0),t([ft({attribute:"custom-day"})],_N.prototype,"customDay",void 0),t([ft({attribute:"custom-hour"})],_N.prototype,"customHour",void 0),t([ft({attribute:"custom-minute"})],_N.prototype,"customMinute",void 0),t([ft({attribute:"custom-second"})],_N.prototype,"customSecond",void 0),t([ft({attribute:"custom-time-zone-name"})],_N.prototype,"customTimeZoneName",void 0),t([ft({attribute:"custom-format-matcher"})],_N.prototype,"customFormatMatcher",void 0),t([ft({attribute:"custom-hour12",converter:SN})],_N.prototype,"customHour12",void 0),t([ft({attribute:"custom-time-zone"})],_N.prototype,"customTimeZone",void 0),t([ft({attribute:"custom-calendar"})],_N.prototype,"customCalendar",void 0),t([ft({attribute:"custom-day-period"})],_N.prototype,"customDayPeriod",void 0),t([ft({attribute:"custom-numbering-system"})],_N.prototype,"customNumberingSystem",void 0),t([ft({attribute:"custom-date-style"})],_N.prototype,"customDateStyle",void 0),t([ft({attribute:"custom-time-style"})],_N.prototype,"customTimeStyle",void 0),t([ft({attribute:"custom-hour-cycle"})],_N.prototype,"customHourCycle",void 0)
11831
- const IN=_N.compose({baseName:"table-column-date-text",template:ZF,styles:GF})
11832
- _i.getOrCreate().withPrefix("nimble").register(IN())
11833
- const MN=class extends yN{updateText(){this.text=this.columnConfig?.formatter.format(this.cellRecord?.value)??""}}.compose({baseName:"table-column-duration-text-cell-view",template:vN,styles:bN})
11831
+ t=this.format===CN?{dateStyle:"medium",timeStyle:"medium"}:this.getCustomFormattingOptions()
11832
+ try{return new Intl.DateTimeFormat(Ga.getValueFor(this),t)}catch(t){return}}getCustomFormattingOptions(){return{localeMatcher:this.customLocaleMatcher??void 0,weekday:this.customWeekday??void 0,era:this.customEra??void 0,year:this.customYear??void 0,month:this.customMonth??void 0,day:this.customDay??void 0,hour:this.customHour??void 0,minute:this.customMinute??void 0,second:this.customSecond??void 0,timeZoneName:this.customTimeZoneName??void 0,formatMatcher:this.customFormatMatcher??void 0,hour12:this.customHour12??void 0,timeZone:this.customTimeZone??void 0,calendar:this.customCalendar??void 0,dayPeriod:this.customDayPeriod??void 0,numberingSystem:this.customNumberingSystem??void 0,dateStyle:this.customDateStyle??void 0,timeStyle:this.customTimeStyle??void 0,hourCycle:this.customHourCycle??void 0}}}t([ft],IN.prototype,"format",void 0),t([ft({attribute:"custom-locale-matcher"})],IN.prototype,"customLocaleMatcher",void 0),t([ft({attribute:"custom-weekday"})],IN.prototype,"customWeekday",void 0),t([ft({attribute:"custom-era"})],IN.prototype,"customEra",void 0),t([ft({attribute:"custom-year"})],IN.prototype,"customYear",void 0),t([ft({attribute:"custom-month"})],IN.prototype,"customMonth",void 0),t([ft({attribute:"custom-day"})],IN.prototype,"customDay",void 0),t([ft({attribute:"custom-hour"})],IN.prototype,"customHour",void 0),t([ft({attribute:"custom-minute"})],IN.prototype,"customMinute",void 0),t([ft({attribute:"custom-second"})],IN.prototype,"customSecond",void 0),t([ft({attribute:"custom-time-zone-name"})],IN.prototype,"customTimeZoneName",void 0),t([ft({attribute:"custom-format-matcher"})],IN.prototype,"customFormatMatcher",void 0),t([ft({attribute:"custom-hour12",converter:_N})],IN.prototype,"customHour12",void 0),t([ft({attribute:"custom-time-zone"})],IN.prototype,"customTimeZone",void 0),t([ft({attribute:"custom-calendar"})],IN.prototype,"customCalendar",void 0),t([ft({attribute:"custom-day-period"})],IN.prototype,"customDayPeriod",void 0),t([ft({attribute:"custom-numbering-system"})],IN.prototype,"customNumberingSystem",void 0),t([ft({attribute:"custom-date-style"})],IN.prototype,"customDateStyle",void 0),t([ft({attribute:"custom-time-style"})],IN.prototype,"customTimeStyle",void 0),t([ft({attribute:"custom-hour-cycle"})],IN.prototype,"customHourCycle",void 0)
11833
+ const MN=IN.compose({baseName:"table-column-date-text",template:KF,styles:ZF})
11834
11834
  _i.getOrCreate().withPrefix("nimble").register(MN())
11835
- class $N{constructor(t){this.lang=t,this.daysFormatter=new Intl.NumberFormat(this.lang,{style:"unit",unit:"day"}),this.hoursFormatter=new Intl.NumberFormat(this.lang,{style:"unit",unit:"hour"}),this.minutesFormatter=new Intl.NumberFormat(this.lang,{style:"unit",unit:"minute"}),this.secondsFormatter=new Intl.NumberFormat(this.lang,{style:"unit",unit:"second"}),this.scientificSecondsFormatter=new Intl.NumberFormat(this.lang,{style:"unit",unit:"second",notation:"scientific",maximumFractionDigits:3})}format(t){if("number"!=typeof t||t<0||!Number.isFinite(t))return""
11835
+ const $N=class extends wN{updateText(){this.text=this.columnConfig?.formatter.format(this.cellRecord?.value)??""}}.compose({baseName:"table-column-duration-text-cell-view",template:bN,styles:yN})
11836
+ _i.getOrCreate().withPrefix("nimble").register($N())
11837
+ class EN{constructor(t){this.lang=t,this.daysFormatter=new Intl.NumberFormat(this.lang,{style:"unit",unit:"day"}),this.hoursFormatter=new Intl.NumberFormat(this.lang,{style:"unit",unit:"hour"}),this.minutesFormatter=new Intl.NumberFormat(this.lang,{style:"unit",unit:"minute"}),this.secondsFormatter=new Intl.NumberFormat(this.lang,{style:"unit",unit:"second"}),this.scientificSecondsFormatter=new Intl.NumberFormat(this.lang,{style:"unit",unit:"second",notation:"scientific",maximumFractionDigits:3})}format(t){if("number"!=typeof t||t<0||!Number.isFinite(t))return""
11836
11838
  const e=[],n=1e3,i=6e4,s=36e5,o=864e5,r=t/o
11837
11839
  let a=t
11838
11840
  const l=Math.floor(r)
@@ -11845,37 +11847,37 @@ if(a-=d*i,d){const t=this.minutesFormatter.format(d)
11845
11847
  e.push(t)}const h=a/n,u=0===h?0:h%60
11846
11848
  if(t<1&&0!==h)return this.scientificSecondsFormatter.format(h)
11847
11849
  if(u>=5e-4||0===u&&0===e.length){const t=this.secondsFormatter.format(u)
11848
- e.push(t)}return e.join(", ")}}const EN=class extends nN{updateText(){this.columnConfig?this.text=this.columnConfig.formatter.format(this.groupHeaderValue):this.text=""}}.compose({baseName:"table-column-duration-text-group-header-view",template:iN,styles:sN})
11849
- _i.getOrCreate().withPrefix("nimble").register(EN())
11850
- class DN extends(fN(pN)){constructor(){super(...arguments),this.langSubscriber={handleChange:()=>{this.updateColumnConfig()}}}connectedCallback(){super.connectedCallback(),Ga.subscribe(this.langSubscriber,this),this.updateColumnConfig()}disconnectedCallback(){super.disconnectedCallback(),Ga.unsubscribe(this.langSubscriber,this)}placeholderChanged(){this.updateColumnConfig()}getColumnInternalsOptions(){return{cellRecordFieldNames:["value"],cellViewTag:"nimble-table-column-duration-text-cell-view",groupHeaderViewTag:"nimble-table-column-duration-text-group-header-view",delegatedEvents:[],sortOperation:DR,validator:new UF([])}}updateColumnConfig(){const t={formatter:new $N(Ga.getValueFor(this)),placeholder:this.placeholder}
11851
- this.columnInternals.columnConfig=t}}const AN=DN.compose({baseName:"table-column-duration-text",template:ZF,styles:GF})
11852
- _i.getOrCreate().withPrefix("nimble").register(AN())
11853
- const TN=(t,e)=>{if("number"===e){const e=ut.fromView(t)
11850
+ e.push(t)}return e.join(", ")}}const DN=class extends iN{updateText(){this.columnConfig?this.text=this.columnConfig.formatter.format(this.groupHeaderValue):this.text=""}}.compose({baseName:"table-column-duration-text-group-header-view",template:sN,styles:oN})
11851
+ _i.getOrCreate().withPrefix("nimble").register(DN())
11852
+ class AN extends(mN(fN)){constructor(){super(...arguments),this.langSubscriber={handleChange:()=>{this.updateColumnConfig()}}}connectedCallback(){super.connectedCallback(),Ga.subscribe(this.langSubscriber,this),this.updateColumnConfig()}disconnectedCallback(){super.disconnectedCallback(),Ga.unsubscribe(this.langSubscriber,this)}placeholderChanged(){this.updateColumnConfig()}getColumnInternalsOptions(){return{cellRecordFieldNames:["value"],cellViewTag:"nimble-table-column-duration-text-cell-view",groupHeaderViewTag:"nimble-table-column-duration-text-group-header-view",delegatedEvents:[],sortOperation:DR,validator:new qF([])}}updateColumnConfig(){const t={formatter:new EN(Ga.getValueFor(this)),placeholder:this.placeholder}
11853
+ this.columnInternals.columnConfig=t}}const TN=AN.compose({baseName:"table-column-duration-text",template:KF,styles:ZF})
11854
+ _i.getOrCreate().withPrefix("nimble").register(TN())
11855
+ const ON=(t,e)=>{if("number"===e){const e=ut.fromView(t)
11854
11856
  return null===e?void 0:e}return"boolean"===e?!1!==t&&"false"!==t&&(!0===t||"true"===t||void 0):t?.toString()??void 0}
11855
- class ON extends HR{constructor(){super(...arguments),this.mappingNotifiers=[],this.mappings=[],this.keyType="string"}handleChange(t,e){t instanceof Qv&&"string"==typeof e&&this.updateColumnConfig()}updateColumnConfig(){this.columnInternals.validator.validate(this.mappings,this.keyType),this.columnInternals.columnConfig=this.checkValidity()?this.createColumnConfig(this.getMappingConfigs()):void 0}getMappingConfigs(){const t=new Map
11856
- return this.mappings.forEach((e=>{const n=TN(e.key,this.keyType)
11857
+ class RN extends HR{constructor(){super(...arguments),this.mappingNotifiers=[],this.mappings=[],this.keyType="string"}handleChange(t,e){t instanceof Qv&&"string"==typeof e&&this.updateColumnConfig()}updateColumnConfig(){this.columnInternals.validator.validate(this.mappings,this.keyType),this.columnInternals.columnConfig=this.checkValidity()?this.createColumnConfig(this.getMappingConfigs()):void 0}getMappingConfigs(){const t=new Map
11858
+ return this.mappings.forEach((e=>{const n=ON(e.key,this.keyType)
11857
11859
  if(void 0===n)throw Error("Key was invalid for type. Validation should have prevented this.")
11858
11860
  const i=this.createMappingConfig(e)
11859
11861
  t.set(n,i)})),t}fieldNameChanged(){this.columnInternals.dataRecordFieldNames=[this.fieldName],this.columnInternals.operandDataRecordFieldName=this.fieldName}mappingsChanged(){this.updateColumnConfig(),this.observeMappings()}keyTypeChanged(){this.updateColumnConfig()}removeMappingObservers(){this.mappingNotifiers.forEach((t=>{t.unsubscribe(this)})),this.mappingNotifiers=[]}observeMappings(){this.removeMappingObservers()
11860
11862
  for(const t of this.mappings){const e=x.getNotifier(t)
11861
- e.subscribe(this),this.mappingNotifiers.push(e)}}}t([C],ON.prototype,"mappings",void 0),t([ft({attribute:"field-name"})],ON.prototype,"fieldName",void 0),t([ft({attribute:"key-type"})],ON.prototype,"keyType",void 0)
11862
- const RN=Mt`
11863
- ${GF}
11863
+ e.subscribe(this),this.mappingNotifiers.push(e)}}}t([C],RN.prototype,"mappings",void 0),t([ft({attribute:"field-name"})],RN.prototype,"fieldName",void 0),t([ft({attribute:"key-type"})],RN.prototype,"keyType",void 0)
11864
+ const FN=Mt`
11865
+ ${ZF}
11864
11866
 
11865
11867
  slot[name='mapping'] {
11866
11868
  display: none;
11867
11869
  }
11868
- `,FN=Q`${ZF}<slot ${ie("mappings")} name="mapping"></slot>`
11869
- class NN extends UF{constructor(t){super(t)}validate(t,e){this.untrackAll()
11870
+ `,NN=Q`${KF}<slot ${ie("mappings")} name="mapping"></slot>`
11871
+ class LN extends qF{constructor(t){super(t)}validate(t,e){this.untrackAll()
11870
11872
  const n=t.map((t=>t.key))
11871
- this.validateKeyValuesForType(n,e),this.validateUniqueKeys(n,e),this.validateNoMissingKeys(t)}validateKeyValuesForType(t,e){const n=t.some((t=>void 0!==t&&void 0===TN(t,e)))
11872
- this.setConditionValue("invalidMappingKeyValueForType",n)}validateUniqueKeys(t,e){const n=t.map((t=>TN(t,e))),i=new Set(n).size!==n.length
11873
+ this.validateKeyValuesForType(n,e),this.validateUniqueKeys(n,e),this.validateNoMissingKeys(t)}validateKeyValuesForType(t,e){const n=t.some((t=>void 0!==t&&void 0===ON(t,e)))
11874
+ this.setConditionValue("invalidMappingKeyValueForType",n)}validateUniqueKeys(t,e){const n=t.map((t=>ON(t,e))),i=new Set(n).size!==n.length
11873
11875
  this.setConditionValue("duplicateMappingKey",i)}validateNoMissingKeys(t){const e=t.some((t=>void 0===t.key))
11874
- this.setConditionValue("missingKeyValue",e)}}const LN=["invalidMappingKeyValueForType","duplicateMappingKey","missingKeyValue","unsupportedMappingType","invalidIconName","missingTextValue"]
11875
- class BN extends NN{constructor(){super(LN)}static isIconMappingElement(t){return t instanceof ob}static isSupportedMappingElement(t){return t instanceof ob||t instanceof ab||t instanceof cb||t instanceof nb}validate(t,e){super.validate(t,e),this.validateMappingTypes(t),this.validateIconNames(t),this.validateNoMissingText(t)}validateIconNames(t){const e=t.filter(BN.isIconMappingElement).some((t=>void 0===t.resolvedIcon))
11876
- this.setConditionValue("invalidIconName",e)}validateNoMissingText(t){const e=t.filter(BN.isSupportedMappingElement).some((t=>void 0===t.text))
11877
- this.setConditionValue("missingTextValue",e)}validateMappingTypes(t){const e=t.every(BN.isSupportedMappingElement)
11878
- this.setConditionValue("unsupportedMappingType",!e)}}const PN=Mt`
11876
+ this.setConditionValue("missingKeyValue",e)}}const BN=["invalidMappingKeyValueForType","duplicateMappingKey","missingKeyValue","unsupportedMappingType","invalidIconName","missingTextValue"]
11877
+ class PN extends LN{constructor(){super(BN)}static isIconMappingElement(t){return t instanceof ob}static isSupportedMappingElement(t){return t instanceof ob||t instanceof ab||t instanceof cb||t instanceof nb}validate(t,e){super.validate(t,e),this.validateMappingTypes(t),this.validateIconNames(t),this.validateNoMissingText(t)}validateIconNames(t){const e=t.filter(PN.isIconMappingElement).some((t=>void 0===t.resolvedIcon))
11878
+ this.setConditionValue("invalidIconName",e)}validateNoMissingText(t){const e=t.filter(PN.isSupportedMappingElement).some((t=>void 0===t.text))
11879
+ this.setConditionValue("missingTextValue",e)}validateMappingTypes(t){const e=t.every(PN.isSupportedMappingElement)
11880
+ this.setConditionValue("unsupportedMappingType",!e)}}const zN=Mt`
11879
11881
  ${Vs("inline-flex")}
11880
11882
 
11881
11883
  :host {
@@ -11897,7 +11899,7 @@ this.setConditionValue("unsupportedMappingType",!e)}}const PN=Mt`
11897
11899
  overflow: hidden;
11898
11900
  text-overflow: ellipsis;
11899
11901
  }
11900
- `,zN=Q`
11902
+ `,VN=Q`
11901
11903
  ${Gt((t=>t.visualizationTemplate),Q`
11902
11904
  <span class="reserve-icon-size">
11903
11905
  ${t=>t.visualizationTemplate}
@@ -11908,8 +11910,8 @@ this.setConditionValue("unsupportedMappingType",!e)}}const PN=Mt`
11908
11910
  title="${t=>t.hasOverflow&&t.text?t.text:null}"
11909
11911
  class="text"
11910
11912
  >${t=>t.text}</span>
11911
- `,VN={default:void 0,error:"error",warning:"warning",success:"success",information:"information"}
11912
- class HN{constructor(t){this.text=t}}class UN extends HN{constructor(t,e,n,i){var s
11913
+ `,HN={default:void 0,error:"error",warning:"warning",success:"success",information:"information"}
11914
+ class UN{constructor(t){this.text=t}}class qN extends UN{constructor(t,e,n,i){var s
11913
11915
  super(n),this.severity=e,this.textHidden=i,this.iconTemplate=Q`
11914
11916
  <${s=t}
11915
11917
  title="${t=>t.textHidden?t.text:""}"
@@ -11919,7 +11921,7 @@ super(n),this.severity=e,this.textHidden=i,this.iconTemplate=Q`
11919
11921
  severity="${t=>t.severity}"
11920
11922
  >
11921
11923
  </${s}>
11922
- `}}const qN=Q`
11924
+ `}}const jN=Q`
11923
11925
  <${YT}
11924
11926
  title="${t=>t.textHidden?t.text:""}"
11925
11927
  aria-label="${t=>t.text}"
@@ -11927,12 +11929,12 @@ super(n),this.severity=e,this.textHidden=i,this.iconTemplate=Q`
11927
11929
  >
11928
11930
  </${YT}>
11929
11931
  `
11930
- class jN extends HN{constructor(t,e){super(t),this.textHidden=e,this.spinnerTemplate=qN}}class WN extends HN{}class GN extends HN{}class ZN extends RR{constructor(){super(...arguments),this.hasOverflow=!1,this.text="",this.textHidden=!1}columnConfigChanged(){this.updateState()}groupHeaderValueChanged(){this.updateState()}updateState(){if(this.resetState(),!this.columnConfig)return
11932
+ class WN extends UN{constructor(t,e){super(t),this.textHidden=e,this.spinnerTemplate=jN}}class GN extends UN{}class ZN extends UN{}class KN extends RR{constructor(){super(...arguments),this.hasOverflow=!1,this.text="",this.textHidden=!1}columnConfigChanged(){this.updateState()}groupHeaderValueChanged(){this.updateState()}updateState(){if(this.resetState(),!this.columnConfig)return
11931
11933
  const t=this.groupHeaderValue,e=this.columnConfig.mappingConfigs.get(t)
11932
- e instanceof UN?(this.severity=e.severity,this.text=e.text??"",this.visualizationTemplate=e.iconTemplate):e instanceof jN?(this.text=e.text??"",this.visualizationTemplate=e.spinnerTemplate):(e instanceof WN||e instanceof GN)&&(this.text=e.text??"")}resetState(){this.text="",this.visualizationTemplate=void 0,this.severity=VN.default}}t([C],ZN.prototype,"hasOverflow",void 0),t([C],ZN.prototype,"text",void 0),t([C],ZN.prototype,"severity",void 0),t([C],ZN.prototype,"visualizationTemplate",void 0)
11933
- const KN=ZN.compose({baseName:"table-column-mapping-group-header-view",template:zN,styles:PN})
11934
- _i.getOrCreate().withPrefix("nimble").register(KN())
11935
- const YN=Mt`
11934
+ e instanceof qN?(this.severity=e.severity,this.text=e.text??"",this.visualizationTemplate=e.iconTemplate):e instanceof WN?(this.text=e.text??"",this.visualizationTemplate=e.spinnerTemplate):(e instanceof GN||e instanceof ZN)&&(this.text=e.text??"")}resetState(){this.text="",this.visualizationTemplate=void 0,this.severity=HN.default}}t([C],KN.prototype,"hasOverflow",void 0),t([C],KN.prototype,"text",void 0),t([C],KN.prototype,"severity",void 0),t([C],KN.prototype,"visualizationTemplate",void 0)
11935
+ const YN=KN.compose({baseName:"table-column-mapping-group-header-view",template:VN,styles:zN})
11936
+ _i.getOrCreate().withPrefix("nimble").register(YN())
11937
+ const XN=Mt`
11936
11938
  ${Vs("inline-flex")}
11937
11939
 
11938
11940
  :host {
@@ -11954,7 +11956,7 @@ const YN=Mt`
11954
11956
  overflow: hidden;
11955
11957
  text-overflow: ellipsis;
11956
11958
  }
11957
- `,XN=Q`
11959
+ `,JN=Q`
11958
11960
  ${Gt((t=>t.visualizationTemplate),Q`
11959
11961
  <span class="reserve-icon-size">
11960
11962
  ${t=>t.visualizationTemplate}
@@ -11970,26 +11972,26 @@ const YN=Mt`
11970
11972
  </span>
11971
11973
  `)}
11972
11974
  `
11973
- class JN extends NR{constructor(){super(...arguments),this.textHidden=!1,this.hasOverflow=!1}columnConfigChanged(){this.updateState()}cellRecordChanged(){this.updateState()}updateState(){if(this.resetState(),!this.columnConfig||!this.cellRecord)return
11975
+ class QN extends NR{constructor(){super(...arguments),this.textHidden=!1,this.hasOverflow=!1}columnConfigChanged(){this.updateState()}cellRecordChanged(){this.updateState()}updateState(){if(this.resetState(),!this.columnConfig||!this.cellRecord)return
11974
11976
  const t=this.cellRecord.value
11975
11977
  if(null==t)return
11976
11978
  const e=this.columnConfig.mappingConfigs.get(t)
11977
- e instanceof UN?(this.severity=e.severity,this.text=e.text,this.visualizationTemplate=e.iconTemplate,this.textHidden=e.textHidden):e instanceof jN?(this.text=e.text,this.visualizationTemplate=e.spinnerTemplate,this.textHidden=e.textHidden):e instanceof WN?(this.text=e.text,this.textHidden=!1):e instanceof GN&&(this.text=e.text,this.textHidden=!0)}resetState(){this.text=void 0,this.textHidden=!1,this.visualizationTemplate=void 0,this.severity=VN.default}}t([C],JN.prototype,"severity",void 0),t([C],JN.prototype,"text",void 0),t([C],JN.prototype,"visualizationTemplate",void 0),t([C],JN.prototype,"textHidden",void 0),t([C],JN.prototype,"hasOverflow",void 0)
11978
- const QN=JN.compose({baseName:"table-column-mapping-cell-view",template:XN,styles:YN})
11979
- _i.getOrCreate().withPrefix("nimble").register(QN())
11980
- const tL="icon-size"
11981
- class eL extends(YF(KF(aN(ON)))){minPixelWidthChanged(){this.widthMode!==tL&&(this.columnInternals.minPixelWidth=this.getConfiguredMinPixelWidth())}getColumnInternalsOptions(){return{cellRecordFieldNames:["value"],cellViewTag:"nimble-table-column-mapping-cell-view",groupHeaderViewTag:"nimble-table-column-mapping-group-header-view",delegatedEvents:[],sortOperation:DR,validator:new BN}}createColumnConfig(t){return{mappingConfigs:t}}createMappingConfig(t){if(t instanceof ob){if(!t.resolvedIcon)throw Error("Unresolved icon")
11982
- return new UN(t.resolvedIcon,t.severity,t.text,t.textHidden)}if(t instanceof ab)return new jN(t.text,t.textHidden)
11983
- if(t instanceof cb)return new WN(t.text)
11984
- if(t instanceof nb)return new GN(t.text)
11985
- throw new Error("Unsupported mapping")}widthModeChanged(){this.widthMode===tL?(this.columnInternals.resizingDisabled=!0,this.columnInternals.hideHeaderIndicators=!0,this.columnInternals.pixelWidth=32,this.columnInternals.minPixelWidth=32):(this.columnInternals.resizingDisabled=!1,this.columnInternals.hideHeaderIndicators=!1,this.columnInternals.pixelWidth=void 0,this.columnInternals.minPixelWidth=this.getConfiguredMinPixelWidth())}getConfiguredMinPixelWidth(){return"number"==typeof this.minPixelWidth?this.minPixelWidth:TR}}t([ft({attribute:"width-mode"})],eL.prototype,"widthMode",void 0)
11986
- const nL=eL.compose({baseName:"table-column-mapping",template:FN,styles:RN})
11987
- _i.getOrCreate().withPrefix("nimble").register(nL())
11988
- const iL=Q`
11979
+ e instanceof qN?(this.severity=e.severity,this.text=e.text,this.visualizationTemplate=e.iconTemplate,this.textHidden=e.textHidden):e instanceof WN?(this.text=e.text,this.visualizationTemplate=e.spinnerTemplate,this.textHidden=e.textHidden):e instanceof GN?(this.text=e.text,this.textHidden=!1):e instanceof ZN&&(this.text=e.text,this.textHidden=!0)}resetState(){this.text=void 0,this.textHidden=!1,this.visualizationTemplate=void 0,this.severity=HN.default}}t([C],QN.prototype,"severity",void 0),t([C],QN.prototype,"text",void 0),t([C],QN.prototype,"visualizationTemplate",void 0),t([C],QN.prototype,"textHidden",void 0),t([C],QN.prototype,"hasOverflow",void 0)
11980
+ const tL=QN.compose({baseName:"table-column-mapping-cell-view",template:JN,styles:XN})
11981
+ _i.getOrCreate().withPrefix("nimble").register(tL())
11982
+ const eL="icon-size"
11983
+ class nL extends(XF(YF(lN(RN)))){minPixelWidthChanged(){this.widthMode!==eL&&(this.columnInternals.minPixelWidth=this.getConfiguredMinPixelWidth())}getColumnInternalsOptions(){return{cellRecordFieldNames:["value"],cellViewTag:"nimble-table-column-mapping-cell-view",groupHeaderViewTag:"nimble-table-column-mapping-group-header-view",delegatedEvents:[],sortOperation:DR,validator:new PN}}createColumnConfig(t){return{mappingConfigs:t}}createMappingConfig(t){if(t instanceof ob){if(!t.resolvedIcon)throw Error("Unresolved icon")
11984
+ return new qN(t.resolvedIcon,t.severity,t.text,t.textHidden)}if(t instanceof ab)return new WN(t.text,t.textHidden)
11985
+ if(t instanceof cb)return new GN(t.text)
11986
+ if(t instanceof nb)return new ZN(t.text)
11987
+ throw new Error("Unsupported mapping")}widthModeChanged(){this.widthMode===eL?(this.columnInternals.resizingDisabled=!0,this.columnInternals.hideHeaderIndicators=!0,this.columnInternals.pixelWidth=32,this.columnInternals.minPixelWidth=32):(this.columnInternals.resizingDisabled=!1,this.columnInternals.hideHeaderIndicators=!1,this.columnInternals.pixelWidth=void 0,this.columnInternals.minPixelWidth=this.getConfiguredMinPixelWidth())}getConfiguredMinPixelWidth(){return"number"==typeof this.minPixelWidth?this.minPixelWidth:TR}}t([ft({attribute:"width-mode"})],nL.prototype,"widthMode",void 0)
11988
+ const iL=nL.compose({baseName:"table-column-mapping",template:NN,styles:FN})
11989
+ _i.getOrCreate().withPrefix("nimble").register(iL())
11990
+ const sL=Q`
11989
11991
  <template @delegated-event="${(t,e)=>t.onDelegatedEvent(e.event)}"
11990
- >${ZF}</template
11992
+ >${KF}</template
11991
11993
  >
11992
- `,sL="menu-button-menu",oL=Q`
11994
+ `,oL="menu-button-menu",rL=Q`
11993
11995
  ${Gt((t=>t.showMenuButton),Q`
11994
11996
  <${bb}
11995
11997
  ${Ut("menuButton")}
@@ -12003,10 +12005,10 @@ const iL=Q`
12003
12005
  <span ${Ut("valueSpan")} class="value-label">${t=>t.cellRecord.value}</span>
12004
12006
  <${xg} slot="end"></${xg}>
12005
12007
 
12006
- <slot name="${sL}" slot="menu"></slot>
12008
+ <slot name="${oL}" slot="menu"></slot>
12007
12009
  </${bb}>
12008
12010
  `)}
12009
- `,rL=Mt`
12011
+ `,aL=Mt`
12010
12012
  :host {
12011
12013
  align-self: center;
12012
12014
  width: 100%;
@@ -12024,18 +12026,18 @@ const iL=Q`
12024
12026
  white-space: nowrap;
12025
12027
  }
12026
12028
  `
12027
- class aL extends NR{constructor(){super(...arguments),this.hasOverflow=!1}get showMenuButton(){return!!this.cellRecord?.value}get tabbableChildren(){return this.showMenuButton?[this.menuButton]:[]}onMenuButtonBeforeToggle(t){const e=this.columnConfig?.menuSlot
12028
- if(e&&t.detail.newState){const t={slots:[{name:e,slot:sL}]}
12029
- this.$emit("cell-view-slots-request",t)}return!0}onMenuButtonMouseOver(){this.valueSpan&&(this.hasOverflow=this.valueSpan.offsetWidth<this.valueSpan.scrollWidth)}onMenuButtonMouseOut(){this.hasOverflow=!1}onMenuButtonClick(t){t.stopPropagation()}}t([C],aL.prototype,"hasOverflow",void 0),t([k],aL.prototype,"showMenuButton",null)
12030
- const lL=aL.compose({baseName:"table-column-menu-button-cell-view",template:oL,styles:rL})
12031
- _i.getOrCreate().withPrefix("nimble").register(lL())
12032
- class cL extends(KF(HR)){onDelegatedEvent(t){t.stopImmediatePropagation()
12029
+ class lL extends NR{constructor(){super(...arguments),this.hasOverflow=!1}get showMenuButton(){return!!this.cellRecord?.value}get tabbableChildren(){return this.showMenuButton?[this.menuButton]:[]}onMenuButtonBeforeToggle(t){const e=this.columnConfig?.menuSlot
12030
+ if(e&&t.detail.newState){const t={slots:[{name:e,slot:oL}]}
12031
+ this.$emit("cell-view-slots-request",t)}return!0}onMenuButtonMouseOver(){this.valueSpan&&(this.hasOverflow=this.valueSpan.offsetWidth<this.valueSpan.scrollWidth)}onMenuButtonMouseOut(){this.hasOverflow=!1}onMenuButtonClick(t){t.stopPropagation()}}t([C],lL.prototype,"hasOverflow",void 0),t([k],lL.prototype,"showMenuButton",null)
12032
+ const cL=lL.compose({baseName:"table-column-menu-button-cell-view",template:rL,styles:aL})
12033
+ _i.getOrCreate().withPrefix("nimble").register(cL())
12034
+ class dL extends(YF(HR)){onDelegatedEvent(t){t.stopImmediatePropagation()
12033
12035
  const e=t,n=e.detail.originalEvent
12034
12036
  if("beforetoggle"===n.type||"toggle"===n.type){const t=`menu-button-column-${n.type}`,i={...n.detail,recordId:e.detail.recordId}
12035
- this.$emit(t,i)}}getColumnInternalsOptions(){return{cellRecordFieldNames:["value"],cellViewTag:"nimble-table-column-menu-button-cell-view",delegatedEvents:["beforetoggle","toggle"],slotNames:[sL],validator:new UF([])}}fieldNameChanged(){this.columnInternals.dataRecordFieldNames=[this.fieldName],this.columnInternals.operandDataRecordFieldName=this.fieldName}menuSlotChanged(){this.updateColumnConfig()}updateColumnConfig(){this.columnInternals.columnConfig={menuSlot:this.menuSlot}}}t([ft({attribute:"field-name"})],cL.prototype,"fieldName",void 0),t([ft({attribute:"menu-slot"})],cL.prototype,"menuSlot",void 0)
12036
- const dL=cL.compose({baseName:"table-column-menu-button",template:iL,styles:GF})
12037
- _i.getOrCreate().withPrefix("nimble").register(dL())
12038
- const hL=Q`<span
12037
+ this.$emit(t,i)}}getColumnInternalsOptions(){return{cellRecordFieldNames:["value"],cellViewTag:"nimble-table-column-menu-button-cell-view",delegatedEvents:["beforetoggle","toggle"],slotNames:[oL],validator:new qF([])}}fieldNameChanged(){this.columnInternals.dataRecordFieldNames=[this.fieldName],this.columnInternals.operandDataRecordFieldName=this.fieldName}menuSlotChanged(){this.updateColumnConfig()}updateColumnConfig(){this.columnInternals.columnConfig={menuSlot:this.menuSlot}}}t([ft({attribute:"field-name"})],dL.prototype,"fieldName",void 0),t([ft({attribute:"menu-slot"})],dL.prototype,"menuSlot",void 0)
12038
+ const hL=dL.compose({baseName:"table-column-menu-button",template:sL,styles:ZF})
12039
+ _i.getOrCreate().withPrefix("nimble").register(hL())
12040
+ const uL=Q`<span
12039
12041
  ${Ag("hasOverflow")}
12040
12042
  class="header-content"
12041
12043
  title=${t=>t.hasOverflow&&t.headerTextContent?t.headerTextContent:null}
@@ -12043,13 +12045,13 @@ const hL=Q`<span
12043
12045
  <slot ${Ut("contentSlot")}></slot>
12044
12046
  <slot ${ie({property:"unitElements",filter:te()})} name="unit"></slot>
12045
12047
  </span>`
12046
- const uL=class extends nN{updateText(){this.text=this.columnConfig?.formatter?.format(this.groupHeaderValue)??""}}.compose({baseName:"table-column-number-text-group-header-view",template:iN,styles:sN})
12047
- _i.getOrCreate().withPrefix("nimble").register(uL())
12048
- const pL=class extends yN{columnConfigChanged(){super.columnConfigChanged(),this.alignment=this.columnConfig?.alignment??wR}updateText(){this.text=this.columnConfig?.formatter?.format(this.cellRecord?.value)??""}}.compose({baseName:"table-column-number-text-cell-view",template:vN,styles:bN})
12048
+ const pL=class extends iN{updateText(){this.text=this.columnConfig?.formatter?.format(this.groupHeaderValue)??""}}.compose({baseName:"table-column-number-text-group-header-view",template:sN,styles:oN})
12049
12049
  _i.getOrCreate().withPrefix("nimble").register(pL())
12050
- const fL={default:void 0,decimal:"decimal"},mL="left",gL="right"
12051
- class vL{format(t){if("number"!=typeof t)return""
12052
- try{return this.tryFormat(t)}catch{return""}}}class bL{constructor(t){this.locale=t.locale,this.intlNumberFormatOptions=t.intlNumberFormatOptions}}class yL extends bL{constructor(t,e){super(t),this.formatter=new Intl.NumberFormat(this.locale,{...e,...this.intlNumberFormatOptions})}static createFactory(t){return e=>new yL(e,t)}format(t){return this.formatter.format(t)}}class wL{constructor(t,e){this.scaleFactor=t,this.scaledUnitFormatFactory=e}isBase(){return 1===this.scaleFactor}}class xL{constructor(t){this.supportedScaledUnits=t
12050
+ const fL=class extends wN{columnConfigChanged(){super.columnConfigChanged(),this.alignment=this.columnConfig?.alignment??wR}updateText(){this.text=this.columnConfig?.formatter?.format(this.cellRecord?.value)??""}}.compose({baseName:"table-column-number-text-cell-view",template:bN,styles:yN})
12051
+ _i.getOrCreate().withPrefix("nimble").register(fL())
12052
+ const mL={default:void 0,decimal:"decimal"},gL="left",vL="right"
12053
+ class bL{format(t){if("number"!=typeof t)return""
12054
+ try{return this.tryFormat(t)}catch{return""}}}class yL{constructor(t){this.locale=t.locale,this.intlNumberFormatOptions=t.intlNumberFormatOptions}}class wL extends yL{constructor(t,e){super(t),this.formatter=new Intl.NumberFormat(this.locale,{...e,...this.intlNumberFormatOptions})}static createFactory(t){return e=>new wL(e,t)}format(t){return this.formatter.format(t)}}class xL{constructor(t,e){this.scaleFactor=t,this.scaledUnitFormatFactory=e}isBase(){return 1===this.scaleFactor}}class CL{constructor(t){this.supportedScaledUnits=t
12053
12055
  const e=t.every(((t,e,n)=>0===e||n[e-1].scaleFactor<t.scaleFactor))
12054
12056
  if(!e)throw new Error("Supported scaled units must have unique and ordered scale factors")
12055
12057
  const n=t.find((t=>t.isBase()))
@@ -12058,40 +12060,40 @@ this.supportedScaledUnits=t,this.baseScaledUnit=n}scaleNumber(t){const e=Math.ab
12058
12060
  if(1===this.supportedScaledUnits.length||0===e||e===1/0||Number.isNaN(e))return{scaledValue:t,scaledUnit:this.baseScaledUnit}
12059
12061
  for(let n=this.supportedScaledUnits.length-1;n>=0;n-=1){const i=this.supportedScaledUnits[n]
12060
12062
  if(e/i.scaleFactor>=1)return{scaledValue:t/i.scaleFactor,scaledUnit:i}}const n=this.supportedScaledUnits[0]
12061
- return{scaledValue:t/n.scaleFactor,scaledUnit:n}}}const CL=new class extends xL{constructor(){super([new wL(1,yL.createFactory({}))])}},kL="negative"
12062
- class SL extends vL{constructor(t,{unitScale:e=CL}={unitScale:CL}){super(),this.defaultIntlNumberFormatOptions={maximumSignificantDigits:SL.maximumDigits,maximumFractionDigits:SL.maximumDigits-1,roundingPriority:"lessPrecision",signDisplay:kL},this.defaultScaledUnitFormatters=new Map,this.exponentialIntlNumberFormatOptions={maximumSignificantDigits:SL.maximumDigits,notation:"scientific",signDisplay:kL}
12063
+ return{scaledValue:t/n.scaleFactor,scaledUnit:n}}}const kL=new class extends CL{constructor(){super([new xL(1,wL.createFactory({}))])}},SL="negative"
12064
+ class _L extends bL{constructor(t,{unitScale:e=kL}={unitScale:kL}){super(),this.defaultIntlNumberFormatOptions={maximumSignificantDigits:_L.maximumDigits,maximumFractionDigits:_L.maximumDigits-1,roundingPriority:"lessPrecision",signDisplay:SL},this.defaultScaledUnitFormatters=new Map,this.exponentialIntlNumberFormatOptions={maximumSignificantDigits:_L.maximumDigits,notation:"scientific",signDisplay:SL}
12063
12065
  for(const n of e.supportedScaledUnits)this.defaultScaledUnitFormatters.set(n.scaleFactor,n.scaledUnitFormatFactory({locale:t,intlNumberFormatOptions:this.defaultIntlNumberFormatOptions}))
12064
12066
  this.exponentialScaledUnitFormatter=e.baseScaledUnit.scaledUnitFormatFactory({locale:t,intlNumberFormatOptions:this.exponentialIntlNumberFormatOptions}),this.unitScale=e}resolvedOptions(){return{unitScale:this.unitScale}}tryFormat(t){const{scaledValue:e,scaledUnit:n}=this.unitScale.scaleNumber(t),i=Math.abs(e)
12065
- return 0!==i&&(i>=SL.exponentialUpperBound||i<SL.exponentialLowerBound)?this.exponentialScaledUnitFormatter.format(t):this.defaultScaledUnitFormatters.get(n.scaleFactor).format(e)}}SL.maximumDigits=6,SL.exponentialLowerBound=995e-6,SL.exponentialUpperBound=999999.5
12066
- class _L extends vL{constructor(t,{minimumFractionDigits:e=0,maximumFractionDigits:n=Math.max(3,e),unitScale:i=CL}={minimumFractionDigits:0,maximumFractionDigits:3,unitScale:CL}){super(),this.scaledUnitFormatters=new Map
12067
+ return 0!==i&&(i>=_L.exponentialUpperBound||i<_L.exponentialLowerBound)?this.exponentialScaledUnitFormatter.format(t):this.defaultScaledUnitFormatters.get(n.scaleFactor).format(e)}}_L.maximumDigits=6,_L.exponentialLowerBound=995e-6,_L.exponentialUpperBound=999999.5
12068
+ class IL extends bL{constructor(t,{minimumFractionDigits:e=0,maximumFractionDigits:n=Math.max(3,e),unitScale:i=kL}={minimumFractionDigits:0,maximumFractionDigits:3,unitScale:kL}){super(),this.scaledUnitFormatters=new Map
12067
12069
  const s={maximumFractionDigits:n,minimumFractionDigits:e,signDisplay:"negative"}
12068
12070
  for(const e of i.supportedScaledUnits)this.scaledUnitFormatters.set(e.scaleFactor,e.scaledUnitFormatFactory({locale:t,intlNumberFormatOptions:s}))
12069
12071
  this.unitScale=i,this.minimumFractionDigits=e,this.maximumFractionDigits=n}resolvedOptions(){return{unitScale:this.unitScale,maximumFractionDigits:this.maximumFractionDigits,minimumFractionDigits:this.minimumFractionDigits}}tryFormat(t){const{scaledValue:e,scaledUnit:n}=this.unitScale.scaleNumber(t)
12070
- return this.scaledUnitFormatters.get(n.scaleFactor).format(e)}}class IL extends vL{constructor(t,e){super(),this._resolvedOptions=this.resolveOptions(e),this.resolvedUnitFormat=this.resolveUnitFormat(t,this._resolvedOptions)}resolvedOptions(){return{...this._resolvedOptions}}optionsMatch(t){const e=this.resolveOptions(t)
12072
+ return this.scaledUnitFormatters.get(n.scaleFactor).format(e)}}class ML extends bL{constructor(t,e){super(),this._resolvedOptions=this.resolveOptions(e),this.resolvedUnitFormat=this.resolveUnitFormat(t,this._resolvedOptions)}resolvedOptions(){return{...this._resolvedOptions}}optionsMatch(t){const e=this.resolveOptions(t)
12071
12073
  return this._resolvedOptions.decimalDigits===e.decimalDigits&&this._resolvedOptions.decimalMaximumDigits===e.decimalMaximumDigits&&this._resolvedOptions.numberTextFormat===e.numberTextFormat&&this._resolvedOptions.unitScale===e.unitScale}tryFormat(t){return this.resolvedUnitFormat.format(t)}resolveUnitFormat(t,e){const{numberTextFormat:n,decimalMaximumDigits:i,decimalDigits:s,unitScale:o}=e
12072
- return n===fL.default?new SL(t,{unitScale:o}):new _L(t,"number"==typeof s?{minimumFractionDigits:s,maximumFractionDigits:s,unitScale:o}:{minimumFractionDigits:0,maximumFractionDigits:i,unitScale:o})}resolveOptions(t){if(!t||t.numberTextFormat===fL.default)return{numberTextFormat:fL.default,decimalDigits:void 0,decimalMaximumDigits:void 0,unitScale:t?.unitScale??CL}
12074
+ return n===mL.default?new _L(t,{unitScale:o}):new IL(t,"number"==typeof s?{minimumFractionDigits:s,maximumFractionDigits:s,unitScale:o}:{minimumFractionDigits:0,maximumFractionDigits:i,unitScale:o})}resolveOptions(t){if(!t||t.numberTextFormat===mL.default)return{numberTextFormat:mL.default,decimalDigits:void 0,decimalMaximumDigits:void 0,unitScale:t?.unitScale??kL}
12073
12075
  const e="number"==typeof t.decimalDigits,n="number"==typeof t.decimalMaximumDigits
12074
12076
  if(e&&n)throw new Error("decimalDigits and decimalMaximumDigits are mutually exclusive. Do not specify both.")
12075
- return e||n?{numberTextFormat:fL.decimal,decimalDigits:t.decimalDigits,decimalMaximumDigits:t.decimalMaximumDigits,unitScale:t.unitScale??CL}:{numberTextFormat:fL.decimal,decimalDigits:IL.defaultDecimalDigits,decimalMaximumDigits:void 0,unitScale:t.unitScale??CL}}}IL.defaultDecimalDigits=2
12076
- const ML=["invalidDecimalDigits","invalidDecimalMaximumDigits","decimalDigitsMutuallyExclusiveWithDecimalMaximumDigits","moreThanOneUnitSpecified"]
12077
- class $L extends UF{constructor(){super(ML)}validateDecimalDigits(t,e){const n=!!(t===fL.decimal&&"number"==typeof e)&&this.isInvalidDecimalDigitsValue(e)
12078
- this.setConditionValue("invalidDecimalDigits",n)}validateDecimalMaximumDigits(t,e){const n=!!(t===fL.decimal&&"number"==typeof e)&&this.isInvalidDecimalDigitsValue(e)
12079
- this.setConditionValue("invalidDecimalMaximumDigits",n)}validateNoMutuallyExclusiveProperties(t,e,n){const i=!!(t===fL.decimal)&&("number"==typeof e&&"number"==typeof n)
12077
+ return e||n?{numberTextFormat:mL.decimal,decimalDigits:t.decimalDigits,decimalMaximumDigits:t.decimalMaximumDigits,unitScale:t.unitScale??kL}:{numberTextFormat:mL.decimal,decimalDigits:ML.defaultDecimalDigits,decimalMaximumDigits:void 0,unitScale:t.unitScale??kL}}}ML.defaultDecimalDigits=2
12078
+ const $L=["invalidDecimalDigits","invalidDecimalMaximumDigits","decimalDigitsMutuallyExclusiveWithDecimalMaximumDigits","moreThanOneUnitSpecified"]
12079
+ class EL extends qF{constructor(){super($L)}validateDecimalDigits(t,e){const n=!!(t===mL.decimal&&"number"==typeof e)&&this.isInvalidDecimalDigitsValue(e)
12080
+ this.setConditionValue("invalidDecimalDigits",n)}validateDecimalMaximumDigits(t,e){const n=!!(t===mL.decimal&&"number"==typeof e)&&this.isInvalidDecimalDigitsValue(e)
12081
+ this.setConditionValue("invalidDecimalMaximumDigits",n)}validateNoMutuallyExclusiveProperties(t,e,n){const i=!!(t===mL.decimal)&&("number"==typeof e&&"number"==typeof n)
12080
12082
  this.setConditionValue("decimalDigitsMutuallyExclusiveWithDecimalMaximumDigits",i)}validateAtMostOneUnit(t){const e=t.length>1
12081
- this.setConditionValue("moreThanOneUnitSpecified",e)}isInvalidDecimalDigitsValue(t){return t<0||t>20}}class EL extends We{}t([C],EL.prototype,"resolvedUnitScale",void 0)
12082
- class DL extends(fN(pN)){constructor(){super(...arguments),this.langSubscriber={handleChange:()=>{this.updateColumnConfig()}},this.unitSubscriber={handleChange:()=>{this.updateColumnConfig()}}}connectedCallback(){super.connectedCallback(),Ga.subscribe(this.langSubscriber,this),this.updateColumnConfig()}disconnectedCallback(){super.disconnectedCallback(),Ga.unsubscribe(this.langSubscriber,this)}placeholderChanged(){this.updateColumnConfig()}getColumnInternalsOptions(){return{cellRecordFieldNames:["value"],cellViewTag:"nimble-table-column-number-text-cell-view",groupHeaderViewTag:"nimble-table-column-number-text-group-header-view",delegatedEvents:[],sortOperation:DR,validator:new $L}}updateUnitNotifier(){if(this.unitNotifier&&(this.unitNotifier.unsubscribe(this.unitSubscriber),this.unitNotifier=void 0),this.unit){const t=x.getNotifier(this.unit)
12083
- t.subscribe(this.unitSubscriber,"resolvedUnitScale"),this.unitNotifier=t}}formatChanged(){this.updateColumnConfig()}alignmentChanged(){this.updateColumnConfig()}decimalDigitsChanged(){this.updateColumnConfig()}decimalMaximumDigitsChanged(){this.updateColumnConfig()}unitElementsChanged(){this.updateUnit()}async updateUnit(){this.unit=void 0,this.unitElements&&(await BE(this.unitElements),this.unit=this.unitElements.find((t=>t instanceof EL))),this.updateUnitNotifier()}unitChanged(){this.updateColumnConfig()}updateColumnConfig(){const t=this.columnInternals.validator
12083
+ this.setConditionValue("moreThanOneUnitSpecified",e)}isInvalidDecimalDigitsValue(t){return t<0||t>20}}class DL extends We{}t([C],DL.prototype,"resolvedUnitScale",void 0)
12084
+ class AL extends(mN(fN)){constructor(){super(...arguments),this.langSubscriber={handleChange:()=>{this.updateColumnConfig()}},this.unitSubscriber={handleChange:()=>{this.updateColumnConfig()}}}connectedCallback(){super.connectedCallback(),Ga.subscribe(this.langSubscriber,this),this.updateColumnConfig()}disconnectedCallback(){super.disconnectedCallback(),Ga.unsubscribe(this.langSubscriber,this)}placeholderChanged(){this.updateColumnConfig()}getColumnInternalsOptions(){return{cellRecordFieldNames:["value"],cellViewTag:"nimble-table-column-number-text-cell-view",groupHeaderViewTag:"nimble-table-column-number-text-group-header-view",delegatedEvents:[],sortOperation:DR,validator:new EL}}updateUnitNotifier(){if(this.unitNotifier&&(this.unitNotifier.unsubscribe(this.unitSubscriber),this.unitNotifier=void 0),this.unit){const t=x.getNotifier(this.unit)
12085
+ t.subscribe(this.unitSubscriber,"resolvedUnitScale"),this.unitNotifier=t}}formatChanged(){this.updateColumnConfig()}alignmentChanged(){this.updateColumnConfig()}decimalDigitsChanged(){this.updateColumnConfig()}decimalMaximumDigitsChanged(){this.updateColumnConfig()}unitElementsChanged(){this.updateUnit()}async updateUnit(){this.unit=void 0,this.unitElements&&(await BE(this.unitElements),this.unit=this.unitElements.find((t=>t instanceof DL))),this.updateUnitNotifier()}unitChanged(){this.updateColumnConfig()}updateColumnConfig(){const t=this.columnInternals.validator
12084
12086
  if(t.validateDecimalDigits(this.format,this.decimalDigits),t.validateDecimalMaximumDigits(this.format,this.decimalMaximumDigits),t.validateNoMutuallyExclusiveProperties(this.format,this.decimalDigits,this.decimalMaximumDigits),t.validateAtMostOneUnit(this.unitElements??[]),t.isValid()){const t={formatter:this.createFormatter(),alignment:this.determineCellContentAlignment(),placeholder:this.placeholder}
12085
12087
  this.columnInternals.headerAlignment=t.alignment,this.columnInternals.columnConfig=t}else this.columnInternals.columnConfig=void 0}createFormatter(){const t=this.unit?.resolvedUnitScale
12086
- return new IL(Ga.getValueFor(this),{numberTextFormat:this.format??void 0,decimalDigits:this.decimalDigits??void 0,decimalMaximumDigits:this.decimalMaximumDigits??void 0,unitScale:t})}determineCellContentAlignment(){return this.alignment===mL?wR:this.alignment===gL?xR:this.format!==fL.decimal||"number"==typeof this.decimalMaximumDigits||this.unit?wR:xR}}t([ft],DL.prototype,"format",void 0),t([ft],DL.prototype,"alignment",void 0),t([ft({attribute:"decimal-digits",converter:ut})],DL.prototype,"decimalDigits",void 0),t([ft({attribute:"decimal-maximum-digits",converter:ut})],DL.prototype,"decimalMaximumDigits",void 0),t([C],DL.prototype,"unitElements",void 0),t([C],DL.prototype,"unit",void 0)
12087
- const AL=DL.compose({baseName:"table-column-number-text",template:hL,styles:GF})
12088
- _i.getOrCreate().withPrefix("nimble").register(AL())
12089
- const TL=class extends yN{updateText(){this.text="string"==typeof this.cellRecord?.value?this.cellRecord.value:""}}.compose({baseName:"table-column-text-cell-view",template:vN,styles:bN})
12088
+ return new ML(Ga.getValueFor(this),{numberTextFormat:this.format??void 0,decimalDigits:this.decimalDigits??void 0,decimalMaximumDigits:this.decimalMaximumDigits??void 0,unitScale:t})}determineCellContentAlignment(){return this.alignment===gL?wR:this.alignment===vL?xR:this.format!==mL.decimal||"number"==typeof this.decimalMaximumDigits||this.unit?wR:xR}}t([ft],AL.prototype,"format",void 0),t([ft],AL.prototype,"alignment",void 0),t([ft({attribute:"decimal-digits",converter:ut})],AL.prototype,"decimalDigits",void 0),t([ft({attribute:"decimal-maximum-digits",converter:ut})],AL.prototype,"decimalMaximumDigits",void 0),t([C],AL.prototype,"unitElements",void 0),t([C],AL.prototype,"unit",void 0)
12089
+ const TL=AL.compose({baseName:"table-column-number-text",template:uL,styles:ZF})
12090
12090
  _i.getOrCreate().withPrefix("nimble").register(TL())
12091
- const OL=["invalidCustomSortWithGrouping"]
12092
- class RL extends UF{constructor(){super(OL)}}class FL extends(lN(fN(pN))){constructor(){super(...arguments),this.defaultSortOperation=AR}placeholderChanged(){this.columnInternals.columnConfig={placeholder:this.placeholder}}handleSortConfigurationChange(){this.updateColumnInternalsSortConfiguration()}getColumnInternalsOptions(){return{cellRecordFieldNames:["value"],cellViewTag:"nimble-table-column-text-cell-view",groupHeaderViewTag:rN,delegatedEvents:[],sortOperation:this.getResolvedSortOperation(this.defaultSortOperation),validator:new RL}}fieldNameChanged(){this.columnInternals.dataRecordFieldNames=[this.fieldName],this.updateColumnInternalsSortConfiguration()}updateColumnInternalsSortConfiguration(){this.columnInternals.operandDataRecordFieldName=this.getResolvedOperandDataRecordFieldName(this.fieldName),this.columnInternals.sortOperation=this.getResolvedSortOperation(this.defaultSortOperation)}}const NL=FL.compose({baseName:"table-column-text",template:ZF,styles:GF})
12093
- _i.getOrCreate().withPrefix("nimble").register(NL())
12094
- const LL=Mt`
12091
+ const OL=class extends wN{updateText(){this.text="string"==typeof this.cellRecord?.value?this.cellRecord.value:""}}.compose({baseName:"table-column-text-cell-view",template:bN,styles:yN})
12092
+ _i.getOrCreate().withPrefix("nimble").register(OL())
12093
+ const RL=["invalidCustomSortWithGrouping"]
12094
+ class FL extends qF{constructor(){super(RL)}}class NL extends(cN(mN(fN))){constructor(){super(...arguments),this.defaultSortOperation=AR}placeholderChanged(){this.columnInternals.columnConfig={placeholder:this.placeholder}}handleSortConfigurationChange(){this.updateColumnInternalsSortConfiguration()}getColumnInternalsOptions(){return{cellRecordFieldNames:["value"],cellViewTag:"nimble-table-column-text-cell-view",groupHeaderViewTag:aN,delegatedEvents:[],sortOperation:this.getResolvedSortOperation(this.defaultSortOperation),validator:new FL}}fieldNameChanged(){this.columnInternals.dataRecordFieldNames=[this.fieldName],this.updateColumnInternalsSortConfiguration()}updateColumnInternalsSortConfiguration(){this.columnInternals.operandDataRecordFieldName=this.getResolvedOperandDataRecordFieldName(this.fieldName),this.columnInternals.sortOperation=this.getResolvedSortOperation(this.defaultSortOperation)}}const LL=NL.compose({baseName:"table-column-text",template:KF,styles:ZF})
12095
+ _i.getOrCreate().withPrefix("nimble").register(LL())
12096
+ const BL=Mt`
12095
12097
  ${Vs("grid")}
12096
12098
 
12097
12099
  :host {
@@ -12118,7 +12120,7 @@ const LL=Mt`
12118
12120
  overflow: auto;
12119
12121
  }
12120
12122
  `
12121
- const BL=class extends us{constructor(){super(),this.activeindicator=!1}}.compose({baseName:"tabs",baseClass:us,template:(t,e)=>Q`
12123
+ const PL=class extends us{constructor(){super(),this.activeindicator=!1}}.compose({baseName:"tabs",baseClass:us,template:(t,e)=>Q`
12122
12124
  <template class="${t=>t.orientation}">
12123
12125
  ${le(0,e)}
12124
12126
  <div class="tablist" part="tablist" role="tablist">
@@ -12137,9 +12139,9 @@ const BL=class extends us{constructor(){super(),this.activeindicator=!1}}.compos
12137
12139
  <slot name="tabpanel" ${ie("tabpanels")}></slot>
12138
12140
  </div>
12139
12141
  </template>
12140
- `,styles:LL})
12141
- _i.getOrCreate().withPrefix("nimble").register(BL())
12142
- const PL=Mt`
12142
+ `,styles:BL})
12143
+ _i.getOrCreate().withPrefix("nimble").register(PL())
12144
+ const zL=Mt`
12143
12145
  ${Vs("flex")}
12144
12146
 
12145
12147
  :host {
@@ -12156,15 +12158,15 @@ const PL=Mt`
12156
12158
  rgba(${rl}, 0.3);
12157
12159
  margin: ${Sl} ${_l};
12158
12160
  }
12159
- `,zL=Q`
12161
+ `,VL=Q`
12160
12162
  <template slot="end">
12161
12163
  <div class="separator"></div>
12162
12164
  <slot></slot>
12163
12165
  </template>
12164
12166
  `
12165
- const VL=class extends We{}.compose({baseName:"tabs-toolbar",template:zL,styles:PL})
12166
- _i.getOrCreate().withPrefix("nimble").register(VL())
12167
- const HL="outline",UL="block",qL=Mt`
12167
+ const HL=class extends We{}.compose({baseName:"tabs-toolbar",template:VL,styles:zL})
12168
+ _i.getOrCreate().withPrefix("nimble").register(HL())
12169
+ const UL="outline",qL="block",jL=Mt`
12168
12170
  ${Vs("inline-flex")}
12169
12171
  ${Mg}
12170
12172
 
@@ -12303,12 +12305,12 @@ const HL="outline",UL="block",qL=Mt`
12303
12305
  top: ${_l};
12304
12306
  right: var(--ni-private-scrollbar-width);
12305
12307
  }
12306
- `.withBehaviors(ch(HL,Mt`
12308
+ `.withBehaviors(ch(UL,Mt`
12307
12309
  .control {
12308
12310
  border-color: rgba(${rl}, 0.3);
12309
12311
  background-color: transparent;
12310
12312
  }
12311
- `),ch(UL,Mt`
12313
+ `),ch(qL,Mt`
12312
12314
  .control {
12313
12315
  background-color: rgba(${rl}, 0.1);
12314
12316
  }
@@ -12326,8 +12328,8 @@ const HL="outline",UL="block",qL=Mt`
12326
12328
  border-bottom-color: ${al};
12327
12329
  }
12328
12330
  `))
12329
- class jL extends gs{constructor(){super(...arguments),this.appearance=HL,this.errorVisible=!1,this.scrollbarWidth=-1,this.updateScrollbarWidthQueued=!1}connectedCallback(){super.connectedCallback(),this.resizeObserver=new ResizeObserver((()=>this.onResize())),this.resizeObserver.observe(this)}disconnectedCallback(){super.disconnectedCallback(),this.resizeObserver?.disconnect()}onTextAreaInput(){this.handleTextInput(),this.queueUpdateScrollbarWidth()}placeholderChanged(){this.queueUpdateScrollbarWidth()}valueChanged(t,e){super.valueChanged(t,e),this.queueUpdateScrollbarWidth()}onResize(){this.scrollbarWidth=this.control.offsetWidth-this.control.clientWidth}queueUpdateScrollbarWidth(){this.$fastController.isConnected&&(this.updateScrollbarWidthQueued||(this.updateScrollbarWidthQueued=!0,b.queueUpdate((()=>this.updateScrollbarWidth()))))}updateScrollbarWidth(){this.updateScrollbarWidthQueued=!1,this.scrollbarWidth=this.control.offsetWidth-this.control.clientWidth}}t([ft],jL.prototype,"appearance",void 0),t([ft({attribute:"error-text"})],jL.prototype,"errorText",void 0),t([ft({attribute:"error-visible",mode:"boolean"})],jL.prototype,"errorVisible",void 0),t([C],jL.prototype,"scrollbarWidth",void 0)
12330
- const WL=jL.compose({baseName:"text-area",baseClass:gs,template:()=>Q`
12331
+ class WL extends gs{constructor(){super(...arguments),this.appearance=UL,this.errorVisible=!1,this.scrollbarWidth=-1,this.updateScrollbarWidthQueued=!1}connectedCallback(){super.connectedCallback(),this.resizeObserver=new ResizeObserver((()=>this.onResize())),this.resizeObserver.observe(this)}disconnectedCallback(){super.disconnectedCallback(),this.resizeObserver?.disconnect()}onTextAreaInput(){this.handleTextInput(),this.queueUpdateScrollbarWidth()}placeholderChanged(){this.queueUpdateScrollbarWidth()}valueChanged(t,e){super.valueChanged(t,e),this.queueUpdateScrollbarWidth()}onResize(){this.scrollbarWidth=this.control.offsetWidth-this.control.clientWidth}queueUpdateScrollbarWidth(){this.$fastController.isConnected&&(this.updateScrollbarWidthQueued||(this.updateScrollbarWidthQueued=!0,b.queueUpdate((()=>this.updateScrollbarWidth()))))}updateScrollbarWidth(){this.updateScrollbarWidthQueued=!1,this.scrollbarWidth=this.control.offsetWidth-this.control.clientWidth}}t([ft],WL.prototype,"appearance",void 0),t([ft({attribute:"error-text"})],WL.prototype,"errorText",void 0),t([ft({attribute:"error-visible",mode:"boolean"})],WL.prototype,"errorVisible",void 0),t([C],WL.prototype,"scrollbarWidth",void 0)
12332
+ const GL=WL.compose({baseName:"text-area",baseClass:gs,template:()=>Q`
12331
12333
  <label
12332
12334
  part="label"
12333
12335
  for="control"
@@ -12384,9 +12386,9 @@ const WL=jL.compose({baseName:"text-area",baseClass:gs,template:()=>Q`
12384
12386
  ></${Em}>
12385
12387
  ${wg}
12386
12388
  </div>
12387
- `,styles:qL,shadowOptions:{delegatesFocus:!0}})
12388
- _i.getOrCreate().withPrefix("nimble").register(WL())
12389
- const GL="underline",ZL="outline",KL="block",YL="frameless",XL=Mt`
12389
+ `,styles:jL,shadowOptions:{delegatesFocus:!0}})
12390
+ _i.getOrCreate().withPrefix("nimble").register(GL())
12391
+ const ZL="underline",KL="outline",YL="block",XL="frameless",JL=Mt`
12390
12392
  ${Vs("inline-block")}
12391
12393
  ${Mg}
12392
12394
 
@@ -12561,12 +12563,12 @@ const GL="underline",ZL="outline",KL="block",YL="frameless",XL=Mt`
12561
12563
  slot[name='actions']::slotted(*) {
12562
12564
  ${Cl.cssCustomProperty}: 24px;
12563
12565
  }
12564
- `.withBehaviors(ch(GL,Mt`
12566
+ `.withBehaviors(ch(ZL,Mt`
12565
12567
  .root {
12566
12568
  border-bottom-width: ${$l};
12567
12569
  padding-bottom: 0;
12568
12570
  }
12569
- `),ch(KL,Mt`
12571
+ `),ch(YL,Mt`
12570
12572
  .root {
12571
12573
  background-color: rgba(${rl}, 0.1);
12572
12574
  }
@@ -12594,12 +12596,12 @@ const GL="underline",ZL="outline",KL="block",YL="frameless",XL=Mt`
12594
12596
  :host([disabled]) .root {
12595
12597
  background-color: rgba(${rl}, 0.07);
12596
12598
  }
12597
- `),ch(ZL,Mt`
12599
+ `),ch(KL,Mt`
12598
12600
  .root {
12599
12601
  border-width: ${$l};
12600
12602
  padding: 0;
12601
12603
  }
12602
- `),ch(YL,Mt`
12604
+ `),ch(XL,Mt`
12603
12605
  .control {
12604
12606
  padding-left: ${$l};
12605
12607
  padding-right: ${$l};
@@ -12617,8 +12619,8 @@ const GL="underline",ZL="outline",KL="block",YL="frameless",XL=Mt`
12617
12619
  filter: invert(100%);
12618
12620
  }
12619
12621
  `))
12620
- class JL extends ji{constructor(){super(...arguments),this.appearance=GL,this.errorVisible=!1,this.fullBleed=!1}}t([ft],JL.prototype,"appearance",void 0),t([ft({attribute:"error-text"})],JL.prototype,"errorText",void 0),t([ft({attribute:"error-visible",mode:"boolean"})],JL.prototype,"errorVisible",void 0),t([ft({attribute:"full-bleed",mode:"boolean"})],JL.prototype,"fullBleed",void 0)
12621
- const QL=JL.compose({baseName:"text-field",baseClass:ji,template:(t,e)=>Q`
12622
+ class QL extends ji{constructor(){super(...arguments),this.appearance=ZL,this.errorVisible=!1,this.fullBleed=!1}}t([ft],QL.prototype,"appearance",void 0),t([ft({attribute:"error-text"})],QL.prototype,"errorText",void 0),t([ft({attribute:"error-visible",mode:"boolean"})],QL.prototype,"errorVisible",void 0),t([ft({attribute:"full-bleed",mode:"boolean"})],QL.prototype,"fullBleed",void 0)
12623
+ const tB=QL.compose({baseName:"text-field",baseClass:ji,template:(t,e)=>Q`
12622
12624
  <template
12623
12625
  class="
12624
12626
  ${t=>t.readOnly?"readonly":""}
@@ -12678,7 +12680,7 @@ const QL=JL.compose({baseName:"text-field",baseClass:ji,template:(t,e)=>Q`
12678
12680
  ${ae(0,e)}
12679
12681
  </div>
12680
12682
  </template>
12681
- `,styles:XL,shadowOptions:{delegatesFocus:!0},end:Q`
12683
+ `,styles:JL,shadowOptions:{delegatesFocus:!0},end:Q`
12682
12684
  <${Em}
12683
12685
  severity="error"
12684
12686
  class="error-icon"
@@ -12688,8 +12690,8 @@ const QL=JL.compose({baseName:"text-field",baseClass:ji,template:(t,e)=>Q`
12688
12690
  </span>
12689
12691
  ${wg}
12690
12692
  `})
12691
- _i.getOrCreate().withPrefix("nimble").register(QL())
12692
- const tB=Mt`
12693
+ _i.getOrCreate().withPrefix("nimble").register(tB())
12694
+ const eB=Mt`
12693
12695
  ${Vs("inline-flex")}
12694
12696
 
12695
12697
  :host {
@@ -12773,7 +12775,7 @@ const tB=Mt`
12773
12775
  .status-icon {
12774
12776
  opacity: 0.6;
12775
12777
  }
12776
- `)),eB=Q`
12778
+ `)),nB=Q`
12777
12779
  ${Gt((t=>t.tooltipVisible),Q`
12778
12780
  <${Oh}
12779
12781
  class="anchored-region"
@@ -12806,11 +12808,11 @@ const tB=Mt`
12806
12808
  </${Oh}>
12807
12809
  `)}
12808
12810
  `
12809
- class nB extends Rs{constructor(){super(...arguments),this.iconVisible=!1}}t([ft],nB.prototype,"severity",void 0),t([ft({attribute:"icon-visible",mode:"boolean"})],nB.prototype,"iconVisible",void 0)
12810
- const iB=nB.compose({baseName:"tooltip",baseClass:Rs,template:eB,styles:tB})
12811
- _i.getOrCreate().withPrefix("nimble").register(iB())
12812
- const sB="group-selected",oB="all",rB="leaves-only",aB="none"
12813
- class lB{constructor(t,e,n){this.ltr=t,this.rtl=e,this.source=n,this.attached=null}handleChange({target:t,token:e}){this.attach(e.getValueFor(t))}attach(t){this.attached!==this[t]&&(null!==this.attached&&this.source.$fastController.removeStyles(this.attached),this.attached=this[t],null!==this.attached&&this.source.$fastController.addStyles(this.attached))}}const cB=Mt`
12811
+ class iB extends Rs{constructor(){super(...arguments),this.iconVisible=!1}}t([ft],iB.prototype,"severity",void 0),t([ft({attribute:"icon-visible",mode:"boolean"})],iB.prototype,"iconVisible",void 0)
12812
+ const sB=iB.compose({baseName:"tooltip",baseClass:Rs,template:nB,styles:eB})
12813
+ _i.getOrCreate().withPrefix("nimble").register(sB())
12814
+ const oB="group-selected",rB="all",aB="leaves-only",lB="none"
12815
+ class cB{constructor(t,e,n){this.ltr=t,this.rtl=e,this.source=n,this.attached=null}handleChange({target:t,token:e}){this.attach(e.getValueFor(t))}attach(t){this.attached!==this[t]&&(null!==this.attached&&this.source.$fastController.removeStyles(this.attached),this.attached=this[t],null!==this.attached&&this.source.$fastController.addStyles(this.attached))}}const dB=Mt`
12814
12816
  ${Vs("block")}
12815
12817
 
12816
12818
  :host {
@@ -12831,7 +12833,7 @@ class lB{constructor(t,e,n){this.ltr=t,this.rtl=e,this.source=n,this.attached=nu
12831
12833
  }
12832
12834
 
12833
12835
  ${""}
12834
- :host([${sB}])::after {
12836
+ :host([${oB}])::after {
12835
12837
  background: ${hl};
12836
12838
  border-radius: 0px;
12837
12839
  content: '';
@@ -12852,7 +12854,7 @@ class lB{constructor(t,e,n){this.ltr=t,this.rtl=e,this.source=n,this.attached=nu
12852
12854
  background: ${sl};
12853
12855
  }
12854
12856
 
12855
- :host([${sB}]) .positioning-region:hover {
12857
+ :host([${oB}]) .positioning-region:hover {
12856
12858
  background: ${il};
12857
12859
  }
12858
12860
 
@@ -12958,7 +12960,7 @@ class lB{constructor(t,e,n){this.ltr=t,this.rtl=e,this.source=n,this.attached=nu
12958
12960
  display: block;
12959
12961
  }
12960
12962
  `.withBehaviors(new class{constructor(t,e){this.cache=new WeakMap,this.ltr=t,this.rtl=e}bind(t){this.attach(t)}unbind(t){const e=this.cache.get(t)
12961
- e&&Za.unsubscribe(e)}attach(t){const e=this.cache.get(t)||new lB(this.ltr,this.rtl,t),n=Za.getValueFor(t)
12963
+ e&&Za.unsubscribe(e)}attach(t){const e=this.cache.get(t)||new cB(this.ltr,this.rtl,t),n=Za.getValueFor(t)
12962
12964
  Za.subscribe(e),e.attach(n),this.cache.set(t,e)}}(Mt`
12963
12965
  .expand-collapse-button {
12964
12966
  left: var(
@@ -12990,8 +12992,8 @@ Za.subscribe(e),e.attach(n),this.cache.set(t,e)}}(Mt`
12990
12992
  transform: rotate(135deg);
12991
12993
  }
12992
12994
  `))
12993
- class dB extends Ns{constructor(){super(...arguments),this.groupSelected=!1}}t([ft({attribute:"group-selected",mode:"boolean"})],dB.prototype,"groupSelected",void 0)
12994
- const hB=dB.compose({baseName:"tree-item",baseClass:Ns,template:(t,e)=>Q`
12995
+ class hB extends Ns{constructor(){super(...arguments),this.groupSelected=!1}}t([ft({attribute:"group-selected",mode:"boolean"})],hB.prototype,"groupSelected",void 0)
12996
+ const uB=hB.compose({baseName:"tree-item",baseClass:Ns,template:(t,e)=>Q`
12995
12997
  <template
12996
12998
  role="treeitem"
12997
12999
  slot="${t=>t.isNestedItem()?"item":void 0}"
@@ -13031,9 +13033,9 @@ const hB=dB.compose({baseName:"tree-item",baseClass:Ns,template:(t,e)=>Q`
13031
13033
  </div>
13032
13034
  `)}
13033
13035
  </template>
13034
- `,styles:cB,expandCollapseGlyph:Kh.data})
13035
- _i.getOrCreate().withPrefix("nimble").register(hB())
13036
- const uB=Mt`
13036
+ `,styles:dB,expandCollapseGlyph:Kh.data})
13037
+ _i.getOrCreate().withPrefix("nimble").register(uB())
13038
+ const pB=Mt`
13037
13039
  ${Vs("flex")}
13038
13040
 
13039
13041
  :host {
@@ -13045,7 +13047,7 @@ const uB=Mt`
13045
13047
  :host(${Hs}) {
13046
13048
  outline: none;
13047
13049
  }
13048
- `,pB=Q`
13050
+ `,fB=Q`
13049
13051
  <template
13050
13052
  role="tree"
13051
13053
  ${Ut("treeView")}
@@ -13059,248 +13061,248 @@ const uB=Mt`
13059
13061
  <slot ${ie("slottedTreeItems")}></slot>
13060
13062
  </template>
13061
13063
  `
13062
- class fB extends Ls{constructor(){super(...arguments),this.selectionMode=oB,this.selectedItems=[]}handleClick(t){if(t.defaultPrevented)return!1
13064
+ class mB extends Ls{constructor(){super(...arguments),this.selectionMode=rB,this.selectedItems=[]}handleClick(t){if(t.defaultPrevented)return!1
13063
13065
  if(!(t.target instanceof Element&&Fs(t.target)))return!0
13064
13066
  const e=t.target
13065
- return!e.disabled&&(this.canSelect(e)?e.selected=!0:this.itemHasChildren(e)&&(e.expanded=!e.expanded),!0)}canSelect(t){switch(this.selectionMode){case oB:return!0
13066
- case aB:return!1
13067
- case rB:return!this.itemHasChildren(t)
13068
- default:return!0}}itemHasChildren(t){return null!==t.querySelector('[role="treeitem"]')}selectedItemsChanged(){for(const t of Array.from(this.children))t instanceof dB&&(t.groupSelected=!1)
13067
+ return!e.disabled&&(this.canSelect(e)?e.selected=!0:this.itemHasChildren(e)&&(e.expanded=!e.expanded),!0)}canSelect(t){switch(this.selectionMode){case rB:return!0
13068
+ case lB:return!1
13069
+ case aB:return!this.itemHasChildren(t)
13070
+ default:return!0}}itemHasChildren(t){return null!==t.querySelector('[role="treeitem"]')}selectedItemsChanged(){for(const t of Array.from(this.children))t instanceof hB&&(t.groupSelected=!1)
13069
13071
  for(let t of this.selectedItems){for(;null!==t.parentElement&&t.parentElement!==this;)t=t.parentElement
13070
- t instanceof dB&&(t.groupSelected=!0)}}}t([ft({attribute:"selection-mode"})],fB.prototype,"selectionMode",void 0),t([C],fB.prototype,"selectedItems",void 0)
13071
- const mB=fB.compose({baseName:"tree-view",baseClass:Ls,template:pB,styles:uB})
13072
- _i.getOrCreate().withPrefix("nimble").register(mB())
13073
- const gB=Q`<template slot="unit"></template>`
13074
- class vB{constructor(t,e,n){this.singular=t,this.plural=e,this.symbol=n}}class bB extends bL{constructor(t,{unitTranslations:e,scaledPrefixText:n}){if(super(t),!e.get("en"))throw new Error('English translations must exist with locale string "en"')
13075
- this.pluralRules=new Intl.PluralRules(this.locale),this.formatter=new Intl.NumberFormat(this.locale,this.intlNumberFormatOptions),this.unitTranslation=this.getTranslationToUse(e,this.locale),this.scaledPrefixText=n}static createFactory(t){return e=>new bB(e,t)}format(t){const e=this.formatter.format(t)
13072
+ t instanceof hB&&(t.groupSelected=!0)}}}t([ft({attribute:"selection-mode"})],mB.prototype,"selectionMode",void 0),t([C],mB.prototype,"selectedItems",void 0)
13073
+ const gB=mB.compose({baseName:"tree-view",baseClass:Ls,template:fB,styles:pB})
13074
+ _i.getOrCreate().withPrefix("nimble").register(gB())
13075
+ const vB=Q`<template slot="unit"></template>`
13076
+ class bB{constructor(t,e,n){this.singular=t,this.plural=e,this.symbol=n}}class yB extends yL{constructor(t,{unitTranslations:e,scaledPrefixText:n}){if(super(t),!e.get("en"))throw new Error('English translations must exist with locale string "en"')
13077
+ this.pluralRules=new Intl.PluralRules(this.locale),this.formatter=new Intl.NumberFormat(this.locale,this.intlNumberFormatOptions),this.unitTranslation=this.getTranslationToUse(e,this.locale),this.scaledPrefixText=n}static createFactory(t){return e=>new yB(e,t)}format(t){const e=this.formatter.format(t)
13076
13078
  if(""!==this.scaledPrefixText)return`${e} ${this.scaledPrefixText}${this.unitTranslation.symbol}`
13077
13079
  return`${e} ${"one"===this.pluralRules.select(t)?this.unitTranslation.singular:this.unitTranslation.plural}`}getTranslationToUse(t,e){const n=new Intl.Locale(e??"en"),i=n.language,s=n.region
13078
- return(s?t.get(`${i}-${s}`):void 0)??t.get(i)??t.get("en")}}const yB=new Map([["en",new vB("byte","bytes","B")],["fr",new vB("octet","octets","o")],["de",new vB("Byte","Byte","B")],["ja",new vB("バイト","バイト","B")],["zh",new vB("字节","字节","B")]]),wB=[[1,""],[1024,"Ki"],[1048576,"Mi"],[1024**3,"Gi"],[1024**4,"Ti"],[1024**5,"Pi"]]
13079
- const xB=new class extends xL{constructor(){super(wB.map((([t,e])=>new wL(t,bB.createFactory({unitTranslations:yB,scaledPrefixText:e})))))}},CB=[[1,"byte","long"],[1e3,"kilobyte","short"],[1e6,"megabyte","short"],[1e3**3,"gigabyte","short"],[1e3**4,"terabyte","short"],[1e3**5,"petabyte","short"]]
13080
- const kB=new class extends xL{constructor(){super(CB.map((([t,e,n])=>new wL(t,yL.createFactory({style:"unit",unit:e,unitDisplay:n})))))}},SB=Mt`
13080
+ return(s?t.get(`${i}-${s}`):void 0)??t.get(i)??t.get("en")}}const wB=new Map([["en",new bB("byte","bytes","B")],["fr",new bB("octet","octets","o")],["de",new bB("Byte","Byte","B")],["ja",new bB("バイト","バイト","B")],["zh",new bB("字节","字节","B")]]),xB=[[1,""],[1024,"Ki"],[1048576,"Mi"],[1024**3,"Gi"],[1024**4,"Ti"],[1024**5,"Pi"]]
13081
+ const CB=new class extends CL{constructor(){super(xB.map((([t,e])=>new xL(t,yB.createFactory({unitTranslations:wB,scaledPrefixText:e})))))}},kB=[[1,"byte","long"],[1e3,"kilobyte","short"],[1e6,"megabyte","short"],[1e3**3,"gigabyte","short"],[1e3**4,"terabyte","short"],[1e3**5,"petabyte","short"]]
13082
+ const SB=new class extends CL{constructor(){super(kB.map((([t,e,n])=>new xL(t,wL.createFactory({style:"unit",unit:e,unitDisplay:n})))))}},_B=Mt`
13081
13083
  ${Vs("none")}
13082
13084
  `
13083
- class _B extends EL{constructor(){super(),this.binary=!1,this.resolvedUnitScale=kB}binaryChanged(){this.resolvedUnitScale=this.binary?xB:kB}}t([ft({mode:"boolean"})],_B.prototype,"binary",void 0)
13084
- const IB=_B.compose({baseName:"unit-byte",template:gB,styles:SB})
13085
- _i.getOrCreate().withPrefix("nimble").register(IB())
13086
- const MB=[[1e-15,"f"],[1e-12,"p"],[1e-9,"n"],[10**-6,"μ"],[.001,"m"],[.01,"c"],[.1,"d"],[1,""],[1e3,"k"],[10**6,"M"],[10**9,"G"],[10**12,"T"],[10**15,"P"],[10**18,"E"]],$B=new Map([["en",new vB("volt","volts","V")],["fr",new vB("volt","volts","V")],["de",new vB("Volt","Volt","V")],["ja",new vB("ボルト","ボルト","V")],["zh",new vB("伏特","伏特","V")]])
13087
- const EB=new class extends xL{constructor(){super(MB.map((([t,e])=>new wL(t,bB.createFactory({unitTranslations:$B,scaledPrefixText:e})))))}}
13088
- const DB=class extends EL{constructor(){super(),this.resolvedUnitScale=EB}}.compose({baseName:"unit-volt",template:gB,styles:SB})
13089
- _i.getOrCreate().withPrefix("nimble").register(DB())
13090
- var AB={value:()=>{}}
13091
- function TB(){for(var t,e=0,n=arguments.length,i={};e<n;++e){if(!(t=arguments[e]+"")||t in i||/[\s.]/.test(t))throw new Error("illegal type: "+t)
13092
- i[t]=[]}return new OB(i)}function OB(t){this._=t}function RB(t,e){for(var n,i=0,s=t.length;i<s;++i)if((n=t[i]).name===e)return n.value}function FB(t,e,n){for(var i=0,s=t.length;i<s;++i)if(t[i].name===e){t[i]=AB,t=t.slice(0,i).concat(t.slice(i+1))
13093
- break}return null!=n&&t.push({name:e,value:n}),t}OB.prototype=TB.prototype={constructor:OB,on:function(t,e){var n,i,s=this._,o=(i=s,(t+"").trim().split(/^|\s+/).map((function(t){var e="",n=t.indexOf(".")
13085
+ class IB extends DL{constructor(){super(),this.binary=!1,this.resolvedUnitScale=SB}binaryChanged(){this.resolvedUnitScale=this.binary?CB:SB}}t([ft({mode:"boolean"})],IB.prototype,"binary",void 0)
13086
+ const MB=IB.compose({baseName:"unit-byte",template:vB,styles:_B})
13087
+ _i.getOrCreate().withPrefix("nimble").register(MB())
13088
+ const $B=[[1e-15,"f"],[1e-12,"p"],[1e-9,"n"],[10**-6,"μ"],[.001,"m"],[.01,"c"],[.1,"d"],[1,""],[1e3,"k"],[10**6,"M"],[10**9,"G"],[10**12,"T"],[10**15,"P"],[10**18,"E"]],EB=new Map([["en",new bB("volt","volts","V")],["fr",new bB("volt","volts","V")],["de",new bB("Volt","Volt","V")],["ja",new bB("ボルト","ボルト","V")],["zh",new bB("伏特","伏特","V")]])
13089
+ const DB=new class extends CL{constructor(){super($B.map((([t,e])=>new xL(t,yB.createFactory({unitTranslations:EB,scaledPrefixText:e})))))}}
13090
+ const AB=class extends DL{constructor(){super(),this.resolvedUnitScale=DB}}.compose({baseName:"unit-volt",template:vB,styles:_B})
13091
+ _i.getOrCreate().withPrefix("nimble").register(AB())
13092
+ var TB={value:()=>{}}
13093
+ function OB(){for(var t,e=0,n=arguments.length,i={};e<n;++e){if(!(t=arguments[e]+"")||t in i||/[\s.]/.test(t))throw new Error("illegal type: "+t)
13094
+ i[t]=[]}return new RB(i)}function RB(t){this._=t}function FB(t,e){for(var n,i=0,s=t.length;i<s;++i)if((n=t[i]).name===e)return n.value}function NB(t,e,n){for(var i=0,s=t.length;i<s;++i)if(t[i].name===e){t[i]=TB,t=t.slice(0,i).concat(t.slice(i+1))
13095
+ break}return null!=n&&t.push({name:e,value:n}),t}RB.prototype=OB.prototype={constructor:RB,on:function(t,e){var n,i,s=this._,o=(i=s,(t+"").trim().split(/^|\s+/).map((function(t){var e="",n=t.indexOf(".")
13094
13096
  if(n>=0&&(e=t.slice(n+1),t=t.slice(0,n)),t&&!i.hasOwnProperty(t))throw new Error("unknown type: "+t)
13095
13097
  return{type:t,name:e}}))),r=-1,a=o.length
13096
13098
  if(!(arguments.length<2)){if(null!=e&&"function"!=typeof e)throw new Error("invalid callback: "+e)
13097
- for(;++r<a;)if(n=(t=o[r]).type)s[n]=FB(s[n],t.name,e)
13098
- else if(null==e)for(n in s)s[n]=FB(s[n],t.name,null)
13099
- return this}for(;++r<a;)if((n=(t=o[r]).type)&&(n=RB(s[n],t.name)))return n},copy:function(){var t={},e=this._
13099
+ for(;++r<a;)if(n=(t=o[r]).type)s[n]=NB(s[n],t.name,e)
13100
+ else if(null==e)for(n in s)s[n]=NB(s[n],t.name,null)
13101
+ return this}for(;++r<a;)if((n=(t=o[r]).type)&&(n=FB(s[n],t.name)))return n},copy:function(){var t={},e=this._
13100
13102
  for(var n in e)t[n]=e[n].slice()
13101
- return new OB(t)},call:function(t,e){if((n=arguments.length-2)>0)for(var n,i,s=new Array(n),o=0;o<n;++o)s[o]=arguments[o+2]
13103
+ return new RB(t)},call:function(t,e){if((n=arguments.length-2)>0)for(var n,i,s=new Array(n),o=0;o<n;++o)s[o]=arguments[o+2]
13102
13104
  if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t)
13103
13105
  for(o=0,n=(i=this._[t]).length;o<n;++o)i[o].value.apply(e,s)},apply:function(t,e,n){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t)
13104
13106
  for(var i=this._[t],s=0,o=i.length;s<o;++s)i[s].value.apply(e,n)}}
13105
- var NB="http://www.w3.org/1999/xhtml",LB={svg:"http://www.w3.org/2000/svg",xhtml:NB,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"}
13106
- function BB(t){var e=t+="",n=e.indexOf(":")
13107
- return n>=0&&"xmlns"!==(e=t.slice(0,n))&&(t=t.slice(n+1)),LB.hasOwnProperty(e)?{space:LB[e],local:t}:t}function PB(t){return function(){var e=this.ownerDocument,n=this.namespaceURI
13108
- return n===NB&&e.documentElement.namespaceURI===NB?e.createElement(t):e.createElementNS(n,t)}}function zB(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function VB(t){var e=BB(t)
13109
- return(e.local?zB:PB)(e)}function HB(){}function UB(t){return null==t?HB:function(){return this.querySelector(t)}}function qB(){return[]}function jB(t){return null==t?qB:function(){return this.querySelectorAll(t)}}function WB(t){return function(){return null==(e=t.apply(this,arguments))?[]:Array.isArray(e)?e:Array.from(e)
13110
- var e}}function GB(t){return function(){return this.matches(t)}}function ZB(t){return function(e){return e.matches(t)}}var KB=Array.prototype.find
13111
- function YB(){return this.firstElementChild}var XB=Array.prototype.filter
13112
- function JB(){return Array.from(this.children)}function QB(t){return new Array(t.length)}function tP(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}function eP(t,e,n,i,s,o){for(var r,a=0,l=e.length,c=o.length;a<c;++a)(r=e[a])?(r.__data__=o[a],i[a]=r):n[a]=new tP(t,o[a])
13113
- for(;a<l;++a)(r=e[a])&&(s[a]=r)}function nP(t,e,n,i,s,o,r){var a,l,c,d=new Map,h=e.length,u=o.length,p=new Array(h)
13107
+ var LB="http://www.w3.org/1999/xhtml",BB={svg:"http://www.w3.org/2000/svg",xhtml:LB,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"}
13108
+ function PB(t){var e=t+="",n=e.indexOf(":")
13109
+ return n>=0&&"xmlns"!==(e=t.slice(0,n))&&(t=t.slice(n+1)),BB.hasOwnProperty(e)?{space:BB[e],local:t}:t}function zB(t){return function(){var e=this.ownerDocument,n=this.namespaceURI
13110
+ return n===LB&&e.documentElement.namespaceURI===LB?e.createElement(t):e.createElementNS(n,t)}}function VB(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function HB(t){var e=PB(t)
13111
+ return(e.local?VB:zB)(e)}function UB(){}function qB(t){return null==t?UB:function(){return this.querySelector(t)}}function jB(){return[]}function WB(t){return null==t?jB:function(){return this.querySelectorAll(t)}}function GB(t){return function(){return null==(e=t.apply(this,arguments))?[]:Array.isArray(e)?e:Array.from(e)
13112
+ var e}}function ZB(t){return function(){return this.matches(t)}}function KB(t){return function(e){return e.matches(t)}}var YB=Array.prototype.find
13113
+ function XB(){return this.firstElementChild}var JB=Array.prototype.filter
13114
+ function QB(){return Array.from(this.children)}function tP(t){return new Array(t.length)}function eP(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}function nP(t,e,n,i,s,o){for(var r,a=0,l=e.length,c=o.length;a<c;++a)(r=e[a])?(r.__data__=o[a],i[a]=r):n[a]=new eP(t,o[a])
13115
+ for(;a<l;++a)(r=e[a])&&(s[a]=r)}function iP(t,e,n,i,s,o,r){var a,l,c,d=new Map,h=e.length,u=o.length,p=new Array(h)
13114
13116
  for(a=0;a<h;++a)(l=e[a])&&(p[a]=c=r.call(l,l.__data__,a,e)+"",d.has(c)?s[a]=l:d.set(c,l))
13115
- for(a=0;a<u;++a)c=r.call(t,o[a],a,o)+"",(l=d.get(c))?(i[a]=l,l.__data__=o[a],d.delete(c)):n[a]=new tP(t,o[a])
13116
- for(a=0;a<h;++a)(l=e[a])&&d.get(p[a])===l&&(s[a]=l)}function iP(t){return t.__data__}function sP(t){return"object"==typeof t&&"length"in t?t:Array.from(t)}function oP(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}function rP(t){return function(){this.removeAttribute(t)}}function aP(t){return function(){this.removeAttributeNS(t.space,t.local)}}function lP(t,e){return function(){this.setAttribute(t,e)}}function cP(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function dP(t,e){return function(){var n=e.apply(this,arguments)
13117
- null==n?this.removeAttribute(t):this.setAttribute(t,n)}}function hP(t,e){return function(){var n=e.apply(this,arguments)
13118
- null==n?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,n)}}function uP(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function pP(t){return function(){this.style.removeProperty(t)}}function fP(t,e,n){return function(){this.style.setProperty(t,e,n)}}function mP(t,e,n){return function(){var i=e.apply(this,arguments)
13119
- null==i?this.style.removeProperty(t):this.style.setProperty(t,i,n)}}function gP(t,e){return t.style.getPropertyValue(e)||uP(t).getComputedStyle(t,null).getPropertyValue(e)}function vP(t){return function(){delete this[t]}}function bP(t,e){return function(){this[t]=e}}function yP(t,e){return function(){var n=e.apply(this,arguments)
13120
- null==n?delete this[t]:this[t]=n}}function wP(t){return t.trim().split(/^|\s+/)}function xP(t){return t.classList||new CP(t)}function CP(t){this._node=t,this._names=wP(t.getAttribute("class")||"")}function kP(t,e){for(var n=xP(t),i=-1,s=e.length;++i<s;)n.add(e[i])}function SP(t,e){for(var n=xP(t),i=-1,s=e.length;++i<s;)n.remove(e[i])}function _P(t){return function(){kP(this,t)}}function IP(t){return function(){SP(this,t)}}function MP(t,e){return function(){(e.apply(this,arguments)?kP:SP)(this,t)}}function $P(){this.textContent=""}function EP(t){return function(){this.textContent=t}}function DP(t){return function(){var e=t.apply(this,arguments)
13121
- this.textContent=null==e?"":e}}function AP(){this.innerHTML=""}function TP(t){return function(){this.innerHTML=t}}function OP(t){return function(){var e=t.apply(this,arguments)
13122
- this.innerHTML=null==e?"":e}}function RP(){this.nextSibling&&this.parentNode.appendChild(this)}function FP(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function NP(){return null}function LP(){var t=this.parentNode
13123
- t&&t.removeChild(this)}function BP(){var t=this.cloneNode(!1),e=this.parentNode
13124
- return e?e.insertBefore(t,this.nextSibling):t}function PP(){var t=this.cloneNode(!0),e=this.parentNode
13125
- return e?e.insertBefore(t,this.nextSibling):t}function zP(t){return function(){var e=this.__on
13126
- if(e){for(var n,i=0,s=-1,o=e.length;i<o;++i)n=e[i],t.type&&n.type!==t.type||n.name!==t.name?e[++s]=n:this.removeEventListener(n.type,n.listener,n.options);++s?e.length=s:delete this.__on}}}function VP(t,e,n){return function(){var i,s=this.__on,o=function(t){return function(e){t.call(this,e,this.__data__)}}(e)
13117
+ for(a=0;a<u;++a)c=r.call(t,o[a],a,o)+"",(l=d.get(c))?(i[a]=l,l.__data__=o[a],d.delete(c)):n[a]=new eP(t,o[a])
13118
+ for(a=0;a<h;++a)(l=e[a])&&d.get(p[a])===l&&(s[a]=l)}function sP(t){return t.__data__}function oP(t){return"object"==typeof t&&"length"in t?t:Array.from(t)}function rP(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}function aP(t){return function(){this.removeAttribute(t)}}function lP(t){return function(){this.removeAttributeNS(t.space,t.local)}}function cP(t,e){return function(){this.setAttribute(t,e)}}function dP(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function hP(t,e){return function(){var n=e.apply(this,arguments)
13119
+ null==n?this.removeAttribute(t):this.setAttribute(t,n)}}function uP(t,e){return function(){var n=e.apply(this,arguments)
13120
+ null==n?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,n)}}function pP(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function fP(t){return function(){this.style.removeProperty(t)}}function mP(t,e,n){return function(){this.style.setProperty(t,e,n)}}function gP(t,e,n){return function(){var i=e.apply(this,arguments)
13121
+ null==i?this.style.removeProperty(t):this.style.setProperty(t,i,n)}}function vP(t,e){return t.style.getPropertyValue(e)||pP(t).getComputedStyle(t,null).getPropertyValue(e)}function bP(t){return function(){delete this[t]}}function yP(t,e){return function(){this[t]=e}}function wP(t,e){return function(){var n=e.apply(this,arguments)
13122
+ null==n?delete this[t]:this[t]=n}}function xP(t){return t.trim().split(/^|\s+/)}function CP(t){return t.classList||new kP(t)}function kP(t){this._node=t,this._names=xP(t.getAttribute("class")||"")}function SP(t,e){for(var n=CP(t),i=-1,s=e.length;++i<s;)n.add(e[i])}function _P(t,e){for(var n=CP(t),i=-1,s=e.length;++i<s;)n.remove(e[i])}function IP(t){return function(){SP(this,t)}}function MP(t){return function(){_P(this,t)}}function $P(t,e){return function(){(e.apply(this,arguments)?SP:_P)(this,t)}}function EP(){this.textContent=""}function DP(t){return function(){this.textContent=t}}function AP(t){return function(){var e=t.apply(this,arguments)
13123
+ this.textContent=null==e?"":e}}function TP(){this.innerHTML=""}function OP(t){return function(){this.innerHTML=t}}function RP(t){return function(){var e=t.apply(this,arguments)
13124
+ this.innerHTML=null==e?"":e}}function FP(){this.nextSibling&&this.parentNode.appendChild(this)}function NP(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function LP(){return null}function BP(){var t=this.parentNode
13125
+ t&&t.removeChild(this)}function PP(){var t=this.cloneNode(!1),e=this.parentNode
13126
+ return e?e.insertBefore(t,this.nextSibling):t}function zP(){var t=this.cloneNode(!0),e=this.parentNode
13127
+ return e?e.insertBefore(t,this.nextSibling):t}function VP(t){return function(){var e=this.__on
13128
+ if(e){for(var n,i=0,s=-1,o=e.length;i<o;++i)n=e[i],t.type&&n.type!==t.type||n.name!==t.name?e[++s]=n:this.removeEventListener(n.type,n.listener,n.options);++s?e.length=s:delete this.__on}}}function HP(t,e,n){return function(){var i,s=this.__on,o=function(t){return function(e){t.call(this,e,this.__data__)}}(e)
13127
13129
  if(s)for(var r=0,a=s.length;r<a;++r)if((i=s[r]).type===t.type&&i.name===t.name)return this.removeEventListener(i.type,i.listener,i.options),this.addEventListener(i.type,i.listener=o,i.options=n),void(i.value=e)
13128
- this.addEventListener(t.type,o,n),i={type:t.type,name:t.name,value:e,listener:o,options:n},s?s.push(i):this.__on=[i]}}function HP(t,e,n){var i=uP(t),s=i.CustomEvent
13129
- "function"==typeof s?s=new s(e,n):(s=i.document.createEvent("Event"),n?(s.initEvent(e,n.bubbles,n.cancelable),s.detail=n.detail):s.initEvent(e,!1,!1)),t.dispatchEvent(s)}function UP(t,e){return function(){return HP(this,t,e)}}function qP(t,e){return function(){return HP(this,t,e.apply(this,arguments))}}tP.prototype={constructor:tP,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,e){return this._parent.insertBefore(t,e)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}},CP.prototype={add:function(t){this._names.indexOf(t)<0&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},remove:function(t){var e=this._names.indexOf(t)
13130
+ this.addEventListener(t.type,o,n),i={type:t.type,name:t.name,value:e,listener:o,options:n},s?s.push(i):this.__on=[i]}}function UP(t,e,n){var i=pP(t),s=i.CustomEvent
13131
+ "function"==typeof s?s=new s(e,n):(s=i.document.createEvent("Event"),n?(s.initEvent(e,n.bubbles,n.cancelable),s.detail=n.detail):s.initEvent(e,!1,!1)),t.dispatchEvent(s)}function qP(t,e){return function(){return UP(this,t,e)}}function jP(t,e){return function(){return UP(this,t,e.apply(this,arguments))}}eP.prototype={constructor:eP,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,e){return this._parent.insertBefore(t,e)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}},kP.prototype={add:function(t){this._names.indexOf(t)<0&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},remove:function(t){var e=this._names.indexOf(t)
13130
13132
  e>=0&&(this._names.splice(e,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}}
13131
- var jP=[null]
13132
- function WP(t,e){this._groups=t,this._parents=e}function GP(){return new WP([[document.documentElement]],jP)}function ZP(t){return"string"==typeof t?new WP([[document.querySelector(t)]],[document.documentElement]):new WP([[t]],jP)}function KP(t,e){if(t=function(t){let e
13133
+ var WP=[null]
13134
+ function GP(t,e){this._groups=t,this._parents=e}function ZP(){return new GP([[document.documentElement]],WP)}function KP(t){return"string"==typeof t?new GP([[document.querySelector(t)]],[document.documentElement]):new GP([[t]],WP)}function YP(t,e){if(t=function(t){let e
13133
13135
  for(;e=t.sourceEvent;)t=e
13134
13136
  return t}(t),void 0===e&&(e=t.currentTarget),e){var n=e.ownerSVGElement||e
13135
13137
  if(n.createSVGPoint){var i=n.createSVGPoint()
13136
13138
  return i.x=t.clientX,i.y=t.clientY,[(i=i.matrixTransform(e.getScreenCTM().inverse())).x,i.y]}if(e.getBoundingClientRect){var s=e.getBoundingClientRect()
13137
- return[t.clientX-s.left-e.clientLeft,t.clientY-s.top-e.clientTop]}}return[t.pageX,t.pageY]}WP.prototype=GP.prototype={constructor:WP,select:function(t){"function"!=typeof t&&(t=UB(t))
13139
+ return[t.clientX-s.left-e.clientLeft,t.clientY-s.top-e.clientTop]}}return[t.pageX,t.pageY]}GP.prototype=ZP.prototype={constructor:GP,select:function(t){"function"!=typeof t&&(t=qB(t))
13138
13140
  for(var e=this._groups,n=e.length,i=new Array(n),s=0;s<n;++s)for(var o,r,a=e[s],l=a.length,c=i[s]=new Array(l),d=0;d<l;++d)(o=a[d])&&(r=t.call(o,o.__data__,d,a))&&("__data__"in o&&(r.__data__=o.__data__),c[d]=r)
13139
- return new WP(i,this._parents)},selectAll:function(t){t="function"==typeof t?WB(t):jB(t)
13141
+ return new GP(i,this._parents)},selectAll:function(t){t="function"==typeof t?GB(t):WB(t)
13140
13142
  for(var e=this._groups,n=e.length,i=[],s=[],o=0;o<n;++o)for(var r,a=e[o],l=a.length,c=0;c<l;++c)(r=a[c])&&(i.push(t.call(r,r.__data__,c,a)),s.push(r))
13141
- return new WP(i,s)},selectChild:function(t){return this.select(null==t?YB:function(t){return function(){return KB.call(this.children,t)}}("function"==typeof t?t:ZB(t)))},selectChildren:function(t){return this.selectAll(null==t?JB:function(t){return function(){return XB.call(this.children,t)}}("function"==typeof t?t:ZB(t)))},filter:function(t){"function"!=typeof t&&(t=GB(t))
13143
+ return new GP(i,s)},selectChild:function(t){return this.select(null==t?XB:function(t){return function(){return YB.call(this.children,t)}}("function"==typeof t?t:KB(t)))},selectChildren:function(t){return this.selectAll(null==t?QB:function(t){return function(){return JB.call(this.children,t)}}("function"==typeof t?t:KB(t)))},filter:function(t){"function"!=typeof t&&(t=ZB(t))
13142
13144
  for(var e=this._groups,n=e.length,i=new Array(n),s=0;s<n;++s)for(var o,r=e[s],a=r.length,l=i[s]=[],c=0;c<a;++c)(o=r[c])&&t.call(o,o.__data__,c,r)&&l.push(o)
13143
- return new WP(i,this._parents)},data:function(t,e){if(!arguments.length)return Array.from(this,iP)
13144
- var n,i=e?nP:eP,s=this._parents,o=this._groups
13145
+ return new GP(i,this._parents)},data:function(t,e){if(!arguments.length)return Array.from(this,sP)
13146
+ var n,i=e?iP:nP,s=this._parents,o=this._groups
13145
13147
  "function"!=typeof t&&(n=t,t=function(){return n})
13146
- for(var r=o.length,a=new Array(r),l=new Array(r),c=new Array(r),d=0;d<r;++d){var h=s[d],u=o[d],p=u.length,f=sP(t.call(h,h&&h.__data__,d,s)),m=f.length,g=l[d]=new Array(m),v=a[d]=new Array(m)
13148
+ for(var r=o.length,a=new Array(r),l=new Array(r),c=new Array(r),d=0;d<r;++d){var h=s[d],u=o[d],p=u.length,f=oP(t.call(h,h&&h.__data__,d,s)),m=f.length,g=l[d]=new Array(m),v=a[d]=new Array(m)
13147
13149
  i(h,u,g,v,c[d]=new Array(p),f,e)
13148
- for(var b,y,w=0,x=0;w<m;++w)if(b=g[w]){for(w>=x&&(x=w+1);!(y=v[x])&&++x<m;);b._next=y||null}}return(a=new WP(a,s))._enter=l,a._exit=c,a},enter:function(){return new WP(this._enter||this._groups.map(QB),this._parents)},exit:function(){return new WP(this._exit||this._groups.map(QB),this._parents)},join:function(t,e,n){var i=this.enter(),s=this,o=this.exit()
13150
+ for(var b,y,w=0,x=0;w<m;++w)if(b=g[w]){for(w>=x&&(x=w+1);!(y=v[x])&&++x<m;);b._next=y||null}}return(a=new GP(a,s))._enter=l,a._exit=c,a},enter:function(){return new GP(this._enter||this._groups.map(tP),this._parents)},exit:function(){return new GP(this._exit||this._groups.map(tP),this._parents)},join:function(t,e,n){var i=this.enter(),s=this,o=this.exit()
13149
13151
  return"function"==typeof t?(i=t(i))&&(i=i.selection()):i=i.append(t+""),null!=e&&(s=e(s))&&(s=s.selection()),null==n?o.remove():n(o),i&&s?i.merge(s).order():s},merge:function(t){for(var e=t.selection?t.selection():t,n=this._groups,i=e._groups,s=n.length,o=i.length,r=Math.min(s,o),a=new Array(s),l=0;l<r;++l)for(var c,d=n[l],h=i[l],u=d.length,p=a[l]=new Array(u),f=0;f<u;++f)(c=d[f]||h[f])&&(p[f]=c)
13150
13152
  for(;l<s;++l)a[l]=n[l]
13151
- return new WP(a,this._parents)},selection:function(){return this},order:function(){for(var t=this._groups,e=-1,n=t.length;++e<n;)for(var i,s=t[e],o=s.length-1,r=s[o];--o>=0;)(i=s[o])&&(r&&4^i.compareDocumentPosition(r)&&r.parentNode.insertBefore(i,r),r=i)
13152
- return this},sort:function(t){function e(e,n){return e&&n?t(e.__data__,n.__data__):!e-!n}t||(t=oP)
13153
+ return new GP(a,this._parents)},selection:function(){return this},order:function(){for(var t=this._groups,e=-1,n=t.length;++e<n;)for(var i,s=t[e],o=s.length-1,r=s[o];--o>=0;)(i=s[o])&&(r&&4^i.compareDocumentPosition(r)&&r.parentNode.insertBefore(i,r),r=i)
13154
+ return this},sort:function(t){function e(e,n){return e&&n?t(e.__data__,n.__data__):!e-!n}t||(t=rP)
13153
13155
  for(var n=this._groups,i=n.length,s=new Array(i),o=0;o<i;++o){for(var r,a=n[o],l=a.length,c=s[o]=new Array(l),d=0;d<l;++d)(r=a[d])&&(c[d]=r)
13154
- c.sort(e)}return new WP(s,this._parents).order()},call:function(){var t=arguments[0]
13156
+ c.sort(e)}return new GP(s,this._parents).order()},call:function(){var t=arguments[0]
13155
13157
  return arguments[0]=this,t.apply(null,arguments),this},nodes:function(){return Array.from(this)},node:function(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var i=t[e],s=0,o=i.length;s<o;++s){var r=i[s]
13156
13158
  if(r)return r}return null},size:function(){let t=0
13157
13159
  for(const e of this)++t
13158
13160
  return t},empty:function(){return!this.node()},each:function(t){for(var e=this._groups,n=0,i=e.length;n<i;++n)for(var s,o=e[n],r=0,a=o.length;r<a;++r)(s=o[r])&&t.call(s,s.__data__,r,o)
13159
- return this},attr:function(t,e){var n=BB(t)
13161
+ return this},attr:function(t,e){var n=PB(t)
13160
13162
  if(arguments.length<2){var i=this.node()
13161
- return n.local?i.getAttributeNS(n.space,n.local):i.getAttribute(n)}return this.each((null==e?n.local?aP:rP:"function"==typeof e?n.local?hP:dP:n.local?cP:lP)(n,e))},style:function(t,e,n){return arguments.length>1?this.each((null==e?pP:"function"==typeof e?mP:fP)(t,e,null==n?"":n)):gP(this.node(),t)},property:function(t,e){return arguments.length>1?this.each((null==e?vP:"function"==typeof e?yP:bP)(t,e)):this.node()[t]},classed:function(t,e){var n=wP(t+"")
13162
- if(arguments.length<2){for(var i=xP(this.node()),s=-1,o=n.length;++s<o;)if(!i.contains(n[s]))return!1
13163
- return!0}return this.each(("function"==typeof e?MP:e?_P:IP)(n,e))},text:function(t){return arguments.length?this.each(null==t?$P:("function"==typeof t?DP:EP)(t)):this.node().textContent},html:function(t){return arguments.length?this.each(null==t?AP:("function"==typeof t?OP:TP)(t)):this.node().innerHTML},raise:function(){return this.each(RP)},lower:function(){return this.each(FP)},append:function(t){var e="function"==typeof t?t:VB(t)
13164
- return this.select((function(){return this.appendChild(e.apply(this,arguments))}))},insert:function(t,e){var n="function"==typeof t?t:VB(t),i=null==e?NP:"function"==typeof e?e:UB(e)
13165
- return this.select((function(){return this.insertBefore(n.apply(this,arguments),i.apply(this,arguments)||null)}))},remove:function(){return this.each(LP)},clone:function(t){return this.select(t?PP:BP)},datum:function(t){return arguments.length?this.property("__data__",t):this.node().__data__},on:function(t,e,n){var i,s,o=function(t){return t.trim().split(/^|\s+/).map((function(t){var e="",n=t.indexOf(".")
13163
+ return n.local?i.getAttributeNS(n.space,n.local):i.getAttribute(n)}return this.each((null==e?n.local?lP:aP:"function"==typeof e?n.local?uP:hP:n.local?dP:cP)(n,e))},style:function(t,e,n){return arguments.length>1?this.each((null==e?fP:"function"==typeof e?gP:mP)(t,e,null==n?"":n)):vP(this.node(),t)},property:function(t,e){return arguments.length>1?this.each((null==e?bP:"function"==typeof e?wP:yP)(t,e)):this.node()[t]},classed:function(t,e){var n=xP(t+"")
13164
+ if(arguments.length<2){for(var i=CP(this.node()),s=-1,o=n.length;++s<o;)if(!i.contains(n[s]))return!1
13165
+ return!0}return this.each(("function"==typeof e?$P:e?IP:MP)(n,e))},text:function(t){return arguments.length?this.each(null==t?EP:("function"==typeof t?AP:DP)(t)):this.node().textContent},html:function(t){return arguments.length?this.each(null==t?TP:("function"==typeof t?RP:OP)(t)):this.node().innerHTML},raise:function(){return this.each(FP)},lower:function(){return this.each(NP)},append:function(t){var e="function"==typeof t?t:HB(t)
13166
+ return this.select((function(){return this.appendChild(e.apply(this,arguments))}))},insert:function(t,e){var n="function"==typeof t?t:HB(t),i=null==e?LP:"function"==typeof e?e:qB(e)
13167
+ return this.select((function(){return this.insertBefore(n.apply(this,arguments),i.apply(this,arguments)||null)}))},remove:function(){return this.each(BP)},clone:function(t){return this.select(t?zP:PP)},datum:function(t){return arguments.length?this.property("__data__",t):this.node().__data__},on:function(t,e,n){var i,s,o=function(t){return t.trim().split(/^|\s+/).map((function(t){var e="",n=t.indexOf(".")
13166
13168
  return n>=0&&(e=t.slice(n+1),t=t.slice(0,n)),{type:t,name:e}}))}(t+""),r=o.length
13167
- if(!(arguments.length<2)){for(a=e?VP:zP,i=0;i<r;++i)this.each(a(o[i],e,n))
13169
+ if(!(arguments.length<2)){for(a=e?HP:VP,i=0;i<r;++i)this.each(a(o[i],e,n))
13168
13170
  return this}var a=this.node().__on
13169
- if(a)for(var l,c=0,d=a.length;c<d;++c)for(i=0,l=a[c];i<r;++i)if((s=o[i]).type===l.type&&s.name===l.name)return l.value},dispatch:function(t,e){return this.each(("function"==typeof e?qP:UP)(t,e))},[Symbol.iterator]:function*(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var i,s=t[e],o=0,r=s.length;o<r;++o)(i=s[o])&&(yield i)}}
13170
- const YP={capture:!0,passive:!1}
13171
- function XP(t){t.preventDefault(),t.stopImmediatePropagation()}function JP(t,e,n){t.prototype=e.prototype=n,n.constructor=t}function QP(t,e){var n=Object.create(t.prototype)
13171
+ if(a)for(var l,c=0,d=a.length;c<d;++c)for(i=0,l=a[c];i<r;++i)if((s=o[i]).type===l.type&&s.name===l.name)return l.value},dispatch:function(t,e){return this.each(("function"==typeof e?jP:qP)(t,e))},[Symbol.iterator]:function*(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var i,s=t[e],o=0,r=s.length;o<r;++o)(i=s[o])&&(yield i)}}
13172
+ const XP={capture:!0,passive:!1}
13173
+ function JP(t){t.preventDefault(),t.stopImmediatePropagation()}function QP(t,e,n){t.prototype=e.prototype=n,n.constructor=t}function tz(t,e){var n=Object.create(t.prototype)
13172
13174
  for(var i in e)n[i]=e[i]
13173
- return n}function tz(){}var ez=.7,nz=1/ez,iz="\\s*([+-]?\\d+)\\s*",sz="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",oz="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",rz=/^#([0-9a-f]{3,8})$/,az=new RegExp(`^rgb\\(${iz},${iz},${iz}\\)$`),lz=new RegExp(`^rgb\\(${oz},${oz},${oz}\\)$`),cz=new RegExp(`^rgba\\(${iz},${iz},${iz},${sz}\\)$`),dz=new RegExp(`^rgba\\(${oz},${oz},${oz},${sz}\\)$`),hz=new RegExp(`^hsl\\(${sz},${oz},${oz}\\)$`),uz=new RegExp(`^hsla\\(${sz},${oz},${oz},${sz}\\)$`),pz={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074}
13174
- function fz(){return this.rgb().formatHex()}function mz(){return this.rgb().formatRgb()}function gz(t){var e,n
13175
- return t=(t+"").trim().toLowerCase(),(e=rz.exec(t))?(n=e[1].length,e=parseInt(e[1],16),6===n?vz(e):3===n?new wz(e>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===n?bz(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===n?bz(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|240&e,((15&e)<<4|15&e)/255):null):(e=az.exec(t))?new wz(e[1],e[2],e[3],1):(e=lz.exec(t))?new wz(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=cz.exec(t))?bz(e[1],e[2],e[3],e[4]):(e=dz.exec(t))?bz(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=hz.exec(t))?Iz(e[1],e[2]/100,e[3]/100,1):(e=uz.exec(t))?Iz(e[1],e[2]/100,e[3]/100,e[4]):pz.hasOwnProperty(t)?vz(pz[t]):"transparent"===t?new wz(NaN,NaN,NaN,0):null}function vz(t){return new wz(t>>16&255,t>>8&255,255&t,1)}function bz(t,e,n,i){return i<=0&&(t=e=n=NaN),new wz(t,e,n,i)}function yz(t,e,n,i){return 1===arguments.length?((s=t)instanceof tz||(s=gz(s)),s?new wz((s=s.rgb()).r,s.g,s.b,s.opacity):new wz):new wz(t,e,n,null==i?1:i)
13176
- var s}function wz(t,e,n,i){this.r=+t,this.g=+e,this.b=+n,this.opacity=+i}function xz(){return`#${_z(this.r)}${_z(this.g)}${_z(this.b)}`}function Cz(){const t=kz(this.opacity)
13177
- return`${1===t?"rgb(":"rgba("}${Sz(this.r)}, ${Sz(this.g)}, ${Sz(this.b)}${1===t?")":`, ${t})`}`}function kz(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function Sz(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function _z(t){return((t=Sz(t))<16?"0":"")+t.toString(16)}function Iz(t,e,n,i){return i<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new $z(t,e,n,i)}function Mz(t){if(t instanceof $z)return new $z(t.h,t.s,t.l,t.opacity)
13178
- if(t instanceof tz||(t=gz(t)),!t)return new $z
13179
- if(t instanceof $z)return t
13175
+ return n}function ez(){}var nz=.7,iz=1/nz,sz="\\s*([+-]?\\d+)\\s*",oz="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",rz="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",az=/^#([0-9a-f]{3,8})$/,lz=new RegExp(`^rgb\\(${sz},${sz},${sz}\\)$`),cz=new RegExp(`^rgb\\(${rz},${rz},${rz}\\)$`),dz=new RegExp(`^rgba\\(${sz},${sz},${sz},${oz}\\)$`),hz=new RegExp(`^rgba\\(${rz},${rz},${rz},${oz}\\)$`),uz=new RegExp(`^hsl\\(${oz},${rz},${rz}\\)$`),pz=new RegExp(`^hsla\\(${oz},${rz},${rz},${oz}\\)$`),fz={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074}
13176
+ function mz(){return this.rgb().formatHex()}function gz(){return this.rgb().formatRgb()}function vz(t){var e,n
13177
+ return t=(t+"").trim().toLowerCase(),(e=az.exec(t))?(n=e[1].length,e=parseInt(e[1],16),6===n?bz(e):3===n?new xz(e>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===n?yz(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===n?yz(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|240&e,((15&e)<<4|15&e)/255):null):(e=lz.exec(t))?new xz(e[1],e[2],e[3],1):(e=cz.exec(t))?new xz(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=dz.exec(t))?yz(e[1],e[2],e[3],e[4]):(e=hz.exec(t))?yz(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=uz.exec(t))?Mz(e[1],e[2]/100,e[3]/100,1):(e=pz.exec(t))?Mz(e[1],e[2]/100,e[3]/100,e[4]):fz.hasOwnProperty(t)?bz(fz[t]):"transparent"===t?new xz(NaN,NaN,NaN,0):null}function bz(t){return new xz(t>>16&255,t>>8&255,255&t,1)}function yz(t,e,n,i){return i<=0&&(t=e=n=NaN),new xz(t,e,n,i)}function wz(t,e,n,i){return 1===arguments.length?((s=t)instanceof ez||(s=vz(s)),s?new xz((s=s.rgb()).r,s.g,s.b,s.opacity):new xz):new xz(t,e,n,null==i?1:i)
13178
+ var s}function xz(t,e,n,i){this.r=+t,this.g=+e,this.b=+n,this.opacity=+i}function Cz(){return`#${Iz(this.r)}${Iz(this.g)}${Iz(this.b)}`}function kz(){const t=Sz(this.opacity)
13179
+ return`${1===t?"rgb(":"rgba("}${_z(this.r)}, ${_z(this.g)}, ${_z(this.b)}${1===t?")":`, ${t})`}`}function Sz(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function _z(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function Iz(t){return((t=_z(t))<16?"0":"")+t.toString(16)}function Mz(t,e,n,i){return i<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new Ez(t,e,n,i)}function $z(t){if(t instanceof Ez)return new Ez(t.h,t.s,t.l,t.opacity)
13180
+ if(t instanceof ez||(t=vz(t)),!t)return new Ez
13181
+ if(t instanceof Ez)return t
13180
13182
  var e=(t=t.rgb()).r/255,n=t.g/255,i=t.b/255,s=Math.min(e,n,i),o=Math.max(e,n,i),r=NaN,a=o-s,l=(o+s)/2
13181
- return a?(r=e===o?(n-i)/a+6*(n<i):n===o?(i-e)/a+2:(e-n)/a+4,a/=l<.5?o+s:2-o-s,r*=60):a=l>0&&l<1?0:r,new $z(r,a,l,t.opacity)}function $z(t,e,n,i){this.h=+t,this.s=+e,this.l=+n,this.opacity=+i}function Ez(t){return(t=(t||0)%360)<0?t+360:t}function Dz(t){return Math.max(0,Math.min(1,t||0))}function Az(t,e,n){return 255*(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)}JP(tz,gz,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:fz,formatHex:fz,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return Mz(this).formatHsl()},formatRgb:mz,toString:mz}),JP(wz,yz,QP(tz,{brighter(t){return t=null==t?nz:Math.pow(nz,t),new wz(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=null==t?ez:Math.pow(ez,t),new wz(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new wz(Sz(this.r),Sz(this.g),Sz(this.b),kz(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:xz,formatHex:xz,formatHex8:function(){return`#${_z(this.r)}${_z(this.g)}${_z(this.b)}${_z(255*(isNaN(this.opacity)?1:this.opacity))}`},formatRgb:Cz,toString:Cz})),JP($z,(function(t,e,n,i){return 1===arguments.length?Mz(t):new $z(t,e,n,null==i?1:i)}),QP(tz,{brighter(t){return t=null==t?nz:Math.pow(nz,t),new $z(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=null==t?ez:Math.pow(ez,t),new $z(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=this.h%360+360*(this.h<0),e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,i=n+(n<.5?n:1-n)*e,s=2*n-i
13182
- return new wz(Az(t>=240?t-240:t+120,s,i),Az(t,s,i),Az(t<120?t+240:t-120,s,i),this.opacity)},clamp(){return new $z(Ez(this.h),Dz(this.s),Dz(this.l),kz(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const t=kz(this.opacity)
13183
- return`${1===t?"hsl(":"hsla("}${Ez(this.h)}, ${100*Dz(this.s)}%, ${100*Dz(this.l)}%${1===t?")":`, ${t})`}`}}))
13184
- var Tz=t=>()=>t
13185
- function Oz(t){return 1==(t=+t)?Rz:function(e,n){return n-e?function(t,e,n){return t=Math.pow(t,n),e=Math.pow(e,n)-t,n=1/n,function(i){return Math.pow(t+i*e,n)}}(e,n,t):Tz(isNaN(e)?n:e)}}function Rz(t,e){var n=e-t
13186
- return n?function(t,e){return function(n){return t+n*e}}(t,n):Tz(isNaN(t)?e:t)}var Fz=function t(e){var n=Oz(e)
13187
- function i(t,e){var i=n((t=yz(t)).r,(e=yz(e)).r),s=n(t.g,e.g),o=n(t.b,e.b),r=Rz(t.opacity,e.opacity)
13183
+ return a?(r=e===o?(n-i)/a+6*(n<i):n===o?(i-e)/a+2:(e-n)/a+4,a/=l<.5?o+s:2-o-s,r*=60):a=l>0&&l<1?0:r,new Ez(r,a,l,t.opacity)}function Ez(t,e,n,i){this.h=+t,this.s=+e,this.l=+n,this.opacity=+i}function Dz(t){return(t=(t||0)%360)<0?t+360:t}function Az(t){return Math.max(0,Math.min(1,t||0))}function Tz(t,e,n){return 255*(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)}QP(ez,vz,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:mz,formatHex:mz,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return $z(this).formatHsl()},formatRgb:gz,toString:gz}),QP(xz,wz,tz(ez,{brighter(t){return t=null==t?iz:Math.pow(iz,t),new xz(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=null==t?nz:Math.pow(nz,t),new xz(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new xz(_z(this.r),_z(this.g),_z(this.b),Sz(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:Cz,formatHex:Cz,formatHex8:function(){return`#${Iz(this.r)}${Iz(this.g)}${Iz(this.b)}${Iz(255*(isNaN(this.opacity)?1:this.opacity))}`},formatRgb:kz,toString:kz})),QP(Ez,(function(t,e,n,i){return 1===arguments.length?$z(t):new Ez(t,e,n,null==i?1:i)}),tz(ez,{brighter(t){return t=null==t?iz:Math.pow(iz,t),new Ez(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=null==t?nz:Math.pow(nz,t),new Ez(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=this.h%360+360*(this.h<0),e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,i=n+(n<.5?n:1-n)*e,s=2*n-i
13184
+ return new xz(Tz(t>=240?t-240:t+120,s,i),Tz(t,s,i),Tz(t<120?t+240:t-120,s,i),this.opacity)},clamp(){return new Ez(Dz(this.h),Az(this.s),Az(this.l),Sz(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const t=Sz(this.opacity)
13185
+ return`${1===t?"hsl(":"hsla("}${Dz(this.h)}, ${100*Az(this.s)}%, ${100*Az(this.l)}%${1===t?")":`, ${t})`}`}}))
13186
+ var Oz=t=>()=>t
13187
+ function Rz(t){return 1==(t=+t)?Fz:function(e,n){return n-e?function(t,e,n){return t=Math.pow(t,n),e=Math.pow(e,n)-t,n=1/n,function(i){return Math.pow(t+i*e,n)}}(e,n,t):Oz(isNaN(e)?n:e)}}function Fz(t,e){var n=e-t
13188
+ return n?function(t,e){return function(n){return t+n*e}}(t,n):Oz(isNaN(t)?e:t)}var Nz=function t(e){var n=Rz(e)
13189
+ function i(t,e){var i=n((t=wz(t)).r,(e=wz(e)).r),s=n(t.g,e.g),o=n(t.b,e.b),r=Fz(t.opacity,e.opacity)
13188
13190
  return function(e){return t.r=i(e),t.g=s(e),t.b=o(e),t.opacity=r(e),t+""}}return i.gamma=t,i}(1)
13189
- function Nz(t,e){e||(e=[])
13191
+ function Lz(t,e){e||(e=[])
13190
13192
  var n,i=t?Math.min(e.length,t.length):0,s=e.slice()
13191
13193
  return function(o){for(n=0;n<i;++n)s[n]=t[n]*(1-o)+e[n]*o
13192
- return s}}function Lz(t,e){var n,i=e?e.length:0,s=t?Math.min(i,t.length):0,o=new Array(s),r=new Array(i)
13193
- for(n=0;n<s;++n)o[n]=qz(t[n],e[n])
13194
+ return s}}function Bz(t,e){var n,i=e?e.length:0,s=t?Math.min(i,t.length):0,o=new Array(s),r=new Array(i)
13195
+ for(n=0;n<s;++n)o[n]=jz(t[n],e[n])
13194
13196
  for(;n<i;++n)r[n]=e[n]
13195
13197
  return function(t){for(n=0;n<s;++n)r[n]=o[n](t)
13196
- return r}}function Bz(t,e){var n=new Date
13197
- return t=+t,e=+e,function(i){return n.setTime(t*(1-i)+e*i),n}}function Pz(t,e){return t=+t,e=+e,function(n){return t*(1-n)+e*n}}function zz(t,e){var n,i={},s={}
13198
- for(n in null!==t&&"object"==typeof t||(t={}),null!==e&&"object"==typeof e||(e={}),e)n in t?i[n]=qz(t[n],e[n]):s[n]=e[n]
13198
+ return r}}function Pz(t,e){var n=new Date
13199
+ return t=+t,e=+e,function(i){return n.setTime(t*(1-i)+e*i),n}}function zz(t,e){return t=+t,e=+e,function(n){return t*(1-n)+e*n}}function Vz(t,e){var n,i={},s={}
13200
+ for(n in null!==t&&"object"==typeof t||(t={}),null!==e&&"object"==typeof e||(e={}),e)n in t?i[n]=jz(t[n],e[n]):s[n]=e[n]
13199
13201
  return function(t){for(n in i)s[n]=i[n](t)
13200
- return s}}var Vz=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Hz=new RegExp(Vz.source,"g")
13201
- function Uz(t,e){var n,i,s,o=Vz.lastIndex=Hz.lastIndex=0,r=-1,a=[],l=[]
13202
- for(t+="",e+="";(n=Vz.exec(t))&&(i=Hz.exec(e));)(s=i.index)>o&&(s=e.slice(o,s),a[r]?a[r]+=s:a[++r]=s),(n=n[0])===(i=i[0])?a[r]?a[r]+=i:a[++r]=i:(a[++r]=null,l.push({i:r,x:Pz(n,i)})),o=Hz.lastIndex
13202
+ return s}}var Hz=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Uz=new RegExp(Hz.source,"g")
13203
+ function qz(t,e){var n,i,s,o=Hz.lastIndex=Uz.lastIndex=0,r=-1,a=[],l=[]
13204
+ for(t+="",e+="";(n=Hz.exec(t))&&(i=Uz.exec(e));)(s=i.index)>o&&(s=e.slice(o,s),a[r]?a[r]+=s:a[++r]=s),(n=n[0])===(i=i[0])?a[r]?a[r]+=i:a[++r]=i:(a[++r]=null,l.push({i:r,x:zz(n,i)})),o=Uz.lastIndex
13203
13205
  return o<e.length&&(s=e.slice(o),a[r]?a[r]+=s:a[++r]=s),a.length<2?l[0]?function(t){return function(e){return t(e)+""}}(l[0].x):function(t){return function(){return t}}(e):(e=l.length,function(t){for(var n,i=0;i<e;++i)a[(n=l[i]).i]=n.x(t)
13204
- return a.join("")})}function qz(t,e){var n,i,s=typeof e
13205
- return null==e||"boolean"===s?Tz(e):("number"===s?Pz:"string"===s?(n=gz(e))?(e=n,Fz):Uz:e instanceof gz?Fz:e instanceof Date?Bz:(i=e,!ArrayBuffer.isView(i)||i instanceof DataView?Array.isArray(e)?Lz:"function"!=typeof e.valueOf&&"function"!=typeof e.toString||isNaN(e)?zz:Pz:Nz))(t,e)}function jz(t,e){return t=+t,e=+e,function(n){return Math.round(t*(1-n)+e*n)}}var Wz,Gz=180/Math.PI,Zz={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1}
13206
- function Kz(t,e,n,i,s,o){var r,a,l
13207
- return(r=Math.sqrt(t*t+e*e))&&(t/=r,e/=r),(l=t*n+e*i)&&(n-=t*l,i-=e*l),(a=Math.sqrt(n*n+i*i))&&(n/=a,i/=a,l/=a),t*i<e*n&&(t=-t,e=-e,l=-l,r=-r),{translateX:s,translateY:o,rotate:Math.atan2(e,t)*Gz,skewX:Math.atan(l)*Gz,scaleX:r,scaleY:a}}function Yz(t,e,n,i){function s(t){return t.length?t.pop()+" ":""}return function(o,r){var a=[],l=[]
13206
+ return a.join("")})}function jz(t,e){var n,i,s=typeof e
13207
+ return null==e||"boolean"===s?Oz(e):("number"===s?zz:"string"===s?(n=vz(e))?(e=n,Nz):qz:e instanceof vz?Nz:e instanceof Date?Pz:(i=e,!ArrayBuffer.isView(i)||i instanceof DataView?Array.isArray(e)?Bz:"function"!=typeof e.valueOf&&"function"!=typeof e.toString||isNaN(e)?Vz:zz:Lz))(t,e)}function Wz(t,e){return t=+t,e=+e,function(n){return Math.round(t*(1-n)+e*n)}}var Gz,Zz=180/Math.PI,Kz={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1}
13208
+ function Yz(t,e,n,i,s,o){var r,a,l
13209
+ return(r=Math.sqrt(t*t+e*e))&&(t/=r,e/=r),(l=t*n+e*i)&&(n-=t*l,i-=e*l),(a=Math.sqrt(n*n+i*i))&&(n/=a,i/=a,l/=a),t*i<e*n&&(t=-t,e=-e,l=-l,r=-r),{translateX:s,translateY:o,rotate:Math.atan2(e,t)*Zz,skewX:Math.atan(l)*Zz,scaleX:r,scaleY:a}}function Xz(t,e,n,i){function s(t){return t.length?t.pop()+" ":""}return function(o,r){var a=[],l=[]
13208
13210
  return o=t(o),r=t(r),function(t,i,s,o,r,a){if(t!==s||i!==o){var l=r.push("translate(",null,e,null,n)
13209
- a.push({i:l-4,x:Pz(t,s)},{i:l-2,x:Pz(i,o)})}else(s||o)&&r.push("translate("+s+e+o+n)}(o.translateX,o.translateY,r.translateX,r.translateY,a,l),function(t,e,n,o){t!==e?(t-e>180?e+=360:e-t>180&&(t+=360),o.push({i:n.push(s(n)+"rotate(",null,i)-2,x:Pz(t,e)})):e&&n.push(s(n)+"rotate("+e+i)}(o.rotate,r.rotate,a,l),function(t,e,n,o){t!==e?o.push({i:n.push(s(n)+"skewX(",null,i)-2,x:Pz(t,e)}):e&&n.push(s(n)+"skewX("+e+i)}(o.skewX,r.skewX,a,l),function(t,e,n,i,o,r){if(t!==n||e!==i){var a=o.push(s(o)+"scale(",null,",",null,")")
13210
- r.push({i:a-4,x:Pz(t,n)},{i:a-2,x:Pz(e,i)})}else 1===n&&1===i||o.push(s(o)+"scale("+n+","+i+")")}(o.scaleX,o.scaleY,r.scaleX,r.scaleY,a,l),o=r=null,function(t){for(var e,n=-1,i=l.length;++n<i;)a[(e=l[n]).i]=e.x(t)
13211
- return a.join("")}}}var Xz=Yz((function(t){const e=new("function"==typeof DOMMatrix?DOMMatrix:WebKitCSSMatrix)(t+"")
13212
- return e.isIdentity?Zz:Kz(e.a,e.b,e.c,e.d,e.e,e.f)}),"px, ","px)","deg)"),Jz=Yz((function(t){return null==t?Zz:(Wz||(Wz=document.createElementNS("http://www.w3.org/2000/svg","g")),Wz.setAttribute("transform",t),(t=Wz.transform.baseVal.consolidate())?Kz((t=t.matrix).a,t.b,t.c,t.d,t.e,t.f):Zz)}),", ",")",")")
13213
- function Qz(t){return((t=Math.exp(t))+1/t)/2}var tV,eV,nV=function t(e,n,i){function s(t,s){var o,r,a=t[0],l=t[1],c=t[2],d=s[0],h=s[1],u=s[2],p=d-a,f=h-l,m=p*p+f*f
13211
+ a.push({i:l-4,x:zz(t,s)},{i:l-2,x:zz(i,o)})}else(s||o)&&r.push("translate("+s+e+o+n)}(o.translateX,o.translateY,r.translateX,r.translateY,a,l),function(t,e,n,o){t!==e?(t-e>180?e+=360:e-t>180&&(t+=360),o.push({i:n.push(s(n)+"rotate(",null,i)-2,x:zz(t,e)})):e&&n.push(s(n)+"rotate("+e+i)}(o.rotate,r.rotate,a,l),function(t,e,n,o){t!==e?o.push({i:n.push(s(n)+"skewX(",null,i)-2,x:zz(t,e)}):e&&n.push(s(n)+"skewX("+e+i)}(o.skewX,r.skewX,a,l),function(t,e,n,i,o,r){if(t!==n||e!==i){var a=o.push(s(o)+"scale(",null,",",null,")")
13212
+ r.push({i:a-4,x:zz(t,n)},{i:a-2,x:zz(e,i)})}else 1===n&&1===i||o.push(s(o)+"scale("+n+","+i+")")}(o.scaleX,o.scaleY,r.scaleX,r.scaleY,a,l),o=r=null,function(t){for(var e,n=-1,i=l.length;++n<i;)a[(e=l[n]).i]=e.x(t)
13213
+ return a.join("")}}}var Jz=Xz((function(t){const e=new("function"==typeof DOMMatrix?DOMMatrix:WebKitCSSMatrix)(t+"")
13214
+ return e.isIdentity?Kz:Yz(e.a,e.b,e.c,e.d,e.e,e.f)}),"px, ","px)","deg)"),Qz=Xz((function(t){return null==t?Kz:(Gz||(Gz=document.createElementNS("http://www.w3.org/2000/svg","g")),Gz.setAttribute("transform",t),(t=Gz.transform.baseVal.consolidate())?Yz((t=t.matrix).a,t.b,t.c,t.d,t.e,t.f):Kz)}),", ",")",")")
13215
+ function tV(t){return((t=Math.exp(t))+1/t)/2}var eV,nV,iV=function t(e,n,i){function s(t,s){var o,r,a=t[0],l=t[1],c=t[2],d=s[0],h=s[1],u=s[2],p=d-a,f=h-l,m=p*p+f*f
13214
13216
  if(m<1e-12)r=Math.log(u/c)/e,o=function(t){return[a+t*p,l+t*f,c*Math.exp(e*t*r)]}
13215
13217
  else{var g=Math.sqrt(m),v=(u*u-c*c+i*m)/(2*c*n*g),b=(u*u-c*c-i*m)/(2*u*n*g),y=Math.log(Math.sqrt(v*v+1)-v),w=Math.log(Math.sqrt(b*b+1)-b)
13216
- r=(w-y)/e,o=function(t){var i,s=t*r,o=Qz(y),d=c/(n*g)*(o*(i=e*s+y,((i=Math.exp(2*i))-1)/(i+1))-function(t){return((t=Math.exp(t))-1/t)/2}(y))
13217
- return[a+d*p,l+d*f,c*o/Qz(e*s+y)]}}return o.duration=1e3*r*e/Math.SQRT2,o}return s.rho=function(e){var n=Math.max(.001,+e),i=n*n
13218
- return t(n,i,i*i)},s}(Math.SQRT2,2,4),iV=0,sV=0,oV=0,rV=1e3,aV=0,lV=0,cV=0,dV="object"==typeof performance&&performance.now?performance:Date,hV="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)}
13219
- function uV(){return lV||(hV(pV),lV=dV.now()+cV)}function pV(){lV=0}function fV(){this._call=this._time=this._next=null}function mV(t,e,n){var i=new fV
13220
- return i.restart(t,e,n),i}function gV(){lV=(aV=dV.now())+cV,iV=sV=0
13221
- try{!function(){uV(),++iV
13222
- for(var t,e=tV;e;)(t=lV-e._time)>=0&&e._call.call(void 0,t),e=e._next;--iV}()}finally{iV=0,function(){var t,e,n=tV,i=1/0
13223
- for(;n;)n._call?(i>n._time&&(i=n._time),t=n,n=n._next):(e=n._next,n._next=null,n=t?t._next=e:tV=e)
13224
- eV=t,bV(i)}(),lV=0}}function vV(){var t=dV.now(),e=t-aV
13225
- e>rV&&(cV-=e,aV=t)}function bV(t){iV||(sV&&(sV=clearTimeout(sV)),t-lV>24?(t<1/0&&(sV=setTimeout(gV,t-dV.now()-cV)),oV&&(oV=clearInterval(oV))):(oV||(aV=dV.now(),oV=setInterval(vV,rV)),iV=1,hV(gV)))}function yV(t,e,n){var i=new fV
13226
- return e=null==e?0:+e,i.restart((n=>{i.stop(),t(n+e)}),e,n),i}fV.prototype=mV.prototype={constructor:fV,restart:function(t,e,n){if("function"!=typeof t)throw new TypeError("callback is not a function")
13227
- n=(null==n?uV():+n)+(null==e?0:+e),this._next||eV===this||(eV?eV._next=this:tV=this,eV=this),this._call=t,this._time=n,bV()},stop:function(){this._call&&(this._call=null,this._time=1/0,bV())}}
13228
- var wV=TB("start","end","cancel","interrupt"),xV=[],CV=0,kV=1,SV=2,_V=3,IV=4,MV=5,$V=6
13229
- function EV(t,e,n,i,s,o){var r=t.__transition
13218
+ r=(w-y)/e,o=function(t){var i,s=t*r,o=tV(y),d=c/(n*g)*(o*(i=e*s+y,((i=Math.exp(2*i))-1)/(i+1))-function(t){return((t=Math.exp(t))-1/t)/2}(y))
13219
+ return[a+d*p,l+d*f,c*o/tV(e*s+y)]}}return o.duration=1e3*r*e/Math.SQRT2,o}return s.rho=function(e){var n=Math.max(.001,+e),i=n*n
13220
+ return t(n,i,i*i)},s}(Math.SQRT2,2,4),sV=0,oV=0,rV=0,aV=1e3,lV=0,cV=0,dV=0,hV="object"==typeof performance&&performance.now?performance:Date,uV="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)}
13221
+ function pV(){return cV||(uV(fV),cV=hV.now()+dV)}function fV(){cV=0}function mV(){this._call=this._time=this._next=null}function gV(t,e,n){var i=new mV
13222
+ return i.restart(t,e,n),i}function vV(){cV=(lV=hV.now())+dV,sV=oV=0
13223
+ try{!function(){pV(),++sV
13224
+ for(var t,e=eV;e;)(t=cV-e._time)>=0&&e._call.call(void 0,t),e=e._next;--sV}()}finally{sV=0,function(){var t,e,n=eV,i=1/0
13225
+ for(;n;)n._call?(i>n._time&&(i=n._time),t=n,n=n._next):(e=n._next,n._next=null,n=t?t._next=e:eV=e)
13226
+ nV=t,yV(i)}(),cV=0}}function bV(){var t=hV.now(),e=t-lV
13227
+ e>aV&&(dV-=e,lV=t)}function yV(t){sV||(oV&&(oV=clearTimeout(oV)),t-cV>24?(t<1/0&&(oV=setTimeout(vV,t-hV.now()-dV)),rV&&(rV=clearInterval(rV))):(rV||(lV=hV.now(),rV=setInterval(bV,aV)),sV=1,uV(vV)))}function wV(t,e,n){var i=new mV
13228
+ return e=null==e?0:+e,i.restart((n=>{i.stop(),t(n+e)}),e,n),i}mV.prototype=gV.prototype={constructor:mV,restart:function(t,e,n){if("function"!=typeof t)throw new TypeError("callback is not a function")
13229
+ n=(null==n?pV():+n)+(null==e?0:+e),this._next||nV===this||(nV?nV._next=this:eV=this,nV=this),this._call=t,this._time=n,yV()},stop:function(){this._call&&(this._call=null,this._time=1/0,yV())}}
13230
+ var xV=OB("start","end","cancel","interrupt"),CV=[],kV=0,SV=1,_V=2,IV=3,MV=4,$V=5,EV=6
13231
+ function DV(t,e,n,i,s,o){var r=t.__transition
13230
13232
  if(r){if(n in r)return}else t.__transition={}
13231
13233
  !function(t,e,n){var i,s=t.__transition
13232
- function o(t){n.state=kV,n.timer.restart(r,n.delay,n.time),n.delay<=t&&r(t-n.delay)}function r(o){var c,d,h,u
13233
- if(n.state!==kV)return l()
13234
- for(c in s)if((u=s[c]).name===n.name){if(u.state===_V)return yV(r)
13235
- u.state===IV?(u.state=$V,u.timer.stop(),u.on.call("interrupt",t,t.__data__,u.index,u.group),delete s[c]):+c<e&&(u.state=$V,u.timer.stop(),u.on.call("cancel",t,t.__data__,u.index,u.group),delete s[c])}if(yV((function(){n.state===_V&&(n.state=IV,n.timer.restart(a,n.delay,n.time),a(o))})),n.state=SV,n.on.call("start",t,t.__data__,n.index,n.group),n.state===SV){for(n.state=_V,i=new Array(h=n.tween.length),c=0,d=-1;c<h;++c)(u=n.tween[c].value.call(t,t.__data__,n.index,n.group))&&(i[++d]=u)
13236
- i.length=d+1}}function a(e){for(var s=e<n.duration?n.ease.call(null,e/n.duration):(n.timer.restart(l),n.state=MV,1),o=-1,r=i.length;++o<r;)i[o].call(t,s)
13237
- n.state===MV&&(n.on.call("end",t,t.__data__,n.index,n.group),l())}function l(){for(var i in n.state=$V,n.timer.stop(),delete s[e],s)return
13238
- delete t.__transition}s[e]=n,n.timer=mV(o,0,n.time)}(t,n,{name:e,index:i,group:s,on:wV,tween:xV,time:o.time,delay:o.delay,duration:o.duration,ease:o.ease,timer:null,state:CV})}function DV(t,e){var n=TV(t,e)
13239
- if(n.state>CV)throw new Error("too late; already scheduled")
13240
- return n}function AV(t,e){var n=TV(t,e)
13241
- if(n.state>_V)throw new Error("too late; already running")
13242
- return n}function TV(t,e){var n=t.__transition
13234
+ function o(t){n.state=SV,n.timer.restart(r,n.delay,n.time),n.delay<=t&&r(t-n.delay)}function r(o){var c,d,h,u
13235
+ if(n.state!==SV)return l()
13236
+ for(c in s)if((u=s[c]).name===n.name){if(u.state===IV)return wV(r)
13237
+ u.state===MV?(u.state=EV,u.timer.stop(),u.on.call("interrupt",t,t.__data__,u.index,u.group),delete s[c]):+c<e&&(u.state=EV,u.timer.stop(),u.on.call("cancel",t,t.__data__,u.index,u.group),delete s[c])}if(wV((function(){n.state===IV&&(n.state=MV,n.timer.restart(a,n.delay,n.time),a(o))})),n.state=_V,n.on.call("start",t,t.__data__,n.index,n.group),n.state===_V){for(n.state=IV,i=new Array(h=n.tween.length),c=0,d=-1;c<h;++c)(u=n.tween[c].value.call(t,t.__data__,n.index,n.group))&&(i[++d]=u)
13238
+ i.length=d+1}}function a(e){for(var s=e<n.duration?n.ease.call(null,e/n.duration):(n.timer.restart(l),n.state=$V,1),o=-1,r=i.length;++o<r;)i[o].call(t,s)
13239
+ n.state===$V&&(n.on.call("end",t,t.__data__,n.index,n.group),l())}function l(){for(var i in n.state=EV,n.timer.stop(),delete s[e],s)return
13240
+ delete t.__transition}s[e]=n,n.timer=gV(o,0,n.time)}(t,n,{name:e,index:i,group:s,on:xV,tween:CV,time:o.time,delay:o.delay,duration:o.duration,ease:o.ease,timer:null,state:kV})}function AV(t,e){var n=OV(t,e)
13241
+ if(n.state>kV)throw new Error("too late; already scheduled")
13242
+ return n}function TV(t,e){var n=OV(t,e)
13243
+ if(n.state>IV)throw new Error("too late; already running")
13244
+ return n}function OV(t,e){var n=t.__transition
13243
13245
  if(!n||!(n=n[e]))throw new Error("transition not found")
13244
- return n}function OV(t,e){var n,i,s,o=t.__transition,r=!0
13245
- if(o){for(s in e=null==e?null:e+"",o)(n=o[s]).name===e?(i=n.state>SV&&n.state<MV,n.state=$V,n.timer.stop(),n.on.call(i?"interrupt":"cancel",t,t.__data__,n.index,n.group),delete o[s]):r=!1
13246
- r&&delete t.__transition}}function RV(t,e){var n,i
13247
- return function(){var s=AV(this,t),o=s.tween
13246
+ return n}function RV(t,e){var n,i,s,o=t.__transition,r=!0
13247
+ if(o){for(s in e=null==e?null:e+"",o)(n=o[s]).name===e?(i=n.state>_V&&n.state<$V,n.state=EV,n.timer.stop(),n.on.call(i?"interrupt":"cancel",t,t.__data__,n.index,n.group),delete o[s]):r=!1
13248
+ r&&delete t.__transition}}function FV(t,e){var n,i
13249
+ return function(){var s=TV(this,t),o=s.tween
13248
13250
  if(o!==n)for(var r=0,a=(i=n=o).length;r<a;++r)if(i[r].name===e){(i=i.slice()).splice(r,1)
13249
- break}s.tween=i}}function FV(t,e,n){var i,s
13251
+ break}s.tween=i}}function NV(t,e,n){var i,s
13250
13252
  if("function"!=typeof n)throw new Error
13251
- return function(){var o=AV(this,t),r=o.tween
13253
+ return function(){var o=TV(this,t),r=o.tween
13252
13254
  if(r!==i){s=(i=r).slice()
13253
13255
  for(var a={name:e,value:n},l=0,c=s.length;l<c;++l)if(s[l].name===e){s[l]=a
13254
- break}l===c&&s.push(a)}o.tween=s}}function NV(t,e,n){var i=t._id
13255
- return t.each((function(){var t=AV(this,i);(t.value||(t.value={}))[e]=n.apply(this,arguments)})),function(t){return TV(t,i).value[e]}}function LV(t,e){var n
13256
- return("number"==typeof e?Pz:e instanceof gz?Fz:(n=gz(e))?(e=n,Fz):Uz)(t,e)}function BV(t){return function(){this.removeAttribute(t)}}function PV(t){return function(){this.removeAttributeNS(t.space,t.local)}}function zV(t,e,n){var i,s,o=n+""
13256
+ break}l===c&&s.push(a)}o.tween=s}}function LV(t,e,n){var i=t._id
13257
+ return t.each((function(){var t=TV(this,i);(t.value||(t.value={}))[e]=n.apply(this,arguments)})),function(t){return OV(t,i).value[e]}}function BV(t,e){var n
13258
+ return("number"==typeof e?zz:e instanceof vz?Nz:(n=vz(e))?(e=n,Nz):qz)(t,e)}function PV(t){return function(){this.removeAttribute(t)}}function zV(t){return function(){this.removeAttributeNS(t.space,t.local)}}function VV(t,e,n){var i,s,o=n+""
13257
13259
  return function(){var r=this.getAttribute(t)
13258
- return r===o?null:r===i?s:s=e(i=r,n)}}function VV(t,e,n){var i,s,o=n+""
13260
+ return r===o?null:r===i?s:s=e(i=r,n)}}function HV(t,e,n){var i,s,o=n+""
13259
13261
  return function(){var r=this.getAttributeNS(t.space,t.local)
13260
- return r===o?null:r===i?s:s=e(i=r,n)}}function HV(t,e,n){var i,s,o
13262
+ return r===o?null:r===i?s:s=e(i=r,n)}}function UV(t,e,n){var i,s,o
13261
13263
  return function(){var r,a,l=n(this)
13262
13264
  if(null!=l)return(r=this.getAttribute(t))===(a=l+"")?null:r===i&&a===s?o:(s=a,o=e(i=r,l))
13263
- this.removeAttribute(t)}}function UV(t,e,n){var i,s,o
13265
+ this.removeAttribute(t)}}function qV(t,e,n){var i,s,o
13264
13266
  return function(){var r,a,l=n(this)
13265
13267
  if(null!=l)return(r=this.getAttributeNS(t.space,t.local))===(a=l+"")?null:r===i&&a===s?o:(s=a,o=e(i=r,l))
13266
- this.removeAttributeNS(t.space,t.local)}}function qV(t,e){var n,i
13268
+ this.removeAttributeNS(t.space,t.local)}}function jV(t,e){var n,i
13267
13269
  function s(){var s=e.apply(this,arguments)
13268
- return s!==i&&(n=(i=s)&&function(t,e){return function(n){this.setAttributeNS(t.space,t.local,e.call(this,n))}}(t,s)),n}return s._value=e,s}function jV(t,e){var n,i
13270
+ return s!==i&&(n=(i=s)&&function(t,e){return function(n){this.setAttributeNS(t.space,t.local,e.call(this,n))}}(t,s)),n}return s._value=e,s}function WV(t,e){var n,i
13269
13271
  function s(){var s=e.apply(this,arguments)
13270
- return s!==i&&(n=(i=s)&&function(t,e){return function(n){this.setAttribute(t,e.call(this,n))}}(t,s)),n}return s._value=e,s}function WV(t,e){return function(){DV(this,t).delay=+e.apply(this,arguments)}}function GV(t,e){return e=+e,function(){DV(this,t).delay=e}}function ZV(t,e){return function(){AV(this,t).duration=+e.apply(this,arguments)}}function KV(t,e){return e=+e,function(){AV(this,t).duration=e}}var YV=GP.prototype.constructor
13271
- function XV(t){return function(){this.style.removeProperty(t)}}var JV=0
13272
- function QV(t,e,n,i){this._groups=t,this._parents=e,this._name=n,this._id=i}function tH(){return++JV}var eH=GP.prototype
13273
- QV.prototype={constructor:QV,select:function(t){var e=this._name,n=this._id
13274
- "function"!=typeof t&&(t=UB(t))
13275
- for(var i=this._groups,s=i.length,o=new Array(s),r=0;r<s;++r)for(var a,l,c=i[r],d=c.length,h=o[r]=new Array(d),u=0;u<d;++u)(a=c[u])&&(l=t.call(a,a.__data__,u,c))&&("__data__"in a&&(l.__data__=a.__data__),h[u]=l,EV(h[u],e,n,u,h,TV(a,n)))
13276
- return new QV(o,this._parents,e,n)},selectAll:function(t){var e=this._name,n=this._id
13277
- "function"!=typeof t&&(t=jB(t))
13278
- for(var i=this._groups,s=i.length,o=[],r=[],a=0;a<s;++a)for(var l,c=i[a],d=c.length,h=0;h<d;++h)if(l=c[h]){for(var u,p=t.call(l,l.__data__,h,c),f=TV(l,n),m=0,g=p.length;m<g;++m)(u=p[m])&&EV(u,e,n,m,p,f)
13279
- o.push(p),r.push(l)}return new QV(o,r,e,n)},selectChild:eH.selectChild,selectChildren:eH.selectChildren,filter:function(t){"function"!=typeof t&&(t=GB(t))
13272
+ return s!==i&&(n=(i=s)&&function(t,e){return function(n){this.setAttribute(t,e.call(this,n))}}(t,s)),n}return s._value=e,s}function GV(t,e){return function(){AV(this,t).delay=+e.apply(this,arguments)}}function ZV(t,e){return e=+e,function(){AV(this,t).delay=e}}function KV(t,e){return function(){TV(this,t).duration=+e.apply(this,arguments)}}function YV(t,e){return e=+e,function(){TV(this,t).duration=e}}var XV=ZP.prototype.constructor
13273
+ function JV(t){return function(){this.style.removeProperty(t)}}var QV=0
13274
+ function tH(t,e,n,i){this._groups=t,this._parents=e,this._name=n,this._id=i}function eH(){return++QV}var nH=ZP.prototype
13275
+ tH.prototype={constructor:tH,select:function(t){var e=this._name,n=this._id
13276
+ "function"!=typeof t&&(t=qB(t))
13277
+ for(var i=this._groups,s=i.length,o=new Array(s),r=0;r<s;++r)for(var a,l,c=i[r],d=c.length,h=o[r]=new Array(d),u=0;u<d;++u)(a=c[u])&&(l=t.call(a,a.__data__,u,c))&&("__data__"in a&&(l.__data__=a.__data__),h[u]=l,DV(h[u],e,n,u,h,OV(a,n)))
13278
+ return new tH(o,this._parents,e,n)},selectAll:function(t){var e=this._name,n=this._id
13279
+ "function"!=typeof t&&(t=WB(t))
13280
+ for(var i=this._groups,s=i.length,o=[],r=[],a=0;a<s;++a)for(var l,c=i[a],d=c.length,h=0;h<d;++h)if(l=c[h]){for(var u,p=t.call(l,l.__data__,h,c),f=OV(l,n),m=0,g=p.length;m<g;++m)(u=p[m])&&DV(u,e,n,m,p,f)
13281
+ o.push(p),r.push(l)}return new tH(o,r,e,n)},selectChild:nH.selectChild,selectChildren:nH.selectChildren,filter:function(t){"function"!=typeof t&&(t=ZB(t))
13280
13282
  for(var e=this._groups,n=e.length,i=new Array(n),s=0;s<n;++s)for(var o,r=e[s],a=r.length,l=i[s]=[],c=0;c<a;++c)(o=r[c])&&t.call(o,o.__data__,c,r)&&l.push(o)
13281
- return new QV(i,this._parents,this._name,this._id)},merge:function(t){if(t._id!==this._id)throw new Error
13283
+ return new tH(i,this._parents,this._name,this._id)},merge:function(t){if(t._id!==this._id)throw new Error
13282
13284
  for(var e=this._groups,n=t._groups,i=e.length,s=n.length,o=Math.min(i,s),r=new Array(i),a=0;a<o;++a)for(var l,c=e[a],d=n[a],h=c.length,u=r[a]=new Array(h),p=0;p<h;++p)(l=c[p]||d[p])&&(u[p]=l)
13283
13285
  for(;a<i;++a)r[a]=e[a]
13284
- return new QV(r,this._parents,this._name,this._id)},selection:function(){return new YV(this._groups,this._parents)},transition:function(){for(var t=this._name,e=this._id,n=tH(),i=this._groups,s=i.length,o=0;o<s;++o)for(var r,a=i[o],l=a.length,c=0;c<l;++c)if(r=a[c]){var d=TV(r,e)
13285
- EV(r,t,n,c,a,{time:d.time+d.delay+d.duration,delay:0,duration:d.duration,ease:d.ease})}return new QV(i,this._parents,t,n)},call:eH.call,nodes:eH.nodes,node:eH.node,size:eH.size,empty:eH.empty,each:eH.each,on:function(t,e){var n=this._id
13286
- return arguments.length<2?TV(this.node(),n).on.on(t):this.each(function(t,e,n){var i,s,o=function(t){return(t+"").trim().split(/^|\s+/).every((function(t){var e=t.indexOf(".")
13287
- return e>=0&&(t=t.slice(0,e)),!t||"start"===t}))}(e)?DV:AV
13286
+ return new tH(r,this._parents,this._name,this._id)},selection:function(){return new XV(this._groups,this._parents)},transition:function(){for(var t=this._name,e=this._id,n=eH(),i=this._groups,s=i.length,o=0;o<s;++o)for(var r,a=i[o],l=a.length,c=0;c<l;++c)if(r=a[c]){var d=OV(r,e)
13287
+ DV(r,t,n,c,a,{time:d.time+d.delay+d.duration,delay:0,duration:d.duration,ease:d.ease})}return new tH(i,this._parents,t,n)},call:nH.call,nodes:nH.nodes,node:nH.node,size:nH.size,empty:nH.empty,each:nH.each,on:function(t,e){var n=this._id
13288
+ return arguments.length<2?OV(this.node(),n).on.on(t):this.each(function(t,e,n){var i,s,o=function(t){return(t+"").trim().split(/^|\s+/).every((function(t){var e=t.indexOf(".")
13289
+ return e>=0&&(t=t.slice(0,e)),!t||"start"===t}))}(e)?AV:TV
13288
13290
  return function(){var r=o(this,t),a=r.on
13289
- a!==i&&(s=(i=a).copy()).on(e,n),r.on=s}}(n,t,e))},attr:function(t,e){var n=BB(t),i="transform"===n?Jz:LV
13290
- return this.attrTween(t,"function"==typeof e?(n.local?UV:HV)(n,i,NV(this,"attr."+t,e)):null==e?(n.local?PV:BV)(n):(n.local?VV:zV)(n,i,e))},attrTween:function(t,e){var n="attr."+t
13291
+ a!==i&&(s=(i=a).copy()).on(e,n),r.on=s}}(n,t,e))},attr:function(t,e){var n=PB(t),i="transform"===n?Qz:BV
13292
+ return this.attrTween(t,"function"==typeof e?(n.local?qV:UV)(n,i,LV(this,"attr."+t,e)):null==e?(n.local?zV:PV)(n):(n.local?HV:VV)(n,i,e))},attrTween:function(t,e){var n="attr."+t
13291
13293
  if(arguments.length<2)return(n=this.tween(n))&&n._value
13292
13294
  if(null==e)return this.tween(n,null)
13293
13295
  if("function"!=typeof e)throw new Error
13294
- var i=BB(t)
13295
- return this.tween(n,(i.local?qV:jV)(i,e))},style:function(t,e,n){var i="transform"==(t+="")?Xz:LV
13296
+ var i=PB(t)
13297
+ return this.tween(n,(i.local?jV:WV)(i,e))},style:function(t,e,n){var i="transform"==(t+="")?Jz:BV
13296
13298
  return null==e?this.styleTween(t,function(t,e){var n,i,s
13297
- return function(){var o=gP(this,t),r=(this.style.removeProperty(t),gP(this,t))
13298
- return o===r?null:o===n&&r===i?s:s=e(n=o,i=r)}}(t,i)).on("end.style."+t,XV(t)):"function"==typeof e?this.styleTween(t,function(t,e,n){var i,s,o
13299
- return function(){var r=gP(this,t),a=n(this),l=a+""
13300
- return null==a&&(this.style.removeProperty(t),l=a=gP(this,t)),r===l?null:r===i&&l===s?o:(s=l,o=e(i=r,a))}}(t,i,NV(this,"style."+t,e))).each(function(t,e){var n,i,s,o,r="style."+e,a="end."+r
13301
- return function(){var l=AV(this,t),c=l.on,d=null==l.value[r]?o||(o=XV(e)):void 0
13299
+ return function(){var o=vP(this,t),r=(this.style.removeProperty(t),vP(this,t))
13300
+ return o===r?null:o===n&&r===i?s:s=e(n=o,i=r)}}(t,i)).on("end.style."+t,JV(t)):"function"==typeof e?this.styleTween(t,function(t,e,n){var i,s,o
13301
+ return function(){var r=vP(this,t),a=n(this),l=a+""
13302
+ return null==a&&(this.style.removeProperty(t),l=a=vP(this,t)),r===l?null:r===i&&l===s?o:(s=l,o=e(i=r,a))}}(t,i,LV(this,"style."+t,e))).each(function(t,e){var n,i,s,o,r="style."+e,a="end."+r
13303
+ return function(){var l=TV(this,t),c=l.on,d=null==l.value[r]?o||(o=JV(e)):void 0
13302
13304
  c===n&&s===d||(i=(n=c).copy()).on(a,s=d),l.on=i}}(this._id,t)):this.styleTween(t,function(t,e,n){var i,s,o=n+""
13303
- return function(){var r=gP(this,t)
13305
+ return function(){var r=vP(this,t)
13304
13306
  return r===o?null:r===i?s:s=e(i=r,n)}}(t,i,e),n).on("end.style."+t,null)},styleTween:function(t,e,n){var i="style."+(t+="")
13305
13307
  if(arguments.length<2)return(i=this.tween(i))&&i._value
13306
13308
  if(null==e)return this.tween(i,null)
@@ -13308,7 +13310,7 @@ if("function"!=typeof e)throw new Error
13308
13310
  return this.tween(i,function(t,e,n){var i,s
13309
13311
  function o(){var o=e.apply(this,arguments)
13310
13312
  return o!==s&&(i=(s=o)&&function(t,e,n){return function(i){this.style.setProperty(t,e.call(this,i),n)}}(t,o,n)),i}return o._value=e,o}(t,e,null==n?"":n))},text:function(t){return this.tween("text","function"==typeof t?function(t){return function(){var e=t(this)
13311
- this.textContent=null==e?"":e}}(NV(this,"text",t)):function(t){return function(){this.textContent=t}}(null==t?"":t+""))},textTween:function(t){var e="text"
13313
+ this.textContent=null==e?"":e}}(LV(this,"text",t)):function(t){return function(){this.textContent=t}}(null==t?"":t+""))},textTween:function(t){var e="text"
13312
13314
  if(arguments.length<1)return(e=this.tween(e))&&e._value
13313
13315
  if(null==t)return this.tween(e,null)
13314
13316
  if("function"!=typeof t)throw new Error
@@ -13317,108 +13319,108 @@ function i(){var i=t.apply(this,arguments)
13317
13319
  return i!==n&&(e=(n=i)&&function(t){return function(e){this.textContent=t.call(this,e)}}(i)),e}return i._value=t,i}(t))},remove:function(){return this.on("end.remove",function(t){return function(){var e=this.parentNode
13318
13320
  for(var n in this.__transition)if(+n!==t)return
13319
13321
  e&&e.removeChild(this)}}(this._id))},tween:function(t,e){var n=this._id
13320
- if(t+="",arguments.length<2){for(var i,s=TV(this.node(),n).tween,o=0,r=s.length;o<r;++o)if((i=s[o]).name===t)return i.value
13321
- return null}return this.each((null==e?RV:FV)(n,t,e))},delay:function(t){var e=this._id
13322
- return arguments.length?this.each(("function"==typeof t?WV:GV)(e,t)):TV(this.node(),e).delay},duration:function(t){var e=this._id
13323
- return arguments.length?this.each(("function"==typeof t?ZV:KV)(e,t)):TV(this.node(),e).duration},ease:function(t){var e=this._id
13322
+ if(t+="",arguments.length<2){for(var i,s=OV(this.node(),n).tween,o=0,r=s.length;o<r;++o)if((i=s[o]).name===t)return i.value
13323
+ return null}return this.each((null==e?FV:NV)(n,t,e))},delay:function(t){var e=this._id
13324
+ return arguments.length?this.each(("function"==typeof t?GV:ZV)(e,t)):OV(this.node(),e).delay},duration:function(t){var e=this._id
13325
+ return arguments.length?this.each(("function"==typeof t?KV:YV)(e,t)):OV(this.node(),e).duration},ease:function(t){var e=this._id
13324
13326
  return arguments.length?this.each(function(t,e){if("function"!=typeof e)throw new Error
13325
- return function(){AV(this,t).ease=e}}(e,t)):TV(this.node(),e).ease},easeVarying:function(t){if("function"!=typeof t)throw new Error
13327
+ return function(){TV(this,t).ease=e}}(e,t)):OV(this.node(),e).ease},easeVarying:function(t){if("function"!=typeof t)throw new Error
13326
13328
  return this.each(function(t,e){return function(){var n=e.apply(this,arguments)
13327
13329
  if("function"!=typeof n)throw new Error
13328
- AV(this,t).ease=n}}(this._id,t))},end:function(){var t,e,n=this,i=n._id,s=n.size()
13330
+ TV(this,t).ease=n}}(this._id,t))},end:function(){var t,e,n=this,i=n._id,s=n.size()
13329
13331
  return new Promise((function(o,r){var a={value:r},l={value:function(){0==--s&&o()}}
13330
- n.each((function(){var n=AV(this,i),s=n.on
13331
- s!==t&&((e=(t=s).copy())._.cancel.push(a),e._.interrupt.push(a),e._.end.push(l)),n.on=e})),0===s&&o()}))},[Symbol.iterator]:eH[Symbol.iterator]}
13332
- var nH={time:null,delay:0,duration:250,ease:function(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}}
13333
- function iH(t,e){for(var n;!(n=t.__transition)||!(n=n[e]);)if(!(t=t.parentNode))throw new Error(`transition ${e} not found`)
13334
- return n}GP.prototype.interrupt=function(t){return this.each((function(){OV(this,t)}))},GP.prototype.transition=function(t){var e,n
13335
- t instanceof QV?(e=t._id,t=t._name):(e=tH(),(n=nH).time=uV(),t=null==t?null:t+"")
13336
- for(var i=this._groups,s=i.length,o=0;o<s;++o)for(var r,a=i[o],l=a.length,c=0;c<l;++c)(r=a[c])&&EV(r,t,e,c,a,n||iH(r,e))
13337
- return new QV(i,this._parents,t,e)}
13338
- var sH=t=>()=>t
13339
- function oH(t,{sourceEvent:e,target:n,transform:i,dispatch:s}){Object.defineProperties(this,{type:{value:t,enumerable:!0,configurable:!0},sourceEvent:{value:e,enumerable:!0,configurable:!0},target:{value:n,enumerable:!0,configurable:!0},transform:{value:i,enumerable:!0,configurable:!0},_:{value:s}})}function rH(t,e,n){this.k=t,this.x=e,this.y=n}rH.prototype={constructor:rH,scale:function(t){return 1===t?this:new rH(this.k*t,this.x,this.y)},translate:function(t,e){return 0===t&0===e?this:new rH(this.k,this.x+this.k*t,this.y+this.k*e)},apply:function(t){return[t[0]*this.k+this.x,t[1]*this.k+this.y]},applyX:function(t){return t*this.k+this.x},applyY:function(t){return t*this.k+this.y},invert:function(t){return[(t[0]-this.x)/this.k,(t[1]-this.y)/this.k]},invertX:function(t){return(t-this.x)/this.k},invertY:function(t){return(t-this.y)/this.k},rescaleX:function(t){return t.copy().domain(t.range().map(this.invertX,this).map(t.invert,t))},rescaleY:function(t){return t.copy().domain(t.range().map(this.invertY,this).map(t.invert,t))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}}
13340
- var aH=new rH(1,0,0)
13341
- function lH(t){t.stopImmediatePropagation()}function cH(t){t.preventDefault(),t.stopImmediatePropagation()}function dH(t){return!(t.ctrlKey&&"wheel"!==t.type||t.button)}function hH(){var t=this
13342
- return t instanceof SVGElement?(t=t.ownerSVGElement||t).hasAttribute("viewBox")?[[(t=t.viewBox.baseVal).x,t.y],[t.x+t.width,t.y+t.height]]:[[0,0],[t.width.baseVal.value,t.height.baseVal.value]]:[[0,0],[t.clientWidth,t.clientHeight]]}function uH(){return this.__zoom||aH}function pH(t){return-t.deltaY*(1===t.deltaMode?.05:t.deltaMode?1:.002)*(t.ctrlKey?10:1)}function fH(){return navigator.maxTouchPoints||"ontouchstart"in this}function mH(t,e,n){var i=t.invertX(e[0][0])-n[0][0],s=t.invertX(e[1][0])-n[1][0],o=t.invertY(e[0][1])-n[0][1],r=t.invertY(e[1][1])-n[1][1]
13343
- return t.translate(s>i?(i+s)/2:Math.min(0,i)||Math.max(0,s),r>o?(o+r)/2:Math.min(0,o)||Math.max(0,r))}function gH(){var t,e,n,i=dH,s=hH,o=mH,r=pH,a=fH,l=[0,1/0],c=[[-1/0,-1/0],[1/0,1/0]],d=250,h=nV,u=TB("start","zoom","end"),p=500,f=150,m=0,g=10
13344
- function v(t){t.property("__zoom",uH).on("wheel.zoom",S,{passive:!1}).on("mousedown.zoom",_).on("dblclick.zoom",I).filter(a).on("touchstart.zoom",M).on("touchmove.zoom",$).on("touchend.zoom touchcancel.zoom",E).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function b(t,e){return(e=Math.max(l[0],Math.min(l[1],e)))===t.k?t:new rH(e,t.x,t.y)}function y(t,e,n){var i=e[0]-n[0]*t.k,s=e[1]-n[1]*t.k
13345
- return i===t.x&&s===t.y?t:new rH(t.k,i,s)}function w(t){return[(+t[0][0]+ +t[1][0])/2,(+t[0][1]+ +t[1][1])/2]}function x(t,e,n,i){t.on("start.zoom",(function(){C(this,arguments).event(i).start()})).on("interrupt.zoom end.zoom",(function(){C(this,arguments).event(i).end()})).tween("zoom",(function(){var t=this,o=arguments,r=C(t,o).event(i),a=s.apply(t,o),l=null==n?w(a):"function"==typeof n?n.apply(t,o):n,c=Math.max(a[1][0]-a[0][0],a[1][1]-a[0][1]),d=t.__zoom,u="function"==typeof e?e.apply(t,o):e,p=h(d.invert(l).concat(c/d.k),u.invert(l).concat(c/u.k))
13332
+ n.each((function(){var n=TV(this,i),s=n.on
13333
+ s!==t&&((e=(t=s).copy())._.cancel.push(a),e._.interrupt.push(a),e._.end.push(l)),n.on=e})),0===s&&o()}))},[Symbol.iterator]:nH[Symbol.iterator]}
13334
+ var iH={time:null,delay:0,duration:250,ease:function(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}}
13335
+ function sH(t,e){for(var n;!(n=t.__transition)||!(n=n[e]);)if(!(t=t.parentNode))throw new Error(`transition ${e} not found`)
13336
+ return n}ZP.prototype.interrupt=function(t){return this.each((function(){RV(this,t)}))},ZP.prototype.transition=function(t){var e,n
13337
+ t instanceof tH?(e=t._id,t=t._name):(e=eH(),(n=iH).time=pV(),t=null==t?null:t+"")
13338
+ for(var i=this._groups,s=i.length,o=0;o<s;++o)for(var r,a=i[o],l=a.length,c=0;c<l;++c)(r=a[c])&&DV(r,t,e,c,a,n||sH(r,e))
13339
+ return new tH(i,this._parents,t,e)}
13340
+ var oH=t=>()=>t
13341
+ function rH(t,{sourceEvent:e,target:n,transform:i,dispatch:s}){Object.defineProperties(this,{type:{value:t,enumerable:!0,configurable:!0},sourceEvent:{value:e,enumerable:!0,configurable:!0},target:{value:n,enumerable:!0,configurable:!0},transform:{value:i,enumerable:!0,configurable:!0},_:{value:s}})}function aH(t,e,n){this.k=t,this.x=e,this.y=n}aH.prototype={constructor:aH,scale:function(t){return 1===t?this:new aH(this.k*t,this.x,this.y)},translate:function(t,e){return 0===t&0===e?this:new aH(this.k,this.x+this.k*t,this.y+this.k*e)},apply:function(t){return[t[0]*this.k+this.x,t[1]*this.k+this.y]},applyX:function(t){return t*this.k+this.x},applyY:function(t){return t*this.k+this.y},invert:function(t){return[(t[0]-this.x)/this.k,(t[1]-this.y)/this.k]},invertX:function(t){return(t-this.x)/this.k},invertY:function(t){return(t-this.y)/this.k},rescaleX:function(t){return t.copy().domain(t.range().map(this.invertX,this).map(t.invert,t))},rescaleY:function(t){return t.copy().domain(t.range().map(this.invertY,this).map(t.invert,t))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}}
13342
+ var lH=new aH(1,0,0)
13343
+ function cH(t){t.stopImmediatePropagation()}function dH(t){t.preventDefault(),t.stopImmediatePropagation()}function hH(t){return!(t.ctrlKey&&"wheel"!==t.type||t.button)}function uH(){var t=this
13344
+ return t instanceof SVGElement?(t=t.ownerSVGElement||t).hasAttribute("viewBox")?[[(t=t.viewBox.baseVal).x,t.y],[t.x+t.width,t.y+t.height]]:[[0,0],[t.width.baseVal.value,t.height.baseVal.value]]:[[0,0],[t.clientWidth,t.clientHeight]]}function pH(){return this.__zoom||lH}function fH(t){return-t.deltaY*(1===t.deltaMode?.05:t.deltaMode?1:.002)*(t.ctrlKey?10:1)}function mH(){return navigator.maxTouchPoints||"ontouchstart"in this}function gH(t,e,n){var i=t.invertX(e[0][0])-n[0][0],s=t.invertX(e[1][0])-n[1][0],o=t.invertY(e[0][1])-n[0][1],r=t.invertY(e[1][1])-n[1][1]
13345
+ return t.translate(s>i?(i+s)/2:Math.min(0,i)||Math.max(0,s),r>o?(o+r)/2:Math.min(0,o)||Math.max(0,r))}function vH(){var t,e,n,i=hH,s=uH,o=gH,r=fH,a=mH,l=[0,1/0],c=[[-1/0,-1/0],[1/0,1/0]],d=250,h=iV,u=OB("start","zoom","end"),p=500,f=150,m=0,g=10
13346
+ function v(t){t.property("__zoom",pH).on("wheel.zoom",S,{passive:!1}).on("mousedown.zoom",_).on("dblclick.zoom",I).filter(a).on("touchstart.zoom",M).on("touchmove.zoom",$).on("touchend.zoom touchcancel.zoom",E).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function b(t,e){return(e=Math.max(l[0],Math.min(l[1],e)))===t.k?t:new aH(e,t.x,t.y)}function y(t,e,n){var i=e[0]-n[0]*t.k,s=e[1]-n[1]*t.k
13347
+ return i===t.x&&s===t.y?t:new aH(t.k,i,s)}function w(t){return[(+t[0][0]+ +t[1][0])/2,(+t[0][1]+ +t[1][1])/2]}function x(t,e,n,i){t.on("start.zoom",(function(){C(this,arguments).event(i).start()})).on("interrupt.zoom end.zoom",(function(){C(this,arguments).event(i).end()})).tween("zoom",(function(){var t=this,o=arguments,r=C(t,o).event(i),a=s.apply(t,o),l=null==n?w(a):"function"==typeof n?n.apply(t,o):n,c=Math.max(a[1][0]-a[0][0],a[1][1]-a[0][1]),d=t.__zoom,u="function"==typeof e?e.apply(t,o):e,p=h(d.invert(l).concat(c/d.k),u.invert(l).concat(c/u.k))
13346
13348
  return function(t){if(1===t)t=u
13347
13349
  else{var e=p(t),n=c/e[2]
13348
- t=new rH(n,l[0]-e[0]*n,l[1]-e[1]*n)}r.zoom(null,t)}}))}function C(t,e,n){return!n&&t.__zooming||new k(t,e)}function k(t,e){this.that=t,this.args=e,this.active=0,this.sourceEvent=null,this.extent=s.apply(t,e),this.taps=0}function S(t,...e){if(i.apply(this,arguments)){var n=C(this,e).event(t),s=this.__zoom,a=Math.max(l[0],Math.min(l[1],s.k*Math.pow(2,r.apply(this,arguments)))),d=KP(t)
13350
+ t=new aH(n,l[0]-e[0]*n,l[1]-e[1]*n)}r.zoom(null,t)}}))}function C(t,e,n){return!n&&t.__zooming||new k(t,e)}function k(t,e){this.that=t,this.args=e,this.active=0,this.sourceEvent=null,this.extent=s.apply(t,e),this.taps=0}function S(t,...e){if(i.apply(this,arguments)){var n=C(this,e).event(t),s=this.__zoom,a=Math.max(l[0],Math.min(l[1],s.k*Math.pow(2,r.apply(this,arguments)))),d=YP(t)
13349
13351
  if(n.wheel)n.mouse[0][0]===d[0]&&n.mouse[0][1]===d[1]||(n.mouse[1]=s.invert(n.mouse[0]=d)),clearTimeout(n.wheel)
13350
13352
  else{if(s.k===a)return
13351
- n.mouse=[d,s.invert(d)],OV(this),n.start()}cH(t),n.wheel=setTimeout((function(){n.wheel=null,n.end()}),f),n.zoom("mouse",o(y(b(s,a),n.mouse[0],n.mouse[1]),n.extent,c))}}function _(t,...e){if(!n&&i.apply(this,arguments)){var s=t.currentTarget,r=C(this,e,!0).event(t),a=ZP(t.view).on("mousemove.zoom",(function(t){if(cH(t),!r.moved){var e=t.clientX-d,n=t.clientY-h
13352
- r.moved=e*e+n*n>m}r.event(t).zoom("mouse",o(y(r.that.__zoom,r.mouse[0]=KP(t,s),r.mouse[1]),r.extent,c))}),!0).on("mouseup.zoom",(function(t){a.on("mousemove.zoom mouseup.zoom",null),function(t,e){var n=t.document.documentElement,i=ZP(t).on("dragstart.drag",null)
13353
- e&&(i.on("click.drag",XP,YP),setTimeout((function(){i.on("click.drag",null)}),0)),"onselectstart"in n?i.on("selectstart.drag",null):(n.style.MozUserSelect=n.__noselect,delete n.__noselect)}(t.view,r.moved),cH(t),r.event(t).end()}),!0),l=KP(t,s),d=t.clientX,h=t.clientY
13354
- !function(t){var e=t.document.documentElement,n=ZP(t).on("dragstart.drag",XP,YP)
13355
- "onselectstart"in e?n.on("selectstart.drag",XP,YP):(e.__noselect=e.style.MozUserSelect,e.style.MozUserSelect="none")}(t.view),lH(t),r.mouse=[l,this.__zoom.invert(l)],OV(this),r.start()}}function I(t,...e){if(i.apply(this,arguments)){var n=this.__zoom,r=KP(t.changedTouches?t.changedTouches[0]:t,this),a=n.invert(r),l=n.k*(t.shiftKey?.5:2),h=o(y(b(n,l),r,a),s.apply(this,e),c)
13356
- cH(t),d>0?ZP(this).transition().duration(d).call(x,h,r,t):ZP(this).call(v.transform,h,r,t)}}function M(n,...s){if(i.apply(this,arguments)){var o,r,a,l,c=n.touches,d=c.length,h=C(this,s,n.changedTouches.length===d).event(n)
13357
- for(lH(n),r=0;r<d;++r)l=[l=KP(a=c[r],this),this.__zoom.invert(l),a.identifier],h.touch0?h.touch1||h.touch0[2]===l[2]||(h.touch1=l,h.taps=0):(h.touch0=l,o=!0,h.taps=1+!!t)
13358
- t&&(t=clearTimeout(t)),o&&(h.taps<2&&(e=l[0],t=setTimeout((function(){t=null}),p)),OV(this),h.start())}}function $(t,...e){if(this.__zooming){var n,i,s,r,a=C(this,e).event(t),l=t.changedTouches,d=l.length
13359
- for(cH(t),n=0;n<d;++n)s=KP(i=l[n],this),a.touch0&&a.touch0[2]===i.identifier?a.touch0[0]=s:a.touch1&&a.touch1[2]===i.identifier&&(a.touch1[0]=s)
13353
+ n.mouse=[d,s.invert(d)],RV(this),n.start()}dH(t),n.wheel=setTimeout((function(){n.wheel=null,n.end()}),f),n.zoom("mouse",o(y(b(s,a),n.mouse[0],n.mouse[1]),n.extent,c))}}function _(t,...e){if(!n&&i.apply(this,arguments)){var s=t.currentTarget,r=C(this,e,!0).event(t),a=KP(t.view).on("mousemove.zoom",(function(t){if(dH(t),!r.moved){var e=t.clientX-d,n=t.clientY-h
13354
+ r.moved=e*e+n*n>m}r.event(t).zoom("mouse",o(y(r.that.__zoom,r.mouse[0]=YP(t,s),r.mouse[1]),r.extent,c))}),!0).on("mouseup.zoom",(function(t){a.on("mousemove.zoom mouseup.zoom",null),function(t,e){var n=t.document.documentElement,i=KP(t).on("dragstart.drag",null)
13355
+ e&&(i.on("click.drag",JP,XP),setTimeout((function(){i.on("click.drag",null)}),0)),"onselectstart"in n?i.on("selectstart.drag",null):(n.style.MozUserSelect=n.__noselect,delete n.__noselect)}(t.view,r.moved),dH(t),r.event(t).end()}),!0),l=YP(t,s),d=t.clientX,h=t.clientY
13356
+ !function(t){var e=t.document.documentElement,n=KP(t).on("dragstart.drag",JP,XP)
13357
+ "onselectstart"in e?n.on("selectstart.drag",JP,XP):(e.__noselect=e.style.MozUserSelect,e.style.MozUserSelect="none")}(t.view),cH(t),r.mouse=[l,this.__zoom.invert(l)],RV(this),r.start()}}function I(t,...e){if(i.apply(this,arguments)){var n=this.__zoom,r=YP(t.changedTouches?t.changedTouches[0]:t,this),a=n.invert(r),l=n.k*(t.shiftKey?.5:2),h=o(y(b(n,l),r,a),s.apply(this,e),c)
13358
+ dH(t),d>0?KP(this).transition().duration(d).call(x,h,r,t):KP(this).call(v.transform,h,r,t)}}function M(n,...s){if(i.apply(this,arguments)){var o,r,a,l,c=n.touches,d=c.length,h=C(this,s,n.changedTouches.length===d).event(n)
13359
+ for(cH(n),r=0;r<d;++r)l=[l=YP(a=c[r],this),this.__zoom.invert(l),a.identifier],h.touch0?h.touch1||h.touch0[2]===l[2]||(h.touch1=l,h.taps=0):(h.touch0=l,o=!0,h.taps=1+!!t)
13360
+ t&&(t=clearTimeout(t)),o&&(h.taps<2&&(e=l[0],t=setTimeout((function(){t=null}),p)),RV(this),h.start())}}function $(t,...e){if(this.__zooming){var n,i,s,r,a=C(this,e).event(t),l=t.changedTouches,d=l.length
13361
+ for(dH(t),n=0;n<d;++n)s=YP(i=l[n],this),a.touch0&&a.touch0[2]===i.identifier?a.touch0[0]=s:a.touch1&&a.touch1[2]===i.identifier&&(a.touch1[0]=s)
13360
13362
  if(i=a.that.__zoom,a.touch1){var h=a.touch0[0],u=a.touch0[1],p=a.touch1[0],f=a.touch1[1],m=(m=p[0]-h[0])*m+(m=p[1]-h[1])*m,g=(g=f[0]-u[0])*g+(g=f[1]-u[1])*g
13361
13363
  i=b(i,Math.sqrt(m/g)),s=[(h[0]+p[0])/2,(h[1]+p[1])/2],r=[(u[0]+f[0])/2,(u[1]+f[1])/2]}else{if(!a.touch0)return
13362
13364
  s=a.touch0[0],r=a.touch0[1]}a.zoom("touch",o(y(i,s,r),a.extent,c))}}function E(t,...i){if(this.__zooming){var s,o,r=C(this,i).event(t),a=t.changedTouches,l=a.length
13363
- for(lH(t),n&&clearTimeout(n),n=setTimeout((function(){n=null}),p),s=0;s<l;++s)o=a[s],r.touch0&&r.touch0[2]===o.identifier?delete r.touch0:r.touch1&&r.touch1[2]===o.identifier&&delete r.touch1
13365
+ for(cH(t),n&&clearTimeout(n),n=setTimeout((function(){n=null}),p),s=0;s<l;++s)o=a[s],r.touch0&&r.touch0[2]===o.identifier?delete r.touch0:r.touch1&&r.touch1[2]===o.identifier&&delete r.touch1
13364
13366
  if(r.touch1&&!r.touch0&&(r.touch0=r.touch1,delete r.touch1),r.touch0)r.touch0[1]=this.__zoom.invert(r.touch0[0])
13365
- else if(r.end(),2===r.taps&&(o=KP(o,this),Math.hypot(e[0]-o[0],e[1]-o[1])<g)){var c=ZP(this).on("dblclick.zoom")
13367
+ else if(r.end(),2===r.taps&&(o=YP(o,this),Math.hypot(e[0]-o[0],e[1]-o[1])<g)){var c=KP(this).on("dblclick.zoom")
13366
13368
  c&&c.apply(this,arguments)}}}return v.transform=function(t,e,n,i){var s=t.selection?t.selection():t
13367
- s.property("__zoom",uH),t!==s?x(t,e,n,i):s.interrupt().each((function(){C(this,arguments).event(i).start().zoom(null,"function"==typeof e?e.apply(this,arguments):e).end()}))},v.scaleBy=function(t,e,n,i){v.scaleTo(t,(function(){return this.__zoom.k*("function"==typeof e?e.apply(this,arguments):e)}),n,i)},v.scaleTo=function(t,e,n,i){v.transform(t,(function(){var t=s.apply(this,arguments),i=this.__zoom,r=null==n?w(t):"function"==typeof n?n.apply(this,arguments):n,a=i.invert(r),l="function"==typeof e?e.apply(this,arguments):e
13369
+ s.property("__zoom",pH),t!==s?x(t,e,n,i):s.interrupt().each((function(){C(this,arguments).event(i).start().zoom(null,"function"==typeof e?e.apply(this,arguments):e).end()}))},v.scaleBy=function(t,e,n,i){v.scaleTo(t,(function(){return this.__zoom.k*("function"==typeof e?e.apply(this,arguments):e)}),n,i)},v.scaleTo=function(t,e,n,i){v.transform(t,(function(){var t=s.apply(this,arguments),i=this.__zoom,r=null==n?w(t):"function"==typeof n?n.apply(this,arguments):n,a=i.invert(r),l="function"==typeof e?e.apply(this,arguments):e
13368
13370
  return o(y(b(i,l),r,a),t,c)}),n,i)},v.translateBy=function(t,e,n,i){v.transform(t,(function(){return o(this.__zoom.translate("function"==typeof e?e.apply(this,arguments):e,"function"==typeof n?n.apply(this,arguments):n),s.apply(this,arguments),c)}),null,i)},v.translateTo=function(t,e,n,i,r){v.transform(t,(function(){var t=s.apply(this,arguments),r=this.__zoom,a=null==i?w(t):"function"==typeof i?i.apply(this,arguments):i
13369
- return o(aH.translate(a[0],a[1]).scale(r.k).translate("function"==typeof e?-e.apply(this,arguments):-e,"function"==typeof n?-n.apply(this,arguments):-n),t,c)}),i,r)},k.prototype={event:function(t){return t&&(this.sourceEvent=t),this},start:function(){return 1==++this.active&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(t,e){return this.mouse&&"mouse"!==t&&(this.mouse[1]=e.invert(this.mouse[0])),this.touch0&&"touch"!==t&&(this.touch0[1]=e.invert(this.touch0[0])),this.touch1&&"touch"!==t&&(this.touch1[1]=e.invert(this.touch1[0])),this.that.__zoom=e,this.emit("zoom"),this},end:function(){return 0==--this.active&&(delete this.that.__zooming,this.emit("end")),this},emit:function(t){var e=ZP(this.that).datum()
13370
- u.call(t,this.that,new oH(t,{sourceEvent:this.sourceEvent,target:v,type:t,transform:this.that.__zoom,dispatch:u}),e)}},v.wheelDelta=function(t){return arguments.length?(r="function"==typeof t?t:sH(+t),v):r},v.filter=function(t){return arguments.length?(i="function"==typeof t?t:sH(!!t),v):i},v.touchable=function(t){return arguments.length?(a="function"==typeof t?t:sH(!!t),v):a},v.extent=function(t){return arguments.length?(s="function"==typeof t?t:sH([[+t[0][0],+t[0][1]],[+t[1][0],+t[1][1]]]),v):s},v.scaleExtent=function(t){return arguments.length?(l[0]=+t[0],l[1]=+t[1],v):[l[0],l[1]]},v.translateExtent=function(t){return arguments.length?(c[0][0]=+t[0][0],c[1][0]=+t[1][0],c[0][1]=+t[0][1],c[1][1]=+t[1][1],v):[[c[0][0],c[0][1]],[c[1][0],c[1][1]]]},v.constrain=function(t){return arguments.length?(o=t,v):o},v.duration=function(t){return arguments.length?(d=+t,v):d},v.interpolate=function(t){return arguments.length?(h=t,v):h},v.on=function(){var t=u.on.apply(u,arguments)
13371
- return t===u?v:t},v.clickDistance=function(t){return arguments.length?(m=(t=+t)*t,v):Math.sqrt(m)},v.tapDistance=function(t){return arguments.length?(g=+t,v):g},v}rH.prototype
13372
- const vH=new TextDecoder("utf-8"),bH=t=>vH.decode(t),yH=new TextEncoder,wH=t=>yH.encode(t),xH=t=>"function"==typeof t,CH=t=>null!=t&&Object(t)===t,kH=t=>CH(t)&&xH(t.then),SH=t=>CH(t)&&xH(t[Symbol.iterator]),_H=t=>CH(t)&&xH(t[Symbol.asyncIterator]),IH=t=>CH(t)&&CH(t.schema),MH=t=>CH(t)&&"done"in t&&"value"in t,$H=t=>CH(t)&&xH(t.stat)&&(t=>"number"==typeof t)(t.fd),EH=t=>CH(t)&&AH(t.body),DH=t=>"_getDOMStream"in t&&"_getNodeStream"in t,AH=t=>CH(t)&&xH(t.cancel)&&xH(t.getReader)&&!DH(t),TH=t=>CH(t)&&xH(t.read)&&xH(t.pipe)&&(t=>"boolean"==typeof t)(t.readable)&&!DH(t),OH=t=>CH(t)&&xH(t.clear)&&xH(t.bytes)&&xH(t.position)&&xH(t.setPosition)&&xH(t.capacity)&&xH(t.getBufferIdentifier)&&xH(t.createLong),RH="undefined"!=typeof SharedArrayBuffer?SharedArrayBuffer:ArrayBuffer
13373
- function FH(t,e,n=0,i=e.byteLength){const s=t.byteLength,o=new Uint8Array(t.buffer,t.byteOffset,s),r=new Uint8Array(e.buffer,e.byteOffset,Math.min(i,s))
13374
- return o.set(r,n),t}function NH(t,e){const n=function(t){const e=t[0]?[t[0]]:[]
13371
+ return o(lH.translate(a[0],a[1]).scale(r.k).translate("function"==typeof e?-e.apply(this,arguments):-e,"function"==typeof n?-n.apply(this,arguments):-n),t,c)}),i,r)},k.prototype={event:function(t){return t&&(this.sourceEvent=t),this},start:function(){return 1==++this.active&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(t,e){return this.mouse&&"mouse"!==t&&(this.mouse[1]=e.invert(this.mouse[0])),this.touch0&&"touch"!==t&&(this.touch0[1]=e.invert(this.touch0[0])),this.touch1&&"touch"!==t&&(this.touch1[1]=e.invert(this.touch1[0])),this.that.__zoom=e,this.emit("zoom"),this},end:function(){return 0==--this.active&&(delete this.that.__zooming,this.emit("end")),this},emit:function(t){var e=KP(this.that).datum()
13372
+ u.call(t,this.that,new rH(t,{sourceEvent:this.sourceEvent,target:v,type:t,transform:this.that.__zoom,dispatch:u}),e)}},v.wheelDelta=function(t){return arguments.length?(r="function"==typeof t?t:oH(+t),v):r},v.filter=function(t){return arguments.length?(i="function"==typeof t?t:oH(!!t),v):i},v.touchable=function(t){return arguments.length?(a="function"==typeof t?t:oH(!!t),v):a},v.extent=function(t){return arguments.length?(s="function"==typeof t?t:oH([[+t[0][0],+t[0][1]],[+t[1][0],+t[1][1]]]),v):s},v.scaleExtent=function(t){return arguments.length?(l[0]=+t[0],l[1]=+t[1],v):[l[0],l[1]]},v.translateExtent=function(t){return arguments.length?(c[0][0]=+t[0][0],c[1][0]=+t[1][0],c[0][1]=+t[0][1],c[1][1]=+t[1][1],v):[[c[0][0],c[0][1]],[c[1][0],c[1][1]]]},v.constrain=function(t){return arguments.length?(o=t,v):o},v.duration=function(t){return arguments.length?(d=+t,v):d},v.interpolate=function(t){return arguments.length?(h=t,v):h},v.on=function(){var t=u.on.apply(u,arguments)
13373
+ return t===u?v:t},v.clickDistance=function(t){return arguments.length?(m=(t=+t)*t,v):Math.sqrt(m)},v.tapDistance=function(t){return arguments.length?(g=+t,v):g},v}aH.prototype
13374
+ const bH=new TextDecoder("utf-8"),yH=t=>bH.decode(t),wH=new TextEncoder,xH=t=>wH.encode(t),CH=t=>"function"==typeof t,kH=t=>null!=t&&Object(t)===t,SH=t=>kH(t)&&CH(t.then),_H=t=>kH(t)&&CH(t[Symbol.iterator]),IH=t=>kH(t)&&CH(t[Symbol.asyncIterator]),MH=t=>kH(t)&&kH(t.schema),$H=t=>kH(t)&&"done"in t&&"value"in t,EH=t=>kH(t)&&CH(t.stat)&&(t=>"number"==typeof t)(t.fd),DH=t=>kH(t)&&TH(t.body),AH=t=>"_getDOMStream"in t&&"_getNodeStream"in t,TH=t=>kH(t)&&CH(t.cancel)&&CH(t.getReader)&&!AH(t),OH=t=>kH(t)&&CH(t.read)&&CH(t.pipe)&&(t=>"boolean"==typeof t)(t.readable)&&!AH(t),RH=t=>kH(t)&&CH(t.clear)&&CH(t.bytes)&&CH(t.position)&&CH(t.setPosition)&&CH(t.capacity)&&CH(t.getBufferIdentifier)&&CH(t.createLong),FH="undefined"!=typeof SharedArrayBuffer?SharedArrayBuffer:ArrayBuffer
13375
+ function NH(t,e,n=0,i=e.byteLength){const s=t.byteLength,o=new Uint8Array(t.buffer,t.byteOffset,s),r=new Uint8Array(e.buffer,e.byteOffset,Math.min(i,s))
13376
+ return o.set(r,n),t}function LH(t,e){const n=function(t){const e=t[0]?[t[0]]:[]
13375
13377
  let n,i,s,o
13376
13378
  for(let r,a,l=0,c=0,d=t.length;++l<d;)r=e[c],a=t[l],!r||!a||r.buffer!==a.buffer||a.byteOffset<r.byteOffset?a&&(e[++c]=a):(({byteOffset:n,byteLength:s}=r),({byteOffset:i,byteLength:o}=a),n+s<i||i+o<n?a&&(e[++c]=a):e[c]=new Uint8Array(r.buffer,n,i-n+o))
13377
13379
  return e}(t),i=n.reduce(((t,e)=>t+e.byteLength),0)
13378
13380
  let s,o,r,a=0,l=-1
13379
13381
  const c=Math.min(e||Number.POSITIVE_INFINITY,i)
13380
- for(const t=n.length;++l<t;){if(s=n[l],o=s.subarray(0,Math.min(s.length,c-a)),c<=a+o.length){o.length<s.length?n[l]=s.subarray(o.length):o.length===s.length&&l++,r?FH(r,o,a):r=o
13381
- break}FH(r||(r=new Uint8Array(c)),o,a),a+=o.length}return[r||new Uint8Array(0),n.slice(l),i-(r?r.byteLength:0)]}function LH(t,e){let n=MH(e)?e.value:e
13382
- return n instanceof t?t===Uint8Array?new t(n.buffer,n.byteOffset,n.byteLength):n:n?("string"==typeof n&&(n=wH(n)),n instanceof ArrayBuffer||n instanceof RH?new t(n):OH(n)?LH(t,n.bytes()):ArrayBuffer.isView(n)?n.byteLength<=0?new t(0):new t(n.buffer,n.byteOffset,n.byteLength/t.BYTES_PER_ELEMENT):t.from(n)):new t(0)}const BH=t=>LH(Int32Array,t),PH=t=>LH(BigInt64Array,t),zH=t=>LH(Uint8Array,t),VH=t=>(t.next(),t)
13383
- const HH=t=>function*(t,e){const n=function*(t){yield t},i="string"==typeof e||ArrayBuffer.isView(e)||e instanceof ArrayBuffer||e instanceof RH?n(e):SH(e)?e:n(e)
13384
- return yield*VH(function*(e){let n=null
13385
- do{n=e.next(yield LH(t,n))}while(!n.done)}(i[Symbol.iterator]())),new t}(Uint8Array,t)
13386
- function UH(t,e){return s(this,arguments,(function*(){if(kH(e))return yield i(yield i(yield*o(r(UH(t,yield i(e))))))
13387
- const n=function(t){return s(this,arguments,(function*(){yield yield i(yield i(t))}))},a="string"==typeof e||ArrayBuffer.isView(e)||e instanceof ArrayBuffer||e instanceof RH?n(e):SH(e)?function(t){return s(this,arguments,(function*(){yield i(yield*o(r(VH(function*(t){let e=null
13388
- do{e=t.next(yield null==e?void 0:e.value)}while(!e.done)}(t[Symbol.iterator]())))))}))}(e):_H(e)?e:n(e)
13389
- return yield i(yield*o(r(VH(function(e){return s(this,arguments,(function*(){let n=null
13390
- do{n=yield i(e.next(yield yield i(LH(t,n))))}while(!n.done)}))}(a[Symbol.asyncIterator]()))))),yield i(new t)}))}const qH=t=>UH(Uint8Array,t)
13391
- var jH={fromIterable:t=>WH(function*(t){let e,n,i,s,o=!1,r=[],a=0
13392
- function l(){return"peek"===i?NH(r,s)[0]:([n,r,a]=NH(r,s),n)}({cmd:i,size:s}=(yield null)||{cmd:"read",size:0})
13393
- const c=HH(t)[Symbol.iterator]()
13394
- try{do{if(({done:e,value:n}=Number.isNaN(s-a)?c.next():c.next(s-a)),!e&&n.byteLength>0&&(r.push(n),a+=n.byteLength),e||s<=a)do{({cmd:i,size:s}=yield l())}while(s<a)}while(!e)}catch(t){(o=!0)&&"function"==typeof c.throw&&c.throw(t)}finally{!1===o&&"function"==typeof c.return&&c.return(null)}return null}(t)),fromAsyncIterable:t=>WH(function(t){return s(this,arguments,(function*(){let e,n,s,o,r=!1,a=[],l=0
13395
- function c(){return"peek"===s?NH(a,o)[0]:([n,a,l]=NH(a,o),n)}({cmd:s,size:o}=(yield yield i(null))||{cmd:"read",size:0})
13396
- const d=qH(t)[Symbol.asyncIterator]()
13397
- try{do{if(({done:e,value:n}=Number.isNaN(o-l)?yield i(d.next()):yield i(d.next(o-l))),!e&&n.byteLength>0&&(a.push(n),l+=n.byteLength),e||o<=l)do{({cmd:s,size:o}=yield yield i(c()))}while(o<l)}while(!e)}catch(t){(r=!0)&&"function"==typeof d.throw&&(yield i(d.throw(t)))}finally{!1===r&&"function"==typeof d.return&&(yield i(d.return(new Uint8Array(0))))}return yield i(null)}))}(t)),fromDOMStream:t=>WH(function(t){return s(this,arguments,(function*(){let e,n,s,o=!1,r=!1,a=[],l=0
13398
- function c(){return"peek"===n?NH(a,s)[0]:([e,a,l]=NH(a,s),e)}({cmd:n,size:s}=(yield yield i(null))||{cmd:"read",size:0})
13399
- const d=new GH(t)
13400
- try{do{if(({done:o,value:e}=Number.isNaN(s-l)?yield i(d.read()):yield i(d.read(s-l))),!o&&e.byteLength>0&&(a.push(zH(e)),l+=e.byteLength),o||s<=l)do{({cmd:n,size:s}=yield yield i(c()))}while(s<l)}while(!o)}catch(t){(r=!0)&&(yield i(d.cancel(t)))}finally{!1===r?yield i(d.cancel()):t.locked&&d.releaseLock()}return yield i(null)}))}(t)),fromNodeStream:t=>WH(function(t){return s(this,arguments,(function*(){const e=[]
13382
+ for(const t=n.length;++l<t;){if(s=n[l],o=s.subarray(0,Math.min(s.length,c-a)),c<=a+o.length){o.length<s.length?n[l]=s.subarray(o.length):o.length===s.length&&l++,r?NH(r,o,a):r=o
13383
+ break}NH(r||(r=new Uint8Array(c)),o,a),a+=o.length}return[r||new Uint8Array(0),n.slice(l),i-(r?r.byteLength:0)]}function BH(t,e){let n=$H(e)?e.value:e
13384
+ return n instanceof t?t===Uint8Array?new t(n.buffer,n.byteOffset,n.byteLength):n:n?("string"==typeof n&&(n=xH(n)),n instanceof ArrayBuffer||n instanceof FH?new t(n):RH(n)?BH(t,n.bytes()):ArrayBuffer.isView(n)?n.byteLength<=0?new t(0):new t(n.buffer,n.byteOffset,n.byteLength/t.BYTES_PER_ELEMENT):t.from(n)):new t(0)}const PH=t=>BH(Int32Array,t),zH=t=>BH(BigInt64Array,t),VH=t=>BH(Uint8Array,t),HH=t=>(t.next(),t)
13385
+ const UH=t=>function*(t,e){const n=function*(t){yield t},i="string"==typeof e||ArrayBuffer.isView(e)||e instanceof ArrayBuffer||e instanceof FH?n(e):_H(e)?e:n(e)
13386
+ return yield*HH(function*(e){let n=null
13387
+ do{n=e.next(yield BH(t,n))}while(!n.done)}(i[Symbol.iterator]())),new t}(Uint8Array,t)
13388
+ function qH(t,e){return s(this,arguments,(function*(){if(SH(e))return yield i(yield i(yield*o(r(qH(t,yield i(e))))))
13389
+ const n=function(t){return s(this,arguments,(function*(){yield yield i(yield i(t))}))},a="string"==typeof e||ArrayBuffer.isView(e)||e instanceof ArrayBuffer||e instanceof FH?n(e):_H(e)?function(t){return s(this,arguments,(function*(){yield i(yield*o(r(HH(function*(t){let e=null
13390
+ do{e=t.next(yield null==e?void 0:e.value)}while(!e.done)}(t[Symbol.iterator]())))))}))}(e):IH(e)?e:n(e)
13391
+ return yield i(yield*o(r(HH(function(e){return s(this,arguments,(function*(){let n=null
13392
+ do{n=yield i(e.next(yield yield i(BH(t,n))))}while(!n.done)}))}(a[Symbol.asyncIterator]()))))),yield i(new t)}))}const jH=t=>qH(Uint8Array,t)
13393
+ var WH={fromIterable:t=>GH(function*(t){let e,n,i,s,o=!1,r=[],a=0
13394
+ function l(){return"peek"===i?LH(r,s)[0]:([n,r,a]=LH(r,s),n)}({cmd:i,size:s}=(yield null)||{cmd:"read",size:0})
13395
+ const c=UH(t)[Symbol.iterator]()
13396
+ try{do{if(({done:e,value:n}=Number.isNaN(s-a)?c.next():c.next(s-a)),!e&&n.byteLength>0&&(r.push(n),a+=n.byteLength),e||s<=a)do{({cmd:i,size:s}=yield l())}while(s<a)}while(!e)}catch(t){(o=!0)&&"function"==typeof c.throw&&c.throw(t)}finally{!1===o&&"function"==typeof c.return&&c.return(null)}return null}(t)),fromAsyncIterable:t=>GH(function(t){return s(this,arguments,(function*(){let e,n,s,o,r=!1,a=[],l=0
13397
+ function c(){return"peek"===s?LH(a,o)[0]:([n,a,l]=LH(a,o),n)}({cmd:s,size:o}=(yield yield i(null))||{cmd:"read",size:0})
13398
+ const d=jH(t)[Symbol.asyncIterator]()
13399
+ try{do{if(({done:e,value:n}=Number.isNaN(o-l)?yield i(d.next()):yield i(d.next(o-l))),!e&&n.byteLength>0&&(a.push(n),l+=n.byteLength),e||o<=l)do{({cmd:s,size:o}=yield yield i(c()))}while(o<l)}while(!e)}catch(t){(r=!0)&&"function"==typeof d.throw&&(yield i(d.throw(t)))}finally{!1===r&&"function"==typeof d.return&&(yield i(d.return(new Uint8Array(0))))}return yield i(null)}))}(t)),fromDOMStream:t=>GH(function(t){return s(this,arguments,(function*(){let e,n,s,o=!1,r=!1,a=[],l=0
13400
+ function c(){return"peek"===n?LH(a,s)[0]:([e,a,l]=LH(a,s),e)}({cmd:n,size:s}=(yield yield i(null))||{cmd:"read",size:0})
13401
+ const d=new ZH(t)
13402
+ try{do{if(({done:o,value:e}=Number.isNaN(s-l)?yield i(d.read()):yield i(d.read(s-l))),!o&&e.byteLength>0&&(a.push(VH(e)),l+=e.byteLength),o||s<=l)do{({cmd:n,size:s}=yield yield i(c()))}while(s<l)}while(!o)}catch(t){(r=!0)&&(yield i(d.cancel(t)))}finally{!1===r?yield i(d.cancel()):t.locked&&d.releaseLock()}return yield i(null)}))}(t)),fromNodeStream:t=>GH(function(t){return s(this,arguments,(function*(){const e=[]
13401
13403
  let n,s,o,r="error",a=!1,l=null,c=0,d=[]
13402
- function h(){return"peek"===n?NH(d,s)[0]:([o,d,c]=NH(d,s),o)}if(({cmd:n,size:s}=(yield yield i(null))||{cmd:"read",size:0}),t.isTTY)return yield yield i(new Uint8Array(0)),yield i(null)
13403
- try{e[0]=ZH(t,"end"),e[1]=ZH(t,"error")
13404
- do{if(e[2]=ZH(t,"readable"),[r,l]=yield i(Promise.race(e.map((t=>t[2])))),"error"===r)break
13405
- if((a="end"===r)||(Number.isFinite(s-c)?(o=zH(t.read(s-c)),o.byteLength<s-c&&(o=zH(t.read()))):o=zH(t.read()),o.byteLength>0&&(d.push(o),c+=o.byteLength)),a||s<=c)do{({cmd:n,size:s}=yield yield i(h()))}while(s<c)}while(!a)}finally{yield i(u(e,"error"===r?l:null))}return yield i(null)
13404
+ function h(){return"peek"===n?LH(d,s)[0]:([o,d,c]=LH(d,s),o)}if(({cmd:n,size:s}=(yield yield i(null))||{cmd:"read",size:0}),t.isTTY)return yield yield i(new Uint8Array(0)),yield i(null)
13405
+ try{e[0]=KH(t,"end"),e[1]=KH(t,"error")
13406
+ do{if(e[2]=KH(t,"readable"),[r,l]=yield i(Promise.race(e.map((t=>t[2])))),"error"===r)break
13407
+ if((a="end"===r)||(Number.isFinite(s-c)?(o=VH(t.read(s-c)),o.byteLength<s-c&&(o=VH(t.read()))):o=VH(t.read()),o.byteLength>0&&(d.push(o),c+=o.byteLength)),a||s<=c)do{({cmd:n,size:s}=yield yield i(h()))}while(s<c)}while(!a)}finally{yield i(u(e,"error"===r?l:null))}return yield i(null)
13406
13408
  function u(e,n){return o=d=null,new Promise(((i,s)=>{for(const[n,i]of e)t.off(n,i)
13407
13409
  try{const e=t.destroy
13408
13410
  e&&e.call(t,n),n=void 0}catch(t){n=t||n}finally{null!=n?s(n):i()}}))}}))}(t)),toDOMStream(t,e){throw new Error('"toDOMStream" not available in this environment')},toNodeStream(t,e){throw new Error('"toNodeStream" not available in this environment')}}
13409
- const WH=t=>(t.next(),t)
13410
- class GH{constructor(t){this.source=t,this.reader=null,this.reader=this.source.getReader(),this.reader.closed.catch((()=>{}))}get closed(){return this.reader?this.reader.closed.catch((()=>{})):Promise.resolve()}releaseLock(){this.reader&&this.reader.releaseLock(),this.reader=null}cancel(t){return e(this,void 0,void 0,(function*(){const{reader:e,source:n}=this
13411
+ const GH=t=>(t.next(),t)
13412
+ class ZH{constructor(t){this.source=t,this.reader=null,this.reader=this.source.getReader(),this.reader.closed.catch((()=>{}))}get closed(){return this.reader?this.reader.closed.catch((()=>{})):Promise.resolve()}releaseLock(){this.reader&&this.reader.releaseLock(),this.reader=null}cancel(t){return e(this,void 0,void 0,(function*(){const{reader:e,source:n}=this
13411
13413
  e&&(yield e.cancel(t).catch((()=>{}))),n&&n.locked&&this.releaseLock()}))}read(t){return e(this,void 0,void 0,(function*(){if(0===t)return{done:null==this.reader,value:new Uint8Array(0)}
13412
13414
  const e=yield this.reader.read()
13413
- return!e.done&&(e.value=zH(e)),e}))}}const ZH=(t,e)=>{const n=t=>i([e,t])
13415
+ return!e.done&&(e.value=VH(e)),e}))}}const KH=(t,e)=>{const n=t=>i([e,t])
13414
13416
  let i
13415
13417
  return[e,n,new Promise((s=>(i=s)&&t.once(e,n)))]}
13416
- var KH,YH,XH,JH,QH,tU
13417
- !function(t){t[t.V1=0]="V1",t[t.V2=1]="V2",t[t.V3=2]="V3",t[t.V4=3]="V4",t[t.V5=4]="V5"}(KH||(KH={})),function(t){t[t.Sparse=0]="Sparse",t[t.Dense=1]="Dense"}(YH||(YH={})),function(t){t[t.HALF=0]="HALF",t[t.SINGLE=1]="SINGLE",t[t.DOUBLE=2]="DOUBLE"}(XH||(XH={})),function(t){t[t.DAY=0]="DAY",t[t.MILLISECOND=1]="MILLISECOND"}(JH||(JH={})),function(t){t[t.SECOND=0]="SECOND",t[t.MILLISECOND=1]="MILLISECOND",t[t.MICROSECOND=2]="MICROSECOND",t[t.NANOSECOND=3]="NANOSECOND"}(QH||(QH={})),function(t){t[t.YEAR_MONTH=0]="YEAR_MONTH",t[t.DAY_TIME=1]="DAY_TIME",t[t.MONTH_DAY_NANO=2]="MONTH_DAY_NANO"}(tU||(tU={}))
13418
- const eU=new Int32Array(2),nU=new Float32Array(eU.buffer),iU=new Float64Array(eU.buffer),sU=1===new Uint16Array(new Uint8Array([1,0]).buffer)[0]
13419
- var oU
13420
- !function(t){t[t.UTF8_BYTES=1]="UTF8_BYTES",t[t.UTF16_STRING=2]="UTF16_STRING"}(oU||(oU={}))
13421
- let rU=class t{constructor(t){this.bytes_=t,this.position_=0,this.text_decoder_=new TextDecoder}static allocate(e){return new t(new Uint8Array(e))}clear(){this.position_=0}bytes(){return this.bytes_}position(){return this.position_}setPosition(t){this.position_=t}capacity(){return this.bytes_.length}readInt8(t){return this.readUint8(t)<<24>>24}readUint8(t){return this.bytes_[t]}readInt16(t){return this.readUint16(t)<<16>>16}readUint16(t){return this.bytes_[t]|this.bytes_[t+1]<<8}readInt32(t){return this.bytes_[t]|this.bytes_[t+1]<<8|this.bytes_[t+2]<<16|this.bytes_[t+3]<<24}readUint32(t){return this.readInt32(t)>>>0}readInt64(t){return BigInt.asIntN(64,BigInt(this.readUint32(t))+(BigInt(this.readUint32(t+4))<<BigInt(32)))}readUint64(t){return BigInt.asUintN(64,BigInt(this.readUint32(t))+(BigInt(this.readUint32(t+4))<<BigInt(32)))}readFloat32(t){return eU[0]=this.readInt32(t),nU[0]}readFloat64(t){return eU[sU?0:1]=this.readInt32(t),eU[sU?1:0]=this.readInt32(t+4),iU[0]}writeInt8(t,e){this.bytes_[t]=e}writeUint8(t,e){this.bytes_[t]=e}writeInt16(t,e){this.bytes_[t]=e,this.bytes_[t+1]=e>>8}writeUint16(t,e){this.bytes_[t]=e,this.bytes_[t+1]=e>>8}writeInt32(t,e){this.bytes_[t]=e,this.bytes_[t+1]=e>>8,this.bytes_[t+2]=e>>16,this.bytes_[t+3]=e>>24}writeUint32(t,e){this.bytes_[t]=e,this.bytes_[t+1]=e>>8,this.bytes_[t+2]=e>>16,this.bytes_[t+3]=e>>24}writeInt64(t,e){this.writeInt32(t,Number(BigInt.asIntN(32,e))),this.writeInt32(t+4,Number(BigInt.asIntN(32,e>>BigInt(32))))}writeUint64(t,e){this.writeUint32(t,Number(BigInt.asUintN(32,e))),this.writeUint32(t+4,Number(BigInt.asUintN(32,e>>BigInt(32))))}writeFloat32(t,e){nU[0]=e,this.writeInt32(t,eU[0])}writeFloat64(t,e){iU[0]=e,this.writeInt32(t,eU[sU?0:1]),this.writeInt32(t+4,eU[sU?1:0])}getBufferIdentifier(){if(this.bytes_.length<this.position_+4+4)throw new Error("FlatBuffers: ByteBuffer is too short to contain an identifier.")
13418
+ var YH,XH,JH,QH,tU,eU
13419
+ !function(t){t[t.V1=0]="V1",t[t.V2=1]="V2",t[t.V3=2]="V3",t[t.V4=3]="V4",t[t.V5=4]="V5"}(YH||(YH={})),function(t){t[t.Sparse=0]="Sparse",t[t.Dense=1]="Dense"}(XH||(XH={})),function(t){t[t.HALF=0]="HALF",t[t.SINGLE=1]="SINGLE",t[t.DOUBLE=2]="DOUBLE"}(JH||(JH={})),function(t){t[t.DAY=0]="DAY",t[t.MILLISECOND=1]="MILLISECOND"}(QH||(QH={})),function(t){t[t.SECOND=0]="SECOND",t[t.MILLISECOND=1]="MILLISECOND",t[t.MICROSECOND=2]="MICROSECOND",t[t.NANOSECOND=3]="NANOSECOND"}(tU||(tU={})),function(t){t[t.YEAR_MONTH=0]="YEAR_MONTH",t[t.DAY_TIME=1]="DAY_TIME",t[t.MONTH_DAY_NANO=2]="MONTH_DAY_NANO"}(eU||(eU={}))
13420
+ const nU=new Int32Array(2),iU=new Float32Array(nU.buffer),sU=new Float64Array(nU.buffer),oU=1===new Uint16Array(new Uint8Array([1,0]).buffer)[0]
13421
+ var rU
13422
+ !function(t){t[t.UTF8_BYTES=1]="UTF8_BYTES",t[t.UTF16_STRING=2]="UTF16_STRING"}(rU||(rU={}))
13423
+ let aU=class t{constructor(t){this.bytes_=t,this.position_=0,this.text_decoder_=new TextDecoder}static allocate(e){return new t(new Uint8Array(e))}clear(){this.position_=0}bytes(){return this.bytes_}position(){return this.position_}setPosition(t){this.position_=t}capacity(){return this.bytes_.length}readInt8(t){return this.readUint8(t)<<24>>24}readUint8(t){return this.bytes_[t]}readInt16(t){return this.readUint16(t)<<16>>16}readUint16(t){return this.bytes_[t]|this.bytes_[t+1]<<8}readInt32(t){return this.bytes_[t]|this.bytes_[t+1]<<8|this.bytes_[t+2]<<16|this.bytes_[t+3]<<24}readUint32(t){return this.readInt32(t)>>>0}readInt64(t){return BigInt.asIntN(64,BigInt(this.readUint32(t))+(BigInt(this.readUint32(t+4))<<BigInt(32)))}readUint64(t){return BigInt.asUintN(64,BigInt(this.readUint32(t))+(BigInt(this.readUint32(t+4))<<BigInt(32)))}readFloat32(t){return nU[0]=this.readInt32(t),iU[0]}readFloat64(t){return nU[oU?0:1]=this.readInt32(t),nU[oU?1:0]=this.readInt32(t+4),sU[0]}writeInt8(t,e){this.bytes_[t]=e}writeUint8(t,e){this.bytes_[t]=e}writeInt16(t,e){this.bytes_[t]=e,this.bytes_[t+1]=e>>8}writeUint16(t,e){this.bytes_[t]=e,this.bytes_[t+1]=e>>8}writeInt32(t,e){this.bytes_[t]=e,this.bytes_[t+1]=e>>8,this.bytes_[t+2]=e>>16,this.bytes_[t+3]=e>>24}writeUint32(t,e){this.bytes_[t]=e,this.bytes_[t+1]=e>>8,this.bytes_[t+2]=e>>16,this.bytes_[t+3]=e>>24}writeInt64(t,e){this.writeInt32(t,Number(BigInt.asIntN(32,e))),this.writeInt32(t+4,Number(BigInt.asIntN(32,e>>BigInt(32))))}writeUint64(t,e){this.writeUint32(t,Number(BigInt.asUintN(32,e))),this.writeUint32(t+4,Number(BigInt.asUintN(32,e>>BigInt(32))))}writeFloat32(t,e){iU[0]=e,this.writeInt32(t,nU[0])}writeFloat64(t,e){sU[0]=e,this.writeInt32(t,nU[oU?0:1]),this.writeInt32(t+4,nU[oU?1:0])}getBufferIdentifier(){if(this.bytes_.length<this.position_+4+4)throw new Error("FlatBuffers: ByteBuffer is too short to contain an identifier.")
13422
13424
  let t=""
13423
13425
  for(let e=0;e<4;e++)t+=String.fromCharCode(this.readInt8(this.position_+4+e))
13424
13426
  return t}__offset(t,e){const n=t-this.readInt32(t)
@@ -13426,19 +13428,19 @@ return e<this.readInt16(n)?this.readInt16(n+e):0}__union(t,e){return t.bb_pos=e+
13426
13428
  const n=this.readInt32(t)
13427
13429
  t+=4
13428
13430
  const i=this.bytes_.subarray(t,t+n)
13429
- return e===oU.UTF8_BYTES?i:this.text_decoder_.decode(i)}__union_with_string(t,e){return"string"==typeof t?this.__string(e):this.__union(t,e)}__indirect(t){return t+this.readInt32(t)}__vector(t){return t+this.readInt32(t)+4}__vector_len(t){return this.readInt32(t+this.readInt32(t))}__has_identifier(t){if(4!=t.length)throw new Error("FlatBuffers: file identifier must be length 4")
13431
+ return e===rU.UTF8_BYTES?i:this.text_decoder_.decode(i)}__union_with_string(t,e){return"string"==typeof t?this.__string(e):this.__union(t,e)}__indirect(t){return t+this.readInt32(t)}__vector(t){return t+this.readInt32(t)+4}__vector_len(t){return this.readInt32(t+this.readInt32(t))}__has_identifier(t){if(4!=t.length)throw new Error("FlatBuffers: file identifier must be length 4")
13430
13432
  for(let e=0;e<4;e++)if(t.charCodeAt(e)!=this.readInt8(this.position()+4+e))return!1
13431
13433
  return!0}createScalarList(t,e){const n=[]
13432
13434
  for(let i=0;i<e;++i){const e=t(i)
13433
13435
  null!==e&&n.push(e)}return n}createObjList(t,e){const n=[]
13434
13436
  for(let i=0;i<e;++i){const e=t(i)
13435
- null!==e&&n.push(e.unpack())}return n}},aU=class t{constructor(t){let e
13436
- this.minalign=1,this.vtable=null,this.vtable_in_use=0,this.isNested=!1,this.object_start=0,this.vtables=[],this.vector_num_elems=0,this.force_defaults=!1,this.string_maps=null,this.text_encoder=new TextEncoder,e=t||1024,this.bb=rU.allocate(e),this.space=e}clear(){this.bb.clear(),this.space=this.bb.capacity(),this.minalign=1,this.vtable=null,this.vtable_in_use=0,this.isNested=!1,this.object_start=0,this.vtables=[],this.vector_num_elems=0,this.force_defaults=!1,this.string_maps=null}forceDefaults(t){this.force_defaults=t}dataBuffer(){return this.bb}asUint8Array(){return this.bb.bytes().subarray(this.bb.position(),this.bb.position()+this.offset())}prep(e,n){e>this.minalign&&(this.minalign=e)
13437
+ null!==e&&n.push(e.unpack())}return n}},lU=class t{constructor(t){let e
13438
+ this.minalign=1,this.vtable=null,this.vtable_in_use=0,this.isNested=!1,this.object_start=0,this.vtables=[],this.vector_num_elems=0,this.force_defaults=!1,this.string_maps=null,this.text_encoder=new TextEncoder,e=t||1024,this.bb=aU.allocate(e),this.space=e}clear(){this.bb.clear(),this.space=this.bb.capacity(),this.minalign=1,this.vtable=null,this.vtable_in_use=0,this.isNested=!1,this.object_start=0,this.vtables=[],this.vector_num_elems=0,this.force_defaults=!1,this.string_maps=null}forceDefaults(t){this.force_defaults=t}dataBuffer(){return this.bb}asUint8Array(){return this.bb.bytes().subarray(this.bb.position(),this.bb.position()+this.offset())}prep(e,n){e>this.minalign&&(this.minalign=e)
13437
13439
  const i=1+~(this.bb.capacity()-this.space+n)&e-1
13438
13440
  for(;this.space<i+e+n;){const e=this.bb.capacity()
13439
13441
  this.bb=t.growByteBuffer(this.bb),this.space+=this.bb.capacity()-e}this.pad(i)}pad(t){for(let e=0;e<t;e++)this.bb.writeInt8(--this.space,0)}writeInt8(t){this.bb.writeInt8(this.space-=1,t)}writeInt16(t){this.bb.writeInt16(this.space-=2,t)}writeInt32(t){this.bb.writeInt32(this.space-=4,t)}writeInt64(t){this.bb.writeInt64(this.space-=8,t)}writeFloat32(t){this.bb.writeFloat32(this.space-=4,t)}writeFloat64(t){this.bb.writeFloat64(this.space-=8,t)}addInt8(t){this.prep(1,0),this.writeInt8(t)}addInt16(t){this.prep(2,0),this.writeInt16(t)}addInt32(t){this.prep(4,0),this.writeInt32(t)}addInt64(t){this.prep(8,0),this.writeInt64(t)}addFloat32(t){this.prep(4,0),this.writeFloat32(t)}addFloat64(t){this.prep(8,0),this.writeFloat64(t)}addFieldInt8(t,e,n){(this.force_defaults||e!=n)&&(this.addInt8(e),this.slot(t))}addFieldInt16(t,e,n){(this.force_defaults||e!=n)&&(this.addInt16(e),this.slot(t))}addFieldInt32(t,e,n){(this.force_defaults||e!=n)&&(this.addInt32(e),this.slot(t))}addFieldInt64(t,e,n){(this.force_defaults||e!==n)&&(this.addInt64(e),this.slot(t))}addFieldFloat32(t,e,n){(this.force_defaults||e!=n)&&(this.addFloat32(e),this.slot(t))}addFieldFloat64(t,e,n){(this.force_defaults||e!=n)&&(this.addFloat64(e),this.slot(t))}addFieldOffset(t,e,n){(this.force_defaults||e!=n)&&(this.addOffset(e),this.slot(t))}addFieldStruct(t,e,n){e!=n&&(this.nested(e),this.slot(t))}nested(t){if(t!=this.offset())throw new TypeError("FlatBuffers: struct must be serialized inline.")}notNested(){if(this.isNested)throw new TypeError("FlatBuffers: object serialization must not be nested.")}slot(t){null!==this.vtable&&(this.vtable[t]=this.offset())}offset(){return this.bb.capacity()-this.space}static growByteBuffer(t){const e=t.capacity()
13440
13442
  if(3221225472&e)throw new Error("FlatBuffers: cannot grow buffer beyond 2 gigabytes.")
13441
- const n=e<<1,i=rU.allocate(n)
13443
+ const n=e<<1,i=aU.allocate(n)
13442
13444
  return i.setPosition(n-e),i.bytes().set(t.bytes(),n-e),i}addOffset(t){this.prep(4,0),this.writeInt32(this.offset()-t+4)}startObject(t){this.notNested(),null==this.vtable&&(this.vtable=[]),this.vtable_in_use=t
13443
13445
  for(let e=0;e<t;e++)this.vtable[e]=0
13444
13446
  this.isNested=!0,this.object_start=this.offset()}endObject(){if(null==this.vtable||!this.isNested)throw new Error("FlatBuffers: endObject called without startObject")
@@ -13468,105 +13470,105 @@ return e=t instanceof Uint8Array?t:this.text_encoder.encode(t),this.addInt8(0),t
13468
13470
  for(let n=0;n<t.length;++n){const i=t[n]
13469
13471
  if(null===i)throw new TypeError("FlatBuffers: Argument for createObjectOffsetList cannot contain null.")
13470
13472
  e.push(this.createObjectOffset(i))}return e}createStructOffsetList(t,e){return e(this,t.length),this.createObjectOffsetList(t.slice().reverse()),this.endVector()}}
13471
- var lU,cU
13472
- !function(t){t[t.BUFFER=0]="BUFFER"}(lU||(lU={})),function(t){t[t.LZ4_FRAME=0]="LZ4_FRAME",t[t.ZSTD=1]="ZSTD"}(cU||(cU={}))
13473
- class dU{constructor(){this.bb=null,this.bb_pos=0}__init(t,e){return this.bb_pos=t,this.bb=e,this}static getRootAsBodyCompression(t,e){return(e||new dU).__init(t.readInt32(t.position())+t.position(),t)}static getSizePrefixedRootAsBodyCompression(t,e){return t.setPosition(t.position()+4),(e||new dU).__init(t.readInt32(t.position())+t.position(),t)}codec(){const t=this.bb.__offset(this.bb_pos,4)
13474
- return t?this.bb.readInt8(this.bb_pos+t):cU.LZ4_FRAME}method(){const t=this.bb.__offset(this.bb_pos,6)
13475
- return t?this.bb.readInt8(this.bb_pos+t):lU.BUFFER}static startBodyCompression(t){t.startObject(2)}static addCodec(t,e){t.addFieldInt8(0,e,cU.LZ4_FRAME)}static addMethod(t,e){t.addFieldInt8(1,e,lU.BUFFER)}static endBodyCompression(t){return t.endObject()}static createBodyCompression(t,e,n){return dU.startBodyCompression(t),dU.addCodec(t,e),dU.addMethod(t,n),dU.endBodyCompression(t)}}class hU{constructor(){this.bb=null,this.bb_pos=0}__init(t,e){return this.bb_pos=t,this.bb=e,this}offset(){return this.bb.readInt64(this.bb_pos)}length(){return this.bb.readInt64(this.bb_pos+8)}static sizeOf(){return 16}static createBuffer(t,e,n){return t.prep(8,16),t.writeInt64(BigInt(null!=n?n:0)),t.writeInt64(BigInt(null!=e?e:0)),t.offset()}}let uU=class{constructor(){this.bb=null,this.bb_pos=0}__init(t,e){return this.bb_pos=t,this.bb=e,this}length(){return this.bb.readInt64(this.bb_pos)}nullCount(){return this.bb.readInt64(this.bb_pos+8)}static sizeOf(){return 16}static createFieldNode(t,e,n){return t.prep(8,16),t.writeInt64(BigInt(null!=n?n:0)),t.writeInt64(BigInt(null!=e?e:0)),t.offset()}},pU=class t{constructor(){this.bb=null,this.bb_pos=0}__init(t,e){return this.bb_pos=t,this.bb=e,this}static getRootAsRecordBatch(e,n){return(n||new t).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsRecordBatch(e,n){return e.setPosition(e.position()+4),(n||new t).__init(e.readInt32(e.position())+e.position(),e)}length(){const t=this.bb.__offset(this.bb_pos,4)
13473
+ var cU,dU
13474
+ !function(t){t[t.BUFFER=0]="BUFFER"}(cU||(cU={})),function(t){t[t.LZ4_FRAME=0]="LZ4_FRAME",t[t.ZSTD=1]="ZSTD"}(dU||(dU={}))
13475
+ class hU{constructor(){this.bb=null,this.bb_pos=0}__init(t,e){return this.bb_pos=t,this.bb=e,this}static getRootAsBodyCompression(t,e){return(e||new hU).__init(t.readInt32(t.position())+t.position(),t)}static getSizePrefixedRootAsBodyCompression(t,e){return t.setPosition(t.position()+4),(e||new hU).__init(t.readInt32(t.position())+t.position(),t)}codec(){const t=this.bb.__offset(this.bb_pos,4)
13476
+ return t?this.bb.readInt8(this.bb_pos+t):dU.LZ4_FRAME}method(){const t=this.bb.__offset(this.bb_pos,6)
13477
+ return t?this.bb.readInt8(this.bb_pos+t):cU.BUFFER}static startBodyCompression(t){t.startObject(2)}static addCodec(t,e){t.addFieldInt8(0,e,dU.LZ4_FRAME)}static addMethod(t,e){t.addFieldInt8(1,e,cU.BUFFER)}static endBodyCompression(t){return t.endObject()}static createBodyCompression(t,e,n){return hU.startBodyCompression(t),hU.addCodec(t,e),hU.addMethod(t,n),hU.endBodyCompression(t)}}class uU{constructor(){this.bb=null,this.bb_pos=0}__init(t,e){return this.bb_pos=t,this.bb=e,this}offset(){return this.bb.readInt64(this.bb_pos)}length(){return this.bb.readInt64(this.bb_pos+8)}static sizeOf(){return 16}static createBuffer(t,e,n){return t.prep(8,16),t.writeInt64(BigInt(null!=n?n:0)),t.writeInt64(BigInt(null!=e?e:0)),t.offset()}}let pU=class{constructor(){this.bb=null,this.bb_pos=0}__init(t,e){return this.bb_pos=t,this.bb=e,this}length(){return this.bb.readInt64(this.bb_pos)}nullCount(){return this.bb.readInt64(this.bb_pos+8)}static sizeOf(){return 16}static createFieldNode(t,e,n){return t.prep(8,16),t.writeInt64(BigInt(null!=n?n:0)),t.writeInt64(BigInt(null!=e?e:0)),t.offset()}},fU=class t{constructor(){this.bb=null,this.bb_pos=0}__init(t,e){return this.bb_pos=t,this.bb=e,this}static getRootAsRecordBatch(e,n){return(n||new t).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsRecordBatch(e,n){return e.setPosition(e.position()+4),(n||new t).__init(e.readInt32(e.position())+e.position(),e)}length(){const t=this.bb.__offset(this.bb_pos,4)
13476
13478
  return t?this.bb.readInt64(this.bb_pos+t):BigInt("0")}nodes(t,e){const n=this.bb.__offset(this.bb_pos,6)
13477
- return n?(e||new uU).__init(this.bb.__vector(this.bb_pos+n)+16*t,this.bb):null}nodesLength(){const t=this.bb.__offset(this.bb_pos,6)
13479
+ return n?(e||new pU).__init(this.bb.__vector(this.bb_pos+n)+16*t,this.bb):null}nodesLength(){const t=this.bb.__offset(this.bb_pos,6)
13478
13480
  return t?this.bb.__vector_len(this.bb_pos+t):0}buffers(t,e){const n=this.bb.__offset(this.bb_pos,8)
13479
- return n?(e||new hU).__init(this.bb.__vector(this.bb_pos+n)+16*t,this.bb):null}buffersLength(){const t=this.bb.__offset(this.bb_pos,8)
13481
+ return n?(e||new uU).__init(this.bb.__vector(this.bb_pos+n)+16*t,this.bb):null}buffersLength(){const t=this.bb.__offset(this.bb_pos,8)
13480
13482
  return t?this.bb.__vector_len(this.bb_pos+t):0}compression(t){const e=this.bb.__offset(this.bb_pos,10)
13481
- return e?(t||new dU).__init(this.bb.__indirect(this.bb_pos+e),this.bb):null}static startRecordBatch(t){t.startObject(4)}static addLength(t,e){t.addFieldInt64(0,e,BigInt("0"))}static addNodes(t,e){t.addFieldOffset(1,e,0)}static startNodesVector(t,e){t.startVector(16,e,8)}static addBuffers(t,e){t.addFieldOffset(2,e,0)}static startBuffersVector(t,e){t.startVector(16,e,8)}static addCompression(t,e){t.addFieldOffset(3,e,0)}static endRecordBatch(t){return t.endObject()}},fU=class t{constructor(){this.bb=null,this.bb_pos=0}__init(t,e){return this.bb_pos=t,this.bb=e,this}static getRootAsDictionaryBatch(e,n){return(n||new t).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsDictionaryBatch(e,n){return e.setPosition(e.position()+4),(n||new t).__init(e.readInt32(e.position())+e.position(),e)}id(){const t=this.bb.__offset(this.bb_pos,4)
13483
+ return e?(t||new hU).__init(this.bb.__indirect(this.bb_pos+e),this.bb):null}static startRecordBatch(t){t.startObject(4)}static addLength(t,e){t.addFieldInt64(0,e,BigInt("0"))}static addNodes(t,e){t.addFieldOffset(1,e,0)}static startNodesVector(t,e){t.startVector(16,e,8)}static addBuffers(t,e){t.addFieldOffset(2,e,0)}static startBuffersVector(t,e){t.startVector(16,e,8)}static addCompression(t,e){t.addFieldOffset(3,e,0)}static endRecordBatch(t){return t.endObject()}},mU=class t{constructor(){this.bb=null,this.bb_pos=0}__init(t,e){return this.bb_pos=t,this.bb=e,this}static getRootAsDictionaryBatch(e,n){return(n||new t).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsDictionaryBatch(e,n){return e.setPosition(e.position()+4),(n||new t).__init(e.readInt32(e.position())+e.position(),e)}id(){const t=this.bb.__offset(this.bb_pos,4)
13482
13484
  return t?this.bb.readInt64(this.bb_pos+t):BigInt("0")}data(t){const e=this.bb.__offset(this.bb_pos,6)
13483
- return e?(t||new pU).__init(this.bb.__indirect(this.bb_pos+e),this.bb):null}isDelta(){const t=this.bb.__offset(this.bb_pos,8)
13485
+ return e?(t||new fU).__init(this.bb.__indirect(this.bb_pos+e),this.bb):null}isDelta(){const t=this.bb.__offset(this.bb_pos,8)
13484
13486
  return!!t&&!!this.bb.readInt8(this.bb_pos+t)}static startDictionaryBatch(t){t.startObject(3)}static addId(t,e){t.addFieldInt64(0,e,BigInt("0"))}static addData(t,e){t.addFieldOffset(1,e,0)}static addIsDelta(t,e){t.addFieldInt8(2,+e,0)}static endDictionaryBatch(t){return t.endObject()}}
13485
- var mU,gU
13486
- !function(t){t[t.Little=0]="Little",t[t.Big=1]="Big"}(mU||(mU={})),function(t){t[t.DenseArray=0]="DenseArray"}(gU||(gU={}))
13487
- class vU{constructor(){this.bb=null,this.bb_pos=0}__init(t,e){return this.bb_pos=t,this.bb=e,this}static getRootAsInt(t,e){return(e||new vU).__init(t.readInt32(t.position())+t.position(),t)}static getSizePrefixedRootAsInt(t,e){return t.setPosition(t.position()+4),(e||new vU).__init(t.readInt32(t.position())+t.position(),t)}bitWidth(){const t=this.bb.__offset(this.bb_pos,4)
13487
+ var gU,vU
13488
+ !function(t){t[t.Little=0]="Little",t[t.Big=1]="Big"}(gU||(gU={})),function(t){t[t.DenseArray=0]="DenseArray"}(vU||(vU={}))
13489
+ class bU{constructor(){this.bb=null,this.bb_pos=0}__init(t,e){return this.bb_pos=t,this.bb=e,this}static getRootAsInt(t,e){return(e||new bU).__init(t.readInt32(t.position())+t.position(),t)}static getSizePrefixedRootAsInt(t,e){return t.setPosition(t.position()+4),(e||new bU).__init(t.readInt32(t.position())+t.position(),t)}bitWidth(){const t=this.bb.__offset(this.bb_pos,4)
13488
13490
  return t?this.bb.readInt32(this.bb_pos+t):0}isSigned(){const t=this.bb.__offset(this.bb_pos,6)
13489
- return!!t&&!!this.bb.readInt8(this.bb_pos+t)}static startInt(t){t.startObject(2)}static addBitWidth(t,e){t.addFieldInt32(0,e,0)}static addIsSigned(t,e){t.addFieldInt8(1,+e,0)}static endInt(t){return t.endObject()}static createInt(t,e,n){return vU.startInt(t),vU.addBitWidth(t,e),vU.addIsSigned(t,n),vU.endInt(t)}}class bU{constructor(){this.bb=null,this.bb_pos=0}__init(t,e){return this.bb_pos=t,this.bb=e,this}static getRootAsDictionaryEncoding(t,e){return(e||new bU).__init(t.readInt32(t.position())+t.position(),t)}static getSizePrefixedRootAsDictionaryEncoding(t,e){return t.setPosition(t.position()+4),(e||new bU).__init(t.readInt32(t.position())+t.position(),t)}id(){const t=this.bb.__offset(this.bb_pos,4)
13491
+ return!!t&&!!this.bb.readInt8(this.bb_pos+t)}static startInt(t){t.startObject(2)}static addBitWidth(t,e){t.addFieldInt32(0,e,0)}static addIsSigned(t,e){t.addFieldInt8(1,+e,0)}static endInt(t){return t.endObject()}static createInt(t,e,n){return bU.startInt(t),bU.addBitWidth(t,e),bU.addIsSigned(t,n),bU.endInt(t)}}class yU{constructor(){this.bb=null,this.bb_pos=0}__init(t,e){return this.bb_pos=t,this.bb=e,this}static getRootAsDictionaryEncoding(t,e){return(e||new yU).__init(t.readInt32(t.position())+t.position(),t)}static getSizePrefixedRootAsDictionaryEncoding(t,e){return t.setPosition(t.position()+4),(e||new yU).__init(t.readInt32(t.position())+t.position(),t)}id(){const t=this.bb.__offset(this.bb_pos,4)
13490
13492
  return t?this.bb.readInt64(this.bb_pos+t):BigInt("0")}indexType(t){const e=this.bb.__offset(this.bb_pos,6)
13491
- return e?(t||new vU).__init(this.bb.__indirect(this.bb_pos+e),this.bb):null}isOrdered(){const t=this.bb.__offset(this.bb_pos,8)
13493
+ return e?(t||new bU).__init(this.bb.__indirect(this.bb_pos+e),this.bb):null}isOrdered(){const t=this.bb.__offset(this.bb_pos,8)
13492
13494
  return!!t&&!!this.bb.readInt8(this.bb_pos+t)}dictionaryKind(){const t=this.bb.__offset(this.bb_pos,10)
13493
- return t?this.bb.readInt16(this.bb_pos+t):gU.DenseArray}static startDictionaryEncoding(t){t.startObject(4)}static addId(t,e){t.addFieldInt64(0,e,BigInt("0"))}static addIndexType(t,e){t.addFieldOffset(1,e,0)}static addIsOrdered(t,e){t.addFieldInt8(2,+e,0)}static addDictionaryKind(t,e){t.addFieldInt16(3,e,gU.DenseArray)}static endDictionaryEncoding(t){return t.endObject()}}class yU{constructor(){this.bb=null,this.bb_pos=0}__init(t,e){return this.bb_pos=t,this.bb=e,this}static getRootAsKeyValue(t,e){return(e||new yU).__init(t.readInt32(t.position())+t.position(),t)}static getSizePrefixedRootAsKeyValue(t,e){return t.setPosition(t.position()+4),(e||new yU).__init(t.readInt32(t.position())+t.position(),t)}key(t){const e=this.bb.__offset(this.bb_pos,4)
13495
+ return t?this.bb.readInt16(this.bb_pos+t):vU.DenseArray}static startDictionaryEncoding(t){t.startObject(4)}static addId(t,e){t.addFieldInt64(0,e,BigInt("0"))}static addIndexType(t,e){t.addFieldOffset(1,e,0)}static addIsOrdered(t,e){t.addFieldInt8(2,+e,0)}static addDictionaryKind(t,e){t.addFieldInt16(3,e,vU.DenseArray)}static endDictionaryEncoding(t){return t.endObject()}}class wU{constructor(){this.bb=null,this.bb_pos=0}__init(t,e){return this.bb_pos=t,this.bb=e,this}static getRootAsKeyValue(t,e){return(e||new wU).__init(t.readInt32(t.position())+t.position(),t)}static getSizePrefixedRootAsKeyValue(t,e){return t.setPosition(t.position()+4),(e||new wU).__init(t.readInt32(t.position())+t.position(),t)}key(t){const e=this.bb.__offset(this.bb_pos,4)
13494
13496
  return e?this.bb.__string(this.bb_pos+e,t):null}value(t){const e=this.bb.__offset(this.bb_pos,6)
13495
- return e?this.bb.__string(this.bb_pos+e,t):null}static startKeyValue(t){t.startObject(2)}static addKey(t,e){t.addFieldOffset(0,e,0)}static addValue(t,e){t.addFieldOffset(1,e,0)}static endKeyValue(t){return t.endObject()}static createKeyValue(t,e,n){return yU.startKeyValue(t),yU.addKey(t,e),yU.addValue(t,n),yU.endKeyValue(t)}}let wU=class t{constructor(){this.bb=null,this.bb_pos=0}__init(t,e){return this.bb_pos=t,this.bb=e,this}static getRootAsBinary(e,n){return(n||new t).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsBinary(e,n){return e.setPosition(e.position()+4),(n||new t).__init(e.readInt32(e.position())+e.position(),e)}static startBinary(t){t.startObject(0)}static endBinary(t){return t.endObject()}static createBinary(e){return t.startBinary(e),t.endBinary(e)}},xU=class t{constructor(){this.bb=null,this.bb_pos=0}__init(t,e){return this.bb_pos=t,this.bb=e,this}static getRootAsBool(e,n){return(n||new t).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsBool(e,n){return e.setPosition(e.position()+4),(n||new t).__init(e.readInt32(e.position())+e.position(),e)}static startBool(t){t.startObject(0)}static endBool(t){return t.endObject()}static createBool(e){return t.startBool(e),t.endBool(e)}},CU=class t{constructor(){this.bb=null,this.bb_pos=0}__init(t,e){return this.bb_pos=t,this.bb=e,this}static getRootAsDate(e,n){return(n||new t).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsDate(e,n){return e.setPosition(e.position()+4),(n||new t).__init(e.readInt32(e.position())+e.position(),e)}unit(){const t=this.bb.__offset(this.bb_pos,4)
13496
- return t?this.bb.readInt16(this.bb_pos+t):JH.MILLISECOND}static startDate(t){t.startObject(1)}static addUnit(t,e){t.addFieldInt16(0,e,JH.MILLISECOND)}static endDate(t){return t.endObject()}static createDate(e,n){return t.startDate(e),t.addUnit(e,n),t.endDate(e)}},kU=class t{constructor(){this.bb=null,this.bb_pos=0}__init(t,e){return this.bb_pos=t,this.bb=e,this}static getRootAsDecimal(e,n){return(n||new t).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsDecimal(e,n){return e.setPosition(e.position()+4),(n||new t).__init(e.readInt32(e.position())+e.position(),e)}precision(){const t=this.bb.__offset(this.bb_pos,4)
13497
+ return e?this.bb.__string(this.bb_pos+e,t):null}static startKeyValue(t){t.startObject(2)}static addKey(t,e){t.addFieldOffset(0,e,0)}static addValue(t,e){t.addFieldOffset(1,e,0)}static endKeyValue(t){return t.endObject()}static createKeyValue(t,e,n){return wU.startKeyValue(t),wU.addKey(t,e),wU.addValue(t,n),wU.endKeyValue(t)}}let xU=class t{constructor(){this.bb=null,this.bb_pos=0}__init(t,e){return this.bb_pos=t,this.bb=e,this}static getRootAsBinary(e,n){return(n||new t).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsBinary(e,n){return e.setPosition(e.position()+4),(n||new t).__init(e.readInt32(e.position())+e.position(),e)}static startBinary(t){t.startObject(0)}static endBinary(t){return t.endObject()}static createBinary(e){return t.startBinary(e),t.endBinary(e)}},CU=class t{constructor(){this.bb=null,this.bb_pos=0}__init(t,e){return this.bb_pos=t,this.bb=e,this}static getRootAsBool(e,n){return(n||new t).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsBool(e,n){return e.setPosition(e.position()+4),(n||new t).__init(e.readInt32(e.position())+e.position(),e)}static startBool(t){t.startObject(0)}static endBool(t){return t.endObject()}static createBool(e){return t.startBool(e),t.endBool(e)}},kU=class t{constructor(){this.bb=null,this.bb_pos=0}__init(t,e){return this.bb_pos=t,this.bb=e,this}static getRootAsDate(e,n){return(n||new t).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsDate(e,n){return e.setPosition(e.position()+4),(n||new t).__init(e.readInt32(e.position())+e.position(),e)}unit(){const t=this.bb.__offset(this.bb_pos,4)
13498
+ return t?this.bb.readInt16(this.bb_pos+t):QH.MILLISECOND}static startDate(t){t.startObject(1)}static addUnit(t,e){t.addFieldInt16(0,e,QH.MILLISECOND)}static endDate(t){return t.endObject()}static createDate(e,n){return t.startDate(e),t.addUnit(e,n),t.endDate(e)}},SU=class t{constructor(){this.bb=null,this.bb_pos=0}__init(t,e){return this.bb_pos=t,this.bb=e,this}static getRootAsDecimal(e,n){return(n||new t).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsDecimal(e,n){return e.setPosition(e.position()+4),(n||new t).__init(e.readInt32(e.position())+e.position(),e)}precision(){const t=this.bb.__offset(this.bb_pos,4)
13497
13499
  return t?this.bb.readInt32(this.bb_pos+t):0}scale(){const t=this.bb.__offset(this.bb_pos,6)
13498
13500
  return t?this.bb.readInt32(this.bb_pos+t):0}bitWidth(){const t=this.bb.__offset(this.bb_pos,8)
13499
- return t?this.bb.readInt32(this.bb_pos+t):128}static startDecimal(t){t.startObject(3)}static addPrecision(t,e){t.addFieldInt32(0,e,0)}static addScale(t,e){t.addFieldInt32(1,e,0)}static addBitWidth(t,e){t.addFieldInt32(2,e,128)}static endDecimal(t){return t.endObject()}static createDecimal(e,n,i,s){return t.startDecimal(e),t.addPrecision(e,n),t.addScale(e,i),t.addBitWidth(e,s),t.endDecimal(e)}},SU=class t{constructor(){this.bb=null,this.bb_pos=0}__init(t,e){return this.bb_pos=t,this.bb=e,this}static getRootAsDuration(e,n){return(n||new t).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsDuration(e,n){return e.setPosition(e.position()+4),(n||new t).__init(e.readInt32(e.position())+e.position(),e)}unit(){const t=this.bb.__offset(this.bb_pos,4)
13500
- return t?this.bb.readInt16(this.bb_pos+t):QH.MILLISECOND}static startDuration(t){t.startObject(1)}static addUnit(t,e){t.addFieldInt16(0,e,QH.MILLISECOND)}static endDuration(t){return t.endObject()}static createDuration(e,n){return t.startDuration(e),t.addUnit(e,n),t.endDuration(e)}},_U=class t{constructor(){this.bb=null,this.bb_pos=0}__init(t,e){return this.bb_pos=t,this.bb=e,this}static getRootAsFixedSizeBinary(e,n){return(n||new t).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsFixedSizeBinary(e,n){return e.setPosition(e.position()+4),(n||new t).__init(e.readInt32(e.position())+e.position(),e)}byteWidth(){const t=this.bb.__offset(this.bb_pos,4)
13501
- return t?this.bb.readInt32(this.bb_pos+t):0}static startFixedSizeBinary(t){t.startObject(1)}static addByteWidth(t,e){t.addFieldInt32(0,e,0)}static endFixedSizeBinary(t){return t.endObject()}static createFixedSizeBinary(e,n){return t.startFixedSizeBinary(e),t.addByteWidth(e,n),t.endFixedSizeBinary(e)}},IU=class t{constructor(){this.bb=null,this.bb_pos=0}__init(t,e){return this.bb_pos=t,this.bb=e,this}static getRootAsFixedSizeList(e,n){return(n||new t).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsFixedSizeList(e,n){return e.setPosition(e.position()+4),(n||new t).__init(e.readInt32(e.position())+e.position(),e)}listSize(){const t=this.bb.__offset(this.bb_pos,4)
13501
+ return t?this.bb.readInt32(this.bb_pos+t):128}static startDecimal(t){t.startObject(3)}static addPrecision(t,e){t.addFieldInt32(0,e,0)}static addScale(t,e){t.addFieldInt32(1,e,0)}static addBitWidth(t,e){t.addFieldInt32(2,e,128)}static endDecimal(t){return t.endObject()}static createDecimal(e,n,i,s){return t.startDecimal(e),t.addPrecision(e,n),t.addScale(e,i),t.addBitWidth(e,s),t.endDecimal(e)}},_U=class t{constructor(){this.bb=null,this.bb_pos=0}__init(t,e){return this.bb_pos=t,this.bb=e,this}static getRootAsDuration(e,n){return(n||new t).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsDuration(e,n){return e.setPosition(e.position()+4),(n||new t).__init(e.readInt32(e.position())+e.position(),e)}unit(){const t=this.bb.__offset(this.bb_pos,4)
13502
+ return t?this.bb.readInt16(this.bb_pos+t):tU.MILLISECOND}static startDuration(t){t.startObject(1)}static addUnit(t,e){t.addFieldInt16(0,e,tU.MILLISECOND)}static endDuration(t){return t.endObject()}static createDuration(e,n){return t.startDuration(e),t.addUnit(e,n),t.endDuration(e)}},IU=class t{constructor(){this.bb=null,this.bb_pos=0}__init(t,e){return this.bb_pos=t,this.bb=e,this}static getRootAsFixedSizeBinary(e,n){return(n||new t).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsFixedSizeBinary(e,n){return e.setPosition(e.position()+4),(n||new t).__init(e.readInt32(e.position())+e.position(),e)}byteWidth(){const t=this.bb.__offset(this.bb_pos,4)
13503
+ return t?this.bb.readInt32(this.bb_pos+t):0}static startFixedSizeBinary(t){t.startObject(1)}static addByteWidth(t,e){t.addFieldInt32(0,e,0)}static endFixedSizeBinary(t){return t.endObject()}static createFixedSizeBinary(e,n){return t.startFixedSizeBinary(e),t.addByteWidth(e,n),t.endFixedSizeBinary(e)}},MU=class t{constructor(){this.bb=null,this.bb_pos=0}__init(t,e){return this.bb_pos=t,this.bb=e,this}static getRootAsFixedSizeList(e,n){return(n||new t).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsFixedSizeList(e,n){return e.setPosition(e.position()+4),(n||new t).__init(e.readInt32(e.position())+e.position(),e)}listSize(){const t=this.bb.__offset(this.bb_pos,4)
13502
13504
  return t?this.bb.readInt32(this.bb_pos+t):0}static startFixedSizeList(t){t.startObject(1)}static addListSize(t,e){t.addFieldInt32(0,e,0)}static endFixedSizeList(t){return t.endObject()}static createFixedSizeList(e,n){return t.startFixedSizeList(e),t.addListSize(e,n),t.endFixedSizeList(e)}}
13503
- class MU{constructor(){this.bb=null,this.bb_pos=0}__init(t,e){return this.bb_pos=t,this.bb=e,this}static getRootAsFloatingPoint(t,e){return(e||new MU).__init(t.readInt32(t.position())+t.position(),t)}static getSizePrefixedRootAsFloatingPoint(t,e){return t.setPosition(t.position()+4),(e||new MU).__init(t.readInt32(t.position())+t.position(),t)}precision(){const t=this.bb.__offset(this.bb_pos,4)
13504
- return t?this.bb.readInt16(this.bb_pos+t):XH.HALF}static startFloatingPoint(t){t.startObject(1)}static addPrecision(t,e){t.addFieldInt16(0,e,XH.HALF)}static endFloatingPoint(t){return t.endObject()}static createFloatingPoint(t,e){return MU.startFloatingPoint(t),MU.addPrecision(t,e),MU.endFloatingPoint(t)}}class $U{constructor(){this.bb=null,this.bb_pos=0}__init(t,e){return this.bb_pos=t,this.bb=e,this}static getRootAsInterval(t,e){return(e||new $U).__init(t.readInt32(t.position())+t.position(),t)}static getSizePrefixedRootAsInterval(t,e){return t.setPosition(t.position()+4),(e||new $U).__init(t.readInt32(t.position())+t.position(),t)}unit(){const t=this.bb.__offset(this.bb_pos,4)
13505
- return t?this.bb.readInt16(this.bb_pos+t):tU.YEAR_MONTH}static startInterval(t){t.startObject(1)}static addUnit(t,e){t.addFieldInt16(0,e,tU.YEAR_MONTH)}static endInterval(t){return t.endObject()}static createInterval(t,e){return $U.startInterval(t),$U.addUnit(t,e),$U.endInterval(t)}}let EU=class t{constructor(){this.bb=null,this.bb_pos=0}__init(t,e){return this.bb_pos=t,this.bb=e,this}static getRootAsLargeBinary(e,n){return(n||new t).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsLargeBinary(e,n){return e.setPosition(e.position()+4),(n||new t).__init(e.readInt32(e.position())+e.position(),e)}static startLargeBinary(t){t.startObject(0)}static endLargeBinary(t){return t.endObject()}static createLargeBinary(e){return t.startLargeBinary(e),t.endLargeBinary(e)}},DU=class t{constructor(){this.bb=null,this.bb_pos=0}__init(t,e){return this.bb_pos=t,this.bb=e,this}static getRootAsLargeUtf8(e,n){return(n||new t).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsLargeUtf8(e,n){return e.setPosition(e.position()+4),(n||new t).__init(e.readInt32(e.position())+e.position(),e)}static startLargeUtf8(t){t.startObject(0)}static endLargeUtf8(t){return t.endObject()}static createLargeUtf8(e){return t.startLargeUtf8(e),t.endLargeUtf8(e)}},AU=class t{constructor(){this.bb=null,this.bb_pos=0}__init(t,e){return this.bb_pos=t,this.bb=e,this}static getRootAsList(e,n){return(n||new t).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsList(e,n){return e.setPosition(e.position()+4),(n||new t).__init(e.readInt32(e.position())+e.position(),e)}static startList(t){t.startObject(0)}static endList(t){return t.endObject()}static createList(e){return t.startList(e),t.endList(e)}},TU=class t{constructor(){this.bb=null,this.bb_pos=0}__init(t,e){return this.bb_pos=t,this.bb=e,this}static getRootAsMap(e,n){return(n||new t).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsMap(e,n){return e.setPosition(e.position()+4),(n||new t).__init(e.readInt32(e.position())+e.position(),e)}keysSorted(){const t=this.bb.__offset(this.bb_pos,4)
13506
- return!!t&&!!this.bb.readInt8(this.bb_pos+t)}static startMap(t){t.startObject(1)}static addKeysSorted(t,e){t.addFieldInt8(0,+e,0)}static endMap(t){return t.endObject()}static createMap(e,n){return t.startMap(e),t.addKeysSorted(e,n),t.endMap(e)}},OU=class t{constructor(){this.bb=null,this.bb_pos=0}__init(t,e){return this.bb_pos=t,this.bb=e,this}static getRootAsNull(e,n){return(n||new t).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsNull(e,n){return e.setPosition(e.position()+4),(n||new t).__init(e.readInt32(e.position())+e.position(),e)}static startNull(t){t.startObject(0)}static endNull(t){return t.endObject()}static createNull(e){return t.startNull(e),t.endNull(e)}}
13507
- class RU{constructor(){this.bb=null,this.bb_pos=0}__init(t,e){return this.bb_pos=t,this.bb=e,this}static getRootAsStruct_(t,e){return(e||new RU).__init(t.readInt32(t.position())+t.position(),t)}static getSizePrefixedRootAsStruct_(t,e){return t.setPosition(t.position()+4),(e||new RU).__init(t.readInt32(t.position())+t.position(),t)}static startStruct_(t){t.startObject(0)}static endStruct_(t){return t.endObject()}static createStruct_(t){return RU.startStruct_(t),RU.endStruct_(t)}}class FU{constructor(){this.bb=null,this.bb_pos=0}__init(t,e){return this.bb_pos=t,this.bb=e,this}static getRootAsTime(t,e){return(e||new FU).__init(t.readInt32(t.position())+t.position(),t)}static getSizePrefixedRootAsTime(t,e){return t.setPosition(t.position()+4),(e||new FU).__init(t.readInt32(t.position())+t.position(),t)}unit(){const t=this.bb.__offset(this.bb_pos,4)
13508
- return t?this.bb.readInt16(this.bb_pos+t):QH.MILLISECOND}bitWidth(){const t=this.bb.__offset(this.bb_pos,6)
13509
- return t?this.bb.readInt32(this.bb_pos+t):32}static startTime(t){t.startObject(2)}static addUnit(t,e){t.addFieldInt16(0,e,QH.MILLISECOND)}static addBitWidth(t,e){t.addFieldInt32(1,e,32)}static endTime(t){return t.endObject()}static createTime(t,e,n){return FU.startTime(t),FU.addUnit(t,e),FU.addBitWidth(t,n),FU.endTime(t)}}class NU{constructor(){this.bb=null,this.bb_pos=0}__init(t,e){return this.bb_pos=t,this.bb=e,this}static getRootAsTimestamp(t,e){return(e||new NU).__init(t.readInt32(t.position())+t.position(),t)}static getSizePrefixedRootAsTimestamp(t,e){return t.setPosition(t.position()+4),(e||new NU).__init(t.readInt32(t.position())+t.position(),t)}unit(){const t=this.bb.__offset(this.bb_pos,4)
13510
- return t?this.bb.readInt16(this.bb_pos+t):QH.SECOND}timezone(t){const e=this.bb.__offset(this.bb_pos,6)
13511
- return e?this.bb.__string(this.bb_pos+e,t):null}static startTimestamp(t){t.startObject(2)}static addUnit(t,e){t.addFieldInt16(0,e,QH.SECOND)}static addTimezone(t,e){t.addFieldOffset(1,e,0)}static endTimestamp(t){return t.endObject()}static createTimestamp(t,e,n){return NU.startTimestamp(t),NU.addUnit(t,e),NU.addTimezone(t,n),NU.endTimestamp(t)}}class LU{constructor(){this.bb=null,this.bb_pos=0}__init(t,e){return this.bb_pos=t,this.bb=e,this}static getRootAsUnion(t,e){return(e||new LU).__init(t.readInt32(t.position())+t.position(),t)}static getSizePrefixedRootAsUnion(t,e){return t.setPosition(t.position()+4),(e||new LU).__init(t.readInt32(t.position())+t.position(),t)}mode(){const t=this.bb.__offset(this.bb_pos,4)
13512
- return t?this.bb.readInt16(this.bb_pos+t):YH.Sparse}typeIds(t){const e=this.bb.__offset(this.bb_pos,6)
13505
+ class $U{constructor(){this.bb=null,this.bb_pos=0}__init(t,e){return this.bb_pos=t,this.bb=e,this}static getRootAsFloatingPoint(t,e){return(e||new $U).__init(t.readInt32(t.position())+t.position(),t)}static getSizePrefixedRootAsFloatingPoint(t,e){return t.setPosition(t.position()+4),(e||new $U).__init(t.readInt32(t.position())+t.position(),t)}precision(){const t=this.bb.__offset(this.bb_pos,4)
13506
+ return t?this.bb.readInt16(this.bb_pos+t):JH.HALF}static startFloatingPoint(t){t.startObject(1)}static addPrecision(t,e){t.addFieldInt16(0,e,JH.HALF)}static endFloatingPoint(t){return t.endObject()}static createFloatingPoint(t,e){return $U.startFloatingPoint(t),$U.addPrecision(t,e),$U.endFloatingPoint(t)}}class EU{constructor(){this.bb=null,this.bb_pos=0}__init(t,e){return this.bb_pos=t,this.bb=e,this}static getRootAsInterval(t,e){return(e||new EU).__init(t.readInt32(t.position())+t.position(),t)}static getSizePrefixedRootAsInterval(t,e){return t.setPosition(t.position()+4),(e||new EU).__init(t.readInt32(t.position())+t.position(),t)}unit(){const t=this.bb.__offset(this.bb_pos,4)
13507
+ return t?this.bb.readInt16(this.bb_pos+t):eU.YEAR_MONTH}static startInterval(t){t.startObject(1)}static addUnit(t,e){t.addFieldInt16(0,e,eU.YEAR_MONTH)}static endInterval(t){return t.endObject()}static createInterval(t,e){return EU.startInterval(t),EU.addUnit(t,e),EU.endInterval(t)}}let DU=class t{constructor(){this.bb=null,this.bb_pos=0}__init(t,e){return this.bb_pos=t,this.bb=e,this}static getRootAsLargeBinary(e,n){return(n||new t).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsLargeBinary(e,n){return e.setPosition(e.position()+4),(n||new t).__init(e.readInt32(e.position())+e.position(),e)}static startLargeBinary(t){t.startObject(0)}static endLargeBinary(t){return t.endObject()}static createLargeBinary(e){return t.startLargeBinary(e),t.endLargeBinary(e)}},AU=class t{constructor(){this.bb=null,this.bb_pos=0}__init(t,e){return this.bb_pos=t,this.bb=e,this}static getRootAsLargeUtf8(e,n){return(n||new t).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsLargeUtf8(e,n){return e.setPosition(e.position()+4),(n||new t).__init(e.readInt32(e.position())+e.position(),e)}static startLargeUtf8(t){t.startObject(0)}static endLargeUtf8(t){return t.endObject()}static createLargeUtf8(e){return t.startLargeUtf8(e),t.endLargeUtf8(e)}},TU=class t{constructor(){this.bb=null,this.bb_pos=0}__init(t,e){return this.bb_pos=t,this.bb=e,this}static getRootAsList(e,n){return(n||new t).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsList(e,n){return e.setPosition(e.position()+4),(n||new t).__init(e.readInt32(e.position())+e.position(),e)}static startList(t){t.startObject(0)}static endList(t){return t.endObject()}static createList(e){return t.startList(e),t.endList(e)}},OU=class t{constructor(){this.bb=null,this.bb_pos=0}__init(t,e){return this.bb_pos=t,this.bb=e,this}static getRootAsMap(e,n){return(n||new t).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsMap(e,n){return e.setPosition(e.position()+4),(n||new t).__init(e.readInt32(e.position())+e.position(),e)}keysSorted(){const t=this.bb.__offset(this.bb_pos,4)
13508
+ return!!t&&!!this.bb.readInt8(this.bb_pos+t)}static startMap(t){t.startObject(1)}static addKeysSorted(t,e){t.addFieldInt8(0,+e,0)}static endMap(t){return t.endObject()}static createMap(e,n){return t.startMap(e),t.addKeysSorted(e,n),t.endMap(e)}},RU=class t{constructor(){this.bb=null,this.bb_pos=0}__init(t,e){return this.bb_pos=t,this.bb=e,this}static getRootAsNull(e,n){return(n||new t).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsNull(e,n){return e.setPosition(e.position()+4),(n||new t).__init(e.readInt32(e.position())+e.position(),e)}static startNull(t){t.startObject(0)}static endNull(t){return t.endObject()}static createNull(e){return t.startNull(e),t.endNull(e)}}
13509
+ class FU{constructor(){this.bb=null,this.bb_pos=0}__init(t,e){return this.bb_pos=t,this.bb=e,this}static getRootAsStruct_(t,e){return(e||new FU).__init(t.readInt32(t.position())+t.position(),t)}static getSizePrefixedRootAsStruct_(t,e){return t.setPosition(t.position()+4),(e||new FU).__init(t.readInt32(t.position())+t.position(),t)}static startStruct_(t){t.startObject(0)}static endStruct_(t){return t.endObject()}static createStruct_(t){return FU.startStruct_(t),FU.endStruct_(t)}}class NU{constructor(){this.bb=null,this.bb_pos=0}__init(t,e){return this.bb_pos=t,this.bb=e,this}static getRootAsTime(t,e){return(e||new NU).__init(t.readInt32(t.position())+t.position(),t)}static getSizePrefixedRootAsTime(t,e){return t.setPosition(t.position()+4),(e||new NU).__init(t.readInt32(t.position())+t.position(),t)}unit(){const t=this.bb.__offset(this.bb_pos,4)
13510
+ return t?this.bb.readInt16(this.bb_pos+t):tU.MILLISECOND}bitWidth(){const t=this.bb.__offset(this.bb_pos,6)
13511
+ return t?this.bb.readInt32(this.bb_pos+t):32}static startTime(t){t.startObject(2)}static addUnit(t,e){t.addFieldInt16(0,e,tU.MILLISECOND)}static addBitWidth(t,e){t.addFieldInt32(1,e,32)}static endTime(t){return t.endObject()}static createTime(t,e,n){return NU.startTime(t),NU.addUnit(t,e),NU.addBitWidth(t,n),NU.endTime(t)}}class LU{constructor(){this.bb=null,this.bb_pos=0}__init(t,e){return this.bb_pos=t,this.bb=e,this}static getRootAsTimestamp(t,e){return(e||new LU).__init(t.readInt32(t.position())+t.position(),t)}static getSizePrefixedRootAsTimestamp(t,e){return t.setPosition(t.position()+4),(e||new LU).__init(t.readInt32(t.position())+t.position(),t)}unit(){const t=this.bb.__offset(this.bb_pos,4)
13512
+ return t?this.bb.readInt16(this.bb_pos+t):tU.SECOND}timezone(t){const e=this.bb.__offset(this.bb_pos,6)
13513
+ return e?this.bb.__string(this.bb_pos+e,t):null}static startTimestamp(t){t.startObject(2)}static addUnit(t,e){t.addFieldInt16(0,e,tU.SECOND)}static addTimezone(t,e){t.addFieldOffset(1,e,0)}static endTimestamp(t){return t.endObject()}static createTimestamp(t,e,n){return LU.startTimestamp(t),LU.addUnit(t,e),LU.addTimezone(t,n),LU.endTimestamp(t)}}class BU{constructor(){this.bb=null,this.bb_pos=0}__init(t,e){return this.bb_pos=t,this.bb=e,this}static getRootAsUnion(t,e){return(e||new BU).__init(t.readInt32(t.position())+t.position(),t)}static getSizePrefixedRootAsUnion(t,e){return t.setPosition(t.position()+4),(e||new BU).__init(t.readInt32(t.position())+t.position(),t)}mode(){const t=this.bb.__offset(this.bb_pos,4)
13514
+ return t?this.bb.readInt16(this.bb_pos+t):XH.Sparse}typeIds(t){const e=this.bb.__offset(this.bb_pos,6)
13513
13515
  return e?this.bb.readInt32(this.bb.__vector(this.bb_pos+e)+4*t):0}typeIdsLength(){const t=this.bb.__offset(this.bb_pos,6)
13514
13516
  return t?this.bb.__vector_len(this.bb_pos+t):0}typeIdsArray(){const t=this.bb.__offset(this.bb_pos,6)
13515
- return t?new Int32Array(this.bb.bytes().buffer,this.bb.bytes().byteOffset+this.bb.__vector(this.bb_pos+t),this.bb.__vector_len(this.bb_pos+t)):null}static startUnion(t){t.startObject(2)}static addMode(t,e){t.addFieldInt16(0,e,YH.Sparse)}static addTypeIds(t,e){t.addFieldOffset(1,e,0)}static createTypeIdsVector(t,e){t.startVector(4,e.length,4)
13517
+ return t?new Int32Array(this.bb.bytes().buffer,this.bb.bytes().byteOffset+this.bb.__vector(this.bb_pos+t),this.bb.__vector_len(this.bb_pos+t)):null}static startUnion(t){t.startObject(2)}static addMode(t,e){t.addFieldInt16(0,e,XH.Sparse)}static addTypeIds(t,e){t.addFieldOffset(1,e,0)}static createTypeIdsVector(t,e){t.startVector(4,e.length,4)
13516
13518
  for(let n=e.length-1;n>=0;n--)t.addInt32(e[n])
13517
- return t.endVector()}static startTypeIdsVector(t,e){t.startVector(4,e,4)}static endUnion(t){return t.endObject()}static createUnion(t,e,n){return LU.startUnion(t),LU.addMode(t,e),LU.addTypeIds(t,n),LU.endUnion(t)}}let BU=class t{constructor(){this.bb=null,this.bb_pos=0}__init(t,e){return this.bb_pos=t,this.bb=e,this}static getRootAsUtf8(e,n){return(n||new t).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsUtf8(e,n){return e.setPosition(e.position()+4),(n||new t).__init(e.readInt32(e.position())+e.position(),e)}static startUtf8(t){t.startObject(0)}static endUtf8(t){return t.endObject()}static createUtf8(e){return t.startUtf8(e),t.endUtf8(e)}}
13518
- var PU
13519
- !function(t){t[t.NONE=0]="NONE",t[t.Null=1]="Null",t[t.Int=2]="Int",t[t.FloatingPoint=3]="FloatingPoint",t[t.Binary=4]="Binary",t[t.Utf8=5]="Utf8",t[t.Bool=6]="Bool",t[t.Decimal=7]="Decimal",t[t.Date=8]="Date",t[t.Time=9]="Time",t[t.Timestamp=10]="Timestamp",t[t.Interval=11]="Interval",t[t.List=12]="List",t[t.Struct_=13]="Struct_",t[t.Union=14]="Union",t[t.FixedSizeBinary=15]="FixedSizeBinary",t[t.FixedSizeList=16]="FixedSizeList",t[t.Map=17]="Map",t[t.Duration=18]="Duration",t[t.LargeBinary=19]="LargeBinary",t[t.LargeUtf8=20]="LargeUtf8",t[t.LargeList=21]="LargeList",t[t.RunEndEncoded=22]="RunEndEncoded"}(PU||(PU={}))
13520
- let zU=class t{constructor(){this.bb=null,this.bb_pos=0}__init(t,e){return this.bb_pos=t,this.bb=e,this}static getRootAsField(e,n){return(n||new t).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsField(e,n){return e.setPosition(e.position()+4),(n||new t).__init(e.readInt32(e.position())+e.position(),e)}name(t){const e=this.bb.__offset(this.bb_pos,4)
13519
+ return t.endVector()}static startTypeIdsVector(t,e){t.startVector(4,e,4)}static endUnion(t){return t.endObject()}static createUnion(t,e,n){return BU.startUnion(t),BU.addMode(t,e),BU.addTypeIds(t,n),BU.endUnion(t)}}let PU=class t{constructor(){this.bb=null,this.bb_pos=0}__init(t,e){return this.bb_pos=t,this.bb=e,this}static getRootAsUtf8(e,n){return(n||new t).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsUtf8(e,n){return e.setPosition(e.position()+4),(n||new t).__init(e.readInt32(e.position())+e.position(),e)}static startUtf8(t){t.startObject(0)}static endUtf8(t){return t.endObject()}static createUtf8(e){return t.startUtf8(e),t.endUtf8(e)}}
13520
+ var zU
13521
+ !function(t){t[t.NONE=0]="NONE",t[t.Null=1]="Null",t[t.Int=2]="Int",t[t.FloatingPoint=3]="FloatingPoint",t[t.Binary=4]="Binary",t[t.Utf8=5]="Utf8",t[t.Bool=6]="Bool",t[t.Decimal=7]="Decimal",t[t.Date=8]="Date",t[t.Time=9]="Time",t[t.Timestamp=10]="Timestamp",t[t.Interval=11]="Interval",t[t.List=12]="List",t[t.Struct_=13]="Struct_",t[t.Union=14]="Union",t[t.FixedSizeBinary=15]="FixedSizeBinary",t[t.FixedSizeList=16]="FixedSizeList",t[t.Map=17]="Map",t[t.Duration=18]="Duration",t[t.LargeBinary=19]="LargeBinary",t[t.LargeUtf8=20]="LargeUtf8",t[t.LargeList=21]="LargeList",t[t.RunEndEncoded=22]="RunEndEncoded"}(zU||(zU={}))
13522
+ let VU=class t{constructor(){this.bb=null,this.bb_pos=0}__init(t,e){return this.bb_pos=t,this.bb=e,this}static getRootAsField(e,n){return(n||new t).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsField(e,n){return e.setPosition(e.position()+4),(n||new t).__init(e.readInt32(e.position())+e.position(),e)}name(t){const e=this.bb.__offset(this.bb_pos,4)
13521
13523
  return e?this.bb.__string(this.bb_pos+e,t):null}nullable(){const t=this.bb.__offset(this.bb_pos,6)
13522
13524
  return!!t&&!!this.bb.readInt8(this.bb_pos+t)}typeType(){const t=this.bb.__offset(this.bb_pos,8)
13523
- return t?this.bb.readUint8(this.bb_pos+t):PU.NONE}type(t){const e=this.bb.__offset(this.bb_pos,10)
13525
+ return t?this.bb.readUint8(this.bb_pos+t):zU.NONE}type(t){const e=this.bb.__offset(this.bb_pos,10)
13524
13526
  return e?this.bb.__union(t,this.bb_pos+e):null}dictionary(t){const e=this.bb.__offset(this.bb_pos,12)
13525
- return e?(t||new bU).__init(this.bb.__indirect(this.bb_pos+e),this.bb):null}children(e,n){const i=this.bb.__offset(this.bb_pos,14)
13527
+ return e?(t||new yU).__init(this.bb.__indirect(this.bb_pos+e),this.bb):null}children(e,n){const i=this.bb.__offset(this.bb_pos,14)
13526
13528
  return i?(n||new t).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos+i)+4*e),this.bb):null}childrenLength(){const t=this.bb.__offset(this.bb_pos,14)
13527
13529
  return t?this.bb.__vector_len(this.bb_pos+t):0}customMetadata(t,e){const n=this.bb.__offset(this.bb_pos,16)
13528
- return n?(e||new yU).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos+n)+4*t),this.bb):null}customMetadataLength(){const t=this.bb.__offset(this.bb_pos,16)
13529
- return t?this.bb.__vector_len(this.bb_pos+t):0}static startField(t){t.startObject(7)}static addName(t,e){t.addFieldOffset(0,e,0)}static addNullable(t,e){t.addFieldInt8(1,+e,0)}static addTypeType(t,e){t.addFieldInt8(2,e,PU.NONE)}static addType(t,e){t.addFieldOffset(3,e,0)}static addDictionary(t,e){t.addFieldOffset(4,e,0)}static addChildren(t,e){t.addFieldOffset(5,e,0)}static createChildrenVector(t,e){t.startVector(4,e.length,4)
13530
+ return n?(e||new wU).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos+n)+4*t),this.bb):null}customMetadataLength(){const t=this.bb.__offset(this.bb_pos,16)
13531
+ return t?this.bb.__vector_len(this.bb_pos+t):0}static startField(t){t.startObject(7)}static addName(t,e){t.addFieldOffset(0,e,0)}static addNullable(t,e){t.addFieldInt8(1,+e,0)}static addTypeType(t,e){t.addFieldInt8(2,e,zU.NONE)}static addType(t,e){t.addFieldOffset(3,e,0)}static addDictionary(t,e){t.addFieldOffset(4,e,0)}static addChildren(t,e){t.addFieldOffset(5,e,0)}static createChildrenVector(t,e){t.startVector(4,e.length,4)
13530
13532
  for(let n=e.length-1;n>=0;n--)t.addOffset(e[n])
13531
13533
  return t.endVector()}static startChildrenVector(t,e){t.startVector(4,e,4)}static addCustomMetadata(t,e){t.addFieldOffset(6,e,0)}static createCustomMetadataVector(t,e){t.startVector(4,e.length,4)
13532
13534
  for(let n=e.length-1;n>=0;n--)t.addOffset(e[n])
13533
- return t.endVector()}static startCustomMetadataVector(t,e){t.startVector(4,e,4)}static endField(t){return t.endObject()}},VU=class t{constructor(){this.bb=null,this.bb_pos=0}__init(t,e){return this.bb_pos=t,this.bb=e,this}static getRootAsSchema(e,n){return(n||new t).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsSchema(e,n){return e.setPosition(e.position()+4),(n||new t).__init(e.readInt32(e.position())+e.position(),e)}endianness(){const t=this.bb.__offset(this.bb_pos,4)
13534
- return t?this.bb.readInt16(this.bb_pos+t):mU.Little}fields(t,e){const n=this.bb.__offset(this.bb_pos,6)
13535
- return n?(e||new zU).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos+n)+4*t),this.bb):null}fieldsLength(){const t=this.bb.__offset(this.bb_pos,6)
13535
+ return t.endVector()}static startCustomMetadataVector(t,e){t.startVector(4,e,4)}static endField(t){return t.endObject()}},HU=class t{constructor(){this.bb=null,this.bb_pos=0}__init(t,e){return this.bb_pos=t,this.bb=e,this}static getRootAsSchema(e,n){return(n||new t).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsSchema(e,n){return e.setPosition(e.position()+4),(n||new t).__init(e.readInt32(e.position())+e.position(),e)}endianness(){const t=this.bb.__offset(this.bb_pos,4)
13536
+ return t?this.bb.readInt16(this.bb_pos+t):gU.Little}fields(t,e){const n=this.bb.__offset(this.bb_pos,6)
13537
+ return n?(e||new VU).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos+n)+4*t),this.bb):null}fieldsLength(){const t=this.bb.__offset(this.bb_pos,6)
13536
13538
  return t?this.bb.__vector_len(this.bb_pos+t):0}customMetadata(t,e){const n=this.bb.__offset(this.bb_pos,8)
13537
- return n?(e||new yU).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos+n)+4*t),this.bb):null}customMetadataLength(){const t=this.bb.__offset(this.bb_pos,8)
13539
+ return n?(e||new wU).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos+n)+4*t),this.bb):null}customMetadataLength(){const t=this.bb.__offset(this.bb_pos,8)
13538
13540
  return t?this.bb.__vector_len(this.bb_pos+t):0}features(t){const e=this.bb.__offset(this.bb_pos,10)
13539
13541
  return e?this.bb.readInt64(this.bb.__vector(this.bb_pos+e)+8*t):BigInt(0)}featuresLength(){const t=this.bb.__offset(this.bb_pos,10)
13540
- return t?this.bb.__vector_len(this.bb_pos+t):0}static startSchema(t){t.startObject(4)}static addEndianness(t,e){t.addFieldInt16(0,e,mU.Little)}static addFields(t,e){t.addFieldOffset(1,e,0)}static createFieldsVector(t,e){t.startVector(4,e.length,4)
13542
+ return t?this.bb.__vector_len(this.bb_pos+t):0}static startSchema(t){t.startObject(4)}static addEndianness(t,e){t.addFieldInt16(0,e,gU.Little)}static addFields(t,e){t.addFieldOffset(1,e,0)}static createFieldsVector(t,e){t.startVector(4,e.length,4)
13541
13543
  for(let n=e.length-1;n>=0;n--)t.addOffset(e[n])
13542
13544
  return t.endVector()}static startFieldsVector(t,e){t.startVector(4,e,4)}static addCustomMetadata(t,e){t.addFieldOffset(2,e,0)}static createCustomMetadataVector(t,e){t.startVector(4,e.length,4)
13543
13545
  for(let n=e.length-1;n>=0;n--)t.addOffset(e[n])
13544
13546
  return t.endVector()}static startCustomMetadataVector(t,e){t.startVector(4,e,4)}static addFeatures(t,e){t.addFieldOffset(3,e,0)}static createFeaturesVector(t,e){t.startVector(8,e.length,8)
13545
13547
  for(let n=e.length-1;n>=0;n--)t.addInt64(e[n])
13546
13548
  return t.endVector()}static startFeaturesVector(t,e){t.startVector(8,e,8)}static endSchema(t){return t.endObject()}static finishSchemaBuffer(t,e){t.finish(e)}static finishSizePrefixedSchemaBuffer(t,e){t.finish(e,void 0,!0)}static createSchema(e,n,i,s,o){return t.startSchema(e),t.addEndianness(e,n),t.addFields(e,i),t.addCustomMetadata(e,s),t.addFeatures(e,o),t.endSchema(e)}}
13547
- var HU,UU,qU
13548
- !function(t){t[t.NONE=0]="NONE",t[t.Schema=1]="Schema",t[t.DictionaryBatch=2]="DictionaryBatch",t[t.RecordBatch=3]="RecordBatch",t[t.Tensor=4]="Tensor",t[t.SparseTensor=5]="SparseTensor"}(HU||(HU={})),function(t){t[t.NONE=0]="NONE",t[t.Null=1]="Null",t[t.Int=2]="Int",t[t.Float=3]="Float",t[t.Binary=4]="Binary",t[t.Utf8=5]="Utf8",t[t.Bool=6]="Bool",t[t.Decimal=7]="Decimal",t[t.Date=8]="Date",t[t.Time=9]="Time",t[t.Timestamp=10]="Timestamp",t[t.Interval=11]="Interval",t[t.List=12]="List",t[t.Struct=13]="Struct",t[t.Union=14]="Union",t[t.FixedSizeBinary=15]="FixedSizeBinary",t[t.FixedSizeList=16]="FixedSizeList",t[t.Map=17]="Map",t[t.Duration=18]="Duration",t[t.LargeBinary=19]="LargeBinary",t[t.LargeUtf8=20]="LargeUtf8",t[t.Dictionary=-1]="Dictionary",t[t.Int8=-2]="Int8",t[t.Int16=-3]="Int16",t[t.Int32=-4]="Int32",t[t.Int64=-5]="Int64",t[t.Uint8=-6]="Uint8",t[t.Uint16=-7]="Uint16",t[t.Uint32=-8]="Uint32",t[t.Uint64=-9]="Uint64",t[t.Float16=-10]="Float16",t[t.Float32=-11]="Float32",t[t.Float64=-12]="Float64",t[t.DateDay=-13]="DateDay",t[t.DateMillisecond=-14]="DateMillisecond",t[t.TimestampSecond=-15]="TimestampSecond",t[t.TimestampMillisecond=-16]="TimestampMillisecond",t[t.TimestampMicrosecond=-17]="TimestampMicrosecond",t[t.TimestampNanosecond=-18]="TimestampNanosecond",t[t.TimeSecond=-19]="TimeSecond",t[t.TimeMillisecond=-20]="TimeMillisecond",t[t.TimeMicrosecond=-21]="TimeMicrosecond",t[t.TimeNanosecond=-22]="TimeNanosecond",t[t.DenseUnion=-23]="DenseUnion",t[t.SparseUnion=-24]="SparseUnion",t[t.IntervalDayTime=-25]="IntervalDayTime",t[t.IntervalYearMonth=-26]="IntervalYearMonth",t[t.DurationSecond=-27]="DurationSecond",t[t.DurationMillisecond=-28]="DurationMillisecond",t[t.DurationMicrosecond=-29]="DurationMicrosecond",t[t.DurationNanosecond=-30]="DurationNanosecond"}(UU||(UU={})),function(t){t[t.OFFSET=0]="OFFSET",t[t.DATA=1]="DATA",t[t.VALIDITY=2]="VALIDITY",t[t.TYPE=3]="TYPE"}(qU||(qU={}))
13549
- function jU(t){if(null===t)return"null"
13549
+ var UU,qU,jU
13550
+ !function(t){t[t.NONE=0]="NONE",t[t.Schema=1]="Schema",t[t.DictionaryBatch=2]="DictionaryBatch",t[t.RecordBatch=3]="RecordBatch",t[t.Tensor=4]="Tensor",t[t.SparseTensor=5]="SparseTensor"}(UU||(UU={})),function(t){t[t.NONE=0]="NONE",t[t.Null=1]="Null",t[t.Int=2]="Int",t[t.Float=3]="Float",t[t.Binary=4]="Binary",t[t.Utf8=5]="Utf8",t[t.Bool=6]="Bool",t[t.Decimal=7]="Decimal",t[t.Date=8]="Date",t[t.Time=9]="Time",t[t.Timestamp=10]="Timestamp",t[t.Interval=11]="Interval",t[t.List=12]="List",t[t.Struct=13]="Struct",t[t.Union=14]="Union",t[t.FixedSizeBinary=15]="FixedSizeBinary",t[t.FixedSizeList=16]="FixedSizeList",t[t.Map=17]="Map",t[t.Duration=18]="Duration",t[t.LargeBinary=19]="LargeBinary",t[t.LargeUtf8=20]="LargeUtf8",t[t.Dictionary=-1]="Dictionary",t[t.Int8=-2]="Int8",t[t.Int16=-3]="Int16",t[t.Int32=-4]="Int32",t[t.Int64=-5]="Int64",t[t.Uint8=-6]="Uint8",t[t.Uint16=-7]="Uint16",t[t.Uint32=-8]="Uint32",t[t.Uint64=-9]="Uint64",t[t.Float16=-10]="Float16",t[t.Float32=-11]="Float32",t[t.Float64=-12]="Float64",t[t.DateDay=-13]="DateDay",t[t.DateMillisecond=-14]="DateMillisecond",t[t.TimestampSecond=-15]="TimestampSecond",t[t.TimestampMillisecond=-16]="TimestampMillisecond",t[t.TimestampMicrosecond=-17]="TimestampMicrosecond",t[t.TimestampNanosecond=-18]="TimestampNanosecond",t[t.TimeSecond=-19]="TimeSecond",t[t.TimeMillisecond=-20]="TimeMillisecond",t[t.TimeMicrosecond=-21]="TimeMicrosecond",t[t.TimeNanosecond=-22]="TimeNanosecond",t[t.DenseUnion=-23]="DenseUnion",t[t.SparseUnion=-24]="SparseUnion",t[t.IntervalDayTime=-25]="IntervalDayTime",t[t.IntervalYearMonth=-26]="IntervalYearMonth",t[t.DurationSecond=-27]="DurationSecond",t[t.DurationMillisecond=-28]="DurationMillisecond",t[t.DurationMicrosecond=-29]="DurationMicrosecond",t[t.DurationNanosecond=-30]="DurationNanosecond"}(qU||(qU={})),function(t){t[t.OFFSET=0]="OFFSET",t[t.DATA=1]="DATA",t[t.VALIDITY=2]="VALIDITY",t[t.TYPE=3]="TYPE"}(jU||(jU={}))
13551
+ function WU(t){if(null===t)return"null"
13550
13552
  if(undefined===t)return"undefined"
13551
13553
  switch(typeof t){case"number":case"bigint":return`${t}`
13552
- case"string":return`"${t}"`}return"function"==typeof t[Symbol.toPrimitive]?t[Symbol.toPrimitive]("string"):ArrayBuffer.isView(t)?t instanceof BigInt64Array||t instanceof BigUint64Array?`[${[...t].map((t=>jU(t)))}]`:`[${t}]`:ArrayBuffer.isView(t)?`[${t}]`:JSON.stringify(t,((t,e)=>"bigint"==typeof e?`${e}`:e))}function WU(t){if("bigint"==typeof t&&(t<Number.MIN_SAFE_INTEGER||t>Number.MAX_SAFE_INTEGER))throw new TypeError(`${t} is not safe to convert to a number.`)
13553
- return Number(t)}function GU(t,e){return WU(t/e)+WU(t%e)/WU(e)}const ZU=Symbol.for("isArrowBigNum")
13554
- function KU(t,...e){return 0===e.length?Object.setPrototypeOf(LH(this.TypedArray,t),this.constructor.prototype):Object.setPrototypeOf(new this.TypedArray(t,...e),this.constructor.prototype)}function YU(...t){return KU.apply(this,t)}function XU(...t){return KU.apply(this,t)}function JU(...t){return KU.apply(this,t)}KU.prototype[ZU]=!0,KU.prototype.toJSON=function(){return`"${eq(this)}"`},KU.prototype.valueOf=function(t){return tq(this,t)},KU.prototype.toString=function(){return eq(this)},KU.prototype[Symbol.toPrimitive]=function(t="default"){switch(t){case"number":return tq(this)
13555
- case"string":return eq(this)
13556
- case"default":return function(t){if(8===t.byteLength){return new t.BigIntArray(t.buffer,t.byteOffset,1)[0]}return eq(t)}(this)}return eq(this)},Object.setPrototypeOf(YU.prototype,Object.create(Int32Array.prototype)),Object.setPrototypeOf(XU.prototype,Object.create(Uint32Array.prototype)),Object.setPrototypeOf(JU.prototype,Object.create(Uint32Array.prototype)),Object.assign(YU.prototype,KU.prototype,{constructor:YU,signed:!0,TypedArray:Int32Array,BigIntArray:BigInt64Array}),Object.assign(XU.prototype,KU.prototype,{constructor:XU,signed:!1,TypedArray:Uint32Array,BigIntArray:BigUint64Array}),Object.assign(JU.prototype,KU.prototype,{constructor:JU,signed:!0,TypedArray:Uint32Array,BigIntArray:BigUint64Array})
13557
- const QU=BigInt(4294967296)*BigInt(4294967296)-BigInt(1)
13558
- function tq(t,e){const{buffer:n,byteOffset:i,byteLength:s,signed:o}=t,r=new BigUint64Array(n,i,s/8),a=o&&r.at(-1)&BigInt(1)<<BigInt(63)
13554
+ case"string":return`"${t}"`}return"function"==typeof t[Symbol.toPrimitive]?t[Symbol.toPrimitive]("string"):ArrayBuffer.isView(t)?t instanceof BigInt64Array||t instanceof BigUint64Array?`[${[...t].map((t=>WU(t)))}]`:`[${t}]`:ArrayBuffer.isView(t)?`[${t}]`:JSON.stringify(t,((t,e)=>"bigint"==typeof e?`${e}`:e))}function GU(t){if("bigint"==typeof t&&(t<Number.MIN_SAFE_INTEGER||t>Number.MAX_SAFE_INTEGER))throw new TypeError(`${t} is not safe to convert to a number.`)
13555
+ return Number(t)}function ZU(t,e){return GU(t/e)+GU(t%e)/GU(e)}const KU=Symbol.for("isArrowBigNum")
13556
+ function YU(t,...e){return 0===e.length?Object.setPrototypeOf(BH(this.TypedArray,t),this.constructor.prototype):Object.setPrototypeOf(new this.TypedArray(t,...e),this.constructor.prototype)}function XU(...t){return YU.apply(this,t)}function JU(...t){return YU.apply(this,t)}function QU(...t){return YU.apply(this,t)}YU.prototype[KU]=!0,YU.prototype.toJSON=function(){return`"${nq(this)}"`},YU.prototype.valueOf=function(t){return eq(this,t)},YU.prototype.toString=function(){return nq(this)},YU.prototype[Symbol.toPrimitive]=function(t="default"){switch(t){case"number":return eq(this)
13557
+ case"string":return nq(this)
13558
+ case"default":return function(t){if(8===t.byteLength){return new t.BigIntArray(t.buffer,t.byteOffset,1)[0]}return nq(t)}(this)}return nq(this)},Object.setPrototypeOf(XU.prototype,Object.create(Int32Array.prototype)),Object.setPrototypeOf(JU.prototype,Object.create(Uint32Array.prototype)),Object.setPrototypeOf(QU.prototype,Object.create(Uint32Array.prototype)),Object.assign(XU.prototype,YU.prototype,{constructor:XU,signed:!0,TypedArray:Int32Array,BigIntArray:BigInt64Array}),Object.assign(JU.prototype,YU.prototype,{constructor:JU,signed:!1,TypedArray:Uint32Array,BigIntArray:BigUint64Array}),Object.assign(QU.prototype,YU.prototype,{constructor:QU,signed:!0,TypedArray:Uint32Array,BigIntArray:BigUint64Array})
13559
+ const tq=BigInt(4294967296)*BigInt(4294967296)-BigInt(1)
13560
+ function eq(t,e){const{buffer:n,byteOffset:i,byteLength:s,signed:o}=t,r=new BigUint64Array(n,i,s/8),a=o&&r.at(-1)&BigInt(1)<<BigInt(63)
13559
13561
  let l=BigInt(0),c=0
13560
- if(a){for(const t of r)l|=(t^QU)*(BigInt(1)<<BigInt(64*c++))
13562
+ if(a){for(const t of r)l|=(t^tq)*(BigInt(1)<<BigInt(64*c++))
13561
13563
  l*=BigInt(-1),l-=BigInt(1)}else for(const t of r)l|=t*(BigInt(1)<<BigInt(64*c++))
13562
13564
  if("number"==typeof e){const t=BigInt(Math.pow(10,e)),n=l%t
13563
- return WU(l/t)+WU(n)/WU(t)}return WU(l)}function eq(t){if(8===t.byteLength){return`${new t.BigIntArray(t.buffer,t.byteOffset,1)[0]}`}if(!t.signed)return nq(t)
13565
+ return GU(l/t)+GU(n)/GU(t)}return GU(l)}function nq(t){if(8===t.byteLength){return`${new t.BigIntArray(t.buffer,t.byteOffset,1)[0]}`}if(!t.signed)return iq(t)
13564
13566
  let e=new Uint16Array(t.buffer,t.byteOffset,t.byteLength/2)
13565
- if(new Int16Array([e.at(-1)])[0]>=0)return nq(t)
13567
+ if(new Int16Array([e.at(-1)])[0]>=0)return iq(t)
13566
13568
  e=e.slice()
13567
13569
  let n=1
13568
13570
  for(let t=0;t<e.length;t++){const i=e[t],s=~i+n
13569
- e[t]=s,n&=0===i?1:0}return`-${nq(e)}`}function nq(t){let e=""
13571
+ e[t]=s,n&=0===i?1:0}return`-${iq(e)}`}function iq(t){let e=""
13570
13572
  const n=new Uint32Array(2)
13571
13573
  let i=new Uint16Array(t.buffer,t.byteOffset,t.byteLength/2)
13572
13574
  const s=new Uint32Array((i=new Uint16Array(i).reverse()).buffer)
@@ -13574,269 +13576,269 @@ let o=-1
13574
13576
  const r=i.length-1
13575
13577
  do{for(n[0]=i[o=0];o<r;)i[o++]=n[1]=n[0]/10,n[0]=(n[0]-10*n[1]<<16)+i[o]
13576
13578
  i[o]=n[1]=n[0]/10,n[0]=n[0]-10*n[1],e=`${n[0]}${e}`}while(s[0]||s[1]||s[2]||s[3])
13577
- return null!=e?e:"0"}class iq{static new(t,e){switch(e){case!0:return new YU(t)
13578
- case!1:return new XU(t)}switch(t.constructor){case Int8Array:case Int16Array:case Int32Array:case BigInt64Array:return new YU(t)}return 16===t.byteLength?new JU(t):new XU(t)}static signed(t){return new YU(t)}static unsigned(t){return new XU(t)}static decimal(t){return new JU(t)}constructor(t,e){return iq.new(t,e)}}var sq,oq,rq,aq,lq,cq,dq,hq,uq,pq,fq,mq,gq,vq,bq,yq,wq,xq,Cq,kq,Sq,_q,Iq
13579
- class Mq{static isNull(t){return(null==t?void 0:t.typeId)===UU.Null}static isInt(t){return(null==t?void 0:t.typeId)===UU.Int}static isFloat(t){return(null==t?void 0:t.typeId)===UU.Float}static isBinary(t){return(null==t?void 0:t.typeId)===UU.Binary}static isLargeBinary(t){return(null==t?void 0:t.typeId)===UU.LargeBinary}static isUtf8(t){return(null==t?void 0:t.typeId)===UU.Utf8}static isLargeUtf8(t){return(null==t?void 0:t.typeId)===UU.LargeUtf8}static isBool(t){return(null==t?void 0:t.typeId)===UU.Bool}static isDecimal(t){return(null==t?void 0:t.typeId)===UU.Decimal}static isDate(t){return(null==t?void 0:t.typeId)===UU.Date}static isTime(t){return(null==t?void 0:t.typeId)===UU.Time}static isTimestamp(t){return(null==t?void 0:t.typeId)===UU.Timestamp}static isInterval(t){return(null==t?void 0:t.typeId)===UU.Interval}static isDuration(t){return(null==t?void 0:t.typeId)===UU.Duration}static isList(t){return(null==t?void 0:t.typeId)===UU.List}static isStruct(t){return(null==t?void 0:t.typeId)===UU.Struct}static isUnion(t){return(null==t?void 0:t.typeId)===UU.Union}static isFixedSizeBinary(t){return(null==t?void 0:t.typeId)===UU.FixedSizeBinary}static isFixedSizeList(t){return(null==t?void 0:t.typeId)===UU.FixedSizeList}static isMap(t){return(null==t?void 0:t.typeId)===UU.Map}static isDictionary(t){return(null==t?void 0:t.typeId)===UU.Dictionary}static isDenseUnion(t){return Mq.isUnion(t)&&t.mode===YH.Dense}static isSparseUnion(t){return Mq.isUnion(t)&&t.mode===YH.Sparse}constructor(t){this.typeId=t}}sq=Symbol.toStringTag,Mq[sq]=((Iq=Mq.prototype).children=null,Iq.ArrayType=Array,Iq.OffsetArrayType=Int32Array,Iq[Symbol.toStringTag]="DataType")
13580
- class $q extends Mq{constructor(){super(UU.Null)}toString(){return"Null"}}oq=Symbol.toStringTag,$q[oq]=(t=>t[Symbol.toStringTag]="Null")($q.prototype)
13581
- class Eq extends Mq{constructor(t,e){super(UU.Int),this.isSigned=t,this.bitWidth=e}get ArrayType(){switch(this.bitWidth){case 8:return this.isSigned?Int8Array:Uint8Array
13579
+ return null!=e?e:"0"}class sq{static new(t,e){switch(e){case!0:return new XU(t)
13580
+ case!1:return new JU(t)}switch(t.constructor){case Int8Array:case Int16Array:case Int32Array:case BigInt64Array:return new XU(t)}return 16===t.byteLength?new QU(t):new JU(t)}static signed(t){return new XU(t)}static unsigned(t){return new JU(t)}static decimal(t){return new QU(t)}constructor(t,e){return sq.new(t,e)}}var oq,rq,aq,lq,cq,dq,hq,uq,pq,fq,mq,gq,vq,bq,yq,wq,xq,Cq,kq,Sq,_q,Iq,Mq
13581
+ class $q{static isNull(t){return(null==t?void 0:t.typeId)===qU.Null}static isInt(t){return(null==t?void 0:t.typeId)===qU.Int}static isFloat(t){return(null==t?void 0:t.typeId)===qU.Float}static isBinary(t){return(null==t?void 0:t.typeId)===qU.Binary}static isLargeBinary(t){return(null==t?void 0:t.typeId)===qU.LargeBinary}static isUtf8(t){return(null==t?void 0:t.typeId)===qU.Utf8}static isLargeUtf8(t){return(null==t?void 0:t.typeId)===qU.LargeUtf8}static isBool(t){return(null==t?void 0:t.typeId)===qU.Bool}static isDecimal(t){return(null==t?void 0:t.typeId)===qU.Decimal}static isDate(t){return(null==t?void 0:t.typeId)===qU.Date}static isTime(t){return(null==t?void 0:t.typeId)===qU.Time}static isTimestamp(t){return(null==t?void 0:t.typeId)===qU.Timestamp}static isInterval(t){return(null==t?void 0:t.typeId)===qU.Interval}static isDuration(t){return(null==t?void 0:t.typeId)===qU.Duration}static isList(t){return(null==t?void 0:t.typeId)===qU.List}static isStruct(t){return(null==t?void 0:t.typeId)===qU.Struct}static isUnion(t){return(null==t?void 0:t.typeId)===qU.Union}static isFixedSizeBinary(t){return(null==t?void 0:t.typeId)===qU.FixedSizeBinary}static isFixedSizeList(t){return(null==t?void 0:t.typeId)===qU.FixedSizeList}static isMap(t){return(null==t?void 0:t.typeId)===qU.Map}static isDictionary(t){return(null==t?void 0:t.typeId)===qU.Dictionary}static isDenseUnion(t){return $q.isUnion(t)&&t.mode===XH.Dense}static isSparseUnion(t){return $q.isUnion(t)&&t.mode===XH.Sparse}constructor(t){this.typeId=t}}oq=Symbol.toStringTag,$q[oq]=((Mq=$q.prototype).children=null,Mq.ArrayType=Array,Mq.OffsetArrayType=Int32Array,Mq[Symbol.toStringTag]="DataType")
13582
+ class Eq extends $q{constructor(){super(qU.Null)}toString(){return"Null"}}rq=Symbol.toStringTag,Eq[rq]=(t=>t[Symbol.toStringTag]="Null")(Eq.prototype)
13583
+ class Dq extends $q{constructor(t,e){super(qU.Int),this.isSigned=t,this.bitWidth=e}get ArrayType(){switch(this.bitWidth){case 8:return this.isSigned?Int8Array:Uint8Array
13582
13584
  case 16:return this.isSigned?Int16Array:Uint16Array
13583
13585
  case 32:return this.isSigned?Int32Array:Uint32Array
13584
- case 64:return this.isSigned?BigInt64Array:BigUint64Array}throw new Error(`Unrecognized ${this[Symbol.toStringTag]} type`)}toString(){return`${this.isSigned?"I":"Ui"}nt${this.bitWidth}`}}rq=Symbol.toStringTag,Eq[rq]=(t=>(t.isSigned=null,t.bitWidth=null,t[Symbol.toStringTag]="Int"))(Eq.prototype)
13585
- class Dq extends Eq{constructor(){super(!0,32)}get ArrayType(){return Int32Array}}Object.defineProperty(Dq.prototype,"ArrayType",{value:Int32Array})
13586
- class Aq extends Mq{constructor(t){super(UU.Float),this.precision=t}get ArrayType(){switch(this.precision){case XH.HALF:return Uint16Array
13587
- case XH.SINGLE:return Float32Array
13588
- case XH.DOUBLE:return Float64Array}throw new Error(`Unrecognized ${this[Symbol.toStringTag]} type`)}toString(){return`Float${this.precision<<5||16}`}}aq=Symbol.toStringTag,Aq[aq]=(t=>(t.precision=null,t[Symbol.toStringTag]="Float"))(Aq.prototype)
13589
- class Tq extends Mq{constructor(){super(UU.Binary)}toString(){return"Binary"}}lq=Symbol.toStringTag,Tq[lq]=(t=>(t.ArrayType=Uint8Array,t[Symbol.toStringTag]="Binary"))(Tq.prototype)
13590
- class Oq extends Mq{constructor(){super(UU.LargeBinary)}toString(){return"LargeBinary"}}cq=Symbol.toStringTag,Oq[cq]=(t=>(t.ArrayType=Uint8Array,t.OffsetArrayType=BigInt64Array,t[Symbol.toStringTag]="LargeBinary"))(Oq.prototype)
13591
- class Rq extends Mq{constructor(){super(UU.Utf8)}toString(){return"Utf8"}}dq=Symbol.toStringTag,Rq[dq]=(t=>(t.ArrayType=Uint8Array,t[Symbol.toStringTag]="Utf8"))(Rq.prototype)
13592
- class Fq extends Mq{constructor(){super(UU.LargeUtf8)}toString(){return"LargeUtf8"}}hq=Symbol.toStringTag,Fq[hq]=(t=>(t.ArrayType=Uint8Array,t.OffsetArrayType=BigInt64Array,t[Symbol.toStringTag]="LargeUtf8"))(Fq.prototype)
13593
- class Nq extends Mq{constructor(){super(UU.Bool)}toString(){return"Bool"}}uq=Symbol.toStringTag,Nq[uq]=(t=>(t.ArrayType=Uint8Array,t[Symbol.toStringTag]="Bool"))(Nq.prototype)
13594
- class Lq extends Mq{constructor(t,e,n=128){super(UU.Decimal),this.scale=t,this.precision=e,this.bitWidth=n}toString(){return`Decimal[${this.precision}e${this.scale>0?"+":""}${this.scale}]`}}pq=Symbol.toStringTag,Lq[pq]=(t=>(t.scale=null,t.precision=null,t.ArrayType=Uint32Array,t[Symbol.toStringTag]="Decimal"))(Lq.prototype)
13595
- class Bq extends Mq{constructor(t){super(UU.Date),this.unit=t}toString(){return`Date${32*(this.unit+1)}<${JH[this.unit]}>`}get ArrayType(){return this.unit===JH.DAY?Int32Array:BigInt64Array}}fq=Symbol.toStringTag,Bq[fq]=(t=>(t.unit=null,t[Symbol.toStringTag]="Date"))(Bq.prototype)
13596
- class Pq extends Mq{constructor(t,e){super(UU.Time),this.unit=t,this.bitWidth=e}toString(){return`Time${this.bitWidth}<${QH[this.unit]}>`}get ArrayType(){switch(this.bitWidth){case 32:return Int32Array
13597
- case 64:return BigInt64Array}throw new Error(`Unrecognized ${this[Symbol.toStringTag]} type`)}}mq=Symbol.toStringTag,Pq[mq]=(t=>(t.unit=null,t.bitWidth=null,t[Symbol.toStringTag]="Time"))(Pq.prototype)
13598
- class zq extends Mq{constructor(t,e){super(UU.Timestamp),this.unit=t,this.timezone=e}toString(){return`Timestamp<${QH[this.unit]}${this.timezone?`, ${this.timezone}`:""}>`}}gq=Symbol.toStringTag,zq[gq]=(t=>(t.unit=null,t.timezone=null,t.ArrayType=BigInt64Array,t[Symbol.toStringTag]="Timestamp"))(zq.prototype)
13599
- class Vq extends Mq{constructor(t){super(UU.Interval),this.unit=t}toString(){return`Interval<${tU[this.unit]}>`}}vq=Symbol.toStringTag,Vq[vq]=(t=>(t.unit=null,t.ArrayType=Int32Array,t[Symbol.toStringTag]="Interval"))(Vq.prototype)
13600
- class Hq extends Mq{constructor(t){super(UU.Duration),this.unit=t}toString(){return`Duration<${QH[this.unit]}>`}}bq=Symbol.toStringTag,Hq[bq]=(t=>(t.unit=null,t.ArrayType=BigInt64Array,t[Symbol.toStringTag]="Duration"))(Hq.prototype)
13601
- class Uq extends Mq{constructor(t){super(UU.List),this.children=[t]}toString(){return`List<${this.valueType}>`}get valueType(){return this.children[0].type}get valueField(){return this.children[0]}get ArrayType(){return this.valueType.ArrayType}}yq=Symbol.toStringTag,Uq[yq]=(t=>(t.children=null,t[Symbol.toStringTag]="List"))(Uq.prototype)
13602
- class qq extends Mq{constructor(t){super(UU.Struct),this.children=t}toString(){return`Struct<{${this.children.map((t=>`${t.name}:${t.type}`)).join(", ")}}>`}}wq=Symbol.toStringTag,qq[wq]=(t=>(t.children=null,t[Symbol.toStringTag]="Struct"))(qq.prototype)
13603
- class jq extends Mq{constructor(t,e,n){super(UU.Union),this.mode=t,this.children=n,this.typeIds=e=Int32Array.from(e),this.typeIdToChildIndex=e.reduce(((t,e,n)=>(t[e]=n)&&t||t),Object.create(null))}toString(){return`${this[Symbol.toStringTag]}<${this.children.map((t=>`${t.type}`)).join(" | ")}>`}}xq=Symbol.toStringTag,jq[xq]=(t=>(t.mode=null,t.typeIds=null,t.children=null,t.typeIdToChildIndex=null,t.ArrayType=Int8Array,t[Symbol.toStringTag]="Union"))(jq.prototype)
13604
- class Wq extends Mq{constructor(t){super(UU.FixedSizeBinary),this.byteWidth=t}toString(){return`FixedSizeBinary[${this.byteWidth}]`}}Cq=Symbol.toStringTag,Wq[Cq]=(t=>(t.byteWidth=null,t.ArrayType=Uint8Array,t[Symbol.toStringTag]="FixedSizeBinary"))(Wq.prototype)
13605
- class Gq extends Mq{constructor(t,e){super(UU.FixedSizeList),this.listSize=t,this.children=[e]}get valueType(){return this.children[0].type}get valueField(){return this.children[0]}get ArrayType(){return this.valueType.ArrayType}toString(){return`FixedSizeList[${this.listSize}]<${this.valueType}>`}}kq=Symbol.toStringTag,Gq[kq]=(t=>(t.children=null,t.listSize=null,t[Symbol.toStringTag]="FixedSizeList"))(Gq.prototype)
13606
- class Zq extends Mq{constructor(t,e=!1){var n,i,s
13607
- if(super(UU.Map),this.children=[t],this.keysSorted=e,t&&(t.name="entries",null===(n=null==t?void 0:t.type)||void 0===n?void 0:n.children)){const e=null===(i=null==t?void 0:t.type)||void 0===i?void 0:i.children[0]
13586
+ case 64:return this.isSigned?BigInt64Array:BigUint64Array}throw new Error(`Unrecognized ${this[Symbol.toStringTag]} type`)}toString(){return`${this.isSigned?"I":"Ui"}nt${this.bitWidth}`}}aq=Symbol.toStringTag,Dq[aq]=(t=>(t.isSigned=null,t.bitWidth=null,t[Symbol.toStringTag]="Int"))(Dq.prototype)
13587
+ class Aq extends Dq{constructor(){super(!0,32)}get ArrayType(){return Int32Array}}Object.defineProperty(Aq.prototype,"ArrayType",{value:Int32Array})
13588
+ class Tq extends $q{constructor(t){super(qU.Float),this.precision=t}get ArrayType(){switch(this.precision){case JH.HALF:return Uint16Array
13589
+ case JH.SINGLE:return Float32Array
13590
+ case JH.DOUBLE:return Float64Array}throw new Error(`Unrecognized ${this[Symbol.toStringTag]} type`)}toString(){return`Float${this.precision<<5||16}`}}lq=Symbol.toStringTag,Tq[lq]=(t=>(t.precision=null,t[Symbol.toStringTag]="Float"))(Tq.prototype)
13591
+ class Oq extends $q{constructor(){super(qU.Binary)}toString(){return"Binary"}}cq=Symbol.toStringTag,Oq[cq]=(t=>(t.ArrayType=Uint8Array,t[Symbol.toStringTag]="Binary"))(Oq.prototype)
13592
+ class Rq extends $q{constructor(){super(qU.LargeBinary)}toString(){return"LargeBinary"}}dq=Symbol.toStringTag,Rq[dq]=(t=>(t.ArrayType=Uint8Array,t.OffsetArrayType=BigInt64Array,t[Symbol.toStringTag]="LargeBinary"))(Rq.prototype)
13593
+ class Fq extends $q{constructor(){super(qU.Utf8)}toString(){return"Utf8"}}hq=Symbol.toStringTag,Fq[hq]=(t=>(t.ArrayType=Uint8Array,t[Symbol.toStringTag]="Utf8"))(Fq.prototype)
13594
+ class Nq extends $q{constructor(){super(qU.LargeUtf8)}toString(){return"LargeUtf8"}}uq=Symbol.toStringTag,Nq[uq]=(t=>(t.ArrayType=Uint8Array,t.OffsetArrayType=BigInt64Array,t[Symbol.toStringTag]="LargeUtf8"))(Nq.prototype)
13595
+ class Lq extends $q{constructor(){super(qU.Bool)}toString(){return"Bool"}}pq=Symbol.toStringTag,Lq[pq]=(t=>(t.ArrayType=Uint8Array,t[Symbol.toStringTag]="Bool"))(Lq.prototype)
13596
+ class Bq extends $q{constructor(t,e,n=128){super(qU.Decimal),this.scale=t,this.precision=e,this.bitWidth=n}toString(){return`Decimal[${this.precision}e${this.scale>0?"+":""}${this.scale}]`}}fq=Symbol.toStringTag,Bq[fq]=(t=>(t.scale=null,t.precision=null,t.ArrayType=Uint32Array,t[Symbol.toStringTag]="Decimal"))(Bq.prototype)
13597
+ class Pq extends $q{constructor(t){super(qU.Date),this.unit=t}toString(){return`Date${32*(this.unit+1)}<${QH[this.unit]}>`}get ArrayType(){return this.unit===QH.DAY?Int32Array:BigInt64Array}}mq=Symbol.toStringTag,Pq[mq]=(t=>(t.unit=null,t[Symbol.toStringTag]="Date"))(Pq.prototype)
13598
+ class zq extends $q{constructor(t,e){super(qU.Time),this.unit=t,this.bitWidth=e}toString(){return`Time${this.bitWidth}<${tU[this.unit]}>`}get ArrayType(){switch(this.bitWidth){case 32:return Int32Array
13599
+ case 64:return BigInt64Array}throw new Error(`Unrecognized ${this[Symbol.toStringTag]} type`)}}gq=Symbol.toStringTag,zq[gq]=(t=>(t.unit=null,t.bitWidth=null,t[Symbol.toStringTag]="Time"))(zq.prototype)
13600
+ class Vq extends $q{constructor(t,e){super(qU.Timestamp),this.unit=t,this.timezone=e}toString(){return`Timestamp<${tU[this.unit]}${this.timezone?`, ${this.timezone}`:""}>`}}vq=Symbol.toStringTag,Vq[vq]=(t=>(t.unit=null,t.timezone=null,t.ArrayType=BigInt64Array,t[Symbol.toStringTag]="Timestamp"))(Vq.prototype)
13601
+ class Hq extends $q{constructor(t){super(qU.Interval),this.unit=t}toString(){return`Interval<${eU[this.unit]}>`}}bq=Symbol.toStringTag,Hq[bq]=(t=>(t.unit=null,t.ArrayType=Int32Array,t[Symbol.toStringTag]="Interval"))(Hq.prototype)
13602
+ class Uq extends $q{constructor(t){super(qU.Duration),this.unit=t}toString(){return`Duration<${tU[this.unit]}>`}}yq=Symbol.toStringTag,Uq[yq]=(t=>(t.unit=null,t.ArrayType=BigInt64Array,t[Symbol.toStringTag]="Duration"))(Uq.prototype)
13603
+ class qq extends $q{constructor(t){super(qU.List),this.children=[t]}toString(){return`List<${this.valueType}>`}get valueType(){return this.children[0].type}get valueField(){return this.children[0]}get ArrayType(){return this.valueType.ArrayType}}wq=Symbol.toStringTag,qq[wq]=(t=>(t.children=null,t[Symbol.toStringTag]="List"))(qq.prototype)
13604
+ class jq extends $q{constructor(t){super(qU.Struct),this.children=t}toString(){return`Struct<{${this.children.map((t=>`${t.name}:${t.type}`)).join(", ")}}>`}}xq=Symbol.toStringTag,jq[xq]=(t=>(t.children=null,t[Symbol.toStringTag]="Struct"))(jq.prototype)
13605
+ class Wq extends $q{constructor(t,e,n){super(qU.Union),this.mode=t,this.children=n,this.typeIds=e=Int32Array.from(e),this.typeIdToChildIndex=e.reduce(((t,e,n)=>(t[e]=n)&&t||t),Object.create(null))}toString(){return`${this[Symbol.toStringTag]}<${this.children.map((t=>`${t.type}`)).join(" | ")}>`}}Cq=Symbol.toStringTag,Wq[Cq]=(t=>(t.mode=null,t.typeIds=null,t.children=null,t.typeIdToChildIndex=null,t.ArrayType=Int8Array,t[Symbol.toStringTag]="Union"))(Wq.prototype)
13606
+ class Gq extends $q{constructor(t){super(qU.FixedSizeBinary),this.byteWidth=t}toString(){return`FixedSizeBinary[${this.byteWidth}]`}}kq=Symbol.toStringTag,Gq[kq]=(t=>(t.byteWidth=null,t.ArrayType=Uint8Array,t[Symbol.toStringTag]="FixedSizeBinary"))(Gq.prototype)
13607
+ class Zq extends $q{constructor(t,e){super(qU.FixedSizeList),this.listSize=t,this.children=[e]}get valueType(){return this.children[0].type}get valueField(){return this.children[0]}get ArrayType(){return this.valueType.ArrayType}toString(){return`FixedSizeList[${this.listSize}]<${this.valueType}>`}}Sq=Symbol.toStringTag,Zq[Sq]=(t=>(t.children=null,t.listSize=null,t[Symbol.toStringTag]="FixedSizeList"))(Zq.prototype)
13608
+ class Kq extends $q{constructor(t,e=!1){var n,i,s
13609
+ if(super(qU.Map),this.children=[t],this.keysSorted=e,t&&(t.name="entries",null===(n=null==t?void 0:t.type)||void 0===n?void 0:n.children)){const e=null===(i=null==t?void 0:t.type)||void 0===i?void 0:i.children[0]
13608
13610
  e&&(e.name="key")
13609
13611
  const n=null===(s=null==t?void 0:t.type)||void 0===s?void 0:s.children[1]
13610
- n&&(n.name="value")}}get keyType(){return this.children[0].type.children[0].type}get valueType(){return this.children[0].type.children[1].type}get childType(){return this.children[0].type}toString(){return`Map<{${this.children[0].type.children.map((t=>`${t.name}:${t.type}`)).join(", ")}}>`}}Sq=Symbol.toStringTag,Zq[Sq]=(t=>(t.children=null,t.keysSorted=null,t[Symbol.toStringTag]="Map_"))(Zq.prototype)
13611
- const Kq=(Yq=-1,()=>++Yq)
13612
- var Yq
13613
- class Xq extends Mq{constructor(t,e,n,i){super(UU.Dictionary),this.indices=e,this.dictionary=t,this.isOrdered=i||!1,this.id=null==n?Kq():WU(n)}get children(){return this.dictionary.children}get valueType(){return this.dictionary}get ArrayType(){return this.dictionary.ArrayType}toString(){return`Dictionary<${this.indices}, ${this.dictionary}>`}}function Jq(t){const e=t
13614
- switch(t.typeId){case UU.Decimal:return t.bitWidth/32
13615
- case UU.Interval:return 1+e.unit
13616
- case UU.FixedSizeList:return e.listSize
13617
- case UU.FixedSizeBinary:return e.byteWidth
13618
- default:return 1}}_q=Symbol.toStringTag,Xq[_q]=(t=>(t.id=null,t.indices=null,t.isOrdered=null,t.dictionary=null,t[Symbol.toStringTag]="Dictionary"))(Xq.prototype)
13619
- class Qq{visitMany(t,...e){return t.map(((t,n)=>this.visit(t,...e.map((t=>t[n])))))}visit(...t){return this.getVisitFn(t[0],!1).apply(this,t)}getVisitFn(t,e=!0){return function(t,e,n=!0){if("number"==typeof e)return tj(t,e,n)
13620
- if("string"==typeof e&&e in UU)return tj(t,UU[e],n)
13621
- if(e&&e instanceof Mq)return tj(t,ej(e),n)
13622
- if((null==e?void 0:e.type)&&e.type instanceof Mq)return tj(t,ej(e.type),n)
13623
- return tj(t,UU.NONE,n)}(this,t,e)}getVisitFnByTypeId(t,e=!0){return tj(this,t,e)}visitNull(t,...e){return null}visitBool(t,...e){return null}visitInt(t,...e){return null}visitFloat(t,...e){return null}visitUtf8(t,...e){return null}visitLargeUtf8(t,...e){return null}visitBinary(t,...e){return null}visitLargeBinary(t,...e){return null}visitFixedSizeBinary(t,...e){return null}visitDate(t,...e){return null}visitTimestamp(t,...e){return null}visitTime(t,...e){return null}visitDecimal(t,...e){return null}visitList(t,...e){return null}visitStruct(t,...e){return null}visitUnion(t,...e){return null}visitDictionary(t,...e){return null}visitInterval(t,...e){return null}visitDuration(t,...e){return null}visitFixedSizeList(t,...e){return null}visitMap(t,...e){return null}}function tj(t,e,n=!0){let i=null
13624
- switch(e){case UU.Null:i=t.visitNull
13612
+ n&&(n.name="value")}}get keyType(){return this.children[0].type.children[0].type}get valueType(){return this.children[0].type.children[1].type}get childType(){return this.children[0].type}toString(){return`Map<{${this.children[0].type.children.map((t=>`${t.name}:${t.type}`)).join(", ")}}>`}}_q=Symbol.toStringTag,Kq[_q]=(t=>(t.children=null,t.keysSorted=null,t[Symbol.toStringTag]="Map_"))(Kq.prototype)
13613
+ const Yq=(Xq=-1,()=>++Xq)
13614
+ var Xq
13615
+ class Jq extends $q{constructor(t,e,n,i){super(qU.Dictionary),this.indices=e,this.dictionary=t,this.isOrdered=i||!1,this.id=null==n?Yq():GU(n)}get children(){return this.dictionary.children}get valueType(){return this.dictionary}get ArrayType(){return this.dictionary.ArrayType}toString(){return`Dictionary<${this.indices}, ${this.dictionary}>`}}function Qq(t){const e=t
13616
+ switch(t.typeId){case qU.Decimal:return t.bitWidth/32
13617
+ case qU.Interval:return 1+e.unit
13618
+ case qU.FixedSizeList:return e.listSize
13619
+ case qU.FixedSizeBinary:return e.byteWidth
13620
+ default:return 1}}Iq=Symbol.toStringTag,Jq[Iq]=(t=>(t.id=null,t.indices=null,t.isOrdered=null,t.dictionary=null,t[Symbol.toStringTag]="Dictionary"))(Jq.prototype)
13621
+ class tj{visitMany(t,...e){return t.map(((t,n)=>this.visit(t,...e.map((t=>t[n])))))}visit(...t){return this.getVisitFn(t[0],!1).apply(this,t)}getVisitFn(t,e=!0){return function(t,e,n=!0){if("number"==typeof e)return ej(t,e,n)
13622
+ if("string"==typeof e&&e in qU)return ej(t,qU[e],n)
13623
+ if(e&&e instanceof $q)return ej(t,nj(e),n)
13624
+ if((null==e?void 0:e.type)&&e.type instanceof $q)return ej(t,nj(e.type),n)
13625
+ return ej(t,qU.NONE,n)}(this,t,e)}getVisitFnByTypeId(t,e=!0){return ej(this,t,e)}visitNull(t,...e){return null}visitBool(t,...e){return null}visitInt(t,...e){return null}visitFloat(t,...e){return null}visitUtf8(t,...e){return null}visitLargeUtf8(t,...e){return null}visitBinary(t,...e){return null}visitLargeBinary(t,...e){return null}visitFixedSizeBinary(t,...e){return null}visitDate(t,...e){return null}visitTimestamp(t,...e){return null}visitTime(t,...e){return null}visitDecimal(t,...e){return null}visitList(t,...e){return null}visitStruct(t,...e){return null}visitUnion(t,...e){return null}visitDictionary(t,...e){return null}visitInterval(t,...e){return null}visitDuration(t,...e){return null}visitFixedSizeList(t,...e){return null}visitMap(t,...e){return null}}function ej(t,e,n=!0){let i=null
13626
+ switch(e){case qU.Null:i=t.visitNull
13625
13627
  break
13626
- case UU.Bool:i=t.visitBool
13628
+ case qU.Bool:i=t.visitBool
13627
13629
  break
13628
- case UU.Int:i=t.visitInt
13630
+ case qU.Int:i=t.visitInt
13629
13631
  break
13630
- case UU.Int8:i=t.visitInt8||t.visitInt
13632
+ case qU.Int8:i=t.visitInt8||t.visitInt
13631
13633
  break
13632
- case UU.Int16:i=t.visitInt16||t.visitInt
13634
+ case qU.Int16:i=t.visitInt16||t.visitInt
13633
13635
  break
13634
- case UU.Int32:i=t.visitInt32||t.visitInt
13636
+ case qU.Int32:i=t.visitInt32||t.visitInt
13635
13637
  break
13636
- case UU.Int64:i=t.visitInt64||t.visitInt
13638
+ case qU.Int64:i=t.visitInt64||t.visitInt
13637
13639
  break
13638
- case UU.Uint8:i=t.visitUint8||t.visitInt
13640
+ case qU.Uint8:i=t.visitUint8||t.visitInt
13639
13641
  break
13640
- case UU.Uint16:i=t.visitUint16||t.visitInt
13642
+ case qU.Uint16:i=t.visitUint16||t.visitInt
13641
13643
  break
13642
- case UU.Uint32:i=t.visitUint32||t.visitInt
13644
+ case qU.Uint32:i=t.visitUint32||t.visitInt
13643
13645
  break
13644
- case UU.Uint64:i=t.visitUint64||t.visitInt
13646
+ case qU.Uint64:i=t.visitUint64||t.visitInt
13645
13647
  break
13646
- case UU.Float:i=t.visitFloat
13648
+ case qU.Float:i=t.visitFloat
13647
13649
  break
13648
- case UU.Float16:i=t.visitFloat16||t.visitFloat
13650
+ case qU.Float16:i=t.visitFloat16||t.visitFloat
13649
13651
  break
13650
- case UU.Float32:i=t.visitFloat32||t.visitFloat
13652
+ case qU.Float32:i=t.visitFloat32||t.visitFloat
13651
13653
  break
13652
- case UU.Float64:i=t.visitFloat64||t.visitFloat
13654
+ case qU.Float64:i=t.visitFloat64||t.visitFloat
13653
13655
  break
13654
- case UU.Utf8:i=t.visitUtf8
13656
+ case qU.Utf8:i=t.visitUtf8
13655
13657
  break
13656
- case UU.LargeUtf8:i=t.visitLargeUtf8
13658
+ case qU.LargeUtf8:i=t.visitLargeUtf8
13657
13659
  break
13658
- case UU.Binary:i=t.visitBinary
13660
+ case qU.Binary:i=t.visitBinary
13659
13661
  break
13660
- case UU.LargeBinary:i=t.visitLargeBinary
13662
+ case qU.LargeBinary:i=t.visitLargeBinary
13661
13663
  break
13662
- case UU.FixedSizeBinary:i=t.visitFixedSizeBinary
13664
+ case qU.FixedSizeBinary:i=t.visitFixedSizeBinary
13663
13665
  break
13664
- case UU.Date:i=t.visitDate
13666
+ case qU.Date:i=t.visitDate
13665
13667
  break
13666
- case UU.DateDay:i=t.visitDateDay||t.visitDate
13668
+ case qU.DateDay:i=t.visitDateDay||t.visitDate
13667
13669
  break
13668
- case UU.DateMillisecond:i=t.visitDateMillisecond||t.visitDate
13670
+ case qU.DateMillisecond:i=t.visitDateMillisecond||t.visitDate
13669
13671
  break
13670
- case UU.Timestamp:i=t.visitTimestamp
13672
+ case qU.Timestamp:i=t.visitTimestamp
13671
13673
  break
13672
- case UU.TimestampSecond:i=t.visitTimestampSecond||t.visitTimestamp
13674
+ case qU.TimestampSecond:i=t.visitTimestampSecond||t.visitTimestamp
13673
13675
  break
13674
- case UU.TimestampMillisecond:i=t.visitTimestampMillisecond||t.visitTimestamp
13676
+ case qU.TimestampMillisecond:i=t.visitTimestampMillisecond||t.visitTimestamp
13675
13677
  break
13676
- case UU.TimestampMicrosecond:i=t.visitTimestampMicrosecond||t.visitTimestamp
13678
+ case qU.TimestampMicrosecond:i=t.visitTimestampMicrosecond||t.visitTimestamp
13677
13679
  break
13678
- case UU.TimestampNanosecond:i=t.visitTimestampNanosecond||t.visitTimestamp
13680
+ case qU.TimestampNanosecond:i=t.visitTimestampNanosecond||t.visitTimestamp
13679
13681
  break
13680
- case UU.Time:i=t.visitTime
13682
+ case qU.Time:i=t.visitTime
13681
13683
  break
13682
- case UU.TimeSecond:i=t.visitTimeSecond||t.visitTime
13684
+ case qU.TimeSecond:i=t.visitTimeSecond||t.visitTime
13683
13685
  break
13684
- case UU.TimeMillisecond:i=t.visitTimeMillisecond||t.visitTime
13686
+ case qU.TimeMillisecond:i=t.visitTimeMillisecond||t.visitTime
13685
13687
  break
13686
- case UU.TimeMicrosecond:i=t.visitTimeMicrosecond||t.visitTime
13688
+ case qU.TimeMicrosecond:i=t.visitTimeMicrosecond||t.visitTime
13687
13689
  break
13688
- case UU.TimeNanosecond:i=t.visitTimeNanosecond||t.visitTime
13690
+ case qU.TimeNanosecond:i=t.visitTimeNanosecond||t.visitTime
13689
13691
  break
13690
- case UU.Decimal:i=t.visitDecimal
13692
+ case qU.Decimal:i=t.visitDecimal
13691
13693
  break
13692
- case UU.List:i=t.visitList
13694
+ case qU.List:i=t.visitList
13693
13695
  break
13694
- case UU.Struct:i=t.visitStruct
13696
+ case qU.Struct:i=t.visitStruct
13695
13697
  break
13696
- case UU.Union:i=t.visitUnion
13698
+ case qU.Union:i=t.visitUnion
13697
13699
  break
13698
- case UU.DenseUnion:i=t.visitDenseUnion||t.visitUnion
13700
+ case qU.DenseUnion:i=t.visitDenseUnion||t.visitUnion
13699
13701
  break
13700
- case UU.SparseUnion:i=t.visitSparseUnion||t.visitUnion
13702
+ case qU.SparseUnion:i=t.visitSparseUnion||t.visitUnion
13701
13703
  break
13702
- case UU.Dictionary:i=t.visitDictionary
13704
+ case qU.Dictionary:i=t.visitDictionary
13703
13705
  break
13704
- case UU.Interval:i=t.visitInterval
13706
+ case qU.Interval:i=t.visitInterval
13705
13707
  break
13706
- case UU.IntervalDayTime:i=t.visitIntervalDayTime||t.visitInterval
13708
+ case qU.IntervalDayTime:i=t.visitIntervalDayTime||t.visitInterval
13707
13709
  break
13708
- case UU.IntervalYearMonth:i=t.visitIntervalYearMonth||t.visitInterval
13710
+ case qU.IntervalYearMonth:i=t.visitIntervalYearMonth||t.visitInterval
13709
13711
  break
13710
- case UU.Duration:i=t.visitDuration
13712
+ case qU.Duration:i=t.visitDuration
13711
13713
  break
13712
- case UU.DurationSecond:i=t.visitDurationSecond||t.visitDuration
13714
+ case qU.DurationSecond:i=t.visitDurationSecond||t.visitDuration
13713
13715
  break
13714
- case UU.DurationMillisecond:i=t.visitDurationMillisecond||t.visitDuration
13716
+ case qU.DurationMillisecond:i=t.visitDurationMillisecond||t.visitDuration
13715
13717
  break
13716
- case UU.DurationMicrosecond:i=t.visitDurationMicrosecond||t.visitDuration
13718
+ case qU.DurationMicrosecond:i=t.visitDurationMicrosecond||t.visitDuration
13717
13719
  break
13718
- case UU.DurationNanosecond:i=t.visitDurationNanosecond||t.visitDuration
13720
+ case qU.DurationNanosecond:i=t.visitDurationNanosecond||t.visitDuration
13719
13721
  break
13720
- case UU.FixedSizeList:i=t.visitFixedSizeList
13722
+ case qU.FixedSizeList:i=t.visitFixedSizeList
13721
13723
  break
13722
- case UU.Map:i=t.visitMap}if("function"==typeof i)return i
13724
+ case qU.Map:i=t.visitMap}if("function"==typeof i)return i
13723
13725
  if(!n)return()=>null
13724
- throw new Error(`Unrecognized type '${UU[e]}'`)}function ej(t){switch(t.typeId){case UU.Null:return UU.Null
13725
- case UU.Int:{const{bitWidth:e,isSigned:n}=t
13726
- switch(e){case 8:return n?UU.Int8:UU.Uint8
13727
- case 16:return n?UU.Int16:UU.Uint16
13728
- case 32:return n?UU.Int32:UU.Uint32
13729
- case 64:return n?UU.Int64:UU.Uint64}return UU.Int}case UU.Float:switch(t.precision){case XH.HALF:return UU.Float16
13730
- case XH.SINGLE:return UU.Float32
13731
- case XH.DOUBLE:return UU.Float64}return UU.Float
13732
- case UU.Binary:return UU.Binary
13733
- case UU.LargeBinary:return UU.LargeBinary
13734
- case UU.Utf8:return UU.Utf8
13735
- case UU.LargeUtf8:return UU.LargeUtf8
13736
- case UU.Bool:return UU.Bool
13737
- case UU.Decimal:return UU.Decimal
13738
- case UU.Time:switch(t.unit){case QH.SECOND:return UU.TimeSecond
13739
- case QH.MILLISECOND:return UU.TimeMillisecond
13740
- case QH.MICROSECOND:return UU.TimeMicrosecond
13741
- case QH.NANOSECOND:return UU.TimeNanosecond}return UU.Time
13742
- case UU.Timestamp:switch(t.unit){case QH.SECOND:return UU.TimestampSecond
13743
- case QH.MILLISECOND:return UU.TimestampMillisecond
13744
- case QH.MICROSECOND:return UU.TimestampMicrosecond
13745
- case QH.NANOSECOND:return UU.TimestampNanosecond}return UU.Timestamp
13746
- case UU.Date:switch(t.unit){case JH.DAY:return UU.DateDay
13747
- case JH.MILLISECOND:return UU.DateMillisecond}return UU.Date
13748
- case UU.Interval:switch(t.unit){case tU.DAY_TIME:return UU.IntervalDayTime
13749
- case tU.YEAR_MONTH:return UU.IntervalYearMonth}return UU.Interval
13750
- case UU.Duration:switch(t.unit){case QH.SECOND:return UU.DurationSecond
13751
- case QH.MILLISECOND:return UU.DurationMillisecond
13752
- case QH.MICROSECOND:return UU.DurationMicrosecond
13753
- case QH.NANOSECOND:return UU.DurationNanosecond}return UU.Duration
13754
- case UU.Map:return UU.Map
13755
- case UU.List:return UU.List
13756
- case UU.Struct:return UU.Struct
13757
- case UU.Union:switch(t.mode){case YH.Dense:return UU.DenseUnion
13758
- case YH.Sparse:return UU.SparseUnion}return UU.Union
13759
- case UU.FixedSizeBinary:return UU.FixedSizeBinary
13760
- case UU.FixedSizeList:return UU.FixedSizeList
13761
- case UU.Dictionary:return UU.Dictionary}throw new Error(`Unrecognized type '${UU[t.typeId]}'`)}Qq.prototype.visitInt8=null,Qq.prototype.visitInt16=null,Qq.prototype.visitInt32=null,Qq.prototype.visitInt64=null,Qq.prototype.visitUint8=null,Qq.prototype.visitUint16=null,Qq.prototype.visitUint32=null,Qq.prototype.visitUint64=null,Qq.prototype.visitFloat16=null,Qq.prototype.visitFloat32=null,Qq.prototype.visitFloat64=null,Qq.prototype.visitDateDay=null,Qq.prototype.visitDateMillisecond=null,Qq.prototype.visitTimestampSecond=null,Qq.prototype.visitTimestampMillisecond=null,Qq.prototype.visitTimestampMicrosecond=null,Qq.prototype.visitTimestampNanosecond=null,Qq.prototype.visitTimeSecond=null,Qq.prototype.visitTimeMillisecond=null,Qq.prototype.visitTimeMicrosecond=null,Qq.prototype.visitTimeNanosecond=null,Qq.prototype.visitDenseUnion=null,Qq.prototype.visitSparseUnion=null,Qq.prototype.visitIntervalDayTime=null,Qq.prototype.visitIntervalYearMonth=null,Qq.prototype.visitDuration=null,Qq.prototype.visitDurationSecond=null,Qq.prototype.visitDurationMillisecond=null,Qq.prototype.visitDurationMicrosecond=null,Qq.prototype.visitDurationNanosecond=null
13762
- const nj=new Float64Array(1),ij=new Uint32Array(nj.buffer)
13763
- function sj(t){const e=(31744&t)>>10,n=(1023&t)/1024,i=Math.pow(-1,(32768&t)>>15)
13726
+ throw new Error(`Unrecognized type '${qU[e]}'`)}function nj(t){switch(t.typeId){case qU.Null:return qU.Null
13727
+ case qU.Int:{const{bitWidth:e,isSigned:n}=t
13728
+ switch(e){case 8:return n?qU.Int8:qU.Uint8
13729
+ case 16:return n?qU.Int16:qU.Uint16
13730
+ case 32:return n?qU.Int32:qU.Uint32
13731
+ case 64:return n?qU.Int64:qU.Uint64}return qU.Int}case qU.Float:switch(t.precision){case JH.HALF:return qU.Float16
13732
+ case JH.SINGLE:return qU.Float32
13733
+ case JH.DOUBLE:return qU.Float64}return qU.Float
13734
+ case qU.Binary:return qU.Binary
13735
+ case qU.LargeBinary:return qU.LargeBinary
13736
+ case qU.Utf8:return qU.Utf8
13737
+ case qU.LargeUtf8:return qU.LargeUtf8
13738
+ case qU.Bool:return qU.Bool
13739
+ case qU.Decimal:return qU.Decimal
13740
+ case qU.Time:switch(t.unit){case tU.SECOND:return qU.TimeSecond
13741
+ case tU.MILLISECOND:return qU.TimeMillisecond
13742
+ case tU.MICROSECOND:return qU.TimeMicrosecond
13743
+ case tU.NANOSECOND:return qU.TimeNanosecond}return qU.Time
13744
+ case qU.Timestamp:switch(t.unit){case tU.SECOND:return qU.TimestampSecond
13745
+ case tU.MILLISECOND:return qU.TimestampMillisecond
13746
+ case tU.MICROSECOND:return qU.TimestampMicrosecond
13747
+ case tU.NANOSECOND:return qU.TimestampNanosecond}return qU.Timestamp
13748
+ case qU.Date:switch(t.unit){case QH.DAY:return qU.DateDay
13749
+ case QH.MILLISECOND:return qU.DateMillisecond}return qU.Date
13750
+ case qU.Interval:switch(t.unit){case eU.DAY_TIME:return qU.IntervalDayTime
13751
+ case eU.YEAR_MONTH:return qU.IntervalYearMonth}return qU.Interval
13752
+ case qU.Duration:switch(t.unit){case tU.SECOND:return qU.DurationSecond
13753
+ case tU.MILLISECOND:return qU.DurationMillisecond
13754
+ case tU.MICROSECOND:return qU.DurationMicrosecond
13755
+ case tU.NANOSECOND:return qU.DurationNanosecond}return qU.Duration
13756
+ case qU.Map:return qU.Map
13757
+ case qU.List:return qU.List
13758
+ case qU.Struct:return qU.Struct
13759
+ case qU.Union:switch(t.mode){case XH.Dense:return qU.DenseUnion
13760
+ case XH.Sparse:return qU.SparseUnion}return qU.Union
13761
+ case qU.FixedSizeBinary:return qU.FixedSizeBinary
13762
+ case qU.FixedSizeList:return qU.FixedSizeList
13763
+ case qU.Dictionary:return qU.Dictionary}throw new Error(`Unrecognized type '${qU[t.typeId]}'`)}tj.prototype.visitInt8=null,tj.prototype.visitInt16=null,tj.prototype.visitInt32=null,tj.prototype.visitInt64=null,tj.prototype.visitUint8=null,tj.prototype.visitUint16=null,tj.prototype.visitUint32=null,tj.prototype.visitUint64=null,tj.prototype.visitFloat16=null,tj.prototype.visitFloat32=null,tj.prototype.visitFloat64=null,tj.prototype.visitDateDay=null,tj.prototype.visitDateMillisecond=null,tj.prototype.visitTimestampSecond=null,tj.prototype.visitTimestampMillisecond=null,tj.prototype.visitTimestampMicrosecond=null,tj.prototype.visitTimestampNanosecond=null,tj.prototype.visitTimeSecond=null,tj.prototype.visitTimeMillisecond=null,tj.prototype.visitTimeMicrosecond=null,tj.prototype.visitTimeNanosecond=null,tj.prototype.visitDenseUnion=null,tj.prototype.visitSparseUnion=null,tj.prototype.visitIntervalDayTime=null,tj.prototype.visitIntervalYearMonth=null,tj.prototype.visitDuration=null,tj.prototype.visitDurationSecond=null,tj.prototype.visitDurationMillisecond=null,tj.prototype.visitDurationMicrosecond=null,tj.prototype.visitDurationNanosecond=null
13764
+ const ij=new Float64Array(1),sj=new Uint32Array(ij.buffer)
13765
+ function oj(t){const e=(31744&t)>>10,n=(1023&t)/1024,i=Math.pow(-1,(32768&t)>>15)
13764
13766
  switch(e){case 31:return i*(n?Number.NaN:1/0)
13765
- case 0:return i*(n?6103515625e-14*n:0)}return i*Math.pow(2,e-15)*(1+n)}class oj extends Qq{}function rj(t){return(e,n,i)=>{if(e.setValid(n,null!=i))return t(e,n,i)}}const aj=(t,e,n,i)=>{if(n+1<e.length){const s=WU(e[n]),o=WU(e[n+1])
13766
- t.set(i.subarray(0,o-s),s)}},lj=({values:t},e,n)=>{t[e]=n},cj=({values:t},e,n)=>{t[e]=n},dj=({values:t},e,n)=>{t[e]=function(t){if(t!=t)return 32256
13767
- nj[0]=t
13768
- const e=(2147483648&ij[1])>>16&65535
13769
- let n=2146435072&ij[1],i=0
13770
- return n>=1089470464?ij[0]>0?n=31744:(n=(2080374784&n)>>16,i=(1048575&ij[1])>>10):n<=1056964608?(i=1048576+(1048575&ij[1]),i=1048576+(i<<(n>>20)-998)>>21,n=0):(n=n-1056964608>>10,i=512+(1048575&ij[1])>>10),e|n|65535&i}(n)},hj=({values:t},e,n)=>{((t,e,n)=>{t[e]=Math.floor(n/864e5)})(t,e,n.valueOf())},uj=({values:t},e,n)=>{t[e]=BigInt(n)},pj=({values:t,valueOffsets:e},n,i)=>aj(t,e,n,i),fj=({values:t,valueOffsets:e},n,i)=>aj(t,e,n,wH(i)),mj=({values:t},e,n)=>{t[e]=BigInt(n/1e3)},gj=({values:t},e,n)=>{t[e]=BigInt(n)},vj=({values:t},e,n)=>{t[e]=BigInt(1e3*n)},bj=({values:t},e,n)=>{t[e]=BigInt(1e6*n)},yj=({values:t},e,n)=>{t[e]=n},wj=({values:t},e,n)=>{t[e]=n},xj=({values:t},e,n)=>{t[e]=n},Cj=({values:t},e,n)=>{t[e]=n},kj=(t,e,n)=>{const i=t.type.typeIdToChildIndex[t.typeIds[e]],s=t.children[i]
13771
- Aj.visit(s,t.valueOffsets[e],n)},Sj=(t,e,n)=>{const i=t.type.typeIdToChildIndex[t.typeIds[e]],s=t.children[i]
13772
- Aj.visit(s,e,n)},_j=({values:t},e,n)=>{t.set(n.subarray(0,2),2*e)},Ij=({values:t},e,n)=>{t[e]=12*n[0]+n[1]%12},Mj=({values:t},e,n)=>{t[e]=n},$j=({values:t},e,n)=>{t[e]=n},Ej=({values:t},e,n)=>{t[e]=n},Dj=({values:t},e,n)=>{t[e]=n}
13773
- oj.prototype.visitBool=rj((({offset:t,values:e},n,i)=>{const s=t+n
13774
- i?e[s>>3]|=1<<s%8:e[s>>3]&=~(1<<s%8)})),oj.prototype.visitInt=rj(lj),oj.prototype.visitInt8=rj(lj),oj.prototype.visitInt16=rj(lj),oj.prototype.visitInt32=rj(lj),oj.prototype.visitInt64=rj(lj),oj.prototype.visitUint8=rj(lj),oj.prototype.visitUint16=rj(lj),oj.prototype.visitUint32=rj(lj),oj.prototype.visitUint64=rj(lj),oj.prototype.visitFloat=rj(((t,e,n)=>{switch(t.type.precision){case XH.HALF:return dj(t,e,n)
13775
- case XH.SINGLE:case XH.DOUBLE:return cj(t,e,n)}})),oj.prototype.visitFloat16=rj(dj),oj.prototype.visitFloat32=rj(cj),oj.prototype.visitFloat64=rj(cj),oj.prototype.visitUtf8=rj(fj),oj.prototype.visitLargeUtf8=rj(fj),oj.prototype.visitBinary=rj(pj),oj.prototype.visitLargeBinary=rj(pj),oj.prototype.visitFixedSizeBinary=rj((({stride:t,values:e},n,i)=>{e.set(i.subarray(0,t),t*n)})),oj.prototype.visitDate=rj(((t,e,n)=>{t.type.unit===JH.DAY?hj(t,e,n):uj(t,e,n)})),oj.prototype.visitDateDay=rj(hj),oj.prototype.visitDateMillisecond=rj(uj),oj.prototype.visitTimestamp=rj(((t,e,n)=>{switch(t.type.unit){case QH.SECOND:return mj(t,e,n)
13776
- case QH.MILLISECOND:return gj(t,e,n)
13777
- case QH.MICROSECOND:return vj(t,e,n)
13778
- case QH.NANOSECOND:return bj(t,e,n)}})),oj.prototype.visitTimestampSecond=rj(mj),oj.prototype.visitTimestampMillisecond=rj(gj),oj.prototype.visitTimestampMicrosecond=rj(vj),oj.prototype.visitTimestampNanosecond=rj(bj),oj.prototype.visitTime=rj(((t,e,n)=>{switch(t.type.unit){case QH.SECOND:return yj(t,e,n)
13779
- case QH.MILLISECOND:return wj(t,e,n)
13780
- case QH.MICROSECOND:return xj(t,e,n)
13781
- case QH.NANOSECOND:return Cj(t,e,n)}})),oj.prototype.visitTimeSecond=rj(yj),oj.prototype.visitTimeMillisecond=rj(wj),oj.prototype.visitTimeMicrosecond=rj(xj),oj.prototype.visitTimeNanosecond=rj(Cj),oj.prototype.visitDecimal=rj((({values:t,stride:e},n,i)=>{t.set(i.subarray(0,e),e*n)})),oj.prototype.visitList=rj(((t,e,n)=>{const i=t.children[0],s=t.valueOffsets,o=Aj.getVisitFn(i)
13767
+ case 0:return i*(n?6103515625e-14*n:0)}return i*Math.pow(2,e-15)*(1+n)}class rj extends tj{}function aj(t){return(e,n,i)=>{if(e.setValid(n,null!=i))return t(e,n,i)}}const lj=(t,e,n,i)=>{if(n+1<e.length){const s=GU(e[n]),o=GU(e[n+1])
13768
+ t.set(i.subarray(0,o-s),s)}},cj=({values:t},e,n)=>{t[e]=n},dj=({values:t},e,n)=>{t[e]=n},hj=({values:t},e,n)=>{t[e]=function(t){if(t!=t)return 32256
13769
+ ij[0]=t
13770
+ const e=(2147483648&sj[1])>>16&65535
13771
+ let n=2146435072&sj[1],i=0
13772
+ return n>=1089470464?sj[0]>0?n=31744:(n=(2080374784&n)>>16,i=(1048575&sj[1])>>10):n<=1056964608?(i=1048576+(1048575&sj[1]),i=1048576+(i<<(n>>20)-998)>>21,n=0):(n=n-1056964608>>10,i=512+(1048575&sj[1])>>10),e|n|65535&i}(n)},uj=({values:t},e,n)=>{((t,e,n)=>{t[e]=Math.floor(n/864e5)})(t,e,n.valueOf())},pj=({values:t},e,n)=>{t[e]=BigInt(n)},fj=({values:t,valueOffsets:e},n,i)=>lj(t,e,n,i),mj=({values:t,valueOffsets:e},n,i)=>lj(t,e,n,xH(i)),gj=({values:t},e,n)=>{t[e]=BigInt(n/1e3)},vj=({values:t},e,n)=>{t[e]=BigInt(n)},bj=({values:t},e,n)=>{t[e]=BigInt(1e3*n)},yj=({values:t},e,n)=>{t[e]=BigInt(1e6*n)},wj=({values:t},e,n)=>{t[e]=n},xj=({values:t},e,n)=>{t[e]=n},Cj=({values:t},e,n)=>{t[e]=n},kj=({values:t},e,n)=>{t[e]=n},Sj=(t,e,n)=>{const i=t.type.typeIdToChildIndex[t.typeIds[e]],s=t.children[i]
13773
+ Tj.visit(s,t.valueOffsets[e],n)},_j=(t,e,n)=>{const i=t.type.typeIdToChildIndex[t.typeIds[e]],s=t.children[i]
13774
+ Tj.visit(s,e,n)},Ij=({values:t},e,n)=>{t.set(n.subarray(0,2),2*e)},Mj=({values:t},e,n)=>{t[e]=12*n[0]+n[1]%12},$j=({values:t},e,n)=>{t[e]=n},Ej=({values:t},e,n)=>{t[e]=n},Dj=({values:t},e,n)=>{t[e]=n},Aj=({values:t},e,n)=>{t[e]=n}
13775
+ rj.prototype.visitBool=aj((({offset:t,values:e},n,i)=>{const s=t+n
13776
+ i?e[s>>3]|=1<<s%8:e[s>>3]&=~(1<<s%8)})),rj.prototype.visitInt=aj(cj),rj.prototype.visitInt8=aj(cj),rj.prototype.visitInt16=aj(cj),rj.prototype.visitInt32=aj(cj),rj.prototype.visitInt64=aj(cj),rj.prototype.visitUint8=aj(cj),rj.prototype.visitUint16=aj(cj),rj.prototype.visitUint32=aj(cj),rj.prototype.visitUint64=aj(cj),rj.prototype.visitFloat=aj(((t,e,n)=>{switch(t.type.precision){case JH.HALF:return hj(t,e,n)
13777
+ case JH.SINGLE:case JH.DOUBLE:return dj(t,e,n)}})),rj.prototype.visitFloat16=aj(hj),rj.prototype.visitFloat32=aj(dj),rj.prototype.visitFloat64=aj(dj),rj.prototype.visitUtf8=aj(mj),rj.prototype.visitLargeUtf8=aj(mj),rj.prototype.visitBinary=aj(fj),rj.prototype.visitLargeBinary=aj(fj),rj.prototype.visitFixedSizeBinary=aj((({stride:t,values:e},n,i)=>{e.set(i.subarray(0,t),t*n)})),rj.prototype.visitDate=aj(((t,e,n)=>{t.type.unit===QH.DAY?uj(t,e,n):pj(t,e,n)})),rj.prototype.visitDateDay=aj(uj),rj.prototype.visitDateMillisecond=aj(pj),rj.prototype.visitTimestamp=aj(((t,e,n)=>{switch(t.type.unit){case tU.SECOND:return gj(t,e,n)
13778
+ case tU.MILLISECOND:return vj(t,e,n)
13779
+ case tU.MICROSECOND:return bj(t,e,n)
13780
+ case tU.NANOSECOND:return yj(t,e,n)}})),rj.prototype.visitTimestampSecond=aj(gj),rj.prototype.visitTimestampMillisecond=aj(vj),rj.prototype.visitTimestampMicrosecond=aj(bj),rj.prototype.visitTimestampNanosecond=aj(yj),rj.prototype.visitTime=aj(((t,e,n)=>{switch(t.type.unit){case tU.SECOND:return wj(t,e,n)
13781
+ case tU.MILLISECOND:return xj(t,e,n)
13782
+ case tU.MICROSECOND:return Cj(t,e,n)
13783
+ case tU.NANOSECOND:return kj(t,e,n)}})),rj.prototype.visitTimeSecond=aj(wj),rj.prototype.visitTimeMillisecond=aj(xj),rj.prototype.visitTimeMicrosecond=aj(Cj),rj.prototype.visitTimeNanosecond=aj(kj),rj.prototype.visitDecimal=aj((({values:t,stride:e},n,i)=>{t.set(i.subarray(0,e),e*n)})),rj.prototype.visitList=aj(((t,e,n)=>{const i=t.children[0],s=t.valueOffsets,o=Tj.getVisitFn(i)
13782
13784
  if(Array.isArray(n))for(let t=-1,r=s[e],a=s[e+1];r<a;)o(i,r++,n[++t])
13783
- else for(let t=-1,r=s[e],a=s[e+1];r<a;)o(i,r++,n.get(++t))})),oj.prototype.visitStruct=rj(((t,e,n)=>{const i=t.type.children.map((t=>Aj.getVisitFn(t.type))),s=n instanceof Map?(o=e,r=n,(t,e,n,i)=>e&&t(e,o,r.get(n.name))):n instanceof tG?((t,e)=>(n,i,s,o)=>i&&n(i,t,e.get(o)))(e,n):Array.isArray(n)?((t,e)=>(n,i,s,o)=>i&&n(i,t,e[o]))(e,n):((t,e)=>(n,i,s,o)=>i&&n(i,t,e[s.name]))(e,n)
13785
+ else for(let t=-1,r=s[e],a=s[e+1];r<a;)o(i,r++,n.get(++t))})),rj.prototype.visitStruct=aj(((t,e,n)=>{const i=t.type.children.map((t=>Tj.getVisitFn(t.type))),s=n instanceof Map?(o=e,r=n,(t,e,n,i)=>e&&t(e,o,r.get(n.name))):n instanceof eG?((t,e)=>(n,i,s,o)=>i&&n(i,t,e.get(o)))(e,n):Array.isArray(n)?((t,e)=>(n,i,s,o)=>i&&n(i,t,e[o]))(e,n):((t,e)=>(n,i,s,o)=>i&&n(i,t,e[s.name]))(e,n)
13784
13786
  var o,r
13785
- t.type.children.forEach(((e,n)=>s(i[n],t.children[n],e,n)))})),oj.prototype.visitUnion=rj(((t,e,n)=>{t.type.mode===YH.Dense?kj(t,e,n):Sj(t,e,n)})),oj.prototype.visitDenseUnion=rj(kj),oj.prototype.visitSparseUnion=rj(Sj),oj.prototype.visitDictionary=rj(((t,e,n)=>{var i
13786
- null===(i=t.dictionary)||void 0===i||i.set(t.values[e],n)})),oj.prototype.visitInterval=rj(((t,e,n)=>{t.type.unit===tU.DAY_TIME?_j(t,e,n):Ij(t,e,n)})),oj.prototype.visitIntervalDayTime=rj(_j),oj.prototype.visitIntervalYearMonth=rj(Ij),oj.prototype.visitDuration=rj(((t,e,n)=>{switch(t.type.unit){case QH.SECOND:return Mj(t,e,n)
13787
- case QH.MILLISECOND:return $j(t,e,n)
13788
- case QH.MICROSECOND:return Ej(t,e,n)
13789
- case QH.NANOSECOND:return Dj(t,e,n)}})),oj.prototype.visitDurationSecond=rj(Mj),oj.prototype.visitDurationMillisecond=rj($j),oj.prototype.visitDurationMicrosecond=rj(Ej),oj.prototype.visitDurationNanosecond=rj(Dj),oj.prototype.visitFixedSizeList=rj(((t,e,n)=>{const{stride:i}=t,s=t.children[0],o=Aj.getVisitFn(s)
13787
+ t.type.children.forEach(((e,n)=>s(i[n],t.children[n],e,n)))})),rj.prototype.visitUnion=aj(((t,e,n)=>{t.type.mode===XH.Dense?Sj(t,e,n):_j(t,e,n)})),rj.prototype.visitDenseUnion=aj(Sj),rj.prototype.visitSparseUnion=aj(_j),rj.prototype.visitDictionary=aj(((t,e,n)=>{var i
13788
+ null===(i=t.dictionary)||void 0===i||i.set(t.values[e],n)})),rj.prototype.visitInterval=aj(((t,e,n)=>{t.type.unit===eU.DAY_TIME?Ij(t,e,n):Mj(t,e,n)})),rj.prototype.visitIntervalDayTime=aj(Ij),rj.prototype.visitIntervalYearMonth=aj(Mj),rj.prototype.visitDuration=aj(((t,e,n)=>{switch(t.type.unit){case tU.SECOND:return $j(t,e,n)
13789
+ case tU.MILLISECOND:return Ej(t,e,n)
13790
+ case tU.MICROSECOND:return Dj(t,e,n)
13791
+ case tU.NANOSECOND:return Aj(t,e,n)}})),rj.prototype.visitDurationSecond=aj($j),rj.prototype.visitDurationMillisecond=aj(Ej),rj.prototype.visitDurationMicrosecond=aj(Dj),rj.prototype.visitDurationNanosecond=aj(Aj),rj.prototype.visitFixedSizeList=aj(((t,e,n)=>{const{stride:i}=t,s=t.children[0],o=Tj.getVisitFn(s)
13790
13792
  if(Array.isArray(n))for(let t=-1,r=e*i;++t<i;)o(s,r+t,n[t])
13791
- else for(let t=-1,r=e*i;++t<i;)o(s,r+t,n.get(t))})),oj.prototype.visitMap=rj(((t,e,n)=>{const i=t.children[0],{valueOffsets:s}=t,o=Aj.getVisitFn(i)
13793
+ else for(let t=-1,r=e*i;++t<i;)o(s,r+t,n.get(t))})),rj.prototype.visitMap=aj(((t,e,n)=>{const i=t.children[0],{valueOffsets:s}=t,o=Tj.getVisitFn(i)
13792
13794
  let{[e]:r,[e+1]:a}=s
13793
13795
  const l=n instanceof Map?n.entries():Object.entries(n)
13794
13796
  for(const t of l)if(o(i,r,t),++r>=a)break}))
13795
- const Aj=new oj,Tj=Symbol.for("parent"),Oj=Symbol.for("rowIndex")
13796
- class Rj{constructor(t,e){return this[Tj]=t,this[Oj]=e,new Proxy(this,new Nj)}toArray(){return Object.values(this.toJSON())}toJSON(){const t=this[Oj],e=this[Tj],n=e.type.children,i={}
13797
- for(let s=-1,o=n.length;++s<o;)i[n[s].name]=lW.visit(e.children[s],t)
13798
- return i}toString(){return`{${[...this].map((([t,e])=>`${jU(t)}: ${jU(e)}`)).join(", ")}}`}[Symbol.for("nodejs.util.inspect.custom")](){return this.toString()}[Symbol.iterator](){return new Fj(this[Tj],this[Oj])}}class Fj{constructor(t,e){this.childIndex=0,this.children=t.children,this.rowIndex=e,this.childFields=t.type.children,this.numChildren=this.childFields.length}[Symbol.iterator](){return this}next(){const t=this.childIndex
13799
- return t<this.numChildren?(this.childIndex=t+1,{done:!1,value:[this.childFields[t].name,lW.visit(this.children[t],this.rowIndex)]}):{done:!0,value:null}}}Object.defineProperties(Rj.prototype,{[Symbol.toStringTag]:{enumerable:!1,configurable:!1,value:"Row"},[Tj]:{writable:!0,enumerable:!1,configurable:!1,value:null},[Oj]:{writable:!0,enumerable:!1,configurable:!1,value:-1}})
13800
- class Nj{isExtensible(){return!1}deleteProperty(){return!1}preventExtensions(){return!0}ownKeys(t){return t[Tj].type.children.map((t=>t.name))}has(t,e){return-1!==t[Tj].type.children.findIndex((t=>t.name===e))}getOwnPropertyDescriptor(t,e){if(-1!==t[Tj].type.children.findIndex((t=>t.name===e)))return{writable:!0,enumerable:!0,configurable:!0}}get(t,e){if(Reflect.has(t,e))return t[e]
13801
- const n=t[Tj].type.children.findIndex((t=>t.name===e))
13802
- if(-1!==n){const i=lW.visit(t[Tj].children[n],t[Oj])
13803
- return Reflect.set(t,e,i),i}}set(t,e,n){const i=t[Tj].type.children.findIndex((t=>t.name===e))
13804
- return-1!==i?(Aj.visit(t[Tj].children[i],t[Oj],n),Reflect.set(t,e,n)):!(!Reflect.has(t,e)&&"symbol"!=typeof e)&&Reflect.set(t,e,n)}}class Lj extends Qq{}function Bj(t){return(e,n)=>e.getValid(n)?t(e,n):null}const Pj=(t,e,n)=>{if(n+1>=e.length)return null
13805
- const i=WU(e[n]),s=WU(e[n+1])
13806
- return t.subarray(i,s)},zj=({values:t},e)=>((t,e)=>864e5*t[e])(t,e),Vj=({values:t},e)=>WU(t[e]),Hj=({stride:t,values:e},n)=>e[t*n],Uj=({values:t},e)=>t[e],qj=({values:t,valueOffsets:e},n)=>Pj(t,e,n),jj=({values:t,valueOffsets:e},n)=>{const i=Pj(t,e,n)
13807
- return null!==i?bH(i):null},Wj=({values:t},e)=>1e3*WU(t[e]),Gj=({values:t},e)=>WU(t[e]),Zj=({values:t},e)=>GU(t[e],BigInt(1e3)),Kj=({values:t},e)=>GU(t[e],BigInt(1e6)),Yj=({values:t},e)=>t[e],Xj=({values:t},e)=>t[e],Jj=({values:t},e)=>t[e],Qj=({values:t},e)=>t[e],tW=(t,e)=>{const n=t.type.typeIdToChildIndex[t.typeIds[e]],i=t.children[n]
13808
- return lW.visit(i,t.valueOffsets[e])},eW=(t,e)=>{const n=t.type.typeIdToChildIndex[t.typeIds[e]],i=t.children[n]
13809
- return lW.visit(i,e)},nW=({values:t},e)=>t.subarray(2*e,2*(e+1)),iW=({values:t},e)=>{const n=t[e],i=new Int32Array(2)
13810
- return i[0]=Math.trunc(n/12),i[1]=Math.trunc(n%12),i},sW=({values:t},e)=>t[e],oW=({values:t},e)=>t[e],rW=({values:t},e)=>t[e],aW=({values:t},e)=>t[e]
13811
- Lj.prototype.visitNull=Bj(((t,e)=>null)),Lj.prototype.visitBool=Bj((({offset:t,values:e},n)=>{const i=t+n
13812
- return 0!=(e[i>>3]&1<<i%8)})),Lj.prototype.visitInt=Bj((({values:t},e)=>t[e])),Lj.prototype.visitInt8=Bj(Hj),Lj.prototype.visitInt16=Bj(Hj),Lj.prototype.visitInt32=Bj(Hj),Lj.prototype.visitInt64=Bj(Uj),Lj.prototype.visitUint8=Bj(Hj),Lj.prototype.visitUint16=Bj(Hj),Lj.prototype.visitUint32=Bj(Hj),Lj.prototype.visitUint64=Bj(Uj),Lj.prototype.visitFloat=Bj((({type:t,values:e},n)=>t.precision!==XH.HALF?e[n]:sj(e[n]))),Lj.prototype.visitFloat16=Bj((({stride:t,values:e},n)=>sj(e[t*n]))),Lj.prototype.visitFloat32=Bj(Hj),Lj.prototype.visitFloat64=Bj(Hj),Lj.prototype.visitUtf8=Bj(jj),Lj.prototype.visitLargeUtf8=Bj(jj),Lj.prototype.visitBinary=Bj(qj),Lj.prototype.visitLargeBinary=Bj(qj),Lj.prototype.visitFixedSizeBinary=Bj((({stride:t,values:e},n)=>e.subarray(t*n,t*(n+1)))),Lj.prototype.visitDate=Bj(((t,e)=>t.type.unit===JH.DAY?zj(t,e):Vj(t,e))),Lj.prototype.visitDateDay=Bj(zj),Lj.prototype.visitDateMillisecond=Bj(Vj),Lj.prototype.visitTimestamp=Bj(((t,e)=>{switch(t.type.unit){case QH.SECOND:return Wj(t,e)
13813
- case QH.MILLISECOND:return Gj(t,e)
13814
- case QH.MICROSECOND:return Zj(t,e)
13815
- case QH.NANOSECOND:return Kj(t,e)}})),Lj.prototype.visitTimestampSecond=Bj(Wj),Lj.prototype.visitTimestampMillisecond=Bj(Gj),Lj.prototype.visitTimestampMicrosecond=Bj(Zj),Lj.prototype.visitTimestampNanosecond=Bj(Kj),Lj.prototype.visitTime=Bj(((t,e)=>{switch(t.type.unit){case QH.SECOND:return Yj(t,e)
13816
- case QH.MILLISECOND:return Xj(t,e)
13817
- case QH.MICROSECOND:return Jj(t,e)
13818
- case QH.NANOSECOND:return Qj(t,e)}})),Lj.prototype.visitTimeSecond=Bj(Yj),Lj.prototype.visitTimeMillisecond=Bj(Xj),Lj.prototype.visitTimeMicrosecond=Bj(Jj),Lj.prototype.visitTimeNanosecond=Bj(Qj),Lj.prototype.visitDecimal=Bj((({values:t,stride:e},n)=>iq.decimal(t.subarray(e*n,e*(n+1))))),Lj.prototype.visitList=Bj(((t,e)=>{const{valueOffsets:n,stride:i,children:s}=t,{[e*i]:o,[e*i+1]:r}=n,a=s[0].slice(o,r-o)
13819
- return new tG([a])})),Lj.prototype.visitStruct=Bj(((t,e)=>new Rj(t,e))),Lj.prototype.visitUnion=Bj(((t,e)=>t.type.mode===YH.Dense?tW(t,e):eW(t,e))),Lj.prototype.visitDenseUnion=Bj(tW),Lj.prototype.visitSparseUnion=Bj(eW),Lj.prototype.visitDictionary=Bj(((t,e)=>{var n
13820
- return null===(n=t.dictionary)||void 0===n?void 0:n.get(t.values[e])})),Lj.prototype.visitInterval=Bj(((t,e)=>t.type.unit===tU.DAY_TIME?nW(t,e):iW(t,e))),Lj.prototype.visitIntervalDayTime=Bj(nW),Lj.prototype.visitIntervalYearMonth=Bj(iW),Lj.prototype.visitDuration=Bj(((t,e)=>{switch(t.type.unit){case QH.SECOND:return sW(t,e)
13821
- case QH.MILLISECOND:return oW(t,e)
13822
- case QH.MICROSECOND:return rW(t,e)
13823
- case QH.NANOSECOND:return aW(t,e)}})),Lj.prototype.visitDurationSecond=Bj(sW),Lj.prototype.visitDurationMillisecond=Bj(oW),Lj.prototype.visitDurationMicrosecond=Bj(rW),Lj.prototype.visitDurationNanosecond=Bj(aW),Lj.prototype.visitFixedSizeList=Bj(((t,e)=>{const{stride:n,children:i}=t,s=i[0].slice(e*n,n)
13824
- return new tG([s])})),Lj.prototype.visitMap=Bj(((t,e)=>{const{valueOffsets:n,children:i}=t,{[e]:s,[e+1]:o}=n,r=i[0]
13825
- return new pW(r.slice(s,o-s))}))
13826
- const lW=new Lj,cW=Symbol.for("keys"),dW=Symbol.for("vals"),hW=Symbol.for("kKeysAsStrings"),uW=Symbol.for("_kKeysAsStrings")
13827
- class pW{constructor(t){return this[cW]=new tG([t.children[0]]).memoize(),this[dW]=t.children[1],new Proxy(this,new mW)}get[hW](){return this[uW]||(this[uW]=Array.from(this[cW].toArray(),String))}[Symbol.iterator](){return new fW(this[cW],this[dW])}get size(){return this[cW].length}toArray(){return Object.values(this.toJSON())}toJSON(){const t=this[cW],e=this[dW],n={}
13828
- for(let i=-1,s=t.length;++i<s;)n[t.get(i)]=lW.visit(e,i)
13829
- return n}toString(){return`{${[...this].map((([t,e])=>`${jU(t)}: ${jU(e)}`)).join(", ")}}`}[Symbol.for("nodejs.util.inspect.custom")](){return this.toString()}}class fW{constructor(t,e){this.keys=t,this.vals=e,this.keyIndex=0,this.numKeys=t.length}[Symbol.iterator](){return this}next(){const t=this.keyIndex
13830
- return t===this.numKeys?{done:!0,value:null}:(this.keyIndex++,{done:!1,value:[this.keys.get(t),lW.visit(this.vals,t)]})}}class mW{isExtensible(){return!1}deleteProperty(){return!1}preventExtensions(){return!0}ownKeys(t){return t[hW]}has(t,e){return t[hW].includes(e)}getOwnPropertyDescriptor(t,e){if(-1!==t[hW].indexOf(e))return{writable:!0,enumerable:!0,configurable:!0}}get(t,e){if(Reflect.has(t,e))return t[e]
13831
- const n=t[hW].indexOf(e)
13832
- if(-1!==n){const i=lW.visit(Reflect.get(t,dW),n)
13833
- return Reflect.set(t,e,i),i}}set(t,e,n){const i=t[hW].indexOf(e)
13834
- return-1!==i?(Aj.visit(Reflect.get(t,dW),i,n),Reflect.set(t,e,n)):!!Reflect.has(t,e)&&Reflect.set(t,e,n)}}let gW
13835
- function vW(t,e,n,i){const{length:s=0}=t
13797
+ const Tj=new rj,Oj=Symbol.for("parent"),Rj=Symbol.for("rowIndex")
13798
+ class Fj{constructor(t,e){return this[Oj]=t,this[Rj]=e,new Proxy(this,new Lj)}toArray(){return Object.values(this.toJSON())}toJSON(){const t=this[Rj],e=this[Oj],n=e.type.children,i={}
13799
+ for(let s=-1,o=n.length;++s<o;)i[n[s].name]=cW.visit(e.children[s],t)
13800
+ return i}toString(){return`{${[...this].map((([t,e])=>`${WU(t)}: ${WU(e)}`)).join(", ")}}`}[Symbol.for("nodejs.util.inspect.custom")](){return this.toString()}[Symbol.iterator](){return new Nj(this[Oj],this[Rj])}}class Nj{constructor(t,e){this.childIndex=0,this.children=t.children,this.rowIndex=e,this.childFields=t.type.children,this.numChildren=this.childFields.length}[Symbol.iterator](){return this}next(){const t=this.childIndex
13801
+ return t<this.numChildren?(this.childIndex=t+1,{done:!1,value:[this.childFields[t].name,cW.visit(this.children[t],this.rowIndex)]}):{done:!0,value:null}}}Object.defineProperties(Fj.prototype,{[Symbol.toStringTag]:{enumerable:!1,configurable:!1,value:"Row"},[Oj]:{writable:!0,enumerable:!1,configurable:!1,value:null},[Rj]:{writable:!0,enumerable:!1,configurable:!1,value:-1}})
13802
+ class Lj{isExtensible(){return!1}deleteProperty(){return!1}preventExtensions(){return!0}ownKeys(t){return t[Oj].type.children.map((t=>t.name))}has(t,e){return-1!==t[Oj].type.children.findIndex((t=>t.name===e))}getOwnPropertyDescriptor(t,e){if(-1!==t[Oj].type.children.findIndex((t=>t.name===e)))return{writable:!0,enumerable:!0,configurable:!0}}get(t,e){if(Reflect.has(t,e))return t[e]
13803
+ const n=t[Oj].type.children.findIndex((t=>t.name===e))
13804
+ if(-1!==n){const i=cW.visit(t[Oj].children[n],t[Rj])
13805
+ return Reflect.set(t,e,i),i}}set(t,e,n){const i=t[Oj].type.children.findIndex((t=>t.name===e))
13806
+ return-1!==i?(Tj.visit(t[Oj].children[i],t[Rj],n),Reflect.set(t,e,n)):!(!Reflect.has(t,e)&&"symbol"!=typeof e)&&Reflect.set(t,e,n)}}class Bj extends tj{}function Pj(t){return(e,n)=>e.getValid(n)?t(e,n):null}const zj=(t,e,n)=>{if(n+1>=e.length)return null
13807
+ const i=GU(e[n]),s=GU(e[n+1])
13808
+ return t.subarray(i,s)},Vj=({values:t},e)=>((t,e)=>864e5*t[e])(t,e),Hj=({values:t},e)=>GU(t[e]),Uj=({stride:t,values:e},n)=>e[t*n],qj=({values:t},e)=>t[e],jj=({values:t,valueOffsets:e},n)=>zj(t,e,n),Wj=({values:t,valueOffsets:e},n)=>{const i=zj(t,e,n)
13809
+ return null!==i?yH(i):null},Gj=({values:t},e)=>1e3*GU(t[e]),Zj=({values:t},e)=>GU(t[e]),Kj=({values:t},e)=>ZU(t[e],BigInt(1e3)),Yj=({values:t},e)=>ZU(t[e],BigInt(1e6)),Xj=({values:t},e)=>t[e],Jj=({values:t},e)=>t[e],Qj=({values:t},e)=>t[e],tW=({values:t},e)=>t[e],eW=(t,e)=>{const n=t.type.typeIdToChildIndex[t.typeIds[e]],i=t.children[n]
13810
+ return cW.visit(i,t.valueOffsets[e])},nW=(t,e)=>{const n=t.type.typeIdToChildIndex[t.typeIds[e]],i=t.children[n]
13811
+ return cW.visit(i,e)},iW=({values:t},e)=>t.subarray(2*e,2*(e+1)),sW=({values:t},e)=>{const n=t[e],i=new Int32Array(2)
13812
+ return i[0]=Math.trunc(n/12),i[1]=Math.trunc(n%12),i},oW=({values:t},e)=>t[e],rW=({values:t},e)=>t[e],aW=({values:t},e)=>t[e],lW=({values:t},e)=>t[e]
13813
+ Bj.prototype.visitNull=Pj(((t,e)=>null)),Bj.prototype.visitBool=Pj((({offset:t,values:e},n)=>{const i=t+n
13814
+ return!!(e[i>>3]&1<<i%8)})),Bj.prototype.visitInt=Pj((({values:t},e)=>t[e])),Bj.prototype.visitInt8=Pj(Uj),Bj.prototype.visitInt16=Pj(Uj),Bj.prototype.visitInt32=Pj(Uj),Bj.prototype.visitInt64=Pj(qj),Bj.prototype.visitUint8=Pj(Uj),Bj.prototype.visitUint16=Pj(Uj),Bj.prototype.visitUint32=Pj(Uj),Bj.prototype.visitUint64=Pj(qj),Bj.prototype.visitFloat=Pj((({type:t,values:e},n)=>t.precision!==JH.HALF?e[n]:oj(e[n]))),Bj.prototype.visitFloat16=Pj((({stride:t,values:e},n)=>oj(e[t*n]))),Bj.prototype.visitFloat32=Pj(Uj),Bj.prototype.visitFloat64=Pj(Uj),Bj.prototype.visitUtf8=Pj(Wj),Bj.prototype.visitLargeUtf8=Pj(Wj),Bj.prototype.visitBinary=Pj(jj),Bj.prototype.visitLargeBinary=Pj(jj),Bj.prototype.visitFixedSizeBinary=Pj((({stride:t,values:e},n)=>e.subarray(t*n,t*(n+1)))),Bj.prototype.visitDate=Pj(((t,e)=>t.type.unit===QH.DAY?Vj(t,e):Hj(t,e))),Bj.prototype.visitDateDay=Pj(Vj),Bj.prototype.visitDateMillisecond=Pj(Hj),Bj.prototype.visitTimestamp=Pj(((t,e)=>{switch(t.type.unit){case tU.SECOND:return Gj(t,e)
13815
+ case tU.MILLISECOND:return Zj(t,e)
13816
+ case tU.MICROSECOND:return Kj(t,e)
13817
+ case tU.NANOSECOND:return Yj(t,e)}})),Bj.prototype.visitTimestampSecond=Pj(Gj),Bj.prototype.visitTimestampMillisecond=Pj(Zj),Bj.prototype.visitTimestampMicrosecond=Pj(Kj),Bj.prototype.visitTimestampNanosecond=Pj(Yj),Bj.prototype.visitTime=Pj(((t,e)=>{switch(t.type.unit){case tU.SECOND:return Xj(t,e)
13818
+ case tU.MILLISECOND:return Jj(t,e)
13819
+ case tU.MICROSECOND:return Qj(t,e)
13820
+ case tU.NANOSECOND:return tW(t,e)}})),Bj.prototype.visitTimeSecond=Pj(Xj),Bj.prototype.visitTimeMillisecond=Pj(Jj),Bj.prototype.visitTimeMicrosecond=Pj(Qj),Bj.prototype.visitTimeNanosecond=Pj(tW),Bj.prototype.visitDecimal=Pj((({values:t,stride:e},n)=>sq.decimal(t.subarray(e*n,e*(n+1))))),Bj.prototype.visitList=Pj(((t,e)=>{const{valueOffsets:n,stride:i,children:s}=t,{[e*i]:o,[e*i+1]:r}=n,a=s[0].slice(o,r-o)
13821
+ return new eG([a])})),Bj.prototype.visitStruct=Pj(((t,e)=>new Fj(t,e))),Bj.prototype.visitUnion=Pj(((t,e)=>t.type.mode===XH.Dense?eW(t,e):nW(t,e))),Bj.prototype.visitDenseUnion=Pj(eW),Bj.prototype.visitSparseUnion=Pj(nW),Bj.prototype.visitDictionary=Pj(((t,e)=>{var n
13822
+ return null===(n=t.dictionary)||void 0===n?void 0:n.get(t.values[e])})),Bj.prototype.visitInterval=Pj(((t,e)=>t.type.unit===eU.DAY_TIME?iW(t,e):sW(t,e))),Bj.prototype.visitIntervalDayTime=Pj(iW),Bj.prototype.visitIntervalYearMonth=Pj(sW),Bj.prototype.visitDuration=Pj(((t,e)=>{switch(t.type.unit){case tU.SECOND:return oW(t,e)
13823
+ case tU.MILLISECOND:return rW(t,e)
13824
+ case tU.MICROSECOND:return aW(t,e)
13825
+ case tU.NANOSECOND:return lW(t,e)}})),Bj.prototype.visitDurationSecond=Pj(oW),Bj.prototype.visitDurationMillisecond=Pj(rW),Bj.prototype.visitDurationMicrosecond=Pj(aW),Bj.prototype.visitDurationNanosecond=Pj(lW),Bj.prototype.visitFixedSizeList=Pj(((t,e)=>{const{stride:n,children:i}=t,s=i[0].slice(e*n,n)
13826
+ return new eG([s])})),Bj.prototype.visitMap=Pj(((t,e)=>{const{valueOffsets:n,children:i}=t,{[e]:s,[e+1]:o}=n,r=i[0]
13827
+ return new fW(r.slice(s,o-s))}))
13828
+ const cW=new Bj,dW=Symbol.for("keys"),hW=Symbol.for("vals"),uW=Symbol.for("kKeysAsStrings"),pW=Symbol.for("_kKeysAsStrings")
13829
+ class fW{constructor(t){return this[dW]=new eG([t.children[0]]).memoize(),this[hW]=t.children[1],new Proxy(this,new gW)}get[uW](){return this[pW]||(this[pW]=Array.from(this[dW].toArray(),String))}[Symbol.iterator](){return new mW(this[dW],this[hW])}get size(){return this[dW].length}toArray(){return Object.values(this.toJSON())}toJSON(){const t=this[dW],e=this[hW],n={}
13830
+ for(let i=-1,s=t.length;++i<s;)n[t.get(i)]=cW.visit(e,i)
13831
+ return n}toString(){return`{${[...this].map((([t,e])=>`${WU(t)}: ${WU(e)}`)).join(", ")}}`}[Symbol.for("nodejs.util.inspect.custom")](){return this.toString()}}class mW{constructor(t,e){this.keys=t,this.vals=e,this.keyIndex=0,this.numKeys=t.length}[Symbol.iterator](){return this}next(){const t=this.keyIndex
13832
+ return t===this.numKeys?{done:!0,value:null}:(this.keyIndex++,{done:!1,value:[this.keys.get(t),cW.visit(this.vals,t)]})}}class gW{isExtensible(){return!1}deleteProperty(){return!1}preventExtensions(){return!0}ownKeys(t){return t[uW]}has(t,e){return t[uW].includes(e)}getOwnPropertyDescriptor(t,e){if(-1!==t[uW].indexOf(e))return{writable:!0,enumerable:!0,configurable:!0}}get(t,e){if(Reflect.has(t,e))return t[e]
13833
+ const n=t[uW].indexOf(e)
13834
+ if(-1!==n){const i=cW.visit(Reflect.get(t,hW),n)
13835
+ return Reflect.set(t,e,i),i}}set(t,e,n){const i=t[uW].indexOf(e)
13836
+ return-1!==i?(Tj.visit(Reflect.get(t,hW),i,n),Reflect.set(t,e,n)):!!Reflect.has(t,e)&&Reflect.set(t,e,n)}}let vW
13837
+ function bW(t,e,n,i){const{length:s=0}=t
13836
13838
  let o="number"!=typeof e?0:e,r="number"!=typeof n?s:n
13837
- return o<0&&(o=(o%s+s)%s),r<0&&(r=(r%s+s)%s),r<o&&(gW=o,o=r,r=gW),r>s&&(r=s),i?i(t,o,r):[o,r]}Object.defineProperties(pW.prototype,{[Symbol.toStringTag]:{enumerable:!1,configurable:!1,value:"Row"},[cW]:{writable:!0,enumerable:!1,configurable:!1,value:null},[dW]:{writable:!0,enumerable:!1,configurable:!1,value:null},[uW]:{writable:!0,enumerable:!1,configurable:!1,value:null}})
13838
- const bW=(t,e)=>t<0?e+t:t,yW=t=>t!=t
13839
- function wW(t){if("object"!==typeof t||null===t)return yW(t)?yW:e=>e===t
13839
+ return o<0&&(o=(o%s+s)%s),r<0&&(r=(r%s+s)%s),r<o&&(vW=o,o=r,r=vW),r>s&&(r=s),i?i(t,o,r):[o,r]}Object.defineProperties(fW.prototype,{[Symbol.toStringTag]:{enumerable:!1,configurable:!1,value:"Row"},[dW]:{writable:!0,enumerable:!1,configurable:!1,value:null},[hW]:{writable:!0,enumerable:!1,configurable:!1,value:null},[pW]:{writable:!0,enumerable:!1,configurable:!1,value:null}})
13840
+ const yW=(t,e)=>t<0?e+t:t,wW=t=>t!=t
13841
+ function xW(t){if("object"!==typeof t||null===t)return wW(t)?wW:e=>e===t
13840
13842
  if(t instanceof Date){const e=t.valueOf()
13841
13843
  return t=>t instanceof Date&&t.valueOf()===e}return ArrayBuffer.isView(t)?e=>!!e&&function(t,e){let n=0
13842
13844
  const i=t.length
@@ -13844,203 +13846,203 @@ if(i!==e.length)return!1
13844
13846
  if(i>0)do{if(t[n]!==e[n])return!1}while(++n<i)
13845
13847
  return!0}(t,e):t instanceof Map?function(t){let e=-1
13846
13848
  const n=[]
13847
- for(const i of t.values())n[++e]=wW(i)
13848
- return xW(n)}(t):Array.isArray(t)?function(t){const e=[]
13849
- for(let n=-1,i=t.length;++n<i;)e[n]=wW(t[n])
13850
- return xW(e)}(t):t instanceof tG?function(t){const e=[]
13851
- for(let n=-1,i=t.length;++n<i;)e[n]=wW(t.get(n))
13852
- return xW(e)}(t):function(t,e=!1){const n=Object.keys(t)
13849
+ for(const i of t.values())n[++e]=xW(i)
13850
+ return CW(n)}(t):Array.isArray(t)?function(t){const e=[]
13851
+ for(let n=-1,i=t.length;++n<i;)e[n]=xW(t[n])
13852
+ return CW(e)}(t):t instanceof eG?function(t){const e=[]
13853
+ for(let n=-1,i=t.length;++n<i;)e[n]=xW(t.get(n))
13854
+ return CW(e)}(t):function(t,e=!1){const n=Object.keys(t)
13853
13855
  if(!e&&0===n.length)return()=>!1
13854
13856
  const i=[]
13855
- for(let e=-1,s=n.length;++e<s;)i[e]=wW(t[n[e]])
13856
- return xW(i,n)}(t,!0)}function xW(t,e){return n=>{if(!n||"object"!=typeof n)return!1
13857
+ for(let e=-1,s=n.length;++e<s;)i[e]=xW(t[n[e]])
13858
+ return CW(i,n)}(t,!0)}function CW(t,e){return n=>{if(!n||"object"!=typeof n)return!1
13857
13859
  switch(n.constructor){case Array:return function(t,e){const n=t.length
13858
13860
  if(e.length!==n)return!1
13859
13861
  for(let i=-1;++i<n;)if(!t[i](e[i]))return!1
13860
13862
  return!0}(t,n)
13861
- case Map:return CW(t,n,n.keys())
13862
- case pW:case Rj:case Object:case void 0:return CW(t,n,e||Object.keys(n))}return n instanceof tG&&function(t,e){const n=t.length
13863
+ case Map:return kW(t,n,n.keys())
13864
+ case fW:case Fj:case Object:case void 0:return kW(t,n,e||Object.keys(n))}return n instanceof eG&&function(t,e){const n=t.length
13863
13865
  if(e.length!==n)return!1
13864
13866
  for(let i=-1;++i<n;)if(!t[i](e.get(i)))return!1
13865
- return!0}(t,n)}}function CW(t,e,n){const i=n[Symbol.iterator](),s=e instanceof Map?e.keys():Object.keys(e)[Symbol.iterator](),o=e instanceof Map?e.values():Object.values(e)[Symbol.iterator]()
13867
+ return!0}(t,n)}}function kW(t,e,n){const i=n[Symbol.iterator](),s=e instanceof Map?e.keys():Object.keys(e)[Symbol.iterator](),o=e instanceof Map?e.values():Object.values(e)[Symbol.iterator]()
13866
13868
  let r=0
13867
13869
  const a=t.length
13868
13870
  let l=o.next(),c=i.next(),d=s.next()
13869
- for(;r<a&&!c.done&&!d.done&&!l.done&&(c.value===d.value&&t[r](l.value));++r,c=i.next(),d=s.next(),l=o.next());return!!(r===a&&c.done&&d.done&&l.done)||(i.return&&i.return(),s.return&&s.return(),o.return&&o.return(),!1)}function kW(t,e,n,i){return 0!=(n&1<<i)}function SW(t,e,n,i){return(n&1<<i)>>i}function _W(t,e,n){const i=n.byteLength+7&-8
13871
+ for(;r<a&&!c.done&&!d.done&&!l.done&&(c.value===d.value&&t[r](l.value));++r,c=i.next(),d=s.next(),l=o.next());return!!(r===a&&c.done&&d.done&&l.done)||(i.return&&i.return(),s.return&&s.return(),o.return&&o.return(),!1)}function SW(t,e,n,i){return!!(n&1<<i)}function _W(t,e,n,i){return(n&1<<i)>>i}function IW(t,e,n){const i=n.byteLength+7&-8
13870
13872
  if(t>0||n.byteLength<i){const s=new Uint8Array(i)
13871
- return s.set(t%8==0?n.subarray(t>>3):IW(new MW(n,t,e,null,kW)).subarray(0,i)),s}return n}function IW(t){const e=[]
13873
+ return s.set(t%8==0?n.subarray(t>>3):MW(new $W(n,t,e,null,SW)).subarray(0,i)),s}return n}function MW(t){const e=[]
13872
13874
  let n=0,i=0,s=0
13873
13875
  for(const o of t)o&&(s|=1<<i),8==++i&&(e[n++]=s,s=i=0);(0===n||i>0)&&(e[n++]=s)
13874
13876
  const o=new Uint8Array(e.length+7&-8)
13875
- return o.set(e),o}class MW{constructor(t,e,n,i,s){this.bytes=t,this.length=n,this.context=i,this.get=s,this.bit=e%8,this.byteIndex=e>>3,this.byte=t[this.byteIndex++],this.index=0}next(){return this.index<this.length?(8===this.bit&&(this.bit=0,this.byte=this.bytes[this.byteIndex++]),{value:this.get(this.context,this.index++,this.byte,this.bit++)}):{done:!0,value:null}}[Symbol.iterator](){return this}}function $W(t,e,n){if(n-e<=0)return 0
13877
+ return o.set(e),o}class $W{constructor(t,e,n,i,s){this.bytes=t,this.length=n,this.context=i,this.get=s,this.bit=e%8,this.byteIndex=e>>3,this.byte=t[this.byteIndex++],this.index=0}next(){return this.index<this.length?(8===this.bit&&(this.bit=0,this.byte=this.bytes[this.byteIndex++]),{value:this.get(this.context,this.index++,this.byte,this.bit++)}):{done:!0,value:null}}[Symbol.iterator](){return this}}function EW(t,e,n){if(n-e<=0)return 0
13876
13878
  if(n-e<8){let i=0
13877
- for(const s of new MW(t,e,n-e,t,SW))i+=s
13879
+ for(const s of new $W(t,e,n-e,t,_W))i+=s
13878
13880
  return i}const i=n>>3<<3,s=e+(e%8==0?0:8-e%8)
13879
- return $W(t,e,s)+$W(t,i,n)+function(t,e,n){let i=0,s=Math.trunc(e)
13881
+ return EW(t,e,s)+EW(t,i,n)+function(t,e,n){let i=0,s=Math.trunc(e)
13880
13882
  const o=new DataView(t.buffer,t.byteOffset,t.byteLength),r=void 0===n?t.byteLength:s+n
13881
- for(;r-s>=4;)i+=EW(o.getUint32(s)),s+=4
13882
- for(;r-s>=2;)i+=EW(o.getUint16(s)),s+=2
13883
- for(;r-s>=1;)i+=EW(o.getUint8(s)),s+=1
13884
- return i}(t,s>>3,i-s>>3)}function EW(t){let e=Math.trunc(t)
13885
- return e-=e>>>1&1431655765,e=(858993459&e)+(e>>>2&858993459),16843009*(e+(e>>>4)&252645135)>>>24}class DW{get typeId(){return this.type.typeId}get ArrayType(){return this.type.ArrayType}get buffers(){return[this.valueOffsets,this.values,this.nullBitmap,this.typeIds]}get nullable(){if(0!==this._nullCount){const{type:t}=this
13886
- return Mq.isSparseUnion(t)||Mq.isDenseUnion(t)?this.children.some((t=>t.nullable)):this.nullBitmap&&this.nullBitmap.byteLength>0}return!0}get byteLength(){let t=0
13883
+ for(;r-s>=4;)i+=DW(o.getUint32(s)),s+=4
13884
+ for(;r-s>=2;)i+=DW(o.getUint16(s)),s+=2
13885
+ for(;r-s>=1;)i+=DW(o.getUint8(s)),s+=1
13886
+ return i}(t,s>>3,i-s>>3)}function DW(t){let e=Math.trunc(t)
13887
+ return e-=e>>>1&1431655765,e=(858993459&e)+(e>>>2&858993459),16843009*(e+(e>>>4)&252645135)>>>24}class AW{get typeId(){return this.type.typeId}get ArrayType(){return this.type.ArrayType}get buffers(){return[this.valueOffsets,this.values,this.nullBitmap,this.typeIds]}get nullable(){if(0!==this._nullCount){const{type:t}=this
13888
+ return $q.isSparseUnion(t)||$q.isDenseUnion(t)?this.children.some((t=>t.nullable)):this.nullBitmap&&this.nullBitmap.byteLength>0}return!0}get byteLength(){let t=0
13887
13889
  const{valueOffsets:e,values:n,nullBitmap:i,typeIds:s}=this
13888
- return e&&(t+=e.byteLength),n&&(t+=n.byteLength),i&&(t+=i.byteLength),s&&(t+=s.byteLength),this.children.reduce(((t,e)=>t+e.byteLength),t)}get nullCount(){if(Mq.isUnion(this.type))return this.children.reduce(((t,e)=>t+e.nullCount),0)
13890
+ return e&&(t+=e.byteLength),n&&(t+=n.byteLength),i&&(t+=i.byteLength),s&&(t+=s.byteLength),this.children.reduce(((t,e)=>t+e.byteLength),t)}get nullCount(){if($q.isUnion(this.type))return this.children.reduce(((t,e)=>t+e.nullCount),0)
13889
13891
  let t,e=this._nullCount
13890
- return e<=-1&&(t=this.nullBitmap)&&(this._nullCount=e=0===t.length?0:this.length-$W(t,this.offset,this.offset+this.length)),e}constructor(t,e,n,i,s,o=[],r){let a
13891
- this.type=t,this.children=o,this.dictionary=r,this.offset=Math.floor(Math.max(e||0,0)),this.length=Math.floor(Math.max(n||0,0)),this._nullCount=Math.floor(Math.max(i||0,-1)),s instanceof DW?(this.stride=s.stride,this.values=s.values,this.typeIds=s.typeIds,this.nullBitmap=s.nullBitmap,this.valueOffsets=s.valueOffsets):(this.stride=Jq(t),s&&((a=s[0])&&(this.valueOffsets=a),(a=s[1])&&(this.values=a),(a=s[2])&&(this.nullBitmap=a),(a=s[3])&&(this.typeIds=a)))}getValid(t){const{type:e}=this
13892
- if(Mq.isUnion(e)){const n=e,i=this.children[n.typeIdToChildIndex[this.typeIds[t]]],s=n.mode===YH.Dense?this.valueOffsets[t]:t
13892
+ return e<=-1&&(t=this.nullBitmap)&&(this._nullCount=e=0===t.length?0:this.length-EW(t,this.offset,this.offset+this.length)),e}constructor(t,e,n,i,s,o=[],r){let a
13893
+ this.type=t,this.children=o,this.dictionary=r,this.offset=Math.floor(Math.max(e||0,0)),this.length=Math.floor(Math.max(n||0,0)),this._nullCount=Math.floor(Math.max(i||0,-1)),s instanceof AW?(this.stride=s.stride,this.values=s.values,this.typeIds=s.typeIds,this.nullBitmap=s.nullBitmap,this.valueOffsets=s.valueOffsets):(this.stride=Qq(t),s&&((a=s[0])&&(this.valueOffsets=a),(a=s[1])&&(this.values=a),(a=s[2])&&(this.nullBitmap=a),(a=s[3])&&(this.typeIds=a)))}getValid(t){const{type:e}=this
13894
+ if($q.isUnion(e)){const n=e,i=this.children[n.typeIdToChildIndex[this.typeIds[t]]],s=n.mode===XH.Dense?this.valueOffsets[t]:t
13893
13895
  return i.getValid(s)}if(this.nullable&&this.nullCount>0){const e=this.offset+t
13894
- return 0!=(this.nullBitmap[e>>3]&1<<e%8)}return!0}setValid(t,e){let n
13896
+ return!!(this.nullBitmap[e>>3]&1<<e%8)}return!0}setValid(t,e){let n
13895
13897
  const{type:i}=this
13896
- if(Mq.isUnion(i)){const s=i,o=this.children[s.typeIdToChildIndex[this.typeIds[t]]],r=s.mode===YH.Dense?this.valueOffsets[t]:t
13898
+ if($q.isUnion(i)){const s=i,o=this.children[s.typeIdToChildIndex[this.typeIds[t]]],r=s.mode===XH.Dense?this.valueOffsets[t]:t
13897
13899
  n=o.getValid(r),o.setValid(r,e)}else{let{nullBitmap:i}=this
13898
- const{offset:s,length:o}=this,r=s+t,a=1<<r%8,l=r>>3;(!i||i.byteLength<=l)&&(i=new Uint8Array((s+o+63&-64)>>3).fill(255),this.nullCount>0?(i.set(_W(s,o,this.nullBitmap),0),Object.assign(this,{nullBitmap:i})):Object.assign(this,{nullBitmap:i,_nullCount:0}))
13900
+ const{offset:s,length:o}=this,r=s+t,a=1<<r%8,l=r>>3;(!i||i.byteLength<=l)&&(i=new Uint8Array((s+o+63&-64)>>3).fill(255),this.nullCount>0?(i.set(IW(s,o,this.nullBitmap),0),Object.assign(this,{nullBitmap:i})):Object.assign(this,{nullBitmap:i,_nullCount:0}))
13899
13901
  const c=i[l]
13900
- n=0!=(c&a),i[l]=e?c|a:c&~a}return n!==!!e&&(this._nullCount=this.nullCount+(e?-1:1)),e}clone(t=this.type,e=this.offset,n=this.length,i=this._nullCount,s=this,o=this.children){return new DW(t,e,n,i,s,o,this.dictionary)}slice(t,e){const{stride:n,typeId:i,children:s}=this,o=+(0===this._nullCount)-1,r=16===i?n:1,a=this._sliceBuffers(t,e,n,i)
13901
- return this.clone(this.type,this.offset+t,e,o,a,0===s.length||this.valueOffsets?s:this._sliceChildren(s,r*t,r*e))}_changeLengthAndBackfillNullBitmap(t){if(this.typeId===UU.Null)return this.clone(this.type,0,t,0)
13902
+ n=!!(c&a),i[l]=e?c|a:c&~a}return n!==!!e&&(this._nullCount=this.nullCount+(e?-1:1)),e}clone(t=this.type,e=this.offset,n=this.length,i=this._nullCount,s=this,o=this.children){return new AW(t,e,n,i,s,o,this.dictionary)}slice(t,e){const{stride:n,typeId:i,children:s}=this,o=+(0===this._nullCount)-1,r=16===i?n:1,a=this._sliceBuffers(t,e,n,i)
13903
+ return this.clone(this.type,this.offset+t,e,o,a,0===s.length||this.valueOffsets?s:this._sliceChildren(s,r*t,r*e))}_changeLengthAndBackfillNullBitmap(t){if(this.typeId===qU.Null)return this.clone(this.type,0,t,0)
13902
13904
  const{length:e,nullCount:n}=this,i=new Uint8Array((t+63&-64)>>3).fill(255,0,e>>3)
13903
- i[e>>3]=(1<<e-(-8&e))-1,n>0&&i.set(_W(this.offset,e,this.nullBitmap),0)
13905
+ i[e>>3]=(1<<e-(-8&e))-1,n>0&&i.set(IW(this.offset,e,this.nullBitmap),0)
13904
13906
  const s=this.buffers
13905
- return s[qU.VALIDITY]=i,this.clone(this.type,0,t,n+(t-e),s)}_sliceBuffers(t,e,n,i){let s
13907
+ return s[jU.VALIDITY]=i,this.clone(this.type,0,t,n+(t-e),s)}_sliceBuffers(t,e,n,i){let s
13906
13908
  const{buffers:o}=this
13907
- return(s=o[qU.TYPE])&&(o[qU.TYPE]=s.subarray(t,t+e)),(s=o[qU.OFFSET])&&(o[qU.OFFSET]=s.subarray(t,t+e+1))||(s=o[qU.DATA])&&(o[qU.DATA]=6===i?s:s.subarray(n*t,n*(t+e))),o}_sliceChildren(t,e,n){return t.map((t=>t.slice(e,n)))}}DW.prototype.children=Object.freeze([])
13908
- class AW extends Qq{visit(t){return this.getVisitFn(t.type).call(this,t)}visitNull(t){const{type:e,offset:n=0,length:i=0}=t
13909
- return new DW(e,n,i,i)}visitBool(t){const{type:e,offset:n=0}=t,i=zH(t.nullBitmap),s=LH(e.ArrayType,t.data),{length:o=s.length>>3,nullCount:r=(t.nullBitmap?-1:0)}=t
13910
- return new DW(e,n,o,r,[void 0,s,i])}visitInt(t){const{type:e,offset:n=0}=t,i=zH(t.nullBitmap),s=LH(e.ArrayType,t.data),{length:o=s.length,nullCount:r=(t.nullBitmap?-1:0)}=t
13911
- return new DW(e,n,o,r,[void 0,s,i])}visitFloat(t){const{type:e,offset:n=0}=t,i=zH(t.nullBitmap),s=LH(e.ArrayType,t.data),{length:o=s.length,nullCount:r=(t.nullBitmap?-1:0)}=t
13912
- return new DW(e,n,o,r,[void 0,s,i])}visitUtf8(t){const{type:e,offset:n=0}=t,i=zH(t.data),s=zH(t.nullBitmap),o=BH(t.valueOffsets),{length:r=o.length-1,nullCount:a=(t.nullBitmap?-1:0)}=t
13913
- return new DW(e,n,r,a,[o,i,s])}visitLargeUtf8(t){const{type:e,offset:n=0}=t,i=zH(t.data),s=zH(t.nullBitmap),o=PH(t.valueOffsets),{length:r=o.length-1,nullCount:a=(t.nullBitmap?-1:0)}=t
13914
- return new DW(e,n,r,a,[o,i,s])}visitBinary(t){const{type:e,offset:n=0}=t,i=zH(t.data),s=zH(t.nullBitmap),o=BH(t.valueOffsets),{length:r=o.length-1,nullCount:a=(t.nullBitmap?-1:0)}=t
13915
- return new DW(e,n,r,a,[o,i,s])}visitLargeBinary(t){const{type:e,offset:n=0}=t,i=zH(t.data),s=zH(t.nullBitmap),o=PH(t.valueOffsets),{length:r=o.length-1,nullCount:a=(t.nullBitmap?-1:0)}=t
13916
- return new DW(e,n,r,a,[o,i,s])}visitFixedSizeBinary(t){const{type:e,offset:n=0}=t,i=zH(t.nullBitmap),s=LH(e.ArrayType,t.data),{length:o=s.length/Jq(e),nullCount:r=(t.nullBitmap?-1:0)}=t
13917
- return new DW(e,n,o,r,[void 0,s,i])}visitDate(t){const{type:e,offset:n=0}=t,i=zH(t.nullBitmap),s=LH(e.ArrayType,t.data),{length:o=s.length/Jq(e),nullCount:r=(t.nullBitmap?-1:0)}=t
13918
- return new DW(e,n,o,r,[void 0,s,i])}visitTimestamp(t){const{type:e,offset:n=0}=t,i=zH(t.nullBitmap),s=LH(e.ArrayType,t.data),{length:o=s.length/Jq(e),nullCount:r=(t.nullBitmap?-1:0)}=t
13919
- return new DW(e,n,o,r,[void 0,s,i])}visitTime(t){const{type:e,offset:n=0}=t,i=zH(t.nullBitmap),s=LH(e.ArrayType,t.data),{length:o=s.length/Jq(e),nullCount:r=(t.nullBitmap?-1:0)}=t
13920
- return new DW(e,n,o,r,[void 0,s,i])}visitDecimal(t){const{type:e,offset:n=0}=t,i=zH(t.nullBitmap),s=LH(e.ArrayType,t.data),{length:o=s.length/Jq(e),nullCount:r=(t.nullBitmap?-1:0)}=t
13921
- return new DW(e,n,o,r,[void 0,s,i])}visitList(t){const{type:e,offset:n=0,child:i}=t,s=zH(t.nullBitmap),o=BH(t.valueOffsets),{length:r=o.length-1,nullCount:a=(t.nullBitmap?-1:0)}=t
13922
- return new DW(e,n,r,a,[o,void 0,s],[i])}visitStruct(t){const{type:e,offset:n=0,children:i=[]}=t,s=zH(t.nullBitmap),{length:o=i.reduce(((t,{length:e})=>Math.max(t,e)),0),nullCount:r=(t.nullBitmap?-1:0)}=t
13923
- return new DW(e,n,o,r,[void 0,void 0,s],i)}visitUnion(t){const{type:e,offset:n=0,children:i=[]}=t,s=LH(e.ArrayType,t.typeIds),{length:o=s.length,nullCount:r=-1}=t
13924
- if(Mq.isSparseUnion(e))return new DW(e,n,o,r,[void 0,void 0,void 0,s],i)
13925
- const a=BH(t.valueOffsets)
13926
- return new DW(e,n,o,r,[a,void 0,void 0,s],i)}visitDictionary(t){const{type:e,offset:n=0}=t,i=zH(t.nullBitmap),s=LH(e.indices.ArrayType,t.data),{dictionary:o=new tG([(new AW).visit({type:e.dictionary})])}=t,{length:r=s.length,nullCount:a=(t.nullBitmap?-1:0)}=t
13927
- return new DW(e,n,r,a,[void 0,s,i],[],o)}visitInterval(t){const{type:e,offset:n=0}=t,i=zH(t.nullBitmap),s=LH(e.ArrayType,t.data),{length:o=s.length/Jq(e),nullCount:r=(t.nullBitmap?-1:0)}=t
13928
- return new DW(e,n,o,r,[void 0,s,i])}visitDuration(t){const{type:e,offset:n=0}=t,i=zH(t.nullBitmap),s=LH(e.ArrayType,t.data),{length:o=s.length,nullCount:r=(t.nullBitmap?-1:0)}=t
13929
- return new DW(e,n,o,r,[void 0,s,i])}visitFixedSizeList(t){const{type:e,offset:n=0,child:i=(new AW).visit({type:e.valueType})}=t,s=zH(t.nullBitmap),{length:o=i.length/Jq(e),nullCount:r=(t.nullBitmap?-1:0)}=t
13930
- return new DW(e,n,o,r,[void 0,void 0,s],[i])}visitMap(t){const{type:e,offset:n=0,child:i=(new AW).visit({type:e.childType})}=t,s=zH(t.nullBitmap),o=BH(t.valueOffsets),{length:r=o.length-1,nullCount:a=(t.nullBitmap?-1:0)}=t
13931
- return new DW(e,n,r,a,[o,void 0,s],[i])}}const TW=new AW
13932
- function OW(t){return TW.visit(t)}class RW{constructor(t=0,e){this.numChunks=t,this.getChunkIterator=e,this.chunkIndex=0,this.chunkIterator=this.getChunkIterator(0)}next(){for(;this.chunkIndex<this.numChunks;){const t=this.chunkIterator.next()
13933
- if(!t.done)return t;++this.chunkIndex<this.numChunks&&(this.chunkIterator=this.getChunkIterator(this.chunkIndex))}return{done:!0,value:null}}[Symbol.iterator](){return this}}function FW(t){return t.reduce(((t,e)=>t+e.nullCount),0)}function NW(t){return t.reduce(((t,e,n)=>(t[n+1]=t[n]+e.length,t)),new Uint32Array(t.length+1))}function LW(t,e,n,i){const s=[]
13909
+ return(s=o[jU.TYPE])&&(o[jU.TYPE]=s.subarray(t,t+e)),(s=o[jU.OFFSET])&&(o[jU.OFFSET]=s.subarray(t,t+e+1))||(s=o[jU.DATA])&&(o[jU.DATA]=6===i?s:s.subarray(n*t,n*(t+e))),o}_sliceChildren(t,e,n){return t.map((t=>t.slice(e,n)))}}AW.prototype.children=Object.freeze([])
13910
+ class TW extends tj{visit(t){return this.getVisitFn(t.type).call(this,t)}visitNull(t){const{type:e,offset:n=0,length:i=0}=t
13911
+ return new AW(e,n,i,i)}visitBool(t){const{type:e,offset:n=0}=t,i=VH(t.nullBitmap),s=BH(e.ArrayType,t.data),{length:o=s.length>>3,nullCount:r=(t.nullBitmap?-1:0)}=t
13912
+ return new AW(e,n,o,r,[void 0,s,i])}visitInt(t){const{type:e,offset:n=0}=t,i=VH(t.nullBitmap),s=BH(e.ArrayType,t.data),{length:o=s.length,nullCount:r=(t.nullBitmap?-1:0)}=t
13913
+ return new AW(e,n,o,r,[void 0,s,i])}visitFloat(t){const{type:e,offset:n=0}=t,i=VH(t.nullBitmap),s=BH(e.ArrayType,t.data),{length:o=s.length,nullCount:r=(t.nullBitmap?-1:0)}=t
13914
+ return new AW(e,n,o,r,[void 0,s,i])}visitUtf8(t){const{type:e,offset:n=0}=t,i=VH(t.data),s=VH(t.nullBitmap),o=PH(t.valueOffsets),{length:r=o.length-1,nullCount:a=(t.nullBitmap?-1:0)}=t
13915
+ return new AW(e,n,r,a,[o,i,s])}visitLargeUtf8(t){const{type:e,offset:n=0}=t,i=VH(t.data),s=VH(t.nullBitmap),o=zH(t.valueOffsets),{length:r=o.length-1,nullCount:a=(t.nullBitmap?-1:0)}=t
13916
+ return new AW(e,n,r,a,[o,i,s])}visitBinary(t){const{type:e,offset:n=0}=t,i=VH(t.data),s=VH(t.nullBitmap),o=PH(t.valueOffsets),{length:r=o.length-1,nullCount:a=(t.nullBitmap?-1:0)}=t
13917
+ return new AW(e,n,r,a,[o,i,s])}visitLargeBinary(t){const{type:e,offset:n=0}=t,i=VH(t.data),s=VH(t.nullBitmap),o=zH(t.valueOffsets),{length:r=o.length-1,nullCount:a=(t.nullBitmap?-1:0)}=t
13918
+ return new AW(e,n,r,a,[o,i,s])}visitFixedSizeBinary(t){const{type:e,offset:n=0}=t,i=VH(t.nullBitmap),s=BH(e.ArrayType,t.data),{length:o=s.length/Qq(e),nullCount:r=(t.nullBitmap?-1:0)}=t
13919
+ return new AW(e,n,o,r,[void 0,s,i])}visitDate(t){const{type:e,offset:n=0}=t,i=VH(t.nullBitmap),s=BH(e.ArrayType,t.data),{length:o=s.length/Qq(e),nullCount:r=(t.nullBitmap?-1:0)}=t
13920
+ return new AW(e,n,o,r,[void 0,s,i])}visitTimestamp(t){const{type:e,offset:n=0}=t,i=VH(t.nullBitmap),s=BH(e.ArrayType,t.data),{length:o=s.length/Qq(e),nullCount:r=(t.nullBitmap?-1:0)}=t
13921
+ return new AW(e,n,o,r,[void 0,s,i])}visitTime(t){const{type:e,offset:n=0}=t,i=VH(t.nullBitmap),s=BH(e.ArrayType,t.data),{length:o=s.length/Qq(e),nullCount:r=(t.nullBitmap?-1:0)}=t
13922
+ return new AW(e,n,o,r,[void 0,s,i])}visitDecimal(t){const{type:e,offset:n=0}=t,i=VH(t.nullBitmap),s=BH(e.ArrayType,t.data),{length:o=s.length/Qq(e),nullCount:r=(t.nullBitmap?-1:0)}=t
13923
+ return new AW(e,n,o,r,[void 0,s,i])}visitList(t){const{type:e,offset:n=0,child:i}=t,s=VH(t.nullBitmap),o=PH(t.valueOffsets),{length:r=o.length-1,nullCount:a=(t.nullBitmap?-1:0)}=t
13924
+ return new AW(e,n,r,a,[o,void 0,s],[i])}visitStruct(t){const{type:e,offset:n=0,children:i=[]}=t,s=VH(t.nullBitmap),{length:o=i.reduce(((t,{length:e})=>Math.max(t,e)),0),nullCount:r=(t.nullBitmap?-1:0)}=t
13925
+ return new AW(e,n,o,r,[void 0,void 0,s],i)}visitUnion(t){const{type:e,offset:n=0,children:i=[]}=t,s=BH(e.ArrayType,t.typeIds),{length:o=s.length,nullCount:r=-1}=t
13926
+ if($q.isSparseUnion(e))return new AW(e,n,o,r,[void 0,void 0,void 0,s],i)
13927
+ const a=PH(t.valueOffsets)
13928
+ return new AW(e,n,o,r,[a,void 0,void 0,s],i)}visitDictionary(t){const{type:e,offset:n=0}=t,i=VH(t.nullBitmap),s=BH(e.indices.ArrayType,t.data),{dictionary:o=new eG([(new TW).visit({type:e.dictionary})])}=t,{length:r=s.length,nullCount:a=(t.nullBitmap?-1:0)}=t
13929
+ return new AW(e,n,r,a,[void 0,s,i],[],o)}visitInterval(t){const{type:e,offset:n=0}=t,i=VH(t.nullBitmap),s=BH(e.ArrayType,t.data),{length:o=s.length/Qq(e),nullCount:r=(t.nullBitmap?-1:0)}=t
13930
+ return new AW(e,n,o,r,[void 0,s,i])}visitDuration(t){const{type:e,offset:n=0}=t,i=VH(t.nullBitmap),s=BH(e.ArrayType,t.data),{length:o=s.length,nullCount:r=(t.nullBitmap?-1:0)}=t
13931
+ return new AW(e,n,o,r,[void 0,s,i])}visitFixedSizeList(t){const{type:e,offset:n=0,child:i=(new TW).visit({type:e.valueType})}=t,s=VH(t.nullBitmap),{length:o=i.length/Qq(e),nullCount:r=(t.nullBitmap?-1:0)}=t
13932
+ return new AW(e,n,o,r,[void 0,void 0,s],[i])}visitMap(t){const{type:e,offset:n=0,child:i=(new TW).visit({type:e.childType})}=t,s=VH(t.nullBitmap),o=PH(t.valueOffsets),{length:r=o.length-1,nullCount:a=(t.nullBitmap?-1:0)}=t
13933
+ return new AW(e,n,r,a,[o,void 0,s],[i])}}const OW=new TW
13934
+ function RW(t){return OW.visit(t)}class FW{constructor(t=0,e){this.numChunks=t,this.getChunkIterator=e,this.chunkIndex=0,this.chunkIterator=this.getChunkIterator(0)}next(){for(;this.chunkIndex<this.numChunks;){const t=this.chunkIterator.next()
13935
+ if(!t.done)return t;++this.chunkIndex<this.numChunks&&(this.chunkIterator=this.getChunkIterator(this.chunkIndex))}return{done:!0,value:null}}[Symbol.iterator](){return this}}function NW(t){return t.reduce(((t,e)=>t+e.nullCount),0)}function LW(t){return t.reduce(((t,e,n)=>(t[n+1]=t[n]+e.length,t)),new Uint32Array(t.length+1))}function BW(t,e,n,i){const s=[]
13934
13936
  for(let o=-1,r=t.length;++o<r;){const r=t[o],a=e[o],{length:l}=r
13935
13937
  if(a>=i)break
13936
13938
  if(n>=a+l)continue
13937
13939
  if(a>=n&&a+l<=i){s.push(r)
13938
13940
  continue}const c=Math.max(0,n-a),d=Math.min(i-a,l)
13939
- s.push(r.slice(c,d-c))}return 0===s.length&&s.push(t[0].slice(0,0)),s}function BW(t,e,n,i){let s=0,o=0,r=e.length-1
13941
+ s.push(r.slice(c,d-c))}return 0===s.length&&s.push(t[0].slice(0,0)),s}function PW(t,e,n,i){let s=0,o=0,r=e.length-1
13940
13942
  do{if(s>=r-1)return n<e[r]?i(t,s,n-e[s]):null
13941
- o=s+Math.trunc(.5*(r-s)),n<e[o]?r=o:s=o}while(s<r)}function PW(t,e){return t.getValid(e)}function zW(t){function e(e,n,i){return t(e[n],i)}return function(t){return BW(this.data,this._offsets,t,e)}}function VW(t){let e
13943
+ o=s+Math.trunc(.5*(r-s)),n<e[o]?r=o:s=o}while(s<r)}function zW(t,e){return t.getValid(e)}function VW(t){function e(e,n,i){return t(e[n],i)}return function(t){return PW(this.data,this._offsets,t,e)}}function HW(t){let e
13942
13944
  function n(n,i,s){return t(n[i],s,e)}return function(t,i){const s=this.data
13943
13945
  e=i
13944
- const o=BW(s,this._offsets,t,n)
13945
- return e=void 0,o}}function HW(t){let e
13946
+ const o=PW(s,this._offsets,t,n)
13947
+ return e=void 0,o}}function UW(t){let e
13946
13948
  function n(n,i,s){let o=s,r=0,a=0
13947
13949
  for(let s=i-1,l=n.length;++s<l;){const i=n[s]
13948
13950
  if(~(r=t(i,e,o)))return a+r
13949
13951
  o=0,a+=i.length}return-1}return function(t,i){e=t
13950
- const s=this.data,o="number"!=typeof i?n(s,0,0):BW(s,this._offsets,i,n)
13951
- return e=void 0,o}}class UW extends Qq{}function qW(t,e,n){if(void 0===e)return-1
13952
- if(null===e)switch(t.typeId){case UU.Union:case UU.Dictionary:break
13952
+ const s=this.data,o="number"!=typeof i?n(s,0,0):PW(s,this._offsets,i,n)
13953
+ return e=void 0,o}}class qW extends tj{}function jW(t,e,n){if(void 0===e)return-1
13954
+ if(null===e)switch(t.typeId){case qU.Union:case qU.Dictionary:break
13953
13955
  default:return function(t,e){const{nullBitmap:n}=t
13954
13956
  if(!n||t.nullCount<=0)return-1
13955
13957
  let i=0
13956
- for(const s of new MW(n,t.offset+(e||0),t.length,n,kW)){if(!s)return i;++i}return-1}(t,n)}const i=lW.getVisitFn(t),s=wW(e)
13958
+ for(const s of new $W(n,t.offset+(e||0),t.length,n,SW)){if(!s)return i;++i}return-1}(t,n)}const i=cW.getVisitFn(t),s=xW(e)
13957
13959
  for(let e=(n||0)-1,o=t.length;++e<o;)if(s(i(t,e)))return e
13958
- return-1}function jW(t,e,n){const i=lW.getVisitFn(t),s=wW(e)
13960
+ return-1}function WW(t,e,n){const i=cW.getVisitFn(t),s=xW(e)
13959
13961
  for(let e=(n||0)-1,o=t.length;++e<o;)if(s(i(t,e)))return e
13960
- return-1}UW.prototype.visitNull=function(t,e){return null===e&&t.length>0?0:-1},UW.prototype.visitBool=qW,UW.prototype.visitInt=qW,UW.prototype.visitInt8=qW,UW.prototype.visitInt16=qW,UW.prototype.visitInt32=qW,UW.prototype.visitInt64=qW,UW.prototype.visitUint8=qW,UW.prototype.visitUint16=qW,UW.prototype.visitUint32=qW,UW.prototype.visitUint64=qW,UW.prototype.visitFloat=qW,UW.prototype.visitFloat16=qW,UW.prototype.visitFloat32=qW,UW.prototype.visitFloat64=qW,UW.prototype.visitUtf8=qW,UW.prototype.visitLargeUtf8=qW,UW.prototype.visitBinary=qW,UW.prototype.visitLargeBinary=qW,UW.prototype.visitFixedSizeBinary=qW,UW.prototype.visitDate=qW,UW.prototype.visitDateDay=qW,UW.prototype.visitDateMillisecond=qW,UW.prototype.visitTimestamp=qW,UW.prototype.visitTimestampSecond=qW,UW.prototype.visitTimestampMillisecond=qW,UW.prototype.visitTimestampMicrosecond=qW,UW.prototype.visitTimestampNanosecond=qW,UW.prototype.visitTime=qW,UW.prototype.visitTimeSecond=qW,UW.prototype.visitTimeMillisecond=qW,UW.prototype.visitTimeMicrosecond=qW,UW.prototype.visitTimeNanosecond=qW,UW.prototype.visitDecimal=qW,UW.prototype.visitList=qW,UW.prototype.visitStruct=qW,UW.prototype.visitUnion=qW,UW.prototype.visitDenseUnion=jW,UW.prototype.visitSparseUnion=jW,UW.prototype.visitDictionary=qW,UW.prototype.visitInterval=qW,UW.prototype.visitIntervalDayTime=qW,UW.prototype.visitIntervalYearMonth=qW,UW.prototype.visitDuration=qW,UW.prototype.visitDurationSecond=qW,UW.prototype.visitDurationMillisecond=qW,UW.prototype.visitDurationMicrosecond=qW,UW.prototype.visitDurationNanosecond=qW,UW.prototype.visitFixedSizeList=qW,UW.prototype.visitMap=qW
13961
- const WW=new UW
13962
- class GW extends Qq{}function ZW(t){const{type:e}=t
13963
- if(0===t.nullCount&&1===t.stride&&(Mq.isInt(e)&&64!==e.bitWidth||Mq.isTime(e)&&64!==e.bitWidth||Mq.isFloat(e)&&e.precision!==XH.HALF))return new RW(t.data.length,(e=>{const n=t.data[e]
13962
+ return-1}qW.prototype.visitNull=function(t,e){return null===e&&t.length>0?0:-1},qW.prototype.visitBool=jW,qW.prototype.visitInt=jW,qW.prototype.visitInt8=jW,qW.prototype.visitInt16=jW,qW.prototype.visitInt32=jW,qW.prototype.visitInt64=jW,qW.prototype.visitUint8=jW,qW.prototype.visitUint16=jW,qW.prototype.visitUint32=jW,qW.prototype.visitUint64=jW,qW.prototype.visitFloat=jW,qW.prototype.visitFloat16=jW,qW.prototype.visitFloat32=jW,qW.prototype.visitFloat64=jW,qW.prototype.visitUtf8=jW,qW.prototype.visitLargeUtf8=jW,qW.prototype.visitBinary=jW,qW.prototype.visitLargeBinary=jW,qW.prototype.visitFixedSizeBinary=jW,qW.prototype.visitDate=jW,qW.prototype.visitDateDay=jW,qW.prototype.visitDateMillisecond=jW,qW.prototype.visitTimestamp=jW,qW.prototype.visitTimestampSecond=jW,qW.prototype.visitTimestampMillisecond=jW,qW.prototype.visitTimestampMicrosecond=jW,qW.prototype.visitTimestampNanosecond=jW,qW.prototype.visitTime=jW,qW.prototype.visitTimeSecond=jW,qW.prototype.visitTimeMillisecond=jW,qW.prototype.visitTimeMicrosecond=jW,qW.prototype.visitTimeNanosecond=jW,qW.prototype.visitDecimal=jW,qW.prototype.visitList=jW,qW.prototype.visitStruct=jW,qW.prototype.visitUnion=jW,qW.prototype.visitDenseUnion=WW,qW.prototype.visitSparseUnion=WW,qW.prototype.visitDictionary=jW,qW.prototype.visitInterval=jW,qW.prototype.visitIntervalDayTime=jW,qW.prototype.visitIntervalYearMonth=jW,qW.prototype.visitDuration=jW,qW.prototype.visitDurationSecond=jW,qW.prototype.visitDurationMillisecond=jW,qW.prototype.visitDurationMicrosecond=jW,qW.prototype.visitDurationNanosecond=jW,qW.prototype.visitFixedSizeList=jW,qW.prototype.visitMap=jW
13963
+ const GW=new qW
13964
+ class ZW extends tj{}function KW(t){const{type:e}=t
13965
+ if(0===t.nullCount&&1===t.stride&&($q.isInt(e)&&64!==e.bitWidth||$q.isTime(e)&&64!==e.bitWidth||$q.isFloat(e)&&e.precision!==JH.HALF))return new FW(t.data.length,(e=>{const n=t.data[e]
13964
13966
  return n.values.subarray(0,n.length)[Symbol.iterator]()}))
13965
13967
  let n=0
13966
- return new RW(t.data.length,(e=>{const i=t.data[e].length,s=t.slice(n,n+i)
13967
- return n+=i,new KW(s)}))}class KW{constructor(t){this.vector=t,this.index=0}next(){return this.index<this.vector.length?{value:this.vector.get(this.index++)}:{done:!0,value:null}}[Symbol.iterator](){return this}}GW.prototype.visitNull=ZW,GW.prototype.visitBool=ZW,GW.prototype.visitInt=ZW,GW.prototype.visitInt8=ZW,GW.prototype.visitInt16=ZW,GW.prototype.visitInt32=ZW,GW.prototype.visitInt64=ZW,GW.prototype.visitUint8=ZW,GW.prototype.visitUint16=ZW,GW.prototype.visitUint32=ZW,GW.prototype.visitUint64=ZW,GW.prototype.visitFloat=ZW,GW.prototype.visitFloat16=ZW,GW.prototype.visitFloat32=ZW,GW.prototype.visitFloat64=ZW,GW.prototype.visitUtf8=ZW,GW.prototype.visitLargeUtf8=ZW,GW.prototype.visitBinary=ZW,GW.prototype.visitLargeBinary=ZW,GW.prototype.visitFixedSizeBinary=ZW,GW.prototype.visitDate=ZW,GW.prototype.visitDateDay=ZW,GW.prototype.visitDateMillisecond=ZW,GW.prototype.visitTimestamp=ZW,GW.prototype.visitTimestampSecond=ZW,GW.prototype.visitTimestampMillisecond=ZW,GW.prototype.visitTimestampMicrosecond=ZW,GW.prototype.visitTimestampNanosecond=ZW,GW.prototype.visitTime=ZW,GW.prototype.visitTimeSecond=ZW,GW.prototype.visitTimeMillisecond=ZW,GW.prototype.visitTimeMicrosecond=ZW,GW.prototype.visitTimeNanosecond=ZW,GW.prototype.visitDecimal=ZW,GW.prototype.visitList=ZW,GW.prototype.visitStruct=ZW,GW.prototype.visitUnion=ZW,GW.prototype.visitDenseUnion=ZW,GW.prototype.visitSparseUnion=ZW,GW.prototype.visitDictionary=ZW,GW.prototype.visitInterval=ZW,GW.prototype.visitIntervalDayTime=ZW,GW.prototype.visitIntervalYearMonth=ZW,GW.prototype.visitDuration=ZW,GW.prototype.visitDurationSecond=ZW,GW.prototype.visitDurationMillisecond=ZW,GW.prototype.visitDurationMicrosecond=ZW,GW.prototype.visitDurationNanosecond=ZW,GW.prototype.visitFixedSizeList=ZW,GW.prototype.visitMap=ZW
13968
- const YW=new GW
13969
- var XW
13970
- const JW={},QW={}
13971
- class tG{constructor(t){var e,n,i
13972
- const s=t[0]instanceof tG?t.flatMap((t=>t.data)):t
13973
- if(0===s.length||s.some((t=>!(t instanceof DW))))throw new TypeError("Vector constructor expects an Array of Data instances.")
13968
+ return new FW(t.data.length,(e=>{const i=t.data[e].length,s=t.slice(n,n+i)
13969
+ return n+=i,new YW(s)}))}class YW{constructor(t){this.vector=t,this.index=0}next(){return this.index<this.vector.length?{value:this.vector.get(this.index++)}:{done:!0,value:null}}[Symbol.iterator](){return this}}ZW.prototype.visitNull=KW,ZW.prototype.visitBool=KW,ZW.prototype.visitInt=KW,ZW.prototype.visitInt8=KW,ZW.prototype.visitInt16=KW,ZW.prototype.visitInt32=KW,ZW.prototype.visitInt64=KW,ZW.prototype.visitUint8=KW,ZW.prototype.visitUint16=KW,ZW.prototype.visitUint32=KW,ZW.prototype.visitUint64=KW,ZW.prototype.visitFloat=KW,ZW.prototype.visitFloat16=KW,ZW.prototype.visitFloat32=KW,ZW.prototype.visitFloat64=KW,ZW.prototype.visitUtf8=KW,ZW.prototype.visitLargeUtf8=KW,ZW.prototype.visitBinary=KW,ZW.prototype.visitLargeBinary=KW,ZW.prototype.visitFixedSizeBinary=KW,ZW.prototype.visitDate=KW,ZW.prototype.visitDateDay=KW,ZW.prototype.visitDateMillisecond=KW,ZW.prototype.visitTimestamp=KW,ZW.prototype.visitTimestampSecond=KW,ZW.prototype.visitTimestampMillisecond=KW,ZW.prototype.visitTimestampMicrosecond=KW,ZW.prototype.visitTimestampNanosecond=KW,ZW.prototype.visitTime=KW,ZW.prototype.visitTimeSecond=KW,ZW.prototype.visitTimeMillisecond=KW,ZW.prototype.visitTimeMicrosecond=KW,ZW.prototype.visitTimeNanosecond=KW,ZW.prototype.visitDecimal=KW,ZW.prototype.visitList=KW,ZW.prototype.visitStruct=KW,ZW.prototype.visitUnion=KW,ZW.prototype.visitDenseUnion=KW,ZW.prototype.visitSparseUnion=KW,ZW.prototype.visitDictionary=KW,ZW.prototype.visitInterval=KW,ZW.prototype.visitIntervalDayTime=KW,ZW.prototype.visitIntervalYearMonth=KW,ZW.prototype.visitDuration=KW,ZW.prototype.visitDurationSecond=KW,ZW.prototype.visitDurationMillisecond=KW,ZW.prototype.visitDurationMicrosecond=KW,ZW.prototype.visitDurationNanosecond=KW,ZW.prototype.visitFixedSizeList=KW,ZW.prototype.visitMap=KW
13970
+ const XW=new ZW
13971
+ var JW
13972
+ const QW={},tG={}
13973
+ class eG{constructor(t){var e,n,i
13974
+ const s=t[0]instanceof eG?t.flatMap((t=>t.data)):t
13975
+ if(0===s.length||s.some((t=>!(t instanceof AW))))throw new TypeError("Vector constructor expects an Array of Data instances.")
13974
13976
  const o=null===(e=s[0])||void 0===e?void 0:e.type
13975
13977
  switch(s.length){case 0:this._offsets=[0]
13976
13978
  break
13977
- case 1:{const{get:t,set:e,indexOf:n}=JW[o.typeId],i=s[0]
13978
- this.isValid=t=>PW(i,t),this.get=e=>t(i,e),this.set=(t,n)=>e(i,t,n),this.indexOf=t=>n(i,t),this._offsets=[0,i.length]
13979
- break}default:Object.setPrototypeOf(this,QW[o.typeId]),this._offsets=NW(s)}this.data=s,this.type=o,this.stride=Jq(o),this.numChildren=null!==(i=null===(n=o.children)||void 0===n?void 0:n.length)&&void 0!==i?i:0,this.length=this._offsets.at(-1)}get byteLength(){return this.data.reduce(((t,e)=>t+e.byteLength),0)}get nullable(){return this.data.some((t=>t.nullable))}get nullCount(){return FW(this.data)}get ArrayType(){return this.type.ArrayType}get[Symbol.toStringTag](){return`${this.VectorName}<${this.type[Symbol.toStringTag]}>`}get VectorName(){return`${UU[this.type.typeId]}Vector`}isValid(t){return!1}get(t){return null}at(t){return this.get(bW(t,this.length))}set(t,e){}indexOf(t,e){return-1}includes(t,e){return this.indexOf(t,e)>-1}[Symbol.iterator](){return YW.visit(this)}concat(...t){return new tG(this.data.concat(t.flatMap((t=>t.data)).flat(Number.POSITIVE_INFINITY)))}slice(t,e){return new tG(vW(this,t,e,(({data:t,_offsets:e},n,i)=>LW(t,e,n,i))))}toJSON(){return[...this]}toArray(){const{type:t,data:e,length:n,stride:i,ArrayType:s}=this
13980
- switch(t.typeId){case UU.Int:case UU.Float:case UU.Decimal:case UU.Time:case UU.Timestamp:switch(e.length){case 0:return new s
13979
+ case 1:{const{get:t,set:e,indexOf:n}=QW[o.typeId],i=s[0]
13980
+ this.isValid=t=>zW(i,t),this.get=e=>t(i,e),this.set=(t,n)=>e(i,t,n),this.indexOf=t=>n(i,t),this._offsets=[0,i.length]
13981
+ break}default:Object.setPrototypeOf(this,tG[o.typeId]),this._offsets=LW(s)}this.data=s,this.type=o,this.stride=Qq(o),this.numChildren=null!==(i=null===(n=o.children)||void 0===n?void 0:n.length)&&void 0!==i?i:0,this.length=this._offsets.at(-1)}get byteLength(){return this.data.reduce(((t,e)=>t+e.byteLength),0)}get nullable(){return this.data.some((t=>t.nullable))}get nullCount(){return NW(this.data)}get ArrayType(){return this.type.ArrayType}get[Symbol.toStringTag](){return`${this.VectorName}<${this.type[Symbol.toStringTag]}>`}get VectorName(){return`${qU[this.type.typeId]}Vector`}isValid(t){return!1}get(t){return null}at(t){return this.get(yW(t,this.length))}set(t,e){}indexOf(t,e){return-1}includes(t,e){return this.indexOf(t,e)>-1}[Symbol.iterator](){return XW.visit(this)}concat(...t){return new eG(this.data.concat(t.flatMap((t=>t.data)).flat(Number.POSITIVE_INFINITY)))}slice(t,e){return new eG(bW(this,t,e,(({data:t,_offsets:e},n,i)=>BW(t,e,n,i))))}toJSON(){return[...this]}toArray(){const{type:t,data:e,length:n,stride:i,ArrayType:s}=this
13982
+ switch(t.typeId){case qU.Int:case qU.Float:case qU.Decimal:case qU.Time:case qU.Timestamp:switch(e.length){case 0:return new s
13981
13983
  case 1:return e[0].values.subarray(0,n*i)
13982
13984
  default:return e.reduce(((t,{values:e,length:n})=>(t.array.set(e.subarray(0,n*i),t.offset),t.offset+=n*i,t)),{array:new s(n*i),offset:0}).array}}return[...this]}toString(){return`[${[...this].join(",")}]`}getChild(t){var e
13983
- return this.getChildAt(null===(e=this.type.children)||void 0===e?void 0:e.findIndex((e=>e.name===t)))}getChildAt(t){return t>-1&&t<this.numChildren?new tG(this.data.map((({children:e})=>e[t]))):null}get isMemoized(){return!!Mq.isDictionary(this.type)&&this.data[0].dictionary.isMemoized}memoize(){if(Mq.isDictionary(this.type)){const t=new eG(this.data[0].dictionary),e=this.data.map((e=>{const n=e.clone()
13985
+ return this.getChildAt(null===(e=this.type.children)||void 0===e?void 0:e.findIndex((e=>e.name===t)))}getChildAt(t){return t>-1&&t<this.numChildren?new eG(this.data.map((({children:e})=>e[t]))):null}get isMemoized(){return!!$q.isDictionary(this.type)&&this.data[0].dictionary.isMemoized}memoize(){if($q.isDictionary(this.type)){const t=new nG(this.data[0].dictionary),e=this.data.map((e=>{const n=e.clone()
13984
13986
  return n.dictionary=t,n}))
13985
- return new tG(e)}return new eG(this)}unmemoize(){if(Mq.isDictionary(this.type)&&this.isMemoized){const t=this.data[0].dictionary.unmemoize(),e=this.data.map((e=>{const n=e.clone()
13987
+ return new eG(e)}return new nG(this)}unmemoize(){if($q.isDictionary(this.type)&&this.isMemoized){const t=this.data[0].dictionary.unmemoize(),e=this.data.map((e=>{const n=e.clone()
13986
13988
  return n.dictionary=t,n}))
13987
- return new tG(e)}return this}}XW=Symbol.toStringTag,tG[XW]=(t=>{t.type=Mq.prototype,t.data=[],t.length=0,t.stride=1,t.numChildren=0,t._offsets=new Uint32Array([0]),t[Symbol.isConcatSpreadable]=!0
13988
- const e=Object.keys(UU).map((t=>UU[t])).filter((t=>"number"==typeof t&&t!==UU.NONE))
13989
- for(const n of e){const e=lW.getVisitFnByTypeId(n),i=Aj.getVisitFnByTypeId(n),s=WW.getVisitFnByTypeId(n)
13990
- JW[n]={get:e,set:i,indexOf:s},QW[n]=Object.create(t,{isValid:{value:zW(PW)},get:{value:zW(lW.getVisitFnByTypeId(n))},set:{value:VW(Aj.getVisitFnByTypeId(n))},indexOf:{value:HW(WW.getVisitFnByTypeId(n))}})}return"Vector"})(tG.prototype)
13991
- class eG extends tG{constructor(t){super(t.data)
13989
+ return new eG(e)}return this}}JW=Symbol.toStringTag,eG[JW]=(t=>{t.type=$q.prototype,t.data=[],t.length=0,t.stride=1,t.numChildren=0,t._offsets=new Uint32Array([0]),t[Symbol.isConcatSpreadable]=!0
13990
+ const e=Object.keys(qU).map((t=>qU[t])).filter((t=>"number"==typeof t&&t!==qU.NONE))
13991
+ for(const n of e){const e=cW.getVisitFnByTypeId(n),i=Tj.getVisitFnByTypeId(n),s=GW.getVisitFnByTypeId(n)
13992
+ QW[n]={get:e,set:i,indexOf:s},tG[n]=Object.create(t,{isValid:{value:VW(zW)},get:{value:VW(cW.getVisitFnByTypeId(n))},set:{value:HW(Tj.getVisitFnByTypeId(n))},indexOf:{value:UW(GW.getVisitFnByTypeId(n))}})}return"Vector"})(eG.prototype)
13993
+ class nG extends eG{constructor(t){super(t.data)
13992
13994
  const e=this.get,n=this.set,i=this.slice,s=new Array(this.length)
13993
13995
  Object.defineProperty(this,"get",{value(t){const n=s[t]
13994
13996
  if(void 0!==n)return n
13995
13997
  const i=e.call(this,t)
13996
- return s[t]=i,i}}),Object.defineProperty(this,"set",{value(t,e){n.call(this,t,e),s[t]=e}}),Object.defineProperty(this,"slice",{value:(t,e)=>new eG(i.call(this,t,e))}),Object.defineProperty(this,"isMemoized",{value:!0}),Object.defineProperty(this,"unmemoize",{value:()=>new tG(this.data)}),Object.defineProperty(this,"memoize",{value:()=>this})}}class nG{constructor(){this.bb=null,this.bb_pos=0}__init(t,e){return this.bb_pos=t,this.bb=e,this}offset(){return this.bb.readInt64(this.bb_pos)}metaDataLength(){return this.bb.readInt32(this.bb_pos+8)}bodyLength(){return this.bb.readInt64(this.bb_pos+16)}static sizeOf(){return 24}static createBlock(t,e,n,i){return t.prep(8,24),t.writeInt64(BigInt(null!=i?i:0)),t.pad(4),t.writeInt32(n),t.writeInt64(BigInt(null!=e?e:0)),t.offset()}}class iG{constructor(){this.bb=null,this.bb_pos=0}__init(t,e){return this.bb_pos=t,this.bb=e,this}static getRootAsFooter(t,e){return(e||new iG).__init(t.readInt32(t.position())+t.position(),t)}static getSizePrefixedRootAsFooter(t,e){return t.setPosition(t.position()+4),(e||new iG).__init(t.readInt32(t.position())+t.position(),t)}version(){const t=this.bb.__offset(this.bb_pos,4)
13997
- return t?this.bb.readInt16(this.bb_pos+t):KH.V1}schema(t){const e=this.bb.__offset(this.bb_pos,6)
13998
- return e?(t||new VU).__init(this.bb.__indirect(this.bb_pos+e),this.bb):null}dictionaries(t,e){const n=this.bb.__offset(this.bb_pos,8)
13999
- return n?(e||new nG).__init(this.bb.__vector(this.bb_pos+n)+24*t,this.bb):null}dictionariesLength(){const t=this.bb.__offset(this.bb_pos,8)
13998
+ return s[t]=i,i}}),Object.defineProperty(this,"set",{value(t,e){n.call(this,t,e),s[t]=e}}),Object.defineProperty(this,"slice",{value:(t,e)=>new nG(i.call(this,t,e))}),Object.defineProperty(this,"isMemoized",{value:!0}),Object.defineProperty(this,"unmemoize",{value:()=>new eG(this.data)}),Object.defineProperty(this,"memoize",{value:()=>this})}}class iG{constructor(){this.bb=null,this.bb_pos=0}__init(t,e){return this.bb_pos=t,this.bb=e,this}offset(){return this.bb.readInt64(this.bb_pos)}metaDataLength(){return this.bb.readInt32(this.bb_pos+8)}bodyLength(){return this.bb.readInt64(this.bb_pos+16)}static sizeOf(){return 24}static createBlock(t,e,n,i){return t.prep(8,24),t.writeInt64(BigInt(null!=i?i:0)),t.pad(4),t.writeInt32(n),t.writeInt64(BigInt(null!=e?e:0)),t.offset()}}class sG{constructor(){this.bb=null,this.bb_pos=0}__init(t,e){return this.bb_pos=t,this.bb=e,this}static getRootAsFooter(t,e){return(e||new sG).__init(t.readInt32(t.position())+t.position(),t)}static getSizePrefixedRootAsFooter(t,e){return t.setPosition(t.position()+4),(e||new sG).__init(t.readInt32(t.position())+t.position(),t)}version(){const t=this.bb.__offset(this.bb_pos,4)
13999
+ return t?this.bb.readInt16(this.bb_pos+t):YH.V1}schema(t){const e=this.bb.__offset(this.bb_pos,6)
14000
+ return e?(t||new HU).__init(this.bb.__indirect(this.bb_pos+e),this.bb):null}dictionaries(t,e){const n=this.bb.__offset(this.bb_pos,8)
14001
+ return n?(e||new iG).__init(this.bb.__vector(this.bb_pos+n)+24*t,this.bb):null}dictionariesLength(){const t=this.bb.__offset(this.bb_pos,8)
14000
14002
  return t?this.bb.__vector_len(this.bb_pos+t):0}recordBatches(t,e){const n=this.bb.__offset(this.bb_pos,10)
14001
- return n?(e||new nG).__init(this.bb.__vector(this.bb_pos+n)+24*t,this.bb):null}recordBatchesLength(){const t=this.bb.__offset(this.bb_pos,10)
14003
+ return n?(e||new iG).__init(this.bb.__vector(this.bb_pos+n)+24*t,this.bb):null}recordBatchesLength(){const t=this.bb.__offset(this.bb_pos,10)
14002
14004
  return t?this.bb.__vector_len(this.bb_pos+t):0}customMetadata(t,e){const n=this.bb.__offset(this.bb_pos,12)
14003
- return n?(e||new yU).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos+n)+4*t),this.bb):null}customMetadataLength(){const t=this.bb.__offset(this.bb_pos,12)
14004
- return t?this.bb.__vector_len(this.bb_pos+t):0}static startFooter(t){t.startObject(5)}static addVersion(t,e){t.addFieldInt16(0,e,KH.V1)}static addSchema(t,e){t.addFieldOffset(1,e,0)}static addDictionaries(t,e){t.addFieldOffset(2,e,0)}static startDictionariesVector(t,e){t.startVector(24,e,8)}static addRecordBatches(t,e){t.addFieldOffset(3,e,0)}static startRecordBatchesVector(t,e){t.startVector(24,e,8)}static addCustomMetadata(t,e){t.addFieldOffset(4,e,0)}static createCustomMetadataVector(t,e){t.startVector(4,e.length,4)
14005
+ return n?(e||new wU).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos+n)+4*t),this.bb):null}customMetadataLength(){const t=this.bb.__offset(this.bb_pos,12)
14006
+ return t?this.bb.__vector_len(this.bb_pos+t):0}static startFooter(t){t.startObject(5)}static addVersion(t,e){t.addFieldInt16(0,e,YH.V1)}static addSchema(t,e){t.addFieldOffset(1,e,0)}static addDictionaries(t,e){t.addFieldOffset(2,e,0)}static startDictionariesVector(t,e){t.startVector(24,e,8)}static addRecordBatches(t,e){t.addFieldOffset(3,e,0)}static startRecordBatchesVector(t,e){t.startVector(24,e,8)}static addCustomMetadata(t,e){t.addFieldOffset(4,e,0)}static createCustomMetadataVector(t,e){t.startVector(4,e.length,4)
14005
14007
  for(let n=e.length-1;n>=0;n--)t.addOffset(e[n])
14006
- return t.endVector()}static startCustomMetadataVector(t,e){t.startVector(4,e,4)}static endFooter(t){return t.endObject()}static finishFooterBuffer(t,e){t.finish(e)}static finishSizePrefixedFooterBuffer(t,e){t.finish(e,void 0,!0)}}class sG{constructor(t=[],e,n,i=KH.V5){this.fields=t||[],this.metadata=e||new Map,n||(n=aG(t)),this.dictionaries=n,this.metadataVersion=i}get[Symbol.toStringTag](){return"Schema"}get names(){return this.fields.map((t=>t.name))}toString(){return`Schema<{ ${this.fields.map(((t,e)=>`${e}: ${t}`)).join(", ")} }>`}select(t){const e=new Set(t),n=this.fields.filter((t=>e.has(t.name)))
14007
- return new sG(n,this.metadata)}selectAt(t){const e=t.map((t=>this.fields[t])).filter(Boolean)
14008
- return new sG(e,this.metadata)}assign(...t){const e=t[0]instanceof sG?t[0]:Array.isArray(t[0])?new sG(t[0]):new sG(t),n=[...this.fields],i=rG(rG(new Map,this.metadata),e.metadata),s=e.fields.filter((t=>{const e=n.findIndex((e=>e.name===t.name))
14009
- return!~e||(n[e]=t.clone({metadata:rG(rG(new Map,n[e].metadata),t.metadata)}))&&!1})),o=aG(s,new Map)
14010
- return new sG([...n,...s],i,new Map([...this.dictionaries,...o]))}}sG.prototype.fields=null,sG.prototype.metadata=null,sG.prototype.dictionaries=null
14011
- class oG{static new(...t){let[e,n,i,s]=t
14012
- return t[0]&&"object"==typeof t[0]&&(({name:e}=t[0]),void 0===n&&(n=t[0].type),void 0===i&&(i=t[0].nullable),void 0===s&&(s=t[0].metadata)),new oG(`${e}`,n,i,s)}constructor(t,e,n=!1,i){this.name=t,this.type=e,this.nullable=n,this.metadata=i||new Map}get typeId(){return this.type.typeId}get[Symbol.toStringTag](){return"Field"}toString(){return`${this.name}: ${this.type}`}clone(...t){let[e,n,i,s]=t
14013
- return t[0]&&"object"==typeof t[0]?({name:e=this.name,type:n=this.type,nullable:i=this.nullable,metadata:s=this.metadata}=t[0]):[e=this.name,n=this.type,i=this.nullable,s=this.metadata]=t,oG.new(e,n,i,s)}}function rG(t,e){return new Map([...t||new Map,...e||new Map])}function aG(t,e=new Map){for(let n=-1,i=t.length;++n<i;){const i=t[n].type
14014
- if(Mq.isDictionary(i))if(e.has(i.id)){if(e.get(i.id)!==i.dictionary)throw new Error("Cannot create Schema containing two different dictionaries with the same Id")}else e.set(i.id,i.dictionary)
14015
- i.children&&i.children.length>0&&aG(i.children,e)}return e}oG.prototype.type=null,oG.prototype.name=null,oG.prototype.nullable=null,oG.prototype.metadata=null
14016
- var lG=aU,cG=rU
14017
- class dG{static decode(t){t=new cG(zH(t))
14018
- const e=iG.getRootAsFooter(t),n=sG.decode(e.schema(),new Map,e.version())
14019
- return new hG(n,e)}static encode(t){const e=new lG,n=sG.encode(e,t.schema)
14020
- iG.startRecordBatchesVector(e,t.numRecordBatches)
14021
- for(const n of[...t.recordBatches()].slice().reverse())uG.encode(e,n)
14008
+ return t.endVector()}static startCustomMetadataVector(t,e){t.startVector(4,e,4)}static endFooter(t){return t.endObject()}static finishFooterBuffer(t,e){t.finish(e)}static finishSizePrefixedFooterBuffer(t,e){t.finish(e,void 0,!0)}}class oG{constructor(t=[],e,n,i=YH.V5){this.fields=t||[],this.metadata=e||new Map,n||(n=lG(t)),this.dictionaries=n,this.metadataVersion=i}get[Symbol.toStringTag](){return"Schema"}get names(){return this.fields.map((t=>t.name))}toString(){return`Schema<{ ${this.fields.map(((t,e)=>`${e}: ${t}`)).join(", ")} }>`}select(t){const e=new Set(t),n=this.fields.filter((t=>e.has(t.name)))
14009
+ return new oG(n,this.metadata)}selectAt(t){const e=t.map((t=>this.fields[t])).filter(Boolean)
14010
+ return new oG(e,this.metadata)}assign(...t){const e=t[0]instanceof oG?t[0]:Array.isArray(t[0])?new oG(t[0]):new oG(t),n=[...this.fields],i=aG(aG(new Map,this.metadata),e.metadata),s=e.fields.filter((t=>{const e=n.findIndex((e=>e.name===t.name))
14011
+ return!~e||(n[e]=t.clone({metadata:aG(aG(new Map,n[e].metadata),t.metadata)}))&&!1})),o=lG(s,new Map)
14012
+ return new oG([...n,...s],i,new Map([...this.dictionaries,...o]))}}oG.prototype.fields=null,oG.prototype.metadata=null,oG.prototype.dictionaries=null
14013
+ class rG{static new(...t){let[e,n,i,s]=t
14014
+ return t[0]&&"object"==typeof t[0]&&(({name:e}=t[0]),void 0===n&&(n=t[0].type),void 0===i&&(i=t[0].nullable),void 0===s&&(s=t[0].metadata)),new rG(`${e}`,n,i,s)}constructor(t,e,n=!1,i){this.name=t,this.type=e,this.nullable=n,this.metadata=i||new Map}get typeId(){return this.type.typeId}get[Symbol.toStringTag](){return"Field"}toString(){return`${this.name}: ${this.type}`}clone(...t){let[e,n,i,s]=t
14015
+ return t[0]&&"object"==typeof t[0]?({name:e=this.name,type:n=this.type,nullable:i=this.nullable,metadata:s=this.metadata}=t[0]):[e=this.name,n=this.type,i=this.nullable,s=this.metadata]=t,rG.new(e,n,i,s)}}function aG(t,e){return new Map([...t||new Map,...e||new Map])}function lG(t,e=new Map){for(let n=-1,i=t.length;++n<i;){const i=t[n].type
14016
+ if($q.isDictionary(i))if(e.has(i.id)){if(e.get(i.id)!==i.dictionary)throw new Error("Cannot create Schema containing two different dictionaries with the same Id")}else e.set(i.id,i.dictionary)
14017
+ i.children&&i.children.length>0&&lG(i.children,e)}return e}rG.prototype.type=null,rG.prototype.name=null,rG.prototype.nullable=null,rG.prototype.metadata=null
14018
+ var cG=lU,dG=aU
14019
+ class hG{static decode(t){t=new dG(VH(t))
14020
+ const e=sG.getRootAsFooter(t),n=oG.decode(e.schema(),new Map,e.version())
14021
+ return new uG(n,e)}static encode(t){const e=new cG,n=oG.encode(e,t.schema)
14022
+ sG.startRecordBatchesVector(e,t.numRecordBatches)
14023
+ for(const n of[...t.recordBatches()].slice().reverse())pG.encode(e,n)
14022
14024
  const i=e.endVector()
14023
- iG.startDictionariesVector(e,t.numDictionaries)
14024
- for(const n of[...t.dictionaryBatches()].slice().reverse())uG.encode(e,n)
14025
+ sG.startDictionariesVector(e,t.numDictionaries)
14026
+ for(const n of[...t.dictionaryBatches()].slice().reverse())pG.encode(e,n)
14025
14027
  const s=e.endVector()
14026
- return iG.startFooter(e),iG.addSchema(e,n),iG.addVersion(e,KH.V5),iG.addRecordBatches(e,i),iG.addDictionaries(e,s),iG.finishFooterBuffer(e,iG.endFooter(e)),e.asUint8Array()}get numRecordBatches(){return this._recordBatches.length}get numDictionaries(){return this._dictionaryBatches.length}constructor(t,e=KH.V5,n,i){this.schema=t,this.version=e,n&&(this._recordBatches=n),i&&(this._dictionaryBatches=i)}*recordBatches(){for(let t,e=-1,n=this.numRecordBatches;++e<n;)(t=this.getRecordBatch(e))&&(yield t)}*dictionaryBatches(){for(let t,e=-1,n=this.numDictionaries;++e<n;)(t=this.getDictionaryBatch(e))&&(yield t)}getRecordBatch(t){return t>=0&&t<this.numRecordBatches&&this._recordBatches[t]||null}getDictionaryBatch(t){return t>=0&&t<this.numDictionaries&&this._dictionaryBatches[t]||null}}class hG extends dG{get numRecordBatches(){return this._footer.recordBatchesLength()}get numDictionaries(){return this._footer.dictionariesLength()}constructor(t,e){super(t,e.version()),this._footer=e}getRecordBatch(t){if(t>=0&&t<this.numRecordBatches){const e=this._footer.recordBatches(t)
14027
- if(e)return uG.decode(e)}return null}getDictionaryBatch(t){if(t>=0&&t<this.numDictionaries){const e=this._footer.dictionaries(t)
14028
- if(e)return uG.decode(e)}return null}}class uG{static decode(t){return new uG(t.metaDataLength(),t.bodyLength(),t.offset())}static encode(t,e){const{metaDataLength:n}=e,i=BigInt(e.offset),s=BigInt(e.bodyLength)
14029
- return nG.createBlock(t,i,n,s)}constructor(t,e,n){this.metaDataLength=t,this.offset=WU(n),this.bodyLength=WU(e)}}const pG=Object.freeze({done:!0,value:void 0})
14030
- class fG{constructor(t){this._json=t}get schema(){return this._json.schema}get batches(){return this._json.batches||[]}get dictionaries(){return this._json.dictionaries||[]}}class mG{tee(){return this._getDOMStream().tee()}pipe(t,e){return this._getNodeStream().pipe(t,e)}pipeTo(t,e){return this._getDOMStream().pipeTo(t,e)}pipeThrough(t,e){return this._getDOMStream().pipeThrough(t,e)}_getDOMStream(){return this._DOMStream||(this._DOMStream=this.toDOMStream())}_getNodeStream(){return this._nodeStream||(this._nodeStream=this.toNodeStream())}}class gG extends mG{constructor(){super(),this._values=[],this.resolvers=[],this._closedPromise=new Promise((t=>this._closedPromiseResolve=t))}get closed(){return this._closedPromise}cancel(t){return e(this,void 0,void 0,(function*(){yield this.return(t)}))}write(t){this._ensureOpen()&&(this.resolvers.length<=0?this._values.push(t):this.resolvers.shift().resolve({done:!1,value:t}))}abort(t){this._closedPromiseResolve&&(this.resolvers.length<=0?this._error={error:t}:this.resolvers.shift().reject({done:!0,value:t}))}close(){if(this._closedPromiseResolve){const{resolvers:t}=this
14031
- for(;t.length>0;)t.shift().resolve(pG)
14032
- this._closedPromiseResolve(),this._closedPromiseResolve=void 0}}[Symbol.asyncIterator](){return this}toDOMStream(t){return jH.toDOMStream(this._closedPromiseResolve||this._error?this:this._values,t)}toNodeStream(t){return jH.toNodeStream(this._closedPromiseResolve||this._error?this:this._values,t)}throw(t){return e(this,void 0,void 0,(function*(){return yield this.abort(t),pG}))}return(t){return e(this,void 0,void 0,(function*(){return yield this.close(),pG}))}read(t){return e(this,void 0,void 0,(function*(){return(yield this.next(t,"read")).value}))}peek(t){return e(this,void 0,void 0,(function*(){return(yield this.next(t,"peek")).value}))}next(...t){return this._values.length>0?Promise.resolve({done:!1,value:this._values.shift()}):this._error?Promise.reject({done:!0,value:this._error.error}):this._closedPromiseResolve?new Promise(((t,e)=>{this.resolvers.push({resolve:t,reject:e})})):Promise.resolve(pG)}_ensureOpen(){if(this._closedPromiseResolve)return!0
14033
- throw new Error("AsyncQueue is closed")}}class vG extends gG{write(t){if((t=zH(t)).byteLength>0)return super.write(t)}toString(t=!1){return t?bH(this.toUint8Array(!0)):this.toUint8Array(!1).then(bH)}toUint8Array(t=!1){return t?NH(this._values)[0]:(()=>e(this,void 0,void 0,(function*(){var t,e,n,i
14028
+ return sG.startFooter(e),sG.addSchema(e,n),sG.addVersion(e,YH.V5),sG.addRecordBatches(e,i),sG.addDictionaries(e,s),sG.finishFooterBuffer(e,sG.endFooter(e)),e.asUint8Array()}get numRecordBatches(){return this._recordBatches.length}get numDictionaries(){return this._dictionaryBatches.length}constructor(t,e=YH.V5,n,i){this.schema=t,this.version=e,n&&(this._recordBatches=n),i&&(this._dictionaryBatches=i)}*recordBatches(){for(let t,e=-1,n=this.numRecordBatches;++e<n;)(t=this.getRecordBatch(e))&&(yield t)}*dictionaryBatches(){for(let t,e=-1,n=this.numDictionaries;++e<n;)(t=this.getDictionaryBatch(e))&&(yield t)}getRecordBatch(t){return t>=0&&t<this.numRecordBatches&&this._recordBatches[t]||null}getDictionaryBatch(t){return t>=0&&t<this.numDictionaries&&this._dictionaryBatches[t]||null}}class uG extends hG{get numRecordBatches(){return this._footer.recordBatchesLength()}get numDictionaries(){return this._footer.dictionariesLength()}constructor(t,e){super(t,e.version()),this._footer=e}getRecordBatch(t){if(t>=0&&t<this.numRecordBatches){const e=this._footer.recordBatches(t)
14029
+ if(e)return pG.decode(e)}return null}getDictionaryBatch(t){if(t>=0&&t<this.numDictionaries){const e=this._footer.dictionaries(t)
14030
+ if(e)return pG.decode(e)}return null}}class pG{static decode(t){return new pG(t.metaDataLength(),t.bodyLength(),t.offset())}static encode(t,e){const{metaDataLength:n}=e,i=BigInt(e.offset),s=BigInt(e.bodyLength)
14031
+ return iG.createBlock(t,i,n,s)}constructor(t,e,n){this.metaDataLength=t,this.offset=GU(n),this.bodyLength=GU(e)}}const fG=Object.freeze({done:!0,value:void 0})
14032
+ class mG{constructor(t){this._json=t}get schema(){return this._json.schema}get batches(){return this._json.batches||[]}get dictionaries(){return this._json.dictionaries||[]}}class gG{tee(){return this._getDOMStream().tee()}pipe(t,e){return this._getNodeStream().pipe(t,e)}pipeTo(t,e){return this._getDOMStream().pipeTo(t,e)}pipeThrough(t,e){return this._getDOMStream().pipeThrough(t,e)}_getDOMStream(){return this._DOMStream||(this._DOMStream=this.toDOMStream())}_getNodeStream(){return this._nodeStream||(this._nodeStream=this.toNodeStream())}}class vG extends gG{constructor(){super(),this._values=[],this.resolvers=[],this._closedPromise=new Promise((t=>this._closedPromiseResolve=t))}get closed(){return this._closedPromise}cancel(t){return e(this,void 0,void 0,(function*(){yield this.return(t)}))}write(t){this._ensureOpen()&&(this.resolvers.length<=0?this._values.push(t):this.resolvers.shift().resolve({done:!1,value:t}))}abort(t){this._closedPromiseResolve&&(this.resolvers.length<=0?this._error={error:t}:this.resolvers.shift().reject({done:!0,value:t}))}close(){if(this._closedPromiseResolve){const{resolvers:t}=this
14033
+ for(;t.length>0;)t.shift().resolve(fG)
14034
+ this._closedPromiseResolve(),this._closedPromiseResolve=void 0}}[Symbol.asyncIterator](){return this}toDOMStream(t){return WH.toDOMStream(this._closedPromiseResolve||this._error?this:this._values,t)}toNodeStream(t){return WH.toNodeStream(this._closedPromiseResolve||this._error?this:this._values,t)}throw(t){return e(this,void 0,void 0,(function*(){return yield this.abort(t),fG}))}return(t){return e(this,void 0,void 0,(function*(){return yield this.close(),fG}))}read(t){return e(this,void 0,void 0,(function*(){return(yield this.next(t,"read")).value}))}peek(t){return e(this,void 0,void 0,(function*(){return(yield this.next(t,"peek")).value}))}next(...t){return this._values.length>0?Promise.resolve({done:!1,value:this._values.shift()}):this._error?Promise.reject({done:!0,value:this._error.error}):this._closedPromiseResolve?new Promise(((t,e)=>{this.resolvers.push({resolve:t,reject:e})})):Promise.resolve(fG)}_ensureOpen(){if(this._closedPromiseResolve)return!0
14035
+ throw new Error("AsyncQueue is closed")}}class bG extends vG{write(t){if((t=VH(t)).byteLength>0)return super.write(t)}toString(t=!1){return t?yH(this.toUint8Array(!0)):this.toUint8Array(!1).then(yH)}toUint8Array(t=!1){return t?LH(this._values)[0]:(()=>e(this,void 0,void 0,(function*(){var t,e,n,i
14034
14036
  const s=[]
14035
14037
  let o=0
14036
14038
  try{for(var a,l=!0,c=r(this);!(t=(a=yield c.next()).done);l=!0){i=a.value,l=!1
14037
14039
  const t=i
14038
- s.push(t),o+=t.byteLength}}catch(t){e={error:t}}finally{try{l||t||!(n=c.return)||(yield n.call(c))}finally{if(e)throw e.error}}return NH(s,o)[0]})))()}}class bG{constructor(t){t&&(this.source=new wG(jH.fromIterable(t)))}[Symbol.iterator](){return this}next(t){return this.source.next(t)}throw(t){return this.source.throw(t)}return(t){return this.source.return(t)}peek(t){return this.source.peek(t)}read(t){return this.source.read(t)}}class yG{constructor(t){t instanceof yG?this.source=t.source:t instanceof vG?this.source=new xG(jH.fromAsyncIterable(t)):TH(t)?this.source=new xG(jH.fromNodeStream(t)):AH(t)?this.source=new xG(jH.fromDOMStream(t)):EH(t)?this.source=new xG(jH.fromDOMStream(t.body)):SH(t)?this.source=new xG(jH.fromIterable(t)):(kH(t)||_H(t))&&(this.source=new xG(jH.fromAsyncIterable(t)))}[Symbol.asyncIterator](){return this}next(t){return this.source.next(t)}throw(t){return this.source.throw(t)}return(t){return this.source.return(t)}get closed(){return this.source.closed}cancel(t){return this.source.cancel(t)}peek(t){return this.source.peek(t)}read(t){return this.source.read(t)}}class wG{constructor(t){this.source=t}cancel(t){this.return(t)}peek(t){return this.next(t,"peek").value}read(t){return this.next(t,"read").value}next(t,e="read"){return this.source.next({cmd:e,size:t})}throw(t){return Object.create(this.source.throw&&this.source.throw(t)||pG)}return(t){return Object.create(this.source.return&&this.source.return(t)||pG)}}class xG{constructor(t){this.source=t,this._closedPromise=new Promise((t=>this._closedPromiseResolve=t))}cancel(t){return e(this,void 0,void 0,(function*(){yield this.return(t)}))}get closed(){return this._closedPromise}read(t){return e(this,void 0,void 0,(function*(){return(yield this.next(t,"read")).value}))}peek(t){return e(this,void 0,void 0,(function*(){return(yield this.next(t,"peek")).value}))}next(t){return e(this,arguments,void 0,(function*(t,e="read"){return yield this.source.next({cmd:e,size:t})}))}throw(t){return e(this,void 0,void 0,(function*(){const e=this.source.throw&&(yield this.source.throw(t))||pG
14039
- return this._closedPromiseResolve&&this._closedPromiseResolve(),this._closedPromiseResolve=void 0,Object.create(e)}))}return(t){return e(this,void 0,void 0,(function*(){const e=this.source.return&&(yield this.source.return(t))||pG
14040
- return this._closedPromiseResolve&&this._closedPromiseResolve(),this._closedPromiseResolve=void 0,Object.create(e)}))}}class CG extends bG{constructor(t,e){super(),this.position=0,this.buffer=zH(t),this.size=void 0===e?this.buffer.byteLength:e}readInt32(t){const{buffer:e,byteOffset:n}=this.readAt(t,4)
14040
+ s.push(t),o+=t.byteLength}}catch(t){e={error:t}}finally{try{l||t||!(n=c.return)||(yield n.call(c))}finally{if(e)throw e.error}}return LH(s,o)[0]})))()}}class yG{constructor(t){t&&(this.source=new xG(WH.fromIterable(t)))}[Symbol.iterator](){return this}next(t){return this.source.next(t)}throw(t){return this.source.throw(t)}return(t){return this.source.return(t)}peek(t){return this.source.peek(t)}read(t){return this.source.read(t)}}class wG{constructor(t){t instanceof wG?this.source=t.source:t instanceof bG?this.source=new CG(WH.fromAsyncIterable(t)):OH(t)?this.source=new CG(WH.fromNodeStream(t)):TH(t)?this.source=new CG(WH.fromDOMStream(t)):DH(t)?this.source=new CG(WH.fromDOMStream(t.body)):_H(t)?this.source=new CG(WH.fromIterable(t)):(SH(t)||IH(t))&&(this.source=new CG(WH.fromAsyncIterable(t)))}[Symbol.asyncIterator](){return this}next(t){return this.source.next(t)}throw(t){return this.source.throw(t)}return(t){return this.source.return(t)}get closed(){return this.source.closed}cancel(t){return this.source.cancel(t)}peek(t){return this.source.peek(t)}read(t){return this.source.read(t)}}class xG{constructor(t){this.source=t}cancel(t){this.return(t)}peek(t){return this.next(t,"peek").value}read(t){return this.next(t,"read").value}next(t,e="read"){return this.source.next({cmd:e,size:t})}throw(t){return Object.create(this.source.throw&&this.source.throw(t)||fG)}return(t){return Object.create(this.source.return&&this.source.return(t)||fG)}}class CG{constructor(t){this.source=t,this._closedPromise=new Promise((t=>this._closedPromiseResolve=t))}cancel(t){return e(this,void 0,void 0,(function*(){yield this.return(t)}))}get closed(){return this._closedPromise}read(t){return e(this,void 0,void 0,(function*(){return(yield this.next(t,"read")).value}))}peek(t){return e(this,void 0,void 0,(function*(){return(yield this.next(t,"peek")).value}))}next(t){return e(this,arguments,void 0,(function*(t,e="read"){return yield this.source.next({cmd:e,size:t})}))}throw(t){return e(this,void 0,void 0,(function*(){const e=this.source.throw&&(yield this.source.throw(t))||fG
14041
+ return this._closedPromiseResolve&&this._closedPromiseResolve(),this._closedPromiseResolve=void 0,Object.create(e)}))}return(t){return e(this,void 0,void 0,(function*(){const e=this.source.return&&(yield this.source.return(t))||fG
14042
+ return this._closedPromiseResolve&&this._closedPromiseResolve(),this._closedPromiseResolve=void 0,Object.create(e)}))}}class kG extends yG{constructor(t,e){super(),this.position=0,this.buffer=VH(t),this.size=void 0===e?this.buffer.byteLength:e}readInt32(t){const{buffer:e,byteOffset:n}=this.readAt(t,4)
14041
14043
  return new DataView(e,n).getInt32(0,!0)}seek(t){return this.position=Math.min(t,this.size),t<this.size}read(t){const{buffer:e,size:n,position:i}=this
14042
14044
  return e&&i<n?("number"!=typeof t&&(t=Number.POSITIVE_INFINITY),this.position=Math.min(n,i+Math.min(n-i,t)),e.subarray(i,this.position)):null}readAt(t,e){const n=this.buffer,i=Math.min(this.size,t+e)
14043
- return n?n.subarray(t,i):new Uint8Array(e)}close(){this.buffer&&(this.buffer=null)}throw(t){return this.close(),{done:!0,value:t}}return(t){return this.close(),{done:!0,value:t}}}class kG extends yG{constructor(t,n){super(),this.position=0,this._handle=t,"number"==typeof n?this.size=n:this._pending=(()=>e(this,void 0,void 0,(function*(){this.size=(yield t.stat()).size,delete this._pending})))()}readInt32(t){return e(this,void 0,void 0,(function*(){const{buffer:e,byteOffset:n}=yield this.readAt(t,4)
14045
+ return n?n.subarray(t,i):new Uint8Array(e)}close(){this.buffer&&(this.buffer=null)}throw(t){return this.close(),{done:!0,value:t}}return(t){return this.close(),{done:!0,value:t}}}class SG extends wG{constructor(t,n){super(),this.position=0,this._handle=t,"number"==typeof n?this.size=n:this._pending=(()=>e(this,void 0,void 0,(function*(){this.size=(yield t.stat()).size,delete this._pending})))()}readInt32(t){return e(this,void 0,void 0,(function*(){const{buffer:e,byteOffset:n}=yield this.readAt(t,4)
14044
14046
  return new DataView(e,n).getInt32(0,!0)}))}seek(t){return e(this,void 0,void 0,(function*(){return this._pending&&(yield this._pending),this.position=Math.min(t,this.size),t<this.size}))}read(t){return e(this,void 0,void 0,(function*(){this._pending&&(yield this._pending)
14045
14047
  const{_handle:e,size:n,position:i}=this
14046
14048
  if(e&&i<n){"number"!=typeof t&&(t=Number.POSITIVE_INFINITY)
@@ -14051,255 +14053,255 @@ return l}return null}))}readAt(t,n){return e(this,void 0,void 0,(function*(){thi
14051
14053
  const{_handle:e,size:i}=this
14052
14054
  if(e&&t+n<i){const s=Math.min(i,t+n),o=new Uint8Array(s-t)
14053
14055
  return(yield e.read(o,0,n,t)).buffer}return new Uint8Array(n)}))}close(){return e(this,void 0,void 0,(function*(){const t=this._handle
14054
- this._handle=null,t&&(yield t.close())}))}throw(t){return e(this,void 0,void 0,(function*(){return yield this.close(),{done:!0,value:t}}))}return(t){return e(this,void 0,void 0,(function*(){return yield this.close(),{done:!0,value:t}}))}}function SG(t){return t<0&&(t=4294967295+t+1),`0x${t.toString(16)}`}const _G=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8]
14055
- class IG{constructor(t){this.buffer=t}high(){return this.buffer[1]}low(){return this.buffer[0]}_times(t){const e=new Uint32Array([this.buffer[1]>>>16,65535&this.buffer[1],this.buffer[0]>>>16,65535&this.buffer[0]]),n=new Uint32Array([t.buffer[1]>>>16,65535&t.buffer[1],t.buffer[0]>>>16,65535&t.buffer[0]])
14056
+ this._handle=null,t&&(yield t.close())}))}throw(t){return e(this,void 0,void 0,(function*(){return yield this.close(),{done:!0,value:t}}))}return(t){return e(this,void 0,void 0,(function*(){return yield this.close(),{done:!0,value:t}}))}}function _G(t){return t<0&&(t=4294967295+t+1),`0x${t.toString(16)}`}const IG=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8]
14057
+ class MG{constructor(t){this.buffer=t}high(){return this.buffer[1]}low(){return this.buffer[0]}_times(t){const e=new Uint32Array([this.buffer[1]>>>16,65535&this.buffer[1],this.buffer[0]>>>16,65535&this.buffer[0]]),n=new Uint32Array([t.buffer[1]>>>16,65535&t.buffer[1],t.buffer[0]>>>16,65535&t.buffer[0]])
14056
14058
  let i=e[3]*n[3]
14057
14059
  this.buffer[0]=65535&i
14058
14060
  let s=i>>>16
14059
14061
  return i=e[2]*n[3],s+=i,i=e[3]*n[2]>>>0,s+=i,this.buffer[0]+=s<<16,this.buffer[1]=s>>>0<i?65536:0,this.buffer[1]+=s>>>16,this.buffer[1]+=e[1]*n[3]+e[2]*n[2]+e[3]*n[1],this.buffer[1]+=e[0]*n[3]+e[1]*n[2]+e[2]*n[1]+e[3]*n[0]<<16,this}_plus(t){const e=this.buffer[0]+t.buffer[0]>>>0
14060
- this.buffer[1]+=t.buffer[1],e<this.buffer[0]>>>0&&++this.buffer[1],this.buffer[0]=e}lessThan(t){return this.buffer[1]<t.buffer[1]||this.buffer[1]===t.buffer[1]&&this.buffer[0]<t.buffer[0]}equals(t){return this.buffer[1]===t.buffer[1]&&this.buffer[0]==t.buffer[0]}greaterThan(t){return t.lessThan(this)}hex(){return`${SG(this.buffer[1])} ${SG(this.buffer[0])}`}}class MG extends IG{times(t){return this._times(t),this}plus(t){return this._plus(t),this}static from(t,e=new Uint32Array(2)){return MG.fromString("string"==typeof t?t:t.toString(),e)}static fromNumber(t,e=new Uint32Array(2)){return MG.fromString(t.toString(),e)}static fromString(t,e=new Uint32Array(2)){const n=t.length,i=new MG(e)
14061
- for(let e=0;e<n;){const s=8<n-e?8:n-e,o=new MG(new Uint32Array([Number.parseInt(t.slice(e,e+s),10),0])),r=new MG(new Uint32Array([_G[s],0]))
14062
+ this.buffer[1]+=t.buffer[1],e<this.buffer[0]>>>0&&++this.buffer[1],this.buffer[0]=e}lessThan(t){return this.buffer[1]<t.buffer[1]||this.buffer[1]===t.buffer[1]&&this.buffer[0]<t.buffer[0]}equals(t){return this.buffer[1]===t.buffer[1]&&this.buffer[0]==t.buffer[0]}greaterThan(t){return t.lessThan(this)}hex(){return`${_G(this.buffer[1])} ${_G(this.buffer[0])}`}}class $G extends MG{times(t){return this._times(t),this}plus(t){return this._plus(t),this}static from(t,e=new Uint32Array(2)){return $G.fromString("string"==typeof t?t:t.toString(),e)}static fromNumber(t,e=new Uint32Array(2)){return $G.fromString(t.toString(),e)}static fromString(t,e=new Uint32Array(2)){const n=t.length,i=new $G(e)
14063
+ for(let e=0;e<n;){const s=8<n-e?8:n-e,o=new $G(new Uint32Array([Number.parseInt(t.slice(e,e+s),10),0])),r=new $G(new Uint32Array([IG[s],0]))
14062
14064
  i.times(r),i.plus(o),e+=s}return i}static convertArray(t){const e=new Uint32Array(2*t.length)
14063
- for(let n=-1,i=t.length;++n<i;)MG.from(t[n],new Uint32Array(e.buffer,e.byteOffset+2*n*4,2))
14064
- return e}static multiply(t,e){return new MG(new Uint32Array(t.buffer)).times(e)}static add(t,e){return new MG(new Uint32Array(t.buffer)).plus(e)}}class $G extends IG{negate(){return this.buffer[0]=1+~this.buffer[0],this.buffer[1]=~this.buffer[1],0==this.buffer[0]&&++this.buffer[1],this}times(t){return this._times(t),this}plus(t){return this._plus(t),this}lessThan(t){const e=this.buffer[1]<<0,n=t.buffer[1]<<0
14065
- return e<n||e===n&&this.buffer[0]<t.buffer[0]}static from(t,e=new Uint32Array(2)){return $G.fromString("string"==typeof t?t:t.toString(),e)}static fromNumber(t,e=new Uint32Array(2)){return $G.fromString(t.toString(),e)}static fromString(t,e=new Uint32Array(2)){const n=t.startsWith("-"),i=t.length,s=new $G(e)
14066
- for(let e=n?1:0;e<i;){const n=8<i-e?8:i-e,o=new $G(new Uint32Array([Number.parseInt(t.slice(e,e+n),10),0])),r=new $G(new Uint32Array([_G[n],0]))
14067
- s.times(r),s.plus(o),e+=n}return n?s.negate():s}static convertArray(t){const e=new Uint32Array(2*t.length)
14068
14065
  for(let n=-1,i=t.length;++n<i;)$G.from(t[n],new Uint32Array(e.buffer,e.byteOffset+2*n*4,2))
14069
- return e}static multiply(t,e){return new $G(new Uint32Array(t.buffer)).times(e)}static add(t,e){return new $G(new Uint32Array(t.buffer)).plus(e)}}class EG{constructor(t){this.buffer=t}high(){return new $G(new Uint32Array(this.buffer.buffer,this.buffer.byteOffset+8,2))}low(){return new $G(new Uint32Array(this.buffer.buffer,this.buffer.byteOffset,2))}negate(){return this.buffer[0]=1+~this.buffer[0],this.buffer[1]=~this.buffer[1],this.buffer[2]=~this.buffer[2],this.buffer[3]=~this.buffer[3],0==this.buffer[0]&&++this.buffer[1],0==this.buffer[1]&&++this.buffer[2],0==this.buffer[2]&&++this.buffer[3],this}times(t){const e=new MG(new Uint32Array([this.buffer[3],0])),n=new MG(new Uint32Array([this.buffer[2],0])),i=new MG(new Uint32Array([this.buffer[1],0])),s=new MG(new Uint32Array([this.buffer[0],0])),o=new MG(new Uint32Array([t.buffer[3],0])),r=new MG(new Uint32Array([t.buffer[2],0])),a=new MG(new Uint32Array([t.buffer[1],0])),l=new MG(new Uint32Array([t.buffer[0],0]))
14070
- let c=MG.multiply(s,l)
14066
+ return e}static multiply(t,e){return new $G(new Uint32Array(t.buffer)).times(e)}static add(t,e){return new $G(new Uint32Array(t.buffer)).plus(e)}}class EG extends MG{negate(){return this.buffer[0]=1+~this.buffer[0],this.buffer[1]=~this.buffer[1],0==this.buffer[0]&&++this.buffer[1],this}times(t){return this._times(t),this}plus(t){return this._plus(t),this}lessThan(t){const e=this.buffer[1]|0,n=t.buffer[1]|0
14067
+ return e<n||e===n&&this.buffer[0]<t.buffer[0]}static from(t,e=new Uint32Array(2)){return EG.fromString("string"==typeof t?t:t.toString(),e)}static fromNumber(t,e=new Uint32Array(2)){return EG.fromString(t.toString(),e)}static fromString(t,e=new Uint32Array(2)){const n=t.startsWith("-"),i=t.length,s=new EG(e)
14068
+ for(let e=n?1:0;e<i;){const n=8<i-e?8:i-e,o=new EG(new Uint32Array([Number.parseInt(t.slice(e,e+n),10),0])),r=new EG(new Uint32Array([IG[n],0]))
14069
+ s.times(r),s.plus(o),e+=n}return n?s.negate():s}static convertArray(t){const e=new Uint32Array(2*t.length)
14070
+ for(let n=-1,i=t.length;++n<i;)EG.from(t[n],new Uint32Array(e.buffer,e.byteOffset+2*n*4,2))
14071
+ return e}static multiply(t,e){return new EG(new Uint32Array(t.buffer)).times(e)}static add(t,e){return new EG(new Uint32Array(t.buffer)).plus(e)}}class DG{constructor(t){this.buffer=t}high(){return new EG(new Uint32Array(this.buffer.buffer,this.buffer.byteOffset+8,2))}low(){return new EG(new Uint32Array(this.buffer.buffer,this.buffer.byteOffset,2))}negate(){return this.buffer[0]=1+~this.buffer[0],this.buffer[1]=~this.buffer[1],this.buffer[2]=~this.buffer[2],this.buffer[3]=~this.buffer[3],0==this.buffer[0]&&++this.buffer[1],0==this.buffer[1]&&++this.buffer[2],0==this.buffer[2]&&++this.buffer[3],this}times(t){const e=new $G(new Uint32Array([this.buffer[3],0])),n=new $G(new Uint32Array([this.buffer[2],0])),i=new $G(new Uint32Array([this.buffer[1],0])),s=new $G(new Uint32Array([this.buffer[0],0])),o=new $G(new Uint32Array([t.buffer[3],0])),r=new $G(new Uint32Array([t.buffer[2],0])),a=new $G(new Uint32Array([t.buffer[1],0])),l=new $G(new Uint32Array([t.buffer[0],0]))
14072
+ let c=$G.multiply(s,l)
14071
14073
  this.buffer[0]=c.low()
14072
- const d=new MG(new Uint32Array([c.high(),0]))
14073
- c=MG.multiply(i,l),d.plus(c),c=MG.multiply(s,a),d.plus(c),this.buffer[1]=d.low(),this.buffer[3]=d.lessThan(c)?1:0,this.buffer[2]=d.high()
14074
- return new MG(new Uint32Array(this.buffer.buffer,this.buffer.byteOffset+8,2)).plus(MG.multiply(n,l)).plus(MG.multiply(i,a)).plus(MG.multiply(s,r)),this.buffer[3]+=MG.multiply(e,l).plus(MG.multiply(n,a)).plus(MG.multiply(i,r)).plus(MG.multiply(s,o)).low(),this}plus(t){const e=new Uint32Array(4)
14075
- return e[3]=this.buffer[3]+t.buffer[3]>>>0,e[2]=this.buffer[2]+t.buffer[2]>>>0,e[1]=this.buffer[1]+t.buffer[1]>>>0,e[0]=this.buffer[0]+t.buffer[0]>>>0,e[0]<this.buffer[0]>>>0&&++e[1],e[1]<this.buffer[1]>>>0&&++e[2],e[2]<this.buffer[2]>>>0&&++e[3],this.buffer[3]=e[3],this.buffer[2]=e[2],this.buffer[1]=e[1],this.buffer[0]=e[0],this}hex(){return`${SG(this.buffer[3])} ${SG(this.buffer[2])} ${SG(this.buffer[1])} ${SG(this.buffer[0])}`}static multiply(t,e){return new EG(new Uint32Array(t.buffer)).times(e)}static add(t,e){return new EG(new Uint32Array(t.buffer)).plus(e)}static from(t,e=new Uint32Array(4)){return EG.fromString("string"==typeof t?t:t.toString(),e)}static fromNumber(t,e=new Uint32Array(4)){return EG.fromString(t.toString(),e)}static fromString(t,e=new Uint32Array(4)){const n=t.startsWith("-"),i=t.length,s=new EG(e)
14076
- for(let e=n?1:0;e<i;){const n=8<i-e?8:i-e,o=new EG(new Uint32Array([Number.parseInt(t.slice(e,e+n),10),0,0,0])),r=new EG(new Uint32Array([_G[n],0,0,0]))
14074
+ const d=new $G(new Uint32Array([c.high(),0]))
14075
+ c=$G.multiply(i,l),d.plus(c),c=$G.multiply(s,a),d.plus(c),this.buffer[1]=d.low(),this.buffer[3]=d.lessThan(c)?1:0,this.buffer[2]=d.high()
14076
+ return new $G(new Uint32Array(this.buffer.buffer,this.buffer.byteOffset+8,2)).plus($G.multiply(n,l)).plus($G.multiply(i,a)).plus($G.multiply(s,r)),this.buffer[3]+=$G.multiply(e,l).plus($G.multiply(n,a)).plus($G.multiply(i,r)).plus($G.multiply(s,o)).low(),this}plus(t){const e=new Uint32Array(4)
14077
+ return e[3]=this.buffer[3]+t.buffer[3]>>>0,e[2]=this.buffer[2]+t.buffer[2]>>>0,e[1]=this.buffer[1]+t.buffer[1]>>>0,e[0]=this.buffer[0]+t.buffer[0]>>>0,e[0]<this.buffer[0]>>>0&&++e[1],e[1]<this.buffer[1]>>>0&&++e[2],e[2]<this.buffer[2]>>>0&&++e[3],this.buffer[3]=e[3],this.buffer[2]=e[2],this.buffer[1]=e[1],this.buffer[0]=e[0],this}hex(){return`${_G(this.buffer[3])} ${_G(this.buffer[2])} ${_G(this.buffer[1])} ${_G(this.buffer[0])}`}static multiply(t,e){return new DG(new Uint32Array(t.buffer)).times(e)}static add(t,e){return new DG(new Uint32Array(t.buffer)).plus(e)}static from(t,e=new Uint32Array(4)){return DG.fromString("string"==typeof t?t:t.toString(),e)}static fromNumber(t,e=new Uint32Array(4)){return DG.fromString(t.toString(),e)}static fromString(t,e=new Uint32Array(4)){const n=t.startsWith("-"),i=t.length,s=new DG(e)
14078
+ for(let e=n?1:0;e<i;){const n=8<i-e?8:i-e,o=new DG(new Uint32Array([Number.parseInt(t.slice(e,e+n),10),0,0,0])),r=new DG(new Uint32Array([IG[n],0,0,0]))
14077
14079
  s.times(r),s.plus(o),e+=n}return n?s.negate():s}static convertArray(t){const e=new Uint32Array(4*t.length)
14078
- for(let n=-1,i=t.length;++n<i;)EG.from(t[n],new Uint32Array(e.buffer,e.byteOffset+16*n,4))
14079
- return e}}class DG extends Qq{constructor(t,e,n,i,s=KH.V5){super(),this.nodesIndex=-1,this.buffersIndex=-1,this.bytes=t,this.nodes=e,this.buffers=n,this.dictionaries=i,this.metadataVersion=s}visit(t){return super.visit(t instanceof oG?t.type:t)}visitNull(t,{length:e}=this.nextFieldNode()){return OW({type:t,length:e})}visitBool(t,{length:e,nullCount:n}=this.nextFieldNode()){return OW({type:t,length:e,nullCount:n,nullBitmap:this.readNullBitmap(t,n),data:this.readData(t)})}visitInt(t,{length:e,nullCount:n}=this.nextFieldNode()){return OW({type:t,length:e,nullCount:n,nullBitmap:this.readNullBitmap(t,n),data:this.readData(t)})}visitFloat(t,{length:e,nullCount:n}=this.nextFieldNode()){return OW({type:t,length:e,nullCount:n,nullBitmap:this.readNullBitmap(t,n),data:this.readData(t)})}visitUtf8(t,{length:e,nullCount:n}=this.nextFieldNode()){return OW({type:t,length:e,nullCount:n,nullBitmap:this.readNullBitmap(t,n),valueOffsets:this.readOffsets(t),data:this.readData(t)})}visitLargeUtf8(t,{length:e,nullCount:n}=this.nextFieldNode()){return OW({type:t,length:e,nullCount:n,nullBitmap:this.readNullBitmap(t,n),valueOffsets:this.readOffsets(t),data:this.readData(t)})}visitBinary(t,{length:e,nullCount:n}=this.nextFieldNode()){return OW({type:t,length:e,nullCount:n,nullBitmap:this.readNullBitmap(t,n),valueOffsets:this.readOffsets(t),data:this.readData(t)})}visitLargeBinary(t,{length:e,nullCount:n}=this.nextFieldNode()){return OW({type:t,length:e,nullCount:n,nullBitmap:this.readNullBitmap(t,n),valueOffsets:this.readOffsets(t),data:this.readData(t)})}visitFixedSizeBinary(t,{length:e,nullCount:n}=this.nextFieldNode()){return OW({type:t,length:e,nullCount:n,nullBitmap:this.readNullBitmap(t,n),data:this.readData(t)})}visitDate(t,{length:e,nullCount:n}=this.nextFieldNode()){return OW({type:t,length:e,nullCount:n,nullBitmap:this.readNullBitmap(t,n),data:this.readData(t)})}visitTimestamp(t,{length:e,nullCount:n}=this.nextFieldNode()){return OW({type:t,length:e,nullCount:n,nullBitmap:this.readNullBitmap(t,n),data:this.readData(t)})}visitTime(t,{length:e,nullCount:n}=this.nextFieldNode()){return OW({type:t,length:e,nullCount:n,nullBitmap:this.readNullBitmap(t,n),data:this.readData(t)})}visitDecimal(t,{length:e,nullCount:n}=this.nextFieldNode()){return OW({type:t,length:e,nullCount:n,nullBitmap:this.readNullBitmap(t,n),data:this.readData(t)})}visitList(t,{length:e,nullCount:n}=this.nextFieldNode()){return OW({type:t,length:e,nullCount:n,nullBitmap:this.readNullBitmap(t,n),valueOffsets:this.readOffsets(t),child:this.visit(t.children[0])})}visitStruct(t,{length:e,nullCount:n}=this.nextFieldNode()){return OW({type:t,length:e,nullCount:n,nullBitmap:this.readNullBitmap(t,n),children:this.visitMany(t.children)})}visitUnion(t,{length:e,nullCount:n}=this.nextFieldNode()){return this.metadataVersion<KH.V5&&this.readNullBitmap(t,n),t.mode===YH.Sparse?this.visitSparseUnion(t,{length:e,nullCount:n}):this.visitDenseUnion(t,{length:e,nullCount:n})}visitDenseUnion(t,{length:e,nullCount:n}=this.nextFieldNode()){return OW({type:t,length:e,nullCount:n,typeIds:this.readTypeIds(t),valueOffsets:this.readOffsets(t),children:this.visitMany(t.children)})}visitSparseUnion(t,{length:e,nullCount:n}=this.nextFieldNode()){return OW({type:t,length:e,nullCount:n,typeIds:this.readTypeIds(t),children:this.visitMany(t.children)})}visitDictionary(t,{length:e,nullCount:n}=this.nextFieldNode()){return OW({type:t,length:e,nullCount:n,nullBitmap:this.readNullBitmap(t,n),data:this.readData(t.indices),dictionary:this.readDictionary(t)})}visitInterval(t,{length:e,nullCount:n}=this.nextFieldNode()){return OW({type:t,length:e,nullCount:n,nullBitmap:this.readNullBitmap(t,n),data:this.readData(t)})}visitDuration(t,{length:e,nullCount:n}=this.nextFieldNode()){return OW({type:t,length:e,nullCount:n,nullBitmap:this.readNullBitmap(t,n),data:this.readData(t)})}visitFixedSizeList(t,{length:e,nullCount:n}=this.nextFieldNode()){return OW({type:t,length:e,nullCount:n,nullBitmap:this.readNullBitmap(t,n),child:this.visit(t.children[0])})}visitMap(t,{length:e,nullCount:n}=this.nextFieldNode()){return OW({type:t,length:e,nullCount:n,nullBitmap:this.readNullBitmap(t,n),valueOffsets:this.readOffsets(t),child:this.visit(t.children[0])})}nextFieldNode(){return this.nodes[++this.nodesIndex]}nextBufferRange(){return this.buffers[++this.buffersIndex]}readNullBitmap(t,e,n=this.nextBufferRange()){return e>0&&this.readData(t,n)||new Uint8Array(0)}readOffsets(t,e){return this.readData(t,e)}readTypeIds(t,e){return this.readData(t,e)}readData(t,{length:e,offset:n}=this.nextBufferRange()){return this.bytes.subarray(n,n+e)}readDictionary(t){return this.dictionaries.get(t.id)}}class AG extends DG{constructor(t,e,n,i,s){super(new Uint8Array(0),e,n,i,s),this.sources=t}readNullBitmap(t,e,{offset:n}=this.nextBufferRange()){return e<=0?new Uint8Array(0):IW(this.sources[n])}readOffsets(t,{offset:e}=this.nextBufferRange()){return LH(Uint8Array,LH(t.OffsetArrayType,this.sources[e]))}readTypeIds(t,{offset:e}=this.nextBufferRange()){return LH(Uint8Array,LH(t.ArrayType,this.sources[e]))}readData(t,{offset:e}=this.nextBufferRange()){const{sources:n}=this
14080
- return Mq.isTimestamp(t)||(Mq.isInt(t)||Mq.isTime(t))&&64===t.bitWidth||Mq.isDuration(t)||Mq.isDate(t)&&t.unit===JH.MILLISECOND?LH(Uint8Array,$G.convertArray(n[e])):Mq.isDecimal(t)?LH(Uint8Array,EG.convertArray(n[e])):Mq.isBinary(t)||Mq.isLargeBinary(t)||Mq.isFixedSizeBinary(t)?function(t){const e=t.join(""),n=new Uint8Array(e.length/2)
14080
+ for(let n=-1,i=t.length;++n<i;)DG.from(t[n],new Uint32Array(e.buffer,e.byteOffset+16*n,4))
14081
+ return e}}class AG extends tj{constructor(t,e,n,i,s=YH.V5){super(),this.nodesIndex=-1,this.buffersIndex=-1,this.bytes=t,this.nodes=e,this.buffers=n,this.dictionaries=i,this.metadataVersion=s}visit(t){return super.visit(t instanceof rG?t.type:t)}visitNull(t,{length:e}=this.nextFieldNode()){return RW({type:t,length:e})}visitBool(t,{length:e,nullCount:n}=this.nextFieldNode()){return RW({type:t,length:e,nullCount:n,nullBitmap:this.readNullBitmap(t,n),data:this.readData(t)})}visitInt(t,{length:e,nullCount:n}=this.nextFieldNode()){return RW({type:t,length:e,nullCount:n,nullBitmap:this.readNullBitmap(t,n),data:this.readData(t)})}visitFloat(t,{length:e,nullCount:n}=this.nextFieldNode()){return RW({type:t,length:e,nullCount:n,nullBitmap:this.readNullBitmap(t,n),data:this.readData(t)})}visitUtf8(t,{length:e,nullCount:n}=this.nextFieldNode()){return RW({type:t,length:e,nullCount:n,nullBitmap:this.readNullBitmap(t,n),valueOffsets:this.readOffsets(t),data:this.readData(t)})}visitLargeUtf8(t,{length:e,nullCount:n}=this.nextFieldNode()){return RW({type:t,length:e,nullCount:n,nullBitmap:this.readNullBitmap(t,n),valueOffsets:this.readOffsets(t),data:this.readData(t)})}visitBinary(t,{length:e,nullCount:n}=this.nextFieldNode()){return RW({type:t,length:e,nullCount:n,nullBitmap:this.readNullBitmap(t,n),valueOffsets:this.readOffsets(t),data:this.readData(t)})}visitLargeBinary(t,{length:e,nullCount:n}=this.nextFieldNode()){return RW({type:t,length:e,nullCount:n,nullBitmap:this.readNullBitmap(t,n),valueOffsets:this.readOffsets(t),data:this.readData(t)})}visitFixedSizeBinary(t,{length:e,nullCount:n}=this.nextFieldNode()){return RW({type:t,length:e,nullCount:n,nullBitmap:this.readNullBitmap(t,n),data:this.readData(t)})}visitDate(t,{length:e,nullCount:n}=this.nextFieldNode()){return RW({type:t,length:e,nullCount:n,nullBitmap:this.readNullBitmap(t,n),data:this.readData(t)})}visitTimestamp(t,{length:e,nullCount:n}=this.nextFieldNode()){return RW({type:t,length:e,nullCount:n,nullBitmap:this.readNullBitmap(t,n),data:this.readData(t)})}visitTime(t,{length:e,nullCount:n}=this.nextFieldNode()){return RW({type:t,length:e,nullCount:n,nullBitmap:this.readNullBitmap(t,n),data:this.readData(t)})}visitDecimal(t,{length:e,nullCount:n}=this.nextFieldNode()){return RW({type:t,length:e,nullCount:n,nullBitmap:this.readNullBitmap(t,n),data:this.readData(t)})}visitList(t,{length:e,nullCount:n}=this.nextFieldNode()){return RW({type:t,length:e,nullCount:n,nullBitmap:this.readNullBitmap(t,n),valueOffsets:this.readOffsets(t),child:this.visit(t.children[0])})}visitStruct(t,{length:e,nullCount:n}=this.nextFieldNode()){return RW({type:t,length:e,nullCount:n,nullBitmap:this.readNullBitmap(t,n),children:this.visitMany(t.children)})}visitUnion(t,{length:e,nullCount:n}=this.nextFieldNode()){return this.metadataVersion<YH.V5&&this.readNullBitmap(t,n),t.mode===XH.Sparse?this.visitSparseUnion(t,{length:e,nullCount:n}):this.visitDenseUnion(t,{length:e,nullCount:n})}visitDenseUnion(t,{length:e,nullCount:n}=this.nextFieldNode()){return RW({type:t,length:e,nullCount:n,typeIds:this.readTypeIds(t),valueOffsets:this.readOffsets(t),children:this.visitMany(t.children)})}visitSparseUnion(t,{length:e,nullCount:n}=this.nextFieldNode()){return RW({type:t,length:e,nullCount:n,typeIds:this.readTypeIds(t),children:this.visitMany(t.children)})}visitDictionary(t,{length:e,nullCount:n}=this.nextFieldNode()){return RW({type:t,length:e,nullCount:n,nullBitmap:this.readNullBitmap(t,n),data:this.readData(t.indices),dictionary:this.readDictionary(t)})}visitInterval(t,{length:e,nullCount:n}=this.nextFieldNode()){return RW({type:t,length:e,nullCount:n,nullBitmap:this.readNullBitmap(t,n),data:this.readData(t)})}visitDuration(t,{length:e,nullCount:n}=this.nextFieldNode()){return RW({type:t,length:e,nullCount:n,nullBitmap:this.readNullBitmap(t,n),data:this.readData(t)})}visitFixedSizeList(t,{length:e,nullCount:n}=this.nextFieldNode()){return RW({type:t,length:e,nullCount:n,nullBitmap:this.readNullBitmap(t,n),child:this.visit(t.children[0])})}visitMap(t,{length:e,nullCount:n}=this.nextFieldNode()){return RW({type:t,length:e,nullCount:n,nullBitmap:this.readNullBitmap(t,n),valueOffsets:this.readOffsets(t),child:this.visit(t.children[0])})}nextFieldNode(){return this.nodes[++this.nodesIndex]}nextBufferRange(){return this.buffers[++this.buffersIndex]}readNullBitmap(t,e,n=this.nextBufferRange()){return e>0&&this.readData(t,n)||new Uint8Array(0)}readOffsets(t,e){return this.readData(t,e)}readTypeIds(t,e){return this.readData(t,e)}readData(t,{length:e,offset:n}=this.nextBufferRange()){return this.bytes.subarray(n,n+e)}readDictionary(t){return this.dictionaries.get(t.id)}}class TG extends AG{constructor(t,e,n,i,s){super(new Uint8Array(0),e,n,i,s),this.sources=t}readNullBitmap(t,e,{offset:n}=this.nextBufferRange()){return e<=0?new Uint8Array(0):MW(this.sources[n])}readOffsets(t,{offset:e}=this.nextBufferRange()){return BH(Uint8Array,BH(t.OffsetArrayType,this.sources[e]))}readTypeIds(t,{offset:e}=this.nextBufferRange()){return BH(Uint8Array,BH(t.ArrayType,this.sources[e]))}readData(t,{offset:e}=this.nextBufferRange()){const{sources:n}=this
14082
+ return $q.isTimestamp(t)||($q.isInt(t)||$q.isTime(t))&&64===t.bitWidth||$q.isDuration(t)||$q.isDate(t)&&t.unit===QH.MILLISECOND?BH(Uint8Array,EG.convertArray(n[e])):$q.isDecimal(t)?BH(Uint8Array,DG.convertArray(n[e])):$q.isBinary(t)||$q.isLargeBinary(t)||$q.isFixedSizeBinary(t)?function(t){const e=t.join(""),n=new Uint8Array(e.length/2)
14081
14083
  for(let t=0;t<e.length;t+=2)n[t>>1]=Number.parseInt(e.slice(t,t+2),16)
14082
- return n}(n[e]):Mq.isBool(t)?IW(n[e]):Mq.isUtf8(t)||Mq.isLargeUtf8(t)?wH(n[e].join("")):LH(Uint8Array,LH(t.ArrayType,n[e].map((t=>+t))))}}class TG extends Qq{compareSchemas(t,e){return t===e||e instanceof t.constructor&&this.compareManyFields(t.fields,e.fields)}compareManyFields(t,e){return t===e||Array.isArray(t)&&Array.isArray(e)&&t.length===e.length&&t.every(((t,n)=>this.compareFields(t,e[n])))}compareFields(t,e){return t===e||e instanceof t.constructor&&t.name===e.name&&t.nullable===e.nullable&&this.visit(t.type,e.type)}}function OG(t,e){return e instanceof t.constructor}function RG(t,e){return t===e||OG(t,e)}function FG(t,e){return t===e||OG(t,e)&&t.bitWidth===e.bitWidth&&t.isSigned===e.isSigned}function NG(t,e){return t===e||OG(t,e)&&t.precision===e.precision}function LG(t,e){return t===e||OG(t,e)&&t.unit===e.unit}function BG(t,e){return t===e||OG(t,e)&&t.unit===e.unit&&t.timezone===e.timezone}function PG(t,e){return t===e||OG(t,e)&&t.unit===e.unit&&t.bitWidth===e.bitWidth}function zG(t,e){return t===e||OG(t,e)&&t.mode===e.mode&&t.typeIds.every(((t,n)=>t===e.typeIds[n]))&&UG.compareManyFields(t.children,e.children)}function VG(t,e){return t===e||OG(t,e)&&t.unit===e.unit}function HG(t,e){return t===e||OG(t,e)&&t.unit===e.unit}TG.prototype.visitNull=RG,TG.prototype.visitBool=RG,TG.prototype.visitInt=FG,TG.prototype.visitInt8=FG,TG.prototype.visitInt16=FG,TG.prototype.visitInt32=FG,TG.prototype.visitInt64=FG,TG.prototype.visitUint8=FG,TG.prototype.visitUint16=FG,TG.prototype.visitUint32=FG,TG.prototype.visitUint64=FG,TG.prototype.visitFloat=NG,TG.prototype.visitFloat16=NG,TG.prototype.visitFloat32=NG,TG.prototype.visitFloat64=NG,TG.prototype.visitUtf8=RG,TG.prototype.visitLargeUtf8=RG,TG.prototype.visitBinary=RG,TG.prototype.visitLargeBinary=RG,TG.prototype.visitFixedSizeBinary=function(t,e){return t===e||OG(t,e)&&t.byteWidth===e.byteWidth},TG.prototype.visitDate=LG,TG.prototype.visitDateDay=LG,TG.prototype.visitDateMillisecond=LG,TG.prototype.visitTimestamp=BG,TG.prototype.visitTimestampSecond=BG,TG.prototype.visitTimestampMillisecond=BG,TG.prototype.visitTimestampMicrosecond=BG,TG.prototype.visitTimestampNanosecond=BG,TG.prototype.visitTime=PG,TG.prototype.visitTimeSecond=PG,TG.prototype.visitTimeMillisecond=PG,TG.prototype.visitTimeMicrosecond=PG,TG.prototype.visitTimeNanosecond=PG,TG.prototype.visitDecimal=RG,TG.prototype.visitList=function(t,e){return t===e||OG(t,e)&&t.children.length===e.children.length&&UG.compareManyFields(t.children,e.children)},TG.prototype.visitStruct=function(t,e){return t===e||OG(t,e)&&t.children.length===e.children.length&&UG.compareManyFields(t.children,e.children)},TG.prototype.visitUnion=zG,TG.prototype.visitDenseUnion=zG,TG.prototype.visitSparseUnion=zG,TG.prototype.visitDictionary=function(t,e){return t===e||OG(t,e)&&t.id===e.id&&t.isOrdered===e.isOrdered&&UG.visit(t.indices,e.indices)&&UG.visit(t.dictionary,e.dictionary)},TG.prototype.visitInterval=VG,TG.prototype.visitIntervalDayTime=VG,TG.prototype.visitIntervalYearMonth=VG,TG.prototype.visitDuration=HG,TG.prototype.visitDurationSecond=HG,TG.prototype.visitDurationMillisecond=HG,TG.prototype.visitDurationMicrosecond=HG,TG.prototype.visitDurationNanosecond=HG,TG.prototype.visitFixedSizeList=function(t,e){return t===e||OG(t,e)&&t.listSize===e.listSize&&t.children.length===e.children.length&&UG.compareManyFields(t.children,e.children)},TG.prototype.visitMap=function(t,e){return t===e||OG(t,e)&&t.keysSorted===e.keysSorted&&t.children.length===e.children.length&&UG.compareManyFields(t.children,e.children)}
14083
- const UG=new TG
14084
- function qG(t,e){return UG.compareSchemas(t,e)}function jG(t,e){return function(t,e){const n=[...t.fields],i=[],s={numBatches:e.reduce(((t,e)=>Math.max(t,e.length)),0)}
14084
+ return n}(n[e]):$q.isBool(t)?MW(n[e]):$q.isUtf8(t)||$q.isLargeUtf8(t)?xH(n[e].join("")):BH(Uint8Array,BH(t.ArrayType,n[e].map((t=>+t))))}}class OG extends tj{compareSchemas(t,e){return t===e||e instanceof t.constructor&&this.compareManyFields(t.fields,e.fields)}compareManyFields(t,e){return t===e||Array.isArray(t)&&Array.isArray(e)&&t.length===e.length&&t.every(((t,n)=>this.compareFields(t,e[n])))}compareFields(t,e){return t===e||e instanceof t.constructor&&t.name===e.name&&t.nullable===e.nullable&&this.visit(t.type,e.type)}}function RG(t,e){return e instanceof t.constructor}function FG(t,e){return t===e||RG(t,e)}function NG(t,e){return t===e||RG(t,e)&&t.bitWidth===e.bitWidth&&t.isSigned===e.isSigned}function LG(t,e){return t===e||RG(t,e)&&t.precision===e.precision}function BG(t,e){return t===e||RG(t,e)&&t.unit===e.unit}function PG(t,e){return t===e||RG(t,e)&&t.unit===e.unit&&t.timezone===e.timezone}function zG(t,e){return t===e||RG(t,e)&&t.unit===e.unit&&t.bitWidth===e.bitWidth}function VG(t,e){return t===e||RG(t,e)&&t.mode===e.mode&&t.typeIds.every(((t,n)=>t===e.typeIds[n]))&&qG.compareManyFields(t.children,e.children)}function HG(t,e){return t===e||RG(t,e)&&t.unit===e.unit}function UG(t,e){return t===e||RG(t,e)&&t.unit===e.unit}OG.prototype.visitNull=FG,OG.prototype.visitBool=FG,OG.prototype.visitInt=NG,OG.prototype.visitInt8=NG,OG.prototype.visitInt16=NG,OG.prototype.visitInt32=NG,OG.prototype.visitInt64=NG,OG.prototype.visitUint8=NG,OG.prototype.visitUint16=NG,OG.prototype.visitUint32=NG,OG.prototype.visitUint64=NG,OG.prototype.visitFloat=LG,OG.prototype.visitFloat16=LG,OG.prototype.visitFloat32=LG,OG.prototype.visitFloat64=LG,OG.prototype.visitUtf8=FG,OG.prototype.visitLargeUtf8=FG,OG.prototype.visitBinary=FG,OG.prototype.visitLargeBinary=FG,OG.prototype.visitFixedSizeBinary=function(t,e){return t===e||RG(t,e)&&t.byteWidth===e.byteWidth},OG.prototype.visitDate=BG,OG.prototype.visitDateDay=BG,OG.prototype.visitDateMillisecond=BG,OG.prototype.visitTimestamp=PG,OG.prototype.visitTimestampSecond=PG,OG.prototype.visitTimestampMillisecond=PG,OG.prototype.visitTimestampMicrosecond=PG,OG.prototype.visitTimestampNanosecond=PG,OG.prototype.visitTime=zG,OG.prototype.visitTimeSecond=zG,OG.prototype.visitTimeMillisecond=zG,OG.prototype.visitTimeMicrosecond=zG,OG.prototype.visitTimeNanosecond=zG,OG.prototype.visitDecimal=FG,OG.prototype.visitList=function(t,e){return t===e||RG(t,e)&&t.children.length===e.children.length&&qG.compareManyFields(t.children,e.children)},OG.prototype.visitStruct=function(t,e){return t===e||RG(t,e)&&t.children.length===e.children.length&&qG.compareManyFields(t.children,e.children)},OG.prototype.visitUnion=VG,OG.prototype.visitDenseUnion=VG,OG.prototype.visitSparseUnion=VG,OG.prototype.visitDictionary=function(t,e){return t===e||RG(t,e)&&t.id===e.id&&t.isOrdered===e.isOrdered&&qG.visit(t.indices,e.indices)&&qG.visit(t.dictionary,e.dictionary)},OG.prototype.visitInterval=HG,OG.prototype.visitIntervalDayTime=HG,OG.prototype.visitIntervalYearMonth=HG,OG.prototype.visitDuration=UG,OG.prototype.visitDurationSecond=UG,OG.prototype.visitDurationMillisecond=UG,OG.prototype.visitDurationMicrosecond=UG,OG.prototype.visitDurationNanosecond=UG,OG.prototype.visitFixedSizeList=function(t,e){return t===e||RG(t,e)&&t.listSize===e.listSize&&t.children.length===e.children.length&&qG.compareManyFields(t.children,e.children)},OG.prototype.visitMap=function(t,e){return t===e||RG(t,e)&&t.keysSorted===e.keysSorted&&t.children.length===e.children.length&&qG.compareManyFields(t.children,e.children)}
14085
+ const qG=new OG
14086
+ function jG(t,e){return qG.compareSchemas(t,e)}function WG(t,e){return function(t,e){const n=[...t.fields],i=[],s={numBatches:e.reduce(((t,e)=>Math.max(t,e.length)),0)}
14085
14087
  let o=0,r=0,a=-1
14086
14088
  const l=e.length
14087
14089
  let c,d=[]
14088
14090
  for(;s.numBatches-- >0;){for(r=Number.POSITIVE_INFINITY,a=-1;++a<l;)d[a]=c=e[a].shift(),r=Math.min(r,c?c.length:r)
14089
- Number.isFinite(r)&&(d=WG(n,r,d,e,s),r>0&&(i[o++]=OW({type:new qq(n),length:r,nullCount:0,children:d.slice()})))}return[t=t.assign(n),i.map((e=>new YG(t,e)))]}(t,e.map((t=>t.data.concat())))}function WG(t,e,n,i,s){var o
14091
+ Number.isFinite(r)&&(d=GG(n,r,d,e,s),r>0&&(i[o++]=RW({type:new jq(n),length:r,nullCount:0,children:d.slice()})))}return[t=t.assign(n),i.map((e=>new XG(t,e)))]}(t,e.map((t=>t.data.concat())))}function GG(t,e,n,i,s){var o
14090
14092
  const r=(e+63&-64)>>3
14091
14093
  for(let a=-1,l=i.length;++a<l;){const l=n[a],c=null==l?void 0:l.length
14092
14094
  if(c>=e)c===e?n[a]=l:(n[a]=l.slice(0,e),s.numBatches=Math.max(s.numBatches,i[a].unshift(l.slice(e,c-e))))
14093
14095
  else{const i=t[a]
14094
- t[a]=i.clone({nullable:!0}),n[a]=null!==(o=null==l?void 0:l._changeLengthAndBackfillNullBitmap(e))&&void 0!==o?o:OW({type:i.type,length:e,nullCount:e,nullBitmap:new Uint8Array(r)})}}return n}var GG,ZG
14095
- class KG{constructor(...t){var e,n
14096
- if(0===t.length)return this.batches=[],this.schema=new sG([]),this._offsets=[0],this
14096
+ t[a]=i.clone({nullable:!0}),n[a]=null!==(o=null==l?void 0:l._changeLengthAndBackfillNullBitmap(e))&&void 0!==o?o:RW({type:i.type,length:e,nullCount:e,nullBitmap:new Uint8Array(r)})}}return n}var ZG,KG
14097
+ class YG{constructor(...t){var e,n
14098
+ if(0===t.length)return this.batches=[],this.schema=new oG([]),this._offsets=[0],this
14097
14099
  let i,s
14098
- t[0]instanceof sG&&(i=t.shift()),t.at(-1)instanceof Uint32Array&&(s=t.pop())
14099
- const o=t=>{if(t){if(t instanceof YG)return[t]
14100
- if(t instanceof KG)return t.batches
14101
- if(t instanceof DW){if(t.type instanceof qq)return[new YG(new sG(t.type.children),t)]}else{if(Array.isArray(t))return t.flatMap((t=>o(t)))
14100
+ t[0]instanceof oG&&(i=t.shift()),t.at(-1)instanceof Uint32Array&&(s=t.pop())
14101
+ const o=t=>{if(t){if(t instanceof XG)return[t]
14102
+ if(t instanceof YG)return t.batches
14103
+ if(t instanceof AW){if(t.type instanceof jq)return[new XG(new oG(t.type.children),t)]}else{if(Array.isArray(t))return t.flatMap((t=>o(t)))
14102
14104
  if("function"==typeof t[Symbol.iterator])return[...t].flatMap((t=>o(t)))
14103
- if("object"==typeof t){const e=Object.keys(t),n=e.map((e=>new tG([t[e]]))),s=null!=i?i:new sG(e.map(((t,e)=>new oG(String(t),n[e].type,n[e].nullable)))),[,o]=jG(s,n)
14104
- return 0===o.length?[new YG(t)]:o}}}return[]},r=t.flatMap((t=>o(t)))
14105
- if(i=null!==(n=null!=i?i:null===(e=r[0])||void 0===e?void 0:e.schema)&&void 0!==n?n:new sG([]),!(i instanceof sG))throw new TypeError("Table constructor expects a [Schema, RecordBatch[]] pair.")
14106
- for(const t of r){if(!(t instanceof YG))throw new TypeError("Table constructor expects a [Schema, RecordBatch[]] pair.")
14107
- if(!qG(i,t.schema))throw new TypeError("Table and inner RecordBatch schemas must be equivalent.")}this.schema=i,this.batches=r,this._offsets=null!=s?s:NW(this.data)}get data(){return this.batches.map((({data:t})=>t))}get numCols(){return this.schema.fields.length}get numRows(){return this.data.reduce(((t,e)=>t+e.length),0)}get nullCount(){return-1===this._nullCount&&(this._nullCount=FW(this.data)),this._nullCount}isValid(t){return!1}get(t){return null}at(t){return this.get(bW(t,this.numRows))}set(t,e){}indexOf(t,e){return-1}[Symbol.iterator](){return this.batches.length>0?YW.visit(new tG(this.data)):new Array(0)[Symbol.iterator]()}toArray(){return[...this]}toString(){return`[\n ${this.toArray().join(",\n ")}\n]`}concat(...t){const e=this.schema,n=this.data.concat(t.flatMap((({data:t})=>t)))
14108
- return new KG(e,n.map((t=>new YG(e,t))))}slice(t,e){const n=this.schema;[t,e]=vW({length:this.numRows},t,e)
14109
- const i=LW(this.data,this._offsets,t,e)
14110
- return new KG(n,i.map((t=>new YG(n,t))))}getChild(t){return this.getChildAt(this.schema.fields.findIndex((e=>e.name===t)))}getChildAt(t){if(t>-1&&t<this.schema.fields.length){const e=this.data.map((e=>e.children[t]))
14111
- if(0===e.length){const{type:n}=this.schema.fields[t],i=OW({type:n,length:0,nullCount:0})
14112
- e.push(i._changeLengthAndBackfillNullBitmap(this.numRows))}return new tG(e)}return null}setChild(t,e){var n
14105
+ if("object"==typeof t){const e=Object.keys(t),n=e.map((e=>new eG([t[e]]))),s=null!=i?i:new oG(e.map(((t,e)=>new rG(String(t),n[e].type,n[e].nullable)))),[,o]=WG(s,n)
14106
+ return 0===o.length?[new XG(t)]:o}}}return[]},r=t.flatMap((t=>o(t)))
14107
+ if(i=null!==(n=null!=i?i:null===(e=r[0])||void 0===e?void 0:e.schema)&&void 0!==n?n:new oG([]),!(i instanceof oG))throw new TypeError("Table constructor expects a [Schema, RecordBatch[]] pair.")
14108
+ for(const t of r){if(!(t instanceof XG))throw new TypeError("Table constructor expects a [Schema, RecordBatch[]] pair.")
14109
+ if(!jG(i,t.schema))throw new TypeError("Table and inner RecordBatch schemas must be equivalent.")}this.schema=i,this.batches=r,this._offsets=null!=s?s:LW(this.data)}get data(){return this.batches.map((({data:t})=>t))}get numCols(){return this.schema.fields.length}get numRows(){return this.data.reduce(((t,e)=>t+e.length),0)}get nullCount(){return-1===this._nullCount&&(this._nullCount=NW(this.data)),this._nullCount}isValid(t){return!1}get(t){return null}at(t){return this.get(yW(t,this.numRows))}set(t,e){}indexOf(t,e){return-1}[Symbol.iterator](){return this.batches.length>0?XW.visit(new eG(this.data)):new Array(0)[Symbol.iterator]()}toArray(){return[...this]}toString(){return`[\n ${this.toArray().join(",\n ")}\n]`}concat(...t){const e=this.schema,n=this.data.concat(t.flatMap((({data:t})=>t)))
14110
+ return new YG(e,n.map((t=>new XG(e,t))))}slice(t,e){const n=this.schema;[t,e]=bW({length:this.numRows},t,e)
14111
+ const i=BW(this.data,this._offsets,t,e)
14112
+ return new YG(n,i.map((t=>new XG(n,t))))}getChild(t){return this.getChildAt(this.schema.fields.findIndex((e=>e.name===t)))}getChildAt(t){if(t>-1&&t<this.schema.fields.length){const e=this.data.map((e=>e.children[t]))
14113
+ if(0===e.length){const{type:n}=this.schema.fields[t],i=RW({type:n,length:0,nullCount:0})
14114
+ e.push(i._changeLengthAndBackfillNullBitmap(this.numRows))}return new eG(e)}return null}setChild(t,e){var n
14113
14115
  return this.setChildAt(null===(n=this.schema.fields)||void 0===n?void 0:n.findIndex((e=>e.name===t)),e)}setChildAt(t,e){let n=this.schema,i=[...this.batches]
14114
- if(t>-1&&t<this.numCols){e||(e=new tG([OW({type:new $q,length:this.numRows})]))
14115
- const s=n.fields.slice(),o=s[t].clone({type:e.type}),r=this.schema.fields.map(((t,e)=>this.getChildAt(e)));[s[t],r[t]]=[o,e],[n,i]=jG(n,r)}return new KG(n,i)}select(t){const e=this.schema.fields.reduce(((t,e,n)=>t.set(e.name,n)),new Map)
14116
+ if(t>-1&&t<this.numCols){e||(e=new eG([RW({type:new Eq,length:this.numRows})]))
14117
+ const s=n.fields.slice(),o=s[t].clone({type:e.type}),r=this.schema.fields.map(((t,e)=>this.getChildAt(e)));[s[t],r[t]]=[o,e],[n,i]=WG(n,r)}return new YG(n,i)}select(t){const e=this.schema.fields.reduce(((t,e,n)=>t.set(e.name,n)),new Map)
14116
14118
  return this.selectAt(t.map((t=>e.get(t))).filter((t=>t>-1)))}selectAt(t){const e=this.schema.selectAt(t),n=this.batches.map((e=>e.selectAt(t)))
14117
- return new KG(e,n)}assign(t){const e=this.schema.fields,[n,i]=t.schema.fields.reduce(((t,n,i)=>{const[s,o]=t,r=e.findIndex((t=>t.name===n.name))
14119
+ return new YG(e,n)}assign(t){const e=this.schema.fields,[n,i]=t.schema.fields.reduce(((t,n,i)=>{const[s,o]=t,r=e.findIndex((t=>t.name===n.name))
14118
14120
  return~r?o[r]=i:s.push(i),t}),[[],[]]),s=this.schema.assign(t.schema),o=[...e.map(((t,e)=>[e,i[e]])).map((([e,n])=>void 0===n?this.getChildAt(e):t.getChildAt(n))),...n.map((e=>t.getChildAt(e)))].filter(Boolean)
14119
- return new KG(...jG(s,o))}}GG=Symbol.toStringTag,KG[GG]=(t=>(t.schema=null,t.batches=[],t._offsets=new Uint32Array([0]),t._nullCount=-1,t[Symbol.isConcatSpreadable]=!0,t.isValid=zW(PW),t.get=zW(lW.getVisitFn(UU.Struct)),t.set=VW(Aj.getVisitFn(UU.Struct)),t.indexOf=HW(WW.getVisitFn(UU.Struct)),"Table"))(KG.prototype)
14120
- let YG=class t{constructor(...t){switch(t.length){case 2:if([this.schema]=t,!(this.schema instanceof sG))throw new TypeError("RecordBatch constructor expects a [Schema, Data] pair.")
14121
- if([,this.data=OW({nullCount:0,type:new qq(this.schema.fields),children:this.schema.fields.map((t=>OW({type:t.type,nullCount:0})))})]=t,!(this.data instanceof DW))throw new TypeError("RecordBatch constructor expects a [Schema, Data] pair.");[this.schema,this.data]=XG(this.schema,this.data.children)
14121
+ return new YG(...WG(s,o))}}ZG=Symbol.toStringTag,YG[ZG]=(t=>(t.schema=null,t.batches=[],t._offsets=new Uint32Array([0]),t._nullCount=-1,t[Symbol.isConcatSpreadable]=!0,t.isValid=VW(zW),t.get=VW(cW.getVisitFn(qU.Struct)),t.set=HW(Tj.getVisitFn(qU.Struct)),t.indexOf=UW(GW.getVisitFn(qU.Struct)),"Table"))(YG.prototype)
14122
+ let XG=class t{constructor(...t){switch(t.length){case 2:if([this.schema]=t,!(this.schema instanceof oG))throw new TypeError("RecordBatch constructor expects a [Schema, Data] pair.")
14123
+ if([,this.data=RW({nullCount:0,type:new jq(this.schema.fields),children:this.schema.fields.map((t=>RW({type:t.type,nullCount:0})))})]=t,!(this.data instanceof AW))throw new TypeError("RecordBatch constructor expects a [Schema, Data] pair.");[this.schema,this.data]=JG(this.schema,this.data.children)
14122
14124
  break
14123
- case 1:{const[e]=t,{fields:n,children:i,length:s}=Object.keys(e).reduce(((t,n,i)=>(t.children[i]=e[n],t.length=Math.max(t.length,e[n].length),t.fields[i]=oG.new({name:n,type:e[n].type,nullable:!0}),t)),{length:0,fields:new Array,children:new Array}),o=new sG(n),r=OW({type:new qq(n),length:s,children:i,nullCount:0});[this.schema,this.data]=XG(o,r.children,s)
14124
- break}default:throw new TypeError("RecordBatch constructor expects an Object mapping names to child Data, or a [Schema, Data] pair.")}}get dictionaries(){return this._dictionaries||(this._dictionaries=JG(this.schema.fields,this.data.children))}get numCols(){return this.schema.fields.length}get numRows(){return this.data.length}get nullCount(){return this.data.nullCount}isValid(t){return this.data.getValid(t)}get(t){return lW.visit(this.data,t)}at(t){return this.get(bW(t,this.numRows))}set(t,e){return Aj.visit(this.data,t,e)}indexOf(t,e){return WW.visit(this.data,t,e)}[Symbol.iterator](){return YW.visit(new tG([this.data]))}toArray(){return[...this]}concat(...t){return new KG(this.schema,[this,...t])}slice(e,n){const[i]=new tG([this.data]).slice(e,n).data
14125
+ case 1:{const[e]=t,{fields:n,children:i,length:s}=Object.keys(e).reduce(((t,n,i)=>(t.children[i]=e[n],t.length=Math.max(t.length,e[n].length),t.fields[i]=rG.new({name:n,type:e[n].type,nullable:!0}),t)),{length:0,fields:new Array,children:new Array}),o=new oG(n),r=RW({type:new jq(n),length:s,children:i,nullCount:0});[this.schema,this.data]=JG(o,r.children,s)
14126
+ break}default:throw new TypeError("RecordBatch constructor expects an Object mapping names to child Data, or a [Schema, Data] pair.")}}get dictionaries(){return this._dictionaries||(this._dictionaries=QG(this.schema.fields,this.data.children))}get numCols(){return this.schema.fields.length}get numRows(){return this.data.length}get nullCount(){return this.data.nullCount}isValid(t){return this.data.getValid(t)}get(t){return cW.visit(this.data,t)}at(t){return this.get(yW(t,this.numRows))}set(t,e){return Tj.visit(this.data,t,e)}indexOf(t,e){return GW.visit(this.data,t,e)}[Symbol.iterator](){return XW.visit(new eG([this.data]))}toArray(){return[...this]}concat(...t){return new YG(this.schema,[this,...t])}slice(e,n){const[i]=new eG([this.data]).slice(e,n).data
14125
14127
  return new t(this.schema,i)}getChild(t){var e
14126
- return this.getChildAt(null===(e=this.schema.fields)||void 0===e?void 0:e.findIndex((e=>e.name===t)))}getChildAt(t){return t>-1&&t<this.schema.fields.length?new tG([this.data.children[t]]):null}setChild(t,e){var n
14128
+ return this.getChildAt(null===(e=this.schema.fields)||void 0===e?void 0:e.findIndex((e=>e.name===t)))}getChildAt(t){return t>-1&&t<this.schema.fields.length?new eG([this.data.children[t]]):null}setChild(t,e){var n
14127
14129
  return this.setChildAt(null===(n=this.schema.fields)||void 0===n?void 0:n.findIndex((e=>e.name===t)),e)}setChildAt(e,n){let i=this.schema,s=this.data
14128
- if(e>-1&&e<this.numCols){n||(n=new tG([OW({type:new $q,length:this.numRows})]))
14129
- const t=i.fields.slice(),o=s.children.slice(),r=t[e].clone({type:n.type});[t[e],o[e]]=[r,n.data[0]],i=new sG(t,new Map(this.schema.metadata)),s=OW({type:new qq(t),children:o})}return new t(i,s)}select(e){const n=this.schema.select(e),i=new qq(n.fields),s=[]
14130
+ if(e>-1&&e<this.numCols){n||(n=new eG([RW({type:new Eq,length:this.numRows})]))
14131
+ const t=i.fields.slice(),o=s.children.slice(),r=t[e].clone({type:n.type});[t[e],o[e]]=[r,n.data[0]],i=new oG(t,new Map(this.schema.metadata)),s=RW({type:new jq(t),children:o})}return new t(i,s)}select(e){const n=this.schema.select(e),i=new jq(n.fields),s=[]
14130
14132
  for(const t of e){const e=this.schema.fields.findIndex((e=>e.name===t))
14131
- ~e&&(s[e]=this.data.children[e])}return new t(n,OW({type:i,length:this.numRows,children:s}))}selectAt(e){const n=this.schema.selectAt(e),i=e.map((t=>this.data.children[t])).filter(Boolean),s=OW({type:new qq(n.fields),length:this.numRows,children:i})
14133
+ ~e&&(s[e]=this.data.children[e])}return new t(n,RW({type:i,length:this.numRows,children:s}))}selectAt(e){const n=this.schema.selectAt(e),i=e.map((t=>this.data.children[t])).filter(Boolean),s=RW({type:new jq(n.fields),length:this.numRows,children:i})
14132
14134
  return new t(n,s)}}
14133
- function XG(t,e,n=e.reduce(((t,e)=>Math.max(t,e.length)),0)){var i
14135
+ function JG(t,e,n=e.reduce(((t,e)=>Math.max(t,e.length)),0)){var i
14134
14136
  const s=[...t.fields],o=[...e],r=(n+63&-64)>>3
14135
14137
  for(const[a,l]of t.fields.entries()){const t=e[a]
14136
- t&&t.length===n||(s[a]=l.clone({nullable:!0}),o[a]=null!==(i=null==t?void 0:t._changeLengthAndBackfillNullBitmap(n))&&void 0!==i?i:OW({type:l.type,length:n,nullCount:n,nullBitmap:new Uint8Array(r)}))}return[t.assign(s),OW({type:new qq(s),length:n,children:o})]}function JG(t,e,n=new Map){var i,s
14138
+ t&&t.length===n||(s[a]=l.clone({nullable:!0}),o[a]=null!==(i=null==t?void 0:t._changeLengthAndBackfillNullBitmap(n))&&void 0!==i?i:RW({type:l.type,length:n,nullCount:n,nullBitmap:new Uint8Array(r)}))}return[t.assign(s),RW({type:new jq(s),length:n,children:o})]}function QG(t,e,n=new Map){var i,s
14137
14139
  if((null!==(i=null==t?void 0:t.length)&&void 0!==i?i:0)>0&&(null==t?void 0:t.length)===(null==e?void 0:e.length))for(let i=-1,o=t.length;++i<o;){const{type:o}=t[i],r=e[i]
14138
- for(const t of[r,...(null===(s=null==r?void 0:r.dictionary)||void 0===s?void 0:s.data)||[]])JG(o.children,null==t?void 0:t.children,n)
14139
- if(Mq.isDictionary(o)){const{id:t}=o
14140
- if(n.has(t)){if(n.get(t)!==r.dictionary)throw new Error("Cannot create Schema containing two different dictionaries with the same Id")}else(null==r?void 0:r.dictionary)&&n.set(t,r.dictionary)}}return n}ZG=Symbol.toStringTag,YG[ZG]=(t=>(t._nullCount=-1,t[Symbol.isConcatSpreadable]=!0,"RecordBatch"))(YG.prototype)
14141
- class QG extends YG{constructor(t){const e=t.fields.map((t=>OW({type:t.type})))
14142
- super(t,OW({type:new qq(t.fields),nullCount:0,children:e}))}}let tZ=class t{constructor(){this.bb=null,this.bb_pos=0}__init(t,e){return this.bb_pos=t,this.bb=e,this}static getRootAsMessage(e,n){return(n||new t).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsMessage(e,n){return e.setPosition(e.position()+4),(n||new t).__init(e.readInt32(e.position())+e.position(),e)}version(){const t=this.bb.__offset(this.bb_pos,4)
14143
- return t?this.bb.readInt16(this.bb_pos+t):KH.V1}headerType(){const t=this.bb.__offset(this.bb_pos,6)
14144
- return t?this.bb.readUint8(this.bb_pos+t):HU.NONE}header(t){const e=this.bb.__offset(this.bb_pos,8)
14140
+ for(const t of[r,...(null===(s=null==r?void 0:r.dictionary)||void 0===s?void 0:s.data)||[]])QG(o.children,null==t?void 0:t.children,n)
14141
+ if($q.isDictionary(o)){const{id:t}=o
14142
+ if(n.has(t)){if(n.get(t)!==r.dictionary)throw new Error("Cannot create Schema containing two different dictionaries with the same Id")}else(null==r?void 0:r.dictionary)&&n.set(t,r.dictionary)}}return n}KG=Symbol.toStringTag,XG[KG]=(t=>(t._nullCount=-1,t[Symbol.isConcatSpreadable]=!0,"RecordBatch"))(XG.prototype)
14143
+ class tZ extends XG{constructor(t){const e=t.fields.map((t=>RW({type:t.type})))
14144
+ super(t,RW({type:new jq(t.fields),nullCount:0,children:e}))}}let eZ=class t{constructor(){this.bb=null,this.bb_pos=0}__init(t,e){return this.bb_pos=t,this.bb=e,this}static getRootAsMessage(e,n){return(n||new t).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsMessage(e,n){return e.setPosition(e.position()+4),(n||new t).__init(e.readInt32(e.position())+e.position(),e)}version(){const t=this.bb.__offset(this.bb_pos,4)
14145
+ return t?this.bb.readInt16(this.bb_pos+t):YH.V1}headerType(){const t=this.bb.__offset(this.bb_pos,6)
14146
+ return t?this.bb.readUint8(this.bb_pos+t):UU.NONE}header(t){const e=this.bb.__offset(this.bb_pos,8)
14145
14147
  return e?this.bb.__union(t,this.bb_pos+e):null}bodyLength(){const t=this.bb.__offset(this.bb_pos,10)
14146
14148
  return t?this.bb.readInt64(this.bb_pos+t):BigInt("0")}customMetadata(t,e){const n=this.bb.__offset(this.bb_pos,12)
14147
- return n?(e||new yU).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos+n)+4*t),this.bb):null}customMetadataLength(){const t=this.bb.__offset(this.bb_pos,12)
14148
- return t?this.bb.__vector_len(this.bb_pos+t):0}static startMessage(t){t.startObject(5)}static addVersion(t,e){t.addFieldInt16(0,e,KH.V1)}static addHeaderType(t,e){t.addFieldInt8(1,e,HU.NONE)}static addHeader(t,e){t.addFieldOffset(2,e,0)}static addBodyLength(t,e){t.addFieldInt64(3,e,BigInt("0"))}static addCustomMetadata(t,e){t.addFieldOffset(4,e,0)}static createCustomMetadataVector(t,e){t.startVector(4,e.length,4)
14149
+ return n?(e||new wU).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos+n)+4*t),this.bb):null}customMetadataLength(){const t=this.bb.__offset(this.bb_pos,12)
14150
+ return t?this.bb.__vector_len(this.bb_pos+t):0}static startMessage(t){t.startObject(5)}static addVersion(t,e){t.addFieldInt16(0,e,YH.V1)}static addHeaderType(t,e){t.addFieldInt8(1,e,UU.NONE)}static addHeader(t,e){t.addFieldOffset(2,e,0)}static addBodyLength(t,e){t.addFieldInt64(3,e,BigInt("0"))}static addCustomMetadata(t,e){t.addFieldOffset(4,e,0)}static createCustomMetadataVector(t,e){t.startVector(4,e.length,4)
14149
14151
  for(let n=e.length-1;n>=0;n--)t.addOffset(e[n])
14150
14152
  return t.endVector()}static startCustomMetadataVector(t,e){t.startVector(4,e,4)}static endMessage(t){return t.endObject()}static finishMessageBuffer(t,e){t.finish(e)}static finishSizePrefixedMessageBuffer(t,e){t.finish(e,void 0,!0)}static createMessage(e,n,i,s,o,r){return t.startMessage(e),t.addVersion(e,n),t.addHeaderType(e,i),t.addHeader(e,s),t.addBodyLength(e,o),t.addCustomMetadata(e,r),t.endMessage(e)}}
14151
- const eZ=new class extends Qq{visit(t,e){return null==t||null==e?void 0:super.visit(t,e)}visitNull(t,e){return OU.startNull(e),OU.endNull(e)}visitInt(t,e){return vU.startInt(e),vU.addBitWidth(e,t.bitWidth),vU.addIsSigned(e,t.isSigned),vU.endInt(e)}visitFloat(t,e){return MU.startFloatingPoint(e),MU.addPrecision(e,t.precision),MU.endFloatingPoint(e)}visitBinary(t,e){return wU.startBinary(e),wU.endBinary(e)}visitLargeBinary(t,e){return EU.startLargeBinary(e),EU.endLargeBinary(e)}visitBool(t,e){return xU.startBool(e),xU.endBool(e)}visitUtf8(t,e){return BU.startUtf8(e),BU.endUtf8(e)}visitLargeUtf8(t,e){return DU.startLargeUtf8(e),DU.endLargeUtf8(e)}visitDecimal(t,e){return kU.startDecimal(e),kU.addScale(e,t.scale),kU.addPrecision(e,t.precision),kU.addBitWidth(e,t.bitWidth),kU.endDecimal(e)}visitDate(t,e){return CU.startDate(e),CU.addUnit(e,t.unit),CU.endDate(e)}visitTime(t,e){return FU.startTime(e),FU.addUnit(e,t.unit),FU.addBitWidth(e,t.bitWidth),FU.endTime(e)}visitTimestamp(t,e){const n=t.timezone&&e.createString(t.timezone)||void 0
14152
- return NU.startTimestamp(e),NU.addUnit(e,t.unit),void 0!==n&&NU.addTimezone(e,n),NU.endTimestamp(e)}visitInterval(t,e){return $U.startInterval(e),$U.addUnit(e,t.unit),$U.endInterval(e)}visitDuration(t,e){return SU.startDuration(e),SU.addUnit(e,t.unit),SU.endDuration(e)}visitList(t,e){return AU.startList(e),AU.endList(e)}visitStruct(t,e){return RU.startStruct_(e),RU.endStruct_(e)}visitUnion(t,e){LU.startTypeIdsVector(e,t.typeIds.length)
14153
- const n=LU.createTypeIdsVector(e,t.typeIds)
14154
- return LU.startUnion(e),LU.addMode(e,t.mode),LU.addTypeIds(e,n),LU.endUnion(e)}visitDictionary(t,e){const n=this.visit(t.indices,e)
14155
- return bU.startDictionaryEncoding(e),bU.addId(e,BigInt(t.id)),bU.addIsOrdered(e,t.isOrdered),void 0!==n&&bU.addIndexType(e,n),bU.endDictionaryEncoding(e)}visitFixedSizeBinary(t,e){return _U.startFixedSizeBinary(e),_U.addByteWidth(e,t.byteWidth),_U.endFixedSizeBinary(e)}visitFixedSizeList(t,e){return IU.startFixedSizeList(e),IU.addListSize(e,t.listSize),IU.endFixedSizeList(e)}visitMap(t,e){return TU.startMap(e),TU.addKeysSorted(e,t.keysSorted),TU.endMap(e)}}
14156
- function nZ(t){return new uZ(t.count,sZ(t.columns),oZ(t.columns))}function iZ(t,e){return(t.children||[]).filter(Boolean).map((t=>oG.fromJSON(t,e)))}function sZ(t){return(t||[]).reduce(((t,e)=>{return[...t,new mZ(e.count,(n=e.VALIDITY,(n||[]).reduce(((t,e)=>t+ +(0===e)),0))),...sZ(e.children)]
14157
- var n}),[])}function oZ(t,e=[]){for(let n=-1,i=(t||[]).length;++n<i;){const i=t[n]
14158
- i.VALIDITY&&e.push(new fZ(e.length,i.VALIDITY.length)),i.TYPE_ID&&e.push(new fZ(e.length,i.TYPE_ID.length)),i.OFFSET&&e.push(new fZ(e.length,i.OFFSET.length)),i.DATA&&e.push(new fZ(e.length,i.DATA.length)),e=oZ(i.children,e)}return e}function rZ(t=[]){return new Map(t.map((({key:t,value:e})=>[t,e])))}function aZ(t){return new Eq(t.isSigned,t.bitWidth)}function lZ(t,e){const n=t.type.name
14159
- switch(n){case"NONE":case"null":return new $q
14160
- case"binary":return new Tq
14161
- case"largebinary":return new Oq
14162
- case"utf8":return new Rq
14163
- case"largeutf8":return new Fq
14164
- case"bool":return new Nq
14165
- case"list":return new Uq((e||[])[0])
14166
- case"struct":case"struct_":return new qq(e||[])}switch(n){case"int":{const e=t.type
14167
- return new Eq(e.isSigned,e.bitWidth)}case"floatingpoint":{const e=t.type
14168
- return new Aq(XH[e.precision])}case"decimal":{const e=t.type
14169
- return new Lq(e.scale,e.precision,e.bitWidth)}case"date":{const e=t.type
14170
- return new Bq(JH[e.unit])}case"time":{const e=t.type
14171
- return new Pq(QH[e.unit],e.bitWidth)}case"timestamp":{const e=t.type
14172
- return new zq(QH[e.unit],e.timezone)}case"interval":{const e=t.type
14173
- return new Vq(tU[e.unit])}case"duration":{const e=t.type
14174
- return new Hq(QH[e.unit])}case"union":{const n=t.type,[i,...s]=(n.mode+"").toLowerCase(),o=i.toUpperCase()+s.join("")
14175
- return new jq(YH[o],n.typeIds||[],e||[])}case"fixedsizebinary":{const e=t.type
14176
- return new Wq(e.byteWidth)}case"fixedsizelist":{const n=t.type
14177
- return new Gq(n.listSize,(e||[])[0])}case"map":{const n=t.type
14178
- return new Zq((e||[])[0],n.keysSorted)}}throw new Error(`Unrecognized type: "${n}"`)}var cZ=aU,dZ=rU
14179
- class hZ{static fromJSON(t,e){const n=new hZ(0,KH.V5,e)
14180
- return n._createHeader=function(t,e){return()=>{switch(e){case HU.Schema:return sG.fromJSON(t)
14181
- case HU.RecordBatch:return uZ.fromJSON(t)
14182
- case HU.DictionaryBatch:return pZ.fromJSON(t)}throw new Error(`Unrecognized Message type: { name: ${HU[e]}, type: ${e} }`)}}(t,e),n}static decode(t){t=new dZ(zH(t))
14183
- const e=tZ.getRootAsMessage(t),n=e.bodyLength(),i=e.version(),s=e.headerType(),o=new hZ(n,i,s)
14184
- return o._createHeader=function(t,e){return()=>{switch(e){case HU.Schema:return sG.decode(t.header(new VU),new Map,t.version())
14185
- case HU.RecordBatch:return uZ.decode(t.header(new pU),t.version())
14186
- case HU.DictionaryBatch:return pZ.decode(t.header(new fU),t.version())}throw new Error(`Unrecognized Message type: { name: ${HU[e]}, type: ${e} }`)}}(e,s),o}static encode(t){const e=new cZ
14153
+ const nZ=new class extends tj{visit(t,e){return null==t||null==e?void 0:super.visit(t,e)}visitNull(t,e){return RU.startNull(e),RU.endNull(e)}visitInt(t,e){return bU.startInt(e),bU.addBitWidth(e,t.bitWidth),bU.addIsSigned(e,t.isSigned),bU.endInt(e)}visitFloat(t,e){return $U.startFloatingPoint(e),$U.addPrecision(e,t.precision),$U.endFloatingPoint(e)}visitBinary(t,e){return xU.startBinary(e),xU.endBinary(e)}visitLargeBinary(t,e){return DU.startLargeBinary(e),DU.endLargeBinary(e)}visitBool(t,e){return CU.startBool(e),CU.endBool(e)}visitUtf8(t,e){return PU.startUtf8(e),PU.endUtf8(e)}visitLargeUtf8(t,e){return AU.startLargeUtf8(e),AU.endLargeUtf8(e)}visitDecimal(t,e){return SU.startDecimal(e),SU.addScale(e,t.scale),SU.addPrecision(e,t.precision),SU.addBitWidth(e,t.bitWidth),SU.endDecimal(e)}visitDate(t,e){return kU.startDate(e),kU.addUnit(e,t.unit),kU.endDate(e)}visitTime(t,e){return NU.startTime(e),NU.addUnit(e,t.unit),NU.addBitWidth(e,t.bitWidth),NU.endTime(e)}visitTimestamp(t,e){const n=t.timezone&&e.createString(t.timezone)||void 0
14154
+ return LU.startTimestamp(e),LU.addUnit(e,t.unit),void 0!==n&&LU.addTimezone(e,n),LU.endTimestamp(e)}visitInterval(t,e){return EU.startInterval(e),EU.addUnit(e,t.unit),EU.endInterval(e)}visitDuration(t,e){return _U.startDuration(e),_U.addUnit(e,t.unit),_U.endDuration(e)}visitList(t,e){return TU.startList(e),TU.endList(e)}visitStruct(t,e){return FU.startStruct_(e),FU.endStruct_(e)}visitUnion(t,e){BU.startTypeIdsVector(e,t.typeIds.length)
14155
+ const n=BU.createTypeIdsVector(e,t.typeIds)
14156
+ return BU.startUnion(e),BU.addMode(e,t.mode),BU.addTypeIds(e,n),BU.endUnion(e)}visitDictionary(t,e){const n=this.visit(t.indices,e)
14157
+ return yU.startDictionaryEncoding(e),yU.addId(e,BigInt(t.id)),yU.addIsOrdered(e,t.isOrdered),void 0!==n&&yU.addIndexType(e,n),yU.endDictionaryEncoding(e)}visitFixedSizeBinary(t,e){return IU.startFixedSizeBinary(e),IU.addByteWidth(e,t.byteWidth),IU.endFixedSizeBinary(e)}visitFixedSizeList(t,e){return MU.startFixedSizeList(e),MU.addListSize(e,t.listSize),MU.endFixedSizeList(e)}visitMap(t,e){return OU.startMap(e),OU.addKeysSorted(e,t.keysSorted),OU.endMap(e)}}
14158
+ function iZ(t){return new pZ(t.count,oZ(t.columns),rZ(t.columns))}function sZ(t,e){return(t.children||[]).filter(Boolean).map((t=>rG.fromJSON(t,e)))}function oZ(t){return(t||[]).reduce(((t,e)=>{return[...t,new gZ(e.count,(n=e.VALIDITY,(n||[]).reduce(((t,e)=>t+ +(0===e)),0))),...oZ(e.children)]
14159
+ var n}),[])}function rZ(t,e=[]){for(let n=-1,i=(t||[]).length;++n<i;){const i=t[n]
14160
+ i.VALIDITY&&e.push(new mZ(e.length,i.VALIDITY.length)),i.TYPE_ID&&e.push(new mZ(e.length,i.TYPE_ID.length)),i.OFFSET&&e.push(new mZ(e.length,i.OFFSET.length)),i.DATA&&e.push(new mZ(e.length,i.DATA.length)),e=rZ(i.children,e)}return e}function aZ(t=[]){return new Map(t.map((({key:t,value:e})=>[t,e])))}function lZ(t){return new Dq(t.isSigned,t.bitWidth)}function cZ(t,e){const n=t.type.name
14161
+ switch(n){case"NONE":case"null":return new Eq
14162
+ case"binary":return new Oq
14163
+ case"largebinary":return new Rq
14164
+ case"utf8":return new Fq
14165
+ case"largeutf8":return new Nq
14166
+ case"bool":return new Lq
14167
+ case"list":return new qq((e||[])[0])
14168
+ case"struct":case"struct_":return new jq(e||[])}switch(n){case"int":{const e=t.type
14169
+ return new Dq(e.isSigned,e.bitWidth)}case"floatingpoint":{const e=t.type
14170
+ return new Tq(JH[e.precision])}case"decimal":{const e=t.type
14171
+ return new Bq(e.scale,e.precision,e.bitWidth)}case"date":{const e=t.type
14172
+ return new Pq(QH[e.unit])}case"time":{const e=t.type
14173
+ return new zq(tU[e.unit],e.bitWidth)}case"timestamp":{const e=t.type
14174
+ return new Vq(tU[e.unit],e.timezone)}case"interval":{const e=t.type
14175
+ return new Hq(eU[e.unit])}case"duration":{const e=t.type
14176
+ return new Uq(tU[e.unit])}case"union":{const n=t.type,[i,...s]=(n.mode+"").toLowerCase(),o=i.toUpperCase()+s.join("")
14177
+ return new Wq(XH[o],n.typeIds||[],e||[])}case"fixedsizebinary":{const e=t.type
14178
+ return new Gq(e.byteWidth)}case"fixedsizelist":{const n=t.type
14179
+ return new Zq(n.listSize,(e||[])[0])}case"map":{const n=t.type
14180
+ return new Kq((e||[])[0],n.keysSorted)}}throw new Error(`Unrecognized type: "${n}"`)}var dZ=lU,hZ=aU
14181
+ class uZ{static fromJSON(t,e){const n=new uZ(0,YH.V5,e)
14182
+ return n._createHeader=function(t,e){return()=>{switch(e){case UU.Schema:return oG.fromJSON(t)
14183
+ case UU.RecordBatch:return pZ.fromJSON(t)
14184
+ case UU.DictionaryBatch:return fZ.fromJSON(t)}throw new Error(`Unrecognized Message type: { name: ${UU[e]}, type: ${e} }`)}}(t,e),n}static decode(t){t=new hZ(VH(t))
14185
+ const e=eZ.getRootAsMessage(t),n=e.bodyLength(),i=e.version(),s=e.headerType(),o=new uZ(n,i,s)
14186
+ return o._createHeader=function(t,e){return()=>{switch(e){case UU.Schema:return oG.decode(t.header(new HU),new Map,t.version())
14187
+ case UU.RecordBatch:return pZ.decode(t.header(new fU),t.version())
14188
+ case UU.DictionaryBatch:return fZ.decode(t.header(new mU),t.version())}throw new Error(`Unrecognized Message type: { name: ${UU[e]}, type: ${e} }`)}}(e,s),o}static encode(t){const e=new dZ
14187
14189
  let n=-1
14188
- return t.isSchema()?n=sG.encode(e,t.header()):t.isRecordBatch()?n=uZ.encode(e,t.header()):t.isDictionaryBatch()&&(n=pZ.encode(e,t.header())),tZ.startMessage(e),tZ.addVersion(e,KH.V5),tZ.addHeader(e,n),tZ.addHeaderType(e,t.headerType),tZ.addBodyLength(e,BigInt(t.bodyLength)),tZ.finishMessageBuffer(e,tZ.endMessage(e)),e.asUint8Array()}static from(t,e=0){if(t instanceof sG)return new hZ(0,KH.V5,HU.Schema,t)
14189
- if(t instanceof uZ)return new hZ(e,KH.V5,HU.RecordBatch,t)
14190
- if(t instanceof pZ)return new hZ(e,KH.V5,HU.DictionaryBatch,t)
14191
- throw new Error(`Unrecognized Message header: ${t}`)}get type(){return this.headerType}get version(){return this._version}get headerType(){return this._headerType}get bodyLength(){return this._bodyLength}header(){return this._createHeader()}isSchema(){return this.headerType===HU.Schema}isRecordBatch(){return this.headerType===HU.RecordBatch}isDictionaryBatch(){return this.headerType===HU.DictionaryBatch}constructor(t,e,n,i){this._version=e,this._headerType=n,this.body=new Uint8Array(0),i&&(this._createHeader=()=>i),this._bodyLength=WU(t)}}class uZ{get nodes(){return this._nodes}get length(){return this._length}get buffers(){return this._buffers}constructor(t,e,n){this._nodes=e,this._buffers=n,this._length=WU(t)}}class pZ{get id(){return this._id}get data(){return this._data}get isDelta(){return this._isDelta}get length(){return this.data.length}get nodes(){return this.data.nodes}get buffers(){return this.data.buffers}constructor(t,e,n=!1){this._data=t,this._isDelta=n,this._id=WU(e)}}class fZ{constructor(t,e){this.offset=WU(t),this.length=WU(e)}}class mZ{constructor(t,e){this.length=WU(t),this.nullCount=WU(e)}}function gZ(t,e){const n=[]
14192
- for(let i,s=-1,o=-1,r=t.childrenLength();++s<r;)(i=t.children(s))&&(n[++o]=oG.decode(i,e))
14193
- return n}function vZ(t){const e=new Map
14190
+ return t.isSchema()?n=oG.encode(e,t.header()):t.isRecordBatch()?n=pZ.encode(e,t.header()):t.isDictionaryBatch()&&(n=fZ.encode(e,t.header())),eZ.startMessage(e),eZ.addVersion(e,YH.V5),eZ.addHeader(e,n),eZ.addHeaderType(e,t.headerType),eZ.addBodyLength(e,BigInt(t.bodyLength)),eZ.finishMessageBuffer(e,eZ.endMessage(e)),e.asUint8Array()}static from(t,e=0){if(t instanceof oG)return new uZ(0,YH.V5,UU.Schema,t)
14191
+ if(t instanceof pZ)return new uZ(e,YH.V5,UU.RecordBatch,t)
14192
+ if(t instanceof fZ)return new uZ(e,YH.V5,UU.DictionaryBatch,t)
14193
+ throw new Error(`Unrecognized Message header: ${t}`)}get type(){return this.headerType}get version(){return this._version}get headerType(){return this._headerType}get bodyLength(){return this._bodyLength}header(){return this._createHeader()}isSchema(){return this.headerType===UU.Schema}isRecordBatch(){return this.headerType===UU.RecordBatch}isDictionaryBatch(){return this.headerType===UU.DictionaryBatch}constructor(t,e,n,i){this._version=e,this._headerType=n,this.body=new Uint8Array(0),i&&(this._createHeader=()=>i),this._bodyLength=GU(t)}}class pZ{get nodes(){return this._nodes}get length(){return this._length}get buffers(){return this._buffers}constructor(t,e,n){this._nodes=e,this._buffers=n,this._length=GU(t)}}class fZ{get id(){return this._id}get data(){return this._data}get isDelta(){return this._isDelta}get length(){return this.data.length}get nodes(){return this.data.nodes}get buffers(){return this.data.buffers}constructor(t,e,n=!1){this._data=t,this._isDelta=n,this._id=GU(e)}}class mZ{constructor(t,e){this.offset=GU(t),this.length=GU(e)}}class gZ{constructor(t,e){this.length=GU(t),this.nullCount=GU(e)}}function vZ(t,e){const n=[]
14194
+ for(let i,s=-1,o=-1,r=t.childrenLength();++s<r;)(i=t.children(s))&&(n[++o]=rG.decode(i,e))
14195
+ return n}function bZ(t){const e=new Map
14194
14196
  if(t)for(let n,i,s=-1,o=Math.trunc(t.customMetadataLength());++s<o;)(n=t.customMetadata(s))&&null!=(i=n.key())&&e.set(i,n.value())
14195
- return e}function bZ(t){return new Eq(t.isSigned(),t.bitWidth())}function yZ(t,e){const n=t.typeType()
14196
- switch(n){case PU.NONE:case PU.Null:return new $q
14197
- case PU.Binary:return new Tq
14198
- case PU.LargeBinary:return new Oq
14199
- case PU.Utf8:return new Rq
14200
- case PU.LargeUtf8:return new Fq
14201
- case PU.Bool:return new Nq
14202
- case PU.List:return new Uq((e||[])[0])
14203
- case PU.Struct_:return new qq(e||[])}switch(n){case PU.Int:{const e=t.type(new vU)
14204
- return new Eq(e.isSigned(),e.bitWidth())}case PU.FloatingPoint:{const e=t.type(new MU)
14205
- return new Aq(e.precision())}case PU.Decimal:{const e=t.type(new kU)
14206
- return new Lq(e.scale(),e.precision(),e.bitWidth())}case PU.Date:{const e=t.type(new CU)
14207
- return new Bq(e.unit())}case PU.Time:{const e=t.type(new FU)
14208
- return new Pq(e.unit(),e.bitWidth())}case PU.Timestamp:{const e=t.type(new NU)
14209
- return new zq(e.unit(),e.timezone())}case PU.Interval:{const e=t.type(new $U)
14210
- return new Vq(e.unit())}case PU.Duration:{const e=t.type(new SU)
14211
- return new Hq(e.unit())}case PU.Union:{const n=t.type(new LU)
14212
- return new jq(n.mode(),n.typeIdsArray()||[],e||[])}case PU.FixedSizeBinary:{const e=t.type(new _U)
14213
- return new Wq(e.byteWidth())}case PU.FixedSizeList:{const n=t.type(new IU)
14214
- return new Gq(n.listSize(),(e||[])[0])}case PU.Map:{const n=t.type(new TU)
14215
- return new Zq((e||[])[0],n.keysSorted())}}throw new Error(`Unrecognized type: "${PU[n]}" (${n})`)}oG.encode=function(t,e){let n=-1,i=-1,s=-1
14197
+ return e}function yZ(t){return new Dq(t.isSigned(),t.bitWidth())}function wZ(t,e){const n=t.typeType()
14198
+ switch(n){case zU.NONE:case zU.Null:return new Eq
14199
+ case zU.Binary:return new Oq
14200
+ case zU.LargeBinary:return new Rq
14201
+ case zU.Utf8:return new Fq
14202
+ case zU.LargeUtf8:return new Nq
14203
+ case zU.Bool:return new Lq
14204
+ case zU.List:return new qq((e||[])[0])
14205
+ case zU.Struct_:return new jq(e||[])}switch(n){case zU.Int:{const e=t.type(new bU)
14206
+ return new Dq(e.isSigned(),e.bitWidth())}case zU.FloatingPoint:{const e=t.type(new $U)
14207
+ return new Tq(e.precision())}case zU.Decimal:{const e=t.type(new SU)
14208
+ return new Bq(e.scale(),e.precision(),e.bitWidth())}case zU.Date:{const e=t.type(new kU)
14209
+ return new Pq(e.unit())}case zU.Time:{const e=t.type(new NU)
14210
+ return new zq(e.unit(),e.bitWidth())}case zU.Timestamp:{const e=t.type(new LU)
14211
+ return new Vq(e.unit(),e.timezone())}case zU.Interval:{const e=t.type(new EU)
14212
+ return new Hq(e.unit())}case zU.Duration:{const e=t.type(new _U)
14213
+ return new Uq(e.unit())}case zU.Union:{const n=t.type(new BU)
14214
+ return new Wq(n.mode(),n.typeIdsArray()||[],e||[])}case zU.FixedSizeBinary:{const e=t.type(new IU)
14215
+ return new Gq(e.byteWidth())}case zU.FixedSizeList:{const n=t.type(new MU)
14216
+ return new Zq(n.listSize(),(e||[])[0])}case zU.Map:{const n=t.type(new OU)
14217
+ return new Kq((e||[])[0],n.keysSorted())}}throw new Error(`Unrecognized type: "${zU[n]}" (${n})`)}rG.encode=function(t,e){let n=-1,i=-1,s=-1
14216
14218
  const o=e.type
14217
14219
  let r=e.typeId
14218
- Mq.isDictionary(o)?(r=o.dictionary.typeId,s=eZ.visit(o,t),i=eZ.visit(o.dictionary,t)):i=eZ.visit(o,t)
14219
- const a=(o.children||[]).map((e=>oG.encode(t,e))),l=zU.createChildrenVector(t,a),c=e.metadata&&e.metadata.size>0?zU.createCustomMetadataVector(t,[...e.metadata].map((([e,n])=>{const i=t.createString(`${e}`),s=t.createString(`${n}`)
14220
- return yU.startKeyValue(t),yU.addKey(t,i),yU.addValue(t,s),yU.endKeyValue(t)}))):-1
14220
+ $q.isDictionary(o)?(r=o.dictionary.typeId,s=nZ.visit(o,t),i=nZ.visit(o.dictionary,t)):i=nZ.visit(o,t)
14221
+ const a=(o.children||[]).map((e=>rG.encode(t,e))),l=VU.createChildrenVector(t,a),c=e.metadata&&e.metadata.size>0?VU.createCustomMetadataVector(t,[...e.metadata].map((([e,n])=>{const i=t.createString(`${e}`),s=t.createString(`${n}`)
14222
+ return wU.startKeyValue(t),wU.addKey(t,i),wU.addValue(t,s),wU.endKeyValue(t)}))):-1
14221
14223
  e.name&&(n=t.createString(e.name))
14222
- zU.startField(t),zU.addType(t,i),zU.addTypeType(t,r),zU.addChildren(t,l),zU.addNullable(t,!!e.nullable),-1!==n&&zU.addName(t,n);-1!==s&&zU.addDictionary(t,s);-1!==c&&zU.addCustomMetadata(t,c)
14223
- return zU.endField(t)},oG.decode=function(t,e){let n,i,s,o,r,a
14224
- e&&(a=t.dictionary())?e.has(n=WU(a.id()))?(o=(o=a.indexType())?bZ(o):new Dq,r=new Xq(e.get(n),o,n,a.isOrdered()),i=new oG(t.name(),r,t.nullable(),vZ(t))):(o=(o=a.indexType())?bZ(o):new Dq,e.set(n,s=yZ(t,gZ(t,e))),r=new Xq(s,o,n,a.isOrdered()),i=new oG(t.name(),r,t.nullable(),vZ(t))):(s=yZ(t,gZ(t,e)),i=new oG(t.name(),s,t.nullable(),vZ(t)))
14225
- return i||null},oG.fromJSON=function(t,e){let n,i,s,o,r,a
14226
- return e&&(o=t.dictionary)?e.has(n=o.id)?(i=(i=o.indexType)?aZ(i):new Dq,a=new Xq(e.get(n),i,n,o.isOrdered),s=new oG(t.name,a,t.nullable,rZ(t.metadata))):(i=(i=o.indexType)?aZ(i):new Dq,e.set(n,r=lZ(t,iZ(t,e))),a=new Xq(r,i,n,o.isOrdered),s=new oG(t.name,a,t.nullable,rZ(t.metadata))):(r=lZ(t,iZ(t,e)),s=new oG(t.name,r,t.nullable,rZ(t.metadata))),s||null},sG.encode=function(t,e){const n=e.fields.map((e=>oG.encode(t,e)))
14227
- VU.startFieldsVector(t,n.length)
14228
- const i=VU.createFieldsVector(t,n),s=e.metadata&&e.metadata.size>0?VU.createCustomMetadataVector(t,[...e.metadata].map((([e,n])=>{const i=t.createString(`${e}`),s=t.createString(`${n}`)
14229
- return yU.startKeyValue(t),yU.addKey(t,i),yU.addValue(t,s),yU.endKeyValue(t)}))):-1
14230
- VU.startSchema(t),VU.addFields(t,i),VU.addEndianness(t,wZ?mU.Little:mU.Big),-1!==s&&VU.addCustomMetadata(t,s)
14231
- return VU.endSchema(t)},sG.decode=function(t,e=new Map,n=KH.V5){const i=function(t,e){const n=[]
14232
- for(let i,s=-1,o=-1,r=t.fieldsLength();++s<r;)(i=t.fields(s))&&(n[++o]=oG.decode(i,e))
14224
+ VU.startField(t),VU.addType(t,i),VU.addTypeType(t,r),VU.addChildren(t,l),VU.addNullable(t,!!e.nullable),-1!==n&&VU.addName(t,n);-1!==s&&VU.addDictionary(t,s);-1!==c&&VU.addCustomMetadata(t,c)
14225
+ return VU.endField(t)},rG.decode=function(t,e){let n,i,s,o,r,a
14226
+ e&&(a=t.dictionary())?e.has(n=GU(a.id()))?(o=(o=a.indexType())?yZ(o):new Aq,r=new Jq(e.get(n),o,n,a.isOrdered()),i=new rG(t.name(),r,t.nullable(),bZ(t))):(o=(o=a.indexType())?yZ(o):new Aq,e.set(n,s=wZ(t,vZ(t,e))),r=new Jq(s,o,n,a.isOrdered()),i=new rG(t.name(),r,t.nullable(),bZ(t))):(s=wZ(t,vZ(t,e)),i=new rG(t.name(),s,t.nullable(),bZ(t)))
14227
+ return i||null},rG.fromJSON=function(t,e){let n,i,s,o,r,a
14228
+ return e&&(o=t.dictionary)?e.has(n=o.id)?(i=(i=o.indexType)?lZ(i):new Aq,a=new Jq(e.get(n),i,n,o.isOrdered),s=new rG(t.name,a,t.nullable,aZ(t.metadata))):(i=(i=o.indexType)?lZ(i):new Aq,e.set(n,r=cZ(t,sZ(t,e))),a=new Jq(r,i,n,o.isOrdered),s=new rG(t.name,a,t.nullable,aZ(t.metadata))):(r=cZ(t,sZ(t,e)),s=new rG(t.name,r,t.nullable,aZ(t.metadata))),s||null},oG.encode=function(t,e){const n=e.fields.map((e=>rG.encode(t,e)))
14229
+ HU.startFieldsVector(t,n.length)
14230
+ const i=HU.createFieldsVector(t,n),s=e.metadata&&e.metadata.size>0?HU.createCustomMetadataVector(t,[...e.metadata].map((([e,n])=>{const i=t.createString(`${e}`),s=t.createString(`${n}`)
14231
+ return wU.startKeyValue(t),wU.addKey(t,i),wU.addValue(t,s),wU.endKeyValue(t)}))):-1
14232
+ HU.startSchema(t),HU.addFields(t,i),HU.addEndianness(t,xZ?gU.Little:gU.Big),-1!==s&&HU.addCustomMetadata(t,s)
14233
+ return HU.endSchema(t)},oG.decode=function(t,e=new Map,n=YH.V5){const i=function(t,e){const n=[]
14234
+ for(let i,s=-1,o=-1,r=t.fieldsLength();++s<r;)(i=t.fields(s))&&(n[++o]=rG.decode(i,e))
14233
14235
  return n}(t,e)
14234
- return new sG(i,vZ(t),e,n)},sG.fromJSON=function(t,e=new Map){return new sG(function(t,e){return(t.fields||[]).filter(Boolean).map((t=>oG.fromJSON(t,e)))}(t,e),rZ(t.metadata),e)},uZ.encode=function(t,e){const n=e.nodes||[],i=e.buffers||[]
14235
- pU.startNodesVector(t,n.length)
14236
- for(const e of n.slice().reverse())mZ.encode(t,e)
14236
+ return new oG(i,bZ(t),e,n)},oG.fromJSON=function(t,e=new Map){return new oG(function(t,e){return(t.fields||[]).filter(Boolean).map((t=>rG.fromJSON(t,e)))}(t,e),aZ(t.metadata),e)},pZ.encode=function(t,e){const n=e.nodes||[],i=e.buffers||[]
14237
+ fU.startNodesVector(t,n.length)
14238
+ for(const e of n.slice().reverse())gZ.encode(t,e)
14237
14239
  const s=t.endVector()
14238
- pU.startBuffersVector(t,i.length)
14239
- for(const e of i.slice().reverse())fZ.encode(t,e)
14240
+ fU.startBuffersVector(t,i.length)
14241
+ for(const e of i.slice().reverse())mZ.encode(t,e)
14240
14242
  const o=t.endVector()
14241
- return pU.startRecordBatch(t),pU.addLength(t,BigInt(e.length)),pU.addNodes(t,s),pU.addBuffers(t,o),pU.endRecordBatch(t)},uZ.decode=function(t,e=KH.V5){if(null!==t.compression())throw new Error("Record batch compression not implemented")
14242
- return new uZ(t.length(),function(t){const e=[]
14243
- for(let n,i=-1,s=-1,o=t.nodesLength();++i<o;)(n=t.nodes(i))&&(e[++s]=mZ.decode(n))
14243
+ return fU.startRecordBatch(t),fU.addLength(t,BigInt(e.length)),fU.addNodes(t,s),fU.addBuffers(t,o),fU.endRecordBatch(t)},pZ.decode=function(t,e=YH.V5){if(null!==t.compression())throw new Error("Record batch compression not implemented")
14244
+ return new pZ(t.length(),function(t){const e=[]
14245
+ for(let n,i=-1,s=-1,o=t.nodesLength();++i<o;)(n=t.nodes(i))&&(e[++s]=gZ.decode(n))
14244
14246
  return e}(t),function(t,e){const n=[]
14245
- for(let i,s=-1,o=-1,r=t.buffersLength();++s<r;)(i=t.buffers(s))&&(e<KH.V4&&(i.bb_pos+=8*(s+1)),n[++o]=fZ.decode(i))
14246
- return n}(t,e))},uZ.fromJSON=nZ,pZ.encode=function(t,e){const n=uZ.encode(t,e.data)
14247
- return fU.startDictionaryBatch(t),fU.addId(t,BigInt(e.id)),fU.addIsDelta(t,e.isDelta),fU.addData(t,n),fU.endDictionaryBatch(t)},pZ.decode=function(t,e=KH.V5){return new pZ(uZ.decode(t.data(),e),t.id(),t.isDelta())},pZ.fromJSON=function(t){return new pZ(nZ(t.data),t.id,t.isDelta)},mZ.encode=function(t,e){return uU.createFieldNode(t,BigInt(e.length),BigInt(e.nullCount))},mZ.decode=function(t){return new mZ(t.length(),t.nullCount())},fZ.encode=function(t,e){return hU.createBuffer(t,BigInt(e.offset),BigInt(e.length))},fZ.decode=function(t){return new fZ(t.offset(),t.length())}
14248
- const wZ=(()=>{const t=new ArrayBuffer(2)
14249
- return new DataView(t).setInt16(0,256,!0),256===new Int16Array(t)[0]})(),xZ=t=>`Expected ${HU[t]} Message in stream, but was null or length 0.`,CZ=t=>`Header pointer of flatbuffer-encoded ${HU[t]} Message is null or length 0.`,kZ=(t,e)=>`Expected to read ${t} metadata bytes, but only read ${e}.`,SZ=(t,e)=>`Expected to read ${t} bytes for message body, but only read ${e}.`
14250
- class _Z{constructor(t){this.source=t instanceof bG?t:new bG(t)}[Symbol.iterator](){return this}next(){let t
14251
- return(t=this.readMetadataLength()).done||-1===t.value&&(t=this.readMetadataLength()).done||(t=this.readMetadata(t.value)).done?pG:t}throw(t){return this.source.throw(t)}return(t){return this.source.return(t)}readMessage(t){let e
14247
+ for(let i,s=-1,o=-1,r=t.buffersLength();++s<r;)(i=t.buffers(s))&&(e<YH.V4&&(i.bb_pos+=8*(s+1)),n[++o]=mZ.decode(i))
14248
+ return n}(t,e))},pZ.fromJSON=iZ,fZ.encode=function(t,e){const n=pZ.encode(t,e.data)
14249
+ return mU.startDictionaryBatch(t),mU.addId(t,BigInt(e.id)),mU.addIsDelta(t,e.isDelta),mU.addData(t,n),mU.endDictionaryBatch(t)},fZ.decode=function(t,e=YH.V5){return new fZ(pZ.decode(t.data(),e),t.id(),t.isDelta())},fZ.fromJSON=function(t){return new fZ(iZ(t.data),t.id,t.isDelta)},gZ.encode=function(t,e){return pU.createFieldNode(t,BigInt(e.length),BigInt(e.nullCount))},gZ.decode=function(t){return new gZ(t.length(),t.nullCount())},mZ.encode=function(t,e){return uU.createBuffer(t,BigInt(e.offset),BigInt(e.length))},mZ.decode=function(t){return new mZ(t.offset(),t.length())}
14250
+ const xZ=(()=>{const t=new ArrayBuffer(2)
14251
+ return new DataView(t).setInt16(0,256,!0),256===new Int16Array(t)[0]})(),CZ=t=>`Expected ${UU[t]} Message in stream, but was null or length 0.`,kZ=t=>`Header pointer of flatbuffer-encoded ${UU[t]} Message is null or length 0.`,SZ=(t,e)=>`Expected to read ${t} metadata bytes, but only read ${e}.`,_Z=(t,e)=>`Expected to read ${t} bytes for message body, but only read ${e}.`
14252
+ class IZ{constructor(t){this.source=t instanceof yG?t:new yG(t)}[Symbol.iterator](){return this}next(){let t
14253
+ return(t=this.readMetadataLength()).done||-1===t.value&&(t=this.readMetadataLength()).done||(t=this.readMetadata(t.value)).done?fG:t}throw(t){return this.source.throw(t)}return(t){return this.source.return(t)}readMessage(t){let e
14252
14254
  if((e=this.next()).done)return null
14253
- if(null!=t&&e.value.headerType!==t)throw new Error(xZ(t))
14255
+ if(null!=t&&e.value.headerType!==t)throw new Error(CZ(t))
14254
14256
  return e.value}readMessageBody(t){if(t<=0)return new Uint8Array(0)
14255
- const e=zH(this.source.read(t))
14256
- if(e.byteLength<t)throw new Error(SZ(t,e.byteLength))
14257
- return e.byteOffset%8==0&&e.byteOffset+e.byteLength<=e.buffer.byteLength?e:e.slice()}readSchema(t=!1){const e=HU.Schema,n=this.readMessage(e),i=null==n?void 0:n.header()
14258
- if(t&&!i)throw new Error(CZ(e))
14259
- return i}readMetadataLength(){const t=this.source.read($Z),e=t&&new rU(t),n=(null==e?void 0:e.readInt32(0))||0
14257
+ const e=VH(this.source.read(t))
14258
+ if(e.byteLength<t)throw new Error(_Z(t,e.byteLength))
14259
+ return e.byteOffset%8==0&&e.byteOffset+e.byteLength<=e.buffer.byteLength?e:e.slice()}readSchema(t=!1){const e=UU.Schema,n=this.readMessage(e),i=null==n?void 0:n.header()
14260
+ if(t&&!i)throw new Error(kZ(e))
14261
+ return i}readMetadataLength(){const t=this.source.read(EZ),e=t&&new aU(t),n=(null==e?void 0:e.readInt32(0))||0
14260
14262
  return{done:0===n,value:n}}readMetadata(t){const e=this.source.read(t)
14261
- if(!e)return pG
14262
- if(e.byteLength<t)throw new Error(kZ(t,e.byteLength))
14263
- return{done:!1,value:hZ.decode(e)}}}class IZ{constructor(t,e){this.source=t instanceof yG?t:$H(t)?new kG(t,e):new yG(t)}[Symbol.asyncIterator](){return this}next(){return e(this,void 0,void 0,(function*(){let t
14264
- return(t=yield this.readMetadataLength()).done||-1===t.value&&(t=yield this.readMetadataLength()).done||(t=yield this.readMetadata(t.value)).done?pG:t}))}throw(t){return e(this,void 0,void 0,(function*(){return yield this.source.throw(t)}))}return(t){return e(this,void 0,void 0,(function*(){return yield this.source.return(t)}))}readMessage(t){return e(this,void 0,void 0,(function*(){let e
14263
+ if(!e)return fG
14264
+ if(e.byteLength<t)throw new Error(SZ(t,e.byteLength))
14265
+ return{done:!1,value:uZ.decode(e)}}}class MZ{constructor(t,e){this.source=t instanceof wG?t:EH(t)?new SG(t,e):new wG(t)}[Symbol.asyncIterator](){return this}next(){return e(this,void 0,void 0,(function*(){let t
14266
+ return(t=yield this.readMetadataLength()).done||-1===t.value&&(t=yield this.readMetadataLength()).done||(t=yield this.readMetadata(t.value)).done?fG:t}))}throw(t){return e(this,void 0,void 0,(function*(){return yield this.source.throw(t)}))}return(t){return e(this,void 0,void 0,(function*(){return yield this.source.return(t)}))}readMessage(t){return e(this,void 0,void 0,(function*(){let e
14265
14267
  if((e=yield this.next()).done)return null
14266
- if(null!=t&&e.value.headerType!==t)throw new Error(xZ(t))
14268
+ if(null!=t&&e.value.headerType!==t)throw new Error(CZ(t))
14267
14269
  return e.value}))}readMessageBody(t){return e(this,void 0,void 0,(function*(){if(t<=0)return new Uint8Array(0)
14268
- const e=zH(yield this.source.read(t))
14269
- if(e.byteLength<t)throw new Error(SZ(t,e.byteLength))
14270
- return e.byteOffset%8==0&&e.byteOffset+e.byteLength<=e.buffer.byteLength?e:e.slice()}))}readSchema(){return e(this,arguments,void 0,(function*(t=!1){const e=HU.Schema,n=yield this.readMessage(e),i=null==n?void 0:n.header()
14271
- if(t&&!i)throw new Error(CZ(e))
14272
- return i}))}readMetadataLength(){return e(this,void 0,void 0,(function*(){const t=yield this.source.read($Z),e=t&&new rU(t),n=(null==e?void 0:e.readInt32(0))||0
14270
+ const e=VH(yield this.source.read(t))
14271
+ if(e.byteLength<t)throw new Error(_Z(t,e.byteLength))
14272
+ return e.byteOffset%8==0&&e.byteOffset+e.byteLength<=e.buffer.byteLength?e:e.slice()}))}readSchema(){return e(this,arguments,void 0,(function*(t=!1){const e=UU.Schema,n=yield this.readMessage(e),i=null==n?void 0:n.header()
14273
+ if(t&&!i)throw new Error(kZ(e))
14274
+ return i}))}readMetadataLength(){return e(this,void 0,void 0,(function*(){const t=yield this.source.read(EZ),e=t&&new aU(t),n=(null==e?void 0:e.readInt32(0))||0
14273
14275
  return{done:0===n,value:n}}))}readMetadata(t){return e(this,void 0,void 0,(function*(){const e=yield this.source.read(t)
14274
- if(!e)return pG
14275
- if(e.byteLength<t)throw new Error(kZ(t,e.byteLength))
14276
- return{done:!1,value:hZ.decode(e)}}))}}class MZ extends _Z{constructor(t){super(new Uint8Array(0)),this._schema=!1,this._body=[],this._batchIndex=0,this._dictionaryIndex=0,this._json=t instanceof fG?t:new fG(t)}next(){const{_json:t}=this
14276
+ if(!e)return fG
14277
+ if(e.byteLength<t)throw new Error(SZ(t,e.byteLength))
14278
+ return{done:!1,value:uZ.decode(e)}}))}}class $Z extends IZ{constructor(t){super(new Uint8Array(0)),this._schema=!1,this._body=[],this._batchIndex=0,this._dictionaryIndex=0,this._json=t instanceof mG?t:new mG(t)}next(){const{_json:t}=this
14277
14279
  if(!this._schema){this._schema=!0
14278
- return{done:!1,value:hZ.fromJSON(t.schema,HU.Schema)}}if(this._dictionaryIndex<t.dictionaries.length){const e=t.dictionaries[this._dictionaryIndex++]
14280
+ return{done:!1,value:uZ.fromJSON(t.schema,UU.Schema)}}if(this._dictionaryIndex<t.dictionaries.length){const e=t.dictionaries[this._dictionaryIndex++]
14279
14281
  this._body=e.data.columns
14280
- return{done:!1,value:hZ.fromJSON(e,HU.DictionaryBatch)}}if(this._batchIndex<t.batches.length){const e=t.batches[this._batchIndex++]
14282
+ return{done:!1,value:uZ.fromJSON(e,UU.DictionaryBatch)}}if(this._batchIndex<t.batches.length){const e=t.batches[this._batchIndex++]
14281
14283
  this._body=e.columns
14282
- return{done:!1,value:hZ.fromJSON(e,HU.RecordBatch)}}return this._body=[],pG}readMessageBody(t){return function t(e){return(e||[]).reduce(((e,n)=>[...e,...n.VALIDITY&&[n.VALIDITY]||[],...n.TYPE_ID&&[n.TYPE_ID]||[],...n.OFFSET&&[n.OFFSET]||[],...n.DATA&&[n.DATA]||[],...t(n.children)]),[])}(this._body)}readMessage(t){let e
14284
+ return{done:!1,value:uZ.fromJSON(e,UU.RecordBatch)}}return this._body=[],fG}readMessageBody(t){return function t(e){return(e||[]).reduce(((e,n)=>[...e,...n.VALIDITY&&[n.VALIDITY]||[],...n.TYPE_ID&&[n.TYPE_ID]||[],...n.OFFSET&&[n.OFFSET]||[],...n.DATA&&[n.DATA]||[],...t(n.children)]),[])}(this._body)}readMessage(t){let e
14283
14285
  if((e=this.next()).done)return null
14284
- if(null!=t&&e.value.headerType!==t)throw new Error(xZ(t))
14285
- return e.value}readSchema(){const t=HU.Schema,e=this.readMessage(t),n=null==e?void 0:e.header()
14286
- if(!e||!n)throw new Error(CZ(t))
14287
- return n}}const $Z=4,EZ="ARROW1",DZ=new Uint8Array(6)
14288
- for(let t=0;t<6;t+=1)DZ[t]=EZ.codePointAt(t)
14289
- function AZ(t,e=0){for(let n=-1,i=DZ.length;++n<i;)if(DZ[n]!==t[e+n])return!1
14290
- return!0}const TZ=DZ.length,OZ=TZ+$Z,RZ=2*TZ+$Z
14291
- class FZ extends mG{constructor(t){super(),this._impl=t}get closed(){return this._impl.closed}get schema(){return this._impl.schema}get autoDestroy(){return this._impl.autoDestroy}get dictionaries(){return this._impl.dictionaries}get numDictionaries(){return this._impl.numDictionaries}get numRecordBatches(){return this._impl.numRecordBatches}get footer(){return this._impl.isFile()?this._impl.footer:null}isSync(){return this._impl.isSync()}isAsync(){return this._impl.isAsync()}isFile(){return this._impl.isFile()}isStream(){return this._impl.isStream()}next(){return this._impl.next()}throw(t){return this._impl.throw(t)}return(t){return this._impl.return(t)}cancel(){return this._impl.cancel()}reset(t){return this._impl.reset(t),this._DOMStream=void 0,this._nodeStream=void 0,this}open(t){const e=this._impl.open(t)
14292
- return kH(e)?e.then((()=>this)):this}readRecordBatch(t){return this._impl.isFile()?this._impl.readRecordBatch(t):null}[Symbol.iterator](){return this._impl[Symbol.iterator]()}[Symbol.asyncIterator](){return this._impl[Symbol.asyncIterator]()}toDOMStream(){return jH.toDOMStream(this.isSync()?{[Symbol.iterator]:()=>this}:{[Symbol.asyncIterator]:()=>this})}toNodeStream(){return jH.toNodeStream(this.isSync()?{[Symbol.iterator]:()=>this}:{[Symbol.asyncIterator]:()=>this},{objectMode:!0})}static throughNode(t){throw new Error('"throughNode" not available in this environment')}static throughDOM(t,e){throw new Error('"throughDOM" not available in this environment')}static from(t){return t instanceof FZ?t:IH(t)?function(t){return new NZ(new jZ(t))}(t):$H(t)?function(t){return e(this,void 0,void 0,(function*(){const{size:e}=yield t.stat(),n=new kG(t,e)
14293
- return e>=RZ&&AZ(yield n.readAt(0,TZ+7&-8))?new PZ(new qZ(n)):new LZ(new HZ(n))}))}(t):kH(t)?(()=>e(this,void 0,void 0,(function*(){return yield FZ.from(yield t)})))():EH(t)||AH(t)||TH(t)||_H(t)?function(t){return e(this,void 0,void 0,(function*(){const e=yield t.peek(TZ+7&-8)
14294
- return e&&e.byteLength>=4?AZ(e)?new BZ(new UZ(yield t.read())):new LZ(new HZ(t)):new LZ(new HZ(function(){return s(this,arguments,(function*(){}))}()))}))}(new yG(t)):function(t){const e=t.peek(TZ+7&-8)
14295
- return e&&e.byteLength>=4?AZ(e)?new BZ(new UZ(t.read())):new NZ(new VZ(t)):new NZ(new VZ(function*(){}()))}(new bG(t))}static readAll(t){return t instanceof FZ?t.isSync()?GZ(t):ZZ(t):IH(t)||ArrayBuffer.isView(t)||SH(t)||MH(t)?GZ(t):ZZ(t)}}class NZ extends FZ{constructor(t){super(t),this._impl=t}readAll(){return[...this]}[Symbol.iterator](){return this._impl[Symbol.iterator]()}[Symbol.asyncIterator](){return s(this,arguments,(function*(){yield i(yield*o(r(this[Symbol.iterator]())))}))}}class LZ extends FZ{constructor(t){super(t),this._impl=t}readAll(){return e(this,void 0,void 0,(function*(){var t,e,n,i
14286
+ if(null!=t&&e.value.headerType!==t)throw new Error(CZ(t))
14287
+ return e.value}readSchema(){const t=UU.Schema,e=this.readMessage(t),n=null==e?void 0:e.header()
14288
+ if(!e||!n)throw new Error(kZ(t))
14289
+ return n}}const EZ=4,DZ="ARROW1",AZ=new Uint8Array(6)
14290
+ for(let t=0;t<6;t+=1)AZ[t]=DZ.codePointAt(t)
14291
+ function TZ(t,e=0){for(let n=-1,i=AZ.length;++n<i;)if(AZ[n]!==t[e+n])return!1
14292
+ return!0}const OZ=AZ.length,RZ=OZ+EZ,FZ=2*OZ+EZ
14293
+ class NZ extends gG{constructor(t){super(),this._impl=t}get closed(){return this._impl.closed}get schema(){return this._impl.schema}get autoDestroy(){return this._impl.autoDestroy}get dictionaries(){return this._impl.dictionaries}get numDictionaries(){return this._impl.numDictionaries}get numRecordBatches(){return this._impl.numRecordBatches}get footer(){return this._impl.isFile()?this._impl.footer:null}isSync(){return this._impl.isSync()}isAsync(){return this._impl.isAsync()}isFile(){return this._impl.isFile()}isStream(){return this._impl.isStream()}next(){return this._impl.next()}throw(t){return this._impl.throw(t)}return(t){return this._impl.return(t)}cancel(){return this._impl.cancel()}reset(t){return this._impl.reset(t),this._DOMStream=void 0,this._nodeStream=void 0,this}open(t){const e=this._impl.open(t)
14294
+ return SH(e)?e.then((()=>this)):this}readRecordBatch(t){return this._impl.isFile()?this._impl.readRecordBatch(t):null}[Symbol.iterator](){return this._impl[Symbol.iterator]()}[Symbol.asyncIterator](){return this._impl[Symbol.asyncIterator]()}toDOMStream(){return WH.toDOMStream(this.isSync()?{[Symbol.iterator]:()=>this}:{[Symbol.asyncIterator]:()=>this})}toNodeStream(){return WH.toNodeStream(this.isSync()?{[Symbol.iterator]:()=>this}:{[Symbol.asyncIterator]:()=>this},{objectMode:!0})}static throughNode(t){throw new Error('"throughNode" not available in this environment')}static throughDOM(t,e){throw new Error('"throughDOM" not available in this environment')}static from(t){return t instanceof NZ?t:MH(t)?function(t){return new LZ(new WZ(t))}(t):EH(t)?function(t){return e(this,void 0,void 0,(function*(){const{size:e}=yield t.stat(),n=new SG(t,e)
14295
+ return e>=FZ&&TZ(yield n.readAt(0,OZ+7&-8))?new zZ(new jZ(n)):new BZ(new UZ(n))}))}(t):SH(t)?(()=>e(this,void 0,void 0,(function*(){return yield NZ.from(yield t)})))():DH(t)||TH(t)||OH(t)||IH(t)?function(t){return e(this,void 0,void 0,(function*(){const e=yield t.peek(OZ+7&-8)
14296
+ return e&&e.byteLength>=4?TZ(e)?new PZ(new qZ(yield t.read())):new BZ(new UZ(t)):new BZ(new UZ(function(){return s(this,arguments,(function*(){}))}()))}))}(new wG(t)):function(t){const e=t.peek(OZ+7&-8)
14297
+ return e&&e.byteLength>=4?TZ(e)?new PZ(new qZ(t.read())):new LZ(new HZ(t)):new LZ(new HZ(function*(){}()))}(new yG(t))}static readAll(t){return t instanceof NZ?t.isSync()?ZZ(t):KZ(t):MH(t)||ArrayBuffer.isView(t)||_H(t)||$H(t)?ZZ(t):KZ(t)}}class LZ extends NZ{constructor(t){super(t),this._impl=t}readAll(){return[...this]}[Symbol.iterator](){return this._impl[Symbol.iterator]()}[Symbol.asyncIterator](){return s(this,arguments,(function*(){yield i(yield*o(r(this[Symbol.iterator]())))}))}}class BZ extends NZ{constructor(t){super(t),this._impl=t}readAll(){return e(this,void 0,void 0,(function*(){var t,e,n,i
14296
14298
  const s=new Array
14297
14299
  try{for(var o,a=!0,l=r(this);!(t=(o=yield l.next()).done);a=!0){i=o.value,a=!1
14298
14300
  const t=i
14299
- s.push(t)}}catch(t){e={error:t}}finally{try{a||t||!(n=l.return)||(yield n.call(l))}finally{if(e)throw e.error}}return s}))}[Symbol.iterator](){throw new Error("AsyncRecordBatchStreamReader is not Iterable")}[Symbol.asyncIterator](){return this._impl[Symbol.asyncIterator]()}}class BZ extends NZ{constructor(t){super(t),this._impl=t}}class PZ extends LZ{constructor(t){super(t),this._impl=t}}class zZ{get numDictionaries(){return this._dictionaryIndex}get numRecordBatches(){return this._recordBatchIndex}constructor(t=new Map){this.closed=!1,this.autoDestroy=!0,this._dictionaryIndex=0,this._recordBatchIndex=0,this.dictionaries=t}isSync(){return!1}isAsync(){return!1}isFile(){return!1}isStream(){return!1}reset(t){return this._dictionaryIndex=0,this._recordBatchIndex=0,this.schema=t,this.dictionaries=new Map,this}_loadRecordBatch(t,e){const n=this._loadVectors(t,e,this.schema.fields),i=OW({type:new qq(this.schema.fields),length:t.length,children:n})
14300
- return new YG(this.schema,i)}_loadDictionaryBatch(t,e){const{id:n,isDelta:i}=t,{dictionaries:s,schema:o}=this,r=s.get(n)
14301
+ s.push(t)}}catch(t){e={error:t}}finally{try{a||t||!(n=l.return)||(yield n.call(l))}finally{if(e)throw e.error}}return s}))}[Symbol.iterator](){throw new Error("AsyncRecordBatchStreamReader is not Iterable")}[Symbol.asyncIterator](){return this._impl[Symbol.asyncIterator]()}}class PZ extends LZ{constructor(t){super(t),this._impl=t}}class zZ extends BZ{constructor(t){super(t),this._impl=t}}class VZ{get numDictionaries(){return this._dictionaryIndex}get numRecordBatches(){return this._recordBatchIndex}constructor(t=new Map){this.closed=!1,this.autoDestroy=!0,this._dictionaryIndex=0,this._recordBatchIndex=0,this.dictionaries=t}isSync(){return!1}isAsync(){return!1}isFile(){return!1}isStream(){return!1}reset(t){return this._dictionaryIndex=0,this._recordBatchIndex=0,this.schema=t,this.dictionaries=new Map,this}_loadRecordBatch(t,e){const n=this._loadVectors(t,e,this.schema.fields),i=RW({type:new jq(this.schema.fields),length:t.length,children:n})
14302
+ return new XG(this.schema,i)}_loadDictionaryBatch(t,e){const{id:n,isDelta:i}=t,{dictionaries:s,schema:o}=this,r=s.get(n)
14301
14303
  if(i||!r){const s=o.dictionaries.get(n),a=this._loadVectors(t.data,e,[s])
14302
- return(r&&i?r.concat(new tG(a)):new tG(a)).memoize()}return r.memoize()}_loadVectors(t,e,n){return new DG(e,t.nodes,t.buffers,this.dictionaries,this.schema.metadataVersion).visitMany(n)}}class VZ extends zZ{constructor(t,e){super(e),this._reader=IH(t)?new MZ(this._handle=t):new _Z(this._handle=t)}isSync(){return!0}isStream(){return!0}[Symbol.iterator](){return this}cancel(){!this.closed&&(this.closed=!0)&&(this.reset()._reader.return(),this._reader=null,this.dictionaries=null)}open(t){return this.closed||(this.autoDestroy=WZ(this,t),this.schema||(this.schema=this._reader.readSchema())||this.cancel()),this}throw(t){return!this.closed&&this.autoDestroy&&(this.closed=!0)?this.reset()._reader.throw(t):pG}return(t){return!this.closed&&this.autoDestroy&&(this.closed=!0)?this.reset()._reader.return(t):pG}next(){if(this.closed)return pG
14304
+ return(r&&i?r.concat(new eG(a)):new eG(a)).memoize()}return r.memoize()}_loadVectors(t,e,n){return new AG(e,t.nodes,t.buffers,this.dictionaries,this.schema.metadataVersion).visitMany(n)}}class HZ extends VZ{constructor(t,e){super(e),this._reader=MH(t)?new $Z(this._handle=t):new IZ(this._handle=t)}isSync(){return!0}isStream(){return!0}[Symbol.iterator](){return this}cancel(){!this.closed&&(this.closed=!0)&&(this.reset()._reader.return(),this._reader=null,this.dictionaries=null)}open(t){return this.closed||(this.autoDestroy=GZ(this,t),this.schema||(this.schema=this._reader.readSchema())||this.cancel()),this}throw(t){return!this.closed&&this.autoDestroy&&(this.closed=!0)?this.reset()._reader.throw(t):fG}return(t){return!this.closed&&this.autoDestroy&&(this.closed=!0)?this.reset()._reader.return(t):fG}next(){if(this.closed)return fG
14303
14305
  let t
14304
14306
  const{_reader:e}=this
14305
14307
  for(;t=this._readNextMessageAndValidate();)if(t.isSchema())this.reset(t.header())
@@ -14307,7 +14309,7 @@ else{if(t.isRecordBatch()){this._recordBatchIndex++
14307
14309
  const n=t.header(),i=e.readMessageBody(t.bodyLength)
14308
14310
  return{done:!1,value:this._loadRecordBatch(n,i)}}if(t.isDictionaryBatch()){this._dictionaryIndex++
14309
14311
  const n=t.header(),i=e.readMessageBody(t.bodyLength),s=this._loadDictionaryBatch(n,i)
14310
- this.dictionaries.set(n.id,s)}}return this.schema&&0===this._recordBatchIndex?(this._recordBatchIndex++,{done:!1,value:new QG(this.schema)}):this.return()}_readNextMessageAndValidate(t){return this._reader.readMessage(t)}}class HZ extends zZ{constructor(t,e){super(e),this._reader=new IZ(this._handle=t)}isAsync(){return!0}isStream(){return!0}[Symbol.asyncIterator](){return this}cancel(){return e(this,void 0,void 0,(function*(){!this.closed&&(this.closed=!0)&&(yield this.reset()._reader.return(),this._reader=null,this.dictionaries=null)}))}open(t){return e(this,void 0,void 0,(function*(){return this.closed||(this.autoDestroy=WZ(this,t),this.schema||(this.schema=yield this._reader.readSchema())||(yield this.cancel())),this}))}throw(t){return e(this,void 0,void 0,(function*(){return!this.closed&&this.autoDestroy&&(this.closed=!0)?yield this.reset()._reader.throw(t):pG}))}return(t){return e(this,void 0,void 0,(function*(){return!this.closed&&this.autoDestroy&&(this.closed=!0)?yield this.reset()._reader.return(t):pG}))}next(){return e(this,void 0,void 0,(function*(){if(this.closed)return pG
14312
+ this.dictionaries.set(n.id,s)}}return this.schema&&0===this._recordBatchIndex?(this._recordBatchIndex++,{done:!1,value:new tZ(this.schema)}):this.return()}_readNextMessageAndValidate(t){return this._reader.readMessage(t)}}class UZ extends VZ{constructor(t,e){super(e),this._reader=new MZ(this._handle=t)}isAsync(){return!0}isStream(){return!0}[Symbol.asyncIterator](){return this}cancel(){return e(this,void 0,void 0,(function*(){!this.closed&&(this.closed=!0)&&(yield this.reset()._reader.return(),this._reader=null,this.dictionaries=null)}))}open(t){return e(this,void 0,void 0,(function*(){return this.closed||(this.autoDestroy=GZ(this,t),this.schema||(this.schema=yield this._reader.readSchema())||(yield this.cancel())),this}))}throw(t){return e(this,void 0,void 0,(function*(){return!this.closed&&this.autoDestroy&&(this.closed=!0)?yield this.reset()._reader.throw(t):fG}))}return(t){return e(this,void 0,void 0,(function*(){return!this.closed&&this.autoDestroy&&(this.closed=!0)?yield this.reset()._reader.return(t):fG}))}next(){return e(this,void 0,void 0,(function*(){if(this.closed)return fG
14311
14313
  let t
14312
14314
  const{_reader:e}=this
14313
14315
  for(;t=yield this._readNextMessageAndValidate();)if(t.isSchema())yield this.reset(t.header())
@@ -14315,40 +14317,40 @@ else{if(t.isRecordBatch()){this._recordBatchIndex++
14315
14317
  const n=t.header(),i=yield e.readMessageBody(t.bodyLength)
14316
14318
  return{done:!1,value:this._loadRecordBatch(n,i)}}if(t.isDictionaryBatch()){this._dictionaryIndex++
14317
14319
  const n=t.header(),i=yield e.readMessageBody(t.bodyLength),s=this._loadDictionaryBatch(n,i)
14318
- this.dictionaries.set(n.id,s)}}return this.schema&&0===this._recordBatchIndex?(this._recordBatchIndex++,{done:!1,value:new QG(this.schema)}):yield this.return()}))}_readNextMessageAndValidate(t){return e(this,void 0,void 0,(function*(){return yield this._reader.readMessage(t)}))}}class UZ extends VZ{get footer(){return this._footer}get numDictionaries(){return this._footer?this._footer.numDictionaries:0}get numRecordBatches(){return this._footer?this._footer.numRecordBatches:0}constructor(t,e){super(t instanceof CG?t:new CG(t),e)}isSync(){return!0}isFile(){return!0}open(t){if(!this.closed&&!this._footer){this.schema=(this._footer=this._readFooter()).schema
14320
+ this.dictionaries.set(n.id,s)}}return this.schema&&0===this._recordBatchIndex?(this._recordBatchIndex++,{done:!1,value:new tZ(this.schema)}):yield this.return()}))}_readNextMessageAndValidate(t){return e(this,void 0,void 0,(function*(){return yield this._reader.readMessage(t)}))}}class qZ extends HZ{get footer(){return this._footer}get numDictionaries(){return this._footer?this._footer.numDictionaries:0}get numRecordBatches(){return this._footer?this._footer.numRecordBatches:0}constructor(t,e){super(t instanceof kG?t:new kG(t),e)}isSync(){return!0}isFile(){return!0}open(t){if(!this.closed&&!this._footer){this.schema=(this._footer=this._readFooter()).schema
14319
14321
  for(const t of this._footer.dictionaryBatches())t&&this._readDictionaryBatch(this._dictionaryIndex++)}return super.open(t)}readRecordBatch(t){var e
14320
14322
  if(this.closed)return null
14321
14323
  this._footer||this.open()
14322
14324
  const n=null===(e=this._footer)||void 0===e?void 0:e.getRecordBatch(t)
14323
- if(n&&this._handle.seek(n.offset)){const t=this._reader.readMessage(HU.RecordBatch)
14325
+ if(n&&this._handle.seek(n.offset)){const t=this._reader.readMessage(UU.RecordBatch)
14324
14326
  if(null==t?void 0:t.isRecordBatch()){const e=t.header(),n=this._reader.readMessageBody(t.bodyLength)
14325
14327
  return this._loadRecordBatch(e,n)}}return null}_readDictionaryBatch(t){var e
14326
14328
  const n=null===(e=this._footer)||void 0===e?void 0:e.getDictionaryBatch(t)
14327
- if(n&&this._handle.seek(n.offset)){const t=this._reader.readMessage(HU.DictionaryBatch)
14329
+ if(n&&this._handle.seek(n.offset)){const t=this._reader.readMessage(UU.DictionaryBatch)
14328
14330
  if(null==t?void 0:t.isDictionaryBatch()){const e=t.header(),n=this._reader.readMessageBody(t.bodyLength),i=this._loadDictionaryBatch(e,n)
14329
- this.dictionaries.set(e.id,i)}}}_readFooter(){const{_handle:t}=this,e=t.size-OZ,n=t.readInt32(e),i=t.readAt(e-n,n)
14330
- return dG.decode(i)}_readNextMessageAndValidate(t){var e
14331
+ this.dictionaries.set(e.id,i)}}}_readFooter(){const{_handle:t}=this,e=t.size-RZ,n=t.readInt32(e),i=t.readAt(e-n,n)
14332
+ return hG.decode(i)}_readNextMessageAndValidate(t){var e
14331
14333
  if(this._footer||this.open(),this._footer&&this._recordBatchIndex<this.numRecordBatches){const n=null===(e=this._footer)||void 0===e?void 0:e.getRecordBatch(this._recordBatchIndex)
14332
- if(n&&this._handle.seek(n.offset))return this._reader.readMessage(t)}return null}}class qZ extends HZ{get footer(){return this._footer}get numDictionaries(){return this._footer?this._footer.numDictionaries:0}get numRecordBatches(){return this._footer?this._footer.numRecordBatches:0}constructor(t,...e){const n="number"!=typeof e[0]?e.shift():void 0,i=e[0]instanceof Map?e.shift():void 0
14333
- super(t instanceof kG?t:new kG(t,n),i)}isFile(){return!0}isAsync(){return!0}open(t){const n=Object.create(null,{open:{get:()=>super.open}})
14334
+ if(n&&this._handle.seek(n.offset))return this._reader.readMessage(t)}return null}}class jZ extends UZ{get footer(){return this._footer}get numDictionaries(){return this._footer?this._footer.numDictionaries:0}get numRecordBatches(){return this._footer?this._footer.numRecordBatches:0}constructor(t,...e){const n="number"!=typeof e[0]?e.shift():void 0,i=e[0]instanceof Map?e.shift():void 0
14335
+ super(t instanceof SG?t:new SG(t,n),i)}isFile(){return!0}isAsync(){return!0}open(t){const n=Object.create(null,{open:{get:()=>super.open}})
14334
14336
  return e(this,void 0,void 0,(function*(){if(!this.closed&&!this._footer){this.schema=(this._footer=yield this._readFooter()).schema
14335
14337
  for(const t of this._footer.dictionaryBatches())t&&(yield this._readDictionaryBatch(this._dictionaryIndex++))}return yield n.open.call(this,t)}))}readRecordBatch(t){return e(this,void 0,void 0,(function*(){var e
14336
14338
  if(this.closed)return null
14337
14339
  this._footer||(yield this.open())
14338
14340
  const n=null===(e=this._footer)||void 0===e?void 0:e.getRecordBatch(t)
14339
- if(n&&(yield this._handle.seek(n.offset))){const t=yield this._reader.readMessage(HU.RecordBatch)
14341
+ if(n&&(yield this._handle.seek(n.offset))){const t=yield this._reader.readMessage(UU.RecordBatch)
14340
14342
  if(null==t?void 0:t.isRecordBatch()){const e=t.header(),n=yield this._reader.readMessageBody(t.bodyLength)
14341
14343
  return this._loadRecordBatch(e,n)}}return null}))}_readDictionaryBatch(t){return e(this,void 0,void 0,(function*(){var e
14342
14344
  const n=null===(e=this._footer)||void 0===e?void 0:e.getDictionaryBatch(t)
14343
- if(n&&(yield this._handle.seek(n.offset))){const t=yield this._reader.readMessage(HU.DictionaryBatch)
14345
+ if(n&&(yield this._handle.seek(n.offset))){const t=yield this._reader.readMessage(UU.DictionaryBatch)
14344
14346
  if(null==t?void 0:t.isDictionaryBatch()){const e=t.header(),n=yield this._reader.readMessageBody(t.bodyLength),i=this._loadDictionaryBatch(e,n)
14345
14347
  this.dictionaries.set(e.id,i)}}}))}_readFooter(){return e(this,void 0,void 0,(function*(){const{_handle:t}=this
14346
14348
  t._pending&&(yield t._pending)
14347
- const e=t.size-OZ,n=yield t.readInt32(e),i=yield t.readAt(e-n,n)
14348
- return dG.decode(i)}))}_readNextMessageAndValidate(t){return e(this,void 0,void 0,(function*(){if(this._footer||(yield this.open()),this._footer&&this._recordBatchIndex<this.numRecordBatches){const e=this._footer.getRecordBatch(this._recordBatchIndex)
14349
- if(e&&(yield this._handle.seek(e.offset)))return yield this._reader.readMessage(t)}return null}))}}class jZ extends VZ{constructor(t,e){super(t,e)}_loadVectors(t,e,n){return new AG(e,t.nodes,t.buffers,this.dictionaries,this.schema.metadataVersion).visitMany(n)}}function WZ(t,e){return e&&"boolean"==typeof e.autoDestroy?e.autoDestroy:t.autoDestroy}function*GZ(t){const e=FZ.from(t)
14350
- try{if(!e.open({autoDestroy:!1}).closed)do{yield e}while(!e.reset().open().closed)}finally{e.cancel()}}function ZZ(t){return s(this,arguments,(function*(){const e=yield i(FZ.from(t))
14351
- try{if(!(yield i(e.open({autoDestroy:!1}))).closed)do{yield yield i(e)}while(!(yield i(e.reset().open())).closed)}finally{yield i(e.cancel())}}))}const KZ=Q`
14349
+ const e=t.size-RZ,n=yield t.readInt32(e),i=yield t.readAt(e-n,n)
14350
+ return hG.decode(i)}))}_readNextMessageAndValidate(t){return e(this,void 0,void 0,(function*(){if(this._footer||(yield this.open()),this._footer&&this._recordBatchIndex<this.numRecordBatches){const e=this._footer.getRecordBatch(this._recordBatchIndex)
14351
+ if(e&&(yield this._handle.seek(e.offset)))return yield this._reader.readMessage(t)}return null}))}}class WZ extends HZ{constructor(t,e){super(t,e)}_loadVectors(t,e,n){return new TG(e,t.nodes,t.buffers,this.dictionaries,this.schema.metadataVersion).visitMany(n)}}function GZ(t,e){return e&&"boolean"==typeof e.autoDestroy?e.autoDestroy:t.autoDestroy}function*ZZ(t){const e=NZ.from(t)
14352
+ try{if(!e.open({autoDestroy:!1}).closed)do{yield e}while(!e.reset().open().closed)}finally{e.cancel()}}function KZ(t){return s(this,arguments,(function*(){const e=yield i(NZ.from(t))
14353
+ try{if(!(yield i(e.open({autoDestroy:!1}))).closed)do{yield yield i(e)}while(!(yield i(e.reset().open())).closed)}finally{yield i(e.cancel())}}))}const YZ=Q`
14352
14354
  <div class="wafer-map-container">
14353
14355
  <svg class="svg-root">
14354
14356
  <g ${Ut("zoomContainer")} transform=${t=>t.transform.toString()}>
@@ -14379,7 +14381,7 @@ try{if(!(yield i(e.open({autoDestroy:!1}))).closed)do{yield yield i(e)}while(!(y
14379
14381
  />
14380
14382
  </svg>
14381
14383
  </div>
14382
- `,YZ=Mt`
14384
+ `,XZ=Mt`
14383
14385
  ${Vs("inline-block")}
14384
14386
 
14385
14387
  :host {
@@ -14469,67 +14471,67 @@ try{if(!(yield i(e.open({autoDestroy:!1}))).closed)do{yield yield i(e)}while(!(y
14469
14471
  outline-width: 0px;
14470
14472
  }
14471
14473
  `
14472
- function XZ(t,e){return null==t||null==e?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function JZ(t,e){return null==t||null==e?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function QZ(t){let e,n,i
14474
+ function JZ(t,e){return null==t||null==e?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function QZ(t,e){return null==t||null==e?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function tK(t){let e,n,i
14473
14475
  function s(t,i,s=0,o=t.length){if(s<o){if(0!==e(i,i))return o
14474
14476
  do{const e=s+o>>>1
14475
- n(t[e],i)<0?s=e+1:o=e}while(s<o)}return s}return 2!==t.length?(e=XZ,n=(e,n)=>XZ(t(e),n),i=(e,n)=>t(e)-n):(e=t===XZ||t===JZ?t:tK,n=t,i=t),{left:s,center:function(t,e,n=0,o=t.length){const r=s(t,e,n,o-1)
14477
+ n(t[e],i)<0?s=e+1:o=e}while(s<o)}return s}return 2!==t.length?(e=JZ,n=(e,n)=>JZ(t(e),n),i=(e,n)=>t(e)-n):(e=t===JZ||t===QZ?t:eK,n=t,i=t),{left:s,center:function(t,e,n=0,o=t.length){const r=s(t,e,n,o-1)
14476
14478
  return r>n&&i(t[r-1],e)>-i(t[r],e)?r-1:r},right:function(t,i,s=0,o=t.length){if(s<o){if(0!==e(i,i))return o
14477
14479
  do{const e=s+o>>>1
14478
- n(t[e],i)<=0?s=e+1:o=e}while(s<o)}return s}}}function tK(){return 0}function eK(t){return null===t?NaN:+t}const nK=QZ(XZ).right
14479
- QZ(eK).center
14480
- class iK extends Map{constructor(t,e=oK){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:e}}),null!=t)for(const[e,n]of t)this.set(e,n)}get(t){return super.get(sK(this,t))}has(t){return super.has(sK(this,t))}set(t,e){return super.set(function({_intern:t,_key:e},n){const i=e(n)
14480
+ n(t[e],i)<=0?s=e+1:o=e}while(s<o)}return s}}}function eK(){return 0}function nK(t){return null===t?NaN:+t}const iK=tK(JZ).right
14481
+ tK(nK).center
14482
+ class sK extends Map{constructor(t,e=rK){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:e}}),null!=t)for(const[e,n]of t)this.set(e,n)}get(t){return super.get(oK(this,t))}has(t){return super.has(oK(this,t))}set(t,e){return super.set(function({_intern:t,_key:e},n){const i=e(n)
14481
14483
  return t.has(i)?t.get(i):(t.set(i,n),n)}(this,t),e)}delete(t){return super.delete(function({_intern:t,_key:e},n){const i=e(n)
14482
14484
  t.has(i)&&(n=t.get(i),t.delete(i))
14483
- return n}(this,t))}}function sK({_intern:t,_key:e},n){const i=e(n)
14484
- return t.has(i)?t.get(i):n}function oK(t){return null!==t&&"object"==typeof t?t.valueOf():t}const rK=Math.sqrt(50),aK=Math.sqrt(10),lK=Math.sqrt(2)
14485
- function cK(t,e,n){const i=(e-t)/Math.max(0,n),s=Math.floor(Math.log10(i)),o=i/Math.pow(10,s),r=o>=rK?10:o>=aK?5:o>=lK?2:1
14485
+ return n}(this,t))}}function oK({_intern:t,_key:e},n){const i=e(n)
14486
+ return t.has(i)?t.get(i):n}function rK(t){return null!==t&&"object"==typeof t?t.valueOf():t}const aK=Math.sqrt(50),lK=Math.sqrt(10),cK=Math.sqrt(2)
14487
+ function dK(t,e,n){const i=(e-t)/Math.max(0,n),s=Math.floor(Math.log10(i)),o=i/Math.pow(10,s),r=o>=aK?10:o>=lK?5:o>=cK?2:1
14486
14488
  let a,l,c
14487
- return s<0?(c=Math.pow(10,-s)/r,a=Math.round(t*c),l=Math.round(e*c),a/c<t&&++a,l/c>e&&--l,c=-c):(c=Math.pow(10,s)*r,a=Math.round(t/c),l=Math.round(e/c),a*c<t&&++a,l*c>e&&--l),l<a&&.5<=n&&n<2?cK(t,e,2*n):[a,l,c]}function dK(t,e,n){return cK(t=+t,e=+e,n=+n)[2]}function hK(t,e,n=eK){if((i=t.length)&&!isNaN(e=+e)){if(e<=0||i<2)return+n(t[0],0,t)
14489
+ return s<0?(c=Math.pow(10,-s)/r,a=Math.round(t*c),l=Math.round(e*c),a/c<t&&++a,l/c>e&&--l,c=-c):(c=Math.pow(10,s)*r,a=Math.round(t/c),l=Math.round(e/c),a*c<t&&++a,l*c>e&&--l),l<a&&.5<=n&&n<2?dK(t,e,2*n):[a,l,c]}function hK(t,e,n){return dK(t=+t,e=+e,n=+n)[2]}function uK(t,e,n=nK){if((i=t.length)&&!isNaN(e=+e)){if(e<=0||i<2)return+n(t[0],0,t)
14488
14490
  if(e>=1)return+n(t[i-1],i-1,t)
14489
14491
  var i,s=(i-1)*e,o=Math.floor(s),r=+n(t[o],o,t)
14490
- return r+(+n(t[o+1],o+1,t)-r)*(s-o)}}function uK(t,e,n){t=+t,e=+e,n=(s=arguments.length)<2?(e=t,t=0,1):s<3?1:+n
14492
+ return r+(+n(t[o+1],o+1,t)-r)*(s-o)}}function pK(t,e,n){t=+t,e=+e,n=(s=arguments.length)<2?(e=t,t=0,1):s<3?1:+n
14491
14493
  for(var i=-1,s=0|Math.max(0,Math.ceil((e-t)/n)),o=new Array(s);++i<s;)o[i]=t+i*n
14492
- return o}function pK(t,e){switch(arguments.length){case 0:break
14494
+ return o}function fK(t,e){switch(arguments.length){case 0:break
14493
14495
  case 1:this.range(t)
14494
14496
  break
14495
- default:this.range(e).domain(t)}return this}const fK=Symbol("implicit")
14496
- function mK(){var t=new iK,e=[],n=[],i=fK
14497
+ default:this.range(e).domain(t)}return this}const mK=Symbol("implicit")
14498
+ function gK(){var t=new sK,e=[],n=[],i=mK
14497
14499
  function s(s){let o=t.get(s)
14498
- if(void 0===o){if(i!==fK)return i
14500
+ if(void 0===o){if(i!==mK)return i
14499
14501
  t.set(s,o=e.push(s)-1)}return n[o%n.length]}return s.domain=function(n){if(!arguments.length)return e.slice()
14500
- e=[],t=new iK
14502
+ e=[],t=new sK
14501
14503
  for(const i of n)t.has(i)||t.set(i,e.push(i)-1)
14502
- return s},s.range=function(t){return arguments.length?(n=Array.from(t),s):n.slice()},s.unknown=function(t){return arguments.length?(i=t,s):i},s.copy=function(){return mK(e,n).unknown(i)},pK.apply(s,arguments),s}function gK(){var t,e,n=mK().unknown(void 0),i=n.domain,s=n.range,o=0,r=1,a=!1,l=0,c=0,d=.5
14504
+ return s},s.range=function(t){return arguments.length?(n=Array.from(t),s):n.slice()},s.unknown=function(t){return arguments.length?(i=t,s):i},s.copy=function(){return gK(e,n).unknown(i)},fK.apply(s,arguments),s}function vK(){var t,e,n=gK().unknown(void 0),i=n.domain,s=n.range,o=0,r=1,a=!1,l=0,c=0,d=.5
14503
14505
  function h(){var n=i().length,h=r<o,u=h?r:o,p=h?o:r
14504
14506
  t=(p-u)/Math.max(1,n-l+2*c),a&&(t=Math.floor(t)),u+=(p-u-t*(n-l))*d,e=t*(1-l),a&&(u=Math.round(u),e=Math.round(e))
14505
- var f=uK(n).map((function(e){return u+t*e}))
14506
- return s(h?f.reverse():f)}return delete n.unknown,n.domain=function(t){return arguments.length?(i(t),h()):i()},n.range=function(t){return arguments.length?([o,r]=t,o=+o,r=+r,h()):[o,r]},n.rangeRound=function(t){return[o,r]=t,o=+o,r=+r,a=!0,h()},n.bandwidth=function(){return e},n.step=function(){return t},n.round=function(t){return arguments.length?(a=!!t,h()):a},n.padding=function(t){return arguments.length?(l=Math.min(1,c=+t),h()):l},n.paddingInner=function(t){return arguments.length?(l=Math.min(1,t),h()):l},n.paddingOuter=function(t){return arguments.length?(c=+t,h()):c},n.align=function(t){return arguments.length?(d=Math.max(0,Math.min(1,t)),h()):d},n.copy=function(){return gK(i(),[o,r]).round(a).paddingInner(l).paddingOuter(c).align(d)},pK.apply(h(),arguments)}function vK(t){return+t}var bK=[0,1]
14507
- function yK(t){return t}function wK(t,e){return(e-=t=+t)?function(n){return(n-t)/e}:(n=isNaN(e)?NaN:.5,function(){return n})
14508
- var n}function xK(t,e,n){var i=t[0],s=t[1],o=e[0],r=e[1]
14509
- return s<i?(i=wK(s,i),o=n(r,o)):(i=wK(i,s),o=n(o,r)),function(t){return o(i(t))}}function CK(t,e,n){var i=Math.min(t.length,e.length)-1,s=new Array(i),o=new Array(i),r=-1
14510
- for(t[i]<t[0]&&(t=t.slice().reverse(),e=e.slice().reverse());++r<i;)s[r]=wK(t[r],t[r+1]),o[r]=n(e[r],e[r+1])
14511
- return function(e){var n=nK(t,e,1,i)-1
14512
- return o[n](s[n](e))}}function kK(){var t,e,n,i,s,o,r=bK,a=bK,l=qz,c=yK
14507
+ var f=pK(n).map((function(e){return u+t*e}))
14508
+ return s(h?f.reverse():f)}return delete n.unknown,n.domain=function(t){return arguments.length?(i(t),h()):i()},n.range=function(t){return arguments.length?([o,r]=t,o=+o,r=+r,h()):[o,r]},n.rangeRound=function(t){return[o,r]=t,o=+o,r=+r,a=!0,h()},n.bandwidth=function(){return e},n.step=function(){return t},n.round=function(t){return arguments.length?(a=!!t,h()):a},n.padding=function(t){return arguments.length?(l=Math.min(1,c=+t),h()):l},n.paddingInner=function(t){return arguments.length?(l=Math.min(1,t),h()):l},n.paddingOuter=function(t){return arguments.length?(c=+t,h()):c},n.align=function(t){return arguments.length?(d=Math.max(0,Math.min(1,t)),h()):d},n.copy=function(){return vK(i(),[o,r]).round(a).paddingInner(l).paddingOuter(c).align(d)},fK.apply(h(),arguments)}function bK(t){return+t}var yK=[0,1]
14509
+ function wK(t){return t}function xK(t,e){return(e-=t=+t)?function(n){return(n-t)/e}:(n=isNaN(e)?NaN:.5,function(){return n})
14510
+ var n}function CK(t,e,n){var i=t[0],s=t[1],o=e[0],r=e[1]
14511
+ return s<i?(i=xK(s,i),o=n(r,o)):(i=xK(i,s),o=n(o,r)),function(t){return o(i(t))}}function kK(t,e,n){var i=Math.min(t.length,e.length)-1,s=new Array(i),o=new Array(i),r=-1
14512
+ for(t[i]<t[0]&&(t=t.slice().reverse(),e=e.slice().reverse());++r<i;)s[r]=xK(t[r],t[r+1]),o[r]=n(e[r],e[r+1])
14513
+ return function(e){var n=iK(t,e,1,i)-1
14514
+ return o[n](s[n](e))}}function SK(){var t,e,n,i,s,o,r=yK,a=yK,l=jz,c=wK
14513
14515
  function d(){var t,e,n,l=Math.min(r.length,a.length)
14514
- return c!==yK&&(t=r[0],e=r[l-1],t>e&&(n=t,t=e,e=n),c=function(n){return Math.max(t,Math.min(e,n))}),i=l>2?CK:xK,s=o=null,h}function h(e){return null==e||isNaN(e=+e)?n:(s||(s=i(r.map(t),a,l)))(t(c(e)))}return h.invert=function(n){return c(e((o||(o=i(a,r.map(t),Pz)))(n)))},h.domain=function(t){return arguments.length?(r=Array.from(t,vK),d()):r.slice()},h.range=function(t){return arguments.length?(a=Array.from(t),d()):a.slice()},h.rangeRound=function(t){return a=Array.from(t),l=jz,d()},h.clamp=function(t){return arguments.length?(c=!!t||yK,d()):c!==yK},h.interpolate=function(t){return arguments.length?(l=t,d()):l},h.unknown=function(t){return arguments.length?(n=t,h):n},function(n,i){return t=n,e=i,d()}}function SK(t,e){if((n=(t=e?t.toExponential(e-1):t.toExponential()).indexOf("e"))<0)return null
14516
+ return c!==wK&&(t=r[0],e=r[l-1],t>e&&(n=t,t=e,e=n),c=function(n){return Math.max(t,Math.min(e,n))}),i=l>2?kK:CK,s=o=null,h}function h(e){return null==e||isNaN(e=+e)?n:(s||(s=i(r.map(t),a,l)))(t(c(e)))}return h.invert=function(n){return c(e((o||(o=i(a,r.map(t),zz)))(n)))},h.domain=function(t){return arguments.length?(r=Array.from(t,bK),d()):r.slice()},h.range=function(t){return arguments.length?(a=Array.from(t),d()):a.slice()},h.rangeRound=function(t){return a=Array.from(t),l=Wz,d()},h.clamp=function(t){return arguments.length?(c=!!t||wK,d()):c!==wK},h.interpolate=function(t){return arguments.length?(l=t,d()):l},h.unknown=function(t){return arguments.length?(n=t,h):n},function(n,i){return t=n,e=i,d()}}function _K(t,e){if((n=(t=e?t.toExponential(e-1):t.toExponential()).indexOf("e"))<0)return null
14515
14517
  var n,i=t.slice(0,n)
14516
- return[i.length>1?i[0]+i.slice(2):i,+t.slice(n+1)]}function _K(t){return(t=SK(Math.abs(t)))?t[1]:NaN}var IK,MK=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i
14517
- function $K(t){if(!(e=MK.exec(t)))throw new Error("invalid format: "+t)
14518
+ return[i.length>1?i[0]+i.slice(2):i,+t.slice(n+1)]}function IK(t){return(t=_K(Math.abs(t)))?t[1]:NaN}var MK,$K=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i
14519
+ function EK(t){if(!(e=$K.exec(t)))throw new Error("invalid format: "+t)
14518
14520
  var e
14519
- return new EK({fill:e[1],align:e[2],sign:e[3],symbol:e[4],zero:e[5],width:e[6],comma:e[7],precision:e[8]&&e[8].slice(1),trim:e[9],type:e[10]})}function EK(t){this.fill=void 0===t.fill?" ":t.fill+"",this.align=void 0===t.align?">":t.align+"",this.sign=void 0===t.sign?"-":t.sign+"",this.symbol=void 0===t.symbol?"":t.symbol+"",this.zero=!!t.zero,this.width=void 0===t.width?void 0:+t.width,this.comma=!!t.comma,this.precision=void 0===t.precision?void 0:+t.precision,this.trim=!!t.trim,this.type=void 0===t.type?"":t.type+""}function DK(t,e){var n=SK(t,e)
14521
+ return new DK({fill:e[1],align:e[2],sign:e[3],symbol:e[4],zero:e[5],width:e[6],comma:e[7],precision:e[8]&&e[8].slice(1),trim:e[9],type:e[10]})}function DK(t){this.fill=void 0===t.fill?" ":t.fill+"",this.align=void 0===t.align?">":t.align+"",this.sign=void 0===t.sign?"-":t.sign+"",this.symbol=void 0===t.symbol?"":t.symbol+"",this.zero=!!t.zero,this.width=void 0===t.width?void 0:+t.width,this.comma=!!t.comma,this.precision=void 0===t.precision?void 0:+t.precision,this.trim=!!t.trim,this.type=void 0===t.type?"":t.type+""}function AK(t,e){var n=_K(t,e)
14520
14522
  if(!n)return t+""
14521
14523
  var i=n[0],s=n[1]
14522
- return s<0?"0."+new Array(-s).join("0")+i:i.length>s+1?i.slice(0,s+1)+"."+i.slice(s+1):i+new Array(s-i.length+2).join("0")}$K.prototype=EK.prototype,EK.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(void 0===this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(void 0===this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type}
14523
- var AK={"%":(t,e)=>(100*t).toFixed(e),b:t=>Math.round(t).toString(2),c:t=>t+"",d:function(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)},e:(t,e)=>t.toExponential(e),f:(t,e)=>t.toFixed(e),g:(t,e)=>t.toPrecision(e),o:t=>Math.round(t).toString(8),p:(t,e)=>DK(100*t,e),r:DK,s:function(t,e){var n=SK(t,e)
14524
+ return s<0?"0."+new Array(-s).join("0")+i:i.length>s+1?i.slice(0,s+1)+"."+i.slice(s+1):i+new Array(s-i.length+2).join("0")}EK.prototype=DK.prototype,DK.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(void 0===this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(void 0===this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type}
14525
+ var TK={"%":(t,e)=>(100*t).toFixed(e),b:t=>Math.round(t).toString(2),c:t=>t+"",d:function(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)},e:(t,e)=>t.toExponential(e),f:(t,e)=>t.toFixed(e),g:(t,e)=>t.toPrecision(e),o:t=>Math.round(t).toString(8),p:(t,e)=>AK(100*t,e),r:AK,s:function(t,e){var n=_K(t,e)
14524
14526
  if(!n)return t+""
14525
- var i=n[0],s=n[1],o=s-(IK=3*Math.max(-8,Math.min(8,Math.floor(s/3))))+1,r=i.length
14526
- return o===r?i:o>r?i+new Array(o-r+1).join("0"):o>0?i.slice(0,o)+"."+i.slice(o):"0."+new Array(1-o).join("0")+SK(t,Math.max(0,e+o-1))[0]},X:t=>Math.round(t).toString(16).toUpperCase(),x:t=>Math.round(t).toString(16)}
14527
- function TK(t){return t}var OK,RK,FK,NK=Array.prototype.map,LK=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"]
14528
- function BK(t){var e,n,i=void 0===t.grouping||void 0===t.thousands?TK:(e=NK.call(t.grouping,Number),n=t.thousands+"",function(t,i){for(var s=t.length,o=[],r=0,a=e[0],l=0;s>0&&a>0&&(l+a+1>i&&(a=Math.max(1,i-l)),o.push(t.substring(s-=a,s+a)),!((l+=a+1)>i));)a=e[r=(r+1)%e.length]
14529
- return o.reverse().join(n)}),s=void 0===t.currency?"":t.currency[0]+"",o=void 0===t.currency?"":t.currency[1]+"",r=void 0===t.decimal?".":t.decimal+"",a=void 0===t.numerals?TK:function(t){return function(e){return e.replace(/[0-9]/g,(function(e){return t[+e]}))}}(NK.call(t.numerals,String)),l=void 0===t.percent?"%":t.percent+"",c=void 0===t.minus?"−":t.minus+"",d=void 0===t.nan?"NaN":t.nan+""
14530
- function h(t){var e=(t=$K(t)).fill,n=t.align,h=t.sign,u=t.symbol,p=t.zero,f=t.width,m=t.comma,g=t.precision,v=t.trim,b=t.type
14531
- "n"===b?(m=!0,b="g"):AK[b]||(void 0===g&&(g=12),v=!0,b="g"),(p||"0"===e&&"="===n)&&(p=!0,e="0",n="=")
14532
- var y="$"===u?s:"#"===u&&/[boxX]/.test(b)?"0"+b.toLowerCase():"",w="$"===u?o:/[%p]/.test(b)?l:"",x=AK[b],C=/[defgprs%]/.test(b)
14527
+ var i=n[0],s=n[1],o=s-(MK=3*Math.max(-8,Math.min(8,Math.floor(s/3))))+1,r=i.length
14528
+ return o===r?i:o>r?i+new Array(o-r+1).join("0"):o>0?i.slice(0,o)+"."+i.slice(o):"0."+new Array(1-o).join("0")+_K(t,Math.max(0,e+o-1))[0]},X:t=>Math.round(t).toString(16).toUpperCase(),x:t=>Math.round(t).toString(16)}
14529
+ function OK(t){return t}var RK,FK,NK,LK=Array.prototype.map,BK=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"]
14530
+ function PK(t){var e,n,i=void 0===t.grouping||void 0===t.thousands?OK:(e=LK.call(t.grouping,Number),n=t.thousands+"",function(t,i){for(var s=t.length,o=[],r=0,a=e[0],l=0;s>0&&a>0&&(l+a+1>i&&(a=Math.max(1,i-l)),o.push(t.substring(s-=a,s+a)),!((l+=a+1)>i));)a=e[r=(r+1)%e.length]
14531
+ return o.reverse().join(n)}),s=void 0===t.currency?"":t.currency[0]+"",o=void 0===t.currency?"":t.currency[1]+"",r=void 0===t.decimal?".":t.decimal+"",a=void 0===t.numerals?OK:function(t){return function(e){return e.replace(/[0-9]/g,(function(e){return t[+e]}))}}(LK.call(t.numerals,String)),l=void 0===t.percent?"%":t.percent+"",c=void 0===t.minus?"−":t.minus+"",d=void 0===t.nan?"NaN":t.nan+""
14532
+ function h(t){var e=(t=EK(t)).fill,n=t.align,h=t.sign,u=t.symbol,p=t.zero,f=t.width,m=t.comma,g=t.precision,v=t.trim,b=t.type
14533
+ "n"===b?(m=!0,b="g"):TK[b]||(void 0===g&&(g=12),v=!0,b="g"),(p||"0"===e&&"="===n)&&(p=!0,e="0",n="=")
14534
+ var y="$"===u?s:"#"===u&&/[boxX]/.test(b)?"0"+b.toLowerCase():"",w="$"===u?o:/[%p]/.test(b)?l:"",x=TK[b],C=/[defgprs%]/.test(b)
14533
14535
  function k(t){var s,o,l,u=y,k=w
14534
14536
  if("c"===b)k=x(t)+k,t=""
14535
14537
  else{var S=(t=+t)<0||1/t<0
@@ -14538,7 +14540,7 @@ break
14538
14540
  case"0":0===s&&(s=i),e=i
14539
14541
  break
14540
14542
  default:if(!+t[i])break t
14541
- s>0&&(s=0)}return s>0?t.slice(0,s)+t.slice(e+1):t}(t)),S&&0==+t&&"+"!==h&&(S=!1),u=(S?"("===h?h:c:"-"===h||"("===h?"":h)+u,k=("s"===b?LK[8+IK/3]:"")+k+(S&&"("===h?")":""),C)for(s=-1,o=t.length;++s<o;)if(48>(l=t.charCodeAt(s))||l>57){k=(46===l?r+t.slice(s+1):t.slice(s))+k,t=t.slice(0,s)
14543
+ s>0&&(s=0)}return s>0?t.slice(0,s)+t.slice(e+1):t}(t)),S&&0==+t&&"+"!==h&&(S=!1),u=(S?"("===h?h:c:"-"===h||"("===h?"":h)+u,k=("s"===b?BK[8+MK/3]:"")+k+(S&&"("===h?")":""),C)for(s=-1,o=t.length;++s<o;)if(48>(l=t.charCodeAt(s))||l>57){k=(46===l?r+t.slice(s+1):t.slice(s))+k,t=t.slice(0,s)
14542
14544
  break}}m&&!p&&(t=i(t,1/0))
14543
14545
  var _=u.length+t.length+k.length,I=_<f?new Array(f-_+1).join(e):""
14544
14546
  switch(m&&p&&(t=i(I+t,I.length?f-k.length:1/0),I=""),n){case"<":t=u+t+k+I
@@ -14547,19 +14549,19 @@ case"=":t=u+I+t+k
14547
14549
  break
14548
14550
  case"^":t=I.slice(0,_=I.length>>1)+u+t+k+I.slice(_)
14549
14551
  break
14550
- default:t=I+u+t+k}return a(t)}return g=void 0===g?6:/[gprs]/.test(b)?Math.max(1,Math.min(21,g)):Math.max(0,Math.min(20,g)),k.toString=function(){return t+""},k}return{format:h,formatPrefix:function(t,e){var n=h(((t=$K(t)).type="f",t)),i=3*Math.max(-8,Math.min(8,Math.floor(_K(e)/3))),s=Math.pow(10,-i),o=LK[8+i/3]
14551
- return function(t){return n(s*t)+o}}}}function PK(t,e,n,i){var s,o=function(t,e,n){n=+n
14552
- const i=(e=+e)<(t=+t),s=i?dK(e,t,n):dK(t,e,n)
14552
+ default:t=I+u+t+k}return a(t)}return g=void 0===g?6:/[gprs]/.test(b)?Math.max(1,Math.min(21,g)):Math.max(0,Math.min(20,g)),k.toString=function(){return t+""},k}return{format:h,formatPrefix:function(t,e){var n=h(((t=EK(t)).type="f",t)),i=3*Math.max(-8,Math.min(8,Math.floor(IK(e)/3))),s=Math.pow(10,-i),o=BK[8+i/3]
14553
+ return function(t){return n(s*t)+o}}}}function zK(t,e,n,i){var s,o=function(t,e,n){n=+n
14554
+ const i=(e=+e)<(t=+t),s=i?hK(e,t,n):hK(t,e,n)
14553
14555
  return(i?-1:1)*(s<0?1/-s:s)}(t,e,n)
14554
- switch((i=$K(null==i?",f":i)).type){case"s":var r=Math.max(Math.abs(t),Math.abs(e))
14555
- return null!=i.precision||isNaN(s=function(t,e){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(_K(e)/3)))-_K(Math.abs(t)))}(o,r))||(i.precision=s),FK(i,r)
14556
- case"":case"e":case"g":case"p":case"r":null!=i.precision||isNaN(s=function(t,e){return t=Math.abs(t),e=Math.abs(e)-t,Math.max(0,_K(e)-_K(t))+1}(o,Math.max(Math.abs(t),Math.abs(e))))||(i.precision=s-("e"===i.type))
14556
+ switch((i=EK(null==i?",f":i)).type){case"s":var r=Math.max(Math.abs(t),Math.abs(e))
14557
+ return null!=i.precision||isNaN(s=function(t,e){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(IK(e)/3)))-IK(Math.abs(t)))}(o,r))||(i.precision=s),NK(i,r)
14558
+ case"":case"e":case"g":case"p":case"r":null!=i.precision||isNaN(s=function(t,e){return t=Math.abs(t),e=Math.abs(e)-t,Math.max(0,IK(e)-IK(t))+1}(o,Math.max(Math.abs(t),Math.abs(e))))||(i.precision=s-("e"===i.type))
14557
14559
  break
14558
- case"f":case"%":null!=i.precision||isNaN(s=function(t){return Math.max(0,-_K(Math.abs(t)))}(o))||(i.precision=s-2*("%"===i.type))}return RK(i)}function zK(t){var e=t.domain
14560
+ case"f":case"%":null!=i.precision||isNaN(s=function(t){return Math.max(0,-IK(Math.abs(t)))}(o))||(i.precision=s-2*("%"===i.type))}return FK(i)}function VK(t){var e=t.domain
14559
14561
  return t.ticks=function(t){var n=e()
14560
14562
  return function(t,e,n){if(!((n=+n)>0))return[]
14561
14563
  if((t=+t)==(e=+e))return[t]
14562
- const i=e<t,[s,o,r]=i?cK(e,t,n):cK(t,e,n)
14564
+ const i=e<t,[s,o,r]=i?dK(e,t,n):dK(t,e,n)
14563
14565
  if(!(o>=s))return[]
14564
14566
  const a=o-s+1,l=new Array(a)
14565
14567
  if(i)if(r<0)for(let t=0;t<a;++t)l[t]=(o-t)/-r
@@ -14567,33 +14569,23 @@ else for(let t=0;t<a;++t)l[t]=(o-t)*r
14567
14569
  else if(r<0)for(let t=0;t<a;++t)l[t]=(s+t)/-r
14568
14570
  else for(let t=0;t<a;++t)l[t]=(s+t)*r
14569
14571
  return l}(n[0],n[n.length-1],null==t?10:t)},t.tickFormat=function(t,n){var i=e()
14570
- return PK(i[0],i[i.length-1],null==t?10:t,n)},t.nice=function(n){null==n&&(n=10)
14572
+ return zK(i[0],i[i.length-1],null==t?10:t,n)},t.nice=function(n){null==n&&(n=10)
14571
14573
  var i,s,o=e(),r=0,a=o.length-1,l=o[r],c=o[a],d=10
14572
- for(c<l&&(s=l,l=c,c=s,s=r,r=a,a=s);d-- >0;){if((s=dK(l,c,n))===i)return o[r]=l,o[a]=c,e(o)
14574
+ for(c<l&&(s=l,l=c,c=s,s=r,r=a,a=s);d-- >0;){if((s=hK(l,c,n))===i)return o[r]=l,o[a]=c,e(o)
14573
14575
  if(s>0)l=Math.floor(l/s)*s,c=Math.ceil(c/s)*s
14574
14576
  else{if(!(s<0))break
14575
- l=Math.ceil(l*s)/s,c=Math.floor(c*s)/s}i=s}return t},t}function VK(){var t=kK()(yK,yK)
14576
- return t.copy=function(){return e=t,VK().domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())
14577
- var e},pK.apply(t,arguments),zK(t)}function HK(){var t,e=[],n=[],i=[]
14577
+ l=Math.ceil(l*s)/s,c=Math.floor(c*s)/s}i=s}return t},t}function HK(){var t=SK()(wK,wK)
14578
+ return t.copy=function(){return e=t,HK().domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())
14579
+ var e},fK.apply(t,arguments),VK(t)}function UK(){var t,e=[],n=[],i=[]
14578
14580
  function s(){var t=0,s=Math.max(1,n.length)
14579
- for(i=new Array(s-1);++t<s;)i[t-1]=hK(e,t/s)
14580
- return o}function o(e){return null==e||isNaN(e=+e)?t:n[nK(i,e)]}return o.invertExtent=function(t){var s=n.indexOf(t)
14581
+ for(i=new Array(s-1);++t<s;)i[t-1]=uK(e,t/s)
14582
+ return o}function o(e){return null==e||isNaN(e=+e)?t:n[iK(i,e)]}return o.invertExtent=function(t){var s=n.indexOf(t)
14581
14583
  return s<0?[NaN,NaN]:[s>0?i[s-1]:e[0],s<i.length?i[s]:e[e.length-1]]},o.domain=function(t){if(!arguments.length)return e.slice()
14582
14584
  e=[]
14583
14585
  for(let n of t)null==n||isNaN(n=+n)||e.push(n)
14584
- return e.sort(XZ),s()},o.range=function(t){return arguments.length?(n=Array.from(t),s()):n.slice()},o.unknown=function(e){return arguments.length?(t=e,o):t},o.quantiles=function(){return i.slice()},o.copy=function(){return HK().domain(e).range(n).unknown(t)},pK.apply(o,arguments)}OK=BK({thousands:",",grouping:[3],currency:["$",""]}),RK=OK.format,FK=OK.formatPrefix
14585
- const UK="bottom-left",qK="bottom-right",jK="top-left",WK="top",GK="show",ZK="hide",KK="linear",YK="ordinal"
14586
- class XK{get labelsFontSize(){return this._labelsFontSize}get diesRenderInfo(){return this._diesRenderInfo}constructor(t){this.wafermap=t,this.fontSizeFactor=.8,this.nonHighlightedOpacity=.3,this.emptyDieColor="rgba(218,223,236,1)",this.nanDieColor="rgba(122,122,122,1)"}updateLabelsFontSize(){this._labelsFontSize=this.calculateLabelsFontSize(this.wafermap.dataManager.dieDimensions,this.wafermap.maxCharacters),this.updateDiesRenderInfo()}updateDiesRenderInfo(){this.d3ColorScale=this.createD3ColorScale(this.wafermap.colorScale,this.wafermap.colorScaleMode)
14587
- const t=t=>null!==t
14588
- void 0===this.wafermap.diesTable&&(this._diesRenderInfo=this.wafermap.dies.map((t=>this.computeDieRenderInfo(t))).filter(t))}computeDieRenderInfo(t){const e=this.wafermap.dataManager.margin,n=this.wafermap.dataManager.horizontalScale(t.x),i=this.wafermap.dataManager.verticalScale(t.y)
14589
- return void 0===n||void 0===i?null:{x:n+e.right,y:i+e.top,fillStyle:this.calculateFillStyle(t.value,this.wafermap.colorScaleMode,this.wafermap.highlightedTags,t.tags),text:this.buildLabel(t.value,this.wafermap.maxCharacters,this.wafermap.dieLabelsHidden,this.wafermap.dieLabelsSuffix)}}calculateLabelsFontSize(t,e){return Math.min(t.height,t.width/(.5*Math.max(2,e))*this.fontSizeFactor)}createD3ColorScale(t,e){return this.isColorScaleLinear(e)?VK().domain(t.values.map((t=>+t))).range(t.colors):mK().domain(t.values).range(t.colors)}dieHasData(t){return null!=t&&""!==t}buildLabel(t,e,n,i){if(n||!this.dieHasData(t))return""
14590
- const s=`${t}${i}`
14591
- return s.length>=e?`${s.substring(0,e)}…`:s}calculateOpacity(t,e){if(!e||0===e.length)return 1
14592
- const n=new Set(e)
14593
- return t?.some((t=>n.has(t)))?1:this.nonHighlightedOpacity}isColorScaleLinear(t){return t===KK}isColorScaleOrdinal(t){return t===YK}calculateFillStyle(t,e,n,i){let s=this.emptyDieColor
14594
- if(this.dieHasData(t)&&(isNaN(+t)?s=this.nanDieColor:this.isColorScaleLinear(e)?s=this.d3ColorScale(+t):this.isColorScaleOrdinal(e)&&(s=this.d3ColorScale(t))),void 0===s)return this.emptyDieColor
14595
- let o=eo(s)
14596
- return null===o?this.emptyDieColor:(o=new Gs(o.r,o.g,o.b,this.calculateOpacity(i,n)),o.toStringWebRGBA())}}class JK{get containerDimensions(){return this.computations.containerDimensions}get dieDimensions(){return this.computations.dieDimensions}get radius(){return this.computations.radius}get margin(){return this.computations.margin}get horizontalScale(){return this.computations.horizontalScale}get invertedHorizontalScale(){return this.computations.invertedHorizontalScale}get verticalScale(){return this.computations.verticalScale}get invertedVerticalScale(){return this.computations.invertedVerticalScale}get labelsFontSize(){return this.prerendering.labelsFontSize}get diesRenderInfo(){return this.prerendering.diesRenderInfo}get data(){return this.dataMap}constructor(t){this.wafermap=t,this.computations=new class{get containerDimensions(){return this._containerDimensions}get dieDimensions(){return this._dieDimensions}get radius(){return this._radius}get margin(){return this._margin}get horizontalScale(){return this._horizontalScale}get verticalScale(){return this._verticalScale}get invertedHorizontalScale(){return this._invertedHorizontalScale}get invertedVerticalScale(){return this._invertedVerticalScale}constructor(t){this.wafermap=t,this.defaultPadding=0,this.baseMarginPercentage=.04}updateContainerDimensions(){const t={width:this.wafermap.canvasWidth,height:this.wafermap.canvasHeight},e=Math.min(t.width,t.height),n={top:(t.height-e)/2,right:(t.width-e)/2,bottom:(t.height-e)/2,left:(t.width-e)/2},i={top:e*this.baseMarginPercentage,right:e*this.baseMarginPercentage,bottom:e*this.baseMarginPercentage,left:e*this.baseMarginPercentage}
14586
+ return e.sort(JZ),s()},o.range=function(t){return arguments.length?(n=Array.from(t),s()):n.slice()},o.unknown=function(e){return arguments.length?(t=e,o):t},o.quantiles=function(){return i.slice()},o.copy=function(){return UK().domain(e).range(n).unknown(t)},fK.apply(o,arguments)}RK=PK({thousands:",",grouping:[3],currency:["$",""]}),FK=RK.format,NK=RK.formatPrefix
14587
+ const qK="bottom-left",jK="bottom-right",WK="top-left",GK="top",ZK="show",KK="hide",YK="linear",XK="ordinal"
14588
+ let JK=class{get containerDimensions(){return this._containerDimensions}get dieDimensions(){return this._dieDimensions}get radius(){return this._radius}get margin(){return this._margin}get horizontalScale(){return this._horizontalScale}get verticalScale(){return this._verticalScale}get invertedHorizontalScale(){return this._invertedHorizontalScale}get invertedVerticalScale(){return this._invertedVerticalScale}constructor(t){this.wafermap=t,this.defaultPadding=0,this.baseMarginPercentage=.04}updateContainerDimensions(){const t={width:this.wafermap.canvasWidth,height:this.wafermap.canvasHeight},e=Math.min(t.width,t.height),n={top:(t.height-e)/2,right:(t.width-e)/2,bottom:(t.height-e)/2,left:(t.width-e)/2},i={top:e*this.baseMarginPercentage,right:e*this.baseMarginPercentage,bottom:e*this.baseMarginPercentage,left:e*this.baseMarginPercentage}
14597
14589
  this._margin=this.calculateMarginAddition(i,n),this._containerDimensions=this.calculateContainerDimensions(t,this._margin)
14598
14590
  const s=Math.min(this._containerDimensions.width,this._containerDimensions.height)
14599
14591
  this._radius=s/2,this.updateScales()}updateScales(){const t=Math.min(this._containerDimensions.width,this._containerDimensions.height),e=this.gridDimensionsValidAndDefined()?this.calculateGridDimensionsFromBoundingBox():this.calculateGridDimensionsFromDies(this.wafermap.dies),n=this.wafermap.originLocation
@@ -14603,11 +14595,22 @@ this._dieDimensions={width:isNaN(i)?0:i,height:isNaN(s)?0:s}}gridDimensionsValid
14603
14595
  return"number"==typeof this.wafermap.gridMaxY&&"number"==typeof this.wafermap.gridMinY&&"number"==typeof this.wafermap.gridMaxX&&"number"==typeof this.wafermap.gridMinX&&(t.origin.x=this.wafermap.gridMinX,t.origin.y=this.wafermap.gridMinY,t.rows=this.wafermap.gridMaxY-this.wafermap.gridMinY+1,t.cols=this.wafermap.gridMaxX-this.wafermap.gridMinX+1),t}calculateGridDimensionsFromDies(t){if(0===t.length||void 0===t[0])return{origin:{x:0,y:0},rows:0,cols:0}
14604
14596
  const e={x:t[0].x,y:t[0].y},n={x:t[0].x,y:t[0].y}
14605
14597
  for(const i of t)i.x<e.x&&(e.x=i.x),i.y<e.y&&(e.y=i.y),i.x>n.x&&(n.x=i.x),i.y>n.y&&(n.y=i.y)
14606
- return{origin:e,rows:n.y-e.y+1,cols:n.x-e.x+1}}calculateContainerDimensions(t,e){return{width:t.width-e.left-e.right,height:t.height-e.top-e.bottom}}createHorizontalScale(t,e,n){const i=gK().domain(uK(e.origin.x,e.origin.x+e.cols)).paddingInner(0).paddingOuter(0).align(0).round(!1)
14607
- return t===UK||t===jK?i.range([0,n]):i.range([n,0])}createInvertedHorizontalScale(t,e,n){const i=HK().domain([0,n])
14608
- return t===UK||t===jK?i.range(uK(e.origin.x,e.origin.x+e.cols)):i.range(uK(e.origin.x,e.origin.x+e.cols).reverse())}createVerticalScale(t,e,n){const i=gK().domain(uK(e.origin.y,e.origin.y+e.rows)).paddingInner(this.defaultPadding).paddingOuter(0).align(0).round(!1)
14609
- return t===UK||t===qK?i.range([n,0]):i.range([0,n])}createInvertedVerticalScale(t,e,n){const i=HK().domain([0,n])
14610
- return t===UK||t===qK?i.range(uK(e.origin.y,e.origin.y+e.rows).reverse()):i.range(uK(e.origin.y,e.origin.y+e.rows))}calculateMarginAddition(t,e){return{top:t.top+e.top,right:t.right+e.right,bottom:t.bottom+e.bottom,left:t.left+e.left}}}(t),this.prerendering=new XK(t)}updateContainerDimensions(){this.computations.updateContainerDimensions(),this.updateDataMap(),this.updateLabelsFontSize()}updateScales(){this.computations.updateScales(),this.updateDataMap(),this.updateLabelsFontSize()}updateLabelsFontSize(){this.prerendering.updateLabelsFontSize()}updateDiesRenderInfo(){this.prerendering.updateDiesRenderInfo()}getWaferMapDie(t){return this.dataMap.get(`${t.x}_${t.y}`)}updateDataMap(){this.dataMap=new Map(this.wafermap.dies.map((t=>[`${t.x}_${t.y}`,t])))}}class QK{constructor(t){this.wafermap=t,this.minDieDim=50}updateSortedDiesAndDrawWafer(){this.dies=this.wafermap.dataManager.diesRenderInfo.sort(((t,e)=>t.fillStyle>e.fillStyle?1:e.fillStyle>t.fillStyle?-1:0)),this.drawWafer()}drawWafer(){this.wafermap.canvasContext.save(),this.clearCanvas(),this.scaleCanvas(),this.renderDies(),this.renderText(),this.wafermap.canvasContext.restore(),this.renderHover()}renderHover(){void 0!==this.wafermap.dataManager.dieDimensions&&void 0!==this.wafermap.transform&&(this.wafermap.hoverWidth=this.wafermap.dataManager.dieDimensions.width*this.wafermap.transform.k,this.wafermap.hoverHeight=this.wafermap.dataManager.dieDimensions.height*this.wafermap.transform.k,this.wafermap.hoverOpacity=void 0===this.wafermap.hoverDie?ZK:GK,this.wafermap.hoverTransform=this.calculateHoverTransform())}calculateHoverTransform(){if(void 0!==this.wafermap.hoverDie){const t=this.wafermap.dataManager.horizontalScale(this.wafermap.hoverDie.x)
14598
+ return{origin:e,rows:n.y-e.y+1,cols:n.x-e.x+1}}calculateContainerDimensions(t,e){return{width:t.width-e.left-e.right,height:t.height-e.top-e.bottom}}createHorizontalScale(t,e,n){const i=vK().domain(pK(e.origin.x,e.origin.x+e.cols)).paddingInner(0).paddingOuter(0).align(0).round(!1)
14599
+ return t===qK||t===WK?i.range([0,n]):i.range([n,0])}createInvertedHorizontalScale(t,e,n){const i=UK().domain([0,n])
14600
+ return t===qK||t===WK?i.range(pK(e.origin.x,e.origin.x+e.cols)):i.range(pK(e.origin.x,e.origin.x+e.cols).reverse())}createVerticalScale(t,e,n){const i=vK().domain(pK(e.origin.y,e.origin.y+e.rows)).paddingInner(this.defaultPadding).paddingOuter(0).align(0).round(!1)
14601
+ return t===qK||t===jK?i.range([n,0]):i.range([0,n])}createInvertedVerticalScale(t,e,n){const i=UK().domain([0,n])
14602
+ return t===qK||t===jK?i.range(pK(e.origin.y,e.origin.y+e.rows).reverse()):i.range(pK(e.origin.y,e.origin.y+e.rows))}calculateMarginAddition(t,e){return{top:t.top+e.top,right:t.right+e.right,bottom:t.bottom+e.bottom,left:t.left+e.left}}}
14603
+ class QK{get labelsFontSize(){return this._labelsFontSize}get diesRenderInfo(){return this._diesRenderInfo}constructor(t){this.wafermap=t,this.fontSizeFactor=.8,this.nonHighlightedOpacity=.3,this.emptyDieColor="rgba(218,223,236,1)",this.nanDieColor="rgba(122,122,122,1)"}updateLabelsFontSize(){this._labelsFontSize=this.calculateLabelsFontSize(this.wafermap.dataManager.dieDimensions,this.wafermap.maxCharacters),this.updateDiesRenderInfo()}updateDiesRenderInfo(){this.d3ColorScale=this.createD3ColorScale(this.wafermap.colorScale,this.wafermap.colorScaleMode)
14604
+ const t=t=>null!==t
14605
+ void 0===this.wafermap.diesTable&&(this._diesRenderInfo=this.wafermap.dies.map((t=>this.computeDieRenderInfo(t))).filter(t))}computeDieRenderInfo(t){const e=this.wafermap.dataManager.margin,n=this.wafermap.dataManager.horizontalScale(t.x),i=this.wafermap.dataManager.verticalScale(t.y)
14606
+ return void 0===n||void 0===i?null:{x:n+e.right,y:i+e.top,fillStyle:this.calculateFillStyle(t.value,this.wafermap.colorScaleMode,this.wafermap.highlightedTags,t.tags),text:this.buildLabel(t.value,this.wafermap.maxCharacters,this.wafermap.dieLabelsHidden,this.wafermap.dieLabelsSuffix)}}calculateLabelsFontSize(t,e){return Math.min(t.height,t.width/(.5*Math.max(2,e))*this.fontSizeFactor)}createD3ColorScale(t,e){return this.isColorScaleLinear(e)?HK().domain(t.values.map((t=>+t))).range(t.colors):gK().domain(t.values).range(t.colors)}dieHasData(t){return null!=t&&""!==t}buildLabel(t,e,n,i){if(n||!this.dieHasData(t))return""
14607
+ const s=`${t}${i}`
14608
+ return s.length>=e?`${s.substring(0,e)}…`:s}calculateOpacity(t,e){if(!e||0===e.length)return 1
14609
+ const n=new Set(e)
14610
+ return t?.some((t=>n.has(t)))?1:this.nonHighlightedOpacity}isColorScaleLinear(t){return t===YK}isColorScaleOrdinal(t){return t===XK}calculateFillStyle(t,e,n,i){let s=this.emptyDieColor
14611
+ if(this.dieHasData(t)&&(isNaN(+t)?s=this.nanDieColor:this.isColorScaleLinear(e)?s=this.d3ColorScale(+t):this.isColorScaleOrdinal(e)&&(s=this.d3ColorScale(t))),void 0===s)return this.emptyDieColor
14612
+ let o=eo(s)
14613
+ return null===o?this.emptyDieColor:(o=new Gs(o.r,o.g,o.b,this.calculateOpacity(i,n)),o.toStringWebRGBA())}}class tY{get containerDimensions(){return this.computations.containerDimensions}get dieDimensions(){return this.computations.dieDimensions}get radius(){return this.computations.radius}get margin(){return this.computations.margin}get horizontalScale(){return this.computations.horizontalScale}get invertedHorizontalScale(){return this.computations.invertedHorizontalScale}get verticalScale(){return this.computations.verticalScale}get invertedVerticalScale(){return this.computations.invertedVerticalScale}get labelsFontSize(){return this.prerendering.labelsFontSize}get diesRenderInfo(){return this.prerendering.diesRenderInfo}get data(){return this.dataMap}constructor(t){this.wafermap=t,this.computations=new JK(t),this.prerendering=new QK(t)}updateContainerDimensions(){this.computations.updateContainerDimensions(),this.updateDataMap(),this.updateLabelsFontSize()}updateScales(){this.computations.updateScales(),this.updateDataMap(),this.updateLabelsFontSize()}updateLabelsFontSize(){this.prerendering.updateLabelsFontSize()}updateDiesRenderInfo(){this.prerendering.updateDiesRenderInfo()}getWaferMapDie(t){return this.dataMap.get(`${t.x}_${t.y}`)}updateDataMap(){this.dataMap=new Map(this.wafermap.dies.map((t=>[`${t.x}_${t.y}`,t])))}}class eY{constructor(t){this.wafermap=t,this.minDieDim=50}updateSortedDiesAndDrawWafer(){this.dies=this.wafermap.dataManager.diesRenderInfo.sort(((t,e)=>t.fillStyle>e.fillStyle?1:e.fillStyle>t.fillStyle?-1:0)),this.drawWafer()}drawWafer(){this.wafermap.canvasContext.save(),this.clearCanvas(),this.scaleCanvas(),this.renderDies(),this.renderText(),this.wafermap.canvasContext.restore(),this.renderHover()}renderHover(){void 0!==this.wafermap.dataManager.dieDimensions&&void 0!==this.wafermap.transform&&(this.wafermap.hoverWidth=this.wafermap.dataManager.dieDimensions.width*this.wafermap.transform.k,this.wafermap.hoverHeight=this.wafermap.dataManager.dieDimensions.height*this.wafermap.transform.k,this.wafermap.hoverOpacity=void 0===this.wafermap.hoverDie?KK:ZK,this.wafermap.hoverTransform=this.calculateHoverTransform())}calculateHoverTransform(){if(void 0!==this.wafermap.hoverDie){const t=this.wafermap.dataManager.horizontalScale(this.wafermap.hoverDie.x)
14611
14614
  if(void 0===t)return""
14612
14615
  const e=this.wafermap.dataManager.verticalScale(this.wafermap.hoverDie.y)
14613
14616
  if(void 0===e)return""
@@ -14620,80 +14623,89 @@ if(t*e*(this.wafermap.transform.k||1)>=this.minDieDim){const n=this.wafermap.dat
14620
14623
  i.font=`${n.toString()}px sans-serif`,i.fillStyle="#ffffff",i.textAlign="center",i.lineCap="butt"
14621
14624
  const s=i.measureText("M"),o=this.wafermap.transform.invert([0,0]),r=this.wafermap.transform.invert([this.wafermap.canvas.width,this.wafermap.canvas.height])
14622
14625
  o[0]-=t,o[1]-=e
14623
- for(const n of this.dies)this.isDieVisible(n,o,r)&&i.fillText(n.text,n.x+t/2,n.y+e/2+s.width/2,t-t/100*20)}}clearCanvas(){this.wafermap.canvasContext.clearRect(0,0,this.wafermap.canvas.width,this.wafermap.canvas.height)}scaleCanvas(){this.wafermap.canvasContext.translate(this.wafermap.transform.x,this.wafermap.transform.y),this.wafermap.canvasContext.scale(this.wafermap.transform.k,this.wafermap.transform.k)}isDieVisible(t,e,n){return t.x>=e[0]&&t.x<n[0]&&t.y>=e[1]&&t.y<n[1]}}const tY=["highlightedTags","canvasWidth","canvasHeight","originLocation","gridMinX","gridMaxX","gridMinY","gridMaxY","dies","maxCharacters","colorScale","colorScaleMode","dieLabelsHidden","dieLabelsSuffix","transform","hoverDie"]
14624
- class eY extends RE{constructor(t){super(tY),this.wafermap=t,this.updateQueued=!1}get requiresEventsUpdate(){return this.isTracked("canvasWidth")||this.isTracked("canvasHeight")||this.isTracked("originLocation")||this.isTracked("gridMinX")||this.isTracked("gridMaxX")||this.isTracked("gridMinY")||this.isTracked("gridMaxY")||this.isTracked("dies")||this.isTracked("maxCharacters")||this.isTracked("highlightedTags")||this.isTracked("colorScale")||this.isTracked("colorScaleMode")||this.isTracked("dieLabelsHidden")||this.isTracked("dieLabelsSuffix")||this.isTracked("transform")}get requiresWorkerWaferSetup(){return this.isTracked("canvasWidth")||this.isTracked("canvasHeight")||this.isTracked("originLocation")||this.isTracked("gridMinX")||this.isTracked("gridMaxX")||this.isTracked("gridMinY")||this.isTracked("gridMaxY")||this.isTracked("dies")||this.isTracked("maxCharacters")||this.isTracked("highlightedTags")||this.isTracked("colorScale")||this.isTracked("colorScaleMode")||this.isTracked("dieLabelsHidden")||this.isTracked("dieLabelsSuffix")}get requiresContainerDimensionsUpdate(){return this.isTracked("canvasWidth")||this.isTracked("canvasHeight")}get requiresComponentResizeUpdate(){return this.isTracked("canvasWidth")||this.isTracked("canvasHeight")}get requiresScalesUpdate(){return this.isTracked("originLocation")||this.isTracked("gridMinX")||this.isTracked("gridMaxX")||this.isTracked("gridMinY")||this.isTracked("gridMaxY")||this.isTracked("dies")}get requiresInputDataUpdate(){return this.isTracked("originLocation")||this.isTracked("gridMinX")||this.isTracked("gridMaxX")||this.isTracked("gridMinY")||this.isTracked("gridMaxY")||this.isTracked("dies")}get requiresLabelsFontSizeUpdate(){return this.isTracked("maxCharacters")}get requiresDiesRenderInfoUpdate(){return this.isTracked("highlightedTags")||this.isTracked("colorScale")||this.isTracked("colorScaleMode")||this.isTracked("dieLabelsHidden")||this.isTracked("dieLabelsSuffix")}get requiresColorAndTextUpdate(){return this.isTracked("maxCharacters")||this.isTracked("highlightedTags")||this.isTracked("colorScale")||this.isTracked("colorScaleMode")||this.isTracked("dieLabelsHidden")||this.isTracked("dieLabelsSuffix")}get requiresDrawnWaferUpdate(){return this.isTracked("transform")}get requiresRenderHoverUpdate(){return this.isTracked("hoverDie")}queueUpdate(){this.wafermap.$fastController.isConnected&&!this.updateQueued&&(this.updateQueued=!0,void 0===this.wafermap.currentTask?b.queueUpdate((()=>{this.wafermap.update(),this.untrackAll(),this.updateQueued=!1})):(async()=>{await this.wafermap.currentTask,b.queueUpdate((()=>{this.wafermap.update(),this.untrackAll(),this.updateQueued=!1,this.wafermap.currentTask=void 0}))})())}}class nY{constructor(t){this.wafermap=t,this.invalidGridDimensions=!1,this.invalidDiesTableSchema=!1}getValidity(){return{invalidGridDimensions:this.invalidGridDimensions,invalidDiesTableSchema:this.invalidDiesTableSchema}}isValid(){return Object.values(this.getValidity()).every((t=>!1===t))}validateGridDimensions(){return this.invalidGridDimensions=!1,void 0===this.wafermap.gridMinX&&void 0===this.wafermap.gridMaxX&&void 0===this.wafermap.gridMinY&&void 0===this.wafermap.gridMaxY?this.invalidGridDimensions=!1:("number"!=typeof this.wafermap.gridMinX||"number"!=typeof this.wafermap.gridMaxX||"number"!=typeof this.wafermap.gridMinY||"number"!=typeof this.wafermap.gridMaxY||this.wafermap.gridMaxX<this.wafermap.gridMinX||this.wafermap.gridMaxY<this.wafermap.gridMinY)&&(this.invalidGridDimensions=!0),!this.invalidGridDimensions}validateDiesTableSchema(){if(this.invalidDiesTableSchema=!1,void 0===this.wafermap.diesTable)this.invalidDiesTableSchema=!1
14626
+ for(const n of this.dies)this.isDieVisible(n,o,r)&&i.fillText(n.text,n.x+t/2,n.y+e/2+s.width/2,t-t/100*20)}}clearCanvas(){this.wafermap.canvasContext.clearRect(0,0,this.wafermap.canvas.width,this.wafermap.canvas.height)}scaleCanvas(){this.wafermap.canvasContext.translate(this.wafermap.transform.x,this.wafermap.transform.y),this.wafermap.canvasContext.scale(this.wafermap.transform.k,this.wafermap.transform.k)}isDieVisible(t,e,n){return t.x>=e[0]&&t.x<n[0]&&t.y>=e[1]&&t.y<n[1]}}const nY=["highlightedTags","canvasWidth","canvasHeight","originLocation","gridMinX","gridMaxX","gridMinY","gridMaxY","dies","maxCharacters","colorScale","colorScaleMode","dieLabelsHidden","dieLabelsSuffix","transform","hoverDie"]
14627
+ class iY extends RE{constructor(t){super(nY),this.wafermap=t,this.updateQueued=!1}get requiresEventsUpdate(){return this.isTracked("canvasWidth")||this.isTracked("canvasHeight")||this.isTracked("originLocation")||this.isTracked("gridMinX")||this.isTracked("gridMaxX")||this.isTracked("gridMinY")||this.isTracked("gridMaxY")||this.isTracked("dies")||this.isTracked("maxCharacters")||this.isTracked("highlightedTags")||this.isTracked("colorScale")||this.isTracked("colorScaleMode")||this.isTracked("dieLabelsHidden")||this.isTracked("dieLabelsSuffix")||this.isTracked("transform")}get requiresWorkerWaferSetup(){return this.isTracked("canvasWidth")||this.isTracked("canvasHeight")||this.isTracked("originLocation")||this.isTracked("gridMinX")||this.isTracked("gridMaxX")||this.isTracked("gridMinY")||this.isTracked("gridMaxY")||this.isTracked("dies")||this.isTracked("maxCharacters")||this.isTracked("highlightedTags")||this.isTracked("colorScale")||this.isTracked("colorScaleMode")||this.isTracked("dieLabelsHidden")||this.isTracked("dieLabelsSuffix")}get requiresContainerDimensionsUpdate(){return this.isTracked("canvasWidth")||this.isTracked("canvasHeight")}get requiresComponentResizeUpdate(){return this.isTracked("canvasWidth")||this.isTracked("canvasHeight")}get requiresScalesUpdate(){return this.isTracked("originLocation")||this.isTracked("gridMinX")||this.isTracked("gridMaxX")||this.isTracked("gridMinY")||this.isTracked("gridMaxY")||this.isTracked("dies")}get requiresInputDataUpdate(){return this.isTracked("originLocation")||this.isTracked("gridMinX")||this.isTracked("gridMaxX")||this.isTracked("gridMinY")||this.isTracked("gridMaxY")||this.isTracked("dies")}get requiresLabelsFontSizeUpdate(){return this.isTracked("maxCharacters")}get requiresDiesRenderInfoUpdate(){return this.isTracked("highlightedTags")||this.isTracked("colorScale")||this.isTracked("colorScaleMode")||this.isTracked("dieLabelsHidden")||this.isTracked("dieLabelsSuffix")}get requiresColorAndTextUpdate(){return this.isTracked("maxCharacters")||this.isTracked("highlightedTags")||this.isTracked("colorScale")||this.isTracked("colorScaleMode")||this.isTracked("dieLabelsHidden")||this.isTracked("dieLabelsSuffix")}get requiresDrawnWaferUpdate(){return this.isTracked("transform")}get requiresRenderHoverUpdate(){return this.isTracked("hoverDie")}queueUpdate(){this.wafermap.$fastController.isConnected&&!this.updateQueued&&(this.updateQueued=!0,void 0===this.wafermap.currentTask?b.queueUpdate((()=>{this.wafermap.update(),this.untrackAll(),this.updateQueued=!1})):(async()=>{await this.wafermap.currentTask,b.queueUpdate((()=>{this.wafermap.update(),this.untrackAll(),this.updateQueued=!1,this.wafermap.currentTask=void 0}))})())}}class sY{constructor(t){this.wafermap=t,this.invalidGridDimensions=!1,this.invalidDiesTableSchema=!1}getValidity(){return{invalidGridDimensions:this.invalidGridDimensions,invalidDiesTableSchema:this.invalidDiesTableSchema}}isValid(){return Object.values(this.getValidity()).every((t=>!1===t))}validateGridDimensions(){return this.invalidGridDimensions=!1,void 0===this.wafermap.gridMinX&&void 0===this.wafermap.gridMaxX&&void 0===this.wafermap.gridMinY&&void 0===this.wafermap.gridMaxY?this.invalidGridDimensions=!1:("number"!=typeof this.wafermap.gridMinX||"number"!=typeof this.wafermap.gridMaxX||"number"!=typeof this.wafermap.gridMinY||"number"!=typeof this.wafermap.gridMaxY||this.wafermap.gridMaxX<this.wafermap.gridMinX||this.wafermap.gridMaxY<this.wafermap.gridMinY)&&(this.invalidGridDimensions=!0),!this.invalidGridDimensions}validateDiesTableSchema(){if(this.invalidDiesTableSchema=!1,void 0===this.wafermap.diesTable)this.invalidDiesTableSchema=!1
14625
14628
  else{const t=this.wafermap.diesTable.schema.fields,e=t.find((t=>"colIndex"===t.name)),n=t.find((t=>"rowIndex"===t.name)),i=t.find((t=>"value"===t.name))
14626
- e&&n&&i&&Mq.isInt(e.type)&&32===e.type.bitWidth&&Mq.isInt(n.type)&&32===n.type.bitWidth&&Mq.isFloat(i.type)&&i.type.precision===XH.DOUBLE||(this.invalidDiesTableSchema=!0)}return!this.invalidDiesTableSchema}}
14629
+ e&&n&&i&&$q.isInt(e.type)&&32===e.type.bitWidth&&$q.isInt(n.type)&&32===n.type.bitWidth&&$q.isFloat(i.type)&&i.type.precision===JH.DOUBLE||(this.invalidDiesTableSchema=!0)}return!this.invalidDiesTableSchema}}
14627
14630
  /**
14628
14631
  * @license
14629
14632
  * Copyright 2019 Google LLC
14630
14633
  * SPDX-License-Identifier: Apache-2.0
14631
- */const iY=Symbol("Comlink.proxy"),sY=Symbol("Comlink.endpoint"),oY=Symbol("Comlink.releaseProxy"),rY=Symbol("Comlink.finalizer"),aY=Symbol("Comlink.thrown"),lY=t=>"object"==typeof t&&null!==t||"function"==typeof t,cY=new Map([["proxy",{canHandle:t=>lY(t)&&t[iY],serialize(t){const{port1:e,port2:n}=new MessageChannel
14632
- return dY(t,e),[n,[n]]},deserialize:t=>(t.start(),uY(t))}],["throw",{canHandle:t=>lY(t)&&aY in t,serialize({value:t}){let e
14634
+ */const oY=Symbol("Comlink.proxy"),rY=Symbol("Comlink.endpoint"),aY=Symbol("Comlink.releaseProxy"),lY=Symbol("Comlink.finalizer"),cY=Symbol("Comlink.thrown"),dY=t=>"object"==typeof t&&null!==t||"function"==typeof t,hY=new Map([["proxy",{canHandle:t=>dY(t)&&t[oY],serialize(t){const{port1:e,port2:n}=new MessageChannel
14635
+ return uY(t,e),[n,[n]]},deserialize:t=>(t.start(),fY(t))}],["throw",{canHandle:t=>dY(t)&&cY in t,serialize({value:t}){let e
14633
14636
  return e=t instanceof Error?{isError:!0,value:{message:t.message,name:t.name,stack:t.stack}}:{isError:!1,value:t},[e,[]]},deserialize(t){if(t.isError)throw Object.assign(new Error(t.value.message),t.value)
14634
14637
  throw t.value}}]])
14635
- function dY(t,e=globalThis,n=["*"]){e.addEventListener("message",(function i(s){if(!s||!s.data)return
14638
+ function uY(t,e=globalThis,n=["*"]){e.addEventListener("message",(function i(s){if(!s||!s.data)return
14636
14639
  if(!function(t,e){for(const n of t){if(e===n||"*"===n)return!0
14637
14640
  if(n instanceof RegExp&&n.test(e))return!0}return!1}(n,s.origin))return void console.warn(`Invalid origin '${s.origin}' for comlink proxy`)
14638
- const{id:o,type:r,path:a}=Object.assign({path:[]},s.data),l=(s.data.argumentList||[]).map(CY)
14641
+ const{id:o,type:r,path:a}=Object.assign({path:[]},s.data),l=(s.data.argumentList||[]).map(SY)
14639
14642
  let c
14640
14643
  try{const e=a.slice(0,-1).reduce(((t,e)=>t[e]),t),n=a.reduce(((t,e)=>t[e]),t)
14641
14644
  switch(r){case"GET":c=n
14642
14645
  break
14643
- case"SET":e[a.slice(-1)[0]]=CY(s.data.value),c=!0
14646
+ case"SET":e[a.slice(-1)[0]]=SY(s.data.value),c=!0
14644
14647
  break
14645
14648
  case"APPLY":c=n.apply(e,l)
14646
14649
  break
14647
- case"CONSTRUCT":c=function(t){return Object.assign(t,{[iY]:!0})}(new n(...l))
14650
+ case"CONSTRUCT":c=function(t){return Object.assign(t,{[oY]:!0})}(new n(...l))
14648
14651
  break
14649
14652
  case"ENDPOINT":{const{port1:e,port2:n}=new MessageChannel
14650
- dY(t,n),c=wY(e,[e])}break
14653
+ uY(t,n),c=CY(e,[e])}break
14651
14654
  case"RELEASE":c=void 0
14652
14655
  break
14653
- default:return}}catch(t){c={value:t,[aY]:0}}Promise.resolve(c).catch((t=>({value:t,[aY]:0}))).then((n=>{const[s,a]=xY(n)
14654
- e.postMessage(Object.assign(Object.assign({},s),{id:o}),a),"RELEASE"===r&&(e.removeEventListener("message",i),hY(e),rY in t&&"function"==typeof t[rY]&&t[rY]())})).catch((t=>{const[n,i]=xY({value:new TypeError("Unserializable return value"),[aY]:0})
14655
- e.postMessage(Object.assign(Object.assign({},n),{id:o}),i)}))})),e.start&&e.start()}function hY(t){(function(t){return"MessagePort"===t.constructor.name})(t)&&t.close()}function uY(t,e){return vY(t,[],e)}function pY(t){if(t)throw new Error("Proxy has been released and is not useable")}function fY(t){return kY(t,{type:"RELEASE"}).then((()=>{hY(t)}))}const mY=new WeakMap,gY="FinalizationRegistry"in globalThis&&new FinalizationRegistry((t=>{const e=(mY.get(t)||0)-1
14656
- mY.set(t,e),0===e&&fY(t)}))
14657
- function vY(t,e=[],n=function(){}){let i=!1
14658
- const s=new Proxy(n,{get(n,o){if(pY(i),o===oY)return()=>{!function(t){gY&&gY.unregister(t)}(s),fY(t),i=!0}
14656
+ default:return}}catch(t){c={value:t,[cY]:0}}Promise.resolve(c).catch((t=>({value:t,[cY]:0}))).then((n=>{const[s,a]=kY(n)
14657
+ e.postMessage(Object.assign(Object.assign({},s),{id:o}),a),"RELEASE"===r&&(e.removeEventListener("message",i),pY(e),lY in t&&"function"==typeof t[lY]&&t[lY]())})).catch((t=>{const[n,i]=kY({value:new TypeError("Unserializable return value"),[cY]:0})
14658
+ e.postMessage(Object.assign(Object.assign({},n),{id:o}),i)}))})),e.start&&e.start()}function pY(t){(function(t){return"MessagePort"===t.constructor.name})(t)&&t.close()}function fY(t,e){return yY(t,[],e)}function mY(t){if(t)throw new Error("Proxy has been released and is not useable")}function gY(t){return _Y(t,{type:"RELEASE"}).then((()=>{pY(t)}))}const vY=new WeakMap,bY="FinalizationRegistry"in globalThis&&new FinalizationRegistry((t=>{const e=(vY.get(t)||0)-1
14659
+ vY.set(t,e),0===e&&gY(t)}))
14660
+ function yY(t,e=[],n=function(){}){let i=!1
14661
+ const s=new Proxy(n,{get(n,o){if(mY(i),o===aY)return()=>{!function(t){bY&&bY.unregister(t)}(s),gY(t),i=!0}
14659
14662
  if("then"===o){if(0===e.length)return{then:()=>s}
14660
- const n=kY(t,{type:"GET",path:e.map((t=>t.toString()))}).then(CY)
14661
- return n.then.bind(n)}return vY(t,[...e,o])},set(n,s,o){pY(i)
14662
- const[r,a]=xY(o)
14663
- return kY(t,{type:"SET",path:[...e,s].map((t=>t.toString())),value:r},a).then(CY)},apply(n,s,o){pY(i)
14663
+ const n=_Y(t,{type:"GET",path:e.map((t=>t.toString()))}).then(SY)
14664
+ return n.then.bind(n)}return yY(t,[...e,o])},set(n,s,o){mY(i)
14665
+ const[r,a]=kY(o)
14666
+ return _Y(t,{type:"SET",path:[...e,s].map((t=>t.toString())),value:r},a).then(SY)},apply(n,s,o){mY(i)
14664
14667
  const r=e[e.length-1]
14665
- if(r===sY)return kY(t,{type:"ENDPOINT"}).then(CY)
14666
- if("bind"===r)return vY(t,e.slice(0,-1))
14667
- const[a,l]=bY(o)
14668
- return kY(t,{type:"APPLY",path:e.map((t=>t.toString())),argumentList:a},l).then(CY)},construct(n,s){pY(i)
14669
- const[o,r]=bY(s)
14670
- return kY(t,{type:"CONSTRUCT",path:e.map((t=>t.toString())),argumentList:o},r).then(CY)}})
14671
- return function(t,e){const n=(mY.get(e)||0)+1
14672
- mY.set(e,n),gY&&gY.register(t,e,t)}(s,t),s}function bY(t){const e=t.map(xY)
14668
+ if(r===rY)return _Y(t,{type:"ENDPOINT"}).then(SY)
14669
+ if("bind"===r)return yY(t,e.slice(0,-1))
14670
+ const[a,l]=wY(o)
14671
+ return _Y(t,{type:"APPLY",path:e.map((t=>t.toString())),argumentList:a},l).then(SY)},construct(n,s){mY(i)
14672
+ const[o,r]=wY(s)
14673
+ return _Y(t,{type:"CONSTRUCT",path:e.map((t=>t.toString())),argumentList:o},r).then(SY)}})
14674
+ return function(t,e){const n=(vY.get(e)||0)+1
14675
+ vY.set(e,n),bY&&bY.register(t,e,t)}(s,t),s}function wY(t){const e=t.map(kY)
14673
14676
  return[e.map((t=>t[0])),(n=e.map((t=>t[1])),Array.prototype.concat.apply([],n))]
14674
- var n}const yY=new WeakMap
14675
- function wY(t,e){return yY.set(t,e),t}function xY(t){for(const[e,n]of cY)if(n.canHandle(t)){const[i,s]=n.serialize(t)
14676
- return[{type:"HANDLER",name:e,value:i},s]}return[{type:"RAW",value:t},yY.get(t)||[]]}function CY(t){switch(t.type){case"HANDLER":return cY.get(t.name).deserialize(t.value)
14677
- case"RAW":return t.value}}function kY(t,e,n){return new Promise((i=>{const s=new Array(4).fill(0).map((()=>Math.floor(Math.random()*Number.MAX_SAFE_INTEGER).toString(16))).join("-")
14678
- t.addEventListener("message",(function e(n){n.data&&n.data.id&&n.data.id===s&&(t.removeEventListener("message",e),i(n.data))})),t.start&&t.start(),t.postMessage(Object.assign({id:s},e),n)}))}let SY
14679
- class _Y{constructor(t){this.wafermap=t,this.minDieDim=100}async setupWafer(t){if(void 0===this.matrixRenderer){const{matrixRenderer:t}=await(async()=>{if(void 0===SY){const t=new Blob(['var MatrixRenderer = (function (exports) {\n \'use strict\';\n\n /**\n * @license\n * Copyright 2019 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n const proxyMarker = Symbol("Comlink.proxy");\n const createEndpoint = Symbol("Comlink.endpoint");\n const releaseProxy = Symbol("Comlink.releaseProxy");\n const finalizer = Symbol("Comlink.finalizer");\n const throwMarker = Symbol("Comlink.thrown");\n const isObject = (val) => (typeof val === "object" && val !== null) || typeof val === "function";\n /**\n * Internal transfer handle to handle objects marked to proxy.\n */\n const proxyTransferHandler = {\n canHandle: (val) => isObject(val) && val[proxyMarker],\n serialize(obj) {\n const { port1, port2 } = new MessageChannel();\n expose(obj, port1);\n return [port2, [port2]];\n },\n deserialize(port) {\n port.start();\n return wrap(port);\n },\n };\n /**\n * Internal transfer handler to handle thrown exceptions.\n */\n const throwTransferHandler = {\n canHandle: (value) => isObject(value) && throwMarker in value,\n serialize({ value }) {\n let serialized;\n if (value instanceof Error) {\n serialized = {\n isError: true,\n value: {\n message: value.message,\n name: value.name,\n stack: value.stack,\n },\n };\n }\n else {\n serialized = { isError: false, value };\n }\n return [serialized, []];\n },\n deserialize(serialized) {\n if (serialized.isError) {\n throw Object.assign(new Error(serialized.value.message), serialized.value);\n }\n throw serialized.value;\n },\n };\n /**\n * Allows customizing the serialization of certain values.\n */\n const transferHandlers = new Map([\n ["proxy", proxyTransferHandler],\n ["throw", throwTransferHandler],\n ]);\n function isAllowedOrigin(allowedOrigins, origin) {\n for (const allowedOrigin of allowedOrigins) {\n if (origin === allowedOrigin || allowedOrigin === "*") {\n return true;\n }\n if (allowedOrigin instanceof RegExp && allowedOrigin.test(origin)) {\n return true;\n }\n }\n return false;\n }\n function expose(obj, ep = globalThis, allowedOrigins = ["*"]) {\n ep.addEventListener("message", function callback(ev) {\n if (!ev || !ev.data) {\n return;\n }\n if (!isAllowedOrigin(allowedOrigins, ev.origin)) {\n console.warn(`Invalid origin \'${ev.origin}\' for comlink proxy`);\n return;\n }\n const { id, type, path } = Object.assign({ path: [] }, ev.data);\n const argumentList = (ev.data.argumentList || []).map(fromWireValue);\n let returnValue;\n try {\n const parent = path.slice(0, -1).reduce((obj, prop) => obj[prop], obj);\n const rawValue = path.reduce((obj, prop) => obj[prop], obj);\n switch (type) {\n case "GET" /* MessageType.GET */:\n {\n returnValue = rawValue;\n }\n break;\n case "SET" /* MessageType.SET */:\n {\n parent[path.slice(-1)[0]] = fromWireValue(ev.data.value);\n returnValue = true;\n }\n break;\n case "APPLY" /* MessageType.APPLY */:\n {\n returnValue = rawValue.apply(parent, argumentList);\n }\n break;\n case "CONSTRUCT" /* MessageType.CONSTRUCT */:\n {\n const value = new rawValue(...argumentList);\n returnValue = proxy(value);\n }\n break;\n case "ENDPOINT" /* MessageType.ENDPOINT */:\n {\n const { port1, port2 } = new MessageChannel();\n expose(obj, port2);\n returnValue = transfer(port1, [port1]);\n }\n break;\n case "RELEASE" /* MessageType.RELEASE */:\n {\n returnValue = undefined;\n }\n break;\n default:\n return;\n }\n }\n catch (value) {\n returnValue = { value, [throwMarker]: 0 };\n }\n Promise.resolve(returnValue)\n .catch((value) => {\n return { value, [throwMarker]: 0 };\n })\n .then((returnValue) => {\n const [wireValue, transferables] = toWireValue(returnValue);\n ep.postMessage(Object.assign(Object.assign({}, wireValue), { id }), transferables);\n if (type === "RELEASE" /* MessageType.RELEASE */) {\n // detach and deactive after sending release response above.\n ep.removeEventListener("message", callback);\n closeEndPoint(ep);\n if (finalizer in obj && typeof obj[finalizer] === "function") {\n obj[finalizer]();\n }\n }\n })\n .catch((error) => {\n // Send Serialization Error To Caller\n const [wireValue, transferables] = toWireValue({\n value: new TypeError("Unserializable return value"),\n [throwMarker]: 0,\n });\n ep.postMessage(Object.assign(Object.assign({}, wireValue), { id }), transferables);\n });\n });\n if (ep.start) {\n ep.start();\n }\n }\n function isMessagePort(endpoint) {\n return endpoint.constructor.name === "MessagePort";\n }\n function closeEndPoint(endpoint) {\n if (isMessagePort(endpoint))\n endpoint.close();\n }\n function wrap(ep, target) {\n return createProxy(ep, [], target);\n }\n function throwIfProxyReleased(isReleased) {\n if (isReleased) {\n throw new Error("Proxy has been released and is not useable");\n }\n }\n function releaseEndpoint(ep) {\n return requestResponseMessage(ep, {\n type: "RELEASE" /* MessageType.RELEASE */,\n }).then(() => {\n closeEndPoint(ep);\n });\n }\n const proxyCounter = new WeakMap();\n const proxyFinalizers = "FinalizationRegistry" in globalThis &&\n new FinalizationRegistry((ep) => {\n const newCount = (proxyCounter.get(ep) || 0) - 1;\n proxyCounter.set(ep, newCount);\n if (newCount === 0) {\n releaseEndpoint(ep);\n }\n });\n function registerProxy(proxy, ep) {\n const newCount = (proxyCounter.get(ep) || 0) + 1;\n proxyCounter.set(ep, newCount);\n if (proxyFinalizers) {\n proxyFinalizers.register(proxy, ep, proxy);\n }\n }\n function unregisterProxy(proxy) {\n if (proxyFinalizers) {\n proxyFinalizers.unregister(proxy);\n }\n }\n function createProxy(ep, path = [], target = function () { }) {\n let isProxyReleased = false;\n const proxy = new Proxy(target, {\n get(_target, prop) {\n throwIfProxyReleased(isProxyReleased);\n if (prop === releaseProxy) {\n return () => {\n unregisterProxy(proxy);\n releaseEndpoint(ep);\n isProxyReleased = true;\n };\n }\n if (prop === "then") {\n if (path.length === 0) {\n return { then: () => proxy };\n }\n const r = requestResponseMessage(ep, {\n type: "GET" /* MessageType.GET */,\n path: path.map((p) => p.toString()),\n }).then(fromWireValue);\n return r.then.bind(r);\n }\n return createProxy(ep, [...path, prop]);\n },\n set(_target, prop, rawValue) {\n throwIfProxyReleased(isProxyReleased);\n // FIXME: ES6 Proxy Handler `set` methods are supposed to return a\n // boolean. To show good will, we return true asynchronously ¯\\_(ツ)_/¯\n const [value, transferables] = toWireValue(rawValue);\n return requestResponseMessage(ep, {\n type: "SET" /* MessageType.SET */,\n path: [...path, prop].map((p) => p.toString()),\n value,\n }, transferables).then(fromWireValue);\n },\n apply(_target, _thisArg, rawArgumentList) {\n throwIfProxyReleased(isProxyReleased);\n const last = path[path.length - 1];\n if (last === createEndpoint) {\n return requestResponseMessage(ep, {\n type: "ENDPOINT" /* MessageType.ENDPOINT */,\n }).then(fromWireValue);\n }\n // We just pretend that `bind()` didn’t happen.\n if (last === "bind") {\n return createProxy(ep, path.slice(0, -1));\n }\n const [argumentList, transferables] = processArguments(rawArgumentList);\n return requestResponseMessage(ep, {\n type: "APPLY" /* MessageType.APPLY */,\n path: path.map((p) => p.toString()),\n argumentList,\n }, transferables).then(fromWireValue);\n },\n construct(_target, rawArgumentList) {\n throwIfProxyReleased(isProxyReleased);\n const [argumentList, transferables] = processArguments(rawArgumentList);\n return requestResponseMessage(ep, {\n type: "CONSTRUCT" /* MessageType.CONSTRUCT */,\n path: path.map((p) => p.toString()),\n argumentList,\n }, transferables).then(fromWireValue);\n },\n });\n registerProxy(proxy, ep);\n return proxy;\n }\n function myFlat(arr) {\n return Array.prototype.concat.apply([], arr);\n }\n function processArguments(argumentList) {\n const processed = argumentList.map(toWireValue);\n return [processed.map((v) => v[0]), myFlat(processed.map((v) => v[1]))];\n }\n const transferCache = new WeakMap();\n function transfer(obj, transfers) {\n transferCache.set(obj, transfers);\n return obj;\n }\n function proxy(obj) {\n return Object.assign(obj, { [proxyMarker]: true });\n }\n function toWireValue(value) {\n for (const [name, handler] of transferHandlers) {\n if (handler.canHandle(value)) {\n const [serializedValue, transferables] = handler.serialize(value);\n return [\n {\n type: "HANDLER" /* WireValueType.HANDLER */,\n name,\n value: serializedValue,\n },\n transferables,\n ];\n }\n }\n return [\n {\n type: "RAW" /* WireValueType.RAW */,\n value,\n },\n transferCache.get(value) || [],\n ];\n }\n function fromWireValue(value) {\n switch (value.type) {\n case "HANDLER" /* WireValueType.HANDLER */:\n return transferHandlers.get(value.name).deserialize(value.value);\n case "RAW" /* WireValueType.RAW */:\n return value.value;\n }\n }\n function requestResponseMessage(ep, msg, transfers) {\n return new Promise((resolve) => {\n const id = generateUUID();\n ep.addEventListener("message", function l(ev) {\n if (!ev.data || !ev.data.id || ev.data.id !== id) {\n return;\n }\n ep.removeEventListener("message", l);\n resolve(ev.data);\n });\n if (ep.start) {\n ep.start();\n }\n ep.postMessage(Object.assign({ id }, msg), transfers);\n });\n }\n function generateUUID() {\n return new Array(4)\n .fill(0)\n .map(() => Math.floor(Math.random() * Number.MAX_SAFE_INTEGER).toString(16))\n .join("-");\n }\n\n /**\n * MatrixRenderer class is meant to be used within a Web Worker context,\n * using Comlink to facilitate communication between the main thread and the worker.\n * The MatrixRenderer class manages a matrix of dies, once an instance of MatrixRenderer is created,\n * it is exposed to the main thread using Comlink\'s `expose` method.\n * This setup is used in the wafer-map component to perform heavy computational duties\n */\n class MatrixRenderer {\n constructor() {\n this.values = Float64Array.from([]);\n this.scaledColumnIndices = Float64Array.from([]);\n this.scaledRowIndices = Float64Array.from([]);\n this.columnIndicesPositions = Int32Array.from([]);\n this.colorIndices = Int32Array.from([]);\n this.colors = [];\n this.colorValues = Float64Array.from([]);\n this.outsideRangeDieColor = \'rgba(218,223,236,1)\';\n this.fontSizeFactor = 0.8;\n this.renderConfig = {\n dieDimensions: {\n width: 0,\n height: 0\n },\n margin: {\n top: 0,\n right: 0,\n bottom: 0,\n left: 0\n },\n verticalCoefficient: 1,\n horizontalCoefficient: 1,\n horizontalConstant: 0,\n verticalConstant: 0,\n gridMinX: 0,\n gridMaxX: 0,\n gridMinY: 0,\n gridMaxY: 0,\n labelsFontSize: 0,\n colorScale: [],\n dieLabelsSuffix: \'\',\n maxCharacters: 0\n };\n this.transformConfig = {\n transform: {\n k: 1,\n x: 0,\n y: 0\n },\n topLeftCanvasCorner: {\n x: 0,\n y: 0\n },\n bottomRightCanvasCorner: {\n x: 0,\n y: 0\n }\n };\n }\n setMatrixData(columnIndices, rowIndices, valuesBuffer) {\n const scaledColumnIndex = [];\n const columnPositions = [];\n const scaledRowIndices = [];\n const values = [];\n const colorIndices = [];\n let prevXIndex;\n let dieCount = 0;\n for (let i = 0; i < columnIndices.length; i++) {\n const xIndex = columnIndices[i];\n const yIndex = rowIndices[i];\n if (this.isDieInGrid(xIndex, yIndex)) {\n if (xIndex !== prevXIndex) {\n scaledColumnIndex.push(this.calculateHorizontalScaledIndices(xIndex));\n columnPositions.push(dieCount);\n prevXIndex = xIndex;\n }\n scaledRowIndices.push(this.calculateVerticalScaledIndices(yIndex));\n const value = valuesBuffer[i];\n values.push(value);\n colorIndices.push(this.findColorIndex(value));\n dieCount += 1;\n }\n }\n this.scaledColumnIndices = Float64Array.from(scaledColumnIndex);\n this.columnIndicesPositions = Int32Array.from(columnPositions);\n this.scaledRowIndices = Float64Array.from(scaledRowIndices);\n this.values = Float64Array.from(values);\n this.colorIndices = Int32Array.from(colorIndices);\n }\n setRenderConfig(renderConfig) {\n this.renderConfig = renderConfig;\n this.colors = renderConfig.colorScale.map(marker => marker.color);\n this.colorValues = Float64Array.from(renderConfig.colorScale.map(marker => marker.value));\n }\n setTransformConfig(transformData) {\n this.transformConfig = transformData;\n }\n setCanvas(canvas) {\n this.canvas = canvas;\n this.context = canvas.getContext(\'2d\');\n }\n scaleCanvas() {\n this.context.translate(this.transformConfig.transform.x, this.transformConfig.transform.y);\n this.context.scale(this.transformConfig.transform.k, this.transformConfig.transform.k);\n }\n setCanvasDimensions(data) {\n this.canvas.width = data.width;\n this.canvas.height = data.height;\n }\n getCanvasDimensions() {\n return {\n width: this.canvas.width,\n height: this.canvas.height\n };\n }\n clearCanvas() {\n this.context.clearRect(0, 0, this.canvas.width, this.canvas.height);\n }\n drawWafer() {\n this.context.restore();\n this.context.save();\n this.clearCanvas();\n this.scaleCanvas();\n for (let i = 0; i < this.scaledColumnIndices.length; i++) {\n const scaledX = this.scaledColumnIndices[i];\n if (!(scaledX >= this.transformConfig.topLeftCanvasCorner.x\n && scaledX < this.transformConfig.bottomRightCanvasCorner.x)) {\n continue;\n }\n // columnIndexPositions is used to get chunks to determine the start and end index of the column, it looks something like [0, 1, 4, 9, 12]\n // This means that the first column has a start index of 0 and an end index of 1, the second column has a start index of 1 and an end index of 4, and so on\n // scaledRowIndices is used when we reach the end of the columnIndexPositions, when columnIndexPositions is [0, 1, 4, 9, 12], scaledRowIndices is 13\n const columnEndIndex = this.columnIndicesPositions[i + 1] !== undefined\n ? this.columnIndicesPositions[i + 1]\n : this.scaledRowIndices.length;\n for (let columnStartIndex = this.columnIndicesPositions[i]; columnStartIndex < columnEndIndex; columnStartIndex++) {\n const scaledY = this.scaledRowIndices[columnStartIndex];\n if (!(scaledY >= this.transformConfig.topLeftCanvasCorner.y\n && scaledY < this.transformConfig.bottomRightCanvasCorner.y)) {\n continue;\n }\n // Fill style is temporary green for all dies, will be replaced with a color based on the value of the die in a future implementation\n this.context.fillStyle = this.colors[this.colorIndices[columnStartIndex]]\n ?? this.outsideRangeDieColor;\n this.context.fillRect(scaledX, scaledY, this.renderConfig.dieDimensions.width, this.renderConfig.dieDimensions.height);\n }\n }\n }\n drawText() {\n this.context.font = `${this.renderConfig.labelsFontSize.toString()}px sans-serif`;\n this.context.fillStyle = \'#ffffff\';\n this.context.textAlign = \'center\';\n this.context.lineCap = \'butt\';\n const approximateTextHeight = this.context.measureText(\'M\');\n for (let i = 0; i < this.scaledColumnIndices.length; i++) {\n const scaledX = this.scaledColumnIndices[i];\n if (!(scaledX >= this.transformConfig.topLeftCanvasCorner.x\n && scaledX < this.transformConfig.bottomRightCanvasCorner.x)) {\n continue;\n }\n // columnIndexPositions is used to get chunks to determine the start and end index of the column, it looks something like [0, 1, 4, 9, 12]\n // This means that the first column has a start index of 0 and an end index of 1, the second column has a start index of 1 and an end index of 4, and so on\n // scaledRowIndices is used when we reach the end of the columnIndexPositions, when columnIndexPositions is [0, 1, 4, 9, 12], scaledRowIndices is 13\n const columnEndIndex = this.columnIndicesPositions[i + 1] !== undefined\n ? this.columnIndicesPositions[i + 1]\n : this.scaledRowIndices.length;\n for (let columnStartIndex = this.columnIndicesPositions[i]; columnStartIndex < columnEndIndex; columnStartIndex++) {\n const scaledY = this.scaledRowIndices[columnStartIndex];\n if (!(scaledY >= this.transformConfig.topLeftCanvasCorner.y\n && scaledY < this.transformConfig.bottomRightCanvasCorner.y)) {\n continue;\n }\n let label = `${this.values[columnStartIndex] || \'NaN\'}${this.renderConfig.dieLabelsSuffix}`;\n if (label.length >= this.renderConfig.maxCharacters) {\n label = `${label.substring(0, this.renderConfig.maxCharacters)}…`;\n }\n this.context.fillText(label, scaledX + this.renderConfig.dieDimensions.width / 2, scaledY\n + this.renderConfig.dieDimensions.height / 2\n + approximateTextHeight.width / 2, this.renderConfig.dieDimensions.width * this.fontSizeFactor);\n }\n }\n }\n isDieInGrid(x, y) {\n return (x >= this.renderConfig.gridMinX\n && x <= this.renderConfig.gridMaxX\n && y >= this.renderConfig.gridMinY\n && y <= this.renderConfig.gridMaxY);\n }\n calculateHorizontalScaledIndices(columnIndex) {\n return (this.renderConfig.horizontalCoefficient * columnIndex\n + this.renderConfig.horizontalConstant\n + this.renderConfig.margin.left);\n }\n calculateVerticalScaledIndices(rowIndex) {\n return (this.renderConfig.verticalCoefficient * rowIndex\n + this.renderConfig.verticalConstant\n + this.renderConfig.margin.top);\n }\n findColorIndex(value) {\n let index = -1;\n if (this.colorValues.length === 0 || this.colorValues[0] >= value) {\n return index;\n }\n for (let i = 0; i < this.colorValues.length; i++) {\n if (value <= this.colorValues[i]) {\n index = i;\n break;\n }\n }\n return index;\n }\n }\n expose(MatrixRenderer);\n\n exports.MatrixRenderer = MatrixRenderer;\n\n return exports;\n\n})({});\n'],{type:"text/javascript"})
14680
- SY=URL.createObjectURL(t)}const t=new Worker(SY),e=uY(t)
14677
+ var n}const xY=new WeakMap
14678
+ function CY(t,e){return xY.set(t,e),t}function kY(t){for(const[e,n]of hY)if(n.canHandle(t)){const[i,s]=n.serialize(t)
14679
+ return[{type:"HANDLER",name:e,value:i},s]}return[{type:"RAW",value:t},xY.get(t)||[]]}function SY(t){switch(t.type){case"HANDLER":return hY.get(t.name).deserialize(t.value)
14680
+ case"RAW":return t.value}}function _Y(t,e,n){return new Promise((i=>{const s=new Array(4).fill(0).map((()=>Math.floor(Math.random()*Number.MAX_SAFE_INTEGER).toString(16))).join("-")
14681
+ t.addEventListener("message",(function e(n){n.data&&n.data.id&&n.data.id===s&&(t.removeEventListener("message",e),i(n.data))})),t.start&&t.start(),t.postMessage(Object.assign({id:s},e),n)}))}let IY
14682
+ class MY{constructor(t){this.wafermap=t,this.minDieDim=100}async setupWafer(t){if(void 0===this.matrixRenderer){const{matrixRenderer:t}=await(async()=>{if(void 0===IY){const t=new Blob(['var MatrixRenderer = (function (exports) {\n \'use strict\';\n\n /**\n * @license\n * Copyright 2019 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n const proxyMarker = Symbol("Comlink.proxy");\n const createEndpoint = Symbol("Comlink.endpoint");\n const releaseProxy = Symbol("Comlink.releaseProxy");\n const finalizer = Symbol("Comlink.finalizer");\n const throwMarker = Symbol("Comlink.thrown");\n const isObject = (val) => (typeof val === "object" && val !== null) || typeof val === "function";\n /**\n * Internal transfer handle to handle objects marked to proxy.\n */\n const proxyTransferHandler = {\n canHandle: (val) => isObject(val) && val[proxyMarker],\n serialize(obj) {\n const { port1, port2 } = new MessageChannel();\n expose(obj, port1);\n return [port2, [port2]];\n },\n deserialize(port) {\n port.start();\n return wrap(port);\n },\n };\n /**\n * Internal transfer handler to handle thrown exceptions.\n */\n const throwTransferHandler = {\n canHandle: (value) => isObject(value) && throwMarker in value,\n serialize({ value }) {\n let serialized;\n if (value instanceof Error) {\n serialized = {\n isError: true,\n value: {\n message: value.message,\n name: value.name,\n stack: value.stack,\n },\n };\n }\n else {\n serialized = { isError: false, value };\n }\n return [serialized, []];\n },\n deserialize(serialized) {\n if (serialized.isError) {\n throw Object.assign(new Error(serialized.value.message), serialized.value);\n }\n throw serialized.value;\n },\n };\n /**\n * Allows customizing the serialization of certain values.\n */\n const transferHandlers = new Map([\n ["proxy", proxyTransferHandler],\n ["throw", throwTransferHandler],\n ]);\n function isAllowedOrigin(allowedOrigins, origin) {\n for (const allowedOrigin of allowedOrigins) {\n if (origin === allowedOrigin || allowedOrigin === "*") {\n return true;\n }\n if (allowedOrigin instanceof RegExp && allowedOrigin.test(origin)) {\n return true;\n }\n }\n return false;\n }\n function expose(obj, ep = globalThis, allowedOrigins = ["*"]) {\n ep.addEventListener("message", function callback(ev) {\n if (!ev || !ev.data) {\n return;\n }\n if (!isAllowedOrigin(allowedOrigins, ev.origin)) {\n console.warn(`Invalid origin \'${ev.origin}\' for comlink proxy`);\n return;\n }\n const { id, type, path } = Object.assign({ path: [] }, ev.data);\n const argumentList = (ev.data.argumentList || []).map(fromWireValue);\n let returnValue;\n try {\n const parent = path.slice(0, -1).reduce((obj, prop) => obj[prop], obj);\n const rawValue = path.reduce((obj, prop) => obj[prop], obj);\n switch (type) {\n case "GET" /* MessageType.GET */:\n {\n returnValue = rawValue;\n }\n break;\n case "SET" /* MessageType.SET */:\n {\n parent[path.slice(-1)[0]] = fromWireValue(ev.data.value);\n returnValue = true;\n }\n break;\n case "APPLY" /* MessageType.APPLY */:\n {\n returnValue = rawValue.apply(parent, argumentList);\n }\n break;\n case "CONSTRUCT" /* MessageType.CONSTRUCT */:\n {\n const value = new rawValue(...argumentList);\n returnValue = proxy(value);\n }\n break;\n case "ENDPOINT" /* MessageType.ENDPOINT */:\n {\n const { port1, port2 } = new MessageChannel();\n expose(obj, port2);\n returnValue = transfer(port1, [port1]);\n }\n break;\n case "RELEASE" /* MessageType.RELEASE */:\n {\n returnValue = undefined;\n }\n break;\n default:\n return;\n }\n }\n catch (value) {\n returnValue = { value, [throwMarker]: 0 };\n }\n Promise.resolve(returnValue)\n .catch((value) => {\n return { value, [throwMarker]: 0 };\n })\n .then((returnValue) => {\n const [wireValue, transferables] = toWireValue(returnValue);\n ep.postMessage(Object.assign(Object.assign({}, wireValue), { id }), transferables);\n if (type === "RELEASE" /* MessageType.RELEASE */) {\n // detach and deactive after sending release response above.\n ep.removeEventListener("message", callback);\n closeEndPoint(ep);\n if (finalizer in obj && typeof obj[finalizer] === "function") {\n obj[finalizer]();\n }\n }\n })\n .catch((error) => {\n // Send Serialization Error To Caller\n const [wireValue, transferables] = toWireValue({\n value: new TypeError("Unserializable return value"),\n [throwMarker]: 0,\n });\n ep.postMessage(Object.assign(Object.assign({}, wireValue), { id }), transferables);\n });\n });\n if (ep.start) {\n ep.start();\n }\n }\n function isMessagePort(endpoint) {\n return endpoint.constructor.name === "MessagePort";\n }\n function closeEndPoint(endpoint) {\n if (isMessagePort(endpoint))\n endpoint.close();\n }\n function wrap(ep, target) {\n return createProxy(ep, [], target);\n }\n function throwIfProxyReleased(isReleased) {\n if (isReleased) {\n throw new Error("Proxy has been released and is not useable");\n }\n }\n function releaseEndpoint(ep) {\n return requestResponseMessage(ep, {\n type: "RELEASE" /* MessageType.RELEASE */,\n }).then(() => {\n closeEndPoint(ep);\n });\n }\n const proxyCounter = new WeakMap();\n const proxyFinalizers = "FinalizationRegistry" in globalThis &&\n new FinalizationRegistry((ep) => {\n const newCount = (proxyCounter.get(ep) || 0) - 1;\n proxyCounter.set(ep, newCount);\n if (newCount === 0) {\n releaseEndpoint(ep);\n }\n });\n function registerProxy(proxy, ep) {\n const newCount = (proxyCounter.get(ep) || 0) + 1;\n proxyCounter.set(ep, newCount);\n if (proxyFinalizers) {\n proxyFinalizers.register(proxy, ep, proxy);\n }\n }\n function unregisterProxy(proxy) {\n if (proxyFinalizers) {\n proxyFinalizers.unregister(proxy);\n }\n }\n function createProxy(ep, path = [], target = function () { }) {\n let isProxyReleased = false;\n const proxy = new Proxy(target, {\n get(_target, prop) {\n throwIfProxyReleased(isProxyReleased);\n if (prop === releaseProxy) {\n return () => {\n unregisterProxy(proxy);\n releaseEndpoint(ep);\n isProxyReleased = true;\n };\n }\n if (prop === "then") {\n if (path.length === 0) {\n return { then: () => proxy };\n }\n const r = requestResponseMessage(ep, {\n type: "GET" /* MessageType.GET */,\n path: path.map((p) => p.toString()),\n }).then(fromWireValue);\n return r.then.bind(r);\n }\n return createProxy(ep, [...path, prop]);\n },\n set(_target, prop, rawValue) {\n throwIfProxyReleased(isProxyReleased);\n // FIXME: ES6 Proxy Handler `set` methods are supposed to return a\n // boolean. To show good will, we return true asynchronously ¯\\_(ツ)_/¯\n const [value, transferables] = toWireValue(rawValue);\n return requestResponseMessage(ep, {\n type: "SET" /* MessageType.SET */,\n path: [...path, prop].map((p) => p.toString()),\n value,\n }, transferables).then(fromWireValue);\n },\n apply(_target, _thisArg, rawArgumentList) {\n throwIfProxyReleased(isProxyReleased);\n const last = path[path.length - 1];\n if (last === createEndpoint) {\n return requestResponseMessage(ep, {\n type: "ENDPOINT" /* MessageType.ENDPOINT */,\n }).then(fromWireValue);\n }\n // We just pretend that `bind()` didn’t happen.\n if (last === "bind") {\n return createProxy(ep, path.slice(0, -1));\n }\n const [argumentList, transferables] = processArguments(rawArgumentList);\n return requestResponseMessage(ep, {\n type: "APPLY" /* MessageType.APPLY */,\n path: path.map((p) => p.toString()),\n argumentList,\n }, transferables).then(fromWireValue);\n },\n construct(_target, rawArgumentList) {\n throwIfProxyReleased(isProxyReleased);\n const [argumentList, transferables] = processArguments(rawArgumentList);\n return requestResponseMessage(ep, {\n type: "CONSTRUCT" /* MessageType.CONSTRUCT */,\n path: path.map((p) => p.toString()),\n argumentList,\n }, transferables).then(fromWireValue);\n },\n });\n registerProxy(proxy, ep);\n return proxy;\n }\n function myFlat(arr) {\n return Array.prototype.concat.apply([], arr);\n }\n function processArguments(argumentList) {\n const processed = argumentList.map(toWireValue);\n return [processed.map((v) => v[0]), myFlat(processed.map((v) => v[1]))];\n }\n const transferCache = new WeakMap();\n function transfer(obj, transfers) {\n transferCache.set(obj, transfers);\n return obj;\n }\n function proxy(obj) {\n return Object.assign(obj, { [proxyMarker]: true });\n }\n function toWireValue(value) {\n for (const [name, handler] of transferHandlers) {\n if (handler.canHandle(value)) {\n const [serializedValue, transferables] = handler.serialize(value);\n return [\n {\n type: "HANDLER" /* WireValueType.HANDLER */,\n name,\n value: serializedValue,\n },\n transferables,\n ];\n }\n }\n return [\n {\n type: "RAW" /* WireValueType.RAW */,\n value,\n },\n transferCache.get(value) || [],\n ];\n }\n function fromWireValue(value) {\n switch (value.type) {\n case "HANDLER" /* WireValueType.HANDLER */:\n return transferHandlers.get(value.name).deserialize(value.value);\n case "RAW" /* WireValueType.RAW */:\n return value.value;\n }\n }\n function requestResponseMessage(ep, msg, transfers) {\n return new Promise((resolve) => {\n const id = generateUUID();\n ep.addEventListener("message", function l(ev) {\n if (!ev.data || !ev.data.id || ev.data.id !== id) {\n return;\n }\n ep.removeEventListener("message", l);\n resolve(ev.data);\n });\n if (ep.start) {\n ep.start();\n }\n ep.postMessage(Object.assign({ id }, msg), transfers);\n });\n }\n function generateUUID() {\n return new Array(4)\n .fill(0)\n .map(() => Math.floor(Math.random() * Number.MAX_SAFE_INTEGER).toString(16))\n .join("-");\n }\n\n /**\n * MatrixRenderer class is meant to be used within a Web Worker context,\n * using Comlink to facilitate communication between the main thread and the worker.\n * The MatrixRenderer class manages a matrix of dies, once an instance of MatrixRenderer is created,\n * it is exposed to the main thread using Comlink\'s `expose` method.\n * This setup is used in the wafer-map component to perform heavy computational duties\n */\n class MatrixRenderer {\n constructor() {\n this.values = Float64Array.from([]);\n this.scaledColumnIndices = Float64Array.from([]);\n this.scaledRowIndices = Float64Array.from([]);\n this.columnIndicesPositions = Int32Array.from([]);\n this.colorIndices = Int32Array.from([]);\n this.colors = [];\n this.colorValues = Float64Array.from([]);\n this.outsideRangeDieColor = \'rgba(218,223,236,1)\';\n this.fontSizeFactor = 0.8;\n this.renderConfig = {\n dieDimensions: {\n width: 0,\n height: 0\n },\n margin: {\n top: 0,\n right: 0,\n bottom: 0,\n left: 0\n },\n verticalCoefficient: 1,\n horizontalCoefficient: 1,\n horizontalConstant: 0,\n verticalConstant: 0,\n gridMinX: 0,\n gridMaxX: 0,\n gridMinY: 0,\n gridMaxY: 0,\n labelsFontSize: 0,\n colorScale: [],\n dieLabelsSuffix: \'\',\n maxCharacters: 0\n };\n this.transformConfig = {\n transform: {\n k: 1,\n x: 0,\n y: 0\n },\n topLeftCanvasCorner: {\n x: 0,\n y: 0\n },\n bottomRightCanvasCorner: {\n x: 0,\n y: 0\n }\n };\n }\n setMatrixData(columnIndices, rowIndices, valuesBuffer) {\n const scaledColumnIndex = [];\n const columnPositions = [];\n const scaledRowIndices = [];\n const values = [];\n const colorIndices = [];\n let prevXIndex;\n let dieCount = 0;\n for (let i = 0; i < columnIndices.length; i++) {\n const xIndex = columnIndices[i];\n const yIndex = rowIndices[i];\n if (this.isDieInGrid(xIndex, yIndex)) {\n if (xIndex !== prevXIndex) {\n scaledColumnIndex.push(this.calculateHorizontalScaledIndices(xIndex));\n columnPositions.push(dieCount);\n prevXIndex = xIndex;\n }\n scaledRowIndices.push(this.calculateVerticalScaledIndices(yIndex));\n const value = valuesBuffer[i];\n values.push(value);\n colorIndices.push(this.findColorIndex(value));\n dieCount += 1;\n }\n }\n this.scaledColumnIndices = Float64Array.from(scaledColumnIndex);\n this.columnIndicesPositions = Int32Array.from(columnPositions);\n this.scaledRowIndices = Float64Array.from(scaledRowIndices);\n this.values = Float64Array.from(values);\n this.colorIndices = Int32Array.from(colorIndices);\n }\n setRenderConfig(renderConfig) {\n this.renderConfig = renderConfig;\n this.colors = renderConfig.colorScale.map(marker => marker.color);\n this.colorValues = Float64Array.from(renderConfig.colorScale.map(marker => marker.value));\n }\n setTransformConfig(transformData) {\n this.transformConfig = transformData;\n }\n setCanvas(canvas) {\n this.canvas = canvas;\n this.context = canvas.getContext(\'2d\');\n }\n scaleCanvas() {\n this.context.translate(this.transformConfig.transform.x, this.transformConfig.transform.y);\n this.context.scale(this.transformConfig.transform.k, this.transformConfig.transform.k);\n }\n setCanvasDimensions(data) {\n this.canvas.width = data.width;\n this.canvas.height = data.height;\n }\n getCanvasDimensions() {\n return {\n width: this.canvas.width,\n height: this.canvas.height\n };\n }\n clearCanvas() {\n this.context.clearRect(0, 0, this.canvas.width, this.canvas.height);\n }\n drawWafer() {\n this.context.restore();\n this.context.save();\n this.clearCanvas();\n this.scaleCanvas();\n for (let i = 0; i < this.scaledColumnIndices.length; i++) {\n const scaledX = this.scaledColumnIndices[i];\n if (!(scaledX >= this.transformConfig.topLeftCanvasCorner.x\n && scaledX < this.transformConfig.bottomRightCanvasCorner.x)) {\n continue;\n }\n // columnIndexPositions is used to get chunks to determine the start and end index of the column, it looks something like [0, 1, 4, 9, 12]\n // This means that the first column has a start index of 0 and an end index of 1, the second column has a start index of 1 and an end index of 4, and so on\n // scaledRowIndices is used when we reach the end of the columnIndexPositions, when columnIndexPositions is [0, 1, 4, 9, 12], scaledRowIndices is 13\n const columnEndIndex = this.columnIndicesPositions[i + 1] !== undefined\n ? this.columnIndicesPositions[i + 1]\n : this.scaledRowIndices.length;\n for (let columnStartIndex = this.columnIndicesPositions[i]; columnStartIndex < columnEndIndex; columnStartIndex++) {\n const scaledY = this.scaledRowIndices[columnStartIndex];\n if (!(scaledY >= this.transformConfig.topLeftCanvasCorner.y\n && scaledY < this.transformConfig.bottomRightCanvasCorner.y)) {\n continue;\n }\n // Fill style is temporary green for all dies, will be replaced with a color based on the value of the die in a future implementation\n this.context.fillStyle = this.colors[this.colorIndices[columnStartIndex]]\n ?? this.outsideRangeDieColor;\n this.context.fillRect(scaledX, scaledY, this.renderConfig.dieDimensions.width, this.renderConfig.dieDimensions.height);\n }\n }\n }\n drawText() {\n this.context.font = `${this.renderConfig.labelsFontSize.toString()}px sans-serif`;\n this.context.fillStyle = \'#ffffff\';\n this.context.textAlign = \'center\';\n this.context.lineCap = \'butt\';\n const approximateTextHeight = this.context.measureText(\'M\');\n for (let i = 0; i < this.scaledColumnIndices.length; i++) {\n const scaledX = this.scaledColumnIndices[i];\n if (!(scaledX >= this.transformConfig.topLeftCanvasCorner.x\n && scaledX < this.transformConfig.bottomRightCanvasCorner.x)) {\n continue;\n }\n // columnIndexPositions is used to get chunks to determine the start and end index of the column, it looks something like [0, 1, 4, 9, 12]\n // This means that the first column has a start index of 0 and an end index of 1, the second column has a start index of 1 and an end index of 4, and so on\n // scaledRowIndices is used when we reach the end of the columnIndexPositions, when columnIndexPositions is [0, 1, 4, 9, 12], scaledRowIndices is 13\n const columnEndIndex = this.columnIndicesPositions[i + 1] !== undefined\n ? this.columnIndicesPositions[i + 1]\n : this.scaledRowIndices.length;\n for (let columnStartIndex = this.columnIndicesPositions[i]; columnStartIndex < columnEndIndex; columnStartIndex++) {\n const scaledY = this.scaledRowIndices[columnStartIndex];\n if (!(scaledY >= this.transformConfig.topLeftCanvasCorner.y\n && scaledY < this.transformConfig.bottomRightCanvasCorner.y)) {\n continue;\n }\n let label = `${this.values[columnStartIndex] || \'NaN\'}${this.renderConfig.dieLabelsSuffix}`;\n if (label.length >= this.renderConfig.maxCharacters) {\n label = `${label.substring(0, this.renderConfig.maxCharacters)}…`;\n }\n this.context.fillText(label, scaledX + this.renderConfig.dieDimensions.width / 2, scaledY\n + this.renderConfig.dieDimensions.height / 2\n + approximateTextHeight.width / 2, this.renderConfig.dieDimensions.width * this.fontSizeFactor);\n }\n }\n }\n isDieInGrid(x, y) {\n return (x >= this.renderConfig.gridMinX\n && x <= this.renderConfig.gridMaxX\n && y >= this.renderConfig.gridMinY\n && y <= this.renderConfig.gridMaxY);\n }\n calculateHorizontalScaledIndices(columnIndex) {\n return (this.renderConfig.horizontalCoefficient * columnIndex\n + this.renderConfig.horizontalConstant\n + this.renderConfig.margin.left);\n }\n calculateVerticalScaledIndices(rowIndex) {\n return (this.renderConfig.verticalCoefficient * rowIndex\n + this.renderConfig.verticalConstant\n + this.renderConfig.margin.top);\n }\n findColorIndex(value) {\n let index = -1;\n if (this.colorValues.length === 0 || this.colorValues[0] >= value) {\n return index;\n }\n for (let i = 0; i < this.colorValues.length; i++) {\n if (value <= this.colorValues[i]) {\n index = i;\n break;\n }\n }\n return index;\n }\n }\n expose(MatrixRenderer);\n\n exports.MatrixRenderer = MatrixRenderer;\n\n return exports;\n\n})({});\n'],{type:"text/javascript"})
14683
+ IY=URL.createObjectURL(t)}const t=new Worker(IY),e=fY(t)
14681
14684
  return{matrixRenderer:await new e,terminate:()=>t.terminate()}})()
14682
14685
  this.matrixRenderer=t
14683
14686
  const e=this.wafermap.workerCanvas.transferControlToOffscreen()
14684
- await this.matrixRenderer.setCanvas(wY(e,[e]))}await this.matrixRenderer.setCanvasDimensions(t.canvasDimensions),await this.matrixRenderer.setRenderConfig(t.renderConfig),await this.matrixRenderer.setMatrixData(t.columnIndices,t.rowIndices,t.values)}async drawWafer(t){const e=t.transform.invert([0,0]),n=t.transform.invert([t.canvasDimensions.width,t.canvasDimensions.height])
14685
- await this.matrixRenderer.setTransformConfig({transform:t.transform,topLeftCanvasCorner:{x:e[0]-t.dieDimensions.width,y:e[1]-t.dieDimensions.height},bottomRightCanvasCorner:{x:n[0],y:n[1]}}),await this.matrixRenderer.drawWafer(),!t.dieLabelsHidden&&t.dieDimensions&&t.dieDimensions.width*t.dieDimensions.height*(t.transform.k||1)>=this.minDieDim&&await this.matrixRenderer.drawText()}renderHover(){void 0!==this.wafermap.computations.dieDimensions&&void 0!==this.wafermap.transform&&(this.wafermap.hoverWidth=this.wafermap.computations.dieDimensions.width*this.wafermap.transform.k,this.wafermap.hoverHeight=this.wafermap.computations.dieDimensions.height*this.wafermap.transform.k,this.wafermap.hoverOpacity=void 0===this.wafermap.hoverDie?ZK:GK,this.wafermap.hoverTransform=this.calculateHoverTransform())}calculateHoverTransform(){if(void 0!==this.wafermap.hoverDie){const t=this.wafermap.computations.horizontalScale(this.wafermap.hoverDie.x)
14687
+ await this.matrixRenderer.setCanvas(CY(e,[e]))}await this.matrixRenderer.setCanvasDimensions(t.canvasDimensions),await this.matrixRenderer.setRenderConfig(t.renderConfig),await this.matrixRenderer.setMatrixData(t.columnIndices,t.rowIndices,t.values)}async drawWafer(t){const e=t.transform.invert([0,0]),n=t.transform.invert([t.canvasDimensions.width,t.canvasDimensions.height])
14688
+ await this.matrixRenderer.setTransformConfig({transform:t.transform,topLeftCanvasCorner:{x:e[0]-t.dieDimensions.width,y:e[1]-t.dieDimensions.height},bottomRightCanvasCorner:{x:n[0],y:n[1]}}),await this.matrixRenderer.drawWafer(),!t.dieLabelsHidden&&t.dieDimensions&&t.dieDimensions.width*t.dieDimensions.height*(t.transform.k||1)>=this.minDieDim&&await this.matrixRenderer.drawText()}renderHover(){void 0!==this.wafermap.computations.dieDimensions&&void 0!==this.wafermap.transform&&(this.wafermap.hoverWidth=this.wafermap.computations.dieDimensions.width*this.wafermap.transform.k,this.wafermap.hoverHeight=this.wafermap.computations.dieDimensions.height*this.wafermap.transform.k,this.wafermap.hoverOpacity=void 0===this.wafermap.hoverDie?KK:ZK,this.wafermap.hoverTransform=this.calculateHoverTransform())}calculateHoverTransform(){if(void 0!==this.wafermap.hoverDie){const t=this.wafermap.computations.horizontalScale(this.wafermap.hoverDie.x)
14686
14689
  if(void 0===t)return""
14687
14690
  const e=this.wafermap.computations.verticalScale(this.wafermap.hoverDie.y)
14688
14691
  if(void 0===e)return""
14689
14692
  const n=this.wafermap.transform.apply([t+this.wafermap.computations.margin.left,e+this.wafermap.computations.margin.top])
14690
- return`translate(${n[0]}, ${n[1]})`}return""}}class IY{constructor(t){this.wafermap=t,this.onMouseMove=t=>{if(!this.wafermap.isExperimentalUpdate())return
14693
+ return`translate(${n[0]}, ${n[1]})`}return""}}let $Y=class{constructor(t){this.wafermap=t,this.onMouseMove=t=>{if(this.wafermap.isExperimentalUpdate())return
14694
+ const e={x:t.offsetX,y:t.offsetY}
14695
+ if(!this.hoversOverDie(e))return void(this.wafermap.hoverDie=void 0)
14696
+ const n=this.wafermap.transform.invert([e.x,e.y]),i=this.calculateDieCoordinates({x:n[0],y:n[1]})
14697
+ this.wafermap.hoverDie=void 0!==i?this.wafermap.dataManager.getWaferMapDie(i):void 0},this.onMouseOut=t=>{this.wafermap.hoverDie=void 0}}connect(){this.wafermap.addEventListener("mousemove",this.onMouseMove),this.wafermap.addEventListener("mouseout",this.onMouseOut)}disconnect(){this.wafermap.removeEventListener("mousemove",this.onMouseMove),this.wafermap.removeEventListener("mouseout",this.onMouseOut)}calculateDieCoordinates(t){if(!this.wafermap.isExperimentalUpdate()){const e=this.wafermap.originLocation,n=e===qK||e===WK?Math.floor:Math.ceil,i=e===qK||e===jK?Math.floor:Math.ceil
14698
+ return{x:n(this.wafermap.dataManager.invertedHorizontalScale(t.x-this.wafermap.dataManager.margin.left)),y:i(this.wafermap.dataManager.invertedVerticalScale(t.y-this.wafermap.dataManager.margin.top))}}}hoversOverDie(t){const e=this.wafermap.canvasContext.getImageData(t.x,t.y,1,1).data
14699
+ let n=0
14700
+ for(const t of e)n+=t
14701
+ return n>0}}
14702
+ class EY{constructor(t){this.wafermap=t,this.onMouseMove=t=>{if(!this.wafermap.isExperimentalUpdate())return
14691
14703
  const e=this.wafermap.transform.invert([t.offsetX,t.offsetY]),n=this.calculateDieCoordinates({x:e[0],y:e[1]})
14692
14704
  if(void 0===n||!this.isDieInGrid(n.x,n.y))return void(this.wafermap.hoverDie=void 0)
14693
14705
  const i=this.wafermap.diesTable.getChild("colIndex").toArray(),s=this.wafermap.diesTable.getChild("rowIndex").toArray()
14694
14706
  for(let t=0;t<i.length;t++)if(i[t]===n.x&&s[t]===n.y)return void(this.wafermap.hoverDie={index:t,x:n.x,y:n.y})
14695
- this.wafermap.hoverDie=void 0},this.onMouseOut=t=>{this.wafermap.hoverDie=void 0}}connect(){this.wafermap.addEventListener("mousemove",this.onMouseMove),this.wafermap.addEventListener("mouseout",this.onMouseOut)}disconnect(){this.wafermap.removeEventListener("mousemove",this.onMouseMove),this.wafermap.removeEventListener("mouseout",this.onMouseOut)}calculateDieCoordinates(t){if(this.wafermap.isExperimentalUpdate()){const e=this.wafermap.originLocation,n=e===UK||e===jK?Math.floor:Math.ceil,i=e===UK||e===qK?Math.ceil:Math.floor
14696
- return{x:n(this.wafermap.computations.horizontalScale.invert(t.x-this.wafermap.computations.margin.left)),y:i(this.wafermap.computations.verticalScale.invert(t.y-this.wafermap.computations.margin.top))}}}isDieInGrid(t,e){return t>=this.wafermap.computations.gridMinX&&t<=this.wafermap.computations.gridMaxX&&e>=this.wafermap.computations.gridMinY&&e<=this.wafermap.computations.gridMaxY}}class MY{constructor(t){this.wafermap=t,this.scaleExtent=[1,100],this.minExtentPoint=[0,0],this.onWheelMove=t=>{t.preventDefault()},this.wafermapNotifier=x.getNotifier(this.wafermap),this.wafermapNotifier.subscribe(this,"canvasWidth"),this.wafermapNotifier.subscribe(this,"canvasHeight")}connect(){this.createZoomBehavior(),this.wafermap.addEventListener("wheel",this.onWheelMove,{passive:!1})}disconnect(){gH().on("zoom",null)(ZP(this.wafermap)),this.wafermap.removeEventListener("wheel",this.onWheelMove)}handleChange(t,e){t!==this.wafermap||"canvasWidth"!==e&&"canvasHeight"!==e||this.createZoomBehavior()}createZoomBehavior(){gH().scaleExtent(this.scaleExtent).translateExtent([this.minExtentPoint,[this.wafermap.canvasWidth,this.wafermap.canvasHeight]]).on("zoom",(t=>{this.wafermap.transform=t.transform}))(ZP(this.wafermap))}}class $Y{get horizontalScale(){return this._horizontalScale}get verticalScale(){return this._verticalScale}get containerDimensions(){return this._containerDimensions}get dieDimensions(){return this._dieDimensions}get margin(){return this._margin}get verticalCoefficient(){return this._verticalCoefficient}get horizontalCoefficient(){return this._horizontalCoefficient}get horizontalConstant(){return this._horizontalConstant}get verticalConstant(){return this._verticalConstant}get gridMinX(){return this._gridMinX}get gridMaxX(){return this._gridMaxX}get gridMinY(){return this._gridMinY}get gridMaxY(){return this._gridMaxY}get labelsFontSize(){return this._labelsFontSize}get colorScale(){return this._colorScale}constructor(t){this.wafermap=t,this.baseMarginPercentage=.04,this.fontSizeFactor=.8,this.colorScaleResolution=10}componentResizeUpdate(){const t={width:this.wafermap.canvasWidth,height:this.wafermap.canvasHeight},e=Math.min(t.width,t.height),n={top:(t.height-e)/2,right:(t.width-e)/2,bottom:(t.height-e)/2,left:(t.width-e)/2},i={top:e*this.baseMarginPercentage,right:e*this.baseMarginPercentage,bottom:e*this.baseMarginPercentage,left:e*this.baseMarginPercentage}
14707
+ this.wafermap.hoverDie=void 0},this.onMouseOut=t=>{this.wafermap.hoverDie=void 0}}connect(){this.wafermap.addEventListener("mousemove",this.onMouseMove),this.wafermap.addEventListener("mouseout",this.onMouseOut)}disconnect(){this.wafermap.removeEventListener("mousemove",this.onMouseMove),this.wafermap.removeEventListener("mouseout",this.onMouseOut)}calculateDieCoordinates(t){if(this.wafermap.isExperimentalUpdate()){const e=this.wafermap.originLocation,n=e===qK||e===WK?Math.floor:Math.ceil,i=e===qK||e===jK?Math.ceil:Math.floor
14708
+ return{x:n(this.wafermap.computations.horizontalScale.invert(t.x-this.wafermap.computations.margin.left)),y:i(this.wafermap.computations.verticalScale.invert(t.y-this.wafermap.computations.margin.top))}}}isDieInGrid(t,e){return t>=this.wafermap.computations.gridMinX&&t<=this.wafermap.computations.gridMaxX&&e>=this.wafermap.computations.gridMinY&&e<=this.wafermap.computations.gridMaxY}}class DY{constructor(t){this.wafermap=t,this.scaleExtent=[1,100],this.minExtentPoint=[0,0],this.onWheelMove=t=>{t.preventDefault()},this.wafermapNotifier=x.getNotifier(this.wafermap),this.wafermapNotifier.subscribe(this,"canvasWidth"),this.wafermapNotifier.subscribe(this,"canvasHeight")}connect(){this.createZoomBehavior(),this.wafermap.addEventListener("wheel",this.onWheelMove,{passive:!1})}disconnect(){vH().on("zoom",null)(KP(this.wafermap)),this.wafermap.removeEventListener("wheel",this.onWheelMove)}handleChange(t,e){t!==this.wafermap||"canvasWidth"!==e&&"canvasHeight"!==e||this.createZoomBehavior()}createZoomBehavior(){vH().scaleExtent(this.scaleExtent).translateExtent([this.minExtentPoint,[this.wafermap.canvasWidth,this.wafermap.canvasHeight]]).on("zoom",(t=>{this.wafermap.transform=t.transform}))(KP(this.wafermap))}}class AY{get horizontalScale(){return this._horizontalScale}get verticalScale(){return this._verticalScale}get containerDimensions(){return this._containerDimensions}get dieDimensions(){return this._dieDimensions}get margin(){return this._margin}get verticalCoefficient(){return this._verticalCoefficient}get horizontalCoefficient(){return this._horizontalCoefficient}get horizontalConstant(){return this._horizontalConstant}get verticalConstant(){return this._verticalConstant}get gridMinX(){return this._gridMinX}get gridMaxX(){return this._gridMaxX}get gridMinY(){return this._gridMinY}get gridMaxY(){return this._gridMaxY}get labelsFontSize(){return this._labelsFontSize}get colorScale(){return this._colorScale}constructor(t){this.wafermap=t,this.baseMarginPercentage=.04,this.fontSizeFactor=.8,this.colorScaleResolution=10}componentResizeUpdate(){const t={width:this.wafermap.canvasWidth,height:this.wafermap.canvasHeight},e=Math.min(t.width,t.height),n={top:(t.height-e)/2,right:(t.width-e)/2,bottom:(t.height-e)/2,left:(t.width-e)/2},i={top:e*this.baseMarginPercentage,right:e*this.baseMarginPercentage,bottom:e*this.baseMarginPercentage,left:e*this.baseMarginPercentage}
14697
14709
  this._margin=this.calculateMarginAddition(i,n),this._containerDimensions=this.calculateContainerDimensions(t,this.margin),this.inputDataUpdate()}inputDataUpdate(){if(void 0===this._containerDimensions)return void this.componentResizeUpdate()
14698
14710
  const t=Math.min(this._containerDimensions.width,this._containerDimensions.height)
14699
14711
  this.gridDimensionsValidAndDefined()?this.setGridDimensionsFromBoundingBox():this.setGridDimensionsFromDies()
@@ -14701,32 +14713,24 @@ const e=this.wafermap.originLocation
14701
14713
  this._horizontalScale=this.createHorizontalScale(e,t),this._verticalScale=this.createVerticalScale(e,t),this._horizontalCoefficient=this._horizontalScale(1)-this._horizontalScale(0),this._verticalCoefficient=this._verticalScale(1)-this._verticalScale(0),this._horizontalConstant=this._horizontalScale(0),this._verticalConstant=this._verticalScale(0),this._dieDimensions={width:Math.abs(this._horizontalScale(0)-this._horizontalScale(1)),height:Math.abs(this._verticalScale(0)-this._verticalScale(1))},this.colorAndTextUpdate()}colorAndTextUpdate(){void 0!==this._dieDimensions?(this._labelsFontSize=this.calculateLabelsFontSize(this._dieDimensions,this.wafermap.maxCharacters),this._colorScale=this.calculateColorScale()):this.inputDataUpdate()}gridDimensionsValidAndDefined(){return!this.wafermap.validity.invalidGridDimensions&&"number"==typeof this.wafermap.gridMinX&&"number"==typeof this.wafermap.gridMinY&&"number"==typeof this.wafermap.gridMaxX&&"number"==typeof this.wafermap.gridMinX}setGridDimensionsFromBoundingBox(){this._gridMinX=this.wafermap.gridMinX,this._gridMinY=this.wafermap.gridMinY,this._gridMaxX=this.wafermap.gridMaxX,this._gridMaxY=this.wafermap.gridMaxY}setGridDimensionsFromDies(){if(void 0===this.wafermap.diesTable)return
14702
14714
  const t=this.wafermap.diesTable.getChild("colIndex").toArray(),e=this.wafermap.diesTable.getChild("rowIndex").toArray(),n={x:t[0],y:e[0]},i={x:t[0],y:e[0]}
14703
14715
  for(let s=0;s<t.length;s++)t[s]<n.x&&(n.x=t[s]),t[s]>i.x&&(i.x=t[s]),e[s]<n.y&&(n.y=e[s]),e[s]>i.y&&(i.y=e[s])
14704
- this._gridMinX=n.x,this._gridMinY=n.y,this._gridMaxX=i.x,this._gridMaxY=i.y}calculateContainerDimensions(t,e){return{width:t.width-e.left-e.right,height:t.height-e.top-e.bottom}}createHorizontalScale(t,e){const n=VK()
14705
- return t===UK||t===jK?n.domain([this._gridMinX,this._gridMaxX+1]).range([0,e]):n.domain([this._gridMinX-1,this._gridMaxX]).range([e,0])}createVerticalScale(t,e){const n=VK()
14706
- return t===UK||t===qK?n.domain([this._gridMinY-1,this._gridMaxY]).range([e,0]):n.domain([this._gridMinY,this._gridMaxY+1]).range([0,e])}calculateMarginAddition(t,e){return{top:t.top+e.top,right:t.right+e.right,bottom:t.bottom+e.bottom,left:t.left+e.left}}calculateColorScale(){if(this.wafermap.colorScaleMode===KK){const t=this.wafermap.colorScale.values.map((t=>+t)),e=VK().domain(t).range(this.wafermap.colorScale.colors)
14716
+ this._gridMinX=n.x,this._gridMinY=n.y,this._gridMaxX=i.x,this._gridMaxY=i.y}calculateContainerDimensions(t,e){return{width:t.width-e.left-e.right,height:t.height-e.top-e.bottom}}createHorizontalScale(t,e){const n=HK()
14717
+ return t===qK||t===WK?n.domain([this._gridMinX,this._gridMaxX+1]).range([0,e]):n.domain([this._gridMinX-1,this._gridMaxX]).range([e,0])}createVerticalScale(t,e){const n=HK()
14718
+ return t===qK||t===jK?n.domain([this._gridMinY-1,this._gridMaxY]).range([e,0]):n.domain([this._gridMinY,this._gridMaxY+1]).range([0,e])}calculateMarginAddition(t,e){return{top:t.top+e.top,right:t.right+e.right,bottom:t.bottom+e.bottom,left:t.left+e.left}}calculateColorScale(){if(this.wafermap.colorScaleMode===YK){const t=this.wafermap.colorScale.values.map((t=>+t)),e=HK().domain(t).range(this.wafermap.colorScale.colors)
14707
14719
  let n=t[0],i=t[0]
14708
14720
  t.forEach((t=>{t<n&&(n=t),t>i&&(i=t)}))
14709
- return uK(n,i,(i-n)/(t.length*this.colorScaleResolution)).concat(i).map((t=>({color:e(t),value:t})))}return this.wafermap.colorScale.colors.map(((t,e)=>({color:t,value:+this.wafermap.colorScale.values[e]}))).sort(((t,e)=>t.value-e.value))}calculateLabelsFontSize(t,e){return Math.min(t.height,t.width/(.5*Math.max(2,e))*this.fontSizeFactor)}}class EY extends We{constructor(){super(...arguments),this.waferMapUpdateTracker=new eY(this.asRequiredFieldsWaferMap),this.originLocation=UK,this.gridMinX=void 0,this.gridMaxX=void 0,this.gridMinY=void 0,this.gridMaxY=void 0,this.orientation=WK,this.maxCharacters=4,this.dieLabelsHidden=!1,this.dieLabelsSuffix="",this.colorScaleMode=KK,this.computations=new $Y(this.asRequiredFieldsWaferMap),this.dataManager=new JK(this.asRequiredFieldsWaferMap),this.workerRenderer=new _Y(this.asRequiredFieldsWaferMap),this.renderer=new QK(this.asRequiredFieldsWaferMap),this.renderQueued=!1,this.transform=aH,this.hoverTransform="",this.hoverOpacity=ZK,this.hoverWidth=0,this.hoverHeight=0,this.highlightedTags=[],this.dies=[],this.colorScale={colors:[],values:[]},this.hoverHandler=new class{constructor(t){this.wafermap=t,this.onMouseMove=t=>{if(this.wafermap.isExperimentalUpdate())return
14710
- const e={x:t.offsetX,y:t.offsetY}
14711
- if(!this.hoversOverDie(e))return void(this.wafermap.hoverDie=void 0)
14712
- const n=this.wafermap.transform.invert([e.x,e.y]),i=this.calculateDieCoordinates({x:n[0],y:n[1]})
14713
- this.wafermap.hoverDie=void 0!==i?this.wafermap.dataManager.getWaferMapDie(i):void 0},this.onMouseOut=t=>{this.wafermap.hoverDie=void 0}}connect(){this.wafermap.addEventListener("mousemove",this.onMouseMove),this.wafermap.addEventListener("mouseout",this.onMouseOut)}disconnect(){this.wafermap.removeEventListener("mousemove",this.onMouseMove),this.wafermap.removeEventListener("mouseout",this.onMouseOut)}calculateDieCoordinates(t){if(!this.wafermap.isExperimentalUpdate()){const e=this.wafermap.originLocation,n=e===UK||e===jK?Math.floor:Math.ceil,i=e===UK||e===qK?Math.floor:Math.ceil
14714
- return{x:n(this.wafermap.dataManager.invertedHorizontalScale(t.x-this.wafermap.dataManager.margin.left)),y:i(this.wafermap.dataManager.invertedVerticalScale(t.y-this.wafermap.dataManager.margin.top))}}}hoversOverDie(t){const e=this.wafermap.canvasContext.getImageData(t.x,t.y,1,1).data
14715
- let n=0
14716
- for(const t of e)n+=t
14717
- return n>0}}(this.asRequiredFieldsWaferMap),this.experimentalHoverHandler=new IY(this.asRequiredFieldsWaferMap),this.zoomHandler=new MY(this.asRequiredFieldsWaferMap),this.resizeObserver=this.createResizeObserver(),this.waferMapValidator=new nY(this.asRequiredFieldsWaferMap)}get validity(){return this.waferMapValidator.getValidity()}connectedCallback(){super.connectedCallback(),this.canvasContext=this.canvas.getContext("2d",{willReadFrequently:!0}),this.hoverHandler.connect(),this.experimentalHoverHandler.connect(),this.zoomHandler.connect(),this.resizeObserver.observe(this),this.waferMapUpdateTracker.trackAll()}disconnectedCallback(){super.disconnectedCallback(),this.hoverHandler.disconnect(),this.experimentalHoverHandler.disconnect(),this.zoomHandler.disconnect(),this.resizeObserver.unobserve(this)}async experimentalUpdate(){if(!this.validity.invalidDiesTableSchema){if(this.waferMapUpdateTracker.requiresEventsUpdate){this.waferMapUpdateTracker.requiresComponentResizeUpdate?this.computations.componentResizeUpdate():this.waferMapUpdateTracker.requiresInputDataUpdate?this.computations.inputDataUpdate():this.waferMapUpdateTracker.requiresColorAndTextUpdate&&this.computations.colorAndTextUpdate()
14721
+ return pK(n,i,(i-n)/(t.length*this.colorScaleResolution)).concat(i).map((t=>({color:e(t),value:t})))}return this.wafermap.colorScale.colors.map(((t,e)=>({color:t,value:+this.wafermap.colorScale.values[e]}))).sort(((t,e)=>t.value-e.value))}calculateLabelsFontSize(t,e){return Math.min(t.height,t.width/(.5*Math.max(2,e))*this.fontSizeFactor)}}class TY extends We{constructor(){super(...arguments),this.waferMapUpdateTracker=new iY(this.asRequiredFieldsWaferMap),this.originLocation=qK,this.gridMinX=void 0,this.gridMaxX=void 0,this.gridMinY=void 0,this.gridMaxY=void 0,this.orientation=GK,this.maxCharacters=4,this.dieLabelsHidden=!1,this.dieLabelsSuffix="",this.colorScaleMode=YK,this.computations=new AY(this.asRequiredFieldsWaferMap),this.dataManager=new tY(this.asRequiredFieldsWaferMap),this.workerRenderer=new MY(this.asRequiredFieldsWaferMap),this.renderer=new eY(this.asRequiredFieldsWaferMap),this.renderQueued=!1,this.transform=lH,this.hoverTransform="",this.hoverOpacity=KK,this.hoverWidth=0,this.hoverHeight=0,this.highlightedTags=[],this.dies=[],this.colorScale={colors:[],values:[]},this.hoverHandler=new $Y(this.asRequiredFieldsWaferMap),this.experimentalHoverHandler=new EY(this.asRequiredFieldsWaferMap),this.zoomHandler=new DY(this.asRequiredFieldsWaferMap),this.resizeObserver=this.createResizeObserver(),this.waferMapValidator=new sY(this.asRequiredFieldsWaferMap)}get validity(){return this.waferMapValidator.getValidity()}connectedCallback(){super.connectedCallback(),this.canvasContext=this.canvas.getContext("2d",{willReadFrequently:!0}),this.hoverHandler.connect(),this.experimentalHoverHandler.connect(),this.zoomHandler.connect(),this.resizeObserver.observe(this),this.waferMapUpdateTracker.trackAll()}disconnectedCallback(){super.disconnectedCallback(),this.hoverHandler.disconnect(),this.experimentalHoverHandler.disconnect(),this.zoomHandler.disconnect(),this.resizeObserver.unobserve(this)}async experimentalUpdate(){if(!this.validity.invalidDiesTableSchema){if(this.waferMapUpdateTracker.requiresEventsUpdate){this.waferMapUpdateTracker.requiresComponentResizeUpdate?this.computations.componentResizeUpdate():this.waferMapUpdateTracker.requiresInputDataUpdate?this.computations.inputDataUpdate():this.waferMapUpdateTracker.requiresColorAndTextUpdate&&this.computations.colorAndTextUpdate()
14718
14722
  const t=this.createSnapshot()
14719
14723
  this.waferMapUpdateTracker.requiresWorkerWaferSetup&&await this.workerRenderer.setupWafer(t),await this.workerRenderer.drawWafer(t)}this.workerRenderer.renderHover()}}update(){this.validate(),this.isExperimentalUpdate()?this.currentTask=this.experimentalUpdate():this.waferMapUpdateTracker.requiresEventsUpdate?this.waferMapUpdateTracker.requiresContainerDimensionsUpdate?(this.dataManager.updateContainerDimensions(),this.renderer.updateSortedDiesAndDrawWafer()):this.waferMapUpdateTracker.requiresScalesUpdate?(this.dataManager.updateScales(),this.renderer.updateSortedDiesAndDrawWafer()):this.waferMapUpdateTracker.requiresLabelsFontSizeUpdate?(this.dataManager.updateLabelsFontSize(),this.renderer.updateSortedDiesAndDrawWafer()):this.waferMapUpdateTracker.requiresDiesRenderInfoUpdate?(this.dataManager.updateDiesRenderInfo(),this.renderer.updateSortedDiesAndDrawWafer()):this.waferMapUpdateTracker.requiresDrawnWaferUpdate&&this.renderer.drawWafer():this.waferMapUpdateTracker.requiresRenderHoverUpdate&&this.renderer.renderHover()}isExperimentalUpdate(){return void 0!==this.diesTable}async setData(t){Array.isArray(t)?this.dies=t:this.diesTable=t,await b.nextUpdate(),void 0!==this.currentTask&&await this.currentTask}createSnapshot(){const t={width:this.canvasWidth??0,height:this.canvasHeight??0},e={dieDimensions:this.computations.dieDimensions,margin:this.computations.margin,verticalCoefficient:this.computations.verticalCoefficient,horizontalCoefficient:this.computations.horizontalCoefficient,horizontalConstant:this.computations.horizontalConstant,verticalConstant:this.computations.verticalConstant,gridMinX:this.computations.gridMinX,gridMaxX:this.computations.gridMaxX,gridMinY:this.computations.gridMinY,gridMaxY:this.computations.gridMaxY,labelsFontSize:this.computations.labelsFontSize,colorScale:this.computations.colorScale,dieLabelsSuffix:this.dieLabelsSuffix,maxCharacters:this.maxCharacters},n=this.computations.dieDimensions,i=this.transform,s=this.dieLabelsHidden
14720
14724
  if(void 0===this.diesTable)return{canvasDimensions:t,renderConfig:e,dieDimensions:n,transform:i,dieLabelsHidden:s,columnIndices:Int32Array.from([]),rowIndices:Int32Array.from([]),values:Float64Array.from([])}
14721
14725
  return{canvasDimensions:t,renderConfig:e,columnIndices:this.diesTable.getChild("colIndex").toArray(),rowIndices:this.diesTable.getChild("rowIndex").toArray(),values:this.diesTable.getChild("value").toArray(),dieDimensions:n,transform:i,dieLabelsHidden:s}}validate(){this.waferMapValidator.validateGridDimensions(),this.waferMapValidator.validateDiesTableSchema()}createResizeObserver(){return new ResizeObserver((t=>{const e=t[0]
14722
14726
  if(void 0===e)return
14723
14727
  const{height:n,width:i}=e.contentRect
14724
- this.canvas.width=i,this.canvas.height=n,this.canvasWidth=i,this.canvasHeight=n}))}originLocationChanged(){this.waferMapUpdateTracker.track("originLocation"),this.waferMapUpdateTracker.queueUpdate()}gridMinXChanged(){this.waferMapUpdateTracker.track("gridMinX"),this.waferMapUpdateTracker.queueUpdate()}gridMaxXChanged(){this.waferMapUpdateTracker.track("gridMaxX"),this.waferMapUpdateTracker.queueUpdate()}gridMinYChanged(){this.waferMapUpdateTracker.track("gridMinY"),this.waferMapUpdateTracker.queueUpdate()}gridMaxYChanged(){this.waferMapUpdateTracker.track("gridMaxY"),this.waferMapUpdateTracker.queueUpdate()}maxCharactersChanged(){this.waferMapUpdateTracker.track("maxCharacters"),this.waferMapUpdateTracker.queueUpdate()}dieLabelsHiddenChanged(){this.waferMapUpdateTracker.track("dieLabelsHidden"),this.waferMapUpdateTracker.queueUpdate()}dieLabelsSuffixChanged(){this.waferMapUpdateTracker.track("dieLabelsSuffix"),this.waferMapUpdateTracker.queueUpdate()}colorScaleModeChanged(){this.waferMapUpdateTracker.track("colorScaleMode"),this.waferMapUpdateTracker.queueUpdate()}highlightedTagsChanged(){this.waferMapUpdateTracker.track("highlightedTags"),this.waferMapUpdateTracker.queueUpdate()}diesChanged(){this.waferMapUpdateTracker.track("dies"),this.waferMapUpdateTracker.queueUpdate()}diesTableChanged(){this.waferMapUpdateTracker.track("dies"),this.waferMapUpdateTracker.queueUpdate()}colorScaleChanged(){this.waferMapUpdateTracker.track("colorScale"),this.waferMapUpdateTracker.queueUpdate()}transformChanged(){this.waferMapUpdateTracker.track("transform"),this.waferMapUpdateTracker.queueUpdate()}canvasWidthChanged(){this.waferMapUpdateTracker.track("canvasWidth"),this.waferMapUpdateTracker.queueUpdate()}canvasHeightChanged(){this.waferMapUpdateTracker.track("canvasHeight"),this.waferMapUpdateTracker.queueUpdate()}hoverDieChanged(){this.$emit("die-hover",{currentDie:this.hoverDie}),this.waferMapUpdateTracker.track("hoverDie"),this.waferMapUpdateTracker.queueUpdate()}get asRequiredFieldsWaferMap(){return this}}EY.Arrow={tableFromIPC:function t(e){const n=FZ.from(e)
14725
- return kH(n)?n.then((e=>t(e))):n.isAsync()?n.readAll().then((t=>new KG(t))):new KG(n.readAll())}},t([ft({attribute:"origin-location"})],EY.prototype,"originLocation",void 0),t([ft({attribute:"grid-min-x",converter:ut})],EY.prototype,"gridMinX",void 0),t([ft({attribute:"grid-max-x",converter:ut})],EY.prototype,"gridMaxX",void 0),t([ft({attribute:"grid-min-y",converter:ut})],EY.prototype,"gridMinY",void 0),t([ft({attribute:"grid-max-y",converter:ut})],EY.prototype,"gridMaxY",void 0),t([ft],EY.prototype,"orientation",void 0),t([ft({attribute:"max-characters",converter:ut})],EY.prototype,"maxCharacters",void 0),t([ft({attribute:"die-labels-hidden",mode:"boolean"})],EY.prototype,"dieLabelsHidden",void 0),t([ft({attribute:"die-labels-suffix"})],EY.prototype,"dieLabelsSuffix",void 0),t([ft({attribute:"color-scale-mode"})],EY.prototype,"colorScaleMode",void 0),t([C],EY.prototype,"renderer",void 0),t([C],EY.prototype,"canvasWidth",void 0),t([C],EY.prototype,"canvasHeight",void 0),t([C],EY.prototype,"transform",void 0),t([C],EY.prototype,"hoverTransform",void 0),t([C],EY.prototype,"hoverOpacity",void 0),t([C],EY.prototype,"hoverWidth",void 0),t([C],EY.prototype,"hoverHeight",void 0),t([C],EY.prototype,"hoverDie",void 0),t([C],EY.prototype,"highlightedTags",void 0),t([C],EY.prototype,"dies",void 0),t([C],EY.prototype,"diesTable",void 0),t([C],EY.prototype,"colorScale",void 0)
14726
- const DY=EY.compose({baseName:"wafer-map",template:KZ,styles:YZ})
14727
- _i.getOrCreate().withPrefix("nimble").register(DY())
14728
- const AY=Mt`
14729
- ${TY="inline-block",`${Bs(TY)}:host{box-sizing:border-box;}*{box-sizing:border-box;}:host::before,:host::after,::before,::after{box-sizing:border-box;}`}
14728
+ this.canvas.width=i,this.canvas.height=n,this.canvasWidth=i,this.canvasHeight=n}))}originLocationChanged(){this.waferMapUpdateTracker.track("originLocation"),this.waferMapUpdateTracker.queueUpdate()}gridMinXChanged(){this.waferMapUpdateTracker.track("gridMinX"),this.waferMapUpdateTracker.queueUpdate()}gridMaxXChanged(){this.waferMapUpdateTracker.track("gridMaxX"),this.waferMapUpdateTracker.queueUpdate()}gridMinYChanged(){this.waferMapUpdateTracker.track("gridMinY"),this.waferMapUpdateTracker.queueUpdate()}gridMaxYChanged(){this.waferMapUpdateTracker.track("gridMaxY"),this.waferMapUpdateTracker.queueUpdate()}maxCharactersChanged(){this.waferMapUpdateTracker.track("maxCharacters"),this.waferMapUpdateTracker.queueUpdate()}dieLabelsHiddenChanged(){this.waferMapUpdateTracker.track("dieLabelsHidden"),this.waferMapUpdateTracker.queueUpdate()}dieLabelsSuffixChanged(){this.waferMapUpdateTracker.track("dieLabelsSuffix"),this.waferMapUpdateTracker.queueUpdate()}colorScaleModeChanged(){this.waferMapUpdateTracker.track("colorScaleMode"),this.waferMapUpdateTracker.queueUpdate()}highlightedTagsChanged(){this.waferMapUpdateTracker.track("highlightedTags"),this.waferMapUpdateTracker.queueUpdate()}diesChanged(){this.waferMapUpdateTracker.track("dies"),this.waferMapUpdateTracker.queueUpdate()}diesTableChanged(){this.waferMapUpdateTracker.track("dies"),this.waferMapUpdateTracker.queueUpdate()}colorScaleChanged(){this.waferMapUpdateTracker.track("colorScale"),this.waferMapUpdateTracker.queueUpdate()}transformChanged(){this.waferMapUpdateTracker.track("transform"),this.waferMapUpdateTracker.queueUpdate()}canvasWidthChanged(){this.waferMapUpdateTracker.track("canvasWidth"),this.waferMapUpdateTracker.queueUpdate()}canvasHeightChanged(){this.waferMapUpdateTracker.track("canvasHeight"),this.waferMapUpdateTracker.queueUpdate()}hoverDieChanged(){this.$emit("die-hover",{currentDie:this.hoverDie}),this.waferMapUpdateTracker.track("hoverDie"),this.waferMapUpdateTracker.queueUpdate()}get asRequiredFieldsWaferMap(){return this}}TY.Arrow={tableFromIPC:function t(e){const n=NZ.from(e)
14729
+ return SH(n)?n.then((e=>t(e))):n.isAsync()?n.readAll().then((t=>new YG(t))):new YG(n.readAll())}},t([ft({attribute:"origin-location"})],TY.prototype,"originLocation",void 0),t([ft({attribute:"grid-min-x",converter:ut})],TY.prototype,"gridMinX",void 0),t([ft({attribute:"grid-max-x",converter:ut})],TY.prototype,"gridMaxX",void 0),t([ft({attribute:"grid-min-y",converter:ut})],TY.prototype,"gridMinY",void 0),t([ft({attribute:"grid-max-y",converter:ut})],TY.prototype,"gridMaxY",void 0),t([ft],TY.prototype,"orientation",void 0),t([ft({attribute:"max-characters",converter:ut})],TY.prototype,"maxCharacters",void 0),t([ft({attribute:"die-labels-hidden",mode:"boolean"})],TY.prototype,"dieLabelsHidden",void 0),t([ft({attribute:"die-labels-suffix"})],TY.prototype,"dieLabelsSuffix",void 0),t([ft({attribute:"color-scale-mode"})],TY.prototype,"colorScaleMode",void 0),t([C],TY.prototype,"renderer",void 0),t([C],TY.prototype,"canvasWidth",void 0),t([C],TY.prototype,"canvasHeight",void 0),t([C],TY.prototype,"transform",void 0),t([C],TY.prototype,"hoverTransform",void 0),t([C],TY.prototype,"hoverOpacity",void 0),t([C],TY.prototype,"hoverWidth",void 0),t([C],TY.prototype,"hoverHeight",void 0),t([C],TY.prototype,"hoverDie",void 0),t([C],TY.prototype,"highlightedTags",void 0),t([C],TY.prototype,"dies",void 0),t([C],TY.prototype,"diesTable",void 0),t([C],TY.prototype,"colorScale",void 0)
14730
+ const OY=TY.compose({baseName:"wafer-map",template:YZ,styles:XZ})
14731
+ _i.getOrCreate().withPrefix("nimble").register(OY())
14732
+ const RY=Mt`
14733
+ ${FY="inline-block",`${Bs(FY)}:host{box-sizing:border-box;}*{box-sizing:border-box;}:host::before,:host::after,::before,::after{box-sizing:border-box;}`}
14730
14734
 
14731
14735
  :host {
14732
14736
  border: 2px solid ${hl};
@@ -14749,8 +14753,8 @@ const AY=Mt`
14749
14753
  color: ${Hc};
14750
14754
  }
14751
14755
  `
14752
- var TY
14753
- const OY=Q`<slot></slot>`
14754
- const RY=class extends We{}.compose({baseName:"rectangle",template:OY,styles:AY})
14755
- _i.getOrCreate().withPrefix("spright").register(RY())}()
14756
+ var FY
14757
+ const NY=Q`<slot></slot>`
14758
+ const LY=class extends We{}.compose({baseName:"rectangle",template:NY,styles:RY})
14759
+ _i.getOrCreate().withPrefix("spright").register(LY())}()
14756
14760
  //# sourceMappingURL=all-components-bundle.min.js.map