@ni/nimble-components 29.3.6 → 29.3.7
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.
|
@@ -8366,47 +8366,72 @@ const t=this.re.schema_at_start.exec(e)
|
|
|
8366
8366
|
if(!t)return null
|
|
8367
8367
|
const n=this.testSchemaAt(e,t[2],t[0].length)
|
|
8368
8368
|
return n?(this.__schema__=t[2],this.__index__=t.index+t[1].length,this.__last_index__=t.index+t[0].length+n,iE(this,0)):null},oE.prototype.tlds=function(e,t){return e=Array.isArray(e)?e:[e],t?(this.__tlds__=this.__tlds__.concat(e).sort().filter((function(e,t,n){return e!==n[t-1]})).reverse(),tE(this),this):(this.__tlds__=e.slice(),this.__tlds_replaced__=!0,tE(this),this)},oE.prototype.normalize=function(e){e.schema||(e.url="http://"+e.url),"mailto:"!==e.schema||/^mailto:/i.test(e.url)||(e.url="mailto:"+e.url)},oE.prototype.onCompile=function(){}
|
|
8369
|
-
|
|
8370
|
-
|
|
8371
|
-
|
|
8372
|
-
|
|
8373
|
-
|
|
8374
|
-
|
|
8375
|
-
|
|
8376
|
-
return
|
|
8377
|
-
|
|
8378
|
-
|
|
8379
|
-
|
|
8380
|
-
for(
|
|
8381
|
-
|
|
8382
|
-
|
|
8383
|
-
for(
|
|
8384
|
-
|
|
8385
|
-
|
|
8386
|
-
|
|
8387
|
-
|
|
8388
|
-
|
|
8389
|
-
|
|
8390
|
-
|
|
8391
|
-
|
|
8392
|
-
|
|
8369
|
+
const sE=2147483647,rE=36,aE=/^xn--/,lE=/[^\0-\x7F]/,cE=/[\x2E\u3002\uFF0E\uFF61]/g,dE={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},hE=Math.floor,uE=String.fromCharCode
|
|
8370
|
+
function pE(e){throw new RangeError(dE[e])}function fE(e,t){const n=e.split("@")
|
|
8371
|
+
let i=""
|
|
8372
|
+
n.length>1&&(i=n[0]+"@",e=n[1])
|
|
8373
|
+
const o=function(e,t){const n=[]
|
|
8374
|
+
let i=e.length
|
|
8375
|
+
for(;i--;)n[i]=t(e[i])
|
|
8376
|
+
return n}((e=e.replace(cE,".")).split("."),t).join(".")
|
|
8377
|
+
return i+o}function mE(e){const t=[]
|
|
8378
|
+
let n=0
|
|
8379
|
+
const i=e.length
|
|
8380
|
+
for(;n<i;){const o=e.charCodeAt(n++)
|
|
8381
|
+
if(o>=55296&&o<=56319&&n<i){const i=e.charCodeAt(n++)
|
|
8382
|
+
56320==(64512&i)?t.push(((1023&o)<<10)+(1023&i)+65536):(t.push(o),n--)}else t.push(o)}return t}const gE=function(e,t){return e+22+75*(e<26)-((0!=t)<<5)},vE=function(e,t,n){let i=0
|
|
8383
|
+
for(e=n?hE(e/700):e>>1,e+=hE(e/t);e>455;i+=rE)e=hE(e/35)
|
|
8384
|
+
return hE(i+36*e/(e+38))},bE=function(e){const t=[],n=e.length
|
|
8385
|
+
let i=0,o=128,s=72,r=e.lastIndexOf("-")
|
|
8386
|
+
r<0&&(r=0)
|
|
8387
|
+
for(let n=0;n<r;++n)e.charCodeAt(n)>=128&&pE("not-basic"),t.push(e.charCodeAt(n))
|
|
8388
|
+
for(let l=r>0?r+1:0;l<n;){const r=i
|
|
8389
|
+
for(let t=1,o=rE;;o+=rE){l>=n&&pE("invalid-input")
|
|
8390
|
+
const r=(a=e.charCodeAt(l++))>=48&&a<58?a-48+26:a>=65&&a<91?a-65:a>=97&&a<123?a-97:rE
|
|
8391
|
+
r>=rE&&pE("invalid-input"),r>hE((sE-i)/t)&&pE("overflow"),i+=r*t
|
|
8392
|
+
const c=o<=s?1:o>=s+26?26:o-s
|
|
8393
|
+
if(r<c)break
|
|
8394
|
+
const d=rE-c
|
|
8395
|
+
t>hE(sE/d)&&pE("overflow"),t*=d}const c=t.length+1
|
|
8396
|
+
s=vE(i-r,c,0==r),hE(i/c)>sE-o&&pE("overflow"),o+=hE(i/c),i%=c,t.splice(i++,0,o)}var a
|
|
8397
|
+
return String.fromCodePoint(...t)},yE=function(e){const t=[],n=(e=mE(e)).length
|
|
8398
|
+
let i=128,o=0,s=72
|
|
8399
|
+
for(const n of e)n<128&&t.push(uE(n))
|
|
8400
|
+
const r=t.length
|
|
8401
|
+
let a=r
|
|
8402
|
+
for(r&&t.push("-");a<n;){let n=sE
|
|
8403
|
+
for(const t of e)t>=i&&t<n&&(n=t)
|
|
8404
|
+
const l=a+1
|
|
8405
|
+
n-i>hE((sE-o)/l)&&pE("overflow"),o+=(n-i)*l,i=n
|
|
8406
|
+
for(const n of e)if(n<i&&++o>sE&&pE("overflow"),n===i){let e=o
|
|
8407
|
+
for(let n=rE;;n+=rE){const i=n<=s?1:n>=s+26?26:n-s
|
|
8408
|
+
if(e<i)break
|
|
8409
|
+
const o=e-i,r=rE-i
|
|
8410
|
+
t.push(uE(gE(i+o%r,0))),e=hE(o/r)}t.push(uE(gE(e,0))),s=vE(o,l,a===r),o=0,++a}++o,++i}return t.join("")},wE={version:"2.3.1",ucs2:{decode:mE,encode:e=>String.fromCodePoint(...e)},decode:bE,encode:yE,toASCII:function(e){return fE(e,(function(e){return lE.test(e)?"xn--"+yE(e):e}))},toUnicode:function(e){return fE(e,(function(e){return aE.test(e)?bE(e.slice(4).toLowerCase()):e}))}}
|
|
8411
|
+
const xE={default:{options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:100},components:{core:{},block:{},inline:{}}},zero:{options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:20},components:{core:{rules:["normalize","block","inline","text_join"]},block:{rules:["paragraph"]},inline:{rules:["text"],rules2:["balance_pairs","fragments_join"]}}},commonmark:{options:{html:!0,xhtmlOut:!0,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:20},components:{core:{rules:["normalize","block","inline","text_join"]},block:{rules:["blockquote","code","fence","heading","hr","html_block","lheading","list","reference","paragraph"]},inline:{rules:["autolink","backticks","emphasis","entity","escape","html_inline","image","link","newline","text"],rules2:["balance_pairs","emphasis","fragments_join"]}}}},CE=/^(vbscript|javascript|file|data):/,kE=/^data:image\/(gif|png|jpeg|webp);/
|
|
8412
|
+
function SE(e){const t=e.trim().toLowerCase()
|
|
8413
|
+
return!CE.test(t)||kE.test(t)}const $E=["http:","https:","mailto:"]
|
|
8414
|
+
function ME(e){const t=nM(e,!0)
|
|
8415
|
+
if(t.hostname&&(!t.protocol||$E.indexOf(t.protocol)>=0))try{t.hostname=wE.toASCII(t.hostname)}catch(e){}return B$(q$(t))}function _E(e){const t=nM(e,!0)
|
|
8416
|
+
if(t.hostname&&(!t.protocol||$E.indexOf(t.protocol)>=0))try{t.hostname=wE.toUnicode(t.hostname)}catch(e){}return V$(q$(t),V$.defaultChars+"%")}function EE(e,t){if(!(this instanceof EE))return new EE(e,t)
|
|
8417
|
+
t||_M(e)||(t=e||{},e="default"),this.inline=new W_,this.block=new D_,this.core=new b_,this.renderer=new JM,this.linkify=new oE,this.validateLink=SE,this.normalizeLink=ME,this.normalizeLinkText=_E,this.utils=KM,this.helpers=IM({},XM),this.options={},this.configure(e),t&&this.set(t)}EE.prototype.set=function(e){return IM(this.options,e),this},EE.prototype.configure=function(e){const t=this
|
|
8393
8418
|
if(_M(e)){const t=e
|
|
8394
|
-
if(!(e=
|
|
8395
|
-
return e.options&&t.set(e.options),e.components&&Object.keys(e.components).forEach((function(n){e.components[n].rules&&t[n].ruler.enableOnly(e.components[n].rules),e.components[n].rules2&&t[n].ruler2.enableOnly(e.components[n].rules2)})),this},
|
|
8419
|
+
if(!(e=xE[t]))throw new Error('Wrong `markdown-it` preset "'+t+'", check name')}if(!e)throw new Error("Wrong `markdown-it` preset, can't be empty")
|
|
8420
|
+
return e.options&&t.set(e.options),e.components&&Object.keys(e.components).forEach((function(n){e.components[n].rules&&t[n].ruler.enableOnly(e.components[n].rules),e.components[n].rules2&&t[n].ruler2.enableOnly(e.components[n].rules2)})),this},EE.prototype.enable=function(e,t){let n=[]
|
|
8396
8421
|
Array.isArray(e)||(e=[e]),["core","block","inline"].forEach((function(t){n=n.concat(this[t].ruler.enable(e,!0))}),this),n=n.concat(this.inline.ruler2.enable(e,!0))
|
|
8397
8422
|
const i=e.filter((function(e){return n.indexOf(e)<0}))
|
|
8398
8423
|
if(i.length&&!t)throw new Error("MarkdownIt. Failed to enable unknown rule(s): "+i)
|
|
8399
|
-
return this},
|
|
8424
|
+
return this},EE.prototype.disable=function(e,t){let n=[]
|
|
8400
8425
|
Array.isArray(e)||(e=[e]),["core","block","inline"].forEach((function(t){n=n.concat(this[t].ruler.disable(e,!0))}),this),n=n.concat(this.inline.ruler2.disable(e,!0))
|
|
8401
8426
|
const i=e.filter((function(e){return n.indexOf(e)<0}))
|
|
8402
8427
|
if(i.length&&!t)throw new Error("MarkdownIt. Failed to disable unknown rule(s): "+i)
|
|
8403
|
-
return this},
|
|
8404
|
-
return e.apply(e,t),this},
|
|
8428
|
+
return this},EE.prototype.use=function(e){const t=[this].concat(Array.prototype.slice.call(arguments,1))
|
|
8429
|
+
return e.apply(e,t),this},EE.prototype.parse=function(e,t){if("string"!=typeof e)throw new Error("Input data should be a String")
|
|
8405
8430
|
const n=new this.core.State(e,this,t)
|
|
8406
|
-
return this.core.process(n),n.tokens},
|
|
8407
|
-
return n.inlineMode=!0,this.core.process(n),n.tokens},
|
|
8408
|
-
const
|
|
8409
|
-
class
|
|
8431
|
+
return this.core.process(n),n.tokens},EE.prototype.render=function(e,t){return t=t||{},this.renderer.render(this.parse(e,t),this.options,t)},EE.prototype.parseInline=function(e,t){const n=new this.core.State(e,this,t)
|
|
8432
|
+
return n.inlineMode=!0,this.core.process(n),n.tokens},EE.prototype.renderInline=function(e,t){return t=t||{},this.renderer.render(this.parseInline(e,t),this.options,t)}
|
|
8433
|
+
const IE=new jb({nodes:{doc:{content:"block+"},paragraph:{content:"inline*",group:"block",parseDOM:[{tag:"p"}],toDOM:()=>["p",0]},blockquote:{content:"block+",group:"block",parseDOM:[{tag:"blockquote"}],toDOM:()=>["blockquote",0]},horizontal_rule:{group:"block",parseDOM:[{tag:"hr"}],toDOM:()=>["div",["hr"]]},heading:{attrs:{level:{default:1}},content:"(text | image)*",group:"block",defining:!0,parseDOM:[{tag:"h1",attrs:{level:1}},{tag:"h2",attrs:{level:2}},{tag:"h3",attrs:{level:3}},{tag:"h4",attrs:{level:4}},{tag:"h5",attrs:{level:5}},{tag:"h6",attrs:{level:6}}],toDOM:e=>["h"+e.attrs.level,0]},code_block:{content:"text*",group:"block",code:!0,defining:!0,marks:"",attrs:{params:{default:""}},parseDOM:[{tag:"pre",preserveWhitespace:"full",getAttrs:e=>({params:e.getAttribute("data-params")||""})}],toDOM:e=>["pre",e.attrs.params?{"data-params":e.attrs.params}:{},["code",0]]},ordered_list:{content:"list_item+",group:"block",attrs:{order:{default:1},tight:{default:!1}},parseDOM:[{tag:"ol",getAttrs:e=>({order:e.hasAttribute("start")?+e.getAttribute("start"):1,tight:e.hasAttribute("data-tight")})}],toDOM:e=>["ol",{start:1==e.attrs.order?null:e.attrs.order,"data-tight":e.attrs.tight?"true":null},0]},bullet_list:{content:"list_item+",group:"block",attrs:{tight:{default:!1}},parseDOM:[{tag:"ul",getAttrs:e=>({tight:e.hasAttribute("data-tight")})}],toDOM:e=>["ul",{"data-tight":e.attrs.tight?"true":null},0]},list_item:{content:"block+",defining:!0,parseDOM:[{tag:"li"}],toDOM:()=>["li",0]},text:{group:"inline"},image:{inline:!0,attrs:{src:{},alt:{default:null},title:{default:null}},group:"inline",draggable:!0,parseDOM:[{tag:"img[src]",getAttrs:e=>({src:e.getAttribute("src"),title:e.getAttribute("title"),alt:e.getAttribute("alt")})}],toDOM:e=>["img",e.attrs]},hard_break:{inline:!0,group:"inline",selectable:!1,parseDOM:[{tag:"br"}],toDOM:()=>["br"]}},marks:{em:{parseDOM:[{tag:"i"},{tag:"em"},{style:"font-style=italic"},{style:"font-style=normal",clearMark:e=>"em"==e.type.name}],toDOM:()=>["em"]},strong:{parseDOM:[{tag:"strong"},{tag:"b",getAttrs:e=>"normal"!=e.style.fontWeight&&null},{style:"font-weight=400",clearMark:e=>"strong"==e.type.name},{style:"font-weight",getAttrs:e=>/^(bold(er)?|[5-9]\d{2,})$/.test(e)&&null}],toDOM:()=>["strong"]},link:{attrs:{href:{},title:{default:null}},inclusive:!1,parseDOM:[{tag:"a[href]",getAttrs:e=>({href:e.getAttribute("href"),title:e.getAttribute("title")})}],toDOM:e=>["a",e.attrs]},code:{parseDOM:[{tag:"code"}],toDOM:()=>["code"]}}})
|
|
8434
|
+
class DE{constructor(e,t){this.schema=e,this.tokenHandlers=t,this.stack=[{type:e.topNodeType,attrs:null,content:[],marks:ab.none}]}top(){return this.stack[this.stack.length-1]}push(e){this.stack.length&&this.top().content.push(e)}addText(e){if(!e)return
|
|
8410
8435
|
let t,n=this.top(),i=n.content,o=i[i.length-1],s=this.schema.text(e,n.marks)
|
|
8411
8436
|
o&&(t=function(e,t){if(e.isText&&t.isText&&ab.sameSet(e.marks,t.marks))return e.withText(e.text+t.text)}(o,s))?i[i.length-1]=t:i.push(s)}openMark(e){let t=this.top()
|
|
8412
8437
|
t.marks=e.addToSet(t.marks)}closeMark(e){let t=this.top()
|
|
@@ -8414,35 +8439,35 @@ t.marks=e.removeFromSet(t.marks)}parseTokens(e){for(let t=0;t<e.length;t++){let
|
|
|
8414
8439
|
if(!i)throw new Error("Token type `"+n.type+"` not supported by Markdown parser")
|
|
8415
8440
|
i(this,n,e,t)}}addNode(e,t,n){let i=this.top(),o=e.createAndFill(t,n,i?i.marks:[])
|
|
8416
8441
|
return o?(this.push(o),o):null}openNode(e,t){this.stack.push({type:e,attrs:t,content:[],marks:ab.none})}closeNode(){let e=this.stack.pop()
|
|
8417
|
-
return this.addNode(e.type,e.attrs,e.content)}}function
|
|
8442
|
+
return this.addNode(e.type,e.attrs,e.content)}}function AE(e,t,n,i){return e.getAttrs?e.getAttrs(t,n,i):e.attrs instanceof Function?e.attrs(t):e.attrs}function TE(e,t){return e.noCloseToken||"code_inline"==t||"code_block"==t||"fence"==t}function OE(e){return"\n"==e[e.length-1]?e.slice(0,e.length-1):e}function RE(){}class FE{constructor(e,t,n){this.schema=e,this.tokenizer=t,this.tokens=n,this.tokenHandlers=function(e,t){let n=Object.create(null)
|
|
8418
8443
|
for(let i in t){let o=t[i]
|
|
8419
8444
|
if(o.block){let t=e.nodeType(o.block)
|
|
8420
|
-
|
|
8421
|
-
n[i]=(e,n,i,s)=>e.addNode(t,
|
|
8422
|
-
|
|
8423
|
-
|
|
8445
|
+
TE(o,i)?n[i]=(e,n,i,s)=>{e.openNode(t,AE(o,n,i,s)),e.addText(OE(n.content)),e.closeNode()}:(n[i+"_open"]=(e,n,i,s)=>e.openNode(t,AE(o,n,i,s)),n[i+"_close"]=e=>e.closeNode())}else if(o.node){let t=e.nodeType(o.node)
|
|
8446
|
+
n[i]=(e,n,i,s)=>e.addNode(t,AE(o,n,i,s))}else if(o.mark){let t=e.marks[o.mark]
|
|
8447
|
+
TE(o,i)?n[i]=(e,n,i,s)=>{e.openMark(t.create(AE(o,n,i,s))),e.addText(OE(n.content)),e.closeMark(t)}:(n[i+"_open"]=(e,n,i,s)=>e.openMark(t.create(AE(o,n,i,s))),n[i+"_close"]=e=>e.closeMark(t))}else{if(!o.ignore)throw new RangeError("Unrecognized parsing spec "+JSON.stringify(o))
|
|
8448
|
+
TE(o,i)?n[i]=RE:(n[i+"_open"]=RE,n[i+"_close"]=RE)}}return n.text=(e,t)=>e.addText(t.content),n.inline=(e,t)=>e.parseTokens(t.children),n.softbreak=n.softbreak||(e=>e.addText(" ")),n}(e,n)}parse(e,t={}){let n,i=new DE(this.schema,this.tokenHandlers)
|
|
8424
8449
|
i.parseTokens(this.tokenizer.parse(e,t))
|
|
8425
8450
|
do{n=i.closeNode()}while(i.stack.length)
|
|
8426
|
-
return n||this.schema.topNodeType.createAndFill()}}function
|
|
8427
|
-
return!1}const
|
|
8428
|
-
class
|
|
8429
|
-
let n=new
|
|
8430
|
-
return n.renderContent(e),n.out}}const
|
|
8451
|
+
return n||this.schema.topNodeType.createAndFill()}}function NE(e,t){for(;++t<e.length;)if("list_item_open"!=e[t].type)return e[t].hidden
|
|
8452
|
+
return!1}const PE=new FE(IE,EE("commonmark",{html:!1}),{blockquote:{block:"blockquote"},paragraph:{block:"paragraph"},list_item:{block:"list_item"},bullet_list:{block:"bullet_list",getAttrs:(e,t,n)=>({tight:NE(t,n)})},ordered_list:{block:"ordered_list",getAttrs:(e,t,n)=>({order:+e.attrGet("start")||1,tight:NE(t,n)})},heading:{block:"heading",getAttrs:e=>({level:+e.tag.slice(1)})},code_block:{block:"code_block",noCloseToken:!0},fence:{block:"code_block",getAttrs:e=>({params:e.info||""}),noCloseToken:!0},hr:{node:"horizontal_rule"},image:{node:"image",getAttrs:e=>({src:e.attrGet("src"),title:e.attrGet("title")||null,alt:e.children[0]&&e.children[0].content||null})},hardbreak:{node:"hard_break"},em:{mark:"em"},strong:{mark:"strong"},link:{mark:"link",getAttrs:e=>({href:e.attrGet("href"),title:e.attrGet("title")||null})},code_inline:{mark:"code",noCloseToken:!0}}),LE={open:"",close:"",mixable:!0}
|
|
8453
|
+
class zE{constructor(e,t,n={}){this.nodes=e,this.marks=t,this.options=n}serialize(e,t={}){t=Object.assign({},this.options,t)
|
|
8454
|
+
let n=new BE(this.nodes,this.marks,t)
|
|
8455
|
+
return n.renderContent(e),n.out}}const VE=new zE({blockquote(e,t){e.wrapBlock("> ",null,t,(()=>e.renderContent(t)))},code_block(e,t){const n=t.textContent.match(/`{3,}/gm),i=n?n.sort().slice(-1)[0]+"`":"```"
|
|
8431
8456
|
e.write(i+(t.attrs.params||"")+"\n"),e.text(t.textContent,!1),e.write("\n"),e.write(i),e.closeBlock(t)},heading(e,t){e.write(e.repeat("#",t.attrs.level)+" "),e.renderInline(t,!1),e.closeBlock(t)},horizontal_rule(e,t){e.write(t.attrs.markup||"---"),e.closeBlock(t)},bullet_list(e,t){e.renderList(t," ",(()=>(t.attrs.bullet||"*")+" "))},ordered_list(e,t){let n=t.attrs.order||1,i=String(n+t.childCount-1).length,o=e.repeat(" ",i+2)
|
|
8432
8457
|
e.renderList(t,o,(t=>{let o=String(n+t)
|
|
8433
8458
|
return e.repeat(" ",i-o.length)+o+". "}))},list_item(e,t){e.renderContent(t)},paragraph(e,t){e.renderInline(t),e.closeBlock(t)},image(e,t){e.write("]/g,"\\$&")+(t.attrs.title?' "'+t.attrs.title.replace(/"/g,'\\"')+'"':"")+")")},hard_break(e,t,n,i){for(let o=i+1;o<n.childCount;o++)if(n.child(o).type!=t.type)return void e.write("\\\n")},text(e,t){e.text(t.text,!e.inAutolink)}},{em:{open:"*",close:"*",mixable:!0,expelEnclosingWhitespace:!0},strong:{open:"**",close:"**",mixable:!0,expelEnclosingWhitespace:!0},link:{open:(e,t,n,i)=>(e.inAutolink=function(e,t,n){if(e.attrs.title||!/^\w+:/.test(e.attrs.href))return!1
|
|
8434
8459
|
let i=t.child(n)
|
|
8435
8460
|
return!(!i.isText||i.text!=e.attrs.href||i.marks[i.marks.length-1]!=e)&&(n==t.childCount-1||!e.isInSet(t.child(n+1).marks))}(t,n,i),e.inAutolink?"<":"["),close(e,t,n,i){let{inAutolink:o}=e
|
|
8436
|
-
return e.inAutolink=void 0,o?">":"]("+t.attrs.href.replace(/[\(\)"]/g,"\\$&")+(t.attrs.title?` "${t.attrs.title.replace(/"/g,'\\"')}"`:"")+")"},mixable:!0},code:{open:(e,t,n,i)=>
|
|
8437
|
-
function
|
|
8461
|
+
return e.inAutolink=void 0,o?">":"]("+t.attrs.href.replace(/[\(\)"]/g,"\\$&")+(t.attrs.title?` "${t.attrs.title.replace(/"/g,'\\"')}"`:"")+")"},mixable:!0},code:{open:(e,t,n,i)=>HE(n.child(i),-1),close:(e,t,n,i)=>HE(n.child(i-1),1),escape:!1}})
|
|
8462
|
+
function HE(e,t){let n,i=/`+/g,o=0
|
|
8438
8463
|
if(e.isText)for(;n=i.exec(e.text);)o=Math.max(o,n[0].length)
|
|
8439
8464
|
let s=o>0&&t>0?" `":"`"
|
|
8440
8465
|
for(let e=0;e<o;e++)s+="`"
|
|
8441
|
-
return o>0&&t<0&&(s+=" "),s}class
|
|
8466
|
+
return o>0&&t<0&&(s+=" "),s}class BE{constructor(e,t,n){this.nodes=e,this.marks=t,this.options=n,this.delim="",this.out="",this.closed=null,this.inAutolink=void 0,this.atBlockStart=!1,this.inTightList=!1,void 0===this.options.tightLists&&(this.options.tightLists=!1),void 0===this.options.hardBreakNodeName&&(this.options.hardBreakNodeName="hard_break")}flushClose(e=2){if(this.closed){if(this.atBlank()||(this.out+="\n"),e>1){let t=this.delim,n=/\s+$/.exec(t)
|
|
8442
8467
|
n&&(t=t.slice(0,t.length-n[0].length))
|
|
8443
8468
|
for(let n=1;n<e;n++)this.out+=t+"\n"}this.closed=null}}getMark(e){let t=this.marks[e]
|
|
8444
8469
|
if(!t){if(!1!==this.options.strict)throw new Error(`Mark type \`${e}\` not supported by Markdown renderer`)
|
|
8445
|
-
t=
|
|
8470
|
+
t=LE}return t}wrapBlock(e,t,n,i){let o=this.delim
|
|
8446
8471
|
this.write(null!=t?t:e),this.delim+=e,i(),this.delim=o,this.closeBlock(n)}atBlank(){return/(^|\n)$/.test(this.out)}ensureNewLine(){this.atBlank()||(this.out+="\n")}write(e){this.flushClose(),this.delim&&this.atBlank()&&(this.out+=this.delim),e&&(this.out+=e)}closeBlock(e){this.closed=e}text(e,t=!0){let n=e.split("\n")
|
|
8447
8472
|
for(let e=0;e<n.length;e++)this.write(),!t&&"["==n[e][0]&&/(^|[^\\])\!$/.test(this.out)&&(this.out=this.out.slice(0,this.out.length-1)+"\\!"),this.out+=t?this.esc(n[e],this.atBlockStart):n[e],e!=n.length-1&&(this.out+="\n")}render(e,t,n){if(this.nodes[e.type.name])this.nodes[e.type.name](this,e,t,n)
|
|
8448
8473
|
else{if(!1!==this.options.strict)throw new Error("Token type `"+e.type.name+"` not supported by Markdown renderer")
|
|
@@ -8473,72 +8498,72 @@ this.inTightList=i,e.forEach(((o,s,r)=>{r&&i&&this.flushClose(1),this.wrapBlock(
|
|
|
8473
8498
|
return t[0]+e+t[1]}repeat(e,t){let n=""
|
|
8474
8499
|
for(let i=0;i<t;i++)n+=e
|
|
8475
8500
|
return n}markString(e,t,n,i){let o=this.getMark(e.type.name),s=t?o.open:o.close
|
|
8476
|
-
return"string"==typeof s?s:s(this,e,n,i)}getEnclosingWhitespace(e){return{leading:(e.match(/^(\s+)/)||[void 0])[0],trailing:(e.match(/(\s+)$/)||[void 0])[0]}}}var
|
|
8477
|
-
class
|
|
8501
|
+
return"string"==typeof s?s:s(this,e,n,i)}getEnclosingWhitespace(e){return{leading:(e.match(/^(\s+)/)||[void 0])[0],trailing:(e.match(/(\s+)$/)||[void 0])[0]}}}var qE
|
|
8502
|
+
class UE{static parseMarkdownToDOM(e,t){try{UE.setup(t)
|
|
8478
8503
|
const n=this.markdownParser.parse(e)
|
|
8479
|
-
return null===n?{fragment:document.createDocumentFragment(),mentionedHrefs:Array.from(
|
|
8480
|
-
return e.normalizeLinkText=e=>e,new
|
|
8481
|
-
return n&&i?(
|
|
8482
|
-
class
|
|
8483
|
-
e.write(`<${n}>`)},n={bulletList:
|
|
8504
|
+
return null===n?{fragment:document.createDocumentFragment(),mentionedHrefs:Array.from(UE.mentionedHrefs)}:{fragment:this.domSerializer.serializeFragment(n.content),mentionedHrefs:Array.from(UE.mentionedHrefs)}}finally{UE.cleanup()}}static initializeMarkdownParser(){const e=PE.tokenizer.configure("zero").enable(["emphasis","list","escape","autolink","newline"])
|
|
8505
|
+
return e.normalizeLinkText=e=>e,new FE(this.updatedSchema,e,PE.tokens)}static getCustomSchemaConfiguration(){return new jb({nodes:IE.spec.nodes,marks:{link:{attrs:{href:{},rel:{default:"noopener noreferrer"},class:{default:""}},inclusive:!1,excludes:"_",toDOM(e){const t=e.attrs.href,n=UE.mentionConfigs?.find((e=>e.isValidMentionHref(t))),i=n?.getDisplayName(t)
|
|
8506
|
+
return n&&i?(UE.mentionedHrefs.add(t),[n.viewElement,{"mention-href":t,"mention-label":i}]):[Nd,{href:UE.startsWithHttpOrHttps(t)?t:null,rel:e.attrs.rel,class:t,"underline-hidden":!UE.startsWithHttpOrHttps(t)||null}]}},em:IE.spec.marks.get("em"),strong:IE.spec.marks.get("strong")}})}static setup(e){UE.mentionConfigs=e,UE.mentionedHrefs.clear()}static cleanup(){UE.mentionConfigs=void 0,UE.mentionedHrefs.clear()}static startsWithHttpOrHttps(e){return/^https?:\/\//i.test(e)}}qE=UE,UE.mentionedHrefs=new Set,UE.updatedSchema=qE.getCustomSchemaConfiguration(),UE.markdownParser=qE.initializeMarkdownParser(),UE.domSerializer=iy.fromSchema(qE.updatedSchema)
|
|
8507
|
+
class jE{constructor(e){this.markdownSerializer=this.initializeMarkdownSerializerForTipTap(e)}serializeDOMToMarkdown(e){return this.markdownSerializer.serialize(e)}initializeMarkdownSerializerForTipTap(e){const t=function(e,t){const n=t.attrs.href
|
|
8508
|
+
e.write(`<${n}>`)},n={bulletList:VE.nodes.bullet_list,listItem:VE.nodes.list_item,orderedList:function(e,t){const n=t.attrs.start||1,i=String(n+t.childCount-1).length,o=e.repeat(" ",i+2)
|
|
8484
8509
|
e.renderList(t,o,(t=>{const o=String(n+t)
|
|
8485
|
-
return`${e.repeat(" ",i-o.length)+o}. `}))},doc:
|
|
8510
|
+
return`${e.repeat(" ",i-o.length)+o}. `}))},doc:VE.nodes.doc,paragraph:VE.nodes.paragraph,text:VE.nodes.text,hardBreak:VE.nodes.hard_break}
|
|
8486
8511
|
e.forEach((e=>{n[e]=t}))
|
|
8487
|
-
const i={italic:
|
|
8488
|
-
return new
|
|
8489
|
-
class
|
|
8512
|
+
const i={italic:VE.marks.em,bold:VE.marks.strong,link:{open:"<",close:">",escape:!1,expelEnclosingWhitespace:!0}}
|
|
8513
|
+
return new zE(n,i)}}class WE{constructor(e,t){this.iconTemplate=G`<${e.icon} slot="start"></${e.icon}>`,this.character=e.character,this.viewElement=e.viewElement,this.validator=e.validator,this.mentionUpdateEmitter=t}}e([g],WE.prototype,"mappingConfigs",void 0),e([g],WE.prototype,"pattern",void 0),e([g],WE.prototype,"buttonLabel",void 0)
|
|
8514
|
+
class GE extends Vt{constructor(){super(...arguments),this.mentionInternals=new WE(this.getMentionInternalsOptions(),(e=>{this.emitMentionUpdate(e)})),this.mappingNotifiers=[],this.mappingElements=[]}checkValidity(){return this.mentionInternals.validator.isValid()}get validity(){return this.mentionInternals.validator.getValidity()}emitMentionUpdate(e){const t={filter:e}
|
|
8490
8515
|
this.$emit("mention-update",t)}handleChange(e,t){e instanceof Cv&&"string"==typeof t&&this.getObservedMappingProperty().includes(t)&&this.updateMappingConfigs()}getMappingConfigs(){const e=new Map
|
|
8491
8516
|
return this.mappingElements.forEach((t=>{const n=t.key??void 0
|
|
8492
8517
|
if(void 0===n||"string"!=typeof n)throw Error("mentionHref was invalid for type. Validation should have prevented this.")
|
|
8493
8518
|
const i=this.createMappingConfig(t)
|
|
8494
8519
|
e.set(n,i)})),e}updateMappingConfigs(){this.mentionInternals.validator.validate(this.mappingElements,this.pattern),this.mentionInternals.mappingConfigs=this.mentionInternals.validator.isValid()?this.getMappingConfigs():void 0}mappingElementsChanged(){this.updateMappingConfigs(),this.observeMappingElements()}patternChanged(){this.mentionInternals.validator.validate(this.mappingElements,this.pattern),this.mentionInternals.pattern=this.pattern}buttonLabelChanged(){this.mentionInternals.buttonLabel=this.buttonLabel}removeMappingElementObservers(){this.mappingNotifiers.forEach((e=>{e.unsubscribe(this)})),this.mappingNotifiers=[]}observeMappingElements(){this.removeMappingElementObservers()
|
|
8495
8520
|
for(const e of this.mappingElements){const t=m.getNotifier(e)
|
|
8496
|
-
t.subscribe(this),this.mappingNotifiers.push(t)}}}e([le],
|
|
8497
|
-
class
|
|
8521
|
+
t.subscribe(this),this.mappingNotifiers.push(t)}}}e([le],GE.prototype,"pattern",void 0),e([le({attribute:"button-label"})],GE.prototype,"buttonLabel",void 0),e([g],GE.prototype,"mappingElements",void 0)
|
|
8522
|
+
class ZE{constructor(e){this.regexPattern=new RegExp(e.pattern??""),this.mappingConfigs=e.mappingConfigs,this.viewElement=e.viewElement}isValidMentionHref(e){return this.regexPattern.test(e)}getDisplayName(e){const t=this.mappingConfigs?.get(e),n=this.extractMentionId(e)
|
|
8498
8523
|
return t?.displayName??n}extractMentionId(e){const t=this.regexPattern.exec(e)
|
|
8499
|
-
return t?.[1]??void 0}}class
|
|
8500
|
-
class
|
|
8524
|
+
return t?.[1]??void 0}}class KE{constructor(e){this.parserMentionConfig=[],this.isValid=!0,this.isValid=e.every((e=>e.mentionInternals.validator.isValid())),this.parserMentionConfig=this.isValid?e.map((e=>new ZE(e.mentionInternals))):[]}}class XE{constructor(e){this.trackedItems={},this.trackedItems=e.reduce(((e,t)=>({...e,[t]:!1})),this.trackedItems)}getTrackedItems(){return{...this.trackedItems}}isTracked(e){return this.trackedItems[e]}track(e){this.trackedItems[e]=!0}untrack(e){this.trackedItems[e]=!1}trackAll(){this.setAllKeys(!0)}untrackAll(){this.setAllKeys(!1)}allTracked(){return Object.values(this.trackedItems).every((e=>e))}anyTracked(){return Object.values(this.trackedItems).some((e=>e))}noneTracked(){return Object.values(this.trackedItems).every((e=>!e))}setAllKeys(e){this.trackedItems=Object.keys(this.trackedItems).reduce(((t,n)=>({...t,[n]:e})),this.trackedItems)}}class YE extends XE{}const JE=["pattern","mappingConfigs","buttonLabel"]
|
|
8525
|
+
class QE extends YE{constructor(e){super(JE),this.richText=e,this.updateQueued=!1}get updatePattern(){return this.isTracked("pattern")}get updateMappingConfigs(){return this.isTracked("mappingConfigs")}get updateButtonLabel(){return this.isTracked("buttonLabel")}trackMentionInternalsPropertyChanged(e){switch(e){case"mappingConfigs":this.track("mappingConfigs")
|
|
8501
8526
|
break
|
|
8502
8527
|
case"pattern":this.track("pattern")
|
|
8503
8528
|
break
|
|
8504
|
-
case"buttonLabel":this.track("buttonLabel")}this.queueUpdate()}trackMentionElementsInstancesChanged(){this.track("pattern"),this.track("mappingConfigs"),this.track("buttonLabel"),this.queueUpdate()}queueUpdate(){this.richText.$fastController.isConnected&&(this.updateQueued||(this.updateQueued=!0,u.queueUpdate((()=>{this.richText.createConfig(),this.untrackAll(),this.updateQueued=!1}))))}}class
|
|
8505
|
-
return this.duplicateMentionConfiguration=t.length!==new Set(t).size,!this.duplicateMentionConfiguration}}async function
|
|
8506
|
-
await Promise.all(t)}class
|
|
8529
|
+
case"buttonLabel":this.track("buttonLabel")}this.queueUpdate()}trackMentionElementsInstancesChanged(){this.track("pattern"),this.track("mappingConfigs"),this.track("buttonLabel"),this.queueUpdate()}queueUpdate(){this.richText.$fastController.isConnected&&(this.updateQueued||(this.updateQueued=!0,u.queueUpdate((()=>{this.richText.createConfig(),this.untrackAll(),this.updateQueued=!1}))))}}class eI{constructor(){this.invalidMentionConfiguration=!1,this.duplicateMentionConfiguration=!1}getValidity(){return{invalidMentionConfiguration:this.invalidMentionConfiguration,duplicateMentionConfiguration:this.duplicateMentionConfiguration}}isValid(){return Object.values(this.getValidity()).every((e=>!1===e))}validate(e){this.validateDuplicateMentionConfigurations(e),this.validateMentionConfigurations(e)}validateMentionConfigurations(e){return this.invalidMentionConfiguration=e.some((e=>!e.mentionInternals.validator.isValid())),!this.invalidMentionConfiguration}validateDuplicateMentionConfigurations(e){const t=e.map((e=>e.mentionInternals.character))
|
|
8530
|
+
return this.duplicateMentionConfiguration=t.length!==new Set(t).size,!this.duplicateMentionConfiguration}}async function tI(e){const t=e.map((async e=>e.matches(":not(:defined)")?customElements.whenDefined(e.localName):Promise.resolve()))
|
|
8531
|
+
await Promise.all(t)}class nI extends Vt{constructor(){super(...arguments),this.mentionInternalsNotifiers=[],this.childItems=[],this.richTextUpdateTracker=new QE(this),this.richTextValidator=new eI}get validity(){return this.richTextValidator.getValidity()}checkValidity(){return this.richTextValidator.isValid()}handleChange(e,t){e instanceof WE&&"string"==typeof t&&this.richTextUpdateTracker.trackMentionInternalsPropertyChanged(t)}createConfig(){this.validate(),this.richTextValidator.isValid()?(this.richTextUpdateTracker.updateMappingConfigs||this.richTextUpdateTracker.updatePattern)&&(this.configuration=new KE(this.mentionElements)):this.configuration=void 0}validate(){this.richTextValidator.validate(this.mentionElements)}childItemsChanged(e,t){void 0!==e&&this.updateMentionElementsFromChildItems()}async updateMentionElementsFromChildItems(){await tI(this.childItems),this.mentionElements=this.childItems.filter((e=>e instanceof GE)),this.observeMentionInternals(),this.richTextUpdateTracker.trackMentionElementsInstancesChanged()}observeMentionInternals(){this.removeMentionInternalsObservers()
|
|
8507
8532
|
for(const e of this.mentionElements){const t=m.getNotifier(e.mentionInternals)
|
|
8508
|
-
t.subscribe(this),this.mentionInternalsNotifiers.push(t)}}removeMentionInternalsObservers(){this.mentionInternalsNotifiers.forEach((e=>{e.unsubscribe(this)})),this.mentionInternalsNotifiers=[]}}e([g],
|
|
8509
|
-
const
|
|
8510
|
-
return!!Object.entries(n).some((([,e])=>!!e))||t.unsetMark(this.name)}}}}),
|
|
8511
|
-
return(this.options.keepMarks||this.options.keepAttributes)&&(e=u$({find:
|
|
8512
|
-
var
|
|
8513
|
-
|
|
8533
|
+
t.subscribe(this),this.mentionInternalsNotifiers.push(t)}}removeMentionInternalsObservers(){this.mentionInternalsNotifiers.forEach((e=>{e.unsubscribe(this)})),this.mentionInternalsNotifiers=[]}}e([g],nI.prototype,"childItems",void 0),e([g],nI.prototype,"configuration",void 0)
|
|
8534
|
+
const iI=/(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))$/,oI=/(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))/g,sI=/(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))$/,rI=/(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))/g,aI=p$.create({name:"bold",addOptions:()=>({HTMLAttributes:{}}),parseHTML:()=>[{tag:"strong"},{tag:"b",getAttrs:e=>"normal"!==e.style.fontWeight&&null},{style:"font-weight",getAttrs:e=>/^(bold(er)?|[5-9]\d{2,})$/.test(e)&&null}],renderHTML({HTMLAttributes:e}){return["strong",sS(this.options.HTMLAttributes,e),0]},addCommands(){return{setBold:()=>({commands:e})=>e.setMark(this.name),toggleBold:()=>({commands:e})=>e.toggleMark(this.name),unsetBold:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-b":()=>this.editor.commands.toggleBold(),"Mod-B":()=>this.editor.commands.toggleBold()}},addInputRules(){return[h$({find:iI,type:this.type}),h$({find:sI,type:this.type})]},addPasteRules(){return[m$({find:oI,type:this.type}),m$({find:rI,type:this.type})]}}),lI=f$.create({name:"listItem",addOptions:()=>({HTMLAttributes:{},bulletListTypeName:"bulletList",orderedListTypeName:"orderedList"}),content:"paragraph block*",defining:!0,parseHTML:()=>[{tag:"li"}],renderHTML({HTMLAttributes:e}){return["li",sS(this.options.HTMLAttributes,e),0]},addKeyboardShortcuts(){return{Enter:()=>this.editor.commands.splitListItem(this.name),Tab:()=>this.editor.commands.sinkListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)}}}),cI=p$.create({name:"textStyle",addOptions:()=>({HTMLAttributes:{}}),parseHTML:()=>[{tag:"span",getAttrs:e=>!!e.hasAttribute("style")&&{}}],renderHTML({HTMLAttributes:e}){return["span",sS(this.options.HTMLAttributes,e),0]},addCommands(){return{removeEmptyTextStyle:()=>({state:e,commands:t})=>{const n=WS(e,this.type)
|
|
8535
|
+
return!!Object.entries(n).some((([,e])=>!!e))||t.unsetMark(this.name)}}}}),dI=/^\s*([-+*])\s$/,hI=f$.create({name:"bulletList",addOptions:()=>({itemTypeName:"listItem",HTMLAttributes:{},keepMarks:!1,keepAttributes:!1}),group:"block list",content(){return`${this.options.itemTypeName}+`},parseHTML:()=>[{tag:"ul"}],renderHTML({HTMLAttributes:e}){return["ul",sS(this.options.HTMLAttributes,e),0]},addCommands(){return{toggleBulletList:()=>({commands:e,chain:t})=>this.options.keepAttributes?t().toggleList(this.name,this.options.itemTypeName,this.options.keepMarks).updateAttributes(lI.name,this.editor.getAttributes(cI.name)).run():e.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}},addKeyboardShortcuts(){return{"Mod-Shift-8":()=>this.editor.commands.toggleBulletList()}},addInputRules(){let e=u$({find:dI,type:this.type})
|
|
8536
|
+
return(this.options.keepMarks||this.options.keepAttributes)&&(e=u$({find:dI,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:()=>this.editor.getAttributes(cI.name),editor:this.editor})),[e]}}),uI=f$.create({name:"doc",topNode:!0,content:"block+"})
|
|
8537
|
+
var pI=200,fI=function(){}
|
|
8538
|
+
fI.prototype.append=function(e){return e.length?(e=fI.from(e),!this.length&&e||e.length<pI&&this.leafAppend(e)||this.length<pI&&e.leafPrepend(this)||this.appendInner(e)):this},fI.prototype.prepend=function(e){return e.length?fI.from(e).append(this):this},fI.prototype.appendInner=function(e){return new gI(this,e)},fI.prototype.slice=function(e,t){return void 0===e&&(e=0),void 0===t&&(t=this.length),e>=t?fI.empty:this.sliceInner(Math.max(0,e),Math.min(this.length,t))},fI.prototype.get=function(e){if(!(e<0||e>=this.length))return this.getInner(e)},fI.prototype.forEach=function(e,t,n){void 0===t&&(t=0),void 0===n&&(n=this.length),t<=n?this.forEachInner(e,t,n,0):this.forEachInvertedInner(e,t,n,0)},fI.prototype.map=function(e,t,n){void 0===t&&(t=0),void 0===n&&(n=this.length)
|
|
8514
8539
|
var i=[]
|
|
8515
|
-
return this.forEach((function(t,n){return i.push(e(t,n))}),t,n),i},
|
|
8516
|
-
var
|
|
8540
|
+
return this.forEach((function(t,n){return i.push(e(t,n))}),t,n),i},fI.from=function(e){return e instanceof fI?e:e&&e.length?new mI(e):fI.empty}
|
|
8541
|
+
var mI=function(e){function t(t){e.call(this),this.values=t}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t
|
|
8517
8542
|
var n={length:{configurable:!0},depth:{configurable:!0}}
|
|
8518
|
-
return t.prototype.flatten=function(){return this.values},t.prototype.sliceInner=function(e,n){return 0==e&&n==this.length?this:new t(this.values.slice(e,n))},t.prototype.getInner=function(e){return this.values[e]},t.prototype.forEachInner=function(e,t,n,i){for(var o=t;o<n;o++)if(!1===e(this.values[o],i+o))return!1},t.prototype.forEachInvertedInner=function(e,t,n,i){for(var o=t-1;o>=n;o--)if(!1===e(this.values[o],i+o))return!1},t.prototype.leafAppend=function(e){if(this.length+e.length<=
|
|
8519
|
-
|
|
8520
|
-
var
|
|
8543
|
+
return t.prototype.flatten=function(){return this.values},t.prototype.sliceInner=function(e,n){return 0==e&&n==this.length?this:new t(this.values.slice(e,n))},t.prototype.getInner=function(e){return this.values[e]},t.prototype.forEachInner=function(e,t,n,i){for(var o=t;o<n;o++)if(!1===e(this.values[o],i+o))return!1},t.prototype.forEachInvertedInner=function(e,t,n,i){for(var o=t-1;o>=n;o--)if(!1===e(this.values[o],i+o))return!1},t.prototype.leafAppend=function(e){if(this.length+e.length<=pI)return new t(this.values.concat(e.flatten()))},t.prototype.leafPrepend=function(e){if(this.length+e.length<=pI)return new t(e.flatten().concat(this.values))},n.length.get=function(){return this.values.length},n.depth.get=function(){return 0},Object.defineProperties(t.prototype,n),t}(fI)
|
|
8544
|
+
fI.empty=new mI([])
|
|
8545
|
+
var gI=function(e){function t(t,n){e.call(this),this.left=t,this.right=n,this.length=t.length+n.length,this.depth=Math.max(t.depth,n.depth)+1}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.flatten=function(){return this.left.flatten().concat(this.right.flatten())},t.prototype.getInner=function(e){return e<this.left.length?this.left.get(e):this.right.get(e-this.left.length)},t.prototype.forEachInner=function(e,t,n,i){var o=this.left.length
|
|
8521
8546
|
return!(t<o&&!1===this.left.forEachInner(e,t,Math.min(n,o),i))&&(!(n>o&&!1===this.right.forEachInner(e,Math.max(t-o,0),Math.min(this.length,n)-o,i+o))&&void 0)},t.prototype.forEachInvertedInner=function(e,t,n,i){var o=this.left.length
|
|
8522
8547
|
return!(t>o&&!1===this.right.forEachInvertedInner(e,t-o,Math.max(n,o)-o,i+o))&&(!(n<o&&!1===this.left.forEachInvertedInner(e,Math.min(t,o),n,i))&&void 0)},t.prototype.sliceInner=function(e,t){if(0==e&&t==this.length)return this
|
|
8523
8548
|
var n=this.left.length
|
|
8524
8549
|
return t<=n?this.left.slice(e,t):e>=n?this.right.slice(e-n,t-n):this.left.slice(e,n).append(this.right.slice(0,t-n))},t.prototype.leafAppend=function(e){var n=this.right.leafAppend(e)
|
|
8525
8550
|
if(n)return new t(this.left,n)},t.prototype.leafPrepend=function(e){var n=this.left.leafPrepend(e)
|
|
8526
|
-
if(n)return new t(n,this.right)},t.prototype.appendInner=function(e){return this.left.depth>=Math.max(this.right.depth,e.depth)+1?new t(this.left,new t(this.right,e)):new t(this,e)},t}(
|
|
8527
|
-
class
|
|
8551
|
+
if(n)return new t(n,this.right)},t.prototype.appendInner=function(e){return this.left.depth>=Math.max(this.right.depth,e.depth)+1?new t(this.left,new t(this.right,e)):new t(this,e)},t}(fI)
|
|
8552
|
+
class vI{constructor(e,t){this.items=e,this.eventCount=t}popEvent(e,t){if(0==this.eventCount)return null
|
|
8528
8553
|
let n,i,o=this.items.length
|
|
8529
8554
|
for(;;o--){if(this.items.get(o-1).selection){--o
|
|
8530
8555
|
break}}t&&(n=this.remapping(o,this.items.length),i=n.maps.length)
|
|
8531
8556
|
let s,r,a=e.tr,l=[],c=[]
|
|
8532
8557
|
return this.items.forEach(((e,t)=>{if(!e.step)return n||(n=this.remapping(o,t+1),i=n.maps.length),i--,void c.push(e)
|
|
8533
|
-
if(n){c.push(new
|
|
8558
|
+
if(n){c.push(new bI(e.map))
|
|
8534
8559
|
let t,o=e.step.map(n.slice(i))
|
|
8535
|
-
o&&a.maybeStep(o).doc&&(t=a.mapping.maps[a.mapping.maps.length-1],l.push(new
|
|
8536
|
-
return e.selection?(s=n?e.selection.map(n.slice(i)):e.selection,r=new
|
|
8537
|
-
for(let n=0;n<e.steps.length;n++){let l,c=e.steps[n].invert(e.docs[n]),d=new
|
|
8538
|
-
return l>
|
|
8539
|
-
return e.forEach(((e,i)=>{if(e.selection&&0==t--)return n=i,!1})),e.slice(n)}(r,l),s-=l),new
|
|
8560
|
+
o&&a.maybeStep(o).doc&&(t=a.mapping.maps[a.mapping.maps.length-1],l.push(new bI(t,void 0,void 0,l.length+c.length))),i--,t&&n.appendMap(t,i)}else a.maybeStep(e.step)
|
|
8561
|
+
return e.selection?(s=n?e.selection.map(n.slice(i)):e.selection,r=new vI(this.items.slice(0,o).append(c.reverse().concat(l)),this.eventCount-1),!1):void 0}),this.items.length,0),{remaining:r,transform:a,selection:s}}addTransform(e,t,n,i){let o=[],s=this.eventCount,r=this.items,a=!i&&r.length?r.get(r.length-1):null
|
|
8562
|
+
for(let n=0;n<e.steps.length;n++){let l,c=e.steps[n].invert(e.docs[n]),d=new bI(e.mapping.maps[n],c,t);(l=a&&a.merge(d))&&(d=l,n?o.pop():r=r.slice(0,r.length-1)),o.push(d),t&&(s++,t=void 0),i||(a=d)}let l=s-n.depth
|
|
8563
|
+
return l>wI&&(r=function(e,t){let n
|
|
8564
|
+
return e.forEach(((e,i)=>{if(e.selection&&0==t--)return n=i,!1})),e.slice(n)}(r,l),s-=l),new vI(r.append(o),s)}remapping(e,t){let n=new dy
|
|
8540
8565
|
return this.items.forEach(((t,i)=>{let o=null!=t.mirrorOffset&&i-t.mirrorOffset>=e?n.maps.length-t.mirrorOffset:void 0
|
|
8541
|
-
n.appendMap(t.map,o)}),e,t),n}addMaps(e){return 0==this.eventCount?this:new
|
|
8566
|
+
n.appendMap(t.map,o)}),e,t),n}addMaps(e){return 0==this.eventCount?this:new vI(this.items.append(e.map((e=>new bI(e)))),this.eventCount)}rebased(e,t){if(!this.eventCount)return this
|
|
8542
8567
|
let n=[],i=Math.max(0,this.items.length-t),o=e.mapping,s=e.steps.length,r=this.eventCount
|
|
8543
8568
|
this.items.forEach((e=>{e.selection&&r--}),i)
|
|
8544
8569
|
let a=t
|
|
@@ -8547,179 +8572,179 @@ if(null==i)return
|
|
|
8547
8572
|
s=Math.min(s,i)
|
|
8548
8573
|
let l=o.maps[i]
|
|
8549
8574
|
if(t.step){let s=e.steps[i].invert(e.docs[i]),c=t.selection&&t.selection.map(o.slice(a+1,i))
|
|
8550
|
-
c&&r++,n.push(new
|
|
8575
|
+
c&&r++,n.push(new bI(l,s,c))}else n.push(new bI(l))}),i)
|
|
8551
8576
|
let l=[]
|
|
8552
|
-
for(let e=t;e<s;e++)l.push(new
|
|
8553
|
-
let c=this.items.slice(0,i).append(l).append(n),d=new
|
|
8577
|
+
for(let e=t;e<s;e++)l.push(new bI(o.maps[e]))
|
|
8578
|
+
let c=this.items.slice(0,i).append(l).append(n),d=new vI(c,r)
|
|
8554
8579
|
return d.emptyItemCount()>500&&(d=d.compress(this.items.length-n.length)),d}emptyItemCount(){let e=0
|
|
8555
8580
|
return this.items.forEach((t=>{t.step||e++})),e}compress(e=this.items.length){let t=this.remapping(0,e),n=t.maps.length,i=[],o=0
|
|
8556
8581
|
return this.items.forEach(((s,r)=>{if(r>=e)i.push(s),s.selection&&o++
|
|
8557
8582
|
else if(s.step){let e=s.step.map(t.slice(n)),r=e&&e.getMap()
|
|
8558
8583
|
if(n--,r&&t.appendMap(r,n),e){let a=s.selection&&s.selection.map(t.slice(n))
|
|
8559
8584
|
a&&o++
|
|
8560
|
-
let l,c=new
|
|
8561
|
-
class
|
|
8562
|
-
if(t)return new
|
|
8563
|
-
function
|
|
8564
|
-
return e.forEach(((e,n,i,o)=>t.push(i,o))),t}function
|
|
8585
|
+
let l,c=new bI(r.invert(),e,a),d=i.length-1;(l=i.length&&i[d].merge(c))?i[d]=l:i.push(c)}}else s.map&&n--}),this.items.length,0),new vI(fI.from(i.reverse()),o)}}vI.empty=new vI(fI.empty,0)
|
|
8586
|
+
class bI{constructor(e,t,n,i){this.map=e,this.step=t,this.selection=n,this.mirrorOffset=i}merge(e){if(this.step&&e.step&&!e.selection){let t=e.step.merge(this.step)
|
|
8587
|
+
if(t)return new bI(t.getMap().invert(),t,this.selection)}}}class yI{constructor(e,t,n,i,o){this.done=e,this.undone=t,this.prevRanges=n,this.prevTime=i,this.prevComposition=o}}const wI=20
|
|
8588
|
+
function xI(e){let t=[]
|
|
8589
|
+
return e.forEach(((e,n,i,o)=>t.push(i,o))),t}function CI(e,t){if(!e)return null
|
|
8565
8590
|
let n=[]
|
|
8566
8591
|
for(let i=0;i<e.length;i+=2){let o=t.map(e[i],1),s=t.map(e[i+1],-1)
|
|
8567
|
-
o<=s&&n.push(o,s)}return n}let
|
|
8568
|
-
function
|
|
8569
|
-
if(
|
|
8570
|
-
for(let e=0;e<t.length;e++)if(t[e].spec.historyPreserveItems){
|
|
8571
|
-
break}}return
|
|
8572
|
-
function
|
|
8592
|
+
o<=s&&n.push(o,s)}return n}let kI=!1,SI=null
|
|
8593
|
+
function $I(e){let t=e.plugins
|
|
8594
|
+
if(SI!=t){kI=!1,SI=t
|
|
8595
|
+
for(let e=0;e<t.length;e++)if(t[e].spec.historyPreserveItems){kI=!0
|
|
8596
|
+
break}}return kI}const MI=new fw("history"),_I=new fw("closeHistory")
|
|
8597
|
+
function EI(e={}){return e={depth:e.depth||100,newGroupDelay:e.newGroupDelay||500},new hw({key:MI,state:{init:()=>new yI(vI.empty,vI.empty,null,0,-1),apply:(t,n,i)=>function(e,t,n,i){let o,s=n.getMeta(MI)
|
|
8573
8598
|
if(s)return s.historyState
|
|
8574
|
-
n.getMeta(
|
|
8599
|
+
n.getMeta(_I)&&(e=new yI(e.done,e.undone,null,0,-1))
|
|
8575
8600
|
let r=n.getMeta("appendedTransaction")
|
|
8576
8601
|
if(0==n.steps.length)return e
|
|
8577
|
-
if(r&&r.getMeta(
|
|
8578
|
-
if(!1===n.getMeta("addToHistory")||r&&!1===r.getMeta("addToHistory"))return(o=n.getMeta("rebased"))?new
|
|
8602
|
+
if(r&&r.getMeta(MI))return r.getMeta(MI).redo?new yI(e.done.addTransform(n,void 0,i,$I(t)),e.undone,xI(n.mapping.maps[n.steps.length-1]),e.prevTime,e.prevComposition):new yI(e.done,e.undone.addTransform(n,void 0,i,$I(t)),null,e.prevTime,e.prevComposition)
|
|
8603
|
+
if(!1===n.getMeta("addToHistory")||r&&!1===r.getMeta("addToHistory"))return(o=n.getMeta("rebased"))?new yI(e.done.rebased(n,o),e.undone.rebased(n,o),CI(e.prevRanges,n.mapping),e.prevTime,e.prevComposition):new yI(e.done.addMaps(n.mapping.maps),e.undone.addMaps(n.mapping.maps),CI(e.prevRanges,n.mapping),e.prevTime,e.prevComposition)
|
|
8579
8604
|
{let o=n.getMeta("composition"),s=0==e.prevTime||!r&&e.prevComposition!=o&&(e.prevTime<(n.time||0)-i.newGroupDelay||!function(e,t){if(!t)return!1
|
|
8580
8605
|
if(!e.docChanged)return!0
|
|
8581
8606
|
let n=!1
|
|
8582
|
-
return e.mapping.maps[0].forEach(((e,i)=>{for(let o=0;o<t.length;o+=2)e<=t[o+1]&&i>=t[o]&&(n=!0)})),n}(n,e.prevRanges)),a=r?
|
|
8583
|
-
return new
|
|
8584
|
-
return!!i&&(t.preventDefault(),i(e.state,e.dispatch))}}}})}function
|
|
8607
|
+
return e.mapping.maps[0].forEach(((e,i)=>{for(let o=0;o<t.length;o+=2)e<=t[o+1]&&i>=t[o]&&(n=!0)})),n}(n,e.prevRanges)),a=r?CI(e.prevRanges,n.mapping):xI(n.mapping.maps[n.steps.length-1])
|
|
8608
|
+
return new yI(e.done.addTransform(n,s?t.selection.getBookmark():void 0,i,$I(t)),vI.empty,a,n.time,null==o?e.prevComposition:o)}}(n,i,t,e)},config:e,props:{handleDOMEvents:{beforeinput(e,t){let n=t.inputType,i="historyUndo"==n?DI:"historyRedo"==n?AI:null
|
|
8609
|
+
return!!i&&(t.preventDefault(),i(e.state,e.dispatch))}}}})}function II(e,t){return(n,i)=>{let o=MI.getState(n)
|
|
8585
8610
|
if(!o||0==(e?o.undone:o.done).eventCount)return!1
|
|
8586
|
-
if(i){let s=function(e,t,n){let i
|
|
8611
|
+
if(i){let s=function(e,t,n){let i=$I(t),o=MI.get(t).spec.config,s=(n?e.undone:e.done).popEvent(t,i)
|
|
8587
8612
|
if(!s)return null
|
|
8588
|
-
let r=s.selection.resolve(s.transform.doc),a=(n?e.done:e.undone).addTransform(s.transform,t.selection.getBookmark(),o,i),l=new
|
|
8589
|
-
return s.transform.setSelection(r).setMeta(
|
|
8590
|
-
s&&i(t?s.scrollIntoView():s)}return!0}}const
|
|
8591
|
-
return e},
|
|
8592
|
-
function
|
|
8593
|
-
for(const i in t){const t=
|
|
8594
|
-
t.indexOf(e)<0&&t.push(e)}}function
|
|
8613
|
+
let r=s.selection.resolve(s.transform.doc),a=(n?e.done:e.undone).addTransform(s.transform,t.selection.getBookmark(),o,i),l=new yI(n?a:s.remaining,n?s.remaining:a,null,0,-1)
|
|
8614
|
+
return s.transform.setSelection(r).setMeta(MI,{redo:n,historyState:l})}(o,n,e)
|
|
8615
|
+
s&&i(t?s.scrollIntoView():s)}return!0}}const DI=II(!1,!0),AI=II(!0,!0),TI=$S.create({name:"history",addOptions:()=>({depth:100,newGroupDelay:500}),addCommands:()=>({undo:()=>({state:e,dispatch:t})=>DI(e,t),redo:()=>({state:e,dispatch:t})=>AI(e,t)}),addProseMirrorPlugins(){return[EI(this.options)]},addKeyboardShortcuts(){return{"Mod-z":()=>this.editor.commands.undo(),"Shift-Mod-z":()=>this.editor.commands.redo(),"Mod-y":()=>this.editor.commands.redo(),"Mod-я":()=>this.editor.commands.undo(),"Shift-Mod-я":()=>this.editor.commands.redo()}}}),OI=/(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))$/,RI=/(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))/g,FI=/(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))$/,NI=/(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))/g,PI=p$.create({name:"italic",addOptions:()=>({HTMLAttributes:{}}),parseHTML:()=>[{tag:"em"},{tag:"i",getAttrs:e=>"normal"!==e.style.fontStyle&&null},{style:"font-style=italic"}],renderHTML({HTMLAttributes:e}){return["em",sS(this.options.HTMLAttributes,e),0]},addCommands(){return{setItalic:()=>({commands:e})=>e.setMark(this.name),toggleItalic:()=>({commands:e})=>e.toggleMark(this.name),unsetItalic:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-i":()=>this.editor.commands.toggleItalic(),"Mod-I":()=>this.editor.commands.toggleItalic()}},addInputRules(){return[h$({find:OI,type:this.type}),h$({find:FI,type:this.type})]},addPasteRules(){return[m$({find:RI,type:this.type}),m$({find:NI,type:this.type})]}}),LI="aaa1rp3bb0ott3vie4c1le2ogado5udhabi7c0ademy5centure6ountant0s9o1tor4d0s1ult4e0g1ro2tna4f0l1rica5g0akhan5ency5i0g1rbus3force5tel5kdn3l0ibaba4pay4lfinanz6state5y2sace3tom5m0azon4ericanexpress7family11x2fam3ica3sterdam8nalytics7droid5quan4z2o0l2partments8p0le4q0uarelle8r0ab1mco4chi3my2pa2t0e3s0da2ia2sociates9t0hleta5torney7u0ction5di0ble3o3spost5thor3o0s4vianca6w0s2x0a2z0ure5ba0by2idu3namex3narepublic11d1k2r0celona5laycard4s5efoot5gains6seball5ketball8uhaus5yern5b0c1t1va3cg1n2d1e0ats2uty4er2ntley5rlin4st0buy5t2f1g1h0arti5i0ble3d1ke2ng0o3o1z2j1lack0friday9ockbuster8g1omberg7ue3m0s1w2n0pparibas9o0ats3ehringer8fa2m1nd2o0k0ing5sch2tik2on4t1utique6x2r0adesco6idgestone9oadway5ker3ther5ussels7s1t1uild0ers6siness6y1zz3v1w1y1z0h3ca0b1fe2l0l1vinklein9m0era3p2non3petown5ital0one8r0avan4ds2e0er0s4s2sa1e1h1ino4t0ering5holic7ba1n1re3c1d1enter4o1rn3f0a1d2g1h0anel2nel4rity4se2t2eap3intai5ristmas6ome4urch5i0priani6rcle4sco3tadel4i0c2y3k1l0aims4eaning6ick2nic1que6othing5ud3ub0med6m1n1o0ach3des3ffee4llege4ogne5m0cast4mbank4unity6pany2re3uter5sec4ndos3struction8ulting7tact3ractors9oking4l1p2rsica5untry4pon0s4rses6pa2r0edit0card4union9icket5own3s1uise0s6u0isinella9v1w1x1y0mru3ou3z2dabur3d1nce3ta1e1ing3sun4y2clk3ds2e0al0er2s3gree4livery5l1oitte5ta3mocrat6ntal2ist5si0gn4v2hl2iamonds6et2gital5rect0ory7scount3ver5h2y2j1k1m1np2o0cs1tor4g1mains5t1wnload7rive4tv2ubai3nlop4pont4rban5vag2r2z2earth3t2c0o2deka3u0cation8e1g1mail3erck5nergy4gineer0ing9terprises10pson4quipment8r0icsson6ni3s0q1tate5t1u0rovision8s2vents5xchange6pert3osed4ress5traspace10fage2il1rwinds6th3mily4n0s2rm0ers5shion4t3edex3edback6rrari3ero6i0delity5o2lm2nal1nce1ial7re0stone6mdale6sh0ing5t0ness6j1k1lickr3ghts4r2orist4wers5y2m1o0o0d1tball6rd1ex2sale4um3undation8x2r0ee1senius7l1ogans4ntier7tr2ujitsu5n0d2rniture7tbol5yi3ga0l0lery3o1up4me0s3p1rden4y2b0iz3d0n2e0a1nt0ing5orge5f1g0ee3h1i0ft0s3ves2ing5l0ass3e1obal2o4m0ail3bh2o1x2n1odaddy5ld0point6f2o0dyear5g0le4p1t1v2p1q1r0ainger5phics5tis4een3ipe3ocery4up4s1t1u0ardian6cci3ge2ide2tars5ru3w1y2hair2mburg5ngout5us3bo2dfc0bank7ealth0care8lp1sinki6re1mes5iphop4samitsu7tachi5v2k0t2m1n1ockey4ldings5iday5medepot5goods5s0ense7nda3rse3spital5t0ing5t0els3mail5use3w2r1sbc3t1u0ghes5yatt3undai7ibm2cbc2e1u2d1e0ee3fm2kano4l1m0amat4db2mo0bilien9n0c1dustries8finiti5o2g1k1stitute6urance4e4t0ernational10uit4vestments10o1piranga7q1r0ish4s0maili5t0anbul7t0au2v3jaguar4va3cb2e0ep2tzt3welry6io2ll2m0p2nj2o0bs1urg4t1y2p0morgan6rs3uegos4niper7kaufen5ddi3e0rryhotels6logistics9properties14fh2g1h1i0a1ds2m1ndle4tchen5wi3m1n1oeln3matsu5sher5p0mg2n2r0d1ed3uokgroup8w1y0oto4z2la0caixa5mborghini8er3ncaster6d0rover6xess5salle5t0ino3robe5w0yer5b1c1ds2ease3clerc5frak4gal2o2xus4gbt3i0dl2fe0insurance9style7ghting6ke2lly3mited4o2ncoln4k2psy3ve1ing5k1lc1p2oan0s3cker3us3l1ndon4tte1o3ve3pl0financial11r1s1t0d0a3u0ndbeck6xe1ury5v1y2ma0drid4if1son4keup4n0agement7go3p1rket0ing3s4riott5shalls7ttel5ba2c0kinsey7d1e0d0ia3et2lbourne7me1orial6n0u2rckmsd7g1h1iami3crosoft7l1ni1t2t0subishi9k1l0b1s2m0a2n1o0bi0le4da2e1i1m1nash3ey2ster5rmon3tgage6scow4to0rcycles9v0ie4p1q1r1s0d2t0n1r2u0seum3ic4v1w1x1y1z2na0b1goya4me2tura4vy3ba2c1e0c1t0bank4flix4work5ustar5w0s2xt0direct7us4f0l2g0o2hk2i0co2ke1on3nja3ssan1y5l1o0kia3rton4w0ruz3tv4p1r0a1w2tt2u1yc2z2obi1server7ffice5kinawa6layan0group9dnavy5lo3m0ega4ne1g1l0ine5oo2pen3racle3nge4g0anic5igins6saka4tsuka4t2vh3pa0ge2nasonic7ris2s1tners4s1y3y2ccw3e0t2f0izer5g1h0armacy6d1ilips5one2to0graphy6s4ysio5ics1tet2ures6d1n0g1k2oneer5zza4k1l0ace2y0station9umbing5s3m1n0c2ohl2ker3litie5rn2st3r0america6xi3ess3ime3o0d0uctions8f1gressive8mo2perties3y5tection8u0dential9s1t1ub2w0c2y2qa1pon3uebec3st5racing4dio4e0ad1lestate6tor2y4cipes5d0stone5umbrella9hab3ise0n3t2liance6n0t0als5pair3ort3ublican8st0aurant8view0s5xroth6ich0ardli6oh3l1o1p2o0cks3deo3gers4om3s0vp3u0gby3hr2n2w0e2yukyu6sa0arland6fe0ty4kura4le1on3msclub4ung5ndvik0coromant12ofi4p1rl2s1ve2xo3b0i1s2c0a1b1haeffler7midt4olarships8ol3ule3warz5ience5ot3d1e0arch3t2cure1ity6ek2lect4ner3rvices6ven3w1x0y3fr2g1h0angrila6rp2w2ell3ia1ksha5oes2p0ping5uji3w3i0lk2na1gles5te3j1k0i0n2y0pe4l0ing4m0art3ile4n0cf3o0ccer3ial4ftbank4ware6hu2lar2utions7ng1y2y2pa0ce3ort2t3r0l2s1t0ada2ples4r1tebank4farm7c0group6ockholm6rage3e3ream4udio2y3yle4u0cks3pplies3y2ort5rf1gery5zuki5v1watch4iss4x1y0dney4stems6z2tab1ipei4lk2obao4rget4tamotors6r2too4x0i3c0i2d0k2eam2ch0nology8l1masek5nnis4va3f1g1h0d1eater2re6iaa2ckets5enda4ps2res2ol4j0maxx4x2k0maxx5l1m0all4n1o0day3kyo3ols3p1ray3shiba5tal3urs3wn2yota3s3r0ade1ing4ining5vel0ers0insurance16ust3v2t1ube2i1nes3shu4v0s2w1z2ua1bank3s2g1k1nicom3versity8o2ol2ps2s1y1z2va0cations7na1guard7c1e0gas3ntures6risign5mögensberater2ung14sicherung10t2g1i0ajes4deo3g1king4llas4n1p1rgin4sa1ion4va1o3laanderen9n1odka3lvo3te1ing3o2yage5u2wales2mart4ter4ng0gou5tch0es6eather0channel12bcam3er2site5d0ding5ibo2r3f1hoswho6ien2ki2lliamhill9n0dows4e1ners6me2olterskluwer11odside6rk0s2ld3w2s1tc1f3xbox3erox4finity6ihuan4n2xx2yz3yachts4hoo3maxun5ndex5e1odobashi7ga2kohama6u0tube6t1un3za0ppos4ra3ero3ip2m1one3uerich6w2",zI="ελ1υ2бг1ел3дети4ею2католик6ом3мкд2он1сква6онлайн5рг3рус2ф2сайт3рб3укр3қаз3հայ3ישראל5קום3ابوظبي5رامكو5لاردن4بحرين5جزائر5سعودية6عليان5مغرب5مارات5یران5بارت2زار4يتك3ھارت5تونس4سودان3رية5شبكة4عراق2ب2مان4فلسطين6قطر3كاثوليك6وم3مصر2ليسيا5وريتانيا7قع4همراه5پاکستان7ڀارت4कॉम3नेट3भारत0म्3ोत5संगठन5বাংলা5ভারত2ৰত4ਭਾਰਤ4ભારત4ଭାରତ4இந்தியா6லங்கை6சிங்கப்பூர்11భారత్5ಭಾರತ4ഭാരതം5ලංකා4คอม3ไทย3ລາວ3გე2みんな3アマゾン4クラウド4グーグル4コム2ストア3セール3ファッション6ポイント4世界2中信1国1國1文网3亚马逊3企业2佛山2信息2健康2八卦2公司1益2台湾1灣2商城1店1标2嘉里0大酒店5在线2大拿2天主教3娱乐2家電2广东2微博2慈善2我爱你3手机2招聘2政务1府2新加坡2闻2时尚2書籍2机构2淡马锡3游戏2澳門2点看2移动2组织机构4网址1店1站1络2联通2谷歌2购物2通販2集团2電訊盈科4飞利浦3食品2餐厅2香格里拉3港2닷넷1컴2삼성2한국2",VI=(e,t)=>{for(const n in t)e[n]=t[n]
|
|
8616
|
+
return e},HI="numeric",BI="ascii",qI="alpha",UI="asciinumeric",jI="alphanumeric",WI="domain",GI="emoji",ZI="scheme",KI="slashscheme",XI="whitespace"
|
|
8617
|
+
function YI(e,t){return e in t||(t[e]=[]),t[e]}function JI(e,t,n){t[HI]&&(t[UI]=!0,t[jI]=!0),t[BI]&&(t[UI]=!0,t[qI]=!0),t[UI]&&(t[jI]=!0),t[qI]&&(t[jI]=!0),t[jI]&&(t[WI]=!0),t[GI]&&(t[WI]=!0)
|
|
8618
|
+
for(const i in t){const t=YI(i,n)
|
|
8619
|
+
t.indexOf(e)<0&&t.push(e)}}function QI(e){void 0===e&&(e=null),this.j={},this.jr=[],this.jd=null,this.t=e}QI.groups={},QI.prototype={accepts(){return!!this.t},go(e){const t=this,n=t.j[e]
|
|
8595
8620
|
if(n)return n
|
|
8596
8621
|
for(let n=0;n<t.jr.length;n++){const i=t.jr[n][0],o=t.jr[n][1]
|
|
8597
8622
|
if(o&&i.test(e))return o}return t.jd},has(e,t){return void 0===t&&(t=!1),t?e in this.j:!!this.go(e)},ta(e,t,n,i){for(let o=0;o<e.length;o++)this.tt(e[o],t,n,i)},tr(e,t,n,i){let o
|
|
8598
|
-
return i=i||
|
|
8623
|
+
return i=i||QI.groups,t&&t.j?o=t:(o=new QI(t),n&&i&&JI(t,n,i)),this.jr.push([e,o]),o},ts(e,t,n,i){let o=this
|
|
8599
8624
|
const s=e.length
|
|
8600
8625
|
if(!s)return o
|
|
8601
8626
|
for(let t=0;t<s-1;t++)o=o.tt(e[t])
|
|
8602
|
-
return o.tt(e[s-1],t,n,i)},tt(e,t,n,i){i=i||
|
|
8627
|
+
return o.tt(e[s-1],t,n,i)},tt(e,t,n,i){i=i||QI.groups
|
|
8603
8628
|
const o=this
|
|
8604
8629
|
if(t&&t.j)return o.j[e]=t,t
|
|
8605
8630
|
const s=t
|
|
8606
8631
|
let r,a=o.go(e)
|
|
8607
|
-
if(a?(r=new
|
|
8632
|
+
if(a?(r=new QI,VI(r.j,a.j),r.jr.push.apply(r.jr,a.jr),r.jd=a.jd,r.t=a.t):r=new QI,s){if(i)if(r.t&&"string"==typeof r.t){const e=VI(function(e,t){const n={}
|
|
8608
8633
|
for(const i in t)t[i].indexOf(e)>=0&&(n[i]=!0)
|
|
8609
8634
|
return n}(r.t,i),n)
|
|
8610
|
-
|
|
8635
|
+
JI(s,e,i)}else n&&JI(s,n,i)
|
|
8611
8636
|
r.t=s}return o.j[e]=r,r}}
|
|
8612
|
-
const
|
|
8613
|
-
var
|
|
8614
|
-
const
|
|
8615
|
-
let
|
|
8616
|
-
function
|
|
8637
|
+
const eD=(e,t,n,i,o)=>e.ta(t,n,i,o),tD=(e,t,n,i,o)=>e.tr(t,n,i,o),nD=(e,t,n,i,o)=>e.ts(t,n,i,o),iD=(e,t,n,i,o)=>e.tt(t,n,i,o),oD="WORD",sD="UWORD",rD="LOCALHOST",aD="TLD",lD="UTLD",cD="SCHEME",dD="SLASH_SCHEME",hD="NUM",uD="WS",pD="NL",fD="OPENBRACE",mD="CLOSEBRACE",gD="OPENBRACKET",vD="CLOSEBRACKET",bD="OPENPAREN",yD="CLOSEPAREN",wD="OPENANGLEBRACKET",xD="CLOSEANGLEBRACKET",CD="FULLWIDTHLEFTPAREN",kD="FULLWIDTHRIGHTPAREN",SD="LEFTCORNERBRACKET",$D="RIGHTCORNERBRACKET",MD="LEFTWHITECORNERBRACKET",_D="RIGHTWHITECORNERBRACKET",ED="FULLWIDTHLESSTHAN",ID="FULLWIDTHGREATERTHAN",DD="AMPERSAND",AD="APOSTROPHE",TD="ASTERISK",OD="AT",RD="BACKSLASH",FD="BACKTICK",ND="CARET",PD="COLON",LD="COMMA",zD="DOLLAR",VD="DOT",HD="EQUALS",BD="EXCLAMATION",qD="HYPHEN",UD="PERCENT",jD="PIPE",WD="PLUS",GD="POUND",ZD="QUERY",KD="QUOTE",XD="SEMI",YD="SLASH",JD="TILDE",QD="UNDERSCORE",eA="EMOJI",tA="SYM"
|
|
8638
|
+
var nA=Object.freeze({__proto__:null,WORD:oD,UWORD:sD,LOCALHOST:rD,TLD:aD,UTLD:lD,SCHEME:cD,SLASH_SCHEME:dD,NUM:hD,WS:uD,NL:pD,OPENBRACE:fD,CLOSEBRACE:mD,OPENBRACKET:gD,CLOSEBRACKET:vD,OPENPAREN:bD,CLOSEPAREN:yD,OPENANGLEBRACKET:wD,CLOSEANGLEBRACKET:xD,FULLWIDTHLEFTPAREN:CD,FULLWIDTHRIGHTPAREN:kD,LEFTCORNERBRACKET:SD,RIGHTCORNERBRACKET:$D,LEFTWHITECORNERBRACKET:MD,RIGHTWHITECORNERBRACKET:_D,FULLWIDTHLESSTHAN:ED,FULLWIDTHGREATERTHAN:ID,AMPERSAND:DD,APOSTROPHE:AD,ASTERISK:TD,AT:OD,BACKSLASH:RD,BACKTICK:FD,CARET:ND,COLON:PD,COMMA:LD,DOLLAR:zD,DOT:VD,EQUALS:HD,EXCLAMATION:BD,HYPHEN:qD,PERCENT:UD,PIPE:jD,PLUS:WD,POUND:GD,QUERY:ZD,QUOTE:KD,SEMI:XD,SLASH:YD,TILDE:JD,UNDERSCORE:QD,EMOJI:eA,SYM:tA})
|
|
8639
|
+
const iA=/[a-z]/,oA=/\p{L}/u,sA=/\p{Emoji}/u,rA=/\d/,aA=/\s/,lA="\n",cA="️",dA=""
|
|
8640
|
+
let hA=null,uA=null
|
|
8641
|
+
function pA(e,t,n,i,o){let s
|
|
8617
8642
|
const r=t.length
|
|
8618
8643
|
for(let n=0;n<r-1;n++){const r=t[n]
|
|
8619
|
-
e.j[r]?s=e.j[r]:(s=new
|
|
8644
|
+
e.j[r]?s=e.j[r]:(s=new QI(i),s.jr=o.slice(),e.j[r]=s),e=s}return s=new QI(n),s.jr=o.slice(),e.j[t[r-1]]=s,s}function fA(e){const t=[],n=[]
|
|
8620
8645
|
let i=0
|
|
8621
8646
|
for(;i<e.length;){let o=0
|
|
8622
8647
|
for(;"0123456789".indexOf(e[i+o])>=0;)o++
|
|
8623
8648
|
if(o>0){t.push(n.join(""))
|
|
8624
8649
|
for(let t=parseInt(e.substring(i,i+o),10);t>0;t--)n.pop()
|
|
8625
|
-
i+=o}else n.push(e[i]),i++}return t}const
|
|
8626
|
-
function
|
|
8627
|
-
let n=
|
|
8628
|
-
e&&(n=
|
|
8650
|
+
i+=o}else n.push(e[i]),i++}return t}const mA={defaultProtocol:"http",events:null,format:vA,formatHref:vA,nl2br:!1,tagName:"a",target:null,rel:null,validate:!0,truncate:1/0,className:null,attributes:null,ignoreTags:[],render:null}
|
|
8651
|
+
function gA(e,t){void 0===t&&(t=null)
|
|
8652
|
+
let n=VI({},mA)
|
|
8653
|
+
e&&(n=VI(n,e instanceof gA?e.o:e))
|
|
8629
8654
|
const i=n.ignoreTags,o=[]
|
|
8630
8655
|
for(let e=0;e<i.length;e++)o.push(i[e].toUpperCase())
|
|
8631
|
-
this.o=n,t&&(this.defaultRender=t),this.ignoreTags=o}function
|
|
8632
|
-
return n.t=e,n}
|
|
8656
|
+
this.o=n,t&&(this.defaultRender=t),this.ignoreTags=o}function vA(e){return e}function bA(e,t){this.t="token",this.v=e,this.tk=t}function yA(e,t){class n extends bA{constructor(t,n){super(t,n),this.t=e}}for(const e in t)n.prototype[e]=t[e]
|
|
8657
|
+
return n.t=e,n}gA.prototype={o:mA,ignoreTags:[],defaultRender:e=>e,check(e){return this.get("validate",e.toString(),e)},get(e,t,n){const i=null!=t
|
|
8633
8658
|
let o=this.o[e]
|
|
8634
|
-
return o?("object"==typeof o?(o=n.t in o?o[n.t]
|
|
8659
|
+
return o?("object"==typeof o?(o=n.t in o?o[n.t]:mA[e],"function"==typeof o&&i&&(o=o(t,n))):"function"==typeof o&&i&&(o=o(t,n.t,n)),o):o},getObj(e,t,n){let i=this.o[e]
|
|
8635
8660
|
return"function"==typeof i&&null!=t&&(i=i(t,n.t,n)),i},render(e){const t=e.render(this)
|
|
8636
|
-
return(this.get("render",null,e)||this.defaultRender)(t,e.t,e)}},
|
|
8637
|
-
return n&&i.length>n?i.substring(0,n)+"…":i},toFormattedHref(e){return e.get("formatHref",this.toHref(e.get("defaultProtocol")),this)},startIndex(){return this.tk[0].s},endIndex(){return this.tk[this.tk.length-1].e},toObject(e){return void 0===e&&(e
|
|
8638
|
-
return r.href=i,a&&(r.class=a),l&&(r.target=l),c&&(r.rel=c),d&&
|
|
8639
|
-
const
|
|
8640
|
-
return e.length>=2&&e[0].t!==
|
|
8641
|
-
function
|
|
8642
|
-
return new e(t.slice(i,o),n)}const
|
|
8643
|
-
function
|
|
8644
|
-
|
|
8661
|
+
return(this.get("render",null,e)||this.defaultRender)(t,e.t,e)}},bA.prototype={isLink:!1,toString(){return this.v},toHref(e){return this.toString()},toFormattedString(e){const t=this.toString(),n=e.get("truncate",t,this),i=e.get("format",t,this)
|
|
8662
|
+
return n&&i.length>n?i.substring(0,n)+"…":i},toFormattedHref(e){return e.get("formatHref",this.toHref(e.get("defaultProtocol")),this)},startIndex(){return this.tk[0].s},endIndex(){return this.tk[this.tk.length-1].e},toObject(e){return void 0===e&&(e=mA.defaultProtocol),{type:this.t,value:this.toString(),isLink:this.isLink,href:this.toHref(e),start:this.startIndex(),end:this.endIndex()}},toFormattedObject(e){return{type:this.t,value:this.toFormattedString(e),isLink:this.isLink,href:this.toFormattedHref(e),start:this.startIndex(),end:this.endIndex()}},validate(e){return e.get("validate",this.toString(),this)},render(e){const t=this,n=this.toHref(e.get("defaultProtocol")),i=e.get("formatHref",n,this),o=e.get("tagName",n,t),s=this.toFormattedString(e),r={},a=e.get("className",n,t),l=e.get("target",n,t),c=e.get("rel",n,t),d=e.getObj("attributes",n,t),h=e.getObj("events",n,t)
|
|
8663
|
+
return r.href=i,a&&(r.class=a),l&&(r.target=l),c&&(r.rel=c),d&&VI(r,d),{tagName:o,attributes:r,content:s,eventListeners:h}}}
|
|
8664
|
+
const wA=yA("email",{isLink:!0,toHref(){return"mailto:"+this.toString()}}),xA=yA("text"),CA=yA("nl"),kA=yA("url",{isLink:!0,toHref(e){return void 0===e&&(e=mA.defaultProtocol),this.hasProtocol()?this.v:`${e}://${this.v}`},hasProtocol(){const e=this.tk
|
|
8665
|
+
return e.length>=2&&e[0].t!==rD&&e[1].t===PD}}),SA=e=>new QI(e)
|
|
8666
|
+
function $A(e,t,n){const i=n[0].s,o=n[n.length-1].e
|
|
8667
|
+
return new e(t.slice(i,o),n)}const MA="undefined"!=typeof console&&console&&console.warn||(()=>{}),_A={scanner:null,parser:null,tokenQueue:[],pluginQueue:[],customSchemes:[],initialized:!1}
|
|
8668
|
+
function EA(e,t){if(void 0===t&&(t=!1),_A.initialized&&MA(`linkifyjs: already initialized - will not register custom scheme "${e}" until manual call of linkify.init(). Register all schemes and plugins before invoking linkify the first time.`),!/^[0-9a-z]+(-[0-9a-z]+)*$/.test(e))throw new Error('linkifyjs: incorrect scheme format.\n1. Must only contain digits, lowercase ASCII letters or "-"\n2. Cannot start or end with "-"\n3. "-" cannot repeat')
|
|
8669
|
+
_A.customSchemes.push([e,t])}function IA(){_A.scanner=function(e){void 0===e&&(e=[])
|
|
8645
8670
|
const t={}
|
|
8646
|
-
|
|
8647
|
-
const n=new
|
|
8648
|
-
null==
|
|
8649
|
-
const i=
|
|
8650
|
-
|
|
8651
|
-
const o=
|
|
8652
|
-
|
|
8653
|
-
const s=
|
|
8654
|
-
|
|
8655
|
-
const r=
|
|
8656
|
-
|
|
8657
|
-
const a=
|
|
8658
|
-
|
|
8659
|
-
const l=
|
|
8660
|
-
|
|
8661
|
-
const c=[[
|
|
8662
|
-
for(let e=0;e<
|
|
8663
|
-
for(let e=0;e<
|
|
8664
|
-
|
|
8665
|
-
for(let t=0;t<e.length;t++){const i=e[t][0],o=e[t][1]?{[
|
|
8666
|
-
i.indexOf("-")>=0?o[
|
|
8667
|
-
for(let e=0;e<
|
|
8668
|
-
|
|
8669
|
-
const n=t.domain.concat([
|
|
8670
|
-
|
|
8671
|
-
const a=
|
|
8672
|
-
|
|
8673
|
-
const d=
|
|
8674
|
-
|
|
8675
|
-
const h=
|
|
8676
|
-
|
|
8677
|
-
const u=
|
|
8678
|
-
|
|
8679
|
-
const p=
|
|
8680
|
-
|
|
8681
|
-
const f=
|
|
8682
|
-
|
|
8683
|
-
const m=
|
|
8684
|
-
|
|
8685
|
-
const g=
|
|
8686
|
-
|
|
8687
|
-
const v=
|
|
8688
|
-
|
|
8689
|
-
const y=
|
|
8690
|
-
|
|
8691
|
-
const w=
|
|
8692
|
-
|
|
8693
|
-
const C=
|
|
8694
|
-
|
|
8695
|
-
const S=
|
|
8696
|
-
|
|
8697
|
-
const E=[[
|
|
8698
|
-
for(let e=0;e<E.length;e++){const[t,o]=E[e],s=
|
|
8699
|
-
|
|
8700
|
-
const r=
|
|
8701
|
-
|
|
8702
|
-
const a=
|
|
8703
|
-
|
|
8704
|
-
for(let e=0;e<
|
|
8705
|
-
|
|
8671
|
+
QI.groups=t
|
|
8672
|
+
const n=new QI
|
|
8673
|
+
null==hA&&(hA=fA(LI)),null==uA&&(uA=fA(zI)),iD(n,"'",AD),iD(n,"{",fD),iD(n,"}",mD),iD(n,"[",gD),iD(n,"]",vD),iD(n,"(",bD),iD(n,")",yD),iD(n,"<",wD),iD(n,">",xD),iD(n,"(",CD),iD(n,")",kD),iD(n,"「",SD),iD(n,"」",$D),iD(n,"『",MD),iD(n,"』",_D),iD(n,"<",ED),iD(n,">",ID),iD(n,"&",DD),iD(n,"*",TD),iD(n,"@",OD),iD(n,"`",FD),iD(n,"^",ND),iD(n,":",PD),iD(n,",",LD),iD(n,"$",zD),iD(n,".",VD),iD(n,"=",HD),iD(n,"!",BD),iD(n,"-",qD),iD(n,"%",UD),iD(n,"|",jD),iD(n,"+",WD),iD(n,"#",GD),iD(n,"?",ZD),iD(n,'"',KD),iD(n,"/",YD),iD(n,";",XD),iD(n,"~",JD),iD(n,"_",QD),iD(n,"\\",RD)
|
|
8674
|
+
const i=tD(n,rA,hD,{[HI]:!0})
|
|
8675
|
+
tD(i,rA,i)
|
|
8676
|
+
const o=tD(n,iA,oD,{[BI]:!0})
|
|
8677
|
+
tD(o,iA,o)
|
|
8678
|
+
const s=tD(n,oA,sD,{[qI]:!0})
|
|
8679
|
+
tD(s,iA),tD(s,oA,s)
|
|
8680
|
+
const r=tD(n,aA,uD,{[XI]:!0})
|
|
8681
|
+
iD(n,lA,pD,{[XI]:!0}),iD(r,lA),tD(r,aA,r)
|
|
8682
|
+
const a=tD(n,sA,eA,{[GI]:!0})
|
|
8683
|
+
tD(a,sA,a),iD(a,cA,a)
|
|
8684
|
+
const l=iD(a,dA)
|
|
8685
|
+
tD(l,sA,a)
|
|
8686
|
+
const c=[[iA,o]],d=[[iA,null],[oA,s]]
|
|
8687
|
+
for(let e=0;e<hA.length;e++)pA(n,hA[e],aD,oD,c)
|
|
8688
|
+
for(let e=0;e<uA.length;e++)pA(n,uA[e],lD,sD,d)
|
|
8689
|
+
JI(aD,{tld:!0,ascii:!0},t),JI(lD,{utld:!0,alpha:!0},t),pA(n,"file",cD,oD,c),pA(n,"mailto",cD,oD,c),pA(n,"http",dD,oD,c),pA(n,"https",dD,oD,c),pA(n,"ftp",dD,oD,c),pA(n,"ftps",dD,oD,c),JI(cD,{scheme:!0,ascii:!0},t),JI(dD,{slashscheme:!0,ascii:!0},t),e=e.sort(((e,t)=>e[0]>t[0]?1:-1))
|
|
8690
|
+
for(let t=0;t<e.length;t++){const i=e[t][0],o=e[t][1]?{[ZI]:!0}:{[KI]:!0}
|
|
8691
|
+
i.indexOf("-")>=0?o[WI]=!0:iA.test(i)?rA.test(i)?o[UI]=!0:o[BI]=!0:o[HI]=!0,nD(n,i,i,o)}return nD(n,"localhost",rD,{ascii:!0}),n.jd=new QI(tA),{start:n,tokens:VI({groups:t},nA)}}(_A.customSchemes)
|
|
8692
|
+
for(let e=0;e<_A.tokenQueue.length;e++)_A.tokenQueue[e][1]({scanner:_A.scanner})
|
|
8693
|
+
_A.parser=function(e){let{groups:t}=e
|
|
8694
|
+
const n=t.domain.concat([DD,TD,OD,RD,FD,ND,zD,HD,qD,hD,UD,jD,WD,GD,YD,tA,JD,QD]),i=[AD,PD,LD,VD,BD,ZD,KD,XD,wD,xD,fD,mD,vD,gD,bD,yD,CD,kD,SD,$D,MD,_D,ED,ID],o=[DD,AD,TD,RD,FD,ND,zD,HD,qD,fD,mD,UD,jD,WD,GD,ZD,YD,tA,JD,QD],s=SA(),r=iD(s,JD)
|
|
8695
|
+
eD(r,o,r),eD(r,t.domain,r)
|
|
8696
|
+
const a=SA(),l=SA(),c=SA()
|
|
8697
|
+
eD(s,t.domain,a),eD(s,t.scheme,l),eD(s,t.slashscheme,c),eD(a,o,r),eD(a,t.domain,a)
|
|
8698
|
+
const d=iD(a,OD)
|
|
8699
|
+
iD(r,OD,d),iD(l,OD,d),iD(c,OD,d)
|
|
8700
|
+
const h=iD(r,VD)
|
|
8701
|
+
eD(h,o,r),eD(h,t.domain,r)
|
|
8702
|
+
const u=SA()
|
|
8703
|
+
eD(d,t.domain,u),eD(u,t.domain,u)
|
|
8704
|
+
const p=iD(u,VD)
|
|
8705
|
+
eD(p,t.domain,u)
|
|
8706
|
+
const f=SA(wA)
|
|
8707
|
+
eD(p,t.tld,f),eD(p,t.utld,f),iD(d,rD,f)
|
|
8708
|
+
const m=iD(u,qD)
|
|
8709
|
+
eD(m,t.domain,u),eD(f,t.domain,u),iD(f,VD,p),iD(f,qD,m)
|
|
8710
|
+
const g=iD(f,PD)
|
|
8711
|
+
eD(g,t.numeric,wA)
|
|
8712
|
+
const v=iD(a,qD),b=iD(a,VD)
|
|
8713
|
+
eD(v,t.domain,a),eD(b,o,r),eD(b,t.domain,a)
|
|
8714
|
+
const y=SA(kA)
|
|
8715
|
+
eD(b,t.tld,y),eD(b,t.utld,y),eD(y,t.domain,a),eD(y,o,r),iD(y,VD,b),iD(y,qD,v),iD(y,OD,d)
|
|
8716
|
+
const w=iD(y,PD),x=SA(kA)
|
|
8717
|
+
eD(w,t.numeric,x)
|
|
8718
|
+
const C=SA(kA),k=SA()
|
|
8719
|
+
eD(C,n,C),eD(C,i,k),eD(k,n,C),eD(k,i,k),iD(y,YD,C),iD(x,YD,C)
|
|
8720
|
+
const S=iD(l,PD),$=iD(c,PD),M=iD($,YD),_=iD(M,YD)
|
|
8721
|
+
eD(l,t.domain,a),iD(l,VD,b),iD(l,qD,v),eD(c,t.domain,a),iD(c,VD,b),iD(c,qD,v),eD(S,t.domain,C),iD(S,YD,C),eD(_,t.domain,C),eD(_,n,C),iD(_,YD,C)
|
|
8722
|
+
const E=[[fD,mD],[gD,vD],[bD,yD],[wD,xD],[CD,kD],[SD,$D],[MD,_D],[ED,ID]]
|
|
8723
|
+
for(let e=0;e<E.length;e++){const[t,o]=E[e],s=iD(C,t)
|
|
8724
|
+
iD(k,t,s),iD(s,o,C)
|
|
8725
|
+
const r=SA(kA)
|
|
8726
|
+
eD(s,n,r)
|
|
8727
|
+
const a=SA()
|
|
8728
|
+
eD(s,i),eD(r,n,r),eD(r,i,a),eD(a,n,r),eD(a,i,a),iD(r,o,C),iD(a,o,C)}return iD(s,rD,y),iD(s,pD,CA),{start:s,tokens:nA}}(_A.scanner.tokens)
|
|
8729
|
+
for(let e=0;e<_A.pluginQueue.length;e++)_A.pluginQueue[e][1]({scanner:_A.scanner,parser:_A.parser})
|
|
8730
|
+
_A.initialized=!0}function DA(e){return _A.initialized||IA(),function(e,t,n){let i=n.length,o=0,s=[],r=[]
|
|
8706
8731
|
for(;o<i;){let a=e,l=null,c=null,d=0,h=null,u=-1
|
|
8707
8732
|
for(;o<i&&!(l=a.go(n[o].t));)r.push(n[o++])
|
|
8708
8733
|
for(;o<i&&(c=l||a.go(n[o].t));)l=null,a=c,a.accepts()?(u=0,h=a):u>=0&&u++,o++,d++
|
|
8709
8734
|
if(u<0)o-=d,o<i&&(r.push(n[o]),o++)
|
|
8710
|
-
else{r.length>0&&(s.push(
|
|
8735
|
+
else{r.length>0&&(s.push($A(xA,t,r)),r=[]),o-=u,d-=u
|
|
8711
8736
|
const e=h.t,i=n.slice(o-d,o)
|
|
8712
|
-
s.push(
|
|
8737
|
+
s.push($A(e,t,i))}}return r.length>0&&s.push($A(xA,t,r)),s}(_A.parser.start,e,function(e,t){const n=function(e){const t=[],n=e.length
|
|
8713
8738
|
let i=0
|
|
8714
8739
|
for(;i<n;){let o,s=e.charCodeAt(i),r=s<55296||s>56319||i+1===n||(o=e.charCodeAt(i+1))<56320||o>57343?e[i]:e.slice(i,i+2)
|
|
8715
8740
|
t.push(r),i+=r.length}return t}(t.replace(/[A-Z]/g,(e=>e.toLowerCase()))),i=n.length,o=[]
|
|
8716
8741
|
let s=0,r=0
|
|
8717
8742
|
for(;r<i;){let a=e,l=null,c=0,d=null,h=-1,u=-1
|
|
8718
8743
|
for(;r<i&&(l=a.go(n[r]));)a=l,a.accepts()?(h=0,u=0,d=a):h>=0&&(h+=n[r].length,u++),c+=n[r].length,s+=n[r].length,r++
|
|
8719
|
-
s-=h,r-=u,c-=h,o.push({t:d.t,v:t.slice(s-c,s),s:s-c,e:s})}return o}(
|
|
8720
|
-
n=t,t=null}const i=new
|
|
8744
|
+
s-=h,r-=u,c-=h,o.push({t:d.t,v:t.slice(s-c,s),s:s-c,e:s})}return o}(_A.scanner.start,e))}function AA(e,t,n){if(void 0===t&&(t=null),void 0===n&&(n=null),t&&"object"==typeof t){if(n)throw Error(`linkifyjs: Invalid link type ${t}; must be a string`)
|
|
8745
|
+
n=t,t=null}const i=new gA(n),o=DA(e),s=[]
|
|
8721
8746
|
for(let e=0;e<o.length;e++){const n=o[e]
|
|
8722
|
-
!n.isLink||t&&n.t!==t||!i.check(n)||s.push(n.toFormattedObject(i))}return s}function
|
|
8747
|
+
!n.isLink||t&&n.t!==t||!i.check(n)||s.push(n.toFormattedObject(i))}return s}function TA(e){return new hw({key:new fw("autolink"),appendTransaction:(t,n,i)=>{const o=t.some((e=>e.docChanged))&&!n.doc.eq(i.doc),s=t.some((e=>e.getMeta("preventAutolink")))
|
|
8723
8748
|
if(!o||s)return
|
|
8724
8749
|
const{tr:r}=i,a=function(e,t){const n=new Uy(e)
|
|
8725
8750
|
return t.forEach((e=>{e.steps.forEach((e=>{n.step(e)}))})),n}(n.doc,[...t]),l=function(e){const{mapping:t,steps:n}=e,i=[]
|
|
@@ -8736,15 +8761,15 @@ if(n.length>1?(o=n[0],s=i.doc.textBetween(o.pos,o.pos+o.node.nodeSize,void 0," "
|
|
|
8736
8761
|
if(t.length<=0)return!1
|
|
8737
8762
|
const n=t[t.length-1],l=o.pos+s.lastIndexOf(n)
|
|
8738
8763
|
if(!n)return!1
|
|
8739
|
-
const c=
|
|
8764
|
+
const c=DA(n).map((e=>e.toObject()))
|
|
8740
8765
|
if(!(1===(a=c).length?a[0].isLink:3===a.length&&a[1].isLink&&["()","[]"].includes(a[0].value+a[2].value)))return!1
|
|
8741
|
-
c.filter((e=>e.isLink)).map((e=>({...e,from:l+e.start+1,to:l+e.end+1}))).filter((e=>!i.schema.marks.code||!i.doc.rangeHasMark(e.from,e.to,i.schema.marks.code))).filter((t=>!e.validate||e.validate(t.value))).forEach((t=>{XS(t.from,t.to,i.doc).some((t=>t.mark.type===e.type))||r.addMark(t.from,t.to,e.type.create({href:t.href}))}))}var a})),r.steps.length?r:void 0}})}const
|
|
8766
|
+
c.filter((e=>e.isLink)).map((e=>({...e,from:l+e.start+1,to:l+e.end+1}))).filter((e=>!i.schema.marks.code||!i.doc.rangeHasMark(e.from,e.to,i.schema.marks.code))).filter((t=>!e.validate||e.validate(t.value))).forEach((t=>{XS(t.from,t.to,i.doc).some((t=>t.mark.type===e.type))||r.addMark(t.from,t.to,e.type.create({href:t.href}))}))}var a})),r.steps.length?r:void 0}})}const OA=p$.create({name:"link",priority:1e3,keepOnSplit:!1,onCreate(){this.options.protocols.forEach((e=>{"string"!=typeof e?EA(e.scheme,e.optionalSlashes):EA(e)}))},onDestroy(){QI.groups={},_A.scanner=null,_A.parser=null,_A.tokenQueue=[],_A.pluginQueue=[],_A.customSchemes=[],_A.initialized=!1},inclusive(){return this.options.autolink},addOptions:()=>({openOnClick:!0,linkOnPaste:!0,autolink:!0,protocols:[],HTMLAttributes:{target:"_blank",rel:"noopener noreferrer nofollow",class:null},validate:void 0}),addAttributes(){return{href:{default:null},target:{default:this.options.HTMLAttributes.target},rel:{default:this.options.HTMLAttributes.rel},class:{default:this.options.HTMLAttributes.class}}},parseHTML:()=>[{tag:'a[href]:not([href *= "javascript:" i])'}],renderHTML({HTMLAttributes:e}){var t
|
|
8742
8767
|
return(null===(t=e.href)||void 0===t?void 0:t.startsWith("javascript:"))?["a",sS(this.options.HTMLAttributes,{...e,href:""}),0]:["a",sS(this.options.HTMLAttributes,e),0]},addCommands(){return{setLink:e=>({chain:t})=>t().setMark(this.name,e).setMeta("preventAutolink",!0).run(),toggleLink:e=>({chain:t})=>t().toggleMark(this.name,e,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run(),unsetLink:()=>({chain:e})=>e().unsetMark(this.name,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run()}},addPasteRules(){return[m$({find:e=>{const t=[]
|
|
8743
|
-
if(e){const n=
|
|
8768
|
+
if(e){const n=AA(e).filter((e=>e.isLink))
|
|
8744
8769
|
n.length&&n.forEach((e=>t.push({text:e.value,data:{href:e.href},index:e.start})))}return t},type:this.type,getAttributes:e=>{var t
|
|
8745
8770
|
return{href:null===(t=e.data)||void 0===t?void 0:t.href}}})]},addProseMirrorPlugins(){const e=[]
|
|
8746
8771
|
var t
|
|
8747
|
-
return this.options.autolink&&e.push(
|
|
8772
|
+
return this.options.autolink&&e.push(TA({type:this.type,validate:this.options.validate})),this.options.openOnClick&&e.push((t={type:this.type,whenNotEditable:"whenNotEditable"===this.options.openOnClick},new hw({key:new fw("handleClickLink"),props:{handleClick:(e,n,i)=>{var o,s
|
|
8748
8773
|
if(t.whenNotEditable&&e.editable)return!1
|
|
8749
8774
|
if(0!==i.button)return!1
|
|
8750
8775
|
let r=i.target
|
|
@@ -8756,11 +8781,11 @@ return!(!c||!d||(window.open(d,h),0))}}}))),this.options.linkOnPaste&&e.push(fun
|
|
|
8756
8781
|
if(r)return!1
|
|
8757
8782
|
let a=""
|
|
8758
8783
|
i.content.forEach((e=>{a+=e.textContent}))
|
|
8759
|
-
const l=
|
|
8760
|
-
return!(!a||!l||(e.editor.commands.setMark(e.type,{href:l.href}),0))}}})}({editor:this.editor,type:this.type})),e}}),
|
|
8761
|
-
return!!Object.entries(n).some((([,e])=>!!e))||t.unsetMark(this.name)}}}}),
|
|
8762
|
-
return 1===t?["ol",sS(this.options.HTMLAttributes,n),0]:["ol",sS(this.options.HTMLAttributes,e),0]},addCommands(){return{toggleOrderedList:()=>({commands:e,chain:t})=>this.options.keepAttributes?t().toggleList(this.name,this.options.itemTypeName,this.options.keepMarks).updateAttributes(
|
|
8763
|
-
return(this.options.keepMarks||this.options.keepAttributes)&&(e=u$({find:
|
|
8784
|
+
const l=AA(a).find((e=>e.isLink&&e.value===a))
|
|
8785
|
+
return!(!a||!l||(e.editor.commands.setMark(e.type,{href:l.href}),0))}}})}({editor:this.editor,type:this.type})),e}}),RA=f$.create({name:"listItem",addOptions:()=>({HTMLAttributes:{},bulletListTypeName:"bulletList",orderedListTypeName:"orderedList"}),content:"paragraph block*",defining:!0,parseHTML:()=>[{tag:"li"}],renderHTML({HTMLAttributes:e}){return["li",sS(this.options.HTMLAttributes,e),0]},addKeyboardShortcuts(){return{Enter:()=>this.editor.commands.splitListItem(this.name),Tab:()=>this.editor.commands.sinkListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)}}}),FA=f$.create({name:"listItem",addOptions:()=>({HTMLAttributes:{},bulletListTypeName:"bulletList",orderedListTypeName:"orderedList"}),content:"paragraph block*",defining:!0,parseHTML:()=>[{tag:"li"}],renderHTML({HTMLAttributes:e}){return["li",sS(this.options.HTMLAttributes,e),0]},addKeyboardShortcuts(){return{Enter:()=>this.editor.commands.splitListItem(this.name),Tab:()=>this.editor.commands.sinkListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)}}}),NA=p$.create({name:"textStyle",addOptions:()=>({HTMLAttributes:{}}),parseHTML:()=>[{tag:"span",getAttrs:e=>!!e.hasAttribute("style")&&{}}],renderHTML({HTMLAttributes:e}){return["span",sS(this.options.HTMLAttributes,e),0]},addCommands(){return{removeEmptyTextStyle:()=>({state:e,commands:t})=>{const n=WS(e,this.type)
|
|
8786
|
+
return!!Object.entries(n).some((([,e])=>!!e))||t.unsetMark(this.name)}}}}),PA=/^(\d+)\.\s$/,LA=f$.create({name:"orderedList",addOptions:()=>({itemTypeName:"listItem",HTMLAttributes:{},keepMarks:!1,keepAttributes:!1}),group:"block list",content(){return`${this.options.itemTypeName}+`},addAttributes:()=>({start:{default:1,parseHTML:e=>e.hasAttribute("start")?parseInt(e.getAttribute("start")||"",10):1}}),parseHTML:()=>[{tag:"ol"}],renderHTML({HTMLAttributes:e}){const{start:t,...n}=e
|
|
8787
|
+
return 1===t?["ol",sS(this.options.HTMLAttributes,n),0]:["ol",sS(this.options.HTMLAttributes,e),0]},addCommands(){return{toggleOrderedList:()=>({commands:e,chain:t})=>this.options.keepAttributes?t().toggleList(this.name,this.options.itemTypeName,this.options.keepMarks).updateAttributes(FA.name,this.editor.getAttributes(NA.name)).run():e.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}},addKeyboardShortcuts(){return{"Mod-Shift-7":()=>this.editor.commands.toggleOrderedList()}},addInputRules(){let e=u$({find:PA,type:this.type,getAttributes:e=>({start:+e[1]}),joinPredicate:(e,t)=>t.childCount+t.attrs.start===+e[1]})
|
|
8788
|
+
return(this.options.keepMarks||this.options.keepAttributes)&&(e=u$({find:PA,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:e=>({start:+e[1],...this.editor.getAttributes(NA.name)}),joinPredicate:(e,t)=>t.childCount+t.attrs.start===+e[1],editor:this.editor})),[e]}}),zA=f$.create({name:"paragraph",priority:1e3,addOptions:()=>({HTMLAttributes:{}}),group:"block",content:"inline*",parseHTML:()=>[{tag:"p"}],renderHTML({HTMLAttributes:e}){return["p",sS(this.options.HTMLAttributes,e),0]},addCommands(){return{setParagraph:()=>({commands:e})=>e.setNode(this.name)}},addKeyboardShortcuts(){return{"Mod-Alt-0":()=>this.editor.commands.setParagraph()}}}),VA=$S.create({name:"placeholder",addOptions:()=>({emptyEditorClass:"is-editor-empty",emptyNodeClass:"is-empty",placeholder:"Write something …",showOnlyWhenEditable:!0,considerAnyAsEmpty:!1,showOnlyCurrent:!0,includeChildren:!1}),addProseMirrorPlugins(){return[new hw({key:new fw("placeholder"),props:{decorations:({doc:e,selection:t})=>{var n
|
|
8764
8789
|
const i=this.editor.isEditable||!this.options.showOnlyWhenEditable,{anchor:o}=t,s=[]
|
|
8765
8790
|
if(!i)return null
|
|
8766
8791
|
const{firstChild:r}=e.content,a=r&&r.type.isLeaf,l=r&&r.isAtom,c=!!this.options.considerAnyAsEmpty||r&&r.type.name===(null===(n=e.type.contentMatch.defaultType)||void 0===n?void 0:n.name),d=e.content.childCount<=1&&r&&c&&r.nodeSize<=2&&(!a||!l)
|
|
@@ -8768,8 +8793,8 @@ return e.descendants(((e,t)=>{const n=o>=t&&o<=t+e.nodeSize,i=!e.isLeaf&&!e.chil
|
|
|
8768
8793
|
if((n||!this.options.showOnlyCurrent)&&i){const i=[this.options.emptyNodeClass]
|
|
8769
8794
|
d&&i.push(this.options.emptyEditorClass)
|
|
8770
8795
|
const o=KC.node(t,t+e.nodeSize,{class:i.join(" "),"data-placeholder":"function"==typeof this.options.placeholder?this.options.placeholder({editor:this.editor,node:e,pos:t,hasAnchor:n}):this.options.placeholder})
|
|
8771
|
-
s.push(o)}return this.options.includeChildren})),JC.create(e,s)}}})]}}),
|
|
8772
|
-
function
|
|
8796
|
+
s.push(o)}return this.options.includeChildren})),JC.create(e,s)}}})]}}),HA=f$.create({name:"text",group:"inline"})
|
|
8797
|
+
function BA(e){var t
|
|
8773
8798
|
const{char:n,allowSpaces:i,allowedPrefixes:o,startOfLine:s,$position:r}=e,a=n.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&")
|
|
8774
8799
|
const l=new RegExp(`\\s${a}$`),c=s?"^":"",d=i?new RegExp(`${c}${a}.*?(?=\\s${a}|$)`,"gm"):new RegExp(`${c}(?:^)?${a}[^\\s${a}]*`,"gm"),h=(null===(t=r.nodeBefore)||void 0===t?void 0:t.isText)&&r.nodeBefore.text
|
|
8775
8800
|
if(!h)return null
|
|
@@ -8779,8 +8804,8 @@ const f=p.input.slice(Math.max(0,p.index-1),p.index),m=new RegExp(`^[${null==o?v
|
|
|
8779
8804
|
if(null!==o&&!m)return null
|
|
8780
8805
|
const g=u+p.index
|
|
8781
8806
|
let v=g+p[0].length
|
|
8782
|
-
return i&&l.test(h.slice(v-1,v+1))&&(p[0]+=" ",v+=1),g<r.pos&&v>=r.pos?{range:{from:g,to:v},query:p[0].slice(n.length),text:p[0]}:null}const
|
|
8783
|
-
function
|
|
8807
|
+
return i&&l.test(h.slice(v-1,v+1))&&(p[0]+=" ",v+=1),g<r.pos&&v>=r.pos?{range:{from:g,to:v},query:p[0].slice(n.length),text:p[0]}:null}const qA=new fw("suggestion")
|
|
8808
|
+
function UA({pluginKey:e=qA,editor:t,char:n="@",allowSpaces:i=!1,allowedPrefixes:o=[" "],startOfLine:s=!1,decorationTag:r="span",decorationClass:a="suggestion",command:l=(()=>null),items:c=(()=>[]),render:d=(()=>({})),allow:h=(()=>!0),findSuggestionMatch:u=BA}){let p
|
|
8784
8809
|
const f=null==d?void 0:d(),m=new hw({key:e,view(){return{update:async(e,n)=>{var i,o,s,r,a,d,h
|
|
8785
8810
|
const u=null===(i=this.key)||void 0===i?void 0:i.getState(n),m=null===(o=this.key)||void 0===o?void 0:o.getState(e.state),g=u.active&&m.active&&u.range.from!==m.range.from,v=!u.active&&m.active,b=u.active&&!m.active,y=v||g,w=!v&&!b&&u.query!==m.query&&!g,x=b||g
|
|
8786
8811
|
if(!y&&!w&&!x)return
|
|
@@ -8796,9 +8821,9 @@ return g.active||(g.decorationId=null,g.range={from:0,to:0},g.query=null,g.text=
|
|
|
8796
8821
|
const{active:i,range:o}=m.getState(e.state)
|
|
8797
8822
|
return i&&(null===(n=null==f?void 0:f.onKeyDown)||void 0===n?void 0:n.call(f,{view:e,event:t,range:o}))||!1},decorations(e){const{active:t,range:n,decorationId:i}=m.getState(e)
|
|
8798
8823
|
return t?JC.create(e.doc,[KC.inline(n.from,n.to,{nodeName:r,class:a,"data-decoration-id":i})]):null}}})
|
|
8799
|
-
return m}const
|
|
8824
|
+
return m}const jA=new fw("mention"),WA=f$.create({name:"mention",addOptions(){return{HTMLAttributes:{},renderText({options:e,node:t}){var n
|
|
8800
8825
|
return`${e.suggestion.char}${null!==(n=t.attrs.label)&&void 0!==n?n:t.attrs.id}`},deleteTriggerWithBackspace:!1,renderHTML({options:e,node:t}){var n
|
|
8801
|
-
return["span",sS(this.HTMLAttributes,e.HTMLAttributes),`${e.suggestion.char}${null!==(n=t.attrs.label)&&void 0!==n?n:t.attrs.id}`]},suggestion:{char:"@",pluginKey:
|
|
8826
|
+
return["span",sS(this.HTMLAttributes,e.HTMLAttributes),`${e.suggestion.char}${null!==(n=t.attrs.label)&&void 0!==n?n:t.attrs.id}`]},suggestion:{char:"@",pluginKey:jA,command:({editor:e,range:t,props:n})=>{var i,o
|
|
8802
8827
|
const s=e.view.state.selection.$to.nodeAfter;(null===(i=null==s?void 0:s.text)||void 0===i?void 0:i.startsWith(" "))&&(t.to+=1),e.chain().focus().insertContentAt(t,[{type:this.name,attrs:n},{type:"text",text:" "}]).run(),null===(o=window.getSelection())||void 0===o||o.collapseToEnd()},allow:({state:e,range:t})=>{const n=e.doc.resolve(t.from),i=e.schema.nodes[this.name]
|
|
8803
8828
|
return!!n.parent.type.contentMatch.matchType(i)}}}},group:"inline",inline:!0,selectable:!1,atom:!0,addAttributes:()=>({id:{default:null,parseHTML:e=>e.getAttribute("data-id"),renderHTML:e=>e.id?{"data-id":e.id}:{}},label:{default:null,parseHTML:e=>e.getAttribute("data-label"),renderHTML:e=>e.label?{"data-label":e.label}:{}}}),parseHTML(){return[{tag:`span[data-type="${this.name}"]`}]},renderHTML({node:e,HTMLAttributes:t}){if(void 0!==this.options.renderLabel)return console.warn("renderLabel is deprecated use renderText and renderHTML instead"),["span",sS({"data-type":this.name},this.options.HTMLAttributes,t),this.options.renderLabel({options:this.options,node:e})]
|
|
8804
8829
|
const n={...this.options}
|
|
@@ -8806,40 +8831,40 @@ n.HTMLAttributes=sS({"data-type":this.name},this.options.HTMLAttributes,t)
|
|
|
8806
8831
|
const i=this.options.renderHTML({options:n,node:e})
|
|
8807
8832
|
return"string"==typeof i?["span",sS({"data-type":this.name},this.options.HTMLAttributes,t),i]:i},renderText({node:e}){return void 0!==this.options.renderLabel?(console.warn("renderLabel is deprecated use renderText and renderHTML instead"),this.options.renderLabel({options:this.options,node:e})):this.options.renderText({options:this.options,node:e})},addKeyboardShortcuts(){return{Backspace:()=>this.editor.commands.command((({tr:e,state:t})=>{let n=!1
|
|
8808
8833
|
const{selection:i}=t,{empty:o,anchor:s}=i
|
|
8809
|
-
return!!o&&(t.doc.nodesBetween(s-1,s,((t,i)=>{if(t.type.name===this.name)return n=!0,e.insertText(this.options.deleteTriggerWithBackspace?"":this.options.suggestion.char||"",i,i+t.nodeSize),!1})),n)}))}},addProseMirrorPlugins(){return[
|
|
8810
|
-
function
|
|
8811
|
-
return{onStart:s=>{null!==s.decorationNode&&(o=!0,e.mentionUpdateEmitter(s.query),t(s.text.slice(0,1)),n(s.command),i?.show({filter:s.query,anchorNode:s.decorationNode}))},onUpdate:t=>{o&&(e.mentionUpdateEmitter(t.query),n(t.command),i?.show({filter:t.query,anchorNode:t.decorationNode}))},onKeyDown:e=>!!o&&(e.event.key===fa&&(o=!1),i?.keydownHandler(e.event)??!1),onExit:()=>{t(""),n(void 0),i?.close()}}}}})}(n,e,t,o))),l=new d$({element:n,enableInputRules:[
|
|
8812
|
-
return new cb(t,e.openStart,e.openEnd)}},extensions:[
|
|
8813
|
-
return l}function
|
|
8834
|
+
return!!o&&(t.doc.nodesBetween(s-1,s,((t,i)=>{if(t.type.name===this.name)return n=!0,e.insertText(this.options.deleteTriggerWithBackspace?"":this.options.suggestion.char||"",i,i+t.nodeSize),!1})),n)}))}},addProseMirrorPlugins(){return[UA({editor:this.editor,...this.options.suggestion})]}}),GA=/^https?:\/\//i
|
|
8835
|
+
function ZA(e,t,n,i,o,s){const r=OA.extend({excludes:"_",inclusive:!1,parseHTML:()=>[{tag:Nd},{tag:"a"}],renderHTML:({HTMLAttributes:e})=>["a",e]}).configure({HTMLAttributes:{rel:"noopener noreferrer",target:null,class:""},autolink:!0,openOnClick:!1,linkOnPaste:!1,validate:e=>GA.test(e)}),a=i.map((n=>function(e,t,n,i){return WA.extend({name:e.name,parseHTML:()=>[{tag:e.viewElement}],addAttributes:()=>({href:{default:null,parseHTML:e=>e.getAttribute("mention-href"),renderHTML:e=>({"mention-href":e.href})},label:{default:null,parseHTML:e=>e.getAttribute("mention-label"),renderHTML:e=>({"mention-label":e.label})},disabled:{default:null,parseHTML:e=>e.getAttribute("disabled"),renderHTML:e=>({disabled:e.disabled})}}),renderHTML({node:t,HTMLAttributes:n}){return[e.viewElement,sS(this.options.HTMLAttributes,n),this.options.renderText({options:this.options,node:t})]}}).configure({suggestion:{char:e.character,decorationClass:"nimble-mention-view-edit",pluginKey:new fw(e.key),allowSpaces:!0,render:()=>{let o=!1
|
|
8836
|
+
return{onStart:s=>{null!==s.decorationNode&&(o=!0,e.mentionUpdateEmitter(s.query),t(s.text.slice(0,1)),n(s.command),i?.show({filter:s.query,anchorNode:s.decorationNode}))},onUpdate:t=>{o&&(e.mentionUpdateEmitter(t.query),n(t.command),i?.show({filter:t.query,anchorNode:t.decorationNode}))},onKeyDown:e=>!!o&&(e.event.key===fa&&(o=!1),i?.keydownHandler(e.event)??!1),onExit:()=>{t(""),n(void 0),i?.close()}}}}})}(n,e,t,o))),l=new d$({element:n,enableInputRules:[hI,LA],enablePasteRules:!1,editorProps:{transformPasted:function(e){const t=KA(l,e.content)
|
|
8837
|
+
return new cb(t,e.openStart,e.openEnd)}},extensions:[uI,zA,HA,hI,LA,RA,aI,PI,TI,VA.configure({placeholder:s,showOnlyWhenEditable:!1}),g$,r,...a]})
|
|
8838
|
+
return l}function KA(e,t){const n=[]
|
|
8814
8839
|
return t.forEach((t=>{if(t.isText&&t.marks.length>0){const i=t.marks.find((e=>"link"===e.type.name&&e.attrs))
|
|
8815
|
-
i?
|
|
8816
|
-
else{const i=
|
|
8817
|
-
n.push(t.copy(i))}})),ib.fromArray(n)}class
|
|
8818
|
-
const t=`${L$}${
|
|
8819
|
-
this.name=t,this.key=t,this.viewElement=e.viewElement,this.character=e.character,this.mappingConfigs=e.mappingConfigs,this.iconTemplate=e.iconTemplate,this.buttonLabel=e.buttonLabel??"",this.mentionUpdateEmitter=e.mentionUpdateEmitter}}
|
|
8820
|
-
class
|
|
8840
|
+
i?GA.test(i.attrs.href)?n.push(e.schema.text(i.attrs.href,t.marks)):n.push(e.schema.text(t.textContent,i.removeFromSet(t.marks))):n.push(t)}else if(t.type.name.startsWith(L$))n.push(e.schema.text(t.attrs.label))
|
|
8841
|
+
else{const i=KA(e,t.content)
|
|
8842
|
+
n.push(t.copy(i))}})),ib.fromArray(n)}class XA{constructor(e){XA.instance+=1
|
|
8843
|
+
const t=`${L$}${XA.instance}`
|
|
8844
|
+
this.name=t,this.key=t,this.viewElement=e.viewElement,this.character=e.character,this.mappingConfigs=e.mappingConfigs,this.iconTemplate=e.iconTemplate,this.buttonLabel=e.buttonLabel??"",this.mentionUpdateEmitter=e.mentionUpdateEmitter}}XA.instance=0
|
|
8845
|
+
class YA extends KE{constructor(e){super(e),this.mentionExtensionConfig=this.isValid?e.map((e=>new XA(e.mentionInternals))):[]}}class JA extends nI{constructor(){super(...arguments),this.editor=this.createEditor(),this.tiptapEditor=ZA((()=>{}),(()=>{}),this.editor,[],this.mentionListbox,this.placeholder),this.xmlSerializer=new XMLSerializer,this.richTextMarkdownSerializer=new jE([]),this.disabled=!1,this.footerHidden=!1,this.errorVisible=!1,this.scrollbarWidth=-1,this.activeMentionCharacter="",this.updateScrollbarWidthQueued=!1}get empty(){if(""===this.tiptapEditor.state.doc.textContent.trim()){let e=!1
|
|
8821
8846
|
return this.tiptapEditor.state.doc.descendants((t=>{t.type.name.startsWith(L$)&&(e=!0)
|
|
8822
8847
|
return!1===e})),!e}return!1}connectedCallback(){super.connectedCallback(),this.editor.isConnected||this.editorContainer.append(this.editor),this.bindEditorTransactionEvent(),this.bindEditorUpdateEvent(),this.stopNativeInputEventPropagation(),this.resizeObserver=new ResizeObserver((()=>this.onResize())),this.resizeObserver.observe(this)}disconnectedCallback(){super.disconnectedCallback(),this.unbindEditorTransactionEvent(),this.unbindEditorUpdateEvent(),this.unbindNativeInputEvent(),this.resizeObserver?.disconnect()}disabledChanged(){this.disableEditor(),this.disableMentionViewElement()}placeholderChanged(e,t){this.getTipTapExtension("placeholder").options.placeholder=this.placeholder??"",this.tiptapEditor.view.dispatch(this.tiptapEditor.state.tr),this.queueUpdateScrollbarWidth()}ariaLabelChanged(e,t){null!==this.ariaLabel&&void 0!==this.ariaLabel?this.editor.setAttribute("aria-label",this.ariaLabel):this.editor.removeAttribute("aria-label")}configurationChanged(e,t){const n=this.getButtonsState(this.tiptapEditor),{from:i,to:o}=this.tiptapEditor.view.state.selection
|
|
8823
8848
|
if(this.isMentionExtensionConfigUnchanged(e,t))this.setMarkdown(this.getMarkdown())
|
|
8824
8849
|
else{const e=this.getMentionExtensionConfig(),t=this.getMarkdown()
|
|
8825
|
-
this.richTextMarkdownSerializer=new
|
|
8850
|
+
this.richTextMarkdownSerializer=new jE(e.map((e=>e.name))),this.initializeEditor(),this.setMarkdown(t)}this.tiptapEditor.commands.setTextSelection({from:i,to:o}),this.resetEditorButtonsState(n),this.setActiveMappingConfigs()}activeMentionCharacterChanged(){this.setActiveMappingConfigs()}boldButtonClick(){this.tiptapEditor.chain().focus().toggleBold().run()}boldButtonKeyDown(e){return!this.keyActivatesButton(e)||(this.tiptapEditor.chain().focus().toggleBold().run(),!1)}italicsButtonClick(){this.tiptapEditor.chain().focus().toggleItalic().run()}italicsButtonKeyDown(e){return!this.keyActivatesButton(e)||(this.tiptapEditor.chain().focus().toggleItalic().run(),!1)}bulletListButtonClick(){this.tiptapEditor.chain().focus().toggleBulletList().run()}bulletListButtonKeyDown(e){return!this.keyActivatesButton(e)||(this.tiptapEditor.chain().focus().toggleBulletList().run(),!1)}numberedListButtonClick(){this.tiptapEditor.chain().focus().toggleOrderedList().run()}numberedListButtonKeyDown(e){return!this.keyActivatesButton(e)||(this.tiptapEditor.chain().focus().toggleOrderedList().run(),!1)}mentionButtonClick(e){this.tiptapEditor.chain().insertContent(this.shouldInsertSpace()?` ${e}`:e).focus().run()}setMarkdown(e){const t=this.getHtmlContent(e)
|
|
8826
8851
|
this.tiptapEditor.commands.setContent(t),this.disableMentionViewElement()}getMarkdown(){return this.richTextMarkdownSerializer.serializeDOMToMarkdown(this.tiptapEditor.state.doc)}stopEventPropagation(e){return e.stopPropagation(),!1}getMentionedHrefs(){const e=new Set
|
|
8827
|
-
return this.tiptapEditor.state.doc.descendants((t=>{t.type.name.startsWith(L$)&&e.add(t.attrs.href)})),Array.from(e)}getMentionExtensionConfig(){return this.configuration instanceof
|
|
8852
|
+
return this.tiptapEditor.state.doc.descendants((t=>{t.type.name.startsWith(L$)&&e.add(t.attrs.href)})),Array.from(e)}getMentionExtensionConfig(){return this.configuration instanceof YA?this.configuration.mentionExtensionConfig:[]}onMentionSelect(e){this.activeMentionCommand&&this.activeMentionCommand({href:e.detail.href,label:e.detail.displayName})}focusoutHandler(){this.mentionListbox?.open&&this.mentionListbox?.close()}createConfig(){this.validate(),this.richTextValidator.isValid()?(this.richTextUpdateTracker.updateButtonLabel||this.richTextUpdateTracker.updateMappingConfigs||this.richTextUpdateTracker.updatePattern)&&(this.configuration=new YA(this.mentionElements)):this.configuration=void 0}isMentionExtensionConfigUnchanged(e,t){const n=e?.mentionExtensionConfig.map((e=>e.character)).sort(((e,t)=>e.localeCompare(t))).toString(),i=t?.mentionExtensionConfig.map((e=>e.character)).sort(((e,t)=>e.localeCompare(t))).toString()
|
|
8828
8853
|
return n===i}createEditor(){const e=document.createElement("div")
|
|
8829
|
-
return e.className="editor",e.setAttribute("aria-multiline","true"),e.setAttribute("role","textbox"),e.setAttribute("aria-disabled","false"),e}initializeEditor(){this.unbindEditorTransactionEvent(),this.unbindEditorUpdateEvent(),this.unbindNativeInputEvent(),this.tiptapEditor?.destroy(),this.tiptapEditor=
|
|
8854
|
+
return e.className="editor",e.setAttribute("aria-multiline","true"),e.setAttribute("role","textbox"),e.setAttribute("aria-disabled","false"),e}initializeEditor(){this.unbindEditorTransactionEvent(),this.unbindEditorUpdateEvent(),this.unbindNativeInputEvent(),this.tiptapEditor?.destroy(),this.tiptapEditor=ZA((e=>{this.activeMentionCharacter=e}),(e=>{this.activeMentionCommand=e}),this.editor,this.configuration instanceof YA?this.configuration.mentionExtensionConfig:[],this.mentionListbox,this.placeholder),this.disableEditor(),this.disableMentionViewElement(),this.bindEditorTransactionEvent(),this.bindEditorUpdateEvent(),this.stopNativeInputEventPropagation()}getHtmlContent(e){const t=UE.parseMarkdownToDOM(e,this.configuration?.parserMentionConfig)
|
|
8830
8855
|
return this.xmlSerializer.serializeToString(t.fragment)}bindEditorTransactionEvent(){this.tiptapEditor.on("transaction",(()=>{this.updateEditorButtonsState()}))}unbindEditorTransactionEvent(){this.tiptapEditor.off("transaction")}updateEditorButtonsState(){if(!this.$fastController.isConnected)return
|
|
8831
8856
|
const{extensionManager:e,state:t}=this.tiptapEditor,{extensions:n}=e,{selection:i}=t,o=GS((e=>QS(e.type.name,n)))(i)
|
|
8832
8857
|
this.boldButton.checked=this.tiptapEditor.isActive("bold"),this.italicsButton.checked=this.tiptapEditor.isActive("italic"),this.bulletListButton.checked=o?.node.type.name===N$,this.numberedListButton.checked=o?.node.type.name===P$}keyActivatesButton(e){switch(e.key){case va:case pa:return!0
|
|
8833
8858
|
default:return!1}}unbindEditorUpdateEvent(){this.tiptapEditor.off("update")}bindEditorUpdateEvent(){this.tiptapEditor.on("update",(()=>{this.$emit("input"),this.queueUpdateScrollbarWidth()}))}disableEditor(){this.tiptapEditor.setEditable(!this.disabled),this.setEditorTabIndex(),this.editor.setAttribute("aria-disabled",this.disabled?"true":"false"),this.mentionListbox?.close()}disableMentionViewElement(){this.tiptapEditor.state.doc.descendants(((e,t)=>{if(e.type.name.startsWith(L$)){const n={...e.attrs,disabled:this.disabled?"":null},i=this.tiptapEditor.schema.node(e.type.name,n,e.content),o=this.tiptapEditor.state.tr.replaceWith(t,t+e.nodeSize,i)
|
|
8834
8859
|
this.tiptapEditor.view.dispatch(o)}return!0}))}stopNativeInputEventPropagation(){this.tiptapEditor.view.dom.addEventListener("input",(e=>{e.stopPropagation()}))}unbindNativeInputEvent(){this.tiptapEditor.view.dom.removeEventListener("input",(()=>{}))}queueUpdateScrollbarWidth(){this.$fastController.isConnected&&(this.updateScrollbarWidthQueued||(this.updateScrollbarWidthQueued=!0,u.queueUpdate((()=>this.updateScrollbarWidth()))))}updateScrollbarWidth(){this.updateScrollbarWidthQueued=!1,this.scrollbarWidth=this.tiptapEditor.view.dom.offsetWidth-this.tiptapEditor.view.dom.clientWidth}onResize(){this.scrollbarWidth=this.tiptapEditor.view.dom.offsetWidth-this.tiptapEditor.view.dom.clientWidth}getTipTapExtension(e){return this.tiptapEditor.extensionManager.extensions.find((t=>t.name===e))}setEditorTabIndex(){this.tiptapEditor.setOptions({editorProps:{attributes:{tabindex:this.disabled?"-1":"0"}}})}setActiveMappingConfigs(){this.activeMappingConfigs=this.activeMentionCharacter?this.getMentionExtensionConfigFromCharacter(this.activeMentionCharacter)?.mappingConfigs:void 0}shouldInsertSpace(){const{$anchor:e,$head:t}=this.tiptapEditor.view.state.selection,n=0===t.parentOffset||0===e.parentOffset,i=e.pos<t.pos?e.nodeBefore:t.nodeBefore,o=i?.type.name===g$.name,s=i?.textContent.endsWith(" ")
|
|
8835
|
-
return!n&&!o&&!s}getMentionExtensionConfigFromCharacter(e){return this.getMentionExtensionConfig().find((t=>t.character===e))}resetEditorButtonsState(e){e?.bold&&!this.tiptapEditor.isActive("bold")&&this.tiptapEditor.chain().focus().toggleBold().run(),e?.italics&&!this.tiptapEditor.isActive("italic")&&this.tiptapEditor.chain().focus().toggleItalic().run()}getButtonsState(e){if(this.$fastController.isConnected)return{bold:e.isActive("bold"),italics:e.isActive("italic")}}}e([le({mode:"boolean"})],
|
|
8836
|
-
const
|
|
8837
|
-
yi.getOrCreate().withPrefix("nimble").register(
|
|
8838
|
-
const
|
|
8860
|
+
return!n&&!o&&!s}getMentionExtensionConfigFromCharacter(e){return this.getMentionExtensionConfig().find((t=>t.character===e))}resetEditorButtonsState(e){e?.bold&&!this.tiptapEditor.isActive("bold")&&this.tiptapEditor.chain().focus().toggleBold().run(),e?.italics&&!this.tiptapEditor.isActive("italic")&&this.tiptapEditor.chain().focus().toggleItalic().run()}getButtonsState(e){if(this.$fastController.isConnected)return{bold:e.isActive("bold"),italics:e.isActive("italic")}}}e([le({mode:"boolean"})],JA.prototype,"disabled",void 0),e([le({attribute:"footer-hidden",mode:"boolean"})],JA.prototype,"footerHidden",void 0),e([le({attribute:"error-visible",mode:"boolean"})],JA.prototype,"errorVisible",void 0),e([le({attribute:"error-text"})],JA.prototype,"errorText",void 0),e([le],JA.prototype,"placeholder",void 0),e([g],JA.prototype,"boldButton",void 0),e([g],JA.prototype,"italicsButton",void 0),e([g],JA.prototype,"bulletListButton",void 0),e([g],JA.prototype,"numberedListButton",void 0),e([g],JA.prototype,"scrollbarWidth",void 0),e([g],JA.prototype,"activeMentionCharacter",void 0),e([g],JA.prototype,"activeMappingConfigs",void 0),qt(JA,fn)
|
|
8861
|
+
const QA=JA.compose({baseName:"rich-text-editor",template:R$,styles:F$,shadowOptions:{delegatesFocus:!0}})
|
|
8862
|
+
yi.getOrCreate().withPrefix("nimble").register(QA())
|
|
8863
|
+
const eT=G`
|
|
8839
8864
|
<template ${Qe({property:"childItems",filter:Ze()})}>
|
|
8840
8865
|
<div ${Pe("viewer")} class="viewer"></div>
|
|
8841
8866
|
</template>
|
|
8842
|
-
`,
|
|
8867
|
+
`,tT=xe`
|
|
8843
8868
|
${Ro("flex")}
|
|
8844
8869
|
|
|
8845
8870
|
:host {
|
|
@@ -8881,11 +8906,11 @@ const dT=G`
|
|
|
8881
8906
|
color: ${zl};
|
|
8882
8907
|
}
|
|
8883
8908
|
`
|
|
8884
|
-
class
|
|
8885
|
-
this.viewer.replaceChildren(e.fragment),this.mentionedHrefs=e.mentionedHrefs}else this.viewer.innerHTML="",this.mentionedHrefs=[]}}e([g],
|
|
8886
|
-
const
|
|
8887
|
-
yi.getOrCreate().withPrefix("nimble").register(
|
|
8888
|
-
const
|
|
8909
|
+
class nT extends nI{constructor(){super(...arguments),this.markdown="",this.mentionedHrefs=[]}connectedCallback(){super.connectedCallback(),this.updateView()}markdownChanged(){this.updateView()}configurationChanged(){this.updateView()}getMentionedHrefs(){return Array.from(this.mentionedHrefs)}updateView(){if(this.$fastController.isConnected)if(this.markdown){const e=UE.parseMarkdownToDOM(this.markdown,this.configuration?.parserMentionConfig)
|
|
8910
|
+
this.viewer.replaceChildren(e.fragment),this.mentionedHrefs=e.mentionedHrefs}else this.viewer.innerHTML="",this.mentionedHrefs=[]}}e([g],nT.prototype,"markdown",void 0)
|
|
8911
|
+
const iT=nT.compose({baseName:"rich-text-viewer",template:eT,styles:tT})
|
|
8912
|
+
yi.getOrCreate().withPrefix("nimble").register(iT())
|
|
8913
|
+
const oT=xe`
|
|
8889
8914
|
${Km}
|
|
8890
8915
|
${Xm}
|
|
8891
8916
|
|
|
@@ -9021,18 +9046,18 @@ const fT=xe`
|
|
|
9021
9046
|
.no-results-label {
|
|
9022
9047
|
background: ${Ms(ss,.15)};
|
|
9023
9048
|
}
|
|
9024
|
-
`)),
|
|
9025
|
-
let
|
|
9026
|
-
class
|
|
9027
|
-
class
|
|
9049
|
+
`)),sT=e=>e instanceof mv,rT=e=>e instanceof wv
|
|
9050
|
+
let aT=class extends Ii{}
|
|
9051
|
+
class lT extends($n(aT)){constructor(){super(...arguments),this.proxy=document.createElement("select")}}const cT=e=>!e.visuallyHidden&&!e.disabled&&!e.hidden,dT=e=>!e.visuallyHidden&&!e.hidden
|
|
9052
|
+
class hT extends lT{constructor(){super(...arguments),this.appearance=Wm,this.errorVisible=!1,this.filterMode=Ym.none,this.clearable=!1,this.displayPlaceholder=!1,this.open=!1,this.listboxId=wa("listbox-"),this.hasOverflow=!1,this.filteredOptions=[],this.filter="",this.maxHeight=0,this._value="",this.forcedPosition=!1}get collapsible(){return!(this.multiple||"number"==typeof this.size)}connectedCallback(){super.connectedCallback(),this.forcedPosition=!!this.positionAttribute,this.open&&this.initializeOpenState()}get value(){return m.track(this,"value"),this._value}set value(e){const t=this._value
|
|
9028
9053
|
let n=e
|
|
9029
9054
|
if(this.options?.length){const e=this.options.findIndex((e=>e.value===n)),t=this.options[this.selectedIndex]?.value??null,i=this.options[e]?.value??null;-1!==e&&t===i||(n="",this.selectedIndex=e),n=this.firstSelectedOption?.value??n}t===n||this.open&&this.selectedIndex<0||(this._value=n,super.valueChanged(t,n),m.notify(this,"value"),this.updateDisplayValue())}get displayValue(){return m.track(this,"displayValue"),this.firstSelectedOption?.text??""}anchoredRegionChanged(e,t){this.anchoredRegion&&this.control&&(this.anchoredRegion.anchorElement=this.control)}controlChanged(e,t){this.anchoredRegion&&this.control&&(this.anchoredRegion.anchorElement=this.control)}slottedOptionsChanged(e,t){const n=this.value
|
|
9030
9055
|
this.options.forEach((e=>{const t=m.getNotifier(e)
|
|
9031
|
-
t.unsubscribe(this,"value"),t.unsubscribe(this,"hidden"),t.unsubscribe(this,"disabled")})),e?.filter(
|
|
9056
|
+
t.unsubscribe(this,"value"),t.unsubscribe(this,"hidden"),t.unsubscribe(this,"disabled")})),e?.filter(rT).forEach((e=>{const t=m.getNotifier(e)
|
|
9032
9057
|
t.unsubscribe(this,"hidden"),t.unsubscribe(this,"visuallyHidden"),t.unsubscribe(this,"listOptions")}))
|
|
9033
9058
|
const i=this.getSlottedOptions(t)
|
|
9034
9059
|
super.slottedOptionsChanged(e,i),i.forEach((e=>{const t=m.getNotifier(e)
|
|
9035
|
-
t.subscribe(this,"value"),t.subscribe(this,"hidden"),t.subscribe(this,"disabled")})),t?.filter(
|
|
9060
|
+
t.subscribe(this,"value"),t.subscribe(this,"hidden"),t.subscribe(this,"disabled")})),t?.filter(rT).forEach((e=>{this.updateAdjacentSeparatorState(e)
|
|
9036
9061
|
const t=m.getNotifier(e)
|
|
9037
9062
|
t.subscribe(this,"hidden"),t.subscribe(this,"visuallyHidden"),t.subscribe(this,"listOptions")})),this.setProxyOptions(),this.updateValue(),this.filterOptions(),n&&(this.value=n)}clickHandler(e){if(this.disabled)return
|
|
9038
9063
|
let t=!1
|
|
@@ -9041,11 +9066,11 @@ if(t=null!==n,n?.disabled)return}const n=this.selectedIndex
|
|
|
9041
9066
|
super.clickHandler(e),this.open=this.collapsible&&!this.open,!this.open&&this.selectedIndex!==n&&t&&this.updateValue(!0)}handleChange(e,t){const n=e
|
|
9042
9067
|
switch(t){case"value":this.updateValue()
|
|
9043
9068
|
break
|
|
9044
|
-
case"selected":
|
|
9069
|
+
case"selected":sT(n)&&n.selected?this.selectedIndex=this.options.indexOf(n):this.clearSelect()
|
|
9045
9070
|
break
|
|
9046
|
-
case"hidden":
|
|
9071
|
+
case"hidden":sT(n)?(n.visuallyHidden=n.hidden,this.updateAdjacentSeparatorState(n)):rT(n)&&(n.listOptions.forEach((e=>{e.visuallyHidden=n.hidden})),this.updateAdjacentSeparatorState(n)),this.filterOptions(),this.updateDisplayValue()
|
|
9047
9072
|
break
|
|
9048
|
-
case"visuallyHidden":(
|
|
9073
|
+
case"visuallyHidden":(rT(n)||sT(n))&&this.updateAdjacentSeparatorState(n)
|
|
9049
9074
|
break
|
|
9050
9075
|
case"disabled":this.updateDisplayValue()
|
|
9051
9076
|
break
|
|
@@ -9073,53 +9098,53 @@ case fa:if(!this.open){if(this.clearable)return this.clearSelect(),this.updateVa
|
|
|
9073
9098
|
break}this.collapsible&&this.open&&(e.preventDefault(),this.open=!1),i=this.selectedIndex,this.focus()}return this.open||this.selectedIndex===i||(this.selectedIndex=i),this.open||t===this.selectedIndex||this.updateValue(!0),!(n===da||n===ua)}selectedIndexChanged(e,t){this.setSelectedOptions(),this.open&&this.setActiveOption(this.selectedIndex),this.updateValue()}typeaheadBufferChanged(e,t){if(this.$fastController.isConnected){const e=this.getTypeaheadMatches()
|
|
9074
9099
|
if(e.length){const t=this.options.indexOf(e[0])
|
|
9075
9100
|
this.open&&this.filterMode!==Ym.none||this.setActiveOption(t)}this.typeaheadExpired=!1}}disabledChanged(e,t){super.disabledChanged&&super.disabledChanged(e,t),this.ariaDisabled=this.disabled?"true":"false"}formResetCallback(){this.setProxyOptions(),super.setDefaultSelectedOption(),-1===this.selectedIndex&&(this.selectedIndex=0)}selectNextOption(){for(let e=(this.openActiveIndex??this.selectedIndex)+1;e<this.options.length;e++){const t=this.options[e]
|
|
9076
|
-
if(
|
|
9101
|
+
if(sT(t)&&cT(t)){this.setActiveOption(e)
|
|
9077
9102
|
break}}}selectPreviousOption(){for(let e=(this.openActiveIndex??this.selectedIndex)-1;e>=0;e--){const t=this.options[e]
|
|
9078
|
-
if(
|
|
9079
|
-
break}}}selectFirstOption(){const e=this.options.findIndex((e=>
|
|
9103
|
+
if(sT(t)&&cT(t)){this.setActiveOption(e)
|
|
9104
|
+
break}}}selectFirstOption(){const e=this.options.findIndex((e=>sT(e)&&cT(e)))
|
|
9080
9105
|
this.setActiveOption(e)}selectLastOption(){const e=function(e,t){let n=e.length
|
|
9081
9106
|
for(;n--;)if(t(e[n],n,e))return n
|
|
9082
|
-
return-1}(this.options,(e=>
|
|
9107
|
+
return-1}(this.options,(e=>sT(e)&&cT(e)))
|
|
9083
9108
|
this.setActiveOption(e)}registerOption(e){this.options.includes(e)||this.options.push(e)}setSelectedOptions(){this.open&&-1===this.selectedIndex||super.setSelectedOptions()}focusAndScrollOptionIntoView(){this.open&&(super.focusAndScrollOptionIntoView(),window.requestAnimationFrame((()=>{this.filterInput?.focus()})))}getTypeaheadMatches(){return super.getTypeaheadMatches().filter((e=>!e.hidden&&!e.disabled))}positionChanged(e,t){this.positionAttribute=t,this.setPositioning()}sizeChanged(e,t){super.sizeChanged(e,t),this.proxy&&(this.proxy.size=t)}openChanged(){if(!this.collapsible)return
|
|
9084
9109
|
if(this.open)return void this.initializeOpenState()
|
|
9085
9110
|
const e=this.options[this.openActiveIndex??this.selectedIndex]
|
|
9086
|
-
|
|
9111
|
+
sT(e)&&(e.activeOption=!1),this.openActiveIndex=void 0,this.filter="",this.filterInput&&(this.filterInput.value=""),this.ariaControls="",this.ariaExpanded="false"}selectedOptionsChanged(e,t){this.options?.forEach(((e,n)=>{const i=m.getNotifier(e)
|
|
9087
9112
|
i.unsubscribe(this,"selected"),e.selected=t.includes(e),i.subscribe(this,"selected")
|
|
9088
9113
|
const o=this.proxy?.options.item(n)
|
|
9089
|
-
o&&(o.selected=e.selected)}))}setDefaultSelectedOption(){const e=this.options??Array.from(this.children).filter((e=>
|
|
9114
|
+
o&&(o.selected=e.selected)}))}setDefaultSelectedOption(){const e=this.options??Array.from(this.children).filter((e=>sT(e))),t=e=>e.hasAttribute("selected")||e.selected
|
|
9090
9115
|
let n=-1,i=-1,o=-1
|
|
9091
9116
|
for(let r=0;r<e?.length;r++){const a=e[r]
|
|
9092
9117
|
if(t(a)||a.value===this.value){n=r
|
|
9093
|
-
break}-1===o&&((s=a).disabled&&s.hidden)?o=r:-1===i&&
|
|
9118
|
+
break}-1===o&&((s=a).disabled&&s.hidden)?o=r:-1===i&&cT(a)&&(i=r)}var s
|
|
9094
9119
|
this.selectedIndex=-1!==n?n:-1!==o?o:-1!==i?i:0}getSlottedOptions(e){const t=[]
|
|
9095
|
-
return e?.forEach((e=>{
|
|
9096
|
-
if(this.open){
|
|
9120
|
+
return e?.forEach((e=>{sT(e)?t.push(e):rT(e)&&t.push(...this.getGroupOptions(e))})),t}setActiveOption(e){const t=this.options[e]
|
|
9121
|
+
if(this.open){sT(t)&&(t.activeOption=!0)
|
|
9097
9122
|
const n=this.openActiveIndex??this.selectedIndex,i=this.options[n]
|
|
9098
|
-
n!==e&&
|
|
9123
|
+
n!==e&&sT(i)&&(i.activeOption=!1),this.openActiveIndex=e,this.focusAndScrollActiveOptionIntoView()}else this.selectedIndex=e
|
|
9099
9124
|
this.ariaActiveDescendant=t?.id??""}focusAndScrollActiveOptionIntoView(){const e=this.options[this.openActiveIndex??this.selectedIndex]
|
|
9100
9125
|
void 0!==e&&this.contains(e)&&(e.focus(),requestAnimationFrame((()=>{e.scrollIntoView({block:"nearest"})})))}getPlaceholderOption(){return this.options.find((e=>e.hidden&&e.disabled))}setPositioning(){if(!this.$fastController.isConnected)return
|
|
9101
9126
|
const e=this.getBoundingClientRect(),t=window.innerHeight-e.bottom
|
|
9102
9127
|
this.forcedPosition?this.position=this.positionAttribute:e.top>t?this.position=Vn:this.position=Hn,this.positionAttribute=this.forcedPosition?this.positionAttribute:this.position,this.maxHeight=this.position===Vn?Math.trunc(e.top):Math.trunc(t),this.updateListboxMaxHeightCssVariable()}updateAdjacentSeparatorState(e){const t=this.getPreviousVisibleOptionOrGroup(e),n=this.getNextVisibleOptionOrGroup(e)
|
|
9103
|
-
if(
|
|
9128
|
+
if(dT(e)){const i=sT(t)
|
|
9104
9129
|
this.setTopSeparatorState(e,i)
|
|
9105
9130
|
const o=null!==n
|
|
9106
|
-
this.setBottomSeparatorState(e,o),this.setBottomSeparatorState(t,!0)}else{const e=
|
|
9131
|
+
this.setBottomSeparatorState(e,o),this.setBottomSeparatorState(t,!0)}else{const e=sT(t)
|
|
9107
9132
|
this.setTopSeparatorState(n,e)
|
|
9108
9133
|
const i=null!==n
|
|
9109
|
-
this.setBottomSeparatorState(t,i)}}setTopSeparatorState(e,t){
|
|
9110
|
-
for(;t;){if((
|
|
9134
|
+
this.setBottomSeparatorState(t,i)}}setTopSeparatorState(e,t){rT(e)&&(e.topSeparatorVisible=t)}setBottomSeparatorState(e,t){rT(e)&&(e.bottomSeparatorVisible=t)}getPreviousVisibleOptionOrGroup(e){let t=e.previousElementSibling
|
|
9135
|
+
for(;t;){if((sT(t)||rT(t))&&dT(t))return t
|
|
9111
9136
|
t=t.previousElementSibling}return null}getNextVisibleOptionOrGroup(e){let t=e.nextElementSibling
|
|
9112
|
-
for(;t;){if((
|
|
9137
|
+
for(;t;){if((sT(t)||rT(t))&&dT(t))return t
|
|
9113
9138
|
t=t.nextElementSibling}return null}isOptionHiddenOrFilteredOut(e){return!!e.hidden||!this.filterMatchesText(e.text)}filterMatchesText(e){const t=this.filter.toLowerCase(),n=D$(t)
|
|
9114
9139
|
return D$(e).includes(n)}filterOptions(){if(!this.$fastController.isConnected)return
|
|
9115
9140
|
const e=[]
|
|
9116
|
-
for(const t of this.slottedOptions)if(
|
|
9141
|
+
for(const t of this.slottedOptions)if(rT(t)){if(t.hidden)continue
|
|
9117
9142
|
const n=this.getGroupOptions(t),i=this.filterMatchesText(t.labelContent)
|
|
9118
|
-
n.forEach((t=>{t.visuallyHidden=!i&&this.isOptionHiddenOrFilteredOut(t),t.visuallyHidden||e.push(t)}))}else
|
|
9119
|
-
this.filteredOptions=e}getGroupOptions(e){return Array.from(e.children).filter((e=>
|
|
9143
|
+
n.forEach((t=>{t.visuallyHidden=!i&&this.isOptionHiddenOrFilteredOut(t),t.visuallyHidden||e.push(t)}))}else sT(t)&&(t.visuallyHidden=this.isOptionHiddenOrFilteredOut(t),t.visuallyHidden||e.push(t))
|
|
9144
|
+
this.filteredOptions=e}getGroupOptions(e){return Array.from(e.children).filter((e=>sT(e))).map((t=>(e.hidden&&sT(t)&&(t.visuallyHidden=!0),t)))}updateValue(e){this.$fastController.isConnected&&(this.value=this.firstSelectedOption?.value??""),e&&(this.$emit("input"),this.$emit("change",this,{bubbles:!0,composed:void 0}))}clearSelect(){const e=this.getPlaceholderOption()
|
|
9120
9145
|
this.selectedIndex=e?this.options.indexOf(e):-1}setProxyOptions(){this.proxy instanceof HTMLSelectElement&&this.options&&(this.proxy.options.length=0,this.options.forEach((e=>{const t=e.proxy||(e instanceof HTMLOptionElement?e.cloneNode():null)
|
|
9121
|
-
t&&this.proxy.options.add(t)})))}filterChanged(){this.filterOptions()}maxHeightChanged(){this.updateListboxMaxHeightCssVariable()}initializeOpenState(){this.setActiveOption(this.selectedIndex),this.ariaControls=this.listboxId,this.ariaExpanded="true",this.setPositioning(),this.focusAndScrollOptionIntoView()}updateListboxMaxHeightCssVariable(){this.listbox&&this.listbox.style.setProperty("--ni-private-select-max-height",`${this.maxHeight}px`)}}e([le],
|
|
9122
|
-
const
|
|
9146
|
+
t&&this.proxy.options.add(t)})))}filterChanged(){this.filterOptions()}maxHeightChanged(){this.updateListboxMaxHeightCssVariable()}initializeOpenState(){this.setActiveOption(this.selectedIndex),this.ariaControls=this.listboxId,this.ariaExpanded="true",this.setPositioning(),this.focusAndScrollOptionIntoView()}updateListboxMaxHeightCssVariable(){this.listbox&&this.listbox.style.setProperty("--ni-private-select-max-height",`${this.maxHeight}px`)}}e([le],hT.prototype,"appearance",void 0),e([le({attribute:"position"})],hT.prototype,"positionAttribute",void 0),e([le({attribute:"error-text"})],hT.prototype,"errorText",void 0),e([le({attribute:"error-visible",mode:"boolean"})],hT.prototype,"errorVisible",void 0),e([le({attribute:"filter-mode"})],hT.prototype,"filterMode",void 0),e([le({attribute:"clearable",mode:"boolean"})],hT.prototype,"clearable",void 0),e([g],hT.prototype,"displayPlaceholder",void 0),e([le({attribute:"open",mode:"boolean"})],hT.prototype,"open",void 0),e([g],hT.prototype,"position",void 0),e([g],hT.prototype,"control",void 0),e([g],hT.prototype,"scrollableRegion",void 0),e([g],hT.prototype,"filterInput",void 0),e([g],hT.prototype,"anchoredRegion",void 0),e([g],hT.prototype,"hasOverflow",void 0),e([g],hT.prototype,"filteredOptions",void 0),e([g],hT.prototype,"filter",void 0),e([g],hT.prototype,"maxHeight",void 0),e([v],hT.prototype,"collapsible",null),e([v],hT.prototype,"displayValue",null)
|
|
9147
|
+
const uT=hT.compose({baseName:"select",baseClass:Yi,template:(e,t)=>G`
|
|
9123
9148
|
<template
|
|
9124
9149
|
class="${e=>[e.collapsible&&"collapsible",e.collapsible&&e.open&&"open",e.disabled&&"disabled",e.collapsible&&e.position].filter(Boolean).join(" ")}"
|
|
9125
9150
|
aria-activedescendant="${e=>e.filterMode===Ym.none?e.ariaActiveDescendant:null}"
|
|
@@ -9214,7 +9239,7 @@ const CT=xT.compose({baseName:"select",baseClass:Yi,template:(e,t)=>G`
|
|
|
9214
9239
|
class="scrollable-region">
|
|
9215
9240
|
<slot
|
|
9216
9241
|
name="option"
|
|
9217
|
-
${Ye({filter:e=>e instanceof HTMLElement&&(
|
|
9242
|
+
${Ye({filter:e=>e instanceof HTMLElement&&(sT(e)||rT(e)),flatten:!0,property:"slottedOptions"})}
|
|
9218
9243
|
></slot>
|
|
9219
9244
|
</div>
|
|
9220
9245
|
${He((e=>e.filterMode!==Ym.none&&0===e.filteredOptions.length),G`
|
|
@@ -9226,15 +9251,15 @@ const CT=xT.compose({baseName:"select",baseClass:Yi,template:(e,t)=>G`
|
|
|
9226
9251
|
</div>
|
|
9227
9252
|
</${uh}>
|
|
9228
9253
|
</template>
|
|
9229
|
-
`,styles:
|
|
9254
|
+
`,styles:oT,indicator:$h.data,end:G`
|
|
9230
9255
|
<${em}
|
|
9231
9256
|
severity="error"
|
|
9232
9257
|
class="error-icon"
|
|
9233
9258
|
></${em}>
|
|
9234
9259
|
${qm}
|
|
9235
9260
|
`})
|
|
9236
|
-
qt(
|
|
9237
|
-
const
|
|
9261
|
+
qt(hT,et,Ji),yi.getOrCreate().withPrefix("nimble").register(uT())
|
|
9262
|
+
const pT=xe`
|
|
9238
9263
|
${Ro("inline-grid")}
|
|
9239
9264
|
|
|
9240
9265
|
:host {
|
|
@@ -9392,7 +9417,7 @@ const kT=xe`
|
|
|
9392
9417
|
:host([appearance='accent']) {
|
|
9393
9418
|
--ni-private-spinner-bits-background-color: ${gs};
|
|
9394
9419
|
}
|
|
9395
|
-
`)),
|
|
9420
|
+
`)),fT=G`
|
|
9396
9421
|
<template role="progressbar">
|
|
9397
9422
|
${""}
|
|
9398
9423
|
<div class="overlay"></div>
|
|
@@ -9402,11 +9427,11 @@ const kT=xe`
|
|
|
9402
9427
|
<div class="bit2"></div>
|
|
9403
9428
|
</div>
|
|
9404
9429
|
</template>
|
|
9405
|
-
|
|
9406
|
-
class
|
|
9407
|
-
const
|
|
9408
|
-
yi.getOrCreate().withPrefix("nimble").register(
|
|
9409
|
-
const
|
|
9430
|
+
`,mT={default:void 0,accent:"accent"}
|
|
9431
|
+
class gT extends Vt{constructor(){super(...arguments),this.appearance=mT.default}}e([le],gT.prototype,"appearance",void 0)
|
|
9432
|
+
const vT=gT.compose({baseName:"spinner",template:fT,styles:pT})
|
|
9433
|
+
yi.getOrCreate().withPrefix("nimble").register(vT())
|
|
9434
|
+
const bT="nimble-spinner",yT=xe`
|
|
9410
9435
|
${Ro("inline-flex")}
|
|
9411
9436
|
|
|
9412
9437
|
:host {
|
|
@@ -9565,7 +9590,7 @@ const ET="nimble-spinner",IT=xe`
|
|
|
9565
9590
|
--ni-private-switch-indicator-border-color: ${ss};
|
|
9566
9591
|
--ni-private-switch-indicator-border-disabled-color: ${Ms(ss,.3)};
|
|
9567
9592
|
}
|
|
9568
|
-
`)),
|
|
9593
|
+
`)),wT=G`
|
|
9569
9594
|
<template
|
|
9570
9595
|
role="switch"
|
|
9571
9596
|
aria-checked="${e=>e.checked}"
|
|
@@ -9600,9 +9625,9 @@ const ET="nimble-spinner",IT=xe`
|
|
|
9600
9625
|
</div>
|
|
9601
9626
|
</template>
|
|
9602
9627
|
`
|
|
9603
|
-
const
|
|
9604
|
-
yi.getOrCreate().withPrefix("nimble").register(
|
|
9605
|
-
const
|
|
9628
|
+
const xT=class extends to{}.compose({baseClass:to,baseName:"switch",template:wT,styles:yT})
|
|
9629
|
+
yi.getOrCreate().withPrefix("nimble").register(xT())
|
|
9630
|
+
const CT=xe`
|
|
9606
9631
|
${Ro("inline-flex")}
|
|
9607
9632
|
|
|
9608
9633
|
:host {
|
|
@@ -9702,13 +9727,13 @@ const TT=xe`
|
|
|
9702
9727
|
border-bottom-color: rgba(${Ua}, 0.3);
|
|
9703
9728
|
}
|
|
9704
9729
|
`
|
|
9705
|
-
const
|
|
9730
|
+
const kT=class extends io{}.compose({baseName:"tab",baseClass:io,template:(e,t)=>G`
|
|
9706
9731
|
<template slot="tab" role="tab" aria-disabled="${e=>e.disabled}">
|
|
9707
9732
|
<slot></slot>
|
|
9708
9733
|
</template>
|
|
9709
|
-
`,styles:
|
|
9710
|
-
yi.getOrCreate().withPrefix("nimble").register(
|
|
9711
|
-
const
|
|
9734
|
+
`,styles:CT})
|
|
9735
|
+
yi.getOrCreate().withPrefix("nimble").register(kT())
|
|
9736
|
+
const ST=xe`
|
|
9712
9737
|
${Ro("block")}
|
|
9713
9738
|
|
|
9714
9739
|
:host {
|
|
@@ -9717,11 +9742,11 @@ const RT=xe`
|
|
|
9717
9742
|
padding-top: ${sl};
|
|
9718
9743
|
}
|
|
9719
9744
|
`
|
|
9720
|
-
const
|
|
9745
|
+
const $T=class extends no{}.compose({baseName:"tab-panel",baseClass:no,template:(e,t)=>G`
|
|
9721
9746
|
<template slot="tabpanel" role="tabpanel">
|
|
9722
9747
|
<slot></slot>
|
|
9723
9748
|
</template>
|
|
9724
|
-
`,styles:
|
|
9749
|
+
`,styles:ST})
|
|
9725
9750
|
|
|
9726
9751
|
;/**
|
|
9727
9752
|
* table-core
|
|
@@ -9733,10 +9758,10 @@ const FT=class extends no{}.compose({baseName:"tab-panel",baseClass:no,template:
|
|
|
9733
9758
|
*
|
|
9734
9759
|
* @license MIT
|
|
9735
9760
|
*/
|
|
9736
|
-
function
|
|
9761
|
+
function MT(e,t){return"function"==typeof e?e(t):e}function _T(e,t){return n=>{t.setState((t=>({...t,[e]:MT(n,t[e])})))}}function ET(e){return e instanceof Function}function IT(e,t){const n=[],i=e=>{e.forEach((e=>{n.push(e)
|
|
9737
9762
|
const o=t(e)
|
|
9738
9763
|
null!=o&&o.length&&i(o)}))}
|
|
9739
|
-
return i(e),n}function
|
|
9764
|
+
return i(e),n}function DT(e,t,n){let i,o=[]
|
|
9740
9765
|
return s=>{let r
|
|
9741
9766
|
n.key&&n.debug&&(r=Date.now())
|
|
9742
9767
|
const a=e(s)
|
|
@@ -9744,22 +9769,22 @@ if(!(a.length!==o.length||a.some(((e,t)=>o[t]!==e))))return i
|
|
|
9744
9769
|
let l
|
|
9745
9770
|
if(o=a,n.key&&n.debug&&(l=Date.now()),i=t(...a),null==n||null==n.onChange||n.onChange(i),n.key&&n.debug&&null!=n&&n.debug()){const e=Math.round(100*(Date.now()-r))/100,t=Math.round(100*(Date.now()-l))/100,i=t/16,o=(e,t)=>{for(e=String(e);e.length<t;)e=" "+e
|
|
9746
9771
|
return e}
|
|
9747
|
-
console.info(`%c⏱ ${o(t,5)} /${o(e,5)} ms`,`\n font-size: .6rem;\n font-weight: bold;\n color: hsl(${Math.max(0,Math.min(120-120*i,120))}deg 100% 31%);`,null==n?void 0:n.key)}return i}}function
|
|
9748
|
-
return null!=(n=null==e?void 0:e.debugAll)?n:e[t]},key:!1,onChange:i}}yi.getOrCreate().withPrefix("nimble").register(
|
|
9749
|
-
const
|
|
9750
|
-
function
|
|
9772
|
+
console.info(`%c⏱ ${o(t,5)} /${o(e,5)} ms`,`\n font-size: .6rem;\n font-weight: bold;\n color: hsl(${Math.max(0,Math.min(120-120*i,120))}deg 100% 31%);`,null==n?void 0:n.key)}return i}}function AT(e,t,n,i){return{debug:()=>{var n
|
|
9773
|
+
return null!=(n=null==e?void 0:e.debugAll)?n:e[t]},key:!1,onChange:i}}yi.getOrCreate().withPrefix("nimble").register($T())
|
|
9774
|
+
const TT="debugHeaders"
|
|
9775
|
+
function OT(e,t,n){var i
|
|
9751
9776
|
let o={id:null!=(i=n.id)?i:t.id,column:t,index:n.index,isPlaceholder:!!n.isPlaceholder,placeholderId:n.placeholderId,depth:n.depth,subHeaders:[],colSpan:0,rowSpan:0,headerGroup:null,getLeafHeaders:()=>{const e=[],t=n=>{n.subHeaders&&n.subHeaders.length&&n.subHeaders.map(t),e.push(n)}
|
|
9752
9777
|
return t(o),e},getContext:()=>({table:e,header:o,column:t})}
|
|
9753
|
-
return e._features.forEach((t=>{null==t.createHeader||t.createHeader(o,e)})),o}const
|
|
9778
|
+
return e._features.forEach((t=>{null==t.createHeader||t.createHeader(o,e)})),o}const RT={createTable:e=>{e.getHeaderGroups=DT((()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right]),((t,n,i,o)=>{var s,r
|
|
9754
9779
|
const a=null!=(s=null==i?void 0:i.map((e=>n.find((t=>t.id===e)))).filter(Boolean))?s:[],l=null!=(r=null==o?void 0:o.map((e=>n.find((t=>t.id===e)))).filter(Boolean))?r:[]
|
|
9755
|
-
return
|
|
9756
|
-
return
|
|
9757
|
-
return
|
|
9758
|
-
return!(null!=(t=e.subHeaders)&&t.length)}))),
|
|
9759
|
-
return!(null!=(t=e.subHeaders)&&t.length)}))),
|
|
9760
|
-
return!(null!=(t=e.subHeaders)&&t.length)}))),
|
|
9761
|
-
return[...null!=(i=null==(o=e[0])?void 0:o.headers)?i:[],...null!=(s=null==(r=t[0])?void 0:r.headers)?s:[],...null!=(a=null==(l=n[0])?void 0:l.headers)?a:[]].map((e=>e.getLeafHeaders())).flat()}),
|
|
9762
|
-
function
|
|
9780
|
+
return FT(t,[...a,...n.filter((e=>!(null!=i&&i.includes(e.id)||null!=o&&o.includes(e.id)))),...l],e)}),AT(e.options,TT)),e.getCenterHeaderGroups=DT((()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right]),((t,n,i,o)=>FT(t,n=n.filter((e=>!(null!=i&&i.includes(e.id)||null!=o&&o.includes(e.id)))),e,"center")),AT(e.options,TT)),e.getLeftHeaderGroups=DT((()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left]),((t,n,i)=>{var o
|
|
9781
|
+
return FT(t,null!=(o=null==i?void 0:i.map((e=>n.find((t=>t.id===e)))).filter(Boolean))?o:[],e,"left")}),AT(e.options,TT)),e.getRightHeaderGroups=DT((()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.right]),((t,n,i)=>{var o
|
|
9782
|
+
return FT(t,null!=(o=null==i?void 0:i.map((e=>n.find((t=>t.id===e)))).filter(Boolean))?o:[],e,"right")}),AT(e.options,TT)),e.getFooterGroups=DT((()=>[e.getHeaderGroups()]),(e=>[...e].reverse()),AT(e.options,TT)),e.getLeftFooterGroups=DT((()=>[e.getLeftHeaderGroups()]),(e=>[...e].reverse()),AT(e.options,TT)),e.getCenterFooterGroups=DT((()=>[e.getCenterHeaderGroups()]),(e=>[...e].reverse()),AT(e.options,TT)),e.getRightFooterGroups=DT((()=>[e.getRightHeaderGroups()]),(e=>[...e].reverse()),AT(e.options,TT)),e.getFlatHeaders=DT((()=>[e.getHeaderGroups()]),(e=>e.map((e=>e.headers)).flat()),AT(e.options,TT)),e.getLeftFlatHeaders=DT((()=>[e.getLeftHeaderGroups()]),(e=>e.map((e=>e.headers)).flat()),AT(e.options,TT)),e.getCenterFlatHeaders=DT((()=>[e.getCenterHeaderGroups()]),(e=>e.map((e=>e.headers)).flat()),AT(e.options,TT)),e.getRightFlatHeaders=DT((()=>[e.getRightHeaderGroups()]),(e=>e.map((e=>e.headers)).flat()),AT(e.options,TT)),e.getCenterLeafHeaders=DT((()=>[e.getCenterFlatHeaders()]),(e=>e.filter((e=>{var t
|
|
9783
|
+
return!(null!=(t=e.subHeaders)&&t.length)}))),AT(e.options,TT)),e.getLeftLeafHeaders=DT((()=>[e.getLeftFlatHeaders()]),(e=>e.filter((e=>{var t
|
|
9784
|
+
return!(null!=(t=e.subHeaders)&&t.length)}))),AT(e.options,TT)),e.getRightLeafHeaders=DT((()=>[e.getRightFlatHeaders()]),(e=>e.filter((e=>{var t
|
|
9785
|
+
return!(null!=(t=e.subHeaders)&&t.length)}))),AT(e.options,TT)),e.getLeafHeaders=DT((()=>[e.getLeftHeaderGroups(),e.getCenterHeaderGroups(),e.getRightHeaderGroups()]),((e,t,n)=>{var i,o,s,r,a,l
|
|
9786
|
+
return[...null!=(i=null==(o=e[0])?void 0:o.headers)?i:[],...null!=(s=null==(r=t[0])?void 0:r.headers)?s:[],...null!=(a=null==(l=n[0])?void 0:l.headers)?a:[]].map((e=>e.getLeafHeaders())).flat()}),AT(e.options,TT))}}
|
|
9787
|
+
function FT(e,t,n,i){var o,s
|
|
9763
9788
|
let r=0
|
|
9764
9789
|
const a=function(e,t){void 0===t&&(t=1),r=Math.max(r,t),e.filter((e=>e.getIsVisible())).forEach((e=>{var n
|
|
9765
9790
|
null!=(n=e.columns)&&n.length&&a(e.columns,t+1)}),0)}
|
|
@@ -9769,71 +9794,71 @@ const c=(e,t)=>{const o={depth:t,id:[i,`${t}`].filter(Boolean).join("_"),headers
|
|
|
9769
9794
|
e.forEach((e=>{const r=[...s].reverse()[0]
|
|
9770
9795
|
let a,l=!1
|
|
9771
9796
|
if(e.column.depth===o.depth&&e.column.parent?a=e.column.parent:(a=e.column,l=!0),r&&(null==r?void 0:r.column)===a)r.subHeaders.push(e)
|
|
9772
|
-
else{const o=
|
|
9773
|
-
o.subHeaders.push(e),s.push(o)}o.headers.push(e),e.headerGroup=o})),l.push(o),t>0&&c(s,t-1)},d=t.map(((e,t)=>
|
|
9797
|
+
else{const o=OT(n,a,{id:[i,t,a.id,null==e?void 0:e.id].filter(Boolean).join("_"),isPlaceholder:l,placeholderId:l?`${s.filter((e=>e.column===a)).length}`:void 0,depth:t,index:s.length})
|
|
9798
|
+
o.subHeaders.push(e),s.push(o)}o.headers.push(e),e.headerGroup=o})),l.push(o),t>0&&c(s,t-1)},d=t.map(((e,t)=>OT(n,e,{depth:r,index:t})))
|
|
9774
9799
|
c(d,r-1),l.reverse()
|
|
9775
9800
|
const h=e=>e.filter((e=>e.column.getIsVisible())).map((e=>{let t=0,n=0,i=[0]
|
|
9776
9801
|
e.subHeaders&&e.subHeaders.length?(i=[],h(e.subHeaders).forEach((e=>{let{colSpan:n,rowSpan:o}=e
|
|
9777
9802
|
t+=n,i.push(o)}))):t=1
|
|
9778
9803
|
return n+=Math.min(...i),e.colSpan=t,e.rowSpan=n,{colSpan:t,rowSpan:n}}))
|
|
9779
|
-
return h(null!=(o=null==(s=l[0])?void 0:s.headers)?o:[]),l}const
|
|
9804
|
+
return h(null!=(o=null==(s=l[0])?void 0:s.headers)?o:[]),l}const NT=(e,t,n,i,o,s,r)=>{let a={id:t,index:i,original:n,depth:o,parentId:r,_valuesCache:{},_uniqueValuesCache:{},getValue:t=>{if(a._valuesCache.hasOwnProperty(t))return a._valuesCache[t]
|
|
9780
9805
|
const n=e.getColumn(t)
|
|
9781
9806
|
return null!=n&&n.accessorFn?(a._valuesCache[t]=n.accessorFn(a.original,i),a._valuesCache[t]):void 0},getUniqueValues:t=>{if(a._uniqueValuesCache.hasOwnProperty(t))return a._uniqueValuesCache[t]
|
|
9782
9807
|
const n=e.getColumn(t)
|
|
9783
9808
|
return null!=n&&n.accessorFn?n.columnDef.getUniqueValues?(a._uniqueValuesCache[t]=n.columnDef.getUniqueValues(a.original,i),a._uniqueValuesCache[t]):(a._uniqueValuesCache[t]=[a.getValue(t)],a._uniqueValuesCache[t]):void 0},renderValue:t=>{var n
|
|
9784
|
-
return null!=(n=a.getValue(t))?n:e.options.renderFallbackValue},subRows:[],getLeafRows:()=>
|
|
9809
|
+
return null!=(n=a.getValue(t))?n:e.options.renderFallbackValue},subRows:[],getLeafRows:()=>IT(a.subRows,(e=>e.subRows)),getParentRow:()=>a.parentId?e.getRow(a.parentId,!0):void 0,getParentRows:()=>{let e=[],t=a
|
|
9785
9810
|
for(;;){const n=t.getParentRow()
|
|
9786
9811
|
if(!n)break
|
|
9787
|
-
e.push(n),t=n}return e.reverse()},getAllCells:
|
|
9788
|
-
return null!=(t=o.getValue())?t:e.options.renderFallbackValue},getContext:
|
|
9789
|
-
return e._features.forEach((i=>{null==i.createCell||i.createCell(o,n,t,e)}),{}),o}(e,a,t,t.id)))),
|
|
9812
|
+
e.push(n),t=n}return e.reverse()},getAllCells:DT((()=>[e.getAllLeafColumns()]),(t=>t.map((t=>function(e,t,n,i){const o={id:`${t.id}_${n.id}`,row:t,column:n,getValue:()=>t.getValue(i),renderValue:()=>{var t
|
|
9813
|
+
return null!=(t=o.getValue())?t:e.options.renderFallbackValue},getContext:DT((()=>[e,n,t,o]),((e,t,n,i)=>({table:e,column:t,row:n,cell:i,getValue:i.getValue,renderValue:i.renderValue})),AT(e.options,"debugCells"))}
|
|
9814
|
+
return e._features.forEach((i=>{null==i.createCell||i.createCell(o,n,t,e)}),{}),o}(e,a,t,t.id)))),AT(e.options,"debugRows")),_getAllCellsByColumnId:DT((()=>[a.getAllCells()]),(e=>e.reduce(((e,t)=>(e[t.column.id]=t,e)),{})),AT(e.options,"debugRows"))}
|
|
9790
9815
|
for(let t=0;t<e._features.length;t++){const n=e._features[t]
|
|
9791
|
-
null==n||null==n.createRow||n.createRow(a,e)}return a},
|
|
9816
|
+
null==n||null==n.createRow||n.createRow(a,e)}return a},PT={createColumn:(e,t)=>{e._getFacetedRowModel=t.options.getFacetedRowModel&&t.options.getFacetedRowModel(t,e.id),e.getFacetedRowModel=()=>e._getFacetedRowModel?e._getFacetedRowModel():t.getPreFilteredRowModel(),e._getFacetedUniqueValues=t.options.getFacetedUniqueValues&&t.options.getFacetedUniqueValues(t,e.id),e.getFacetedUniqueValues=()=>e._getFacetedUniqueValues?e._getFacetedUniqueValues():new Map,e._getFacetedMinMaxValues=t.options.getFacetedMinMaxValues&&t.options.getFacetedMinMaxValues(t,e.id),e.getFacetedMinMaxValues=()=>{if(e._getFacetedMinMaxValues)return e._getFacetedMinMaxValues()}}},LT=(e,t,n)=>{var i
|
|
9792
9817
|
const o=n.toLowerCase()
|
|
9793
9818
|
return Boolean(null==(i=e.getValue(t))||null==(i=i.toString())||null==(i=i.toLowerCase())?void 0:i.includes(o))}
|
|
9794
|
-
|
|
9795
|
-
const
|
|
9819
|
+
LT.autoRemove=e=>ZT(e)
|
|
9820
|
+
const zT=(e,t,n)=>{var i
|
|
9796
9821
|
return Boolean(null==(i=e.getValue(t))||null==(i=i.toString())?void 0:i.includes(n))}
|
|
9797
|
-
|
|
9798
|
-
const
|
|
9822
|
+
zT.autoRemove=e=>ZT(e)
|
|
9823
|
+
const VT=(e,t,n)=>{var i
|
|
9799
9824
|
return(null==(i=e.getValue(t))||null==(i=i.toString())?void 0:i.toLowerCase())===(null==n?void 0:n.toLowerCase())}
|
|
9800
|
-
|
|
9801
|
-
const
|
|
9825
|
+
VT.autoRemove=e=>ZT(e)
|
|
9826
|
+
const HT=(e,t,n)=>{var i
|
|
9802
9827
|
return null==(i=e.getValue(t))?void 0:i.includes(n)}
|
|
9803
|
-
|
|
9804
|
-
const
|
|
9828
|
+
HT.autoRemove=e=>ZT(e)||!(null!=e&&e.length)
|
|
9829
|
+
const BT=(e,t,n)=>!n.some((n=>{var i
|
|
9805
9830
|
return!(null!=(i=e.getValue(t))&&i.includes(n))}))
|
|
9806
|
-
|
|
9807
|
-
const
|
|
9831
|
+
BT.autoRemove=e=>ZT(e)||!(null!=e&&e.length)
|
|
9832
|
+
const qT=(e,t,n)=>n.some((n=>{var i
|
|
9808
9833
|
return null==(i=e.getValue(t))?void 0:i.includes(n)}))
|
|
9809
|
-
|
|
9810
|
-
const
|
|
9811
|
-
|
|
9812
|
-
const
|
|
9813
|
-
|
|
9814
|
-
const
|
|
9834
|
+
qT.autoRemove=e=>ZT(e)||!(null!=e&&e.length)
|
|
9835
|
+
const UT=(e,t,n)=>e.getValue(t)===n
|
|
9836
|
+
UT.autoRemove=e=>ZT(e)
|
|
9837
|
+
const jT=(e,t,n)=>e.getValue(t)==n
|
|
9838
|
+
jT.autoRemove=e=>ZT(e)
|
|
9839
|
+
const WT=(e,t,n)=>{let[i,o]=n
|
|
9815
9840
|
const s=e.getValue(t)
|
|
9816
9841
|
return s>=i&&s<=o}
|
|
9817
|
-
|
|
9842
|
+
WT.resolveFilterValue=e=>{let[t,n]=e,i="number"!=typeof t?parseFloat(t):t,o="number"!=typeof n?parseFloat(n):n,s=null===t||Number.isNaN(i)?-1/0:i,r=null===n||Number.isNaN(o)?1/0:o
|
|
9818
9843
|
if(s>r){const e=s
|
|
9819
|
-
s=r,r=e}return[s,r]},
|
|
9820
|
-
const
|
|
9821
|
-
function
|
|
9822
|
-
return"string"==typeof i?
|
|
9823
|
-
return
|
|
9844
|
+
s=r,r=e}return[s,r]},WT.autoRemove=e=>ZT(e)||ZT(e[0])&&ZT(e[1])
|
|
9845
|
+
const GT={includesString:LT,includesStringSensitive:zT,equalsString:VT,arrIncludes:HT,arrIncludesAll:BT,arrIncludesSome:qT,equals:UT,weakEquals:jT,inNumberRange:WT}
|
|
9846
|
+
function ZT(e){return null==e||""===e}const KT={getDefaultColumnDef:()=>({filterFn:"auto"}),getInitialState:e=>({columnFilters:[],...e}),getDefaultOptions:e=>({onColumnFiltersChange:_T("columnFilters",e),filterFromLeafRows:!1,maxLeafRowFilterDepth:100}),createColumn:(e,t)=>{e.getAutoFilterFn=()=>{const n=t.getCoreRowModel().flatRows[0],i=null==n?void 0:n.getValue(e.id)
|
|
9847
|
+
return"string"==typeof i?GT.includesString:"number"==typeof i?GT.inNumberRange:"boolean"==typeof i||null!==i&&"object"==typeof i?GT.equals:Array.isArray(i)?GT.arrIncludes:GT.weakEquals},e.getFilterFn=()=>{var n,i
|
|
9848
|
+
return ET(e.columnDef.filterFn)?e.columnDef.filterFn:"auto"===e.columnDef.filterFn?e.getAutoFilterFn():null!=(n=null==(i=t.options.filterFns)?void 0:i[e.columnDef.filterFn])?n:GT[e.columnDef.filterFn]},e.getCanFilter=()=>{var n,i,o
|
|
9824
9849
|
return(null==(n=e.columnDef.enableColumnFilter)||n)&&(null==(i=t.options.enableColumnFilters)||i)&&(null==(o=t.options.enableFilters)||o)&&!!e.accessorFn},e.getIsFiltered=()=>e.getFilterIndex()>-1,e.getFilterValue=()=>{var n
|
|
9825
9850
|
return null==(n=t.getState().columnFilters)||null==(n=n.find((t=>t.id===e.id)))?void 0:n.value},e.getFilterIndex=()=>{var n,i
|
|
9826
|
-
return null!=(n=null==(i=t.getState().columnFilters)?void 0:i.findIndex((t=>t.id===e.id)))?n:-1},e.setFilterValue=n=>{t.setColumnFilters((t=>{const i=e.getFilterFn(),o=null==t?void 0:t.find((t=>t.id===e.id)),s=
|
|
9851
|
+
return null!=(n=null==(i=t.getState().columnFilters)?void 0:i.findIndex((t=>t.id===e.id)))?n:-1},e.setFilterValue=n=>{t.setColumnFilters((t=>{const i=e.getFilterFn(),o=null==t?void 0:t.find((t=>t.id===e.id)),s=MT(n,o?o.value:void 0)
|
|
9827
9852
|
var r
|
|
9828
|
-
if(
|
|
9853
|
+
if(XT(i,s,e))return null!=(r=null==t?void 0:t.filter((t=>t.id!==e.id)))?r:[]
|
|
9829
9854
|
const a={id:e.id,value:s}
|
|
9830
9855
|
var l
|
|
9831
9856
|
return o?null!=(l=null==t?void 0:t.map((t=>t.id===e.id?a:t)))?l:[]:null!=t&&t.length?[...t,a]:[a]}))}},createRow:(e,t)=>{e.columnFilters={},e.columnFiltersMeta={}},createTable:e=>{e.setColumnFilters=t=>{const n=e.getAllLeafColumns()
|
|
9832
9857
|
null==e.options.onColumnFiltersChange||e.options.onColumnFiltersChange((e=>{var i
|
|
9833
|
-
return null==(i=
|
|
9834
|
-
if(t){if(
|
|
9858
|
+
return null==(i=MT(t,e))?void 0:i.filter((e=>{const t=n.find((t=>t.id===e.id))
|
|
9859
|
+
if(t){if(XT(t.getFilterFn(),e.value,t))return!1}return!0}))}))},e.resetColumnFilters=t=>{var n,i
|
|
9835
9860
|
e.setColumnFilters(t?[]:null!=(n=null==(i=e.initialState)?void 0:i.columnFilters)?n:[])},e.getPreFilteredRowModel=()=>e.getCoreRowModel(),e.getFilteredRowModel=()=>(!e._getFilteredRowModel&&e.options.getFilteredRowModel&&(e._getFilteredRowModel=e.options.getFilteredRowModel(e)),e.options.manualFiltering||!e._getFilteredRowModel?e.getPreFilteredRowModel():e._getFilteredRowModel())}}
|
|
9836
|
-
function
|
|
9861
|
+
function XT(e,t,n){return!(!e||!e.autoRemove)&&e.autoRemove(t,n)||void 0===t||"string"==typeof t&&!t}const YT={sum:(e,t,n)=>n.reduce(((t,n)=>{const i=n.getValue(e)
|
|
9837
9862
|
return t+("number"==typeof i?i:0)}),0),min:(e,t,n)=>{let i
|
|
9838
9863
|
return n.forEach((t=>{const n=t.getValue(e)
|
|
9839
9864
|
null!=n&&(i>n||void 0===i&&n>=n)&&(i=n)})),i},max:(e,t,n)=>{let i
|
|
@@ -9848,44 +9873,44 @@ if(i=n,!Array.isArray(i)||!i.every((e=>"number"==typeof e)))return
|
|
|
9848
9873
|
var i
|
|
9849
9874
|
if(1===n.length)return n[0]
|
|
9850
9875
|
const o=Math.floor(n.length/2),s=n.sort(((e,t)=>e-t))
|
|
9851
|
-
return n.length%2!=0?s[o]:(s[o-1]+s[o])/2},unique:(e,t)=>Array.from(new Set(t.map((t=>t.getValue(e)))).values()),uniqueCount:(e,t)=>new Set(t.map((t=>t.getValue(e)))).size,count:(e,t)=>t.length},
|
|
9852
|
-
return null!=(t=null==(n=e.getValue())||null==n.toString?void 0:n.toString())?t:null},aggregationFn:"auto"}),getInitialState:e=>({grouping:[],...e}),getDefaultOptions:e=>({onGroupingChange:
|
|
9876
|
+
return n.length%2!=0?s[o]:(s[o-1]+s[o])/2},unique:(e,t)=>Array.from(new Set(t.map((t=>t.getValue(e)))).values()),uniqueCount:(e,t)=>new Set(t.map((t=>t.getValue(e)))).size,count:(e,t)=>t.length},JT={getDefaultColumnDef:()=>({aggregatedCell:e=>{var t,n
|
|
9877
|
+
return null!=(t=null==(n=e.getValue())||null==n.toString?void 0:n.toString())?t:null},aggregationFn:"auto"}),getInitialState:e=>({grouping:[],...e}),getDefaultOptions:e=>({onGroupingChange:_T("grouping",e),groupedColumnMode:"reorder"}),createColumn:(e,t)=>{e.toggleGrouping=()=>{t.setGrouping((t=>null!=t&&t.includes(e.id)?t.filter((t=>t!==e.id)):[...null!=t?t:[],e.id]))},e.getCanGroup=()=>{var n,i
|
|
9853
9878
|
return(null==(n=e.columnDef.enableGrouping)||n)&&(null==(i=t.options.enableGrouping)||i)&&(!!e.accessorFn||!!e.columnDef.getGroupingValue)},e.getIsGrouped=()=>{var n
|
|
9854
9879
|
return null==(n=t.getState().grouping)?void 0:n.includes(e.id)},e.getGroupedIndex=()=>{var n
|
|
9855
9880
|
return null==(n=t.getState().grouping)?void 0:n.indexOf(e.id)},e.getToggleGroupingHandler=()=>{const t=e.getCanGroup()
|
|
9856
9881
|
return()=>{t&&e.toggleGrouping()}},e.getAutoAggregationFn=()=>{const n=t.getCoreRowModel().flatRows[0],i=null==n?void 0:n.getValue(e.id)
|
|
9857
|
-
return"number"==typeof i?
|
|
9882
|
+
return"number"==typeof i?YT.sum:"[object Date]"===Object.prototype.toString.call(i)?YT.extent:void 0},e.getAggregationFn=()=>{var n,i
|
|
9858
9883
|
if(!e)throw new Error
|
|
9859
|
-
return
|
|
9884
|
+
return ET(e.columnDef.aggregationFn)?e.columnDef.aggregationFn:"auto"===e.columnDef.aggregationFn?e.getAutoAggregationFn():null!=(n=null==(i=t.options.aggregationFns)?void 0:i[e.columnDef.aggregationFn])?n:YT[e.columnDef.aggregationFn]}},createTable:e=>{e.setGrouping=t=>null==e.options.onGroupingChange?void 0:e.options.onGroupingChange(t),e.resetGrouping=t=>{var n,i
|
|
9860
9885
|
e.setGrouping(t?[]:null!=(n=null==(i=e.initialState)?void 0:i.grouping)?n:[])},e.getPreGroupedRowModel=()=>e.getFilteredRowModel(),e.getGroupedRowModel=()=>(!e._getGroupedRowModel&&e.options.getGroupedRowModel&&(e._getGroupedRowModel=e.options.getGroupedRowModel(e)),e.options.manualGrouping||!e._getGroupedRowModel?e.getPreGroupedRowModel():e._getGroupedRowModel())},createRow:(e,t)=>{e.getIsGrouped=()=>!!e.groupingColumnId,e.getGroupingValue=n=>{if(e._groupingValuesCache.hasOwnProperty(n))return e._groupingValuesCache[n]
|
|
9861
9886
|
const i=t.getColumn(n)
|
|
9862
9887
|
return null!=i&&i.columnDef.getGroupingValue?(e._groupingValuesCache[n]=i.columnDef.getGroupingValue(e.original),e._groupingValuesCache[n]):e.getValue(n)},e._groupingValuesCache={}},createCell:(e,t,n,i)=>{e.getIsGrouped=()=>t.getIsGrouped()&&t.id===n.groupingColumnId,e.getIsPlaceholder=()=>!e.getIsGrouped()&&t.getIsGrouped(),e.getIsAggregated=()=>{var t
|
|
9863
9888
|
return!e.getIsGrouped()&&!e.getIsPlaceholder()&&!(null==(t=n.subRows)||!t.length)}}}
|
|
9864
|
-
const
|
|
9865
|
-
return(null==(i=
|
|
9866
|
-
const o=
|
|
9889
|
+
const QT={getInitialState:e=>({columnOrder:[],...e}),getDefaultOptions:e=>({onColumnOrderChange:_T("columnOrder",e)}),createColumn:(e,t)=>{e.getIndex=DT((e=>[rO(t,e)]),(t=>t.findIndex((t=>t.id===e.id))),AT(t.options,"debugColumns")),e.getIsFirstColumn=n=>{var i
|
|
9890
|
+
return(null==(i=rO(t,n)[0])?void 0:i.id)===e.id},e.getIsLastColumn=n=>{var i
|
|
9891
|
+
const o=rO(t,n)
|
|
9867
9892
|
return(null==(i=o[o.length-1])?void 0:i.id)===e.id}},createTable:e=>{e.setColumnOrder=t=>null==e.options.onColumnOrderChange?void 0:e.options.onColumnOrderChange(t),e.resetColumnOrder=t=>{var n
|
|
9868
|
-
e.setColumnOrder(t?[]:null!=(n=e.initialState.columnOrder)?n:[])},e._getOrderColumnsFn=
|
|
9893
|
+
e.setColumnOrder(t?[]:null!=(n=e.initialState.columnOrder)?n:[])},e._getOrderColumnsFn=DT((()=>[e.getState().columnOrder,e.getState().grouping,e.options.groupedColumnMode]),((e,t,n)=>i=>{let o=[]
|
|
9869
9894
|
if(null!=e&&e.length){const t=[...e],n=[...i]
|
|
9870
9895
|
for(;n.length&&t.length;){const e=t.shift(),i=n.findIndex((t=>t.id===e))
|
|
9871
9896
|
i>-1&&o.push(n.splice(i,1)[0])}o=[...o,...n]}else o=i
|
|
9872
9897
|
return function(e,t,n){if(null==t||!t.length||!n)return e
|
|
9873
9898
|
const i=e.filter((e=>!t.includes(e.id)))
|
|
9874
|
-
return"remove"===n?i:[...t.map((t=>e.find((e=>e.id===t)))).filter(Boolean),...i]}(o,t,n)}),
|
|
9899
|
+
return"remove"===n?i:[...t.map((t=>e.find((e=>e.id===t)))).filter(Boolean),...i]}(o,t,n)}),AT(e.options,"debugTable"))}},eO={getInitialState:e=>({columnPinning:{left:[],right:[]},...e}),getDefaultOptions:e=>({onColumnPinningChange:_T("columnPinning",e)}),createColumn:(e,t)=>{e.pin=n=>{const i=e.getLeafColumns().map((e=>e.id)).filter(Boolean)
|
|
9875
9900
|
t.setColumnPinning((e=>{var t,o,s,r,a,l
|
|
9876
9901
|
return"right"===n?{left:(null!=(s=null==e?void 0:e.left)?s:[]).filter((e=>!(null!=i&&i.includes(e)))),right:[...(null!=(r=null==e?void 0:e.right)?r:[]).filter((e=>!(null!=i&&i.includes(e)))),...i]}:"left"===n?{left:[...(null!=(a=null==e?void 0:e.left)?a:[]).filter((e=>!(null!=i&&i.includes(e)))),...i],right:(null!=(l=null==e?void 0:e.right)?l:[]).filter((e=>!(null!=i&&i.includes(e))))}:{left:(null!=(t=null==e?void 0:e.left)?t:[]).filter((e=>!(null!=i&&i.includes(e)))),right:(null!=(o=null==e?void 0:e.right)?o:[]).filter((e=>!(null!=i&&i.includes(e))))}}))},e.getCanPin=()=>e.getLeafColumns().some((e=>{var n,i,o
|
|
9877
9902
|
return(null==(n=e.columnDef.enablePinning)||n)&&(null==(i=null!=(o=t.options.enableColumnPinning)?o:t.options.enablePinning)||i)})),e.getIsPinned=()=>{const n=e.getLeafColumns().map((e=>e.id)),{left:i,right:o}=t.getState().columnPinning,s=n.some((e=>null==i?void 0:i.includes(e))),r=n.some((e=>null==o?void 0:o.includes(e)))
|
|
9878
9903
|
return s?"left":!!r&&"right"},e.getPinnedIndex=()=>{var n,i
|
|
9879
9904
|
const o=e.getIsPinned()
|
|
9880
|
-
return o?null!=(n=null==(i=t.getState().columnPinning)||null==(i=i[o])?void 0:i.indexOf(e.id))?n:-1:0}},createRow:(e,t)=>{e.getCenterVisibleCells=
|
|
9881
|
-
return e.filter((e=>!i.includes(e.column.id)))}),
|
|
9905
|
+
return o?null!=(n=null==(i=t.getState().columnPinning)||null==(i=i[o])?void 0:i.indexOf(e.id))?n:-1:0}},createRow:(e,t)=>{e.getCenterVisibleCells=DT((()=>[e._getAllVisibleCells(),t.getState().columnPinning.left,t.getState().columnPinning.right]),((e,t,n)=>{const i=[...null!=t?t:[],...null!=n?n:[]]
|
|
9906
|
+
return e.filter((e=>!i.includes(e.column.id)))}),AT(t.options,"debugRows")),e.getLeftVisibleCells=DT((()=>[e._getAllVisibleCells(),t.getState().columnPinning.left]),((e,t)=>(null!=t?t:[]).map((t=>e.find((e=>e.column.id===t)))).filter(Boolean).map((e=>({...e,position:"left"})))),AT(t.options,"debugRows")),e.getRightVisibleCells=DT((()=>[e._getAllVisibleCells(),t.getState().columnPinning.right]),((e,t)=>(null!=t?t:[]).map((t=>e.find((e=>e.column.id===t)))).filter(Boolean).map((e=>({...e,position:"right"})))),AT(t.options,"debugRows"))},createTable:e=>{e.setColumnPinning=t=>null==e.options.onColumnPinningChange?void 0:e.options.onColumnPinningChange(t),e.resetColumnPinning=t=>{var n,i
|
|
9882
9907
|
return e.setColumnPinning(t?{left:[],right:[]}:null!=(n=null==(i=e.initialState)?void 0:i.columnPinning)?n:{left:[],right:[]})},e.getIsSomeColumnsPinned=t=>{var n
|
|
9883
9908
|
const i=e.getState().columnPinning
|
|
9884
9909
|
var o,s
|
|
9885
|
-
return t?Boolean(null==(n=i[t])?void 0:n.length):Boolean((null==(o=i.left)?void 0:o.length)||(null==(s=i.right)?void 0:s.length))},e.getLeftLeafColumns=
|
|
9886
|
-
return e.filter((e=>!i.includes(e.id)))}),
|
|
9910
|
+
return t?Boolean(null==(n=i[t])?void 0:n.length):Boolean((null==(o=i.left)?void 0:o.length)||(null==(s=i.right)?void 0:s.length))},e.getLeftLeafColumns=DT((()=>[e.getAllLeafColumns(),e.getState().columnPinning.left]),((e,t)=>(null!=t?t:[]).map((t=>e.find((e=>e.id===t)))).filter(Boolean)),AT(e.options,"debugColumns")),e.getRightLeafColumns=DT((()=>[e.getAllLeafColumns(),e.getState().columnPinning.right]),((e,t)=>(null!=t?t:[]).map((t=>e.find((e=>e.id===t)))).filter(Boolean)),AT(e.options,"debugColumns")),e.getCenterLeafColumns=DT((()=>[e.getAllLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right]),((e,t,n)=>{const i=[...null!=t?t:[],...null!=n?n:[]]
|
|
9911
|
+
return e.filter((e=>!i.includes(e.id)))}),AT(e.options,"debugColumns"))}},tO={size:150,minSize:20,maxSize:Number.MAX_SAFE_INTEGER},nO={getDefaultColumnDef:()=>tO,getInitialState:e=>({columnSizing:{},columnSizingInfo:{startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,isResizingColumn:!1,columnSizingStart:[]},...e}),getDefaultOptions:e=>({columnResizeMode:"onEnd",columnResizeDirection:"ltr",onColumnSizingChange:_T("columnSizing",e),onColumnSizingInfoChange:_T("columnSizingInfo",e)}),createColumn:(e,t)=>{e.getSize=()=>{var n,i,o
|
|
9887
9912
|
const s=t.getState().columnSizing[e.id]
|
|
9888
|
-
return Math.min(Math.max(null!=(n=e.columnDef.minSize)?n:
|
|
9913
|
+
return Math.min(Math.max(null!=(n=e.columnDef.minSize)?n:tO.minSize,null!=(i=null!=s?s:e.columnDef.size)?i:tO.size),null!=(o=e.columnDef.maxSize)?o:tO.maxSize)},e.getStart=DT((e=>[e,rO(t,e),t.getState().columnSizing]),((t,n)=>n.slice(0,e.getIndex(t)).reduce(((e,t)=>e+t.getSize()),0)),AT(t.options,"debugColumns")),e.getAfter=DT((e=>[e,rO(t,e),t.getState().columnSizing]),((t,n)=>n.slice(e.getIndex(t)+1).reduce(((e,t)=>e+t.getSize()),0)),AT(t.options,"debugColumns")),e.resetSize=()=>{t.setColumnSizing((t=>{let{[e.id]:n,...i}=t
|
|
9889
9914
|
return i}))},e.getCanResize=()=>{var n,i
|
|
9890
9915
|
return(null==(n=e.columnDef.enableResizing)||n)&&(null==(i=t.options.enableColumnResizing)||i)},e.getIsResizing=()=>t.getState().columnSizingInfo.isResizingColumn===e.id},createHeader:(e,t)=>{e.getSize=()=>{let t=0
|
|
9891
9916
|
const n=e=>{var i
|
|
@@ -9893,37 +9918,37 @@ e.subHeaders.length?e.subHeaders.forEach(n):t+=null!=(i=e.column.getSize())?i:0}
|
|
|
9893
9918
|
return n(e),t},e.getStart=()=>{if(e.index>0){const t=e.headerGroup.headers[e.index-1]
|
|
9894
9919
|
return t.getStart()+t.getSize()}return 0},e.getResizeHandler=n=>{const i=t.getColumn(e.column.id),o=null==i?void 0:i.getCanResize()
|
|
9895
9920
|
return s=>{if(!i||!o)return
|
|
9896
|
-
if(null==s.persist||s.persist(),
|
|
9897
|
-
const r=e.getSize(),a=e?e.getLeafHeaders().map((e=>[e.column.id,e.column.getSize()])):[[i.id,i.getSize()]],l=
|
|
9921
|
+
if(null==s.persist||s.persist(),oO(s)&&s.touches&&s.touches.length>1)return
|
|
9922
|
+
const r=e.getSize(),a=e?e.getLeafHeaders().map((e=>[e.column.id,e.column.getSize()])):[[i.id,i.getSize()]],l=oO(s)?Math.round(s.touches[0].clientX):s.clientX,c={},d=(e,n)=>{"number"==typeof n&&(t.setColumnSizingInfo((e=>{var i,o
|
|
9898
9923
|
const s="rtl"===t.options.columnResizeDirection?-1:1,r=(n-(null!=(i=null==e?void 0:e.startOffset)?i:0))*s,a=Math.max(r/(null!=(o=null==e?void 0:e.startSize)?o:0),-.999999)
|
|
9899
9924
|
return e.columnSizingStart.forEach((e=>{let[t,n]=e
|
|
9900
9925
|
c[t]=Math.round(100*Math.max(n+n*a,0))/100})),{...e,deltaOffset:r,deltaPercentage:a}})),"onChange"!==t.options.columnResizeMode&&"end"!==e||t.setColumnSizing((e=>({...e,...c}))))},h=e=>d("move",e),u=e=>{d("end",e),t.setColumnSizingInfo((e=>({...e,isResizingColumn:!1,startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,columnSizingStart:[]})))},p=n||"undefined"!=typeof document?document:null,f={moveHandler:e=>h(e.clientX),upHandler:e=>{null==p||p.removeEventListener("mousemove",f.moveHandler),null==p||p.removeEventListener("mouseup",f.upHandler),u(e.clientX)}},m={moveHandler:e=>(e.cancelable&&(e.preventDefault(),e.stopPropagation()),h(e.touches[0].clientX),!1),upHandler:e=>{var t
|
|
9901
|
-
null==p||p.removeEventListener("touchmove",m.moveHandler),null==p||p.removeEventListener("touchend",m.upHandler),e.cancelable&&(e.preventDefault(),e.stopPropagation()),u(null==(t=e.touches[0])?void 0:t.clientX)}},g=!!function(){if("boolean"==typeof
|
|
9926
|
+
null==p||p.removeEventListener("touchmove",m.moveHandler),null==p||p.removeEventListener("touchend",m.upHandler),e.cancelable&&(e.preventDefault(),e.stopPropagation()),u(null==(t=e.touches[0])?void 0:t.clientX)}},g=!!function(){if("boolean"==typeof iO)return iO
|
|
9902
9927
|
let e=!1
|
|
9903
9928
|
try{const t={get passive(){return e=!0,!1}},n=()=>{}
|
|
9904
|
-
window.addEventListener("test",n,t),window.removeEventListener("test",n)}catch(t){e=!1}return
|
|
9905
|
-
|
|
9929
|
+
window.addEventListener("test",n,t),window.removeEventListener("test",n)}catch(t){e=!1}return iO=e,iO}()&&{passive:!1}
|
|
9930
|
+
oO(s)?(null==p||p.addEventListener("touchmove",m.moveHandler,g),null==p||p.addEventListener("touchend",m.upHandler,g)):(null==p||p.addEventListener("mousemove",f.moveHandler,g),null==p||p.addEventListener("mouseup",f.upHandler,g)),t.setColumnSizingInfo((e=>({...e,startOffset:l,startSize:r,deltaOffset:0,deltaPercentage:0,columnSizingStart:a,isResizingColumn:i.id})))}}},createTable:e=>{e.setColumnSizing=t=>null==e.options.onColumnSizingChange?void 0:e.options.onColumnSizingChange(t),e.setColumnSizingInfo=t=>null==e.options.onColumnSizingInfoChange?void 0:e.options.onColumnSizingInfoChange(t),e.resetColumnSizing=t=>{var n
|
|
9906
9931
|
e.setColumnSizing(t?{}:null!=(n=e.initialState.columnSizing)?n:{})},e.resetHeaderSizeInfo=t=>{var n
|
|
9907
9932
|
e.setColumnSizingInfo(t?{startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,isResizingColumn:!1,columnSizingStart:[]}:null!=(n=e.initialState.columnSizingInfo)?n:{startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,isResizingColumn:!1,columnSizingStart:[]})},e.getTotalSize=()=>{var t,n
|
|
9908
9933
|
return null!=(t=null==(n=e.getHeaderGroups()[0])?void 0:n.headers.reduce(((e,t)=>e+t.getSize()),0))?t:0},e.getLeftTotalSize=()=>{var t,n
|
|
9909
9934
|
return null!=(t=null==(n=e.getLeftHeaderGroups()[0])?void 0:n.headers.reduce(((e,t)=>e+t.getSize()),0))?t:0},e.getCenterTotalSize=()=>{var t,n
|
|
9910
9935
|
return null!=(t=null==(n=e.getCenterHeaderGroups()[0])?void 0:n.headers.reduce(((e,t)=>e+t.getSize()),0))?t:0},e.getRightTotalSize=()=>{var t,n
|
|
9911
9936
|
return null!=(t=null==(n=e.getRightHeaderGroups()[0])?void 0:n.headers.reduce(((e,t)=>e+t.getSize()),0))?t:0}}}
|
|
9912
|
-
let
|
|
9913
|
-
function
|
|
9937
|
+
let iO=null
|
|
9938
|
+
function oO(e){return"touchstart"===e.type}const sO={getInitialState:e=>({columnVisibility:{},...e}),getDefaultOptions:e=>({onColumnVisibilityChange:_T("columnVisibility",e)}),createColumn:(e,t)=>{e.toggleVisibility=n=>{e.getCanHide()&&t.setColumnVisibility((t=>({...t,[e.id]:null!=n?n:!e.getIsVisible()})))},e.getIsVisible=()=>{var n,i
|
|
9914
9939
|
const o=e.columns
|
|
9915
9940
|
return null==(n=o.length?o.some((e=>e.getIsVisible())):null==(i=t.getState().columnVisibility)?void 0:i[e.id])||n},e.getCanHide=()=>{var n,i
|
|
9916
|
-
return(null==(n=e.columnDef.enableHiding)||n)&&(null==(i=t.options.enableHiding)||i)},e.getToggleVisibilityHandler=()=>t=>{null==e.toggleVisibility||e.toggleVisibility(t.target.checked)}},createRow:(e,t)=>{e._getAllVisibleCells=
|
|
9941
|
+
return(null==(n=e.columnDef.enableHiding)||n)&&(null==(i=t.options.enableHiding)||i)},e.getToggleVisibilityHandler=()=>t=>{null==e.toggleVisibility||e.toggleVisibility(t.target.checked)}},createRow:(e,t)=>{e._getAllVisibleCells=DT((()=>[e.getAllCells(),t.getState().columnVisibility]),(e=>e.filter((e=>e.column.getIsVisible()))),AT(t.options,"debugRows")),e.getVisibleCells=DT((()=>[e.getLeftVisibleCells(),e.getCenterVisibleCells(),e.getRightVisibleCells()]),((e,t,n)=>[...e,...t,...n]),AT(t.options,"debugRows"))},createTable:e=>{const t=(t,n)=>DT((()=>[n(),n().filter((e=>e.getIsVisible())).map((e=>e.id)).join("_")]),(e=>e.filter((e=>null==e.getIsVisible?void 0:e.getIsVisible()))),AT(e.options,"debugColumns"))
|
|
9917
9942
|
e.getVisibleFlatColumns=t(0,(()=>e.getAllFlatColumns())),e.getVisibleLeafColumns=t(0,(()=>e.getAllLeafColumns())),e.getLeftVisibleLeafColumns=t(0,(()=>e.getLeftLeafColumns())),e.getRightVisibleLeafColumns=t(0,(()=>e.getRightLeafColumns())),e.getCenterVisibleLeafColumns=t(0,(()=>e.getCenterLeafColumns())),e.setColumnVisibility=t=>null==e.options.onColumnVisibilityChange?void 0:e.options.onColumnVisibilityChange(t),e.resetColumnVisibility=t=>{var n
|
|
9918
9943
|
e.setColumnVisibility(t?{}:null!=(n=e.initialState.columnVisibility)?n:{})},e.toggleAllColumnsVisible=t=>{var n
|
|
9919
9944
|
t=null!=(n=t)?n:!e.getIsAllColumnsVisible(),e.setColumnVisibility(e.getAllLeafColumns().reduce(((e,n)=>({...e,[n.id]:t||!(null!=n.getCanHide&&n.getCanHide())})),{}))},e.getIsAllColumnsVisible=()=>!e.getAllLeafColumns().some((e=>!(null!=e.getIsVisible&&e.getIsVisible()))),e.getIsSomeColumnsVisible=()=>e.getAllLeafColumns().some((e=>null==e.getIsVisible?void 0:e.getIsVisible())),e.getToggleAllColumnsVisibilityHandler=()=>t=>{var n
|
|
9920
9945
|
e.toggleAllColumnsVisible(null==(n=t.target)?void 0:n.checked)}}}
|
|
9921
|
-
function
|
|
9946
|
+
function rO(e,t){return t?"center"===t?e.getCenterVisibleLeafColumns():"left"===t?e.getLeftVisibleLeafColumns():e.getRightVisibleLeafColumns():e.getVisibleLeafColumns()}const aO={createTable:e=>{e._getGlobalFacetedRowModel=e.options.getFacetedRowModel&&e.options.getFacetedRowModel(e,"__global__"),e.getGlobalFacetedRowModel=()=>e.options.manualFiltering||!e._getGlobalFacetedRowModel?e.getPreFilteredRowModel():e._getGlobalFacetedRowModel(),e._getGlobalFacetedUniqueValues=e.options.getFacetedUniqueValues&&e.options.getFacetedUniqueValues(e,"__global__"),e.getGlobalFacetedUniqueValues=()=>e._getGlobalFacetedUniqueValues?e._getGlobalFacetedUniqueValues():new Map,e._getGlobalFacetedMinMaxValues=e.options.getFacetedMinMaxValues&&e.options.getFacetedMinMaxValues(e,"__global__"),e.getGlobalFacetedMinMaxValues=()=>{if(e._getGlobalFacetedMinMaxValues)return e._getGlobalFacetedMinMaxValues()}}},lO={getInitialState:e=>({globalFilter:void 0,...e}),getDefaultOptions:e=>({onGlobalFilterChange:_T("globalFilter",e),globalFilterFn:"auto",getColumnCanGlobalFilter:t=>{var n
|
|
9922
9947
|
const i=null==(n=e.getCoreRowModel().flatRows[0])||null==(n=n._getAllCellsByColumnId()[t.id])?void 0:n.getValue()
|
|
9923
9948
|
return"string"==typeof i||"number"==typeof i}}),createColumn:(e,t)=>{e.getCanGlobalFilter=()=>{var n,i,o,s
|
|
9924
|
-
return(null==(n=e.columnDef.enableGlobalFilter)||n)&&(null==(i=t.options.enableGlobalFilter)||i)&&(null==(o=t.options.enableFilters)||o)&&(null==(s=null==t.options.getColumnCanGlobalFilter?void 0:t.options.getColumnCanGlobalFilter(e))||s)&&!!e.accessorFn}},createTable:e=>{e.getGlobalAutoFilterFn=()=>
|
|
9949
|
+
return(null==(n=e.columnDef.enableGlobalFilter)||n)&&(null==(i=t.options.enableGlobalFilter)||i)&&(null==(o=t.options.enableFilters)||o)&&(null==(s=null==t.options.getColumnCanGlobalFilter?void 0:t.options.getColumnCanGlobalFilter(e))||s)&&!!e.accessorFn}},createTable:e=>{e.getGlobalAutoFilterFn=()=>GT.includesString,e.getGlobalFilterFn=()=>{var t,n
|
|
9925
9950
|
const{globalFilterFn:i}=e.options
|
|
9926
|
-
return
|
|
9951
|
+
return ET(i)?i:"auto"===i?e.getGlobalAutoFilterFn():null!=(t=null==(n=e.options.filterFns)?void 0:n[i])?t:GT[i]},e.setGlobalFilter=t=>{null==e.options.onGlobalFilterChange||e.options.onGlobalFilterChange(t)},e.resetGlobalFilter=t=>{e.setGlobalFilter(t?void 0:e.initialState.globalFilter)}}},cO={getInitialState:e=>({expanded:{},...e}),getDefaultOptions:e=>({onExpandedChange:_T("expanded",e),paginateExpandedRows:!0}),createTable:e=>{let t=!1,n=!1
|
|
9927
9952
|
e._autoResetExpanded=()=>{var i,o
|
|
9928
9953
|
if(t){if(null!=(i=null!=(o=e.options.autoResetAll)?o:e.options.autoResetExpanded)?i:!e.options.manualExpanding){if(n)return
|
|
9929
9954
|
n=!0,e._queue((()=>{e.resetExpanded(),n=!1}))}}else e._queue((()=>{t=!0}))},e.setExpanded=t=>null==e.options.onExpandedChange?void 0:e.options.onExpandedChange(t),e.toggleAllRowsExpanded=t=>{(null!=t?t:!e.getIsAllRowsExpanded())?e.setExpanded(!0):e.setExpanded({})},e.resetExpanded=t=>{var n,i
|
|
@@ -9942,22 +9967,22 @@ return!!(null!=(n=null==t.options.getIsRowExpanded?void 0:t.options.getIsRowExpa
|
|
|
9942
9967
|
return null!=(n=null==t.options.getRowCanExpand?void 0:t.options.getRowCanExpand(e))?n:(null==(i=t.options.enableExpanding)||i)&&!(null==(o=e.subRows)||!o.length)},e.getIsAllParentsExpanded=()=>{let n=!0,i=e
|
|
9943
9968
|
for(;n&&i.parentId;)i=t.getRow(i.parentId,!0),n=i.getIsExpanded()
|
|
9944
9969
|
return n},e.getToggleExpandedHandler=()=>{const t=e.getCanExpand()
|
|
9945
|
-
return()=>{t&&e.toggleExpanded()}}}},
|
|
9970
|
+
return()=>{t&&e.toggleExpanded()}}}},dO={getInitialState:e=>({...e,pagination:{pageIndex:0,pageSize:10,...null==e?void 0:e.pagination}}),getDefaultOptions:e=>({onPaginationChange:_T("pagination",e)}),createTable:e=>{let t=!1,n=!1
|
|
9946
9971
|
e._autoResetPageIndex=()=>{var i,o
|
|
9947
9972
|
if(t){if(null!=(i=null!=(o=e.options.autoResetAll)?o:e.options.autoResetPageIndex)?i:!e.options.manualPagination){if(n)return
|
|
9948
|
-
n=!0,e._queue((()=>{e.resetPageIndex(),n=!1}))}}else e._queue((()=>{t=!0}))},e.setPagination=t=>null==e.options.onPaginationChange?void 0:e.options.onPaginationChange((e=>
|
|
9949
|
-
e.setPagination(t?{pageIndex:0,pageSize:10}:null!=(n=e.initialState.pagination)?n:{pageIndex:0,pageSize:10})},e.setPageIndex=t=>{e.setPagination((n=>{let i=
|
|
9973
|
+
n=!0,e._queue((()=>{e.resetPageIndex(),n=!1}))}}else e._queue((()=>{t=!0}))},e.setPagination=t=>null==e.options.onPaginationChange?void 0:e.options.onPaginationChange((e=>MT(t,e))),e.resetPagination=t=>{var n
|
|
9974
|
+
e.setPagination(t?{pageIndex:0,pageSize:10}:null!=(n=e.initialState.pagination)?n:{pageIndex:0,pageSize:10})},e.setPageIndex=t=>{e.setPagination((n=>{let i=MT(t,n.pageIndex)
|
|
9950
9975
|
const o=void 0===e.options.pageCount||-1===e.options.pageCount?Number.MAX_SAFE_INTEGER:e.options.pageCount-1
|
|
9951
9976
|
return i=Math.max(0,Math.min(i,o)),{...n,pageIndex:i}}))},e.resetPageIndex=t=>{var n,i
|
|
9952
9977
|
e.setPageIndex(t?0:null!=(n=null==(i=e.initialState)||null==(i=i.pagination)?void 0:i.pageIndex)?n:0)},e.resetPageSize=t=>{var n,i
|
|
9953
|
-
e.setPageSize(t?10:null!=(n=null==(i=e.initialState)||null==(i=i.pagination)?void 0:i.pageSize)?n:10)},e.setPageSize=t=>{e.setPagination((e=>{const n=Math.max(1,
|
|
9978
|
+
e.setPageSize(t?10:null!=(n=null==(i=e.initialState)||null==(i=i.pagination)?void 0:i.pageSize)?n:10)},e.setPageSize=t=>{e.setPagination((e=>{const n=Math.max(1,MT(t,e.pageSize)),i=e.pageSize*e.pageIndex,o=Math.floor(i/n)
|
|
9954
9979
|
return{...e,pageIndex:o,pageSize:n}}))},e.setPageCount=t=>e.setPagination((n=>{var i
|
|
9955
|
-
let o=
|
|
9956
|
-
return"number"==typeof o&&(o=Math.max(-1,o)),{...n,pageCount:o}})),e.getPageOptions=
|
|
9957
|
-
return e&&e>0&&(t=[...new Array(e)].fill(null).map(((e,t)=>t))),t}),
|
|
9980
|
+
let o=MT(t,null!=(i=e.options.pageCount)?i:-1)
|
|
9981
|
+
return"number"==typeof o&&(o=Math.max(-1,o)),{...n,pageCount:o}})),e.getPageOptions=DT((()=>[e.getPageCount()]),(e=>{let t=[]
|
|
9982
|
+
return e&&e>0&&(t=[...new Array(e)].fill(null).map(((e,t)=>t))),t}),AT(e.options,"debugTable")),e.getCanPreviousPage=()=>e.getState().pagination.pageIndex>0,e.getCanNextPage=()=>{const{pageIndex:t}=e.getState().pagination,n=e.getPageCount()
|
|
9958
9983
|
return-1===n||0!==n&&t<n-1},e.previousPage=()=>e.setPageIndex((e=>e-1)),e.nextPage=()=>e.setPageIndex((e=>e+1)),e.firstPage=()=>e.setPageIndex(0),e.lastPage=()=>e.setPageIndex(e.getPageCount()-1),e.getPrePaginationRowModel=()=>e.getExpandedRowModel(),e.getPaginationRowModel=()=>(!e._getPaginationRowModel&&e.options.getPaginationRowModel&&(e._getPaginationRowModel=e.options.getPaginationRowModel(e)),e.options.manualPagination||!e._getPaginationRowModel?e.getPrePaginationRowModel():e._getPaginationRowModel()),e.getPageCount=()=>{var t
|
|
9959
9984
|
return null!=(t=e.options.pageCount)?t:Math.ceil(e.getRowCount()/e.getState().pagination.pageSize)},e.getRowCount=()=>{var t
|
|
9960
|
-
return null!=(t=e.options.rowCount)?t:e.getPrePaginationRowModel().rows.length}}},
|
|
9985
|
+
return null!=(t=e.options.rowCount)?t:e.getPrePaginationRowModel().rows.length}}},hO={getInitialState:e=>({rowPinning:{top:[],bottom:[]},...e}),getDefaultOptions:e=>({onRowPinningChange:_T("rowPinning",e)}),createRow:(e,t)=>{e.pin=(n,i,o)=>{const s=i?e.getLeafRows().map((e=>{let{id:t}=e
|
|
9961
9986
|
return t})):[],r=o?e.getParentRows().map((e=>{let{id:t}=e
|
|
9962
9987
|
return t})):[],a=new Set([...r,e.id,...s])
|
|
9963
9988
|
t.setRowPinning((e=>{var t,i,o,s,r,l
|
|
@@ -9973,14 +9998,14 @@ return null!=(i=null==s?void 0:s.indexOf(e.id))?i:-1}},createTable:e=>{e.setRowP
|
|
|
9973
9998
|
return e.setRowPinning(t?{top:[],bottom:[]}:null!=(n=null==(i=e.initialState)?void 0:i.rowPinning)?n:{top:[],bottom:[]})},e.getIsSomeRowsPinned=t=>{var n
|
|
9974
9999
|
const i=e.getState().rowPinning
|
|
9975
10000
|
var o,s
|
|
9976
|
-
return t?Boolean(null==(n=i[t])?void 0:n.length):Boolean((null==(o=i.top)?void 0:o.length)||(null==(s=i.bottom)?void 0:s.length))},e._getPinnedRows=
|
|
10001
|
+
return t?Boolean(null==(n=i[t])?void 0:n.length):Boolean((null==(o=i.top)?void 0:o.length)||(null==(s=i.bottom)?void 0:s.length))},e._getPinnedRows=DT((t=>[e.getRowModel().rows,e.getState().rowPinning[t],t]),((t,n,i)=>{var o
|
|
9977
10002
|
return(null==(o=e.options.keepPinnedRows)||o?(null!=n?n:[]).map((t=>{const n=e.getRow(t,!0)
|
|
9978
|
-
return n.getIsAllParentsExpanded()?n:null})):(null!=n?n:[]).map((e=>t.find((t=>t.id===e))))).filter(Boolean).map((e=>({...e,position:i})))}),
|
|
9979
|
-
return e.filter((e=>!i.has(e.id)))}),
|
|
10003
|
+
return n.getIsAllParentsExpanded()?n:null})):(null!=n?n:[]).map((e=>t.find((t=>t.id===e))))).filter(Boolean).map((e=>({...e,position:i})))}),AT(e.options,"debugRows")),e.getTopRows=()=>e._getPinnedRows("top"),e.getBottomRows=()=>e._getPinnedRows("bottom"),e.getCenterRows=DT((()=>[e.getRowModel().rows,e.getState().rowPinning.top,e.getState().rowPinning.bottom]),((e,t,n)=>{const i=new Set([...null!=t?t:[],...null!=n?n:[]])
|
|
10004
|
+
return e.filter((e=>!i.has(e.id)))}),AT(e.options,"debugRows"))}},uO={getInitialState:e=>({rowSelection:{},...e}),getDefaultOptions:e=>({onRowSelectionChange:_T("rowSelection",e),enableRowSelection:!0,enableMultiRowSelection:!0,enableSubRowSelection:!0}),createTable:e=>{e.setRowSelection=t=>null==e.options.onRowSelectionChange?void 0:e.options.onRowSelectionChange(t),e.resetRowSelection=t=>{var n
|
|
9980
10005
|
return e.setRowSelection(t?{}:null!=(n=e.initialState.rowSelection)?n:{})},e.toggleAllRowsSelected=t=>{e.setRowSelection((n=>{t=void 0!==t?t:!e.getIsAllRowsSelected()
|
|
9981
10006
|
const i={...n},o=e.getPreGroupedRowModel().flatRows
|
|
9982
10007
|
return t?o.forEach((e=>{e.getCanSelect()&&(i[e.id]=!0)})):o.forEach((e=>{delete i[e.id]})),i}))},e.toggleAllPageRowsSelected=t=>e.setRowSelection((n=>{const i=void 0!==t?t:!e.getIsAllPageRowsSelected(),o={...n}
|
|
9983
|
-
return e.getRowModel().rows.forEach((t=>{
|
|
10008
|
+
return e.getRowModel().rows.forEach((t=>{pO(o,t.id,i,!0,e)})),o})),e.getPreSelectedRowModel=()=>e.getCoreRowModel(),e.getSelectedRowModel=DT((()=>[e.getState().rowSelection,e.getCoreRowModel()]),((t,n)=>Object.keys(t).length?fO(e,n):{rows:[],flatRows:[],rowsById:{}}),AT(e.options,"debugTable")),e.getFilteredSelectedRowModel=DT((()=>[e.getState().rowSelection,e.getFilteredRowModel()]),((t,n)=>Object.keys(t).length?fO(e,n):{rows:[],flatRows:[],rowsById:{}}),AT(e.options,"debugTable")),e.getGroupedSelectedRowModel=DT((()=>[e.getState().rowSelection,e.getSortedRowModel()]),((t,n)=>Object.keys(t).length?fO(e,n):{rows:[],flatRows:[],rowsById:{}}),AT(e.options,"debugTable")),e.getIsAllRowsSelected=()=>{const t=e.getFilteredRowModel().flatRows,{rowSelection:n}=e.getState()
|
|
9984
10009
|
let i=Boolean(t.length&&Object.keys(n).length)
|
|
9985
10010
|
return i&&t.some((e=>e.getCanSelect()&&!n[e.id]))&&(i=!1),i},e.getIsAllPageRowsSelected=()=>{const t=e.getPaginationRowModel().flatRows.filter((e=>e.getCanSelect())),{rowSelection:n}=e.getState()
|
|
9986
10011
|
let i=!!t.length
|
|
@@ -9991,40 +10016,40 @@ return!e.getIsAllPageRowsSelected()&&t.filter((e=>e.getCanSelect())).some((e=>e.
|
|
|
9991
10016
|
t.setRowSelection((s=>{var r
|
|
9992
10017
|
if(n=void 0!==n?n:!o,e.getCanSelect()&&o===n)return s
|
|
9993
10018
|
const a={...s}
|
|
9994
|
-
return
|
|
9995
|
-
return
|
|
9996
|
-
return"some"===
|
|
9997
|
-
return"all"===
|
|
10019
|
+
return pO(a,e.id,n,null==(r=null==i?void 0:i.selectChildren)||r,t),a}))},e.getIsSelected=()=>{const{rowSelection:n}=t.getState()
|
|
10020
|
+
return mO(e,n)},e.getIsSomeSelected=()=>{const{rowSelection:n}=t.getState()
|
|
10021
|
+
return"some"===gO(e,n)},e.getIsAllSubRowsSelected=()=>{const{rowSelection:n}=t.getState()
|
|
10022
|
+
return"all"===gO(e,n)},e.getCanSelect=()=>{var n
|
|
9998
10023
|
return"function"==typeof t.options.enableRowSelection?t.options.enableRowSelection(e):null==(n=t.options.enableRowSelection)||n},e.getCanSelectSubRows=()=>{var n
|
|
9999
10024
|
return"function"==typeof t.options.enableSubRowSelection?t.options.enableSubRowSelection(e):null==(n=t.options.enableSubRowSelection)||n},e.getCanMultiSelect=()=>{var n
|
|
10000
10025
|
return"function"==typeof t.options.enableMultiRowSelection?t.options.enableMultiRowSelection(e):null==(n=t.options.enableMultiRowSelection)||n},e.getToggleSelectedHandler=()=>{const t=e.getCanSelect()
|
|
10001
10026
|
return n=>{var i
|
|
10002
|
-
t&&e.toggleSelected(null==(i=n.target)?void 0:i.checked)}}}},
|
|
10027
|
+
t&&e.toggleSelected(null==(i=n.target)?void 0:i.checked)}}}},pO=(e,t,n,i,o)=>{var s
|
|
10003
10028
|
const r=o.getRow(t,!0)
|
|
10004
|
-
n?(r.getCanMultiSelect()||Object.keys(e).forEach((t=>delete e[t])),r.getCanSelect()&&(e[t]=!0)):delete e[t],i&&null!=(s=r.subRows)&&s.length&&r.getCanSelectSubRows()&&r.subRows.forEach((t=>
|
|
10005
|
-
function
|
|
10006
|
-
const r
|
|
10029
|
+
n?(r.getCanMultiSelect()||Object.keys(e).forEach((t=>delete e[t])),r.getCanSelect()&&(e[t]=!0)):delete e[t],i&&null!=(s=r.subRows)&&s.length&&r.getCanSelectSubRows()&&r.subRows.forEach((t=>pO(e,t.id,n,i,o)))}
|
|
10030
|
+
function fO(e,t){const n=e.getState().rowSelection,i=[],o={},s=function(e,t){return e.map((e=>{var t
|
|
10031
|
+
const r=mO(e,n)
|
|
10007
10032
|
if(r&&(i.push(e),o[e.id]=e),null!=(t=e.subRows)&&t.length&&(e={...e,subRows:s(e.subRows)}),r)return e})).filter(Boolean)}
|
|
10008
|
-
return{rows:s(t.rows),flatRows:i,rowsById:o}}function
|
|
10009
|
-
return null!=(n=t[e.id])&&n}function
|
|
10033
|
+
return{rows:s(t.rows),flatRows:i,rowsById:o}}function mO(e,t){var n
|
|
10034
|
+
return null!=(n=t[e.id])&&n}function gO(e,t,n){var i
|
|
10010
10035
|
if(null==(i=e.subRows)||!i.length)return!1
|
|
10011
10036
|
let o=!0,s=!1
|
|
10012
|
-
return e.subRows.forEach((e=>{if((!s||o)&&(e.getCanSelect()&&(
|
|
10013
|
-
"all"===n?s=!0:"some"===n?(s=!0,o=!1):o=!1}})),o?"all":!!s&&"some"}const
|
|
10014
|
-
function
|
|
10037
|
+
return e.subRows.forEach((e=>{if((!s||o)&&(e.getCanSelect()&&(mO(e,t)?s=!0:o=!1),e.subRows&&e.subRows.length)){const n=gO(e,t)
|
|
10038
|
+
"all"===n?s=!0:"some"===n?(s=!0,o=!1):o=!1}})),o?"all":!!s&&"some"}const vO=/([0-9]+)/gm
|
|
10039
|
+
function bO(e,t){return e===t?0:e>t?1:-1}function yO(e){return"number"==typeof e?isNaN(e)||e===1/0||e===-1/0?"":String(e):"string"==typeof e?e:""}function wO(e,t){const n=e.split(vO).filter(Boolean),i=t.split(vO).filter(Boolean)
|
|
10015
10040
|
for(;n.length&&i.length;){const e=n.shift(),t=i.shift(),o=parseInt(e,10),s=parseInt(t,10),r=[o,s].sort()
|
|
10016
10041
|
if(isNaN(r[0])){if(e>t)return 1
|
|
10017
10042
|
if(t>e)return-1}else{if(isNaN(r[1]))return isNaN(o)?-1:1
|
|
10018
10043
|
if(o>s)return 1
|
|
10019
|
-
if(s>o)return-1}}return n.length-i.length}const
|
|
10020
|
-
return i>o?1:i<o?-1:0},basic:(e,t,n)=>
|
|
10044
|
+
if(s>o)return-1}}return n.length-i.length}const xO={alphanumeric:(e,t,n)=>wO(yO(e.getValue(n)).toLowerCase(),yO(t.getValue(n)).toLowerCase()),alphanumericCaseSensitive:(e,t,n)=>wO(yO(e.getValue(n)),yO(t.getValue(n))),text:(e,t,n)=>bO(yO(e.getValue(n)).toLowerCase(),yO(t.getValue(n)).toLowerCase()),textCaseSensitive:(e,t,n)=>bO(yO(e.getValue(n)),yO(t.getValue(n))),datetime:(e,t,n)=>{const i=e.getValue(n),o=t.getValue(n)
|
|
10045
|
+
return i>o?1:i<o?-1:0},basic:(e,t,n)=>bO(e.getValue(n),t.getValue(n))},CO={getInitialState:e=>({sorting:[],...e}),getDefaultColumnDef:()=>({sortingFn:"auto",sortUndefined:1}),getDefaultOptions:e=>({onSortingChange:_T("sorting",e),isMultiSortEvent:e=>e.shiftKey}),createColumn:(e,t)=>{e.getAutoSortingFn=()=>{const n=t.getFilteredRowModel().flatRows.slice(10)
|
|
10021
10046
|
let i=!1
|
|
10022
10047
|
for(const t of n){const n=null==t?void 0:t.getValue(e.id)
|
|
10023
|
-
if("[object Date]"===Object.prototype.toString.call(n))return
|
|
10024
|
-
if("string"==typeof n&&(i=!0,n.split(
|
|
10048
|
+
if("[object Date]"===Object.prototype.toString.call(n))return xO.datetime
|
|
10049
|
+
if("string"==typeof n&&(i=!0,n.split(vO).length>1))return xO.alphanumeric}return i?xO.text:xO.basic},e.getAutoSortDir=()=>{const n=t.getFilteredRowModel().flatRows[0]
|
|
10025
10050
|
return"string"==typeof(null==n?void 0:n.getValue(e.id))?"asc":"desc"},e.getSortingFn=()=>{var n,i
|
|
10026
10051
|
if(!e)throw new Error
|
|
10027
|
-
return
|
|
10052
|
+
return ET(e.columnDef.sortingFn)?e.columnDef.sortingFn:"auto"===e.columnDef.sortingFn?e.getAutoSortingFn():null!=(n=null==(i=t.options.sortingFns)?void 0:i[e.columnDef.sortingFn])?n:xO[e.columnDef.sortingFn]},e.toggleSorting=(n,i)=>{const o=e.getNextSortingOrder(),s=null!=n
|
|
10028
10053
|
t.setSorting((r=>{const a=null==r?void 0:r.find((t=>t.id===e.id)),l=null==r?void 0:r.findIndex((t=>t.id===e.id))
|
|
10029
10054
|
let c,d=[],h=s?n:"desc"===o
|
|
10030
10055
|
var u;(c=null!=r&&r.length&&e.getCanMultiSort()&&i?a?"toggle":"add":null!=r&&r.length&&l!==r.length-1?"replace":a?"toggle":"replace","toggle"===c&&(s||o||(c="remove")),"add"===c)?(d=[...r,{id:e.id,desc:h}],d.splice(0,d.length-(null!=(u=t.options.maxMultiSortColCount)?u:Number.MAX_SAFE_INTEGER))):d="toggle"===c?r.map((t=>t.id===e.id?{...t,desc:h}:t)):"remove"===c?r.filter((t=>t.id!==e.id)):[{id:e.id,desc:h}]
|
|
@@ -10038,9 +10063,9 @@ const i=null==(n=t.getState().sorting)?void 0:n.find((t=>t.id===e.id))
|
|
|
10038
10063
|
return!!i&&(i.desc?"desc":"asc")},e.getSortIndex=()=>{var n,i
|
|
10039
10064
|
return null!=(n=null==(i=t.getState().sorting)?void 0:i.findIndex((t=>t.id===e.id)))?n:-1},e.clearSorting=()=>{t.setSorting((t=>null!=t&&t.length?t.filter((t=>t.id!==e.id)):[]))},e.getToggleSortingHandler=()=>{const n=e.getCanSort()
|
|
10040
10065
|
return i=>{n&&(null==i.persist||i.persist(),null==e.toggleSorting||e.toggleSorting(void 0,!!e.getCanMultiSort()&&(null==t.options.isMultiSortEvent?void 0:t.options.isMultiSortEvent(i))))}}},createTable:e=>{e.setSorting=t=>null==e.options.onSortingChange?void 0:e.options.onSortingChange(t),e.resetSorting=t=>{var n,i
|
|
10041
|
-
e.setSorting(t?[]:null!=(n=null==(i=e.initialState)?void 0:i.sorting)?n:[])},e.getPreSortedRowModel=()=>e.getGroupedRowModel(),e.getSortedRowModel=()=>(!e._getSortedRowModel&&e.options.getSortedRowModel&&(e._getSortedRowModel=e.options.getSortedRowModel(e)),e.options.manualSorting||!e._getSortedRowModel?e.getPreSortedRowModel():e._getSortedRowModel())}},
|
|
10042
|
-
function
|
|
10043
|
-
const i=[...
|
|
10066
|
+
e.setSorting(t?[]:null!=(n=null==(i=e.initialState)?void 0:i.sorting)?n:[])},e.getPreSortedRowModel=()=>e.getGroupedRowModel(),e.getSortedRowModel=()=>(!e._getSortedRowModel&&e.options.getSortedRowModel&&(e._getSortedRowModel=e.options.getSortedRowModel(e)),e.options.manualSorting||!e._getSortedRowModel?e.getPreSortedRowModel():e._getSortedRowModel())}},kO=[RT,sO,QT,eO,PT,KT,aO,lO,CO,JT,cO,dO,hO,uO,nO]
|
|
10067
|
+
function SO(e){var t,n
|
|
10068
|
+
const i=[...kO,...null!=(t=e._features)?t:[]]
|
|
10044
10069
|
let o={_features:i}
|
|
10045
10070
|
const s=o._features.reduce(((e,t)=>Object.assign(e,null==t.getDefaultOptions?void 0:t.getDefaultOptions(o))),{})
|
|
10046
10071
|
let r={...null!=(n=e.initialState)?n:{}}
|
|
@@ -10049,36 +10074,36 @@ r=null!=(t=null==e.getInitialState?void 0:e.getInitialState(r))?t:r}))
|
|
|
10049
10074
|
const a=[]
|
|
10050
10075
|
let l=!1
|
|
10051
10076
|
const c={_features:i,options:{...s,...e},initialState:r,_queue:e=>{a.push(e),l||(l=!0,Promise.resolve().then((()=>{for(;a.length;)a.shift()()
|
|
10052
|
-
l=!1})).catch((e=>setTimeout((()=>{throw e})))))},reset:()=>{o.setState(o.initialState)},setOptions:e=>{const t=
|
|
10077
|
+
l=!1})).catch((e=>setTimeout((()=>{throw e})))))},reset:()=>{o.setState(o.initialState)},setOptions:e=>{const t=MT(e,o.options)
|
|
10053
10078
|
o.options=(e=>o.options.mergeOptions?o.options.mergeOptions(s,e):{...s,...e})(t)},getState:()=>o.options.state,setState:e=>{null==o.options.onStateChange||o.options.onStateChange(e)},_getRowId:(e,t,n)=>{var i
|
|
10054
10079
|
return null!=(i=null==o.options.getRowId?void 0:o.options.getRowId(e,t,n))?i:`${n?[n.id,t].join("."):t}`},getCoreRowModel:()=>(o._getCoreRowModel||(o._getCoreRowModel=o.options.getCoreRowModel(o)),o._getCoreRowModel()),getRowModel:()=>o.getPaginationRowModel(),getRow:(e,t)=>{let n=(t?o.getPrePaginationRowModel():o.getRowModel()).rowsById[e]
|
|
10055
10080
|
if(!n&&(n=o.getCoreRowModel().rowsById[e],!n))throw new Error
|
|
10056
|
-
return n},_getDefaultColumnDef:
|
|
10081
|
+
return n},_getDefaultColumnDef:DT((()=>[o.options.defaultColumn]),(e=>{var t
|
|
10057
10082
|
return e=null!=(t=e)?t:{},{header:e=>{const t=e.header.column.columnDef
|
|
10058
10083
|
return t.accessorKey?t.accessorKey:t.accessorFn?t.id:null},cell:e=>{var t,n
|
|
10059
|
-
return null!=(t=null==(n=e.renderValue())||null==n.toString?void 0:n.toString())?t:null},...o._features.reduce(((e,t)=>Object.assign(e,null==t.getDefaultColumnDef?void 0:t.getDefaultColumnDef())),{}),...e}}),
|
|
10084
|
+
return null!=(t=null==(n=e.renderValue())||null==n.toString?void 0:n.toString())?t:null},...o._features.reduce(((e,t)=>Object.assign(e,null==t.getDefaultColumnDef?void 0:t.getDefaultColumnDef())),{}),...e}}),AT(e,"debugColumns")),_getColumnDefs:()=>o.options.columns,getAllColumns:DT((()=>[o._getColumnDefs()]),(e=>{const t=function(e,n,i){return void 0===i&&(i=0),e.map((e=>{const s=function(e,t,n,i){var o,s
|
|
10060
10085
|
const r={...e._getDefaultColumnDef(),...t},a=r.accessorKey
|
|
10061
10086
|
let l,c=null!=(o=null!=(s=r.id)?s:a?a.replace(".","_"):void 0)?o:"string"==typeof r.header?r.header:void 0
|
|
10062
10087
|
if(r.accessorFn?l=r.accessorFn:a&&(l=a.includes(".")?e=>{let t=e
|
|
10063
10088
|
for(const e of a.split(".")){var n
|
|
10064
10089
|
t=null==(n=t)?void 0:n[e]}return t}:e=>e[r.accessorKey]),!c)throw new Error
|
|
10065
|
-
let d={id:`${String(c)}`,accessorFn:l,parent:i,depth:n,columnDef:r,columns:[],getFlatColumns:
|
|
10066
|
-
return[d,...null==(e=d.columns)?void 0:e.flatMap((e=>e.getFlatColumns()))]}),
|
|
10090
|
+
let d={id:`${String(c)}`,accessorFn:l,parent:i,depth:n,columnDef:r,columns:[],getFlatColumns:DT((()=>[!0]),(()=>{var e
|
|
10091
|
+
return[d,...null==(e=d.columns)?void 0:e.flatMap((e=>e.getFlatColumns()))]}),AT(e.options,"debugColumns")),getLeafColumns:DT((()=>[e._getOrderColumnsFn()]),(e=>{var t
|
|
10067
10092
|
if(null!=(t=d.columns)&&t.length){let t=d.columns.flatMap((e=>e.getLeafColumns()))
|
|
10068
|
-
return e(t)}return[d]}),
|
|
10093
|
+
return e(t)}return[d]}),AT(e.options,"debugColumns"))}
|
|
10069
10094
|
for(const t of e._features)null==t.createColumn||t.createColumn(d,e)
|
|
10070
10095
|
return d}(o,e,i,n),r=e
|
|
10071
10096
|
return s.columns=r.columns?t(r.columns,s,i+1):[],s}))}
|
|
10072
|
-
return t(e)}),
|
|
10097
|
+
return t(e)}),AT(e,"debugColumns")),getAllFlatColumns:DT((()=>[o.getAllColumns()]),(e=>e.flatMap((e=>e.getFlatColumns()))),AT(e,"debugColumns")),_getAllFlatColumnsById:DT((()=>[o.getAllFlatColumns()]),(e=>e.reduce(((e,t)=>(e[t.id]=t,e)),{})),AT(e,"debugColumns")),getAllLeafColumns:DT((()=>[o.getAllColumns(),o._getOrderColumnsFn()]),((e,t)=>t(e.flatMap((e=>e.getLeafColumns())))),AT(e,"debugColumns")),getColumn:e=>o._getAllFlatColumnsById()[e]}
|
|
10073
10098
|
Object.assign(o,c)
|
|
10074
10099
|
for(let e=0;e<o._features.length;e++){const t=o._features[e]
|
|
10075
|
-
null==t||null==t.createTable||t.createTable(o)}return o}function
|
|
10100
|
+
null==t||null==t.createTable||t.createTable(o)}return o}function $O(){return e=>DT((()=>[e.getState().grouping,e.getPreGroupedRowModel()]),((t,n)=>{if(!n.rows.length||!t.length)return n
|
|
10076
10101
|
const i=t.filter((t=>e.getColumn(t))),o=[],s={},r=function(t,n,a){if(void 0===n&&(n=0),n>=i.length)return t.map((e=>(e.depth=n,o.push(e),s[e.id]=e,e.subRows&&(e.subRows=r(e.subRows,n+1,e.id)),e)))
|
|
10077
10102
|
const l=i[n],c=function(e,t){const n=new Map
|
|
10078
10103
|
return e.reduce(((e,n)=>{const i=`${n.getGroupingValue(t)}`,o=e.get(i)
|
|
10079
10104
|
return o?o.push(n):e.set(i,[n]),e}),n)}(t,l),d=Array.from(c.entries()).map(((t,c)=>{let[d,h]=t,u=`${l}:${d}`
|
|
10080
10105
|
u=a?`${a}>${u}`:u
|
|
10081
|
-
const p=r(h,n+1,u),f=n?
|
|
10106
|
+
const p=r(h,n+1,u),f=n?IT(h,(e=>e.subRows)):h,m=NT(e,u,f[0].original,c,n,0,a)
|
|
10082
10107
|
return Object.assign(m,{groupingColumnId:l,groupingValue:d,subRows:p,leafRows:f,getValue:t=>{if(i.includes(t)){if(m._valuesCache.hasOwnProperty(t))return m._valuesCache[t]
|
|
10083
10108
|
var n
|
|
10084
10109
|
if(h[0])m._valuesCache[t]=null!=(n=h[0].getValue(t))?n:void 0
|
|
@@ -10086,10 +10111,10 @@ return m._valuesCache[t]}if(m._groupingValuesCache.hasOwnProperty(t))return m._g
|
|
|
10086
10111
|
const o=e.getColumn(t),s=null==o?void 0:o.getAggregationFn()
|
|
10087
10112
|
return s?(m._groupingValuesCache[t]=s(t,f,h),m._groupingValuesCache[t]):void 0}}),p.forEach((e=>{o.push(e),s[e.id]=e})),m}))
|
|
10088
10113
|
return d},a=r(n.rows,0)
|
|
10089
|
-
return a.forEach((e=>{o.push(e),s[e.id]=e})),{rows:a,flatRows:o,rowsById:s}}),
|
|
10090
|
-
class
|
|
10091
|
-
const
|
|
10092
|
-
try{t=document.createElement(e)}catch(e){}if(!(t instanceof
|
|
10114
|
+
return a.forEach((e=>{o.push(e),s[e.id]=e})),{rows:a,flatRows:o,rowsById:s}}),AT(e.options,"debugTable",0,(()=>{e._queue((()=>{e._autoResetExpanded(),e._autoResetPageIndex()}))})))}const MO=void 0,_O="can-load-children",EO="loading-children",IO={none:void 0,ascending:"ascending",descending:"descending"},DO={none:void 0,single:"single",multiple:"multiple"},AO="not-selected",TO="selected",OO="partially-selected",RO="basic",FO="localeAwareCaseSensitive",NO=117,PO=1
|
|
10115
|
+
class LO extends Vt{}e([g],LO.prototype,"groupHeaderValue",void 0),e([g],LO.prototype,"columnConfig",void 0)
|
|
10116
|
+
const zO=e=>((e=>{let t
|
|
10117
|
+
try{t=document.createElement(e)}catch(e){}if(!(t instanceof LO))throw new Error(`Group header view tag name (${e}) must evaluate to an element extending TableGroupHeaderView`)})(e),G`
|
|
10093
10118
|
<${e}
|
|
10094
10119
|
:groupHeaderValue="${e=>e.groupRowValue}"
|
|
10095
10120
|
:columnConfig="${e=>e.groupColumn?.columnInternals.columnConfig}"
|
|
@@ -10097,11 +10122,11 @@ try{t=document.createElement(e)}catch(e){}if(!(t instanceof ZO))throw new Error(
|
|
|
10097
10122
|
>
|
|
10098
10123
|
</${e}>
|
|
10099
10124
|
`)
|
|
10100
|
-
class
|
|
10125
|
+
class VO extends Vt{constructor(){super(...arguments),this.delegatedEvents=[],this.delegatedEventHandler=()=>{}}focusedRecycleCallback(){}columnChanged(){for(const e of this.delegatedEvents)this.removeEventListener(e,this.delegatedEventHandler)
|
|
10101
10126
|
if(this.delegatedEvents=[],this.delegatedEventHandler=()=>{},this.column){this.delegatedEvents=this.column.columnInternals.delegatedEvents,this.delegatedEventHandler=e=>{this.recordId&&this.column?.dispatchEvent(new CustomEvent("delegated-event",{detail:{originalEvent:e,recordId:this.recordId}}))}
|
|
10102
|
-
for(const e of this.delegatedEvents)this.addEventListener(e,this.delegatedEventHandler)}}}e([g],
|
|
10103
|
-
const
|
|
10104
|
-
try{t=document.createElement(e)}catch(e){}if(!(t instanceof
|
|
10127
|
+
for(const e of this.delegatedEvents)this.addEventListener(e,this.delegatedEventHandler)}}}e([g],VO.prototype,"cellRecord",void 0),e([g],VO.prototype,"columnConfig",void 0),e([g],VO.prototype,"column",void 0),e([g],VO.prototype,"recordId",void 0)
|
|
10128
|
+
const HO=e=>((e=>{let t
|
|
10129
|
+
try{t=document.createElement(e)}catch(e){}if(!(t instanceof VO))throw new Error(`Cell view tag name (${e}) must evaluate to an element extending TableCellView`)})(e),G`
|
|
10105
10130
|
<${e}
|
|
10106
10131
|
:cellRecord="${e=>e.cellState?.cellRecord}"
|
|
10107
10132
|
:columnConfig="${e=>e.cellState?.columnConfig}"
|
|
@@ -10111,11 +10136,11 @@ try{t=document.createElement(e)}catch(e){}if(!(t instanceof XO))throw new Error(
|
|
|
10111
10136
|
>
|
|
10112
10137
|
</${e}>
|
|
10113
10138
|
`)
|
|
10114
|
-
class
|
|
10115
|
-
return!1}e([g],
|
|
10116
|
-
class
|
|
10117
|
-
class
|
|
10118
|
-
return!e.duplicateRecordId&&!e.missingRecordId&&!e.invalidRecordId}validateIdFieldConfiguration(e,t,n){const i=e!==
|
|
10139
|
+
class BO{constructor(e){this.uniqueId=wa("table-column-slot"),this.sortOperation=RO,this.dataRecordFieldNames=[],this.groupingDisabled=!1,this.fractionalWidth=PO,this.minPixelWidth=NO,this.resizingDisabled=!1,this.hideHeaderIndicators=!1,this.currentFractionalWidth=PO,this.sortingDisabled=!1,this.currentSortDirection=IO.none,this.cellRecordFieldNames=e.cellRecordFieldNames,this.cellViewTemplate=HO(e.cellViewTag),this.groupHeaderViewTemplate=zO(e.groupHeaderViewTag),this.delegatedEvents=e.delegatedEvents,this.sortOperation=e.sortOperation??RO,this.validator=e.validator}fractionalWidthChanged(){this.currentFractionalWidth=this.fractionalWidth}pixelWidthChanged(){this.currentPixelWidth=this.pixelWidth}}function qO(e,...t){for(const n of t)if(e===n)return!0
|
|
10140
|
+
return!1}e([g],BO.prototype,"columnConfig",void 0),e([g],BO.prototype,"operandDataRecordFieldName",void 0),e([g],BO.prototype,"sortOperation",void 0),e([g],BO.prototype,"dataRecordFieldNames",void 0),e([g],BO.prototype,"groupingDisabled",void 0),e([g],BO.prototype,"groupIndex",void 0),e([g],BO.prototype,"pixelWidth",void 0),e([g],BO.prototype,"fractionalWidth",void 0),e([g],BO.prototype,"minPixelWidth",void 0),e([g],BO.prototype,"resizingDisabled",void 0),e([g],BO.prototype,"hideHeaderIndicators",void 0),e([g],BO.prototype,"currentFractionalWidth",void 0),e([g],BO.prototype,"currentPixelWidth",void 0),e([g],BO.prototype,"sortingDisabled",void 0),e([g],BO.prototype,"currentSortIndex",void 0),e([g],BO.prototype,"currentSortDirection",void 0)
|
|
10141
|
+
class UO extends Vt{constructor(){super(...arguments),this.columnInternals=new BO(this.getColumnInternalsOptions()),this.columnHidden=!1,this.hasOverflow=!1}checkValidity(){return this.columnInternals.validator.isColumnValid}get validity(){return this.columnInternals.validator.getValidity()}get headerTextContent(){return this.contentSlot.assignedNodes().map((e=>e.textContent?.trim())).join(" ")}connectedCallback(){super.connectedCallback(),this.setAttribute("slot",this.columnInternals.uniqueId)}}e([le({attribute:"column-id"})],UO.prototype,"columnId",void 0),e([le({attribute:"action-menu-slot"})],UO.prototype,"actionMenuSlot",void 0),e([le({attribute:"action-menu-label"})],UO.prototype,"actionMenuLabel",void 0),e([le({attribute:"column-hidden",mode:"boolean"})],UO.prototype,"columnHidden",void 0),e([g],UO.prototype,"hasOverflow",void 0)
|
|
10142
|
+
class jO{constructor(){this.duplicateRecordId=!1,this.missingRecordId=!1,this.invalidRecordId=!1,this.duplicateColumnId=!1,this.missingColumnId=!1,this.duplicateSortIndex=!1,this.duplicateGroupIndex=!1,this.idFieldNameNotConfigured=!1,this.invalidColumnConfiguration=!1,this.invalidParentIdConfiguration=!1,this.recordIds=new Set}getValidity(){return{duplicateRecordId:this.duplicateRecordId,missingRecordId:this.missingRecordId,invalidRecordId:this.invalidRecordId,duplicateColumnId:this.duplicateColumnId,missingColumnId:this.missingColumnId,duplicateSortIndex:this.duplicateSortIndex,duplicateGroupIndex:this.duplicateGroupIndex,idFieldNameNotConfigured:this.idFieldNameNotConfigured,invalidColumnConfiguration:this.invalidColumnConfiguration,invalidParentIdConfiguration:this.invalidParentIdConfiguration}}isValid(){return Object.values(this.getValidity()).every((e=>!1===e))}areRecordIdsValid(){const e=this.getValidity()
|
|
10143
|
+
return!e.duplicateRecordId&&!e.missingRecordId&&!e.invalidRecordId}validateIdFieldConfiguration(e,t,n){const i=e!==DO.none||"string"==typeof n
|
|
10119
10144
|
return this.idFieldNameNotConfigured=!!i&&"string"!=typeof t,!this.idFieldNameNotConfigured}validateRecordIds(e,t){if(this.duplicateRecordId=!1,this.missingRecordId=!1,this.invalidRecordId=!1,this.recordIds.clear(),"string"!=typeof t)return!0
|
|
10120
10145
|
for(const n of e){if(!Object.prototype.hasOwnProperty.call(n,t)){this.missingRecordId=!0
|
|
10121
10146
|
continue}const e=n[t]
|
|
@@ -10124,7 +10149,7 @@ const t=e.some((e=>e))
|
|
|
10124
10149
|
if(!t)return!0
|
|
10125
10150
|
const n=new Set
|
|
10126
10151
|
for(const t of e)t?(n.has(t)&&(this.duplicateColumnId=!0),n.add(t)):this.missingColumnId=!0
|
|
10127
|
-
return!this.missingColumnId&&!this.duplicateColumnId}validateColumnSortIndices(e){return this.duplicateSortIndex=!this.validateIndicesAreUnique(e),!this.duplicateSortIndex}validateColumnGroupIndices(e){return this.duplicateGroupIndex=!this.validateIndicesAreUnique(e),!this.duplicateGroupIndex}validateColumnConfigurations(e){return this.invalidColumnConfiguration=e.some((e=>!e.columnInternals.validator.isColumnValid)),!this.invalidColumnConfiguration}getPresentRecordIds(e){return e.filter((e=>this.recordIds.has(e)))}getOptionsWithPresentIds(e){return e.filter((e=>this.recordIds.has(e.recordId)))}setParentIdConfigurationValidity(e){this.invalidParentIdConfiguration=!e}validateIndicesAreUnique(e){return new Set(e).size===e.length}}const
|
|
10152
|
+
return!this.missingColumnId&&!this.duplicateColumnId}validateColumnSortIndices(e){return this.duplicateSortIndex=!this.validateIndicesAreUnique(e),!this.duplicateSortIndex}validateColumnGroupIndices(e){return this.duplicateGroupIndex=!this.validateIndicesAreUnique(e),!this.duplicateGroupIndex}validateColumnConfigurations(e){return this.invalidColumnConfiguration=e.some((e=>!e.columnInternals.validator.isColumnValid)),!this.invalidColumnConfiguration}getPresentRecordIds(e){return e.filter((e=>this.recordIds.has(e)))}getOptionsWithPresentIds(e){return e.filter((e=>this.recordIds.has(e.recordId)))}setParentIdConfigurationValidity(e){this.invalidParentIdConfiguration=!e}validateIndicesAreUnique(e){return new Set(e).size===e.length}}const WO=xe`
|
|
10128
10153
|
${Ro("flex")}
|
|
10129
10154
|
|
|
10130
10155
|
:host {
|
|
@@ -10306,7 +10331,7 @@ return!this.missingColumnId&&!this.duplicateColumnId}validateColumnSortIndices(e
|
|
|
10306
10331
|
background-color: ${Ms(ss,.1)};
|
|
10307
10332
|
position: absolute;
|
|
10308
10333
|
}
|
|
10309
|
-
`)),
|
|
10334
|
+
`)),GO=xe`
|
|
10310
10335
|
${Ro("flex")}
|
|
10311
10336
|
|
|
10312
10337
|
:host {
|
|
@@ -10325,7 +10350,7 @@ return!this.missingColumnId&&!this.duplicateColumnId}validateColumnSortIndices(e
|
|
|
10325
10350
|
.grouped-indicator {
|
|
10326
10351
|
flex: 0 0 auto;
|
|
10327
10352
|
}
|
|
10328
|
-
`,
|
|
10353
|
+
`,ZO=G`
|
|
10329
10354
|
<template role="columnheader"
|
|
10330
10355
|
aria-sort="${e=>e.ariaSort}"
|
|
10331
10356
|
${""}
|
|
@@ -10335,14 +10360,14 @@ return!this.missingColumnId&&!this.duplicateColumnId}validateColumnSortIndices(e
|
|
|
10335
10360
|
|
|
10336
10361
|
${He((e=>!e.indicatorsHidden),G`
|
|
10337
10362
|
${""}
|
|
10338
|
-
${He((e=>e.sortDirection===
|
|
10363
|
+
${He((e=>e.sortDirection===IO.ascending),G`
|
|
10339
10364
|
<${bg}
|
|
10340
10365
|
class="sort-indicator"
|
|
10341
10366
|
title="${e=>nv.getValueFor(e)}"
|
|
10342
10367
|
aria-hidden="true"
|
|
10343
10368
|
></${bg}>
|
|
10344
10369
|
`)}
|
|
10345
|
-
${He((e=>e.sortDirection===
|
|
10370
|
+
${He((e=>e.sortDirection===IO.descending),G`
|
|
10346
10371
|
<${gg}
|
|
10347
10372
|
class="sort-indicator"
|
|
10348
10373
|
title="${e=>iv.getValueFor(e)}"
|
|
@@ -10360,10 +10385,10 @@ return!this.missingColumnId&&!this.duplicateColumnId}validateColumnSortIndices(e
|
|
|
10360
10385
|
`)}
|
|
10361
10386
|
</template>
|
|
10362
10387
|
`
|
|
10363
|
-
class
|
|
10364
|
-
const
|
|
10365
|
-
yi.getOrCreate().withPrefix("nimble").register(
|
|
10366
|
-
const
|
|
10388
|
+
class KO extends Vt{constructor(){super(...arguments),this.sortDirection=IO.none,this.firstSortedColumn=!1,this.indicatorsHidden=!1,this.isGrouped=!1}sortDirectionChanged(e,t){this.updateAriaSort()}firstSortedColumnChanged(e,t){this.updateAriaSort()}updateAriaSort(){this.firstSortedColumn&&this.sortDirection!==IO.none?this.sortDirection===IO.ascending?this.ariaSort="ascending":this.ariaSort="descending":this.ariaSort=null}}e([le({attribute:"sort-direction"})],KO.prototype,"sortDirection",void 0),e([le({attribute:"first-sorted-column",mode:"boolean"})],KO.prototype,"firstSortedColumn",void 0),e([le({attribute:"indicators-hidden",mode:"boolean"})],KO.prototype,"indicatorsHidden",void 0),e([g],KO.prototype,"isGrouped",void 0)
|
|
10389
|
+
const XO=KO.compose({baseName:"table-header",template:ZO,styles:GO})
|
|
10390
|
+
yi.getOrCreate().withPrefix("nimble").register(XO())
|
|
10391
|
+
const YO="nimble-table-header",JO=xe`
|
|
10367
10392
|
:host .animating {
|
|
10368
10393
|
transition: ${kd} ease-in;
|
|
10369
10394
|
}
|
|
@@ -10386,9 +10411,9 @@ const aR="nimble-table-header",lR=xe`
|
|
|
10386
10411
|
transition-duration: 0s;
|
|
10387
10412
|
}
|
|
10388
10413
|
}
|
|
10389
|
-
`,
|
|
10414
|
+
`,QO=xe`
|
|
10390
10415
|
${Ro("flex")}
|
|
10391
|
-
${
|
|
10416
|
+
${JO}
|
|
10392
10417
|
|
|
10393
10418
|
:host {
|
|
10394
10419
|
width: fit-content;
|
|
@@ -10513,7 +10538,7 @@ const aR="nimble-table-header",lR=xe`
|
|
|
10513
10538
|
:host([selected]:hover)::before {
|
|
10514
10539
|
background-color: ${Ms(ss,.2)};
|
|
10515
10540
|
}
|
|
10516
|
-
`)),
|
|
10541
|
+
`)),eR=xe`
|
|
10517
10542
|
${Ro("flex")}
|
|
10518
10543
|
|
|
10519
10544
|
:host {
|
|
@@ -10541,7 +10566,7 @@ const aR="nimble-table-header",lR=xe`
|
|
|
10541
10566
|
height: ${nl};
|
|
10542
10567
|
align-self: center;
|
|
10543
10568
|
}
|
|
10544
|
-
`,
|
|
10569
|
+
`,tR=G`
|
|
10545
10570
|
<template role="cell" style="--ni-private-table-cell-nesting-level: ${e=>e.nestingLevel}">
|
|
10546
10571
|
${e=>e.cellViewTemplate}
|
|
10547
10572
|
${He((e=>e.hasActionMenu),G`
|
|
@@ -10561,10 +10586,10 @@ const aR="nimble-table-header",lR=xe`
|
|
|
10561
10586
|
`)}
|
|
10562
10587
|
</template>
|
|
10563
10588
|
`
|
|
10564
|
-
class
|
|
10565
|
-
const
|
|
10566
|
-
yi.getOrCreate().withPrefix("nimble").register(
|
|
10567
|
-
const
|
|
10589
|
+
class nR extends Vt{constructor(){super(...arguments),this.hasActionMenu=!1,this.menuOpen=!1,this.nestingLevel=0}onActionMenuBeforeToggle(e){this.$emit("cell-action-menu-beforetoggle",e.detail)}onActionMenuToggle(e){this.menuOpen=e.detail.newState,this.$emit("cell-action-menu-toggle",e.detail)}}e([g],nR.prototype,"cellState",void 0),e([g],nR.prototype,"column",void 0),e([g],nR.prototype,"recordId",void 0),e([le({attribute:"column-id"})],nR.prototype,"columnId",void 0),e([le({attribute:"has-action-menu",mode:"boolean"})],nR.prototype,"hasActionMenu",void 0),e([le({attribute:"menu-open",mode:"boolean"})],nR.prototype,"menuOpen",void 0),e([le({attribute:"action-menu-label"})],nR.prototype,"actionMenuLabel",void 0),e([g],nR.prototype,"cellViewTemplate",void 0),e([g],nR.prototype,"nestingLevel",void 0)
|
|
10590
|
+
const iR=nR.compose({baseName:"table-cell",template:tR,styles:eR})
|
|
10591
|
+
yi.getOrCreate().withPrefix("nimble").register(iR())
|
|
10592
|
+
const oR="nimble-table-cell",sR=G`
|
|
10568
10593
|
<template
|
|
10569
10594
|
role="row"
|
|
10570
10595
|
aria-selected=${e=>e.ariaSelected}
|
|
@@ -10590,12 +10615,12 @@ const fR="nimble-table-cell",mR=G`
|
|
|
10590
10615
|
${He((e=>e.isParentRow),G`
|
|
10591
10616
|
${He((e=>e.loading),G`
|
|
10592
10617
|
<span class="spinner-container">
|
|
10593
|
-
<${
|
|
10594
|
-
appearance="${
|
|
10618
|
+
<${bT}
|
|
10619
|
+
appearance="${mT.accent}"
|
|
10595
10620
|
aria-label="${e=>lv.getValueFor(e)}"
|
|
10596
10621
|
title="${e=>lv.getValueFor(e)}"
|
|
10597
10622
|
>
|
|
10598
|
-
</${
|
|
10623
|
+
</${bT}>
|
|
10599
10624
|
</span>
|
|
10600
10625
|
`)}
|
|
10601
10626
|
${He((e=>!e.loading),G`
|
|
@@ -10618,7 +10643,7 @@ const fR="nimble-table-cell",mR=G`
|
|
|
10618
10643
|
>
|
|
10619
10644
|
${Ge((e=>e.columns),G`
|
|
10620
10645
|
${He((e=>!e.columnHidden),G`
|
|
10621
|
-
<${
|
|
10646
|
+
<${oR}
|
|
10622
10647
|
class="cell"
|
|
10623
10648
|
:cellState="${(e,t)=>t.parent.cellStates[t.index]}"
|
|
10624
10649
|
:cellViewTemplate="${e=>e.columnInternals.cellViewTemplate}"
|
|
@@ -10638,29 +10663,29 @@ const fR="nimble-table-cell",mR=G`
|
|
|
10638
10663
|
slot="cellActionMenu"
|
|
10639
10664
|
></slot>
|
|
10640
10665
|
`)}
|
|
10641
|
-
</${
|
|
10666
|
+
</${oR}>
|
|
10642
10667
|
`)}
|
|
10643
10668
|
`,{recycle:!1,positioning:!0})}
|
|
10644
10669
|
</span>
|
|
10645
10670
|
</template>
|
|
10646
10671
|
`
|
|
10647
|
-
class
|
|
10672
|
+
class rR extends Vt{constructor(){super(...arguments),this.selectable=!1,this.selected=!1,this.hideSelection=!1,this.expanded=!1,this.columnNotifiers=[],this.columns=[],this.nestingLevel=0,this.isParentRow=!1,this.menuOpen=!1,this.rowOperationGridCellHidden=!1,this.loading=!1,this.cellIndentLevels=[],this.cellStates=[],this.animationClass="",this.ignoreSelectionChangeEvents=!1,this.removeAnimatingClass=()=>{this.animationClass="",this.expandIcon?.removeEventListener("transitionend",this.removeAnimatingClass)}}get isTopLevelParentRow(){return this.isParentRow&&0===this.nestingLevel}get isNestedParent(){return this.isParentRow&&this.nestingLevel>0}get ariaSelected(){return this.selectable?this.selected?"true":"false":null}onSelectionChange(e){if(this.ignoreSelectionChangeEvents)return
|
|
10648
10673
|
const t=e.target.checked
|
|
10649
10674
|
this.selected=t
|
|
10650
10675
|
const n={oldState:!t,newState:t}
|
|
10651
|
-
this.$emit("row-selection-toggle",n)}onCellActionMenuBeforeToggle(e,t){this.currentActionMenuColumn=t,this.emitActionMenuToggleEvent("row-action-menu-beforetoggle",e.detail,t)}onCellActionMenuToggle(e,t){this.menuOpen=e.detail.newState,this.emitActionMenuToggleEvent("row-action-menu-toggle",e.detail,t)}closeOpenActionMenus(){if(this.menuOpen){const e=Array.from(this.cellContainer.children).find((e=>e instanceof
|
|
10652
|
-
e?.actionMenuButton?.open&&e.actionMenuButton.toggleButton.control.click()}}handleChange(e,t){e instanceof
|
|
10676
|
+
this.$emit("row-selection-toggle",n)}onCellActionMenuBeforeToggle(e,t){this.currentActionMenuColumn=t,this.emitActionMenuToggleEvent("row-action-menu-beforetoggle",e.detail,t)}onCellActionMenuToggle(e,t){this.menuOpen=e.detail.newState,this.emitActionMenuToggleEvent("row-action-menu-toggle",e.detail,t)}closeOpenActionMenus(){if(this.menuOpen){const e=Array.from(this.cellContainer.children).find((e=>e instanceof nR&&e.menuOpen))
|
|
10677
|
+
e?.actionMenuButton?.open&&e.actionMenuButton.toggleButton.control.click()}}handleChange(e,t){e instanceof BO&&"string"==typeof t&&(qO(t,"columnConfig")||qO(t,"dataRecordFieldNames"))&&this.updateCellStates()}onRowExpandToggle(e){const t={oldState:this.expanded,newState:!this.expanded,recordId:this.recordId}
|
|
10653
10678
|
this.$emit("row-expand-toggle",t),e.stopImmediatePropagation(),this.animationClass="animating",this.expandIcon?.addEventListener("transitionend",this.removeAnimatingClass)}emitActionMenuToggleEvent(e,t,n){const i={newState:t.newState,oldState:t.oldState,recordIds:[this.recordId],columnId:n.columnId}
|
|
10654
10679
|
this.$emit(e,i)}columnsChanged(){this.updateCellIndentLevels(),this.updateCellStates(),this.observeColumns()}dataRecordChanged(){this.updateCellStates()}nestingLevelChanged(){this.updateCellIndentLevels()}updateCellIndentLevels(){this.cellIndentLevels=this.columns.map(((e,t)=>0===t?this.nestingLevel:0))}removeColumnObservers(){this.columnNotifiers.forEach((e=>{e.unsubscribe(this)})),this.columnNotifiers=[]}observeColumns(){this.removeColumnObservers(),this.columnNotifiers=this.columns.map((e=>{const t=m.getNotifier(e.columnInternals)
|
|
10655
10680
|
return t.subscribe(this),t}))}updateCellStates(){this.cellStates=this.columns.map((e=>{const t=e.columnInternals.dataRecordFieldNames
|
|
10656
10681
|
let n
|
|
10657
10682
|
if(this.hasValidFieldNames(t)&&this.dataRecord){const i=t.map((e=>this.dataRecord[e]))
|
|
10658
|
-
n={cellRecord:Object.fromEntries(e.columnInternals.cellRecordFieldNames.map(((e,t)=>[e,i[t]]))),columnConfig:e.columnInternals.columnConfig}}return n}))}hasValidFieldNames(e){return e.every((e=>void 0!==e))}selectedChanged(){this.setSelectionCheckboxState()}selectionCheckboxChanged(){this.setSelectionCheckboxState()}setSelectionCheckboxState(){this.selectionCheckbox&&(this.ignoreSelectionChangeEvents=!0,this.selectionCheckbox.checked=this.selected,this.ignoreSelectionChangeEvents=!1)}}e([le({attribute:"record-id"})],
|
|
10659
|
-
const
|
|
10660
|
-
yi.getOrCreate().withPrefix("nimble").register(
|
|
10661
|
-
const
|
|
10683
|
+
n={cellRecord:Object.fromEntries(e.columnInternals.cellRecordFieldNames.map(((e,t)=>[e,i[t]]))),columnConfig:e.columnInternals.columnConfig}}return n}))}hasValidFieldNames(e){return e.every((e=>void 0!==e))}selectedChanged(){this.setSelectionCheckboxState()}selectionCheckboxChanged(){this.setSelectionCheckboxState()}setSelectionCheckboxState(){this.selectionCheckbox&&(this.ignoreSelectionChangeEvents=!0,this.selectionCheckbox.checked=this.selected,this.ignoreSelectionChangeEvents=!1)}}e([le({attribute:"record-id"})],rR.prototype,"recordId",void 0),e([le({mode:"boolean"})],rR.prototype,"selectable",void 0),e([le({mode:"boolean"})],rR.prototype,"selected",void 0),e([le({attribute:"hide-selection",mode:"boolean"})],rR.prototype,"hideSelection",void 0),e([le({mode:"boolean"})],rR.prototype,"expanded",void 0),e([g],rR.prototype,"dataRecord",void 0),e([g],rR.prototype,"columns",void 0),e([g],rR.prototype,"currentActionMenuColumn",void 0),e([g],rR.prototype,"nestingLevel",void 0),e([le({attribute:"is-parent-row",mode:"boolean"})],rR.prototype,"isParentRow",void 0),e([le({attribute:"menu-open",mode:"boolean"})],rR.prototype,"menuOpen",void 0),e([le({attribute:"row-operation-grid-cell-hidden",mode:"boolean"})],rR.prototype,"rowOperationGridCellHidden",void 0),e([le({mode:"boolean"})],rR.prototype,"loading",void 0),e([g],rR.prototype,"cellIndentLevels",void 0),e([g],rR.prototype,"cellStates",void 0),e([g],rR.prototype,"selectionCheckbox",void 0),e([g],rR.prototype,"animationClass",void 0),e([v],rR.prototype,"isTopLevelParentRow",null),e([v],rR.prototype,"isNestedParent",null),e([v],rR.prototype,"ariaSelected",null)
|
|
10684
|
+
const aR=rR.compose({baseName:"table-row",template:sR,styles:QO})
|
|
10685
|
+
yi.getOrCreate().withPrefix("nimble").register(aR())
|
|
10686
|
+
const lR="nimble-table-row",cR=xe`
|
|
10662
10687
|
${Ro("grid")}
|
|
10663
|
-
${
|
|
10688
|
+
${JO}
|
|
10664
10689
|
|
|
10665
10690
|
:host {
|
|
10666
10691
|
align-items: center;
|
|
@@ -10741,7 +10766,7 @@ const bR="nimble-table-row",yR=xe`
|
|
|
10741
10766
|
:host(:hover)::before {
|
|
10742
10767
|
background-color: ${Ms(ss,.1)};
|
|
10743
10768
|
}
|
|
10744
|
-
`)),
|
|
10769
|
+
`)),dR=G`
|
|
10745
10770
|
<template
|
|
10746
10771
|
role="row"
|
|
10747
10772
|
@click=${e=>e.onGroupExpandToggle()}
|
|
@@ -10781,14 +10806,14 @@ const bR="nimble-table-row",yR=xe`
|
|
|
10781
10806
|
</div>
|
|
10782
10807
|
</template>
|
|
10783
10808
|
`
|
|
10784
|
-
class
|
|
10809
|
+
class hR extends Vt{constructor(){super(...arguments),this.nestingLevel=0,this.expanded=!1,this.selectable=!1,this.selectionState=AO,this.animationClass="",this.ignoreSelectionChangeEvents=!1,this.removeAnimatingClass=()=>{this.animationClass="",this.expandIcon.removeEventListener("transitionend",this.removeAnimatingClass)}}onGroupExpandToggle(){this.$emit("group-expand-toggle"),this.animationClass="animating",this.expandIcon.addEventListener("transitionend",this.removeAnimatingClass)}onSelectionChange(e){if(this.ignoreSelectionChangeEvents)return
|
|
10785
10810
|
const t=e.target.checked
|
|
10786
|
-
this.selectionState=t?
|
|
10811
|
+
this.selectionState=t?TO:AO
|
|
10787
10812
|
const n={oldState:!t,newState:t}
|
|
10788
|
-
this.$emit("group-selection-toggle",n)}selectionStateChanged(){this.setSelectionCheckboxState()}selectionCheckboxChanged(){this.setSelectionCheckboxState()}setSelectionCheckboxState(){this.selectionCheckbox&&(this.ignoreSelectionChangeEvents=!0,this.selectionCheckbox.checked=this.selectionState===
|
|
10789
|
-
const
|
|
10790
|
-
yi.getOrCreate().withPrefix("nimble").register(
|
|
10791
|
-
const
|
|
10813
|
+
this.$emit("group-selection-toggle",n)}selectionStateChanged(){this.setSelectionCheckboxState()}selectionCheckboxChanged(){this.setSelectionCheckboxState()}setSelectionCheckboxState(){this.selectionCheckbox&&(this.ignoreSelectionChangeEvents=!0,this.selectionCheckbox.checked=this.selectionState===TO,this.selectionCheckbox.indeterminate=this.selectionState===OO,this.ignoreSelectionChangeEvents=!1)}}e([g],hR.prototype,"groupRowValue",void 0),e([g],hR.prototype,"nestingLevel",void 0),e([g],hR.prototype,"immediateChildCount",void 0),e([g],hR.prototype,"groupColumn",void 0),e([le({mode:"boolean"})],hR.prototype,"expanded",void 0),e([le({mode:"boolean"})],hR.prototype,"selectable",void 0),e([le({attribute:"selection-state"})],hR.prototype,"selectionState",void 0),e([g],hR.prototype,"selectionCheckbox",void 0),e([g],hR.prototype,"animationClass",void 0)
|
|
10814
|
+
const uR=hR.compose({baseName:"table-group-row",template:dR,styles:cR})
|
|
10815
|
+
yi.getOrCreate().withPrefix("nimble").register(uR())
|
|
10816
|
+
const pR="nimble-table-group-row",fR=G`
|
|
10792
10817
|
<template
|
|
10793
10818
|
role="treegrid"
|
|
10794
10819
|
aria-multiselectable="${e=>e.ariaMultiSelectable}"
|
|
@@ -10814,7 +10839,7 @@ const kR="nimble-table-group-row",SR=G`
|
|
|
10814
10839
|
${e=>av.getValueFor(e)}
|
|
10815
10840
|
</span>
|
|
10816
10841
|
`)}
|
|
10817
|
-
${He((e=>e.selectionMode===
|
|
10842
|
+
${He((e=>e.selectionMode===DO.multiple),G`
|
|
10818
10843
|
<span class="checkbox-container">
|
|
10819
10844
|
<${Lm}
|
|
10820
10845
|
${Pe("selectionCheckbox")}
|
|
@@ -10852,16 +10877,16 @@ const kR="nimble-table-group-row",SR=G`
|
|
|
10852
10877
|
@mousedown="${(e,t)=>t.parent.onLeftDividerMouseDown(t.event,t.index)}">
|
|
10853
10878
|
</div>
|
|
10854
10879
|
`)}
|
|
10855
|
-
<${
|
|
10880
|
+
<${YO}
|
|
10856
10881
|
class="header"
|
|
10857
|
-
sort-direction="${e=>"number"==typeof e.columnInternals.currentSortIndex?e.columnInternals.currentSortDirection:
|
|
10882
|
+
sort-direction="${e=>"number"==typeof e.columnInternals.currentSortIndex?e.columnInternals.currentSortDirection:IO.none}"
|
|
10858
10883
|
?first-sorted-column="${(e,t)=>e===t.parent.firstSortedColumn}"
|
|
10859
10884
|
?indicators-hidden="${e=>e.columnInternals.hideHeaderIndicators}"
|
|
10860
10885
|
@click="${(e,t)=>t.parent.toggleColumnSort(e,t.event.shiftKey)}"
|
|
10861
10886
|
:isGrouped=${e=>"number"==typeof e.columnInternals.groupIndex&&!e.columnInternals.groupingDisabled}
|
|
10862
10887
|
>
|
|
10863
10888
|
<slot name="${e=>e.slot}"></slot>
|
|
10864
|
-
</${
|
|
10889
|
+
</${YO}>
|
|
10865
10890
|
${He(((e,t)=>t.index<t.length-1),G`
|
|
10866
10891
|
<div
|
|
10867
10892
|
class="
|
|
@@ -10882,33 +10907,33 @@ const kR="nimble-table-group-row",SR=G`
|
|
|
10882
10907
|
</div>
|
|
10883
10908
|
<div class="table-viewport" ${Pe("viewport")}>
|
|
10884
10909
|
<div class="table-scroll"></div>
|
|
10885
|
-
<div class="table-row-container" ${Qe({property:"rowElements",filter:Ze(
|
|
10910
|
+
<div class="table-row-container" ${Qe({property:"rowElements",filter:Ze(lR)})}
|
|
10886
10911
|
role="rowgroup">
|
|
10887
10912
|
${He((e=>e.columns.length>0&&e.canRenderRows),G`
|
|
10888
10913
|
${Ge((e=>e.virtualizer.visibleItems),G`
|
|
10889
10914
|
${He(((e,t)=>t.parent.tableData[e.index]?.isGroupRow),G`
|
|
10890
|
-
<${
|
|
10915
|
+
<${pR}
|
|
10891
10916
|
class="group-row"
|
|
10892
10917
|
:groupRowValue="${(e,t)=>t.parent.tableData[e.index]?.groupRowValue}"
|
|
10893
10918
|
?expanded="${(e,t)=>t.parent.tableData[e.index]?.isExpanded}"
|
|
10894
10919
|
:nestingLevel="${(e,t)=>t.parent.tableData[e.index]?.nestingLevel}"
|
|
10895
10920
|
:immediateChildCount="${(e,t)=>t.parent.tableData[e.index]?.immediateChildCount}"
|
|
10896
10921
|
:groupColumn="${(e,t)=>t.parent.tableData[e.index]?.groupColumn}"
|
|
10897
|
-
?selectable="${(e,t)=>t.parent.selectionMode===
|
|
10922
|
+
?selectable="${(e,t)=>t.parent.selectionMode===DO.multiple}"
|
|
10898
10923
|
selection-state="${(e,t)=>t.parent.tableData[e.index]?.selectionState}"
|
|
10899
10924
|
@group-selection-toggle="${(e,t)=>t.parent.onRowSelectionToggle(e.index,t.event)}"
|
|
10900
10925
|
@group-expand-toggle="${(e,t)=>t.parent.handleGroupRowExpanded(e.index,t.event)}"
|
|
10901
10926
|
>
|
|
10902
|
-
</${
|
|
10927
|
+
</${pR}>
|
|
10903
10928
|
`)}
|
|
10904
10929
|
${He(((e,t)=>!t.parent.tableData[e.index]?.isGroupRow),G`
|
|
10905
|
-
<${
|
|
10930
|
+
<${lR}
|
|
10906
10931
|
class="row"
|
|
10907
10932
|
record-id="${(e,t)=>t.parent.tableData[e.index]?.id}"
|
|
10908
|
-
?selectable="${(e,t)=>t.parent.selectionMode!==
|
|
10909
|
-
?selected="${(e,t)=>t.parent.tableData[e.index]?.selectionState===
|
|
10933
|
+
?selectable="${(e,t)=>t.parent.selectionMode!==DO.none}"
|
|
10934
|
+
?selected="${(e,t)=>t.parent.tableData[e.index]?.selectionState===TO}"
|
|
10910
10935
|
?expanded="${(e,t)=>t.parent.tableData[e.index]?.isExpanded}"
|
|
10911
|
-
?hide-selection="${(e,t)=>t.parent.selectionMode!==
|
|
10936
|
+
?hide-selection="${(e,t)=>t.parent.selectionMode!==DO.multiple}"
|
|
10912
10937
|
:dataRecord="${(e,t)=>t.parent.tableData[e.index]?.record}"
|
|
10913
10938
|
:columns="${(e,t)=>t.parent.columns}"
|
|
10914
10939
|
:isParentRow="${(e,t)=>t.parent.tableData[e.index]?.isParentRow}"
|
|
@@ -10930,7 +10955,7 @@ const kR="nimble-table-group-row",SR=G`
|
|
|
10930
10955
|
</slot>
|
|
10931
10956
|
`)}
|
|
10932
10957
|
`)}
|
|
10933
|
-
</${
|
|
10958
|
+
</${lR}>
|
|
10934
10959
|
`)}
|
|
10935
10960
|
`)}
|
|
10936
10961
|
`)}
|
|
@@ -10940,7 +10965,7 @@ const kR="nimble-table-group-row",SR=G`
|
|
|
10940
10965
|
</div>
|
|
10941
10966
|
</template>
|
|
10942
10967
|
`
|
|
10943
|
-
function
|
|
10968
|
+
function mR(e,t,n){let i,o=n.initialDeps??[]
|
|
10944
10969
|
return()=>{var s,r,a,l
|
|
10945
10970
|
let c
|
|
10946
10971
|
n.key&&(null==(s=n.debug)?void 0:s.call(n))&&(c=Date.now())
|
|
@@ -10949,11 +10974,11 @@ if(!(d.length!==o.length||d.some(((e,t)=>o[t]!==e))))return i
|
|
|
10949
10974
|
let h
|
|
10950
10975
|
if(o=d,n.key&&(null==(r=n.debug)?void 0:r.call(n))&&(h=Date.now()),i=t(...d),n.key&&(null==(a=n.debug)?void 0:a.call(n))){const e=Math.round(100*(Date.now()-c))/100,t=Math.round(100*(Date.now()-h))/100,i=t/16,o=(e,t)=>{for(e=String(e);e.length<t;)e=" "+e
|
|
10951
10976
|
return e}
|
|
10952
|
-
console.info(`%c⏱ ${o(t,5)} /${o(e,5)} ms`,`\n font-size: .6rem;\n font-weight: bold;\n color: hsl(${Math.max(0,Math.min(120-120*i,120))}deg 100% 31%);`,null==n?void 0:n.key)}return null==(l=null==n?void 0:n.onChange)||l.call(n,i),i}}function
|
|
10953
|
-
return e}const
|
|
10954
|
-
return function(...i){clearTimeout(n),n=setTimeout((()=>e.apply(this,i)),t)}},
|
|
10977
|
+
console.info(`%c⏱ ${o(t,5)} /${o(e,5)} ms`,`\n font-size: .6rem;\n font-weight: bold;\n color: hsl(${Math.max(0,Math.min(120-120*i,120))}deg 100% 31%);`,null==n?void 0:n.key)}return null==(l=null==n?void 0:n.onChange)||l.call(n,i),i}}function gR(e,t){if(void 0===e)throw new Error("Unexpected undefined")
|
|
10978
|
+
return e}const vR=(e,t)=>{let n
|
|
10979
|
+
return function(...i){clearTimeout(n),n=setTimeout((()=>e.apply(this,i)),t)}},bR=e=>e,yR=e=>{const t=Math.max(e.startIndex-e.overscan,0),n=Math.min(e.endIndex+e.overscan,e.count-1),i=[]
|
|
10955
10980
|
for(let e=t;e<=n;e++)i.push(e)
|
|
10956
|
-
return i},
|
|
10981
|
+
return i},wR=(e,t)=>{const n=e.scrollElement
|
|
10957
10982
|
if(!n)return
|
|
10958
10983
|
const i=e=>{const{width:n,height:i}=e
|
|
10959
10984
|
t({width:Math.round(n),height:Math.round(i)})}
|
|
@@ -10961,19 +10986,19 @@ if(i(n.getBoundingClientRect()),"undefined"==typeof ResizeObserver)return()=>{}
|
|
|
10961
10986
|
const o=new ResizeObserver((e=>{const t=e[0]
|
|
10962
10987
|
if(null==t?void 0:t.borderBoxSize){const e=t.borderBoxSize[0]
|
|
10963
10988
|
if(e)return void i({width:e.inlineSize,height:e.blockSize})}i(n.getBoundingClientRect())}))
|
|
10964
|
-
return o.observe(n,{box:"border-box"}),()=>{o.unobserve(n)}},
|
|
10989
|
+
return o.observe(n,{box:"border-box"}),()=>{o.unobserve(n)}},xR={passive:!0},CR="undefined"==typeof window||"onscrollend"in window,kR=(e,t)=>{const n=e.scrollElement
|
|
10965
10990
|
if(!n)return
|
|
10966
10991
|
let i=0
|
|
10967
|
-
const o=
|
|
10968
|
-
return a(),n.addEventListener("scroll",r,
|
|
10969
|
-
if(e){return Math.round(e[n.options.horizontal?"inlineSize":"blockSize"])}}return Math.round(e.getBoundingClientRect()[n.options.horizontal?"width":"height"])}
|
|
10992
|
+
const o=CR?()=>{}:vR((()=>{t(i,!1)}),e.options.isScrollingResetDelay),s=s=>()=>{i=n[e.options.horizontal?"scrollLeft":"scrollTop"],o(),t(i,s)},r=s(!0),a=s(!1)
|
|
10993
|
+
return a(),n.addEventListener("scroll",r,xR),n.addEventListener("scrollend",a,xR),()=>{n.removeEventListener("scroll",r),n.removeEventListener("scrollend",a)}},SR=(e,t,n)=>{if(null==t?void 0:t.borderBoxSize){const e=t.borderBoxSize[0]
|
|
10994
|
+
if(e){return Math.round(e[n.options.horizontal?"inlineSize":"blockSize"])}}return Math.round(e.getBoundingClientRect()[n.options.horizontal?"width":"height"])},$R=(e,{adjustments:t=0,behavior:n},i)=>{var o,s
|
|
10970
10995
|
const r=e+t
|
|
10971
10996
|
null==(s=null==(o=i.scrollElement)?void 0:o.scrollTo)||s.call(o,{[i.options.horizontal?"left":"top"]:r,behavior:n})}
|
|
10972
|
-
const
|
|
10997
|
+
const MR=(e,t,n,i)=>{for(;e<=t;){const o=(e+t)/2|0,s=n(o)
|
|
10973
10998
|
if(s<i)e=o+1
|
|
10974
10999
|
else{if(!(s>i))return o
|
|
10975
11000
|
t=o-1}}return e>0?e-1:0}
|
|
10976
|
-
class
|
|
11001
|
+
class _R{constructor(e,t){this.visibleItems=[],this.scrollHeight=0,this.headerContainerMarginRight=0,this.rowContainerYOffset=0,this.table=e,this.tanStackTable=t,this.viewportResizeObserver=new ResizeObserver((e=>{const t=e[0]?.borderBoxSize[0]
|
|
10977
11002
|
if(t){const e=t.inlineSize
|
|
10978
11003
|
this.headerContainerMarginRight=e-this.table.viewport.clientWidth}}))}connect(){this.viewportResizeObserver.observe(this.table.viewport),this.updateVirtualizer(),this.table.viewport.scrollTo({top:this.virtualizer.scrollOffset})}disconnect(){this.viewportResizeObserver.disconnect()}dataChanged(){this.table.$fastController.isConnected&&this.updateVirtualizer()}updateVirtualizer(){const e=this.createVirtualizerOptions()
|
|
10979
11004
|
this.virtualizer?this.virtualizer.setOptions(e):this.virtualizer=new class{constructor(e){this.unsubs=[],this.scrollElement=null,this.isScrolling=!1,this.scrollToIndexTimeoutId=null,this.measurementsCache=[],this.itemSizeCache=new Map,this.pendingMeasuredCacheIndexes=[],this.scrollDirection=null,this.scrollAdjustments=0,this.measureElementCache=new Map,this.observer=(()=>{let e=null
|
|
@@ -10981,36 +11006,36 @@ const t=()=>e||("undefined"!=typeof ResizeObserver?e=new ResizeObserver((e=>{e.f
|
|
|
10981
11006
|
return{disconnect:()=>{var e
|
|
10982
11007
|
return null==(e=t())?void 0:e.disconnect()},observe:e=>{var n
|
|
10983
11008
|
return null==(n=t())?void 0:n.observe(e,{box:"border-box"})},unobserve:e=>{var n
|
|
10984
|
-
return null==(n=t())?void 0:n.unobserve(e)}}})(),this.range=null,this.setOptions=e=>{Object.entries(e).forEach((([t,n])=>{void 0===n&&delete e[t]})),this.options={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:
|
|
11009
|
+
return null==(n=t())?void 0:n.unobserve(e)}}})(),this.range=null,this.setOptions=e=>{Object.entries(e).forEach((([t,n])=>{void 0===n&&delete e[t]})),this.options={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:bR,rangeExtractor:yR,onChange:()=>{},measureElement:SR,initialRect:{width:0,height:0},scrollMargin:0,gap:0,indexAttribute:"data-index",initialMeasurementsCache:[],lanes:1,isScrollingResetDelay:150,...e}},this.notify=(e,t)=>{var n,i
|
|
10985
11010
|
const{startIndex:o,endIndex:s}=this.range??{startIndex:void 0,endIndex:void 0},r=this.calculateRange();(e||o!==(null==r?void 0:r.startIndex)||s!==(null==r?void 0:r.endIndex))&&(null==(i=(n=this.options).onChange)||i.call(n,this,t))},this.cleanup=()=>{this.unsubs.filter(Boolean).forEach((e=>e())),this.unsubs=[],this.scrollElement=null},this._didMount=()=>(this.measureElementCache.forEach(this.observer.observe),()=>{this.observer.disconnect(),this.cleanup()}),this._willUpdate=()=>{const e=this.options.getScrollElement()
|
|
10986
11011
|
this.scrollElement!==e&&(this.cleanup(),this.scrollElement=e,this._scrollToOffset(this.scrollOffset,{adjustments:void 0,behavior:void 0}),this.unsubs.push(this.options.observeElementRect(this,(e=>{this.scrollRect=e,this.notify(!1,!1)}))),this.unsubs.push(this.options.observeElementOffset(this,((e,t)=>{this.scrollAdjustments=0,this.scrollDirection=t?this.scrollOffset<e?"forward":"backward":null,this.scrollOffset=e
|
|
10987
11012
|
const n=this.isScrolling
|
|
10988
|
-
this.isScrolling=t,this.notify(n!==t,t)}))))},this.getSize=()=>this.scrollRect[this.options.horizontal?"width":"height"],this.getMeasurementOptions
|
|
11013
|
+
this.isScrolling=t,this.notify(n!==t,t)}))))},this.getSize=()=>this.scrollRect[this.options.horizontal?"width":"height"],this.getMeasurementOptions=mR((()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey]),((e,t,n,i)=>(this.pendingMeasuredCacheIndexes=[],{count:e,paddingStart:t,scrollMargin:n,getItemKey:i})),{key:!1}),this.getFurthestMeasurement=(e,t)=>{const n=new Map,i=new Map
|
|
10989
11014
|
for(let o=t-1;o>=0;o--){const t=e[o]
|
|
10990
11015
|
if(n.has(t.lane))continue
|
|
10991
11016
|
const s=i.get(t.lane)
|
|
10992
|
-
if(null==s||t.end>s.end?i.set(t.lane,t):t.end<s.end&&n.set(t.lane,!0),n.size===this.options.lanes)break}return i.size===this.options.lanes?Array.from(i.values()).sort(((e,t)=>e.end===t.end?e.index-t.index:e.end-t.end))[0]:void 0},this.getMeasurements
|
|
11017
|
+
if(null==s||t.end>s.end?i.set(t.lane,t):t.end<s.end&&n.set(t.lane,!0),n.size===this.options.lanes)break}return i.size===this.options.lanes?Array.from(i.values()).sort(((e,t)=>e.end===t.end?e.index-t.index:e.end-t.end))[0]:void 0},this.getMeasurements=mR((()=>[this.getMeasurementOptions(),this.itemSizeCache]),(({count:e,paddingStart:t,scrollMargin:n,getItemKey:i},o)=>{const s=this.pendingMeasuredCacheIndexes.length>0?Math.min(...this.pendingMeasuredCacheIndexes):0
|
|
10993
11018
|
this.pendingMeasuredCacheIndexes=[]
|
|
10994
11019
|
const r=this.measurementsCache.slice(0,s)
|
|
10995
11020
|
for(let a=s;a<e;a++){const e=i(a),s=1===this.options.lanes?r[a-1]:this.getFurthestMeasurement(r,a),l=s?s.end+this.options.gap:t+n,c=o.get(e),d="number"==typeof c?c:this.options.estimateSize(a),h=l+d,u=s?s.lane:a%this.options.lanes
|
|
10996
|
-
r[a]={index:a,start:l,size:d,end:h,key:e,lane:u}}return this.measurementsCache=r,r}),{key:!1,debug:()=>this.options.debug}),this.calculateRange
|
|
11021
|
+
r[a]={index:a,start:l,size:d,end:h,key:e,lane:u}}return this.measurementsCache=r,r}),{key:!1,debug:()=>this.options.debug}),this.calculateRange=mR((()=>[this.getMeasurements(),this.getSize(),this.scrollOffset]),((e,t,n)=>this.range=e.length>0&&t>0?function({measurements:e,outerSize:t,scrollOffset:n}){const i=e.length-1,o=MR(0,i,(t=>e[t].start),n)
|
|
10997
11022
|
let s=o
|
|
10998
11023
|
for(;s<i&&e[s].end<n+t;)s++
|
|
10999
|
-
return{startIndex:o,endIndex:s}}({measurements:e,outerSize:t,scrollOffset:n}):null),{key:!1,debug:()=>this.options.debug}),this.getIndexes
|
|
11024
|
+
return{startIndex:o,endIndex:s}}({measurements:e,outerSize:t,scrollOffset:n}):null),{key:!1,debug:()=>this.options.debug}),this.getIndexes=mR((()=>[this.options.rangeExtractor,this.calculateRange(),this.options.overscan,this.options.count]),((e,t,n,i)=>null===t?[]:e({startIndex:t.startIndex,endIndex:t.endIndex,overscan:n,count:i})),{key:!1,debug:()=>this.options.debug}),this.indexFromElement=e=>{const t=this.options.indexAttribute,n=e.getAttribute(t)
|
|
11000
11025
|
return n?parseInt(n,10):(console.warn(`Missing attribute name '${t}={index}' on measured element.`),-1)},this._measureElement=(e,t)=>{const n=this.measurementsCache[this.indexFromElement(e)]
|
|
11001
11026
|
if(!n||!e.isConnected)return void this.measureElementCache.forEach(((t,n)=>{t===e&&(this.observer.unobserve(e),this.measureElementCache.delete(n))}))
|
|
11002
11027
|
const i=this.measureElementCache.get(n.key)
|
|
11003
11028
|
i!==e&&(i&&this.observer.unobserve(i),this.observer.observe(e),this.measureElementCache.set(n.key,e))
|
|
11004
11029
|
const o=this.options.measureElement(e,t,this)
|
|
11005
11030
|
this.resizeItem(n,o)},this.resizeItem=(e,t)=>{const n=t-(this.itemSizeCache.get(e.key)??e.size)
|
|
11006
|
-
0!==n&&((void 0!==this.shouldAdjustScrollPositionOnItemSizeChange?this.shouldAdjustScrollPositionOnItemSizeChange(e,n,this):e.start<this.scrollOffset+this.scrollAdjustments)&&this._scrollToOffset(this.scrollOffset,{adjustments:this.scrollAdjustments+=n,behavior:void 0}),this.pendingMeasuredCacheIndexes.push(e.index),this.itemSizeCache=new Map(this.itemSizeCache.set(e.key,t)),this.notify(!0,!1))},this.measureElement=e=>{e&&this._measureElement(e,void 0)},this.getVirtualItems
|
|
11031
|
+
0!==n&&((void 0!==this.shouldAdjustScrollPositionOnItemSizeChange?this.shouldAdjustScrollPositionOnItemSizeChange(e,n,this):e.start<this.scrollOffset+this.scrollAdjustments)&&this._scrollToOffset(this.scrollOffset,{adjustments:this.scrollAdjustments+=n,behavior:void 0}),this.pendingMeasuredCacheIndexes.push(e.index),this.itemSizeCache=new Map(this.itemSizeCache.set(e.key,t)),this.notify(!0,!1))},this.measureElement=e=>{e&&this._measureElement(e,void 0)},this.getVirtualItems=mR((()=>[this.getIndexes(),this.getMeasurements()]),((e,t)=>{const n=[]
|
|
11007
11032
|
for(let i=0,o=e.length;i<o;i++){const o=t[e[i]]
|
|
11008
11033
|
n.push(o)}return n}),{key:!1,debug:()=>this.options.debug}),this.getVirtualItemForOffset=e=>{const t=this.getMeasurements()
|
|
11009
|
-
return
|
|
11034
|
+
return gR(t[MR(0,t.length-1,(e=>gR(t[e]).start),e)])},this.getOffsetForAlignment=(e,t)=>{const n=this.getSize()
|
|
11010
11035
|
"auto"===t&&(t=e<=this.scrollOffset?"start":e>=this.scrollOffset+n?"end":"start"),"start"===t||("end"===t?e-=n:"center"===t&&(e-=n/2))
|
|
11011
11036
|
const i=this.options.horizontal?"scrollWidth":"scrollHeight",o=(this.scrollElement?"document"in this.scrollElement?this.scrollElement.document.documentElement[i]:this.scrollElement[i]:0)-this.getSize()
|
|
11012
11037
|
return Math.max(Math.min(o,e),0)},this.getOffsetForIndex=(e,t="auto")=>{e=Math.max(0,Math.min(e,this.options.count-1))
|
|
11013
|
-
const n=
|
|
11038
|
+
const n=gR(this.getMeasurements()[e])
|
|
11014
11039
|
if("auto"===t)if(n.end>=this.scrollOffset+this.getSize()-this.options.scrollPaddingEnd)t="end"
|
|
11015
11040
|
else{if(!(n.start<=this.scrollOffset+this.options.scrollPaddingStart))return[this.scrollOffset,t]
|
|
11016
11041
|
t="start"}const i="end"===t?n.end+this.options.scrollPaddingEnd:n.start-this.options.scrollPaddingStart
|
|
@@ -11023,19 +11048,19 @@ const t=this.getMeasurements()
|
|
|
11023
11048
|
let n
|
|
11024
11049
|
return n=0===t.length?this.options.paddingStart:1===this.options.lanes?(null==(e=t[t.length-1])?void 0:e.end)??0:Math.max(...t.slice(-this.options.lanes).map((e=>e.end))),n-this.options.scrollMargin+this.options.paddingEnd},this._scrollToOffset=(e,{adjustments:t,behavior:n})=>{this.options.scrollToFn(e,{behavior:n,adjustments:t},this)},this.measure=()=>{var e,t
|
|
11025
11050
|
this.itemSizeCache=new Map,null==(t=(e=this.options).onChange)||t.call(e,this,!1)},this.setOptions(e),this.scrollRect=this.options.initialRect,this.scrollOffset="function"==typeof this.options.initialOffset?this.options.initialOffset():this.options.initialOffset,this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach((e=>{this.itemSizeCache.set(e.key,e.size)})),this.notify(!1,!1)}}(e),this.virtualizer._willUpdate(),this.handleVirtualizerChange()}createVirtualizerOptions(){const e=parseFloat(tl.getValueFor(this.table))+2*parseFloat(al.getValueFor(this.table))
|
|
11026
|
-
return{count:this.tanStackTable.getRowModel().rows.length,getScrollElement:()=>this.table.viewport,estimateSize:t=>e,enableSmoothScroll:!0,overscan:3,scrollingDelay:5,scrollToFn
|
|
11051
|
+
return{count:this.tanStackTable.getRowModel().rows.length,getScrollElement:()=>this.table.viewport,estimateSize:t=>e,enableSmoothScroll:!0,overscan:3,scrollingDelay:5,scrollToFn:$R,observeElementOffset:kR,observeElementRect:wR,onChange:()=>this.handleVirtualizerChange()}}handleVirtualizerChange(){this.notifyFocusedCellRecycling()
|
|
11027
11052
|
const e=this.virtualizer
|
|
11028
11053
|
this.visibleItems=e.getVirtualItems(),this.scrollHeight=e.getTotalSize()
|
|
11029
11054
|
let t=0
|
|
11030
11055
|
if(this.visibleItems.length>0){t=this.visibleItems[0].start}this.rowContainerYOffset=t}notifyFocusedCellRecycling(){let e=this.table.shadowRoot.activeElement
|
|
11031
|
-
for(;null!==e&&!(e instanceof
|
|
11032
|
-
if(e instanceof
|
|
11033
|
-
e?.closeOpenActionMenus()}}}function
|
|
11034
|
-
case
|
|
11035
|
-
default:return
|
|
11036
|
-
return"string"==typeof i&&"string"==typeof o?i.localeCompare(o):i===o?0:void 0===i||null===i&&void 0!==o?-1:1}function
|
|
11037
|
-
return Object.is(i,o)?0:void 0===i?-1:void 0===o?1:null===i?-1:null===o?1:Number.isNaN(i)?-1:Number.isNaN(o)?1:0===i&&0===o?Object.is(i,-0)?-1:1:i>o?1:-1}e([g],
|
|
11038
|
-
class
|
|
11056
|
+
for(;null!==e&&!(e instanceof VO)&&e.shadowRoot;)e=e.shadowRoot.activeElement
|
|
11057
|
+
if(e instanceof VO&&e.focusedRecycleCallback(),void 0!==this.table.openActionMenuRecordId){const e=this.table.rowElements.find((e=>e.recordId===this.table.openActionMenuRecordId))
|
|
11058
|
+
e?.closeOpenActionMenus()}}}function ER(e){switch(e){case RO:return DR
|
|
11059
|
+
case FO:return IR
|
|
11060
|
+
default:return DR}}function IR(e,t,n){const i=e.getValue(n),o=t.getValue(n)
|
|
11061
|
+
return"string"==typeof i&&"string"==typeof o?i.localeCompare(o):i===o?0:void 0===i||null===i&&void 0!==o?-1:1}function DR(e,t,n){const i=e.getValue(n),o=t.getValue(n)
|
|
11062
|
+
return Object.is(i,o)?0:void 0===i?-1:void 0===o?1:null===i?-1:null===o?1:Number.isNaN(i)?-1:Number.isNaN(o)?1:0===i&&0===o?Object.is(i,-0)?-1:1:i>o?1:-1}e([g],_R.prototype,"visibleItems",void 0),e([g],_R.prototype,"scrollHeight",void 0),e([g],_R.prototype,"headerContainerMarginRight",void 0),e([g],_R.prototype,"rowContainerYOffset",void 0)
|
|
11063
|
+
class AR{constructor(e){this.table=e,this.isColumnBeingSized=!1,this.visibleColumns=[],this.currentTotalDelta=0,this.dragStart=0,this.initialColumnWidths=[],this.onDividerMouseMove=e=>{const t=e
|
|
11039
11064
|
for(let e=0;e<this.visibleColumns.length;e++)this.visibleColumns[e].columnInternals.currentPixelWidth=this.initialColumnWidths[e]?.initialPixelWidth
|
|
11040
11065
|
this.currentTotalDelta=this.getAllowedSizeDelta(t.clientX-this.dragStart),this.performCascadeSizeLeft(this.leftColumnIndex,this.currentTotalDelta),this.performCascadeSizeRight(this.rightColumnIndex,this.currentTotalDelta)
|
|
11041
11066
|
const n=this.getTotalColumnFixedWidth()-this.initialColumnTotalWidth
|
|
@@ -11072,10 +11097,10 @@ for(const e of this.visibleColumns)this.initialColumnWidths.push({initalColumnFr
|
|
|
11072
11097
|
const e=this.gridSizedColumns.reduce(((e,t)=>e+t.columnInternals.currentPixelWidth),0),t=e/this.gridSizedColumns.length
|
|
11073
11098
|
let n=0
|
|
11074
11099
|
for(let e=0;e<this.visibleColumns.length&&n<this.gridSizedColumns.length;e++){const i=this.visibleColumns[e]
|
|
11075
|
-
i===this.gridSizedColumns[n]&&(n+=1,i.columnInternals.currentFractionalWidth=i.columnInternals.currentPixelWidth/t,i.columnInternals.currentPixelWidth=void 0)}}getVisibleColumns(){return this.table.columns.filter((e=>!e.columnHidden))}getLeftColumnIndexFromDivider(e){return Math.floor(e/2)}}e([g],
|
|
11076
|
-
const
|
|
11077
|
-
return!1},
|
|
11078
|
-
class
|
|
11100
|
+
i===this.gridSizedColumns[n]&&(n+=1,i.columnInternals.currentFractionalWidth=i.columnInternals.currentPixelWidth/t,i.columnInternals.currentPixelWidth=void 0)}}getVisibleColumns(){return this.table.columns.filter((e=>!e.columnHidden))}getLeftColumnIndexFromDivider(e){return Math.floor(e/2)}}e([g],AR.prototype,"isColumnBeingSized",void 0),e([g],AR.prototype,"activeColumnIndex",void 0),e([g],AR.prototype,"activeColumnDivider",void 0)
|
|
11101
|
+
const TR=(e,...t)=>{for(const n of t)if(e===n)return!0
|
|
11102
|
+
return!1},OR=["rowIds","rowParentIds","groupRows","columnIds","columnSort","columnWidths","columnDefinition","actionMenuSlots","selectionMode"]
|
|
11103
|
+
class RR extends YE{constructor(e){super(OR),this.table=e,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")}trackAllStateChanged(){this.trackAll(),this.queueUpdate()}get hasPendingUpdates(){return this.updateQueued}trackColumnPropertyChanged(e){TR(e,"columnId")?this.track("columnIds"):qO(e,"operandDataRecordFieldName","sortOperation")?this.track("columnDefinition"):qO(e,"sortingDisabled","currentSortDirection","currentSortIndex")?this.track("columnSort"):TR(e,"columnHidden")||qO(e,"currentFractionalWidth","currentPixelWidth","minPixelWidth","resizingDisabled")?this.track("columnWidths"):TR(e,"actionMenuSlot")?this.track("actionMenuSlots"):qO(e,"groupIndex","groupingDisabled")&&this.track("groupRows"),this.queueUpdate()}trackColumnInstancesChanged(){this.track("columnIds"),this.track("columnDefinition"),this.track("columnSort"),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,u.queueUpdate((()=>{this.table.update(),this.untrackAll(),this.updateQueued=!1}))))}}class FR{constructor(e){this.tanStackTable=e}reset(){}toggleIsRowSelected(e,t){e.isGroupRow&&e.selectionState===TO?this.deselectAllLeafRows(e.id):this.tanStackTable.getRow(e.id).toggleSelected(t,{selectChildren:e.isGroupRow})}selectSingleRow(e){if(e.isGroupRow)throw new Error("function not intended to select grouped rows")
|
|
11079
11104
|
const t=this.tanStackTable.getState().rowSelection,n=[]
|
|
11080
11105
|
if(Object.entries(t).forEach((([e,t])=>{t&&n.push(e)})),1===n.length&&n[0]===e.id)return!1
|
|
11081
11106
|
const i={}
|
|
@@ -11085,7 +11110,7 @@ this.tanStackTable.setRowSelection(i)}getAllLeafRowIds(e){const t=this.tanStackT
|
|
|
11085
11110
|
return t?.getIsGrouped()?t.getLeafRows().filter((e=>!e.getIsGrouped())).map((e=>e.id)):[]}getAllOrderedRows(){const e=this.tanStackTable.getPreExpandedRowModel().rows
|
|
11086
11111
|
return this.getOrderedRows(e)}getOrderedRows(e){const t=[]
|
|
11087
11112
|
for(const n of e)t.push(n),n.subRows?.length&&t.push(...this.getOrderedRows(n.subRows))
|
|
11088
|
-
return t}}class
|
|
11113
|
+
return t}}class NR extends FR{handleRowSelectionToggle(e,t,n){return!1}handleRowClick(e,t,n){return!1}handleActionMenuOpening(e){return!1}}class PR extends FR{handleRowSelectionToggle(e,t,n){return n&&this.tryUpdateRangeSelection(e.id)||(this.shiftSelectStartRowId=e.id,this.previousShiftSelectRowEndId=void 0,this.toggleIsRowSelected(e,t)),!0}handleRowClick(e,t,n){return n?(this.shiftSelectStartRowId=e.id,this.previousShiftSelectRowEndId=void 0,this.toggleIsRowSelected(e),!0):!(!t||!this.tryUpdateRangeSelection(e.id))||(this.shiftSelectStartRowId=e.id,this.previousShiftSelectRowEndId=void 0,this.selectSingleRow(e))}handleActionMenuOpening(e){return e.selectionState!==TO&&this.selectSingleRow(e)}reset(){this.shiftSelectStartRowId=void 0,this.previousShiftSelectRowEndId=void 0}tryUpdateRangeSelection(e){if(void 0===this.shiftSelectStartRowId)return!1
|
|
11089
11114
|
const t=this.getAllOrderedRows(),n=this.getRowIndexForId(this.shiftSelectStartRowId,t)
|
|
11090
11115
|
if(-1===n)return!1
|
|
11091
11116
|
const i=this.tanStackTable.getState().rowSelection
|
|
@@ -11095,20 +11120,20 @@ this.updateSelectionStateForRange(e,n,o,i,!0)}updateSelectionStateForRange(e,t,n
|
|
|
11095
11120
|
const s=Math.min(t,n),r=Math.max(t,n)
|
|
11096
11121
|
for(let t=s;t<=r;t++){const n=i[t]
|
|
11097
11122
|
n.getIsGrouped()||this.updateSelectionStateForRow(e,n.id,o)}const a=i[n]
|
|
11098
|
-
a.getIsGrouped()&&this.getAllLeafRowIds(a.id).forEach((t=>this.updateSelectionStateForRow(e,t,o)))}updateSelectionStateForRow(e,t,n){n?e[t]=!0:delete e[t]}getRowIndexForId(e,t){return e?t.findIndex((t=>t.id===e)):-1}}class
|
|
11123
|
+
a.getIsGrouped()&&this.getAllLeafRowIds(a.id).forEach((t=>this.updateSelectionStateForRow(e,t,o)))}updateSelectionStateForRow(e,t,n){n?e[t]=!0:delete e[t]}getRowIndexForId(e,t){return e?t.findIndex((t=>t.id===e)):-1}}class LR extends FR{handleRowSelectionToggle(e,t,n){return this.toggleIsRowSelected(e,t),!0}handleRowClick(e,t,n){return this.selectSingleRow(e)}handleActionMenuOpening(e){return this.handleRowClick(e,!1,!1)}}class zR{constructor(e,t){this.tanStackTable=e,this.selectionManager=this.createSelectionManager(t)}handleRowSelectionToggle(e,t,n){return!!e&&this.selectionManager.handleRowSelectionToggle(e,t,n)}handleRowClick(e,t,n){return!!e&&this.selectionManager.handleRowClick(e,t,n)}handleActionMenuOpening(e){return!!e&&this.selectionManager.handleActionMenuOpening(e)}handleSelectionModeChanged(e){this.selectionManager=this.createSelectionManager(e)}handleSelectionReset(){this.selectionManager.reset()}getCurrentSelectedRecordIds(){const e=this.tanStackTable.options.state.rowSelection
|
|
11099
11124
|
if(!e)return[]
|
|
11100
11125
|
const t=[]
|
|
11101
|
-
return Object.entries(e).forEach((([e,n])=>{n&&t.push(e)})),t}createSelectionManager(e){switch(e){case
|
|
11102
|
-
case
|
|
11103
|
-
case
|
|
11104
|
-
default:throw new Error("unknown selection mode found")}}}function
|
|
11126
|
+
return Object.entries(e).forEach((([e,n])=>{n&&t.push(e)})),t}createSelectionManager(e){switch(e){case DO.multiple:return new PR(this.tanStackTable)
|
|
11127
|
+
case DO.single:return new LR(this.tanStackTable)
|
|
11128
|
+
case DO.none:return new NR(this.tanStackTable)
|
|
11129
|
+
default:throw new Error("unknown selection mode found")}}}function VR(e,t){const n=t,i=[],o={},s=new Set
|
|
11105
11130
|
for(let t=0;t<e.length;t++){const r=e[t],a=r[n.id],l=r[n.parentId]
|
|
11106
11131
|
Object.prototype.hasOwnProperty.call(o,a)||(o[a]={subRows:[],clientRecord:void 0,originalIndex:void 0}),s&&s.delete(a),o[a].clientRecord=r
|
|
11107
11132
|
const c=o[a]
|
|
11108
11133
|
c.originalIndex=t,null==l?i.push(c):(Object.prototype.hasOwnProperty.call(o,l)||(o[l]={subRows:[],clientRecord:void 0,originalIndex:void 0},s&&s.add(l)),o[l].subRows.push(c))}if(s?.size){const e=Array.from(s.values()).join(",")
|
|
11109
|
-
throw new Error(`The items array contains orphans that point to the following parentIds: [${e}]. These parentIds do not exist in the items array.`)}if(
|
|
11110
|
-
return i}function
|
|
11111
|
-
return this.getAllNodes(this._hierarchicalData,t),this.isDataFlat||!e?t.map((e=>e.clientRecord)):t.sort(((e,t)=>e.originalIndex-t.originalIndex)).map((e=>e.clientRecord))}getAllNodes(e,t){for(const n of e)t.push(n),n.subRows&&this.getAllNodes(n.subRows,t)}}class
|
|
11134
|
+
throw new Error(`The items array contains orphans that point to the following parentIds: [${e}]. These parentIds do not exist in the items array.`)}if(HR(i)<Object.keys(o).length)throw new Error("The items array contains nodes with a circular parent/child relationship.")
|
|
11135
|
+
return i}function HR(e){return e.reduce(((e,t)=>e+1+(t.subRows&&HR(t.subRows))),0)}class BR{constructor(e,t,n){if(this.isDataFlat=!1,"string"==typeof t&&"string"==typeof n)try{this._hierarchicalData=VR(e,{id:t,parentId:n}),this.isDataFlat=!1,this._parentIdConfigurationValid=!0}catch{this.isDataFlat=!0,this._hierarchicalData=e.map(((e,t)=>({clientRecord:{...e},originalIndex:t}))),this._parentIdConfigurationValid=!1}else this.isDataFlat=!0,this._hierarchicalData=e.map(((e,t)=>({clientRecord:{...e},originalIndex:t}))),this._parentIdConfigurationValid=!0}get hierarchicalData(){return this._hierarchicalData}get parentIdConfigurationValid(){return this._parentIdConfigurationValid}getAllRecords(e=!1){const t=[]
|
|
11136
|
+
return this.getAllNodes(this._hierarchicalData,t),this.isDataFlat||!e?t.map((e=>e.clientRecord)):t.sort(((e,t)=>e.originalIndex-t.originalIndex)).map((e=>e.clientRecord))}getAllNodes(e,t){for(const n of e)t.push(n),n.subRows&&this.getAllNodes(n.subRows,t)}}class qR{constructor(e){this.tanStackTable=e,this.explicitExpansionStates=new Map,this.hierarchyOptions=new Map,this.isHierarchyEnabled=!1,this.parentRowsWithChildren=new Set}isRowExpanded(e){if(!this.isRowExpandable(e))return!1
|
|
11112
11137
|
return this.explicitExpansionStates.get(e.id)??this.getDefaultExpansionState(e)}toggleRowExpansion(e){if(!this.isRowExpandable(e))return
|
|
11113
11138
|
const t=this.isRowExpanded(e)
|
|
11114
11139
|
this.explicitExpansionStates.set(e.id,!t),e.toggleExpanded()}collapseAll(){this.resetExpansionState()
|
|
@@ -11121,17 +11146,17 @@ if(!s&&r&&n.set(e,r),this.isRowExpandable(o)){const n=this.explicitExpansionStat
|
|
|
11121
11146
|
if(void 0!==n&&t.set(e,n),!s){0!==o.subRows.length?i.add(e):this.parentRowsWithChildren.has(e)&&t.set(e,!1)}}}this.explicitExpansionStates=t,this.hierarchyOptions=n,this.parentRowsWithChildren=i}setHierarchyOptions(e){const t=new Map
|
|
11122
11147
|
for(const{recordId:n,options:i}of e){t.set(n,i)
|
|
11123
11148
|
const e=this.hierarchyOptions.get(n)?.delayedHierarchyState,o=i.delayedHierarchyState
|
|
11124
|
-
e!==
|
|
11149
|
+
e!==EO||o!==_O||this.parentRowsWithChildren.has(n)||this.explicitExpansionStates.delete(n)}this.hierarchyOptions=t}isRowExpandable(e){return e.subRows.length>0||this.canLoadDelayedChildren(e.id)}setHierarchyEnabled(e){this.isHierarchyEnabled=e}isLoadingChildren(e){return!!this.isHierarchyEnabled&&(this.hierarchyOptions.get(e)?.delayedHierarchyState===EO??!1)}canLoadDelayedChildren(e){if(!this.isHierarchyEnabled)return!1
|
|
11125
11150
|
const t=this.hierarchyOptions.get(e)?.delayedHierarchyState
|
|
11126
|
-
return t!==
|
|
11127
|
-
class
|
|
11151
|
+
return t!==MO}getDefaultExpansionState(e){return 0!==e.subRows.length}}class UR extends XE{isValid(){return this.noneTracked()}getValidationFlags(){return this.getTrackedItems()}}class jR extends UR{constructor(e){super(e),this.isColumnValid=!0}getValidity(){return this.getValidationFlags()}setConditionValue(e,t){t?this.track(e):this.untrack(e),this.updateColumnInternalsFlag()}updateColumnInternalsFlag(){this.isColumnValid=this.isValid()}}e([g],jR.prototype,"isColumnValid",void 0)
|
|
11152
|
+
class WR extends Vt{get validity(){return this.tableValidator.getValidity()}get showRowOperationColumn(){return this.selectionMode===DO.multiple||this.showCollapseAll}constructor(){super(),this.selectionMode=DO.none,this.tableData=[],this.columns=[],this.childItems=[],this.rowElements=[],this.actionMenuSlots=[],this.canRenderRows=!0,this.scrollX=0,this.selectionState=AO,this.showCollapseAll=!1,this.visibleColumns=[],this.tableScrollableMinWidth=0,this.documentShiftKeyDown=!1,this.tableValidator=new jO,this.tableUpdateTracker=new RR(this),this.columnNotifiers=[],this.isInitialized=!1,this.ignoreSelectionChangeEvents=!1,this.onViewPortScroll=e=>{this.scrollX=e.target.scrollLeft},this.onKeyDown=e=>{e.key===ga&&(this.documentShiftKeyDown=!0)},this.onKeyUp=e=>{e.key===ga&&(this.documentShiftKeyDown=!1)},this.getRowCanExpand=e=>this.expansionManager.isRowExpandable(e),this.getIsRowExpanded=e=>this.expansionManager.isRowExpanded(e),this.handleRowSelectionChange=e=>{const t=e instanceof Function?e(this.table.getState().rowSelection):e
|
|
11128
11153
|
this.updateTableOptions({state:{rowSelection:t}})},this.handleExpandedChange=e=>{const t=e instanceof Function?e(this.table.getState().expanded):e
|
|
11129
|
-
this.updateTableOptions({state:{expanded:t}})},this.options={data:[],onStateChange:e=>{},onRowSelectionChange:this.handleRowSelectionChange,onExpandedChange:this.handleExpandedChange,getCoreRowModel:e=>
|
|
11154
|
+
this.updateTableOptions({state:{expanded:t}})},this.options={data:[],onStateChange:e=>{},onRowSelectionChange:this.handleRowSelectionChange,onExpandedChange:this.handleExpandedChange,getCoreRowModel:e=>DT((()=>[e.options.data]),(t=>{const n={rows:[],flatRows:[],rowsById:{}},i=function(t,o,s){void 0===o&&(o=0)
|
|
11130
11155
|
const r=[]
|
|
11131
|
-
for(let l=0;l<t.length;l++){const c=
|
|
11156
|
+
for(let l=0;l<t.length;l++){const c=NT(e,e._getRowId(t[l],l,s),t[l],l,o,0,null==s?void 0:s.id)
|
|
11132
11157
|
var a
|
|
11133
11158
|
n.flatRows.push(c),n.rowsById[c.id]=c,r.push(c),e.options.getSubRows&&(c.originalSubRows=e.options.getSubRows(t[l],l),null!=(a=c.originalSubRows)&&a.length&&(c.subRows=i(c.originalSubRows,o+1,c)))}return r}
|
|
11134
|
-
return n.rows=i(t),n}),
|
|
11159
|
+
return n.rows=i(t),n}),AT(e.options,"debugTable",0,(()=>e._autoResetPageIndex()))),getSortedRowModel:e=>DT((()=>[e.getState().sorting,e.getPreSortedRowModel()]),((t,n)=>{if(!n.rows.length||null==t||!t.length)return n
|
|
11135
11160
|
const i=e.getState().sorting,o=[],s=i.filter((t=>{var n
|
|
11136
11161
|
return null==(n=e.getColumn(t.id))?void 0:n.getCanSort()})),r={}
|
|
11137
11162
|
s.forEach((t=>{const n=e.getColumn(t.id)
|
|
@@ -11145,21 +11170,21 @@ if(n||i){if("first"===l)return n?-1:1
|
|
|
11145
11170
|
if("last"===l)return n?1:-1
|
|
11146
11171
|
d=n&&i?0:n?l:-l}}if(0===d&&(d=a.sortingFn(e,t,o.id)),0!==d)return c&&(d*=-1),a.invertSorting&&(d*=-1),d}return e.index-t.index})),t.forEach((e=>{var t
|
|
11147
11172
|
o.push(e),null!=(t=e.subRows)&&t.length&&(e.subRows=a(e.subRows))})),t}
|
|
11148
|
-
return{rows:a(n.rows),flatRows:o,rowsById:n.rowsById}}),
|
|
11173
|
+
return{rows:a(n.rows),flatRows:o,rowsById:n.rowsById}}),AT(e.options,"debugTable",0,(()=>e._autoResetPageIndex()))),getGroupedRowModel:$O(),getExpandedRowModel:e=>DT((()=>[e.getState().expanded,e.getPreExpandedRowModel(),e.options.paginateExpandedRows]),((e,t,n)=>!t.rows.length||!0!==e&&!Object.keys(null!=e?e:{}).length?t:n?function(e){const t=[],n=e=>{var i
|
|
11149
11174
|
t.push(e),null!=(i=e.subRows)&&i.length&&e.getIsExpanded()&&e.subRows.forEach(n)}
|
|
11150
|
-
return e.rows.forEach(n),{rows:t,flatRows:e.flatRows,rowsById:e.rowsById}}(t):t),
|
|
11175
|
+
return e.rows.forEach(n),{rows:t,flatRows:e.flatRows,rowsById:e.rowsById}}(t):t),AT(e.options,"debugTable")),getRowCanExpand:this.getRowCanExpand,getIsRowExpanded:this.getIsRowExpanded,getSubRows:e=>e.subRows,columns:[],state:{rowSelection:{},grouping:[],expanded:!0},enableRowSelection:e=>!e.getIsGrouped(),enableMultiRowSelection:!1,enableSubRowSelection:!1,enableSorting:!0,enableGrouping:!0,renderFallbackValue:null,autoResetAll:!1},this.table=SO(this.options),this.virtualizer=new _R(this,this.table),this.layoutManager=new AR(this),this.layoutManagerNotifier=m.getNotifier(this.layoutManager),this.layoutManagerNotifier.subscribe(this,"isColumnBeingSized"),this.selectionManager=new zR(this.table,this.selectionMode),this.expansionManager=new qR(this.table)}async setData(e){await this.processPendingUpdates()
|
|
11151
11176
|
const t=this.calculateTanStackData(e)
|
|
11152
|
-
this.updateTableOptions(t)}async getSelectedRecordIds(){return await this.processPendingUpdates(),this.selectionManager.getCurrentSelectedRecordIds()}async setSelectedRecordIds(e){await this.processPendingUpdates(),this.selectionMode!==
|
|
11177
|
+
this.updateTableOptions(t)}async getSelectedRecordIds(){return await this.processPendingUpdates(),this.selectionManager.getCurrentSelectedRecordIds()}async setSelectedRecordIds(e){await this.processPendingUpdates(),this.selectionMode!==DO.none&&this.updateTableOptions({state:{rowSelection:this.calculateTanStackSelectionState(e)}})}async setRecordHierarchyOptions(e){await this.processPendingUpdates()
|
|
11153
11178
|
const t=structuredClone(e),n=this.tableValidator.getOptionsWithPresentIds(t)
|
|
11154
|
-
this.expansionManager.setHierarchyOptions(n),this.refreshRows()}connectedCallback(){super.connectedCallback(),this.initialize(),this.virtualizer.connect(),this.viewport.addEventListener("scroll",this.onViewPortScroll,{passive:!0}),document.addEventListener("keydown",this.onKeyDown),document.addEventListener("keyup",this.onKeyUp)}disconnectedCallback(){super.disconnectedCallback(),this.virtualizer.disconnect(),this.viewport.removeEventListener("scroll",this.onViewPortScroll),document.removeEventListener("keydown",this.onKeyDown),document.removeEventListener("keyup",this.onKeyUp)}checkValidity(){return this.tableValidator.isValid()}handleChange(e,t){(e instanceof
|
|
11179
|
+
this.expansionManager.setHierarchyOptions(n),this.refreshRows()}connectedCallback(){super.connectedCallback(),this.initialize(),this.virtualizer.connect(),this.viewport.addEventListener("scroll",this.onViewPortScroll,{passive:!0}),document.addEventListener("keydown",this.onKeyDown),document.addEventListener("keyup",this.onKeyUp)}disconnectedCallback(){super.disconnectedCallback(),this.virtualizer.disconnect(),this.viewport.removeEventListener("scroll",this.onViewPortScroll),document.removeEventListener("keydown",this.onKeyDown),document.removeEventListener("keyup",this.onKeyUp)}checkValidity(){return this.tableValidator.isValid()}handleChange(e,t){(e instanceof UO||e instanceof BO)&&"string"==typeof t?this.tableUpdateTracker.trackColumnPropertyChanged(t):e instanceof jR&&"isColumnValid"===t?this.tableValidator.validateColumnConfigurations(this.columns):e instanceof AR&&"isColumnBeingSized"===t&&!this.layoutManager.isColumnBeingSized&&this.emitColumnConfigurationChangeEvent()}onRowSelectionToggle(e,t){t.stopImmediatePropagation()
|
|
11155
11180
|
this.selectionManager.handleRowSelectionToggle(this.tableData[e],t.detail.newState,this.documentShiftKeyDown)&&this.emitSelectionChangeEvent()}onRowClick(e,t){return this.selectionManager.handleRowClick(this.tableData[e],t.shiftKey,t.ctrlKey||t.metaKey)&&this.emitSelectionChangeEvent(),!0}onAllRowsSelectionChange(e){e.stopPropagation(),this.ignoreSelectionChangeEvents||(this.table.toggleAllRowsSelected(this.selectionCheckbox.checked),this.emitSelectionChangeEvent())}onRowActionMenuBeforeToggle(e,t){t.stopImmediatePropagation(),this.handleActionMenuBeforeToggleEvent(e,t)}onRowActionMenuToggle(e){e.stopImmediatePropagation(),this.handleRowActionMenuToggleEvent(e)}handleCollapseAllRows(){this.expansionManager.collapseAll()}onRightDividerMouseDown(e,t){0===e.button&&this.layoutManager.beginColumnInteractiveSize(e.clientX,this.getRightDividerIndex(t))}onLeftDividerMouseDown(e,t){0===e.button&&this.layoutManager.beginColumnInteractiveSize(e.clientX,this.getLeftDividerIndex(t))}getLeftDividerIndex(e){return 2*e-1}getRightDividerIndex(e){return 2*e}handleGroupRowExpanded(e,t){this.toggleRowExpanded(e),t.stopPropagation()}handleRowExpanded(e){this.toggleRowExpanded(e)}toggleColumnSort(e,t){if(e.columnInternals.sortingDisabled)return
|
|
11156
11181
|
const n=this.getColumnsParticipatingInSorting().sort(((e,t)=>e.columnInternals.currentSortIndex-t.columnInternals.currentSortIndex)),i=n.indexOf(e),o=i>-1,s=e.columnInternals.currentSortDirection
|
|
11157
|
-
let r=
|
|
11158
|
-
o?s===
|
|
11182
|
+
let r=IO.ascending
|
|
11183
|
+
o?s===IO.descending?(n.splice(i,1),r=IO.none,e.columnInternals.currentSortIndex=void 0):r=IO.descending:n.push(e),e.columnInternals.currentSortDirection=r
|
|
11159
11184
|
for(let i=0;i<n.length;i++){const o=n[i]
|
|
11160
|
-
t?n[i].columnInternals.currentSortIndex=i:o===e?o.columnInternals.currentSortIndex=0:(o.columnInternals.currentSortIndex=void 0,o.columnInternals.currentSortDirection=
|
|
11161
|
-
case
|
|
11162
|
-
default:return null}}getHeaderContainerElements(){return this.columnHeadersContainer.querySelectorAll(".header-container")}calculateTanStackData(e){this.dataHierarchyManager=new
|
|
11185
|
+
t?n[i].columnInternals.currentSortIndex=i:o===e?o.columnInternals.currentSortIndex=0:(o.columnInternals.currentSortIndex=void 0,o.columnInternals.currentSortDirection=IO.none)}this.emitColumnConfigurationChangeEvent()}update(){this.validate(),this.tableUpdateTracker.requiresTanStackUpdate&&this.updateTanStack(),this.tableUpdateTracker.updateActionMenuSlots&&this.updateActionMenuSlots(),this.tableUpdateTracker.updateColumnWidths&&(this.rowGridColumns=this.layoutManager.getGridTemplateColumns(),this.visibleColumns=this.columns.filter((e=>!e.columnHidden)))}get ariaMultiSelectable(){switch(this.selectionMode){case DO.multiple:return"true"
|
|
11186
|
+
case DO.single:return"false"
|
|
11187
|
+
default:return null}}getHeaderContainerElements(){return this.columnHeadersContainer.querySelectorAll(".header-container")}calculateTanStackData(e){this.dataHierarchyManager=new BR(e,this.idFieldName,this.parentIdFieldName)
|
|
11163
11188
|
const t=this.dataHierarchyManager.hierarchicalData
|
|
11164
11189
|
this.tableValidator.setParentIdConfigurationValidity(this.dataHierarchyManager.parentIdConfigurationValid)
|
|
11165
11190
|
const n={data:t}
|
|
@@ -11167,39 +11192,39 @@ if(this.validateWithData(e),this.tableValidator.areRecordIdsValid()){const e=thi
|
|
|
11167
11192
|
n.state={rowSelection:this.calculateTanStackSelectionState(e),expanded:!0}}return n}selectionModeChanged(e,t){this.$fastController.isConnected&&this.tableUpdateTracker.trackSelectionModeChanged()}idFieldNameChanged(e,t){this.$fastController.isConnected&&this.tableUpdateTracker.trackIdFieldNameChanged()}parentIdFieldNameChanged(e,t){this.$fastController.isConnected&&this.tableUpdateTracker.trackParentIdFieldNameChanged()}columnsChanged(e,t){this.$fastController.isConnected&&(this.observeColumns(),this.tableUpdateTracker.trackColumnInstancesChanged())}async handleActionMenuBeforeToggleEvent(e,t){this.selectionManager.handleActionMenuOpening(this.tableData[e])&&await this.emitSelectionChangeEvent(),this.openActionMenuRecordId=t.detail.recordIds[0]
|
|
11168
11193
|
const n=await this.getActionMenuToggleEventDetail(t)
|
|
11169
11194
|
this.$emit("action-menu-beforetoggle",n)}async handleRowActionMenuToggleEvent(e){const t=await this.getActionMenuToggleEventDetail(e)
|
|
11170
|
-
this.$emit("action-menu-toggle",t),e.detail.newState||(this.openActionMenuRecordId=void 0)}async getActionMenuToggleEventDetail(e){const t=this.selectionMode===
|
|
11195
|
+
this.$emit("action-menu-toggle",t),e.detail.newState||(this.openActionMenuRecordId=void 0)}async getActionMenuToggleEventDetail(e){const t=this.selectionMode===DO.multiple?await this.getSelectedRecordIds():[this.openActionMenuRecordId]
|
|
11171
11196
|
return{...e.detail,recordIds:t}}removeColumnObservers(){this.columnNotifiers.forEach((e=>{e.unsubscribe(this)})),this.columnNotifiers=[]}initialize(){this.isInitialized||(this.isInitialized=!0,this.$fastController.onConnectedCallback(),this.tableUpdateTracker.trackAllStateChanged(),this.observeColumns())}async processPendingUpdates(){if(this.initialize(),await u.nextUpdate(),this.tableUpdateTracker.hasPendingUpdates)throw new Error("Expected pending updates to be resolved")}observeColumns(){this.removeColumnObservers()
|
|
11172
11197
|
for(const e of this.columns){const t=m.getNotifier(e)
|
|
11173
11198
|
t.subscribe(this),this.columnNotifiers.push(t)
|
|
11174
11199
|
const n=m.getNotifier(e.columnInternals)
|
|
11175
11200
|
n.subscribe(this),this.columnNotifiers.push(n)
|
|
11176
11201
|
const i=m.getNotifier(e.columnInternals.validator)
|
|
11177
|
-
i.subscribe(this),this.columnNotifiers.push(i)}}getColumnsParticipatingInSorting(){return this.columns.filter((e=>!e.columnInternals.sortingDisabled&&e.columnInternals.currentSortDirection!==
|
|
11178
|
-
if(this.tableUpdateTracker.updateColumnSort&&(e.state.sorting=this.calculateTanStackSortState()),this.tableUpdateTracker.updateColumnDefinition&&(e.columns=this.calculateTanStackColumns()),this.tableUpdateTracker.updateRowIds&&(e.getRowId=this.calculateTanStackRowIdFunction(),e.state.rowSelection={},this.selectionManager.handleSelectionReset(),this.expansionManager.resetHierarchyOptions()),this.tableUpdateTracker.updateRowParentIds&&this.expansionManager.setHierarchyEnabled(this.isHierarchyEnabled()),this.tableUpdateTracker.updateSelectionMode&&(e.enableMultiRowSelection=this.selectionMode===
|
|
11202
|
+
i.subscribe(this),this.columnNotifiers.push(i)}}getColumnsParticipatingInSorting(){return this.columns.filter((e=>!e.columnInternals.sortingDisabled&&e.columnInternals.currentSortDirection!==IO.none&&"number"==typeof e.columnInternals.currentSortIndex))}getColumnsParticipatingInGrouping(){return this.columns.filter((e=>!e.columnInternals.groupingDisabled&&"number"==typeof e.columnInternals.groupIndex))}childItemsChanged(){this.updateColumnsFromChildItems()}async updateColumnsFromChildItems(){await tI(this.childItems),this.columns=this.childItems.filter((e=>e instanceof UO))}updateTanStack(){const e={state:{}}
|
|
11203
|
+
if(this.tableUpdateTracker.updateColumnSort&&(e.state.sorting=this.calculateTanStackSortState()),this.tableUpdateTracker.updateColumnDefinition&&(e.columns=this.calculateTanStackColumns()),this.tableUpdateTracker.updateRowIds&&(e.getRowId=this.calculateTanStackRowIdFunction(),e.state.rowSelection={},this.selectionManager.handleSelectionReset(),this.expansionManager.resetHierarchyOptions()),this.tableUpdateTracker.updateRowParentIds&&this.expansionManager.setHierarchyEnabled(this.isHierarchyEnabled()),this.tableUpdateTracker.updateSelectionMode&&(e.enableMultiRowSelection=this.selectionMode===DO.multiple,e.enableSubRowSelection=this.selectionMode===DO.multiple,e.state.rowSelection={},this.selectionManager.handleSelectionModeChanged(this.selectionMode)),this.dataHierarchyManager&&this.tableUpdateTracker.requiresTanStackDataReset)if(this.parentIdFieldName||this.tableUpdateTracker.updateRowParentIds){const t=this.dataHierarchyManager.getAllRecords(!0),n=this.calculateTanStackData(t)
|
|
11179
11204
|
n.state&&(e.state.rowSelection=n.state.rowSelection),e.data=n.data}else e.data=[...this.table.options.data]
|
|
11180
11205
|
this.tableUpdateTracker.updateGroupRows&&(e.state.grouping=this.calculateTanStackGroupingState()),(this.tableUpdateTracker.updateRowIds||this.tableUpdateTracker.updateRowParentIds||this.tableUpdateTracker.updateGroupRows)&&(e.state.expanded=!0,this.expansionManager.resetExpansionState()),this.updateTableOptions(e)}updateActionMenuSlots(){const e=new Set
|
|
11181
11206
|
for(const t of this.columns)t.actionMenuSlot&&e.add(t.actionMenuSlot)
|
|
11182
11207
|
this.actionMenuSlots=Array.from(e)}validate(){this.tableValidator.validateIdFieldConfiguration(this.selectionMode,this.idFieldName,this.parentIdFieldName),this.tableValidator.validateColumnIds(this.columns.map((e=>e.columnId))),this.tableValidator.validateColumnSortIndices(this.getColumnsParticipatingInSorting().map((e=>e.columnInternals.currentSortIndex))),this.tableValidator.validateColumnGroupIndices(this.getColumnsParticipatingInGrouping().map((e=>e.columnInternals.groupIndex))),this.tableValidator.validateColumnConfigurations(this.columns),this.dataHierarchyManager&&this.validateWithData(this.dataHierarchyManager.getAllRecords())}validateWithData(e){this.tableValidator.validateRecordIds(e,this.idFieldName),this.canRenderRows=this.checkValidity()}emitColumnConfigurationChangeEvent(){const e={columns:this.columns.map((e=>({columnId:e.columnId,sortIndex:e.columnInternals.currentSortIndex??void 0,sortDirection:e.columnInternals.currentSortDirection,groupIndex:e.columnInternals.groupIndex,hidden:e.columnHidden,fractionalWidth:e.columnInternals.currentFractionalWidth,pixelWidth:e.columnInternals.currentPixelWidth})))}
|
|
11183
11208
|
this.$emit("column-configuration-change",e)}async emitSelectionChangeEvent(){const e={selectedRecordIds:await this.getSelectedRecordIds()}
|
|
11184
|
-
this.$emit("selection-change",e)}selectionStateChanged(){this.setSelectionCheckboxState()}selectionCheckboxChanged(){this.setSelectionCheckboxState()}setSelectionCheckboxState(){this.selectionCheckbox&&(this.ignoreSelectionChangeEvents=!0,this.selectionCheckbox.checked=this.selectionState===
|
|
11209
|
+
this.$emit("selection-change",e)}selectionStateChanged(){this.setSelectionCheckboxState()}selectionCheckboxChanged(){this.setSelectionCheckboxState()}setSelectionCheckboxState(){this.selectionCheckbox&&(this.ignoreSelectionChangeEvents=!0,this.selectionCheckbox.checked=this.selectionState===TO,this.selectionCheckbox.indeterminate=this.selectionState===OO,this.ignoreSelectionChangeEvents=!1)}isHierarchyEnabled(){return"string"==typeof this.parentIdFieldName}refreshRows(){this.selectionState=this.getTableSelectionState()
|
|
11185
11210
|
let e=!1
|
|
11186
11211
|
const t=this.table.getRowModel().rows
|
|
11187
11212
|
this.tableData=t.map((t=>{const n=t.getIsGrouped(),i=!n&&t.getParentRow(),o=!n&&this.getRowCanExpand(t),s=!n&&!o&&!i&&t.depth>0&&!this.parentIdFieldName,r={record:t.original.clientRecord,id:t.id,selectionState:this.getRowSelectionState(t),isGroupRow:n,isExpanded:t.getIsExpanded(),groupRowValue:n?t.getValue(t.groupingColumnId):void 0,nestingLevel:s?t.depth-1:t.depth,isParentRow:o,immediateChildCount:t.subRows.length,groupColumn:this.getGroupRowColumn(t),isLoadingChildren:this.expansionManager.isLoadingChildren(t.id)}
|
|
11188
|
-
return e=e||o,r})),this.showCollapseAll=e||this.getColumnsParticipatingInGrouping().length>0,this.virtualizer.dataChanged()}getTableSelectionState(){return this.table.getIsAllRowsSelected()?
|
|
11213
|
+
return e=e||o,r})),this.showCollapseAll=e||this.getColumnsParticipatingInGrouping().length>0,this.virtualizer.dataChanged()}getTableSelectionState(){return this.table.getIsAllRowsSelected()?TO:this.table.getIsSomeRowsSelected()?OO:AO}getRowSelectionState(e){return e.getIsGrouped()?this.getGroupedRowSelectionState(e):e.getIsSelected()?TO:AO}getGroupedRowSelectionState(e){const t=e.getLeafRows().filter((e=>!e.getIsGrouped()))??[]
|
|
11189
11214
|
let n=!1,i=!1
|
|
11190
|
-
for(const e of t)if(e.getIsSelected()?n=!0:i=!0,n&&i)return
|
|
11191
|
-
return n?
|
|
11215
|
+
for(const e of t)if(e.getIsSelected()?n=!0:i=!0,n&&i)return OO
|
|
11216
|
+
return n?TO:AO}getGroupRowColumn(e){const t=e.groupingColumnId
|
|
11192
11217
|
if(void 0!==t)return this.columns.find((e=>e.columnInternals.uniqueId===t))}updateTableOptions(e){if(this.options={...this.options,...e,state:{...this.options.state,...e.state}},this.table.setOptions(this.options),e.data&&this.tableValidator.areRecordIdsValid()){const e=this.table.getRowModel().flatRows
|
|
11193
11218
|
this.expansionManager.processDataUpdate(e)}this.refreshRows()}toggleRowExpanded(e){const t=this.table.getRowModel().rows[e]
|
|
11194
11219
|
this.expansionManager.toggleRowExpansion(t)}calculateTanStackSortState(){const e=this.getColumnsParticipatingInSorting().sort(((e,t)=>e.columnInternals.currentSortIndex-t.columnInternals.currentSortIndex))
|
|
11195
|
-
return this.firstSortedColumn=e.length?e[0]:void 0,e.map((e=>({id:e.columnInternals.uniqueId,desc:e.columnInternals.currentSortDirection===
|
|
11196
|
-
if("string"==typeof n)return t.clientRecord[n]},sortingFn:
|
|
11220
|
+
return this.firstSortedColumn=e.length?e[0]:void 0,e.map((e=>({id:e.columnInternals.uniqueId,desc:e.columnInternals.currentSortDirection===IO.descending})))}calculateTanStackGroupingState(){return this.getColumnsParticipatingInGrouping().sort(((e,t)=>e.columnInternals.groupIndex-t.columnInternals.groupIndex)).map((e=>e.columnInternals.uniqueId))}calculateTanStackRowIdFunction(){return null===this.idFieldName||void 0===this.idFieldName?void 0:e=>e.clientRecord[this.idFieldName]}calculateTanStackColumns(){return this.columns.map((e=>({id:e.columnInternals.uniqueId,accessorFn:t=>{const n=e.columnInternals.operandDataRecordFieldName
|
|
11221
|
+
if("string"==typeof n)return t.clientRecord[n]},sortingFn:ER(e.columnInternals.sortOperation),sortUndefined:!1})))}calculateTanStackSelectionState(e){if(this.selectionMode===DO.none)return{}
|
|
11197
11222
|
const t={},n=this.tableValidator.getPresentRecordIds(e)
|
|
11198
|
-
for(const e of n)if(t[e]=!0,this.selectionMode===
|
|
11199
|
-
return t}}e([le({attribute:"id-field-name"})],
|
|
11200
|
-
const
|
|
11201
|
-
yi.getOrCreate().withPrefix("nimble").register(
|
|
11202
|
-
const
|
|
11223
|
+
for(const e of n)if(t[e]=!0,this.selectionMode===DO.single)break
|
|
11224
|
+
return t}}e([le({attribute:"id-field-name"})],WR.prototype,"idFieldName",void 0),e([le({attribute:"parent-id-field-name"})],WR.prototype,"parentIdFieldName",void 0),e([le({attribute:"selection-mode"})],WR.prototype,"selectionMode",void 0),e([g],WR.prototype,"tableData",void 0),e([g],WR.prototype,"columns",void 0),e([g],WR.prototype,"childItems",void 0),e([g],WR.prototype,"rowElements",void 0),e([g],WR.prototype,"actionMenuSlots",void 0),e([g],WR.prototype,"openActionMenuRecordId",void 0),e([g],WR.prototype,"canRenderRows",void 0),e([g],WR.prototype,"scrollX",void 0),e([g],WR.prototype,"rowGridColumns",void 0),e([g],WR.prototype,"selectionState",void 0),e([g],WR.prototype,"selectionCheckbox",void 0),e([g],WR.prototype,"showCollapseAll",void 0),e([g],WR.prototype,"firstSortedColumn",void 0),e([g],WR.prototype,"visibleColumns",void 0),e([g],WR.prototype,"tableScrollableMinWidth",void 0),e([g],WR.prototype,"documentShiftKeyDown",void 0)
|
|
11225
|
+
const GR=WR.compose({baseName:"table",template:fR,styles:WO})
|
|
11226
|
+
yi.getOrCreate().withPrefix("nimble").register(GR())
|
|
11227
|
+
const ZR=xe`
|
|
11203
11228
|
${Ro("contents")}
|
|
11204
11229
|
|
|
11205
11230
|
.header-content {
|
|
@@ -11207,14 +11232,14 @@ const oF=xe`
|
|
|
11207
11232
|
overflow: hidden;
|
|
11208
11233
|
text-overflow: ellipsis;
|
|
11209
11234
|
}
|
|
11210
|
-
`,
|
|
11235
|
+
`,KR=G`<span
|
|
11211
11236
|
${eg("hasOverflow")}
|
|
11212
11237
|
class="header-content"
|
|
11213
11238
|
title=${e=>e.hasOverflow&&e.headerTextContent?e.headerTextContent:null}
|
|
11214
11239
|
>
|
|
11215
11240
|
<slot ${Pe("contentSlot")}></slot>
|
|
11216
11241
|
</span>`
|
|
11217
|
-
function
|
|
11242
|
+
function XR(e){class t extends e{fractionalWidthChanged(){this.columnInternals.fractionalWidth=this.fractionalWidth??PO}minPixelWidthChanged(){this.columnInternals.minPixelWidth=this.minPixelWidth??NO}}return le({attribute:"fractional-width",converter:re})(t.prototype,"fractionalWidth"),le({attribute:"min-pixel-width",converter:re})(t.prototype,"minPixelWidth"),t}function YR(e){class t extends e{constructor(){super(...arguments),this.groupingDisabled=!1}groupingDisabledChanged(){this.columnInternals.groupingDisabled=this.groupingDisabled}groupIndexChanged(){this.columnInternals.groupIndex=this.groupIndex??void 0}}return le({attribute:"grouping-disabled",mode:"boolean"})(t.prototype,"groupingDisabled"),le({attribute:"group-index",converter:re})(t.prototype,"groupIndex"),t}function JR(e){class t extends e{}return le({attribute:"placeholder"})(t.prototype,"placeholder"),t}const QR=xe`
|
|
11218
11243
|
${Ro("flex")}
|
|
11219
11244
|
|
|
11220
11245
|
:host {
|
|
@@ -11243,7 +11268,7 @@ function rF(e){class t extends e{fractionalWidthChanged(){this.columnInternals.f
|
|
|
11243
11268
|
font: ${uc};
|
|
11244
11269
|
color: ${pc};
|
|
11245
11270
|
}
|
|
11246
|
-
`,
|
|
11271
|
+
`,eF=G`
|
|
11247
11272
|
<template
|
|
11248
11273
|
@click="${(e,t)=>("string"==typeof e.cellRecord?.href&&t.event.stopPropagation(),!0)}"
|
|
11249
11274
|
class="${e=>e.isPlaceholder?"placeholder":""}"
|
|
@@ -11275,19 +11300,19 @@ function rF(e){class t extends e{fractionalWidthChanged(){this.columnInternals.f
|
|
|
11275
11300
|
</span>`)}
|
|
11276
11301
|
</template>
|
|
11277
11302
|
`
|
|
11278
|
-
class
|
|
11279
|
-
return null==e&&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:"")}focusedRecycleCallback(){this.anchor?.blur()}}e([g],
|
|
11280
|
-
const
|
|
11281
|
-
yi.getOrCreate().withPrefix("nimble").register(
|
|
11282
|
-
class
|
|
11283
|
-
const
|
|
11303
|
+
class tF extends VO{constructor(){super(...arguments),this.hasOverflow=!1,this.isPlaceholder=!1}get text(){const e=this.cellRecord?.label??this.cellRecord?.href
|
|
11304
|
+
return null==e&&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:"")}focusedRecycleCallback(){this.anchor?.blur()}}e([g],tF.prototype,"hasOverflow",void 0),e([g],tF.prototype,"isPlaceholder",void 0),e([v],tF.prototype,"text",null)
|
|
11305
|
+
const nF=tF.compose({baseName:"table-column-anchor-cell-view",template:eF,styles:QR})
|
|
11306
|
+
yi.getOrCreate().withPrefix("nimble").register(nF())
|
|
11307
|
+
class iF extends LO{constructor(){super(...arguments),this.hasOverflow=!1,this.text=cv.getValueFor(this),this.noValuePlaceholderLabelSubscriber={handleChange:()=>{this.applyPlaceholderTextIfNeeded()}},this.emptyPlaceholderLabelSubscriber={handleChange:()=>{this.applyPlaceholderTextIfNeeded()}}}connectedCallback(){super.connectedCallback(),cv.subscribe(this.noValuePlaceholderLabelSubscriber,this),dv.subscribe(this.emptyPlaceholderLabelSubscriber,this),this.applyPlaceholderTextIfNeeded()}disconnectedCallback(){super.disconnectedCallback(),cv.unsubscribe(this.noValuePlaceholderLabelSubscriber),dv.unsubscribe(this.emptyPlaceholderLabelSubscriber)}columnConfigChanged(){this.applyPlaceholderTextIfNeeded()||this.updateText()}groupHeaderValueChanged(){this.applyPlaceholderTextIfNeeded()||this.updateText()}applyPlaceholderTextIfNeeded(){return null===this.groupHeaderValue||void 0===this.groupHeaderValue?(this.text=cv.getValueFor(this),!0):""===this.groupHeaderValue&&(this.text=dv.getValueFor(this),!0)}}e([g],iF.prototype,"hasOverflow",void 0),e([g],iF.prototype,"text",void 0)
|
|
11308
|
+
const oF=G`
|
|
11284
11309
|
<span
|
|
11285
11310
|
${eg("hasOverflow")}
|
|
11286
11311
|
title="${e=>e.hasOverflow&&e.text?e.text:null}"
|
|
11287
11312
|
>
|
|
11288
11313
|
${e=>e.text}
|
|
11289
11314
|
</span>
|
|
11290
|
-
`,
|
|
11315
|
+
`,sF=xe`
|
|
11291
11316
|
${Ro("flex")}
|
|
11292
11317
|
|
|
11293
11318
|
span {
|
|
@@ -11298,20 +11323,20 @@ const fF=G`
|
|
|
11298
11323
|
text-overflow: ellipsis;
|
|
11299
11324
|
}
|
|
11300
11325
|
`
|
|
11301
|
-
const
|
|
11302
|
-
yi.getOrCreate().withPrefix("nimble").register(
|
|
11303
|
-
const
|
|
11304
|
-
function
|
|
11305
|
-
const
|
|
11306
|
-
yi.getOrCreate().withPrefix("nimble").register(
|
|
11307
|
-
class
|
|
11308
|
-
try{return e.format(t)}catch(e){return""}}e([le({attribute:"field-name"})],
|
|
11309
|
-
const
|
|
11310
|
-
yi.getOrCreate().withPrefix("nimble").register(
|
|
11311
|
-
const
|
|
11326
|
+
const rF=class extends iF{updateText(){this.text="string"==typeof this.groupHeaderValue?this.groupHeaderValue:""}}.compose({baseName:"table-column-text-group-header-view",template:oF,styles:sF})
|
|
11327
|
+
yi.getOrCreate().withPrefix("nimble").register(rF())
|
|
11328
|
+
const aF="nimble-table-column-text-group-header-view"
|
|
11329
|
+
function lF(e){class t extends e{constructor(){super(...arguments),this.sortingDisabled=!1,this.sortDirection=IO.none}sortingDisabledChanged(){this.columnInternals.sortingDisabled=this.sortingDisabled,this.sortingDisabled?(this.columnInternals.currentSortDirection=IO.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 le({attribute:"sorting-disabled",mode:"boolean"})(t.prototype,"sortingDisabled"),le({attribute:"sort-index",converter:re})(t.prototype,"sortIndex"),le({attribute:"sort-direction"})(t.prototype,"sortDirection"),t}class cF extends(YR(XR(JR(lF(UO))))){constructor(){super(...arguments),this.underlineHidden=!1}placeholderChanged(){this.updateColumnConfig()}getColumnInternalsOptions(){return{cellRecordFieldNames:["label","href"],cellViewTag:"nimble-table-column-anchor-cell-view",groupHeaderViewTag:aF,delegatedEvents:["click"],sortOperation:FO,validator:new jR([])}}labelFieldNameChanged(){this.columnInternals.dataRecordFieldNames=[this.labelFieldName,this.hrefFieldName],this.columnInternals.operandDataRecordFieldName=this.labelFieldName}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}}}e([le({attribute:"label-field-name"})],cF.prototype,"labelFieldName",void 0),e([le({attribute:"href-field-name"})],cF.prototype,"hrefFieldName",void 0),e([le],cF.prototype,"appearance",void 0),e([le({attribute:"underline-hidden",mode:"boolean"})],cF.prototype,"underlineHidden",void 0),e([le],cF.prototype,"hreflang",void 0),e([le],cF.prototype,"ping",void 0),e([le],cF.prototype,"referrerpolicy",void 0),e([le],cF.prototype,"rel",void 0),e([le],cF.prototype,"target",void 0),e([le],cF.prototype,"type",void 0),e([le],cF.prototype,"download",void 0)
|
|
11330
|
+
const dF=cF.compose({baseName:"table-column-anchor",template:KR,styles:ZR})
|
|
11331
|
+
yi.getOrCreate().withPrefix("nimble").register(dF())
|
|
11332
|
+
class hF extends UO{fieldNameChanged(){this.columnInternals.dataRecordFieldNames=[this.fieldName],this.columnInternals.operandDataRecordFieldName=this.fieldName}}function uF(e){return YR(XR(JR(lF(e))))}function pF(e,t){if("number"!=typeof t)return""
|
|
11333
|
+
try{return e.format(t)}catch(e){return""}}e([le({attribute:"field-name"})],hF.prototype,"fieldName",void 0)
|
|
11334
|
+
const fF=class extends iF{updateText(){this.columnConfig?this.text=pF(this.columnConfig.formatter,this.groupHeaderValue):this.text=""}}.compose({baseName:"table-column-date-text-group-header-view",template:oF,styles:sF})
|
|
11335
|
+
yi.getOrCreate().withPrefix("nimble").register(fF())
|
|
11336
|
+
const mF="left",gF="right",vF=G`
|
|
11312
11337
|
<template
|
|
11313
11338
|
class="
|
|
11314
|
-
${e=>e.alignment===
|
|
11339
|
+
${e=>e.alignment===gF?"right-align":""}
|
|
11315
11340
|
${e=>e.isPlaceholder?"placeholder":""}
|
|
11316
11341
|
"
|
|
11317
11342
|
>
|
|
@@ -11322,7 +11347,7 @@ const $F="left",MF="right",_F=G`
|
|
|
11322
11347
|
${e=>e.text}
|
|
11323
11348
|
</span>
|
|
11324
11349
|
</template>
|
|
11325
|
-
`,
|
|
11350
|
+
`,bF=xe`
|
|
11326
11351
|
${Ro("flex")}
|
|
11327
11352
|
|
|
11328
11353
|
:host {
|
|
@@ -11346,22 +11371,22 @@ const $F="left",MF="right",_F=G`
|
|
|
11346
11371
|
color: ${pc};
|
|
11347
11372
|
}
|
|
11348
11373
|
`
|
|
11349
|
-
class
|
|
11350
|
-
return"string"==typeof t&&null==e?(this.text=t,this.isPlaceholder=!0):this.isPlaceholder=!1,this.isPlaceholder}}e([g],
|
|
11351
|
-
const
|
|
11352
|
-
yi.getOrCreate().withPrefix("nimble").register(
|
|
11353
|
-
const
|
|
11354
|
-
class
|
|
11355
|
-
class
|
|
11374
|
+
class yF extends VO{constructor(){super(...arguments),this.hasOverflow=!1,this.text="",this.alignment=mF,this.isPlaceholder=!1}columnConfigChanged(){this.applyPlaceholderTextIfNeeded()||this.updateText()}cellRecordChanged(){this.applyPlaceholderTextIfNeeded()||this.updateText()}applyPlaceholderTextIfNeeded(){const e=this.cellRecord?.value,t=this.columnConfig?.placeholder
|
|
11375
|
+
return"string"==typeof t&&null==e?(this.text=t,this.isPlaceholder=!0):this.isPlaceholder=!1,this.isPlaceholder}}e([g],yF.prototype,"hasOverflow",void 0),e([g],yF.prototype,"text",void 0),e([g],yF.prototype,"alignment",void 0),e([g],yF.prototype,"isPlaceholder",void 0)
|
|
11376
|
+
const wF=class extends yF{updateText(){this.columnConfig?this.text=pF(this.columnConfig.formatter,this.cellRecord?.value):this.text=""}}.compose({baseName:"table-column-date-text-cell-view",template:vF,styles:bF})
|
|
11377
|
+
yi.getOrCreate().withPrefix("nimble").register(wF())
|
|
11378
|
+
const xF=void 0,CF=["invalidCustomOptionsCombination"]
|
|
11379
|
+
class kF extends jR{constructor(){super(CF)}setCustomOptionsValidity(e){this.setConditionValue("invalidCustomOptionsCombination",!e)}}const SF={toView:e=>"boolean"==typeof e?e.toString():null,fromView:e=>"true"===e||!0===e||"false"!==e&&!1!==e&&void 0}
|
|
11380
|
+
class $F extends(uF(hF)){constructor(){super(...arguments),this.langSubscriber={handleChange:()=>{this.updateColumnConfig()}}}connectedCallback(){super.connectedCallback(),Ma.subscribe(this.langSubscriber,this),this.updateColumnConfig()}disconnectedCallback(){super.disconnectedCallback(),Ma.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:RO,validator:new kF}}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 e=this.createFormatter()
|
|
11356
11381
|
if(e){const t={formatter:e,placeholder:this.placeholder}
|
|
11357
11382
|
this.columnInternals.columnConfig=t,this.columnInternals.validator.setCustomOptionsValidity(!0)}else this.columnInternals.columnConfig=void 0,this.columnInternals.validator.setCustomOptionsValidity(!1)}createFormatter(){let e
|
|
11358
|
-
e=this.format===
|
|
11359
|
-
try{return new Intl.DateTimeFormat(Ma.getValueFor(this),e)}catch(e){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}}}e([le]
|
|
11360
|
-
const
|
|
11361
|
-
yi.getOrCreate().withPrefix("nimble").register(
|
|
11362
|
-
const
|
|
11363
|
-
yi.getOrCreate().withPrefix("nimble").register(
|
|
11364
|
-
class
|
|
11383
|
+
e=this.format===xF?{dateStyle:"medium",timeStyle:"medium"}:this.getCustomFormattingOptions()
|
|
11384
|
+
try{return new Intl.DateTimeFormat(Ma.getValueFor(this),e)}catch(e){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}}}e([le],$F.prototype,"format",void 0),e([le({attribute:"custom-locale-matcher"})],$F.prototype,"customLocaleMatcher",void 0),e([le({attribute:"custom-weekday"})],$F.prototype,"customWeekday",void 0),e([le({attribute:"custom-era"})],$F.prototype,"customEra",void 0),e([le({attribute:"custom-year"})],$F.prototype,"customYear",void 0),e([le({attribute:"custom-month"})],$F.prototype,"customMonth",void 0),e([le({attribute:"custom-day"})],$F.prototype,"customDay",void 0),e([le({attribute:"custom-hour"})],$F.prototype,"customHour",void 0),e([le({attribute:"custom-minute"})],$F.prototype,"customMinute",void 0),e([le({attribute:"custom-second"})],$F.prototype,"customSecond",void 0),e([le({attribute:"custom-time-zone-name"})],$F.prototype,"customTimeZoneName",void 0),e([le({attribute:"custom-format-matcher"})],$F.prototype,"customFormatMatcher",void 0),e([le({attribute:"custom-hour12",converter:SF})],$F.prototype,"customHour12",void 0),e([le({attribute:"custom-time-zone"})],$F.prototype,"customTimeZone",void 0),e([le({attribute:"custom-calendar"})],$F.prototype,"customCalendar",void 0),e([le({attribute:"custom-day-period"})],$F.prototype,"customDayPeriod",void 0),e([le({attribute:"custom-numbering-system"})],$F.prototype,"customNumberingSystem",void 0),e([le({attribute:"custom-date-style"})],$F.prototype,"customDateStyle",void 0),e([le({attribute:"custom-time-style"})],$F.prototype,"customTimeStyle",void 0),e([le({attribute:"custom-hour-cycle"})],$F.prototype,"customHourCycle",void 0)
|
|
11385
|
+
const MF=$F.compose({baseName:"table-column-date-text",template:KR,styles:ZR})
|
|
11386
|
+
yi.getOrCreate().withPrefix("nimble").register(MF())
|
|
11387
|
+
const _F=class extends yF{updateText(){this.text=this.columnConfig?.formatter.format(this.cellRecord?.value)??""}}.compose({baseName:"table-column-duration-text-cell-view",template:vF,styles:bF})
|
|
11388
|
+
yi.getOrCreate().withPrefix("nimble").register(_F())
|
|
11389
|
+
class EF{constructor(e){this.lang=e,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(e){if("number"!=typeof e||e<0||!Number.isFinite(e))return""
|
|
11365
11390
|
const t=[],n=1e3,i=6e4,o=36e5,s=864e5,r=e/s
|
|
11366
11391
|
let a=e
|
|
11367
11392
|
const l=Math.floor(r)
|
|
@@ -11374,37 +11399,37 @@ if(a-=d*i,d){const e=this.minutesFormatter.format(d)
|
|
|
11374
11399
|
t.push(e)}const h=a/n,u=0===h?0:h%60
|
|
11375
11400
|
if(e<1&&0!==h)return this.scientificSecondsFormatter.format(h)
|
|
11376
11401
|
if(u>=5e-4||0===u&&0===t.length){const e=this.secondsFormatter.format(u)
|
|
11377
|
-
t.push(e)}return t.join(", ")}}const
|
|
11378
|
-
yi.getOrCreate().withPrefix("nimble").register(
|
|
11379
|
-
class
|
|
11380
|
-
this.columnInternals.columnConfig=e}}const
|
|
11381
|
-
yi.getOrCreate().withPrefix("nimble").register(
|
|
11382
|
-
const
|
|
11402
|
+
t.push(e)}return t.join(", ")}}const IF=class extends iF{updateText(){this.columnConfig?this.text=this.columnConfig.formatter.format(this.groupHeaderValue):this.text=""}}.compose({baseName:"table-column-duration-text-group-header-view",template:oF,styles:sF})
|
|
11403
|
+
yi.getOrCreate().withPrefix("nimble").register(IF())
|
|
11404
|
+
class DF extends(uF(hF)){constructor(){super(...arguments),this.langSubscriber={handleChange:()=>{this.updateColumnConfig()}}}connectedCallback(){super.connectedCallback(),Ma.subscribe(this.langSubscriber,this),this.updateColumnConfig()}disconnectedCallback(){super.disconnectedCallback(),Ma.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:RO,validator:new jR([])}}updateColumnConfig(){const e={formatter:new EF(Ma.getValueFor(this)),placeholder:this.placeholder}
|
|
11405
|
+
this.columnInternals.columnConfig=e}}const AF=DF.compose({baseName:"table-column-duration-text",template:KR,styles:ZR})
|
|
11406
|
+
yi.getOrCreate().withPrefix("nimble").register(AF())
|
|
11407
|
+
const TF=(e,t)=>{if("number"===t){const t=re.fromView(e)
|
|
11383
11408
|
return null===t?void 0:t}return"boolean"===t?!1!==e&&"false"!==e&&(!0===e||"true"===e||void 0):e?.toString()??void 0}
|
|
11384
|
-
class
|
|
11385
|
-
return this.mappings.forEach((t=>{const n=
|
|
11409
|
+
class OF extends UO{constructor(){super(...arguments),this.mappingNotifiers=[],this.mappings=[],this.keyType="string"}handleChange(e,t){e instanceof Cv&&"string"==typeof t&&this.updateColumnConfig()}updateColumnConfig(){this.columnInternals.validator.validate(this.mappings,this.keyType),this.columnInternals.columnConfig=this.checkValidity()?this.createColumnConfig(this.getMappingConfigs()):void 0}getMappingConfigs(){const e=new Map
|
|
11410
|
+
return this.mappings.forEach((t=>{const n=TF(t.key,this.keyType)
|
|
11386
11411
|
if(void 0===n)throw Error("Key was invalid for type. Validation should have prevented this.")
|
|
11387
11412
|
const i=this.createMappingConfig(t)
|
|
11388
11413
|
e.set(n,i)})),e}fieldNameChanged(){this.columnInternals.dataRecordFieldNames=[this.fieldName],this.columnInternals.operandDataRecordFieldName=this.fieldName}mappingsChanged(){this.updateColumnConfig(),this.observeMappings()}keyTypeChanged(){this.updateColumnConfig()}removeMappingObservers(){this.mappingNotifiers.forEach((e=>{e.unsubscribe(this)})),this.mappingNotifiers=[]}observeMappings(){this.removeMappingObservers()
|
|
11389
11414
|
for(const e of this.mappings){const t=m.getNotifier(e)
|
|
11390
|
-
t.subscribe(this),this.mappingNotifiers.push(t)}}}e([g],
|
|
11391
|
-
const
|
|
11392
|
-
${
|
|
11415
|
+
t.subscribe(this),this.mappingNotifiers.push(t)}}}e([g],OF.prototype,"mappings",void 0),e([le({attribute:"field-name"})],OF.prototype,"fieldName",void 0),e([le({attribute:"key-type"})],OF.prototype,"keyType",void 0)
|
|
11416
|
+
const RF=xe`
|
|
11417
|
+
${ZR}
|
|
11393
11418
|
|
|
11394
11419
|
slot[name='mapping'] {
|
|
11395
11420
|
display: none;
|
|
11396
11421
|
}
|
|
11397
|
-
`,
|
|
11398
|
-
class
|
|
11422
|
+
`,FF=G`${KR}<slot ${Ye("mappings")} name="mapping"></slot>`
|
|
11423
|
+
class NF extends jR{constructor(e){super(e)}validate(e,t){this.untrackAll()
|
|
11399
11424
|
const n=e.map((e=>e.key))
|
|
11400
|
-
this.validateKeyValuesForType(n,t),this.validateUniqueKeys(n,t),this.validateNoMissingKeys(e)}validateKeyValuesForType(e,t){const n=e.some((e=>void 0!==e&&void 0===
|
|
11401
|
-
this.setConditionValue("invalidMappingKeyValueForType",n)}validateUniqueKeys(e,t){const n=e.map((e=>
|
|
11425
|
+
this.validateKeyValuesForType(n,t),this.validateUniqueKeys(n,t),this.validateNoMissingKeys(e)}validateKeyValuesForType(e,t){const n=e.some((e=>void 0!==e&&void 0===TF(e,t)))
|
|
11426
|
+
this.setConditionValue("invalidMappingKeyValueForType",n)}validateUniqueKeys(e,t){const n=e.map((e=>TF(e,t))),i=new Set(n).size!==n.length
|
|
11402
11427
|
this.setConditionValue("duplicateMappingKey",i)}validateNoMissingKeys(e){const t=e.some((e=>void 0===e.key))
|
|
11403
|
-
this.setConditionValue("missingKeyValue",t)}}const
|
|
11404
|
-
class
|
|
11405
|
-
this.setConditionValue("invalidIconName",t)}validateNoMissingText(e){const t=e.filter(
|
|
11406
|
-
this.setConditionValue("missingTextValue",t)}validateMappingTypes(e){const t=e.every(
|
|
11407
|
-
this.setConditionValue("unsupportedMappingType",!t)}}const
|
|
11428
|
+
this.setConditionValue("missingKeyValue",t)}}const PF=["invalidMappingKeyValueForType","duplicateMappingKey","missingKeyValue","unsupportedMappingType","invalidIconName","missingTextValue"]
|
|
11429
|
+
class LF extends NF{constructor(){super(PF)}static isIconMappingElement(e){return e instanceof Ev}static isSupportedMappingElement(e){return e instanceof Ev||e instanceof Dv||e instanceof Tv||e instanceof $v}validate(e,t){super.validate(e,t),this.validateMappingTypes(e),this.validateIconNames(e),this.validateNoMissingText(e)}validateIconNames(e){const t=e.filter(LF.isIconMappingElement).some((e=>void 0===e.resolvedIcon))
|
|
11430
|
+
this.setConditionValue("invalidIconName",t)}validateNoMissingText(e){const t=e.filter(LF.isSupportedMappingElement).some((e=>void 0===e.text))
|
|
11431
|
+
this.setConditionValue("missingTextValue",t)}validateMappingTypes(e){const t=e.every(LF.isSupportedMappingElement)
|
|
11432
|
+
this.setConditionValue("unsupportedMappingType",!t)}}const zF=xe`
|
|
11408
11433
|
${Ro("inline-flex")}
|
|
11409
11434
|
|
|
11410
11435
|
:host {
|
|
@@ -11426,7 +11451,7 @@ this.setConditionValue("unsupportedMappingType",!t)}}const KF=xe`
|
|
|
11426
11451
|
overflow: hidden;
|
|
11427
11452
|
text-overflow: ellipsis;
|
|
11428
11453
|
}
|
|
11429
|
-
`,
|
|
11454
|
+
`,VF=G`
|
|
11430
11455
|
${He((e=>e.visualizationTemplate),G`
|
|
11431
11456
|
<span class="reserve-icon-size">
|
|
11432
11457
|
${e=>e.visualizationTemplate}
|
|
@@ -11437,8 +11462,8 @@ this.setConditionValue("unsupportedMappingType",!t)}}const KF=xe`
|
|
|
11437
11462
|
title="${e=>e.hasOverflow&&e.text?e.text:null}"
|
|
11438
11463
|
class="text"
|
|
11439
11464
|
>${e=>e.text}</span>
|
|
11440
|
-
`,
|
|
11441
|
-
class
|
|
11465
|
+
`,HF={default:void 0,error:"error",warning:"warning",success:"success",information:"information"}
|
|
11466
|
+
class BF{constructor(e){this.text=e}}class qF extends BF{constructor(e,t,n,i){var o
|
|
11442
11467
|
super(n),this.severity=t,this.textHidden=i,this.iconTemplate=G`
|
|
11443
11468
|
<${o=e}
|
|
11444
11469
|
title="${e=>e.textHidden?e.text:""}"
|
|
@@ -11448,20 +11473,20 @@ super(n),this.severity=t,this.textHidden=i,this.iconTemplate=G`
|
|
|
11448
11473
|
severity="${e=>e.severity}"
|
|
11449
11474
|
>
|
|
11450
11475
|
</${o}>
|
|
11451
|
-
`}}const
|
|
11452
|
-
<${
|
|
11476
|
+
`}}const UF=G`
|
|
11477
|
+
<${bT}
|
|
11453
11478
|
title="${e=>e.textHidden?e.text:""}"
|
|
11454
11479
|
aria-label="${e=>e.text}"
|
|
11455
11480
|
aria-hidden="${e=>e.textHidden?"false":"true"}"
|
|
11456
11481
|
>
|
|
11457
|
-
</${
|
|
11482
|
+
</${bT}>
|
|
11458
11483
|
`
|
|
11459
|
-
class
|
|
11484
|
+
class jF extends BF{constructor(e,t){super(e),this.textHidden=t,this.spinnerTemplate=UF}}class WF extends BF{}class GF extends BF{}class ZF extends LO{constructor(){super(...arguments),this.hasOverflow=!1,this.text="",this.textHidden=!1}columnConfigChanged(){this.updateState()}groupHeaderValueChanged(){this.updateState()}updateState(){if(this.resetState(),!this.columnConfig)return
|
|
11460
11485
|
const e=this.groupHeaderValue,t=this.columnConfig.mappingConfigs.get(e)
|
|
11461
|
-
t instanceof
|
|
11462
|
-
const
|
|
11463
|
-
yi.getOrCreate().withPrefix("nimble").register(
|
|
11464
|
-
const
|
|
11486
|
+
t instanceof qF?(this.severity=t.severity,this.text=t.text??"",this.visualizationTemplate=t.iconTemplate):t instanceof jF?(this.text=t.text??"",this.visualizationTemplate=t.spinnerTemplate):(t instanceof WF||t instanceof GF)&&(this.text=t.text??"")}resetState(){this.text="",this.visualizationTemplate=void 0,this.severity=HF.default}}e([g],ZF.prototype,"hasOverflow",void 0),e([g],ZF.prototype,"text",void 0),e([g],ZF.prototype,"severity",void 0),e([g],ZF.prototype,"visualizationTemplate",void 0)
|
|
11487
|
+
const KF=ZF.compose({baseName:"table-column-mapping-group-header-view",template:VF,styles:zF})
|
|
11488
|
+
yi.getOrCreate().withPrefix("nimble").register(KF())
|
|
11489
|
+
const XF=xe`
|
|
11465
11490
|
${Ro("inline-flex")}
|
|
11466
11491
|
|
|
11467
11492
|
:host {
|
|
@@ -11483,7 +11508,7 @@ const rN=xe`
|
|
|
11483
11508
|
overflow: hidden;
|
|
11484
11509
|
text-overflow: ellipsis;
|
|
11485
11510
|
}
|
|
11486
|
-
`,
|
|
11511
|
+
`,YF=G`
|
|
11487
11512
|
${He((e=>e.visualizationTemplate),G`
|
|
11488
11513
|
<span class="reserve-icon-size">
|
|
11489
11514
|
${e=>e.visualizationTemplate}
|
|
@@ -11499,22 +11524,22 @@ const rN=xe`
|
|
|
11499
11524
|
</span>
|
|
11500
11525
|
`)}
|
|
11501
11526
|
`
|
|
11502
|
-
class
|
|
11527
|
+
class JF extends VO{constructor(){super(...arguments),this.textHidden=!1,this.hasOverflow=!1}columnConfigChanged(){this.updateState()}cellRecordChanged(){this.updateState()}updateState(){if(this.resetState(),!this.columnConfig||!this.cellRecord)return
|
|
11503
11528
|
const e=this.cellRecord.value
|
|
11504
11529
|
if(null==e)return
|
|
11505
11530
|
const t=this.columnConfig.mappingConfigs.get(e)
|
|
11506
|
-
t instanceof
|
|
11507
|
-
const
|
|
11508
|
-
yi.getOrCreate().withPrefix("nimble").register(
|
|
11509
|
-
const
|
|
11510
|
-
class
|
|
11511
|
-
return new
|
|
11512
|
-
if(e instanceof Tv)return new
|
|
11513
|
-
if(e instanceof $v)return new
|
|
11514
|
-
throw new Error("Unsupported mapping")}widthModeChanged(){this.widthMode===
|
|
11515
|
-
const
|
|
11516
|
-
yi.getOrCreate().withPrefix("nimble").register(
|
|
11517
|
-
const
|
|
11531
|
+
t instanceof qF?(this.severity=t.severity,this.text=t.text,this.visualizationTemplate=t.iconTemplate,this.textHidden=t.textHidden):t instanceof jF?(this.text=t.text,this.visualizationTemplate=t.spinnerTemplate,this.textHidden=t.textHidden):t instanceof WF?(this.text=t.text,this.textHidden=!1):t instanceof GF&&(this.text=t.text,this.textHidden=!0)}resetState(){this.text=void 0,this.textHidden=!1,this.visualizationTemplate=void 0,this.severity=HF.default}}e([g],JF.prototype,"severity",void 0),e([g],JF.prototype,"text",void 0),e([g],JF.prototype,"visualizationTemplate",void 0),e([g],JF.prototype,"textHidden",void 0),e([g],JF.prototype,"hasOverflow",void 0)
|
|
11532
|
+
const QF=JF.compose({baseName:"table-column-mapping-cell-view",template:YF,styles:XF})
|
|
11533
|
+
yi.getOrCreate().withPrefix("nimble").register(QF())
|
|
11534
|
+
const eN="icon-size"
|
|
11535
|
+
class tN extends(YR(XR(lF(OF)))){minPixelWidthChanged(){this.widthMode!==eN&&(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:RO,validator:new LF}}createColumnConfig(e){return{mappingConfigs:e}}createMappingConfig(e){if(e instanceof Ev){if(!e.resolvedIcon)throw Error("Unresolved icon")
|
|
11536
|
+
return new qF(e.resolvedIcon,e.severity,e.text,e.textHidden)}if(e instanceof Dv)return new jF(e.text,e.textHidden)
|
|
11537
|
+
if(e instanceof Tv)return new WF(e.text)
|
|
11538
|
+
if(e instanceof $v)return new GF(e.text)
|
|
11539
|
+
throw new Error("Unsupported mapping")}widthModeChanged(){this.widthMode===eN?(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:NO}}e([le({attribute:"width-mode"})],tN.prototype,"widthMode",void 0)
|
|
11540
|
+
const nN=tN.compose({baseName:"table-column-mapping",template:FF,styles:RF})
|
|
11541
|
+
yi.getOrCreate().withPrefix("nimble").register(nN())
|
|
11542
|
+
const iN=G`<span
|
|
11518
11543
|
${eg("hasOverflow")}
|
|
11519
11544
|
class="header-content"
|
|
11520
11545
|
title=${e=>e.hasOverflow&&e.headerTextContent?e.headerTextContent:null}
|
|
@@ -11522,13 +11547,13 @@ const pN=G`<span
|
|
|
11522
11547
|
<slot ${Pe("contentSlot")}></slot>
|
|
11523
11548
|
<slot ${Ye({property:"unitElements",filter:Ze()})} name="unit"></slot>
|
|
11524
11549
|
</span>`
|
|
11525
|
-
const
|
|
11526
|
-
yi.getOrCreate().withPrefix("nimble").register(
|
|
11527
|
-
const
|
|
11528
|
-
yi.getOrCreate().withPrefix("nimble").register(
|
|
11529
|
-
const
|
|
11530
|
-
class
|
|
11531
|
-
try{return this.tryFormat(e)}catch{return""}}}class
|
|
11550
|
+
const oN=class extends iF{updateText(){this.text=this.columnConfig?.formatter?.format(this.groupHeaderValue)??""}}.compose({baseName:"table-column-number-text-group-header-view",template:oF,styles:sF})
|
|
11551
|
+
yi.getOrCreate().withPrefix("nimble").register(oN())
|
|
11552
|
+
const sN=class extends yF{columnConfigChanged(){super.columnConfigChanged(),this.alignment=this.columnConfig?.alignment??mF}updateText(){this.text=this.columnConfig?.formatter?.format(this.cellRecord?.value)??""}}.compose({baseName:"table-column-number-text-cell-view",template:vF,styles:bF})
|
|
11553
|
+
yi.getOrCreate().withPrefix("nimble").register(sN())
|
|
11554
|
+
const rN={default:void 0,decimal:"decimal"},aN="left",lN="right"
|
|
11555
|
+
class cN{format(e){if("number"!=typeof e)return""
|
|
11556
|
+
try{return this.tryFormat(e)}catch{return""}}}class dN{constructor(e){this.locale=e.locale,this.intlNumberFormatOptions=e.intlNumberFormatOptions}}class hN extends dN{constructor(e,t){super(e),this.formatter=new Intl.NumberFormat(this.locale,{...t,...this.intlNumberFormatOptions})}static createFactory(e){return t=>new hN(t,e)}format(e){return this.formatter.format(e)}}class uN{constructor(e,t){this.scaleFactor=e,this.scaledUnitFormatFactory=t}isBase(){return 1===this.scaleFactor}}class pN{constructor(e){this.supportedScaledUnits=e
|
|
11532
11557
|
const t=e.every(((e,t,n)=>0===t||n[t-1].scaleFactor<e.scaleFactor))
|
|
11533
11558
|
if(!t)throw new Error("Supported scaled units must have unique and ordered scale factors")
|
|
11534
11559
|
const n=e.find((e=>e.isBase()))
|
|
@@ -11537,39 +11562,39 @@ this.supportedScaledUnits=e,this.baseScaledUnit=n}scaleNumber(e){const t=Math.ab
|
|
|
11537
11562
|
if(1===this.supportedScaledUnits.length||0===t||t===1/0||Number.isNaN(t))return{scaledValue:e,scaledUnit:this.baseScaledUnit}
|
|
11538
11563
|
for(let n=this.supportedScaledUnits.length-1;n>=0;n-=1){const i=this.supportedScaledUnits[n]
|
|
11539
11564
|
if(t/i.scaleFactor>=1)return{scaledValue:e/i.scaleFactor,scaledUnit:i}}const n=this.supportedScaledUnits[0]
|
|
11540
|
-
return{scaledValue:e/n.scaleFactor,scaledUnit:n}}}const
|
|
11541
|
-
class
|
|
11565
|
+
return{scaledValue:e/n.scaleFactor,scaledUnit:n}}}const fN=new class extends pN{constructor(){super([new uN(1,hN.createFactory({}))])}},mN="negative"
|
|
11566
|
+
class gN extends cN{constructor(e,{unitScale:t=fN}={unitScale:fN}){super(),this.defaultIntlNumberFormatOptions={maximumSignificantDigits:gN.maximumDigits,maximumFractionDigits:gN.maximumDigits-1,roundingPriority:"lessPrecision",signDisplay:mN},this.defaultScaledUnitFormatters=new Map,this.exponentialIntlNumberFormatOptions={maximumSignificantDigits:gN.maximumDigits,notation:"scientific",signDisplay:mN}
|
|
11542
11567
|
for(const n of t.supportedScaledUnits)this.defaultScaledUnitFormatters.set(n.scaleFactor,n.scaledUnitFormatFactory({locale:e,intlNumberFormatOptions:this.defaultIntlNumberFormatOptions}))
|
|
11543
11568
|
this.exponentialScaledUnitFormatter=t.baseScaledUnit.scaledUnitFormatFactory({locale:e,intlNumberFormatOptions:this.exponentialIntlNumberFormatOptions}),this.unitScale=t}resolvedOptions(){return{unitScale:this.unitScale}}tryFormat(e){const{scaledValue:t,scaledUnit:n}=this.unitScale.scaleNumber(e),i=Math.abs(t)
|
|
11544
|
-
return 0!==i&&(i>=
|
|
11545
|
-
class
|
|
11569
|
+
return 0!==i&&(i>=gN.exponentialUpperBound||i<gN.exponentialLowerBound)?this.exponentialScaledUnitFormatter.format(e):this.defaultScaledUnitFormatters.get(n.scaleFactor).format(t)}}gN.maximumDigits=6,gN.exponentialLowerBound=995e-6,gN.exponentialUpperBound=999999.5
|
|
11570
|
+
class vN extends cN{constructor(e,{minimumFractionDigits:t=0,maximumFractionDigits:n=Math.max(3,t),unitScale:i=fN}={minimumFractionDigits:0,maximumFractionDigits:3,unitScale:fN}){super(),this.scaledUnitFormatters=new Map
|
|
11546
11571
|
const o={maximumFractionDigits:n,minimumFractionDigits:t,signDisplay:"negative"}
|
|
11547
11572
|
for(const t of i.supportedScaledUnits)this.scaledUnitFormatters.set(t.scaleFactor,t.scaledUnitFormatFactory({locale:e,intlNumberFormatOptions:o}))
|
|
11548
11573
|
this.unitScale=i,this.minimumFractionDigits=t,this.maximumFractionDigits=n}resolvedOptions(){return{unitScale:this.unitScale,maximumFractionDigits:this.maximumFractionDigits,minimumFractionDigits:this.minimumFractionDigits}}tryFormat(e){const{scaledValue:t,scaledUnit:n}=this.unitScale.scaleNumber(e)
|
|
11549
|
-
return this.scaledUnitFormatters.get(n.scaleFactor).format(t)}}class
|
|
11574
|
+
return this.scaledUnitFormatters.get(n.scaleFactor).format(t)}}class bN extends cN{constructor(e,t){super(),this._resolvedOptions=this.resolveOptions(t),this.resolvedUnitFormat=this.resolveUnitFormat(e,this._resolvedOptions)}resolvedOptions(){return{...this._resolvedOptions}}optionsMatch(e){const t=this.resolveOptions(e)
|
|
11550
11575
|
return this._resolvedOptions.decimalDigits===t.decimalDigits&&this._resolvedOptions.decimalMaximumDigits===t.decimalMaximumDigits&&this._resolvedOptions.numberTextFormat===t.numberTextFormat&&this._resolvedOptions.unitScale===t.unitScale}tryFormat(e){return this.resolvedUnitFormat.format(e)}resolveUnitFormat(e,t){const{numberTextFormat:n,decimalMaximumDigits:i,decimalDigits:o,unitScale:s}=t
|
|
11551
|
-
return n===
|
|
11576
|
+
return n===rN.default?new gN(e,{unitScale:s}):new vN(e,"number"==typeof o?{minimumFractionDigits:o,maximumFractionDigits:o,unitScale:s}:{minimumFractionDigits:0,maximumFractionDigits:i,unitScale:s})}resolveOptions(e){if(!e||e.numberTextFormat===rN.default)return{numberTextFormat:rN.default,decimalDigits:void 0,decimalMaximumDigits:void 0,unitScale:e?.unitScale??fN}
|
|
11552
11577
|
const t="number"==typeof e.decimalDigits,n="number"==typeof e.decimalMaximumDigits
|
|
11553
11578
|
if(t&&n)throw new Error("decimalDigits and decimalMaximumDigits are mutually exclusive. Do not specify both.")
|
|
11554
|
-
return t||n?{numberTextFormat:
|
|
11555
|
-
const
|
|
11556
|
-
class
|
|
11557
|
-
this.setConditionValue("invalidDecimalDigits",n)}validateDecimalMaximumDigits(e,t){const n=!!(e===
|
|
11558
|
-
this.setConditionValue("invalidDecimalMaximumDigits",n)}validateNoMutuallyExclusiveProperties(e,t,n){const i=!!(e===
|
|
11579
|
+
return t||n?{numberTextFormat:rN.decimal,decimalDigits:e.decimalDigits,decimalMaximumDigits:e.decimalMaximumDigits,unitScale:e.unitScale??fN}:{numberTextFormat:rN.decimal,decimalDigits:bN.defaultDecimalDigits,decimalMaximumDigits:void 0,unitScale:e.unitScale??fN}}}bN.defaultDecimalDigits=2
|
|
11580
|
+
const yN=["invalidDecimalDigits","invalidDecimalMaximumDigits","decimalDigitsMutuallyExclusiveWithDecimalMaximumDigits","moreThanOneUnitSpecified"]
|
|
11581
|
+
class wN extends jR{constructor(){super(yN)}validateDecimalDigits(e,t){const n=!!(e===rN.decimal&&"number"==typeof t)&&this.isInvalidDecimalDigitsValue(t)
|
|
11582
|
+
this.setConditionValue("invalidDecimalDigits",n)}validateDecimalMaximumDigits(e,t){const n=!!(e===rN.decimal&&"number"==typeof t)&&this.isInvalidDecimalDigitsValue(t)
|
|
11583
|
+
this.setConditionValue("invalidDecimalMaximumDigits",n)}validateNoMutuallyExclusiveProperties(e,t,n){const i=!!(e===rN.decimal)&&("number"==typeof t&&"number"==typeof n)
|
|
11559
11584
|
this.setConditionValue("decimalDigitsMutuallyExclusiveWithDecimalMaximumDigits",i)}validateAtMostOneUnit(e){const t=e.length>1
|
|
11560
|
-
this.setConditionValue("moreThanOneUnitSpecified",t)}isInvalidDecimalDigitsValue(e){return e<0||e>20}}class
|
|
11561
|
-
class
|
|
11562
|
-
e.subscribe(this.unitSubscriber,"resolvedUnitScale"),this.unitNotifier=e}}formatChanged(){this.updateColumnConfig()}alignmentChanged(){this.updateColumnConfig()}decimalDigitsChanged(){this.updateColumnConfig()}decimalMaximumDigitsChanged(){this.updateColumnConfig()}unitElementsChanged(){this.updateUnit()}async updateUnit(){this.unit=void 0,this.unitElements&&(await
|
|
11585
|
+
this.setConditionValue("moreThanOneUnitSpecified",t)}isInvalidDecimalDigitsValue(e){return e<0||e>20}}class xN extends Vt{}e([g],xN.prototype,"resolvedUnitScale",void 0)
|
|
11586
|
+
class CN extends(uF(hF)){constructor(){super(...arguments),this.langSubscriber={handleChange:()=>{this.updateColumnConfig()}},this.unitSubscriber={handleChange:()=>{this.updateColumnConfig()}}}connectedCallback(){super.connectedCallback(),Ma.subscribe(this.langSubscriber,this),this.updateColumnConfig()}disconnectedCallback(){super.disconnectedCallback(),Ma.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:RO,validator:new wN}}updateUnitNotifier(){if(this.unitNotifier&&(this.unitNotifier.unsubscribe(this.unitSubscriber),this.unitNotifier=void 0),this.unit){const e=m.getNotifier(this.unit)
|
|
11587
|
+
e.subscribe(this.unitSubscriber,"resolvedUnitScale"),this.unitNotifier=e}}formatChanged(){this.updateColumnConfig()}alignmentChanged(){this.updateColumnConfig()}decimalDigitsChanged(){this.updateColumnConfig()}decimalMaximumDigitsChanged(){this.updateColumnConfig()}unitElementsChanged(){this.updateUnit()}async updateUnit(){this.unit=void 0,this.unitElements&&(await tI(this.unitElements),this.unit=this.unitElements.find((e=>e instanceof xN))),this.updateUnitNotifier()}unitChanged(){this.updateColumnConfig()}updateColumnConfig(){const e=this.columnInternals.validator
|
|
11563
11588
|
if(e.validateDecimalDigits(this.format,this.decimalDigits),e.validateDecimalMaximumDigits(this.format,this.decimalMaximumDigits),e.validateNoMutuallyExclusiveProperties(this.format,this.decimalDigits,this.decimalMaximumDigits),e.validateAtMostOneUnit(this.unitElements??[]),e.isValid()){const e={formatter:this.createFormatter(),alignment:this.determineCellContentAlignment(),placeholder:this.placeholder}
|
|
11564
11589
|
this.columnInternals.columnConfig=e}else this.columnInternals.columnConfig=void 0}createFormatter(){const e=this.unit?.resolvedUnitScale
|
|
11565
|
-
return new
|
|
11566
|
-
const
|
|
11567
|
-
yi.getOrCreate().withPrefix("nimble").register(
|
|
11568
|
-
const
|
|
11569
|
-
yi.getOrCreate().withPrefix("nimble").register(
|
|
11570
|
-
class
|
|
11571
|
-
yi.getOrCreate().withPrefix("nimble").register(
|
|
11572
|
-
const
|
|
11590
|
+
return new bN(Ma.getValueFor(this),{numberTextFormat:this.format??void 0,decimalDigits:this.decimalDigits??void 0,decimalMaximumDigits:this.decimalMaximumDigits??void 0,unitScale:e})}determineCellContentAlignment(){return this.alignment===aN?mF:this.alignment===lN?gF:this.format!==rN.decimal||"number"==typeof this.decimalMaximumDigits||this.unit?mF:gF}}e([le],CN.prototype,"format",void 0),e([le],CN.prototype,"alignment",void 0),e([le({attribute:"decimal-digits",converter:re})],CN.prototype,"decimalDigits",void 0),e([le({attribute:"decimal-maximum-digits",converter:re})],CN.prototype,"decimalMaximumDigits",void 0),e([g],CN.prototype,"unitElements",void 0),e([g],CN.prototype,"unit",void 0)
|
|
11591
|
+
const kN=CN.compose({baseName:"table-column-number-text",template:iN,styles:ZR})
|
|
11592
|
+
yi.getOrCreate().withPrefix("nimble").register(kN())
|
|
11593
|
+
const SN=class extends yF{updateText(){this.text="string"==typeof this.cellRecord?.value?this.cellRecord.value:""}}.compose({baseName:"table-column-text-cell-view",template:vF,styles:bF})
|
|
11594
|
+
yi.getOrCreate().withPrefix("nimble").register(SN())
|
|
11595
|
+
class $N extends(uF(hF)){placeholderChanged(){this.columnInternals.columnConfig={placeholder:this.placeholder}}getColumnInternalsOptions(){return{cellRecordFieldNames:["value"],cellViewTag:"nimble-table-column-text-cell-view",groupHeaderViewTag:aF,delegatedEvents:[],sortOperation:FO,validator:new jR([])}}}const MN=$N.compose({baseName:"table-column-text",template:KR,styles:ZR})
|
|
11596
|
+
yi.getOrCreate().withPrefix("nimble").register(MN())
|
|
11597
|
+
const _N=xe`
|
|
11573
11598
|
${Ro("grid")}
|
|
11574
11599
|
|
|
11575
11600
|
:host {
|
|
@@ -11596,7 +11621,7 @@ const PN=xe`
|
|
|
11596
11621
|
overflow: auto;
|
|
11597
11622
|
}
|
|
11598
11623
|
`
|
|
11599
|
-
const
|
|
11624
|
+
const EN=class extends so{constructor(){super(),this.activeindicator=!1}}.compose({baseName:"tabs",baseClass:so,template:(e,t)=>G`
|
|
11600
11625
|
<template class="${e=>e.orientation}">
|
|
11601
11626
|
${nt(0,t)}
|
|
11602
11627
|
<div class="tablist" part="tablist" role="tablist">
|
|
@@ -11615,9 +11640,9 @@ const LN=class extends so{constructor(){super(),this.activeindicator=!1}}.compos
|
|
|
11615
11640
|
<slot name="tabpanel" ${Ye("tabpanels")}></slot>
|
|
11616
11641
|
</div>
|
|
11617
11642
|
</template>
|
|
11618
|
-
`,styles:
|
|
11619
|
-
yi.getOrCreate().withPrefix("nimble").register(
|
|
11620
|
-
const
|
|
11643
|
+
`,styles:_N})
|
|
11644
|
+
yi.getOrCreate().withPrefix("nimble").register(EN())
|
|
11645
|
+
const IN=xe`
|
|
11621
11646
|
${Ro("flex")}
|
|
11622
11647
|
|
|
11623
11648
|
:host {
|
|
@@ -11634,15 +11659,15 @@ const zN=xe`
|
|
|
11634
11659
|
rgba(${za}, 0.3);
|
|
11635
11660
|
margin: ${il} ${ol};
|
|
11636
11661
|
}
|
|
11637
|
-
`,
|
|
11662
|
+
`,DN=G`
|
|
11638
11663
|
<template slot="end">
|
|
11639
11664
|
<div class="separator"></div>
|
|
11640
11665
|
<slot></slot>
|
|
11641
11666
|
</template>
|
|
11642
11667
|
`
|
|
11643
|
-
const
|
|
11644
|
-
yi.getOrCreate().withPrefix("nimble").register(
|
|
11645
|
-
const
|
|
11668
|
+
const AN=class extends Vt{}.compose({baseName:"tabs-toolbar",template:DN,styles:IN})
|
|
11669
|
+
yi.getOrCreate().withPrefix("nimble").register(AN())
|
|
11670
|
+
const TN="outline",ON="block",RN=xe`
|
|
11646
11671
|
${Ro("inline-flex")}
|
|
11647
11672
|
${Xm}
|
|
11648
11673
|
|
|
@@ -11781,12 +11806,12 @@ const BN="outline",qN="block",UN=xe`
|
|
|
11781
11806
|
top: ${ol};
|
|
11782
11807
|
right: var(--ni-private-scrollbar-width);
|
|
11783
11808
|
}
|
|
11784
|
-
`.withBehaviors(Bd(
|
|
11809
|
+
`.withBehaviors(Bd(TN,xe`
|
|
11785
11810
|
.control {
|
|
11786
11811
|
border-color: rgba(${za}, 0.3);
|
|
11787
11812
|
background-color: transparent;
|
|
11788
11813
|
}
|
|
11789
|
-
`),Bd(
|
|
11814
|
+
`),Bd(ON,xe`
|
|
11790
11815
|
.control {
|
|
11791
11816
|
background-color: rgba(${za}, 0.1);
|
|
11792
11817
|
}
|
|
@@ -11804,8 +11829,8 @@ const BN="outline",qN="block",UN=xe`
|
|
|
11804
11829
|
border-bottom-color: ${Va};
|
|
11805
11830
|
}
|
|
11806
11831
|
`))
|
|
11807
|
-
class
|
|
11808
|
-
const
|
|
11832
|
+
class FN extends co{constructor(){super(...arguments),this.appearance=TN,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(e,t){super.valueChanged(e,t),this.queueUpdateScrollbarWidth()}onResize(){this.scrollbarWidth=this.control.offsetWidth-this.control.clientWidth}queueUpdateScrollbarWidth(){this.$fastController.isConnected&&(this.updateScrollbarWidthQueued||(this.updateScrollbarWidthQueued=!0,u.queueUpdate((()=>this.updateScrollbarWidth()))))}updateScrollbarWidth(){this.updateScrollbarWidthQueued=!1,this.scrollbarWidth=this.control.offsetWidth-this.control.clientWidth}}e([le],FN.prototype,"appearance",void 0),e([le({attribute:"error-text"})],FN.prototype,"errorText",void 0),e([le({attribute:"error-visible",mode:"boolean"})],FN.prototype,"errorVisible",void 0),e([g],FN.prototype,"scrollbarWidth",void 0)
|
|
11833
|
+
const NN=FN.compose({baseName:"text-area",baseClass:co,template:()=>G`
|
|
11809
11834
|
<label
|
|
11810
11835
|
part="label"
|
|
11811
11836
|
for="control"
|
|
@@ -11862,9 +11887,9 @@ const WN=jN.compose({baseName:"text-area",baseClass:co,template:()=>G`
|
|
|
11862
11887
|
></${em}>
|
|
11863
11888
|
${qm}
|
|
11864
11889
|
</div>
|
|
11865
|
-
`,styles:
|
|
11866
|
-
yi.getOrCreate().withPrefix("nimble").register(
|
|
11867
|
-
const
|
|
11890
|
+
`,styles:RN,shadowOptions:{delegatesFocus:!0}})
|
|
11891
|
+
yi.getOrCreate().withPrefix("nimble").register(NN())
|
|
11892
|
+
const PN="underline",LN="outline",zN="block",VN="frameless",HN=xe`
|
|
11868
11893
|
${Ro("inline-block")}
|
|
11869
11894
|
${Xm}
|
|
11870
11895
|
|
|
@@ -12039,12 +12064,12 @@ const GN="underline",ZN="outline",KN="block",XN="frameless",YN=xe`
|
|
|
12039
12064
|
slot[name='actions']::slotted(*) {
|
|
12040
12065
|
${tl.cssCustomProperty}: 24px;
|
|
12041
12066
|
}
|
|
12042
|
-
`.withBehaviors(Bd(
|
|
12067
|
+
`.withBehaviors(Bd(PN,xe`
|
|
12043
12068
|
.root {
|
|
12044
12069
|
border-bottom-width: ${al};
|
|
12045
12070
|
padding-bottom: 0;
|
|
12046
12071
|
}
|
|
12047
|
-
`),Bd(
|
|
12072
|
+
`),Bd(zN,xe`
|
|
12048
12073
|
.root {
|
|
12049
12074
|
background-color: rgba(${za}, 0.1);
|
|
12050
12075
|
}
|
|
@@ -12072,12 +12097,12 @@ const GN="underline",ZN="outline",KN="block",XN="frameless",YN=xe`
|
|
|
12072
12097
|
:host([disabled]) .root {
|
|
12073
12098
|
background-color: rgba(${za}, 0.07);
|
|
12074
12099
|
}
|
|
12075
|
-
`),Bd(
|
|
12100
|
+
`),Bd(LN,xe`
|
|
12076
12101
|
.root {
|
|
12077
12102
|
border-width: ${al};
|
|
12078
12103
|
padding: 0;
|
|
12079
12104
|
}
|
|
12080
|
-
`),Bd(
|
|
12105
|
+
`),Bd(VN,xe`
|
|
12081
12106
|
.control {
|
|
12082
12107
|
padding-left: ${al};
|
|
12083
12108
|
padding-right: ${al};
|
|
@@ -12095,8 +12120,8 @@ const GN="underline",ZN="outline",KN="block",XN="frameless",YN=xe`
|
|
|
12095
12120
|
filter: invert(100%);
|
|
12096
12121
|
}
|
|
12097
12122
|
`))
|
|
12098
|
-
class
|
|
12099
|
-
const
|
|
12123
|
+
class BN extends zi{constructor(){super(...arguments),this.appearance=PN,this.errorVisible=!1,this.fullBleed=!1}}e([le],BN.prototype,"appearance",void 0),e([le({attribute:"error-text"})],BN.prototype,"errorText",void 0),e([le({attribute:"error-visible",mode:"boolean"})],BN.prototype,"errorVisible",void 0),e([le({attribute:"full-bleed",mode:"boolean"})],BN.prototype,"fullBleed",void 0)
|
|
12124
|
+
const qN=BN.compose({baseName:"text-field",baseClass:zi,template:(e,t)=>G`
|
|
12100
12125
|
<template
|
|
12101
12126
|
class="
|
|
12102
12127
|
${e=>e.readOnly?"readonly":""}
|
|
@@ -12156,7 +12181,7 @@ const QN=JN.compose({baseName:"text-field",baseClass:zi,template:(e,t)=>G`
|
|
|
12156
12181
|
${tt(0,t)}
|
|
12157
12182
|
</div>
|
|
12158
12183
|
</template>
|
|
12159
|
-
`,styles:
|
|
12184
|
+
`,styles:HN,shadowOptions:{delegatesFocus:!0},end:G`
|
|
12160
12185
|
<${em}
|
|
12161
12186
|
severity="error"
|
|
12162
12187
|
class="error-icon"
|
|
@@ -12166,8 +12191,8 @@ const QN=JN.compose({baseName:"text-field",baseClass:zi,template:(e,t)=>G`
|
|
|
12166
12191
|
</span>
|
|
12167
12192
|
${qm}
|
|
12168
12193
|
`})
|
|
12169
|
-
yi.getOrCreate().withPrefix("nimble").register(
|
|
12170
|
-
const
|
|
12194
|
+
yi.getOrCreate().withPrefix("nimble").register(qN())
|
|
12195
|
+
const UN=xe`
|
|
12171
12196
|
${Ro("inline-flex")}
|
|
12172
12197
|
|
|
12173
12198
|
:host {
|
|
@@ -12251,7 +12276,7 @@ const eP=xe`
|
|
|
12251
12276
|
.status-icon {
|
|
12252
12277
|
opacity: 0.6;
|
|
12253
12278
|
}
|
|
12254
|
-
`)),
|
|
12279
|
+
`)),jN=G`
|
|
12255
12280
|
${He((e=>e.tooltipVisible),G`
|
|
12256
12281
|
<${uh}
|
|
12257
12282
|
class="anchored-region"
|
|
@@ -12284,11 +12309,11 @@ const eP=xe`
|
|
|
12284
12309
|
</${uh}>
|
|
12285
12310
|
`)}
|
|
12286
12311
|
`
|
|
12287
|
-
class
|
|
12288
|
-
const
|
|
12289
|
-
yi.getOrCreate().withPrefix("nimble").register(
|
|
12290
|
-
const
|
|
12291
|
-
class
|
|
12312
|
+
class WN extends Eo{constructor(){super(...arguments),this.iconVisible=!1}}e([le],WN.prototype,"severity",void 0),e([le({attribute:"icon-visible",mode:"boolean"})],WN.prototype,"iconVisible",void 0)
|
|
12313
|
+
const GN=WN.compose({baseName:"tooltip",baseClass:Eo,template:jN,styles:UN})
|
|
12314
|
+
yi.getOrCreate().withPrefix("nimble").register(GN())
|
|
12315
|
+
const ZN="group-selected",KN="all",XN="leaves-only",YN="none"
|
|
12316
|
+
class JN{constructor(e,t,n){this.ltr=e,this.rtl=t,this.source=n,this.attached=null}handleChange({target:e,token:t}){this.attach(t.getValueFor(e))}attach(e){this.attached!==this[e]&&(null!==this.attached&&this.source.$fastController.removeStyles(this.attached),this.attached=this[e],null!==this.attached&&this.source.$fastController.addStyles(this.attached))}}const QN=xe`
|
|
12292
12317
|
${Ro("block")}
|
|
12293
12318
|
|
|
12294
12319
|
:host {
|
|
@@ -12309,7 +12334,7 @@ class lP{constructor(e,t,n){this.ltr=e,this.rtl=t,this.source=n,this.attached=nu
|
|
|
12309
12334
|
}
|
|
12310
12335
|
|
|
12311
12336
|
${""}
|
|
12312
|
-
:host([${
|
|
12337
|
+
:host([${ZN}])::after {
|
|
12313
12338
|
background: ${Ua};
|
|
12314
12339
|
border-radius: 0px;
|
|
12315
12340
|
content: '';
|
|
@@ -12330,7 +12355,7 @@ class lP{constructor(e,t,n){this.ltr=e,this.rtl=t,this.source=n,this.attached=nu
|
|
|
12330
12355
|
background: ${Pa};
|
|
12331
12356
|
}
|
|
12332
12357
|
|
|
12333
|
-
:host([${
|
|
12358
|
+
:host([${ZN}]) .positioning-region:hover {
|
|
12334
12359
|
background: ${Na};
|
|
12335
12360
|
}
|
|
12336
12361
|
|
|
@@ -12436,7 +12461,7 @@ class lP{constructor(e,t,n){this.ltr=e,this.rtl=t,this.source=n,this.attached=nu
|
|
|
12436
12461
|
display: block;
|
|
12437
12462
|
}
|
|
12438
12463
|
`.withBehaviors(new class{constructor(e,t){this.cache=new WeakMap,this.ltr=e,this.rtl=t}bind(e){this.attach(e)}unbind(e){const t=this.cache.get(e)
|
|
12439
|
-
t&&_a.unsubscribe(t)}attach(e){const t=this.cache.get(e)||new
|
|
12464
|
+
t&&_a.unsubscribe(t)}attach(e){const t=this.cache.get(e)||new JN(this.ltr,this.rtl,e),n=_a.getValueFor(e)
|
|
12440
12465
|
_a.subscribe(t),t.attach(n),this.cache.set(e,t)}}(xe`
|
|
12441
12466
|
.expand-collapse-button {
|
|
12442
12467
|
left: var(
|
|
@@ -12468,8 +12493,8 @@ _a.subscribe(t),t.attach(n),this.cache.set(e,t)}}(xe`
|
|
|
12468
12493
|
transform: rotate(135deg);
|
|
12469
12494
|
}
|
|
12470
12495
|
`))
|
|
12471
|
-
class
|
|
12472
|
-
const
|
|
12496
|
+
class eP extends Do{constructor(){super(...arguments),this.groupSelected=!1}}e([le({attribute:"group-selected",mode:"boolean"})],eP.prototype,"groupSelected",void 0)
|
|
12497
|
+
const tP=eP.compose({baseName:"tree-item",baseClass:Do,template:(e,t)=>G`
|
|
12473
12498
|
<template
|
|
12474
12499
|
role="treeitem"
|
|
12475
12500
|
slot="${e=>e.isNestedItem()?"item":void 0}"
|
|
@@ -12509,9 +12534,9 @@ const hP=dP.compose({baseName:"tree-item",baseClass:Do,template:(e,t)=>G`
|
|
|
12509
12534
|
</div>
|
|
12510
12535
|
`)}
|
|
12511
12536
|
</template>
|
|
12512
|
-
`,styles:
|
|
12513
|
-
yi.getOrCreate().withPrefix("nimble").register(
|
|
12514
|
-
const
|
|
12537
|
+
`,styles:QN,expandCollapseGlyph:Eh.data})
|
|
12538
|
+
yi.getOrCreate().withPrefix("nimble").register(tP())
|
|
12539
|
+
const nP=xe`
|
|
12515
12540
|
${Ro("flex")}
|
|
12516
12541
|
|
|
12517
12542
|
:host {
|
|
@@ -12523,7 +12548,7 @@ const uP=xe`
|
|
|
12523
12548
|
:host(${Fo}) {
|
|
12524
12549
|
outline: none;
|
|
12525
12550
|
}
|
|
12526
|
-
`,
|
|
12551
|
+
`,iP=G`
|
|
12527
12552
|
<template
|
|
12528
12553
|
role="tree"
|
|
12529
12554
|
${Pe("treeView")}
|
|
@@ -12537,248 +12562,248 @@ const uP=xe`
|
|
|
12537
12562
|
<slot ${Ye("slottedTreeItems")}></slot>
|
|
12538
12563
|
</template>
|
|
12539
12564
|
`
|
|
12540
|
-
class
|
|
12565
|
+
class oP extends Ao{constructor(){super(...arguments),this.selectionMode=KN,this.selectedItems=[]}handleClick(e){if(e.defaultPrevented)return!1
|
|
12541
12566
|
if(!(e.target instanceof Element&&Io(e.target)))return!0
|
|
12542
12567
|
const t=e.target
|
|
12543
|
-
return!t.disabled&&(this.canSelect(t)?t.selected=!0:this.itemHasChildren(t)&&(t.expanded=!t.expanded),!0)}canSelect(e){switch(this.selectionMode){case
|
|
12544
|
-
case
|
|
12545
|
-
case
|
|
12546
|
-
default:return!0}}itemHasChildren(e){return null!==e.querySelector('[role="treeitem"]')}selectedItemsChanged(){for(const e of Array.from(this.children))e instanceof
|
|
12568
|
+
return!t.disabled&&(this.canSelect(t)?t.selected=!0:this.itemHasChildren(t)&&(t.expanded=!t.expanded),!0)}canSelect(e){switch(this.selectionMode){case KN:return!0
|
|
12569
|
+
case YN:return!1
|
|
12570
|
+
case XN:return!this.itemHasChildren(e)
|
|
12571
|
+
default:return!0}}itemHasChildren(e){return null!==e.querySelector('[role="treeitem"]')}selectedItemsChanged(){for(const e of Array.from(this.children))e instanceof eP&&(e.groupSelected=!1)
|
|
12547
12572
|
for(let e of this.selectedItems){for(;null!==e.parentElement&&e.parentElement!==this;)e=e.parentElement
|
|
12548
|
-
e instanceof
|
|
12549
|
-
const
|
|
12550
|
-
yi.getOrCreate().withPrefix("nimble").register(
|
|
12551
|
-
const
|
|
12552
|
-
class
|
|
12553
|
-
this.pluralRules=new Intl.PluralRules(this.locale),this.formatter=new Intl.NumberFormat(this.locale,this.intlNumberFormatOptions),this.unitTranslation=this.getTranslationToUse(t,this.locale),this.scaledPrefixText=n}static createFactory(e){return t=>new
|
|
12573
|
+
e instanceof eP&&(e.groupSelected=!0)}}}e([le({attribute:"selection-mode"})],oP.prototype,"selectionMode",void 0),e([g],oP.prototype,"selectedItems",void 0)
|
|
12574
|
+
const sP=oP.compose({baseName:"tree-view",baseClass:Ao,template:iP,styles:nP})
|
|
12575
|
+
yi.getOrCreate().withPrefix("nimble").register(sP())
|
|
12576
|
+
const rP=G`<template slot="unit"></template>`
|
|
12577
|
+
class aP{constructor(e,t,n){this.singular=e,this.plural=t,this.symbol=n}}class lP extends dN{constructor(e,{unitTranslations:t,scaledPrefixText:n}){if(super(e),!t.get("en"))throw new Error('English translations must exist with locale string "en"')
|
|
12578
|
+
this.pluralRules=new Intl.PluralRules(this.locale),this.formatter=new Intl.NumberFormat(this.locale,this.intlNumberFormatOptions),this.unitTranslation=this.getTranslationToUse(t,this.locale),this.scaledPrefixText=n}static createFactory(e){return t=>new lP(t,e)}format(e){const t=this.formatter.format(e)
|
|
12554
12579
|
if(""!==this.scaledPrefixText)return`${t} ${this.scaledPrefixText}${this.unitTranslation.symbol}`
|
|
12555
12580
|
return`${t} ${"one"===this.pluralRules.select(e)?this.unitTranslation.singular:this.unitTranslation.plural}`}getTranslationToUse(e,t){const n=new Intl.Locale(t??"en"),i=n.language,o=n.region
|
|
12556
|
-
return(o?e.get(`${i}-${o}`):void 0)??e.get(i)??e.get("en")}}const
|
|
12557
|
-
const
|
|
12558
|
-
const
|
|
12581
|
+
return(o?e.get(`${i}-${o}`):void 0)??e.get(i)??e.get("en")}}const cP=new Map([["en",new aP("byte","bytes","B")],["fr",new aP("octet","octets","o")],["de",new aP("Byte","Byte","B")],["ja",new aP("バイト","バイト","B")],["zh",new aP("字节","字节","B")]]),dP=[[1,""],[1024,"Ki"],[1048576,"Mi"],[1024**3,"Gi"],[1024**4,"Ti"],[1024**5,"Pi"]]
|
|
12582
|
+
const hP=new class extends pN{constructor(){super(dP.map((([e,t])=>new uN(e,lP.createFactory({unitTranslations:cP,scaledPrefixText:t})))))}},uP=[[1,"byte","long"],[1e3,"kilobyte","short"],[1e6,"megabyte","short"],[1e3**3,"gigabyte","short"],[1e3**4,"terabyte","short"],[1e3**5,"petabyte","short"]]
|
|
12583
|
+
const pP=new class extends pN{constructor(){super(uP.map((([e,t,n])=>new uN(e,hN.createFactory({style:"unit",unit:t,unitDisplay:n})))))}},fP=xe`
|
|
12559
12584
|
${Ro("none")}
|
|
12560
12585
|
`
|
|
12561
|
-
class
|
|
12562
|
-
const
|
|
12563
|
-
yi.getOrCreate().withPrefix("nimble").register(
|
|
12564
|
-
const
|
|
12565
|
-
const
|
|
12566
|
-
const
|
|
12567
|
-
yi.getOrCreate().withPrefix("nimble").register(
|
|
12568
|
-
var
|
|
12569
|
-
function
|
|
12570
|
-
i[e]=[]}return new
|
|
12571
|
-
break}return null!=n&&e.push({name:t,value:n}),e}
|
|
12586
|
+
class mP extends xN{constructor(){super(),this.binary=!1,this.resolvedUnitScale=pP}binaryChanged(){this.resolvedUnitScale=this.binary?hP:pP}}e([le({mode:"boolean"})],mP.prototype,"binary",void 0)
|
|
12587
|
+
const gP=mP.compose({baseName:"unit-byte",template:rP,styles:fP})
|
|
12588
|
+
yi.getOrCreate().withPrefix("nimble").register(gP())
|
|
12589
|
+
const vP=[[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"]],bP=new Map([["en",new aP("volt","volts","V")],["fr",new aP("volt","volts","V")],["de",new aP("Volt","Volt","V")],["ja",new aP("ボルト","ボルト","V")],["zh",new aP("伏特","伏特","V")]])
|
|
12590
|
+
const yP=new class extends pN{constructor(){super(vP.map((([e,t])=>new uN(e,lP.createFactory({unitTranslations:bP,scaledPrefixText:t})))))}}
|
|
12591
|
+
const wP=class extends xN{constructor(){super(),this.resolvedUnitScale=yP}}.compose({baseName:"unit-volt",template:rP,styles:fP})
|
|
12592
|
+
yi.getOrCreate().withPrefix("nimble").register(wP())
|
|
12593
|
+
var xP={value:()=>{}}
|
|
12594
|
+
function CP(){for(var e,t=0,n=arguments.length,i={};t<n;++t){if(!(e=arguments[t]+"")||e in i||/[\s.]/.test(e))throw new Error("illegal type: "+e)
|
|
12595
|
+
i[e]=[]}return new kP(i)}function kP(e){this._=e}function SP(e,t){for(var n,i=0,o=e.length;i<o;++i)if((n=e[i]).name===t)return n.value}function $P(e,t,n){for(var i=0,o=e.length;i<o;++i)if(e[i].name===t){e[i]=xP,e=e.slice(0,i).concat(e.slice(i+1))
|
|
12596
|
+
break}return null!=n&&e.push({name:t,value:n}),e}kP.prototype=CP.prototype={constructor:kP,on:function(e,t){var n,i,o=this._,s=(i=o,(e+"").trim().split(/^|\s+/).map((function(e){var t="",n=e.indexOf(".")
|
|
12572
12597
|
if(n>=0&&(t=e.slice(n+1),e=e.slice(0,n)),e&&!i.hasOwnProperty(e))throw new Error("unknown type: "+e)
|
|
12573
12598
|
return{type:e,name:t}}))),r=-1,a=s.length
|
|
12574
12599
|
if(!(arguments.length<2)){if(null!=t&&"function"!=typeof t)throw new Error("invalid callback: "+t)
|
|
12575
|
-
for(;++r<a;)if(n=(e=s[r]).type)o[n]
|
|
12576
|
-
else if(null==t)for(n in o)o[n]
|
|
12577
|
-
return this}for(;++r<a;)if((n=(e=s[r]).type)&&(n=
|
|
12600
|
+
for(;++r<a;)if(n=(e=s[r]).type)o[n]=$P(o[n],e.name,t)
|
|
12601
|
+
else if(null==t)for(n in o)o[n]=$P(o[n],e.name,null)
|
|
12602
|
+
return this}for(;++r<a;)if((n=(e=s[r]).type)&&(n=SP(o[n],e.name)))return n},copy:function(){var e={},t=this._
|
|
12578
12603
|
for(var n in t)e[n]=t[n].slice()
|
|
12579
|
-
return new
|
|
12604
|
+
return new kP(e)},call:function(e,t){if((n=arguments.length-2)>0)for(var n,i,o=new Array(n),s=0;s<n;++s)o[s]=arguments[s+2]
|
|
12580
12605
|
if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e)
|
|
12581
12606
|
for(s=0,n=(i=this._[e]).length;s<n;++s)i[s].value.apply(t,o)},apply:function(e,t,n){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e)
|
|
12582
12607
|
for(var i=this._[e],o=0,s=i.length;o<s;++o)i[o].value.apply(t,n)}}
|
|
12583
|
-
var
|
|
12584
|
-
function
|
|
12585
|
-
return n>=0&&"xmlns"!==(t=e.slice(0,n))&&(e=e.slice(n+1)),
|
|
12586
|
-
return n===
|
|
12587
|
-
return(t.local?
|
|
12588
|
-
var t}}function
|
|
12589
|
-
function
|
|
12590
|
-
function
|
|
12591
|
-
for(;a<l;++a)(r=t[a])&&(o[a]=r)}function
|
|
12608
|
+
var MP="http://www.w3.org/1999/xhtml",_P={svg:"http://www.w3.org/2000/svg",xhtml:MP,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"}
|
|
12609
|
+
function EP(e){var t=e+="",n=t.indexOf(":")
|
|
12610
|
+
return n>=0&&"xmlns"!==(t=e.slice(0,n))&&(e=e.slice(n+1)),_P.hasOwnProperty(t)?{space:_P[t],local:e}:e}function IP(e){return function(){var t=this.ownerDocument,n=this.namespaceURI
|
|
12611
|
+
return n===MP&&t.documentElement.namespaceURI===MP?t.createElement(e):t.createElementNS(n,e)}}function DP(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function AP(e){var t=EP(e)
|
|
12612
|
+
return(t.local?DP:IP)(t)}function TP(){}function OP(e){return null==e?TP:function(){return this.querySelector(e)}}function RP(){return[]}function FP(e){return null==e?RP:function(){return this.querySelectorAll(e)}}function NP(e){return function(){return null==(t=e.apply(this,arguments))?[]:Array.isArray(t)?t:Array.from(t)
|
|
12613
|
+
var t}}function PP(e){return function(){return this.matches(e)}}function LP(e){return function(t){return t.matches(e)}}var zP=Array.prototype.find
|
|
12614
|
+
function VP(){return this.firstElementChild}var HP=Array.prototype.filter
|
|
12615
|
+
function BP(){return Array.from(this.children)}function qP(e){return new Array(e.length)}function UP(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}function jP(e,t,n,i,o,s){for(var r,a=0,l=t.length,c=s.length;a<c;++a)(r=t[a])?(r.__data__=s[a],i[a]=r):n[a]=new UP(e,s[a])
|
|
12616
|
+
for(;a<l;++a)(r=t[a])&&(o[a]=r)}function WP(e,t,n,i,o,s,r){var a,l,c,d=new Map,h=t.length,u=s.length,p=new Array(h)
|
|
12592
12617
|
for(a=0;a<h;++a)(l=t[a])&&(p[a]=c=r.call(l,l.__data__,a,t)+"",d.has(c)?o[a]=l:d.set(c,l))
|
|
12593
|
-
for(a=0;a<u;++a)c=r.call(e,s[a],a,s)+"",(l=d.get(c))?(i[a]=l,l.__data__=s[a],d.delete(c)):n[a]=new
|
|
12594
|
-
for(a=0;a<h;++a)(l=t[a])&&d.get(p[a])===l&&(o[a]=l)}function
|
|
12595
|
-
null==n?this.removeAttribute(e):this.setAttribute(e,n)}}function
|
|
12596
|
-
null==n?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,n)}}function
|
|
12597
|
-
null==i?this.style.removeProperty(e):this.style.setProperty(e,i,n)}}function
|
|
12598
|
-
null==n?delete this[e]:this[e]=n}}function
|
|
12599
|
-
this.textContent=null==t?"":t}}function
|
|
12600
|
-
this.innerHTML=null==t?"":t}}function
|
|
12601
|
-
e&&e.removeChild(this)}function
|
|
12602
|
-
return t?t.insertBefore(e,this.nextSibling):e}function
|
|
12603
|
-
return t?t.insertBefore(e,this.nextSibling):e}function
|
|
12604
|
-
if(t){for(var n,i=0,o=-1,s=t.length;i<s;++i)n=t[i],e.type&&n.type!==e.type||n.name!==e.name?t[++o]=n:this.removeEventListener(n.type,n.listener,n.options);++o?t.length=o:delete this.__on}}}function
|
|
12618
|
+
for(a=0;a<u;++a)c=r.call(e,s[a],a,s)+"",(l=d.get(c))?(i[a]=l,l.__data__=s[a],d.delete(c)):n[a]=new UP(e,s[a])
|
|
12619
|
+
for(a=0;a<h;++a)(l=t[a])&&d.get(p[a])===l&&(o[a]=l)}function GP(e){return e.__data__}function ZP(e){return"object"==typeof e&&"length"in e?e:Array.from(e)}function KP(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function XP(e){return function(){this.removeAttribute(e)}}function YP(e){return function(){this.removeAttributeNS(e.space,e.local)}}function JP(e,t){return function(){this.setAttribute(e,t)}}function QP(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function eL(e,t){return function(){var n=t.apply(this,arguments)
|
|
12620
|
+
null==n?this.removeAttribute(e):this.setAttribute(e,n)}}function tL(e,t){return function(){var n=t.apply(this,arguments)
|
|
12621
|
+
null==n?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,n)}}function nL(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function iL(e){return function(){this.style.removeProperty(e)}}function oL(e,t,n){return function(){this.style.setProperty(e,t,n)}}function sL(e,t,n){return function(){var i=t.apply(this,arguments)
|
|
12622
|
+
null==i?this.style.removeProperty(e):this.style.setProperty(e,i,n)}}function rL(e,t){return e.style.getPropertyValue(t)||nL(e).getComputedStyle(e,null).getPropertyValue(t)}function aL(e){return function(){delete this[e]}}function lL(e,t){return function(){this[e]=t}}function cL(e,t){return function(){var n=t.apply(this,arguments)
|
|
12623
|
+
null==n?delete this[e]:this[e]=n}}function dL(e){return e.trim().split(/^|\s+/)}function hL(e){return e.classList||new uL(e)}function uL(e){this._node=e,this._names=dL(e.getAttribute("class")||"")}function pL(e,t){for(var n=hL(e),i=-1,o=t.length;++i<o;)n.add(t[i])}function fL(e,t){for(var n=hL(e),i=-1,o=t.length;++i<o;)n.remove(t[i])}function mL(e){return function(){pL(this,e)}}function gL(e){return function(){fL(this,e)}}function vL(e,t){return function(){(t.apply(this,arguments)?pL:fL)(this,e)}}function bL(){this.textContent=""}function yL(e){return function(){this.textContent=e}}function wL(e){return function(){var t=e.apply(this,arguments)
|
|
12624
|
+
this.textContent=null==t?"":t}}function xL(){this.innerHTML=""}function CL(e){return function(){this.innerHTML=e}}function kL(e){return function(){var t=e.apply(this,arguments)
|
|
12625
|
+
this.innerHTML=null==t?"":t}}function SL(){this.nextSibling&&this.parentNode.appendChild(this)}function $L(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function ML(){return null}function _L(){var e=this.parentNode
|
|
12626
|
+
e&&e.removeChild(this)}function EL(){var e=this.cloneNode(!1),t=this.parentNode
|
|
12627
|
+
return t?t.insertBefore(e,this.nextSibling):e}function IL(){var e=this.cloneNode(!0),t=this.parentNode
|
|
12628
|
+
return t?t.insertBefore(e,this.nextSibling):e}function DL(e){return function(){var t=this.__on
|
|
12629
|
+
if(t){for(var n,i=0,o=-1,s=t.length;i<s;++i)n=t[i],e.type&&n.type!==e.type||n.name!==e.name?t[++o]=n:this.removeEventListener(n.type,n.listener,n.options);++o?t.length=o:delete this.__on}}}function AL(e,t,n){return function(){var i,o=this.__on,s=function(e){return function(t){e.call(this,t,this.__data__)}}(t)
|
|
12605
12630
|
if(o)for(var r=0,a=o.length;r<a;++r)if((i=o[r]).type===e.type&&i.name===e.name)return this.removeEventListener(i.type,i.listener,i.options),this.addEventListener(i.type,i.listener=s,i.options=n),void(i.value=t)
|
|
12606
|
-
this.addEventListener(e.type,s,n),i={type:e.type,name:e.name,value:t,listener:s,options:n},o?o.push(i):this.__on=[i]}}function
|
|
12607
|
-
"function"==typeof o?o=new o(t,n):(o=i.document.createEvent("Event"),n?(o.initEvent(t,n.bubbles,n.cancelable),o.detail=n.detail):o.initEvent(t,!1,!1)),e.dispatchEvent(o)}function
|
|
12631
|
+
this.addEventListener(e.type,s,n),i={type:e.type,name:e.name,value:t,listener:s,options:n},o?o.push(i):this.__on=[i]}}function TL(e,t,n){var i=nL(e),o=i.CustomEvent
|
|
12632
|
+
"function"==typeof o?o=new o(t,n):(o=i.document.createEvent("Event"),n?(o.initEvent(t,n.bubbles,n.cancelable),o.detail=n.detail):o.initEvent(t,!1,!1)),e.dispatchEvent(o)}function OL(e,t){return function(){return TL(this,e,t)}}function RL(e,t){return function(){return TL(this,e,t.apply(this,arguments))}}UP.prototype={constructor:UP,appendChild:function(e){return this._parent.insertBefore(e,this._next)},insertBefore:function(e,t){return this._parent.insertBefore(e,t)},querySelector:function(e){return this._parent.querySelector(e)},querySelectorAll:function(e){return this._parent.querySelectorAll(e)}},uL.prototype={add:function(e){this._names.indexOf(e)<0&&(this._names.push(e),this._node.setAttribute("class",this._names.join(" ")))},remove:function(e){var t=this._names.indexOf(e)
|
|
12608
12633
|
t>=0&&(this._names.splice(t,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(e){return this._names.indexOf(e)>=0}}
|
|
12609
|
-
var
|
|
12610
|
-
function
|
|
12634
|
+
var FL=[null]
|
|
12635
|
+
function NL(e,t){this._groups=e,this._parents=t}function PL(){return new NL([[document.documentElement]],FL)}function LL(e){return"string"==typeof e?new NL([[document.querySelector(e)]],[document.documentElement]):new NL([[e]],FL)}function zL(e,t){if(e=function(e){let t
|
|
12611
12636
|
for(;t=e.sourceEvent;)e=t
|
|
12612
12637
|
return e}(e),void 0===t&&(t=e.currentTarget),t){var n=t.ownerSVGElement||t
|
|
12613
12638
|
if(n.createSVGPoint){var i=n.createSVGPoint()
|
|
12614
12639
|
return i.x=e.clientX,i.y=e.clientY,[(i=i.matrixTransform(t.getScreenCTM().inverse())).x,i.y]}if(t.getBoundingClientRect){var o=t.getBoundingClientRect()
|
|
12615
|
-
return[e.clientX-o.left-t.clientLeft,e.clientY-o.top-t.clientTop]}}return[e.pageX,e.pageY]}
|
|
12640
|
+
return[e.clientX-o.left-t.clientLeft,e.clientY-o.top-t.clientTop]}}return[e.pageX,e.pageY]}NL.prototype=PL.prototype={constructor:NL,select:function(e){"function"!=typeof e&&(e=OP(e))
|
|
12616
12641
|
for(var t=this._groups,n=t.length,i=new Array(n),o=0;o<n;++o)for(var s,r,a=t[o],l=a.length,c=i[o]=new Array(l),d=0;d<l;++d)(s=a[d])&&(r=e.call(s,s.__data__,d,a))&&("__data__"in s&&(r.__data__=s.__data__),c[d]=r)
|
|
12617
|
-
return new
|
|
12642
|
+
return new NL(i,this._parents)},selectAll:function(e){e="function"==typeof e?NP(e):FP(e)
|
|
12618
12643
|
for(var t=this._groups,n=t.length,i=[],o=[],s=0;s<n;++s)for(var r,a=t[s],l=a.length,c=0;c<l;++c)(r=a[c])&&(i.push(e.call(r,r.__data__,c,a)),o.push(r))
|
|
12619
|
-
return new
|
|
12644
|
+
return new NL(i,o)},selectChild:function(e){return this.select(null==e?VP:function(e){return function(){return zP.call(this.children,e)}}("function"==typeof e?e:LP(e)))},selectChildren:function(e){return this.selectAll(null==e?BP:function(e){return function(){return HP.call(this.children,e)}}("function"==typeof e?e:LP(e)))},filter:function(e){"function"!=typeof e&&(e=PP(e))
|
|
12620
12645
|
for(var t=this._groups,n=t.length,i=new Array(n),o=0;o<n;++o)for(var s,r=t[o],a=r.length,l=i[o]=[],c=0;c<a;++c)(s=r[c])&&e.call(s,s.__data__,c,r)&&l.push(s)
|
|
12621
|
-
return new
|
|
12622
|
-
var n,i=t?
|
|
12646
|
+
return new NL(i,this._parents)},data:function(e,t){if(!arguments.length)return Array.from(this,GP)
|
|
12647
|
+
var n,i=t?WP:jP,o=this._parents,s=this._groups
|
|
12623
12648
|
"function"!=typeof e&&(n=e,e=function(){return n})
|
|
12624
|
-
for(var r=s.length,a=new Array(r),l=new Array(r),c=new Array(r),d=0;d<r;++d){var h=o[d],u=s[d],p=u.length,f=
|
|
12649
|
+
for(var r=s.length,a=new Array(r),l=new Array(r),c=new Array(r),d=0;d<r;++d){var h=o[d],u=s[d],p=u.length,f=ZP(e.call(h,h&&h.__data__,d,o)),m=f.length,g=l[d]=new Array(m),v=a[d]=new Array(m)
|
|
12625
12650
|
i(h,u,g,v,c[d]=new Array(p),f,t)
|
|
12626
|
-
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
|
|
12651
|
+
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 NL(a,o))._enter=l,a._exit=c,a},enter:function(){return new NL(this._enter||this._groups.map(qP),this._parents)},exit:function(){return new NL(this._exit||this._groups.map(qP),this._parents)},join:function(e,t,n){var i=this.enter(),o=this,s=this.exit()
|
|
12627
12652
|
return"function"==typeof e?(i=e(i))&&(i=i.selection()):i=i.append(e+""),null!=t&&(o=t(o))&&(o=o.selection()),null==n?s.remove():n(s),i&&o?i.merge(o).order():o},merge:function(e){for(var t=e.selection?e.selection():e,n=this._groups,i=t._groups,o=n.length,s=i.length,r=Math.min(o,s),a=new Array(o),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)
|
|
12628
12653
|
for(;l<o;++l)a[l]=n[l]
|
|
12629
|
-
return new
|
|
12630
|
-
return this},sort:function(e){function t(t,n){return t&&n?e(t.__data__,n.__data__):!t-!n}e||(e=
|
|
12654
|
+
return new NL(a,this._parents)},selection:function(){return this},order:function(){for(var e=this._groups,t=-1,n=e.length;++t<n;)for(var i,o=e[t],s=o.length-1,r=o[s];--s>=0;)(i=o[s])&&(r&&4^i.compareDocumentPosition(r)&&r.parentNode.insertBefore(i,r),r=i)
|
|
12655
|
+
return this},sort:function(e){function t(t,n){return t&&n?e(t.__data__,n.__data__):!t-!n}e||(e=KP)
|
|
12631
12656
|
for(var n=this._groups,i=n.length,o=new Array(i),s=0;s<i;++s){for(var r,a=n[s],l=a.length,c=o[s]=new Array(l),d=0;d<l;++d)(r=a[d])&&(c[d]=r)
|
|
12632
|
-
c.sort(t)}return new
|
|
12657
|
+
c.sort(t)}return new NL(o,this._parents).order()},call:function(){var e=arguments[0]
|
|
12633
12658
|
return arguments[0]=this,e.apply(null,arguments),this},nodes:function(){return Array.from(this)},node:function(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var i=e[t],o=0,s=i.length;o<s;++o){var r=i[o]
|
|
12634
12659
|
if(r)return r}return null},size:function(){let e=0
|
|
12635
12660
|
for(const t of this)++e
|
|
12636
12661
|
return e},empty:function(){return!this.node()},each:function(e){for(var t=this._groups,n=0,i=t.length;n<i;++n)for(var o,s=t[n],r=0,a=s.length;r<a;++r)(o=s[r])&&e.call(o,o.__data__,r,s)
|
|
12637
|
-
return this},attr:function(e,t){var n=
|
|
12662
|
+
return this},attr:function(e,t){var n=EP(e)
|
|
12638
12663
|
if(arguments.length<2){var i=this.node()
|
|
12639
|
-
return n.local?i.getAttributeNS(n.space,n.local):i.getAttribute(n)}return this.each((null==t?n.local?
|
|
12640
|
-
if(arguments.length<2){for(var i=
|
|
12641
|
-
return!0}return this.each(("function"==typeof t?
|
|
12642
|
-
return this.select((function(){return this.appendChild(t.apply(this,arguments))}))},insert:function(e,t){var n="function"==typeof e?e:
|
|
12643
|
-
return this.select((function(){return this.insertBefore(n.apply(this,arguments),i.apply(this,arguments)||null)}))},remove:function(){return this.each(
|
|
12664
|
+
return n.local?i.getAttributeNS(n.space,n.local):i.getAttribute(n)}return this.each((null==t?n.local?YP:XP:"function"==typeof t?n.local?tL:eL:n.local?QP:JP)(n,t))},style:function(e,t,n){return arguments.length>1?this.each((null==t?iL:"function"==typeof t?sL:oL)(e,t,null==n?"":n)):rL(this.node(),e)},property:function(e,t){return arguments.length>1?this.each((null==t?aL:"function"==typeof t?cL:lL)(e,t)):this.node()[e]},classed:function(e,t){var n=dL(e+"")
|
|
12665
|
+
if(arguments.length<2){for(var i=hL(this.node()),o=-1,s=n.length;++o<s;)if(!i.contains(n[o]))return!1
|
|
12666
|
+
return!0}return this.each(("function"==typeof t?vL:t?mL:gL)(n,t))},text:function(e){return arguments.length?this.each(null==e?bL:("function"==typeof e?wL:yL)(e)):this.node().textContent},html:function(e){return arguments.length?this.each(null==e?xL:("function"==typeof e?kL:CL)(e)):this.node().innerHTML},raise:function(){return this.each(SL)},lower:function(){return this.each($L)},append:function(e){var t="function"==typeof e?e:AP(e)
|
|
12667
|
+
return this.select((function(){return this.appendChild(t.apply(this,arguments))}))},insert:function(e,t){var n="function"==typeof e?e:AP(e),i=null==t?ML:"function"==typeof t?t:OP(t)
|
|
12668
|
+
return this.select((function(){return this.insertBefore(n.apply(this,arguments),i.apply(this,arguments)||null)}))},remove:function(){return this.each(_L)},clone:function(e){return this.select(e?IL:EL)},datum:function(e){return arguments.length?this.property("__data__",e):this.node().__data__},on:function(e,t,n){var i,o,s=function(e){return e.trim().split(/^|\s+/).map((function(e){var t="",n=e.indexOf(".")
|
|
12644
12669
|
return n>=0&&(t=e.slice(n+1),e=e.slice(0,n)),{type:e,name:t}}))}(e+""),r=s.length
|
|
12645
|
-
if(!(arguments.length<2)){for(a=t?
|
|
12670
|
+
if(!(arguments.length<2)){for(a=t?AL:DL,i=0;i<r;++i)this.each(a(s[i],t,n))
|
|
12646
12671
|
return this}var a=this.node().__on
|
|
12647
|
-
if(a)for(var l,c=0,d=a.length;c<d;++c)for(i=0,l=a[c];i<r;++i)if((o=s[i]).type===l.type&&o.name===l.name)return l.value},dispatch:function(e,t){return this.each(("function"==typeof t?
|
|
12648
|
-
const
|
|
12649
|
-
function
|
|
12672
|
+
if(a)for(var l,c=0,d=a.length;c<d;++c)for(i=0,l=a[c];i<r;++i)if((o=s[i]).type===l.type&&o.name===l.name)return l.value},dispatch:function(e,t){return this.each(("function"==typeof t?RL:OL)(e,t))},[Symbol.iterator]:function*(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var i,o=e[t],s=0,r=o.length;s<r;++s)(i=o[s])&&(yield i)}}
|
|
12673
|
+
const VL={capture:!0,passive:!1}
|
|
12674
|
+
function HL(e){e.preventDefault(),e.stopImmediatePropagation()}function BL(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function qL(e,t){var n=Object.create(e.prototype)
|
|
12650
12675
|
for(var i in t)n[i]=t[i]
|
|
12651
|
-
return n}function
|
|
12652
|
-
function
|
|
12653
|
-
return e=(e+"").trim().toLowerCase(),(t=
|
|
12654
|
-
var o}function
|
|
12655
|
-
return`${1===e?"rgb(":"rgba("}${
|
|
12656
|
-
if(e instanceof
|
|
12657
|
-
if(e instanceof
|
|
12676
|
+
return n}function UL(){}var jL=.7,WL=1/jL,GL="\\s*([+-]?\\d+)\\s*",ZL="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",KL="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",XL=/^#([0-9a-f]{3,8})$/,YL=new RegExp(`^rgb\\(${GL},${GL},${GL}\\)$`),JL=new RegExp(`^rgb\\(${KL},${KL},${KL}\\)$`),QL=new RegExp(`^rgba\\(${GL},${GL},${GL},${ZL}\\)$`),ez=new RegExp(`^rgba\\(${KL},${KL},${KL},${ZL}\\)$`),tz=new RegExp(`^hsl\\(${ZL},${KL},${KL}\\)$`),nz=new RegExp(`^hsla\\(${ZL},${KL},${KL},${ZL}\\)$`),iz={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}
|
|
12677
|
+
function oz(){return this.rgb().formatHex()}function sz(){return this.rgb().formatRgb()}function rz(e){var t,n
|
|
12678
|
+
return e=(e+"").trim().toLowerCase(),(t=XL.exec(e))?(n=t[1].length,t=parseInt(t[1],16),6===n?az(t):3===n?new dz(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===n?lz(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===n?lz(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|240&t,((15&t)<<4|15&t)/255):null):(t=YL.exec(e))?new dz(t[1],t[2],t[3],1):(t=JL.exec(e))?new dz(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=QL.exec(e))?lz(t[1],t[2],t[3],t[4]):(t=ez.exec(e))?lz(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=tz.exec(e))?gz(t[1],t[2]/100,t[3]/100,1):(t=nz.exec(e))?gz(t[1],t[2]/100,t[3]/100,t[4]):iz.hasOwnProperty(e)?az(iz[e]):"transparent"===e?new dz(NaN,NaN,NaN,0):null}function az(e){return new dz(e>>16&255,e>>8&255,255&e,1)}function lz(e,t,n,i){return i<=0&&(e=t=n=NaN),new dz(e,t,n,i)}function cz(e,t,n,i){return 1===arguments.length?((o=e)instanceof UL||(o=rz(o)),o?new dz((o=o.rgb()).r,o.g,o.b,o.opacity):new dz):new dz(e,t,n,null==i?1:i)
|
|
12679
|
+
var o}function dz(e,t,n,i){this.r=+e,this.g=+t,this.b=+n,this.opacity=+i}function hz(){return`#${mz(this.r)}${mz(this.g)}${mz(this.b)}`}function uz(){const e=pz(this.opacity)
|
|
12680
|
+
return`${1===e?"rgb(":"rgba("}${fz(this.r)}, ${fz(this.g)}, ${fz(this.b)}${1===e?")":`, ${e})`}`}function pz(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function fz(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function mz(e){return((e=fz(e))<16?"0":"")+e.toString(16)}function gz(e,t,n,i){return i<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new bz(e,t,n,i)}function vz(e){if(e instanceof bz)return new bz(e.h,e.s,e.l,e.opacity)
|
|
12681
|
+
if(e instanceof UL||(e=rz(e)),!e)return new bz
|
|
12682
|
+
if(e instanceof bz)return e
|
|
12658
12683
|
var t=(e=e.rgb()).r/255,n=e.g/255,i=e.b/255,o=Math.min(t,n,i),s=Math.max(t,n,i),r=NaN,a=s-o,l=(s+o)/2
|
|
12659
|
-
return a?(r=t===s?(n-i)/a+6*(n<i):n===s?(i-t)/a+2:(t-n)/a+4,a/=l<.5?s+o:2-s-o,r*=60):a=l>0&&l<1?0:r,new
|
|
12660
|
-
return new
|
|
12661
|
-
return`${1===e?"hsl(":"hsla("}${
|
|
12662
|
-
var
|
|
12663
|
-
function
|
|
12664
|
-
return n?function(e,t){return function(n){return e+n*t}}(e,n):
|
|
12665
|
-
function i(e,t){var i=n((e=
|
|
12684
|
+
return a?(r=t===s?(n-i)/a+6*(n<i):n===s?(i-t)/a+2:(t-n)/a+4,a/=l<.5?s+o:2-s-o,r*=60):a=l>0&&l<1?0:r,new bz(r,a,l,e.opacity)}function bz(e,t,n,i){this.h=+e,this.s=+t,this.l=+n,this.opacity=+i}function yz(e){return(e=(e||0)%360)<0?e+360:e}function wz(e){return Math.max(0,Math.min(1,e||0))}function xz(e,t,n){return 255*(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)}BL(UL,rz,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:oz,formatHex:oz,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return vz(this).formatHsl()},formatRgb:sz,toString:sz}),BL(dz,cz,qL(UL,{brighter(e){return e=null==e?WL:Math.pow(WL,e),new dz(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=null==e?jL:Math.pow(jL,e),new dz(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new dz(fz(this.r),fz(this.g),fz(this.b),pz(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:hz,formatHex:hz,formatHex8:function(){return`#${mz(this.r)}${mz(this.g)}${mz(this.b)}${mz(255*(isNaN(this.opacity)?1:this.opacity))}`},formatRgb:uz,toString:uz})),BL(bz,(function(e,t,n,i){return 1===arguments.length?vz(e):new bz(e,t,n,null==i?1:i)}),qL(UL,{brighter(e){return e=null==e?WL:Math.pow(WL,e),new bz(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=null==e?jL:Math.pow(jL,e),new bz(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+360*(this.h<0),t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,i=n+(n<.5?n:1-n)*t,o=2*n-i
|
|
12685
|
+
return new dz(xz(e>=240?e-240:e+120,o,i),xz(e,o,i),xz(e<120?e+240:e-120,o,i),this.opacity)},clamp(){return new bz(yz(this.h),wz(this.s),wz(this.l),pz(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 e=pz(this.opacity)
|
|
12686
|
+
return`${1===e?"hsl(":"hsla("}${yz(this.h)}, ${100*wz(this.s)}%, ${100*wz(this.l)}%${1===e?")":`, ${e})`}`}}))
|
|
12687
|
+
var Cz=e=>()=>e
|
|
12688
|
+
function kz(e){return 1==(e=+e)?Sz:function(t,n){return n-t?function(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(i){return Math.pow(e+i*t,n)}}(t,n,e):Cz(isNaN(t)?n:t)}}function Sz(e,t){var n=t-e
|
|
12689
|
+
return n?function(e,t){return function(n){return e+n*t}}(e,n):Cz(isNaN(e)?t:e)}var $z=function e(t){var n=kz(t)
|
|
12690
|
+
function i(e,t){var i=n((e=cz(e)).r,(t=cz(t)).r),o=n(e.g,t.g),s=n(e.b,t.b),r=Sz(e.opacity,t.opacity)
|
|
12666
12691
|
return function(t){return e.r=i(t),e.g=o(t),e.b=s(t),e.opacity=r(t),e+""}}return i.gamma=e,i}(1)
|
|
12667
|
-
function
|
|
12692
|
+
function Mz(e,t){t||(t=[])
|
|
12668
12693
|
var n,i=e?Math.min(t.length,e.length):0,o=t.slice()
|
|
12669
12694
|
return function(s){for(n=0;n<i;++n)o[n]=e[n]*(1-s)+t[n]*s
|
|
12670
|
-
return o}}function
|
|
12671
|
-
for(n=0;n<o;++n)s[n]=
|
|
12695
|
+
return o}}function _z(e,t){var n,i=t?t.length:0,o=e?Math.min(i,e.length):0,s=new Array(o),r=new Array(i)
|
|
12696
|
+
for(n=0;n<o;++n)s[n]=Rz(e[n],t[n])
|
|
12672
12697
|
for(;n<i;++n)r[n]=t[n]
|
|
12673
12698
|
return function(e){for(n=0;n<o;++n)r[n]=s[n](e)
|
|
12674
|
-
return r}}function
|
|
12675
|
-
return e=+e,t=+t,function(i){return n.setTime(e*(1-i)+t*i),n}}function
|
|
12676
|
-
for(n in null!==e&&"object"==typeof e||(e={}),null!==t&&"object"==typeof t||(t={}),t)n in e?i[n]=
|
|
12699
|
+
return r}}function Ez(e,t){var n=new Date
|
|
12700
|
+
return e=+e,t=+t,function(i){return n.setTime(e*(1-i)+t*i),n}}function Iz(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function Dz(e,t){var n,i={},o={}
|
|
12701
|
+
for(n in null!==e&&"object"==typeof e||(e={}),null!==t&&"object"==typeof t||(t={}),t)n in e?i[n]=Rz(e[n],t[n]):o[n]=t[n]
|
|
12677
12702
|
return function(e){for(n in i)o[n]=i[n](e)
|
|
12678
|
-
return o}}var
|
|
12679
|
-
function
|
|
12680
|
-
for(e+="",t+="";(n=
|
|
12703
|
+
return o}}var Az=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Tz=new RegExp(Az.source,"g")
|
|
12704
|
+
function Oz(e,t){var n,i,o,s=Az.lastIndex=Tz.lastIndex=0,r=-1,a=[],l=[]
|
|
12705
|
+
for(e+="",t+="";(n=Az.exec(e))&&(i=Tz.exec(t));)(o=i.index)>s&&(o=t.slice(s,o),a[r]?a[r]+=o:a[++r]=o),(n=n[0])===(i=i[0])?a[r]?a[r]+=i:a[++r]=i:(a[++r]=null,l.push({i:r,x:Iz(n,i)})),s=Tz.lastIndex
|
|
12681
12706
|
return s<t.length&&(o=t.slice(s),a[r]?a[r]+=o:a[++r]=o),a.length<2?l[0]?function(e){return function(t){return e(t)+""}}(l[0].x):function(e){return function(){return e}}(t):(t=l.length,function(e){for(var n,i=0;i<t;++i)a[(n=l[i]).i]=n.x(e)
|
|
12682
|
-
return a.join("")})}function
|
|
12683
|
-
return null==t||"boolean"===o?
|
|
12684
|
-
function
|
|
12685
|
-
return(r=Math.sqrt(e*e+t*t))&&(e/=r,t/=r),(l=e*n+t*i)&&(n-=e*l,i-=t*l),(a=Math.sqrt(n*n+i*i))&&(n/=a,i/=a,l/=a),e*i<t*n&&(e=-e,t=-t,l=-l,r=-r),{translateX:o,translateY:s,rotate:Math.atan2(t,e)*
|
|
12707
|
+
return a.join("")})}function Rz(e,t){var n,i,o=typeof t
|
|
12708
|
+
return null==t||"boolean"===o?Cz(t):("number"===o?Iz:"string"===o?(n=rz(t))?(t=n,$z):Oz:t instanceof rz?$z:t instanceof Date?Ez:(i=t,!ArrayBuffer.isView(i)||i instanceof DataView?Array.isArray(t)?_z:"function"!=typeof t.valueOf&&"function"!=typeof t.toString||isNaN(t)?Dz:Iz:Mz))(e,t)}function Fz(e,t){return e=+e,t=+t,function(n){return Math.round(e*(1-n)+t*n)}}var Nz,Pz=180/Math.PI,Lz={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1}
|
|
12709
|
+
function zz(e,t,n,i,o,s){var r,a,l
|
|
12710
|
+
return(r=Math.sqrt(e*e+t*t))&&(e/=r,t/=r),(l=e*n+t*i)&&(n-=e*l,i-=t*l),(a=Math.sqrt(n*n+i*i))&&(n/=a,i/=a,l/=a),e*i<t*n&&(e=-e,t=-t,l=-l,r=-r),{translateX:o,translateY:s,rotate:Math.atan2(t,e)*Pz,skewX:Math.atan(l)*Pz,scaleX:r,scaleY:a}}function Vz(e,t,n,i){function o(e){return e.length?e.pop()+" ":""}return function(s,r){var a=[],l=[]
|
|
12686
12711
|
return s=e(s),r=e(r),function(e,i,o,s,r,a){if(e!==o||i!==s){var l=r.push("translate(",null,t,null,n)
|
|
12687
|
-
a.push({i:l-4,x:
|
|
12688
|
-
r.push({i:a-4,x:
|
|
12689
|
-
return a.join("")}}}var
|
|
12690
|
-
return t.isIdentity?
|
|
12691
|
-
function
|
|
12712
|
+
a.push({i:l-4,x:Iz(e,o)},{i:l-2,x:Iz(i,s)})}else(o||s)&&r.push("translate("+o+t+s+n)}(s.translateX,s.translateY,r.translateX,r.translateY,a,l),function(e,t,n,s){e!==t?(e-t>180?t+=360:t-e>180&&(e+=360),s.push({i:n.push(o(n)+"rotate(",null,i)-2,x:Iz(e,t)})):t&&n.push(o(n)+"rotate("+t+i)}(s.rotate,r.rotate,a,l),function(e,t,n,s){e!==t?s.push({i:n.push(o(n)+"skewX(",null,i)-2,x:Iz(e,t)}):t&&n.push(o(n)+"skewX("+t+i)}(s.skewX,r.skewX,a,l),function(e,t,n,i,s,r){if(e!==n||t!==i){var a=s.push(o(s)+"scale(",null,",",null,")")
|
|
12713
|
+
r.push({i:a-4,x:Iz(e,n)},{i:a-2,x:Iz(t,i)})}else 1===n&&1===i||s.push(o(s)+"scale("+n+","+i+")")}(s.scaleX,s.scaleY,r.scaleX,r.scaleY,a,l),s=r=null,function(e){for(var t,n=-1,i=l.length;++n<i;)a[(t=l[n]).i]=t.x(e)
|
|
12714
|
+
return a.join("")}}}var Hz=Vz((function(e){const t=new("function"==typeof DOMMatrix?DOMMatrix:WebKitCSSMatrix)(e+"")
|
|
12715
|
+
return t.isIdentity?Lz:zz(t.a,t.b,t.c,t.d,t.e,t.f)}),"px, ","px)","deg)"),Bz=Vz((function(e){return null==e?Lz:(Nz||(Nz=document.createElementNS("http://www.w3.org/2000/svg","g")),Nz.setAttribute("transform",e),(e=Nz.transform.baseVal.consolidate())?zz((e=e.matrix).a,e.b,e.c,e.d,e.e,e.f):Lz)}),", ",")",")")
|
|
12716
|
+
function qz(e){return((e=Math.exp(e))+1/e)/2}var Uz,jz,Wz=function e(t,n,i){function o(e,o){var s,r,a=e[0],l=e[1],c=e[2],d=o[0],h=o[1],u=o[2],p=d-a,f=h-l,m=p*p+f*f
|
|
12692
12717
|
if(m<1e-12)r=Math.log(u/c)/t,s=function(e){return[a+e*p,l+e*f,c*Math.exp(t*e*r)]}
|
|
12693
12718
|
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)
|
|
12694
|
-
r=(w-y)/t,s=function(e){var i,o=e*r,s=
|
|
12695
|
-
return[a+d*p,l+d*f,c*s/
|
|
12696
|
-
return e(n,i,i*i)},o}(Math.SQRT2,2,4),
|
|
12697
|
-
function
|
|
12698
|
-
return i.restart(e,t,n),i}function
|
|
12699
|
-
try{!function(){
|
|
12700
|
-
for(var e,t=
|
|
12701
|
-
for(;n;)n._call?(i>n._time&&(i=n._time),e=n,n=n._next):(t=n._next,n._next=null,n=e?e._next=t:
|
|
12702
|
-
|
|
12703
|
-
t>
|
|
12704
|
-
return t=null==t?0:+t,i.restart((n=>{i.stop(),e(n+t)}),t,n),i}
|
|
12705
|
-
n=(null==n?
|
|
12706
|
-
var
|
|
12707
|
-
function
|
|
12719
|
+
r=(w-y)/t,s=function(e){var i,o=e*r,s=qz(y),d=c/(n*g)*(s*(i=t*o+y,((i=Math.exp(2*i))-1)/(i+1))-function(e){return((e=Math.exp(e))-1/e)/2}(y))
|
|
12720
|
+
return[a+d*p,l+d*f,c*s/qz(t*o+y)]}}return s.duration=1e3*r*t/Math.SQRT2,s}return o.rho=function(t){var n=Math.max(.001,+t),i=n*n
|
|
12721
|
+
return e(n,i,i*i)},o}(Math.SQRT2,2,4),Gz=0,Zz=0,Kz=0,Xz=1e3,Yz=0,Jz=0,Qz=0,eV="object"==typeof performance&&performance.now?performance:Date,tV="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)}
|
|
12722
|
+
function nV(){return Jz||(tV(iV),Jz=eV.now()+Qz)}function iV(){Jz=0}function oV(){this._call=this._time=this._next=null}function sV(e,t,n){var i=new oV
|
|
12723
|
+
return i.restart(e,t,n),i}function rV(){Jz=(Yz=eV.now())+Qz,Gz=Zz=0
|
|
12724
|
+
try{!function(){nV(),++Gz
|
|
12725
|
+
for(var e,t=Uz;t;)(e=Jz-t._time)>=0&&t._call.call(void 0,e),t=t._next;--Gz}()}finally{Gz=0,function(){var e,t,n=Uz,i=1/0
|
|
12726
|
+
for(;n;)n._call?(i>n._time&&(i=n._time),e=n,n=n._next):(t=n._next,n._next=null,n=e?e._next=t:Uz=t)
|
|
12727
|
+
jz=e,lV(i)}(),Jz=0}}function aV(){var e=eV.now(),t=e-Yz
|
|
12728
|
+
t>Xz&&(Qz-=t,Yz=e)}function lV(e){Gz||(Zz&&(Zz=clearTimeout(Zz)),e-Jz>24?(e<1/0&&(Zz=setTimeout(rV,e-eV.now()-Qz)),Kz&&(Kz=clearInterval(Kz))):(Kz||(Yz=eV.now(),Kz=setInterval(aV,Xz)),Gz=1,tV(rV)))}function cV(e,t,n){var i=new oV
|
|
12729
|
+
return t=null==t?0:+t,i.restart((n=>{i.stop(),e(n+t)}),t,n),i}oV.prototype=sV.prototype={constructor:oV,restart:function(e,t,n){if("function"!=typeof e)throw new TypeError("callback is not a function")
|
|
12730
|
+
n=(null==n?nV():+n)+(null==t?0:+t),this._next||jz===this||(jz?jz._next=this:Uz=this,jz=this),this._call=e,this._time=n,lV()},stop:function(){this._call&&(this._call=null,this._time=1/0,lV())}}
|
|
12731
|
+
var dV=CP("start","end","cancel","interrupt"),hV=[],uV=0,pV=1,fV=2,mV=3,gV=4,vV=5,bV=6
|
|
12732
|
+
function yV(e,t,n,i,o,s){var r=e.__transition
|
|
12708
12733
|
if(r){if(n in r)return}else e.__transition={}
|
|
12709
12734
|
!function(e,t,n){var i,o=e.__transition
|
|
12710
|
-
function s(e){n.state=
|
|
12711
|
-
if(n.state!==
|
|
12712
|
-
for(c in o)if((u=o[c]).name===n.name){if(u.state
|
|
12713
|
-
u.state===
|
|
12714
|
-
i.length=d+1}}function a(t){for(var o=t<n.duration?n.ease.call(null,t/n.duration):(n.timer.restart(l),n.state=
|
|
12715
|
-
n.state===
|
|
12716
|
-
delete e.__transition}o[t]=n,n.timer=
|
|
12717
|
-
if(n.state>
|
|
12718
|
-
return n}function
|
|
12719
|
-
if(n.state
|
|
12720
|
-
return n}function
|
|
12735
|
+
function s(e){n.state=pV,n.timer.restart(r,n.delay,n.time),n.delay<=e&&r(e-n.delay)}function r(s){var c,d,h,u
|
|
12736
|
+
if(n.state!==pV)return l()
|
|
12737
|
+
for(c in o)if((u=o[c]).name===n.name){if(u.state===mV)return cV(r)
|
|
12738
|
+
u.state===gV?(u.state=bV,u.timer.stop(),u.on.call("interrupt",e,e.__data__,u.index,u.group),delete o[c]):+c<t&&(u.state=bV,u.timer.stop(),u.on.call("cancel",e,e.__data__,u.index,u.group),delete o[c])}if(cV((function(){n.state===mV&&(n.state=gV,n.timer.restart(a,n.delay,n.time),a(s))})),n.state=fV,n.on.call("start",e,e.__data__,n.index,n.group),n.state===fV){for(n.state=mV,i=new Array(h=n.tween.length),c=0,d=-1;c<h;++c)(u=n.tween[c].value.call(e,e.__data__,n.index,n.group))&&(i[++d]=u)
|
|
12739
|
+
i.length=d+1}}function a(t){for(var o=t<n.duration?n.ease.call(null,t/n.duration):(n.timer.restart(l),n.state=vV,1),s=-1,r=i.length;++s<r;)i[s].call(e,o)
|
|
12740
|
+
n.state===vV&&(n.on.call("end",e,e.__data__,n.index,n.group),l())}function l(){for(var i in n.state=bV,n.timer.stop(),delete o[t],o)return
|
|
12741
|
+
delete e.__transition}o[t]=n,n.timer=sV(s,0,n.time)}(e,n,{name:t,index:i,group:o,on:dV,tween:hV,time:s.time,delay:s.delay,duration:s.duration,ease:s.ease,timer:null,state:uV})}function wV(e,t){var n=CV(e,t)
|
|
12742
|
+
if(n.state>uV)throw new Error("too late; already scheduled")
|
|
12743
|
+
return n}function xV(e,t){var n=CV(e,t)
|
|
12744
|
+
if(n.state>mV)throw new Error("too late; already running")
|
|
12745
|
+
return n}function CV(e,t){var n=e.__transition
|
|
12721
12746
|
if(!n||!(n=n[t]))throw new Error("transition not found")
|
|
12722
|
-
return n}function
|
|
12723
|
-
if(s){for(o in t=null==t?null:t+"",s)(n=s[o]).name===t?(i=n.state>
|
|
12724
|
-
r&&delete e.__transition}}function
|
|
12725
|
-
return function(){var o=
|
|
12747
|
+
return n}function kV(e,t){var n,i,o,s=e.__transition,r=!0
|
|
12748
|
+
if(s){for(o in t=null==t?null:t+"",s)(n=s[o]).name===t?(i=n.state>fV&&n.state<vV,n.state=bV,n.timer.stop(),n.on.call(i?"interrupt":"cancel",e,e.__data__,n.index,n.group),delete s[o]):r=!1
|
|
12749
|
+
r&&delete e.__transition}}function SV(e,t){var n,i
|
|
12750
|
+
return function(){var o=xV(this,e),s=o.tween
|
|
12726
12751
|
if(s!==n)for(var r=0,a=(i=n=s).length;r<a;++r)if(i[r].name===t){(i=i.slice()).splice(r,1)
|
|
12727
|
-
break}o.tween=i}}function
|
|
12752
|
+
break}o.tween=i}}function $V(e,t,n){var i,o
|
|
12728
12753
|
if("function"!=typeof n)throw new Error
|
|
12729
|
-
return function(){var s=
|
|
12754
|
+
return function(){var s=xV(this,e),r=s.tween
|
|
12730
12755
|
if(r!==i){o=(i=r).slice()
|
|
12731
12756
|
for(var a={name:t,value:n},l=0,c=o.length;l<c;++l)if(o[l].name===t){o[l]=a
|
|
12732
|
-
break}l===c&&o.push(a)}s.tween=o}}function
|
|
12733
|
-
return e.each((function(){var e=
|
|
12734
|
-
return("number"==typeof t?
|
|
12757
|
+
break}l===c&&o.push(a)}s.tween=o}}function MV(e,t,n){var i=e._id
|
|
12758
|
+
return e.each((function(){var e=xV(this,i);(e.value||(e.value={}))[t]=n.apply(this,arguments)})),function(e){return CV(e,i).value[t]}}function _V(e,t){var n
|
|
12759
|
+
return("number"==typeof t?Iz:t instanceof rz?$z:(n=rz(t))?(t=n,$z):Oz)(e,t)}function EV(e){return function(){this.removeAttribute(e)}}function IV(e){return function(){this.removeAttributeNS(e.space,e.local)}}function DV(e,t,n){var i,o,s=n+""
|
|
12735
12760
|
return function(){var r=this.getAttribute(e)
|
|
12736
|
-
return r===s?null:r===i?o:o=t(i=r,n)}}function
|
|
12761
|
+
return r===s?null:r===i?o:o=t(i=r,n)}}function AV(e,t,n){var i,o,s=n+""
|
|
12737
12762
|
return function(){var r=this.getAttributeNS(e.space,e.local)
|
|
12738
|
-
return r===s?null:r===i?o:o=t(i=r,n)}}function
|
|
12763
|
+
return r===s?null:r===i?o:o=t(i=r,n)}}function TV(e,t,n){var i,o,s
|
|
12739
12764
|
return function(){var r,a,l=n(this)
|
|
12740
12765
|
if(null!=l)return(r=this.getAttribute(e))===(a=l+"")?null:r===i&&a===o?s:(o=a,s=t(i=r,l))
|
|
12741
|
-
this.removeAttribute(e)}}function
|
|
12766
|
+
this.removeAttribute(e)}}function OV(e,t,n){var i,o,s
|
|
12742
12767
|
return function(){var r,a,l=n(this)
|
|
12743
12768
|
if(null!=l)return(r=this.getAttributeNS(e.space,e.local))===(a=l+"")?null:r===i&&a===o?s:(o=a,s=t(i=r,l))
|
|
12744
|
-
this.removeAttributeNS(e.space,e.local)}}function
|
|
12769
|
+
this.removeAttributeNS(e.space,e.local)}}function RV(e,t){var n,i
|
|
12745
12770
|
function o(){var o=t.apply(this,arguments)
|
|
12746
|
-
return o!==i&&(n=(i=o)&&function(e,t){return function(n){this.setAttributeNS(e.space,e.local,t.call(this,n))}}(e,o)),n}return o._value=t,o}function
|
|
12771
|
+
return o!==i&&(n=(i=o)&&function(e,t){return function(n){this.setAttributeNS(e.space,e.local,t.call(this,n))}}(e,o)),n}return o._value=t,o}function FV(e,t){var n,i
|
|
12747
12772
|
function o(){var o=t.apply(this,arguments)
|
|
12748
|
-
return o!==i&&(n=(i=o)&&function(e,t){return function(n){this.setAttribute(e,t.call(this,n))}}(e,o)),n}return o._value=t,o}function
|
|
12749
|
-
function
|
|
12750
|
-
function
|
|
12751
|
-
|
|
12752
|
-
"function"!=typeof e&&(e=
|
|
12753
|
-
for(var i=this._groups,o=i.length,s=new Array(o),r=0;r<o;++r)for(var a,l,c=i[r],d=c.length,h=s[r]=new Array(d),u=0;u<d;++u)(a=c[u])&&(l=e.call(a,a.__data__,u,c))&&("__data__"in a&&(l.__data__=a.__data__),h[u]=l,
|
|
12754
|
-
return new
|
|
12755
|
-
"function"!=typeof e&&(e=
|
|
12756
|
-
for(var i=this._groups,o=i.length,s=[],r=[],a=0;a<o;++a)for(var l,c=i[a],d=c.length,h=0;h<d;++h)if(l=c[h]){for(var u,p=e.call(l,l.__data__,h,c),f=
|
|
12757
|
-
s.push(p),r.push(l)}return new
|
|
12773
|
+
return o!==i&&(n=(i=o)&&function(e,t){return function(n){this.setAttribute(e,t.call(this,n))}}(e,o)),n}return o._value=t,o}function NV(e,t){return function(){wV(this,e).delay=+t.apply(this,arguments)}}function PV(e,t){return t=+t,function(){wV(this,e).delay=t}}function LV(e,t){return function(){xV(this,e).duration=+t.apply(this,arguments)}}function zV(e,t){return t=+t,function(){xV(this,e).duration=t}}var VV=PL.prototype.constructor
|
|
12774
|
+
function HV(e){return function(){this.style.removeProperty(e)}}var BV=0
|
|
12775
|
+
function qV(e,t,n,i){this._groups=e,this._parents=t,this._name=n,this._id=i}function UV(){return++BV}var jV=PL.prototype
|
|
12776
|
+
qV.prototype={constructor:qV,select:function(e){var t=this._name,n=this._id
|
|
12777
|
+
"function"!=typeof e&&(e=OP(e))
|
|
12778
|
+
for(var i=this._groups,o=i.length,s=new Array(o),r=0;r<o;++r)for(var a,l,c=i[r],d=c.length,h=s[r]=new Array(d),u=0;u<d;++u)(a=c[u])&&(l=e.call(a,a.__data__,u,c))&&("__data__"in a&&(l.__data__=a.__data__),h[u]=l,yV(h[u],t,n,u,h,CV(a,n)))
|
|
12779
|
+
return new qV(s,this._parents,t,n)},selectAll:function(e){var t=this._name,n=this._id
|
|
12780
|
+
"function"!=typeof e&&(e=FP(e))
|
|
12781
|
+
for(var i=this._groups,o=i.length,s=[],r=[],a=0;a<o;++a)for(var l,c=i[a],d=c.length,h=0;h<d;++h)if(l=c[h]){for(var u,p=e.call(l,l.__data__,h,c),f=CV(l,n),m=0,g=p.length;m<g;++m)(u=p[m])&&yV(u,t,n,m,p,f)
|
|
12782
|
+
s.push(p),r.push(l)}return new qV(s,r,t,n)},selectChild:jV.selectChild,selectChildren:jV.selectChildren,filter:function(e){"function"!=typeof e&&(e=PP(e))
|
|
12758
12783
|
for(var t=this._groups,n=t.length,i=new Array(n),o=0;o<n;++o)for(var s,r=t[o],a=r.length,l=i[o]=[],c=0;c<a;++c)(s=r[c])&&e.call(s,s.__data__,c,r)&&l.push(s)
|
|
12759
|
-
return new
|
|
12784
|
+
return new qV(i,this._parents,this._name,this._id)},merge:function(e){if(e._id!==this._id)throw new Error
|
|
12760
12785
|
for(var t=this._groups,n=e._groups,i=t.length,o=n.length,s=Math.min(i,o),r=new Array(i),a=0;a<s;++a)for(var l,c=t[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)
|
|
12761
12786
|
for(;a<i;++a)r[a]=t[a]
|
|
12762
|
-
return new
|
|
12763
|
-
|
|
12764
|
-
return arguments.length<2?
|
|
12765
|
-
return t>=0&&(e=e.slice(0,t)),!e||"start"===e}))}(t)?
|
|
12787
|
+
return new qV(r,this._parents,this._name,this._id)},selection:function(){return new VV(this._groups,this._parents)},transition:function(){for(var e=this._name,t=this._id,n=UV(),i=this._groups,o=i.length,s=0;s<o;++s)for(var r,a=i[s],l=a.length,c=0;c<l;++c)if(r=a[c]){var d=CV(r,t)
|
|
12788
|
+
yV(r,e,n,c,a,{time:d.time+d.delay+d.duration,delay:0,duration:d.duration,ease:d.ease})}return new qV(i,this._parents,e,n)},call:jV.call,nodes:jV.nodes,node:jV.node,size:jV.size,empty:jV.empty,each:jV.each,on:function(e,t){var n=this._id
|
|
12789
|
+
return arguments.length<2?CV(this.node(),n).on.on(e):this.each(function(e,t,n){var i,o,s=function(e){return(e+"").trim().split(/^|\s+/).every((function(e){var t=e.indexOf(".")
|
|
12790
|
+
return t>=0&&(e=e.slice(0,t)),!e||"start"===e}))}(t)?wV:xV
|
|
12766
12791
|
return function(){var r=s(this,e),a=r.on
|
|
12767
|
-
a!==i&&(o=(i=a).copy()).on(t,n),r.on=o}}(n,e,t))},attr:function(e,t){var n=
|
|
12768
|
-
return this.attrTween(e,"function"==typeof t?(n.local?
|
|
12792
|
+
a!==i&&(o=(i=a).copy()).on(t,n),r.on=o}}(n,e,t))},attr:function(e,t){var n=EP(e),i="transform"===n?Bz:_V
|
|
12793
|
+
return this.attrTween(e,"function"==typeof t?(n.local?OV:TV)(n,i,MV(this,"attr."+e,t)):null==t?(n.local?IV:EV)(n):(n.local?AV:DV)(n,i,t))},attrTween:function(e,t){var n="attr."+e
|
|
12769
12794
|
if(arguments.length<2)return(n=this.tween(n))&&n._value
|
|
12770
12795
|
if(null==t)return this.tween(n,null)
|
|
12771
12796
|
if("function"!=typeof t)throw new Error
|
|
12772
|
-
var i=
|
|
12773
|
-
return this.tween(n,(i.local?
|
|
12797
|
+
var i=EP(e)
|
|
12798
|
+
return this.tween(n,(i.local?RV:FV)(i,t))},style:function(e,t,n){var i="transform"==(e+="")?Hz:_V
|
|
12774
12799
|
return null==t?this.styleTween(e,function(e,t){var n,i,o
|
|
12775
|
-
return function(){var s=
|
|
12776
|
-
return s===r?null:s===n&&r===i?o:o=t(n=s,i=r)}}(e,i)).on("end.style."+e,
|
|
12777
|
-
return function(){var r=
|
|
12778
|
-
return null==a&&(this.style.removeProperty(e),l=a=
|
|
12779
|
-
return function(){var l=
|
|
12800
|
+
return function(){var s=rL(this,e),r=(this.style.removeProperty(e),rL(this,e))
|
|
12801
|
+
return s===r?null:s===n&&r===i?o:o=t(n=s,i=r)}}(e,i)).on("end.style."+e,HV(e)):"function"==typeof t?this.styleTween(e,function(e,t,n){var i,o,s
|
|
12802
|
+
return function(){var r=rL(this,e),a=n(this),l=a+""
|
|
12803
|
+
return null==a&&(this.style.removeProperty(e),l=a=rL(this,e)),r===l?null:r===i&&l===o?s:(o=l,s=t(i=r,a))}}(e,i,MV(this,"style."+e,t))).each(function(e,t){var n,i,o,s,r="style."+t,a="end."+r
|
|
12804
|
+
return function(){var l=xV(this,e),c=l.on,d=null==l.value[r]?s||(s=HV(t)):void 0
|
|
12780
12805
|
c===n&&o===d||(i=(n=c).copy()).on(a,o=d),l.on=i}}(this._id,e)):this.styleTween(e,function(e,t,n){var i,o,s=n+""
|
|
12781
|
-
return function(){var r=
|
|
12806
|
+
return function(){var r=rL(this,e)
|
|
12782
12807
|
return r===s?null:r===i?o:o=t(i=r,n)}}(e,i,t),n).on("end.style."+e,null)},styleTween:function(e,t,n){var i="style."+(e+="")
|
|
12783
12808
|
if(arguments.length<2)return(i=this.tween(i))&&i._value
|
|
12784
12809
|
if(null==t)return this.tween(i,null)
|
|
@@ -12786,7 +12811,7 @@ if("function"!=typeof t)throw new Error
|
|
|
12786
12811
|
return this.tween(i,function(e,t,n){var i,o
|
|
12787
12812
|
function s(){var s=t.apply(this,arguments)
|
|
12788
12813
|
return s!==o&&(i=(o=s)&&function(e,t,n){return function(i){this.style.setProperty(e,t.call(this,i),n)}}(e,s,n)),i}return s._value=t,s}(e,t,null==n?"":n))},text:function(e){return this.tween("text","function"==typeof e?function(e){return function(){var t=e(this)
|
|
12789
|
-
this.textContent=null==t?"":t}}(
|
|
12814
|
+
this.textContent=null==t?"":t}}(MV(this,"text",e)):function(e){return function(){this.textContent=e}}(null==e?"":e+""))},textTween:function(e){var t="text"
|
|
12790
12815
|
if(arguments.length<1)return(t=this.tween(t))&&t._value
|
|
12791
12816
|
if(null==e)return this.tween(t,null)
|
|
12792
12817
|
if("function"!=typeof e)throw new Error
|
|
@@ -12795,59 +12820,59 @@ function i(){var i=e.apply(this,arguments)
|
|
|
12795
12820
|
return i!==n&&(t=(n=i)&&function(e){return function(t){this.textContent=e.call(this,t)}}(i)),t}return i._value=e,i}(e))},remove:function(){return this.on("end.remove",function(e){return function(){var t=this.parentNode
|
|
12796
12821
|
for(var n in this.__transition)if(+n!==e)return
|
|
12797
12822
|
t&&t.removeChild(this)}}(this._id))},tween:function(e,t){var n=this._id
|
|
12798
|
-
if(e+="",arguments.length<2){for(var i,o=
|
|
12799
|
-
return null}return this.each((null==t?
|
|
12800
|
-
return arguments.length?this.each(("function"==typeof e?
|
|
12801
|
-
return arguments.length?this.each(("function"==typeof e?
|
|
12823
|
+
if(e+="",arguments.length<2){for(var i,o=CV(this.node(),n).tween,s=0,r=o.length;s<r;++s)if((i=o[s]).name===e)return i.value
|
|
12824
|
+
return null}return this.each((null==t?SV:$V)(n,e,t))},delay:function(e){var t=this._id
|
|
12825
|
+
return arguments.length?this.each(("function"==typeof e?NV:PV)(t,e)):CV(this.node(),t).delay},duration:function(e){var t=this._id
|
|
12826
|
+
return arguments.length?this.each(("function"==typeof e?LV:zV)(t,e)):CV(this.node(),t).duration},ease:function(e){var t=this._id
|
|
12802
12827
|
return arguments.length?this.each(function(e,t){if("function"!=typeof t)throw new Error
|
|
12803
|
-
return function(){
|
|
12828
|
+
return function(){xV(this,e).ease=t}}(t,e)):CV(this.node(),t).ease},easeVarying:function(e){if("function"!=typeof e)throw new Error
|
|
12804
12829
|
return this.each(function(e,t){return function(){var n=t.apply(this,arguments)
|
|
12805
12830
|
if("function"!=typeof n)throw new Error
|
|
12806
|
-
|
|
12831
|
+
xV(this,e).ease=n}}(this._id,e))},end:function(){var e,t,n=this,i=n._id,o=n.size()
|
|
12807
12832
|
return new Promise((function(s,r){var a={value:r},l={value:function(){0==--o&&s()}}
|
|
12808
|
-
n.each((function(){var n=
|
|
12809
|
-
o!==e&&((t=(e=o).copy())._.cancel.push(a),t._.interrupt.push(a),t._.end.push(l)),n.on=t})),0===o&&s()}))},[Symbol.iterator]:
|
|
12810
|
-
var
|
|
12811
|
-
function
|
|
12812
|
-
return n}
|
|
12813
|
-
e instanceof
|
|
12814
|
-
for(var i=this._groups,o=i.length,s=0;s<o;++s)for(var r,a=i[s],l=a.length,c=0;c<l;++c)(r=a[c])&&
|
|
12815
|
-
return new
|
|
12816
|
-
var
|
|
12817
|
-
function
|
|
12818
|
-
var
|
|
12819
|
-
function
|
|
12820
|
-
return e instanceof SVGElement?(e=e.ownerSVGElement||e).hasAttribute("viewBox")?[[(e=e.viewBox.baseVal).x,e.y],[e.x+e.width,e.y+e.height]]:[[0,0],[e.width.baseVal.value,e.height.baseVal.value]]:[[0,0],[e.clientWidth,e.clientHeight]]}function
|
|
12821
|
-
return e.translate(o>i?(i+o)/2:Math.min(0,i)||Math.max(0,o),r>s?(s+r)/2:Math.min(0,s)||Math.max(0,r))}function
|
|
12822
|
-
function v(e){e.property("__zoom",
|
|
12823
|
-
return i===e.x&&o===e.y?e:new
|
|
12833
|
+
n.each((function(){var n=xV(this,i),o=n.on
|
|
12834
|
+
o!==e&&((t=(e=o).copy())._.cancel.push(a),t._.interrupt.push(a),t._.end.push(l)),n.on=t})),0===o&&s()}))},[Symbol.iterator]:jV[Symbol.iterator]}
|
|
12835
|
+
var WV={time:null,delay:0,duration:250,ease:function(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}}
|
|
12836
|
+
function GV(e,t){for(var n;!(n=e.__transition)||!(n=n[t]);)if(!(e=e.parentNode))throw new Error(`transition ${t} not found`)
|
|
12837
|
+
return n}PL.prototype.interrupt=function(e){return this.each((function(){kV(this,e)}))},PL.prototype.transition=function(e){var t,n
|
|
12838
|
+
e instanceof qV?(t=e._id,e=e._name):(t=UV(),(n=WV).time=nV(),e=null==e?null:e+"")
|
|
12839
|
+
for(var i=this._groups,o=i.length,s=0;s<o;++s)for(var r,a=i[s],l=a.length,c=0;c<l;++c)(r=a[c])&&yV(r,e,t,c,a,n||GV(r,t))
|
|
12840
|
+
return new qV(i,this._parents,e,t)}
|
|
12841
|
+
var ZV=e=>()=>e
|
|
12842
|
+
function KV(e,{sourceEvent:t,target:n,transform:i,dispatch:o}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},target:{value:n,enumerable:!0,configurable:!0},transform:{value:i,enumerable:!0,configurable:!0},_:{value:o}})}function XV(e,t,n){this.k=e,this.x=t,this.y=n}XV.prototype={constructor:XV,scale:function(e){return 1===e?this:new XV(this.k*e,this.x,this.y)},translate:function(e,t){return 0===e&0===t?this:new XV(this.k,this.x+this.k*e,this.y+this.k*t)},apply:function(e){return[e[0]*this.k+this.x,e[1]*this.k+this.y]},applyX:function(e){return e*this.k+this.x},applyY:function(e){return e*this.k+this.y},invert:function(e){return[(e[0]-this.x)/this.k,(e[1]-this.y)/this.k]},invertX:function(e){return(e-this.x)/this.k},invertY:function(e){return(e-this.y)/this.k},rescaleX:function(e){return e.copy().domain(e.range().map(this.invertX,this).map(e.invert,e))},rescaleY:function(e){return e.copy().domain(e.range().map(this.invertY,this).map(e.invert,e))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}}
|
|
12843
|
+
var YV=new XV(1,0,0)
|
|
12844
|
+
function JV(e){e.stopImmediatePropagation()}function QV(e){e.preventDefault(),e.stopImmediatePropagation()}function eH(e){return!(e.ctrlKey&&"wheel"!==e.type||e.button)}function tH(){var e=this
|
|
12845
|
+
return e instanceof SVGElement?(e=e.ownerSVGElement||e).hasAttribute("viewBox")?[[(e=e.viewBox.baseVal).x,e.y],[e.x+e.width,e.y+e.height]]:[[0,0],[e.width.baseVal.value,e.height.baseVal.value]]:[[0,0],[e.clientWidth,e.clientHeight]]}function nH(){return this.__zoom||YV}function iH(e){return-e.deltaY*(1===e.deltaMode?.05:e.deltaMode?1:.002)*(e.ctrlKey?10:1)}function oH(){return navigator.maxTouchPoints||"ontouchstart"in this}function sH(e,t,n){var i=e.invertX(t[0][0])-n[0][0],o=e.invertX(t[1][0])-n[1][0],s=e.invertY(t[0][1])-n[0][1],r=e.invertY(t[1][1])-n[1][1]
|
|
12846
|
+
return e.translate(o>i?(i+o)/2:Math.min(0,i)||Math.max(0,o),r>s?(s+r)/2:Math.min(0,s)||Math.max(0,r))}function rH(){var e,t,n,i=eH,o=tH,s=sH,r=iH,a=oH,l=[0,1/0],c=[[-1/0,-1/0],[1/0,1/0]],d=250,h=Wz,u=CP("start","zoom","end"),p=500,f=150,m=0,g=10
|
|
12847
|
+
function v(e){e.property("__zoom",nH).on("wheel.zoom",S,{passive:!1}).on("mousedown.zoom",$).on("dblclick.zoom",M).filter(a).on("touchstart.zoom",_).on("touchmove.zoom",E).on("touchend.zoom touchcancel.zoom",I).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function b(e,t){return(t=Math.max(l[0],Math.min(l[1],t)))===e.k?e:new XV(t,e.x,e.y)}function y(e,t,n){var i=t[0]-n[0]*e.k,o=t[1]-n[1]*e.k
|
|
12848
|
+
return i===e.x&&o===e.y?e:new XV(e.k,i,o)}function w(e){return[(+e[0][0]+ +e[1][0])/2,(+e[0][1]+ +e[1][1])/2]}function x(e,t,n,i){e.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 e=this,s=arguments,r=C(e,s).event(i),a=o.apply(e,s),l=null==n?w(a):"function"==typeof n?n.apply(e,s):n,c=Math.max(a[1][0]-a[0][0],a[1][1]-a[0][1]),d=e.__zoom,u="function"==typeof t?t.apply(e,s):t,p=h(d.invert(l).concat(c/d.k),u.invert(l).concat(c/u.k))
|
|
12824
12849
|
return function(e){if(1===e)e=u
|
|
12825
12850
|
else{var t=p(e),n=c/t[2]
|
|
12826
|
-
e=new
|
|
12851
|
+
e=new XV(n,l[0]-t[0]*n,l[1]-t[1]*n)}r.zoom(null,e)}}))}function C(e,t,n){return!n&&e.__zooming||new k(e,t)}function k(e,t){this.that=e,this.args=t,this.active=0,this.sourceEvent=null,this.extent=o.apply(e,t),this.taps=0}function S(e,...t){if(i.apply(this,arguments)){var n=C(this,t).event(e),o=this.__zoom,a=Math.max(l[0],Math.min(l[1],o.k*Math.pow(2,r.apply(this,arguments)))),d=zL(e)
|
|
12827
12852
|
if(n.wheel)n.mouse[0][0]===d[0]&&n.mouse[0][1]===d[1]||(n.mouse[1]=o.invert(n.mouse[0]=d)),clearTimeout(n.wheel)
|
|
12828
12853
|
else{if(o.k===a)return
|
|
12829
|
-
n.mouse=[d,o.invert(d)],
|
|
12830
|
-
r.moved=t*t+n*n>m}r.event(e).zoom("mouse",s(y(r.that.__zoom,r.mouse[0]=
|
|
12831
|
-
t&&(i.on("click.drag",
|
|
12832
|
-
!function(e){var t=e.document.documentElement,n=
|
|
12833
|
-
"onselectstart"in t?n.on("selectstart.drag",
|
|
12834
|
-
|
|
12835
|
-
for(
|
|
12836
|
-
e&&(e=clearTimeout(e)),s&&(h.taps<2&&(t=l[0],e=setTimeout((function(){e=null}),p)),
|
|
12837
|
-
for(
|
|
12854
|
+
n.mouse=[d,o.invert(d)],kV(this),n.start()}QV(e),n.wheel=setTimeout((function(){n.wheel=null,n.end()}),f),n.zoom("mouse",s(y(b(o,a),n.mouse[0],n.mouse[1]),n.extent,c))}}function $(e,...t){if(!n&&i.apply(this,arguments)){var o=e.currentTarget,r=C(this,t,!0).event(e),a=LL(e.view).on("mousemove.zoom",(function(e){if(QV(e),!r.moved){var t=e.clientX-d,n=e.clientY-h
|
|
12855
|
+
r.moved=t*t+n*n>m}r.event(e).zoom("mouse",s(y(r.that.__zoom,r.mouse[0]=zL(e,o),r.mouse[1]),r.extent,c))}),!0).on("mouseup.zoom",(function(e){a.on("mousemove.zoom mouseup.zoom",null),function(e,t){var n=e.document.documentElement,i=LL(e).on("dragstart.drag",null)
|
|
12856
|
+
t&&(i.on("click.drag",HL,VL),setTimeout((function(){i.on("click.drag",null)}),0)),"onselectstart"in n?i.on("selectstart.drag",null):(n.style.MozUserSelect=n.__noselect,delete n.__noselect)}(e.view,r.moved),QV(e),r.event(e).end()}),!0),l=zL(e,o),d=e.clientX,h=e.clientY
|
|
12857
|
+
!function(e){var t=e.document.documentElement,n=LL(e).on("dragstart.drag",HL,VL)
|
|
12858
|
+
"onselectstart"in t?n.on("selectstart.drag",HL,VL):(t.__noselect=t.style.MozUserSelect,t.style.MozUserSelect="none")}(e.view),JV(e),r.mouse=[l,this.__zoom.invert(l)],kV(this),r.start()}}function M(e,...t){if(i.apply(this,arguments)){var n=this.__zoom,r=zL(e.changedTouches?e.changedTouches[0]:e,this),a=n.invert(r),l=n.k*(e.shiftKey?.5:2),h=s(y(b(n,l),r,a),o.apply(this,t),c)
|
|
12859
|
+
QV(e),d>0?LL(this).transition().duration(d).call(x,h,r,e):LL(this).call(v.transform,h,r,e)}}function _(n,...o){if(i.apply(this,arguments)){var s,r,a,l,c=n.touches,d=c.length,h=C(this,o,n.changedTouches.length===d).event(n)
|
|
12860
|
+
for(JV(n),r=0;r<d;++r)l=[l=zL(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,s=!0,h.taps=1+!!e)
|
|
12861
|
+
e&&(e=clearTimeout(e)),s&&(h.taps<2&&(t=l[0],e=setTimeout((function(){e=null}),p)),kV(this),h.start())}}function E(e,...t){if(this.__zooming){var n,i,o,r,a=C(this,t).event(e),l=e.changedTouches,d=l.length
|
|
12862
|
+
for(QV(e),n=0;n<d;++n)o=zL(i=l[n],this),a.touch0&&a.touch0[2]===i.identifier?a.touch0[0]=o:a.touch1&&a.touch1[2]===i.identifier&&(a.touch1[0]=o)
|
|
12838
12863
|
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
|
|
12839
12864
|
i=b(i,Math.sqrt(m/g)),o=[(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
|
|
12840
12865
|
o=a.touch0[0],r=a.touch0[1]}a.zoom("touch",s(y(i,o,r),a.extent,c))}}function I(e,...i){if(this.__zooming){var o,s,r=C(this,i).event(e),a=e.changedTouches,l=a.length
|
|
12841
|
-
for(
|
|
12866
|
+
for(JV(e),n&&clearTimeout(n),n=setTimeout((function(){n=null}),p),o=0;o<l;++o)s=a[o],r.touch0&&r.touch0[2]===s.identifier?delete r.touch0:r.touch1&&r.touch1[2]===s.identifier&&delete r.touch1
|
|
12842
12867
|
if(r.touch1&&!r.touch0&&(r.touch0=r.touch1,delete r.touch1),r.touch0)r.touch0[1]=this.__zoom.invert(r.touch0[0])
|
|
12843
|
-
else if(r.end(),2===r.taps&&(s=
|
|
12868
|
+
else if(r.end(),2===r.taps&&(s=zL(s,this),Math.hypot(t[0]-s[0],t[1]-s[1])<g)){var c=LL(this).on("dblclick.zoom")
|
|
12844
12869
|
c&&c.apply(this,arguments)}}}return v.transform=function(e,t,n,i){var o=e.selection?e.selection():e
|
|
12845
|
-
o.property("__zoom",
|
|
12870
|
+
o.property("__zoom",nH),e!==o?x(e,t,n,i):o.interrupt().each((function(){C(this,arguments).event(i).start().zoom(null,"function"==typeof t?t.apply(this,arguments):t).end()}))},v.scaleBy=function(e,t,n,i){v.scaleTo(e,(function(){return this.__zoom.k*("function"==typeof t?t.apply(this,arguments):t)}),n,i)},v.scaleTo=function(e,t,n,i){v.transform(e,(function(){var e=o.apply(this,arguments),i=this.__zoom,r=null==n?w(e):"function"==typeof n?n.apply(this,arguments):n,a=i.invert(r),l="function"==typeof t?t.apply(this,arguments):t
|
|
12846
12871
|
return s(y(b(i,l),r,a),e,c)}),n,i)},v.translateBy=function(e,t,n,i){v.transform(e,(function(){return s(this.__zoom.translate("function"==typeof t?t.apply(this,arguments):t,"function"==typeof n?n.apply(this,arguments):n),o.apply(this,arguments),c)}),null,i)},v.translateTo=function(e,t,n,i,r){v.transform(e,(function(){var e=o.apply(this,arguments),r=this.__zoom,a=null==i?w(e):"function"==typeof i?i.apply(this,arguments):i
|
|
12847
|
-
return s(
|
|
12848
|
-
u.call(e,this.that,new
|
|
12849
|
-
return e===u?v:e},v.clickDistance=function(e){return arguments.length?(m=(e=+e)*e,v):Math.sqrt(m)},v.tapDistance=function(e){return arguments.length?(g=+e,v):g},v}
|
|
12850
|
-
const
|
|
12872
|
+
return s(YV.translate(a[0],a[1]).scale(r.k).translate("function"==typeof t?-t.apply(this,arguments):-t,"function"==typeof n?-n.apply(this,arguments):-n),e,c)}),i,r)},k.prototype={event:function(e){return e&&(this.sourceEvent=e),this},start:function(){return 1==++this.active&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(e,t){return this.mouse&&"mouse"!==e&&(this.mouse[1]=t.invert(this.mouse[0])),this.touch0&&"touch"!==e&&(this.touch0[1]=t.invert(this.touch0[0])),this.touch1&&"touch"!==e&&(this.touch1[1]=t.invert(this.touch1[0])),this.that.__zoom=t,this.emit("zoom"),this},end:function(){return 0==--this.active&&(delete this.that.__zooming,this.emit("end")),this},emit:function(e){var t=LL(this.that).datum()
|
|
12873
|
+
u.call(e,this.that,new KV(e,{sourceEvent:this.sourceEvent,target:v,type:e,transform:this.that.__zoom,dispatch:u}),t)}},v.wheelDelta=function(e){return arguments.length?(r="function"==typeof e?e:ZV(+e),v):r},v.filter=function(e){return arguments.length?(i="function"==typeof e?e:ZV(!!e),v):i},v.touchable=function(e){return arguments.length?(a="function"==typeof e?e:ZV(!!e),v):a},v.extent=function(e){return arguments.length?(o="function"==typeof e?e:ZV([[+e[0][0],+e[0][1]],[+e[1][0],+e[1][1]]]),v):o},v.scaleExtent=function(e){return arguments.length?(l[0]=+e[0],l[1]=+e[1],v):[l[0],l[1]]},v.translateExtent=function(e){return arguments.length?(c[0][0]=+e[0][0],c[1][0]=+e[1][0],c[0][1]=+e[0][1],c[1][1]=+e[1][1],v):[[c[0][0],c[0][1]],[c[1][0],c[1][1]]]},v.constrain=function(e){return arguments.length?(s=e,v):s},v.duration=function(e){return arguments.length?(d=+e,v):d},v.interpolate=function(e){return arguments.length?(h=e,v):h},v.on=function(){var e=u.on.apply(u,arguments)
|
|
12874
|
+
return e===u?v:e},v.clickDistance=function(e){return arguments.length?(m=(e=+e)*e,v):Math.sqrt(m)},v.tapDistance=function(e){return arguments.length?(g=+e,v):g},v}XV.prototype
|
|
12875
|
+
const aH=G`
|
|
12851
12876
|
<div class="wafer-map-container">
|
|
12852
12877
|
<svg class="svg-root">
|
|
12853
12878
|
<g ${Pe("zoomContainer")} transform=${e=>e.transform.toString()}>
|
|
@@ -12878,7 +12903,7 @@ const vH=G`
|
|
|
12878
12903
|
/>
|
|
12879
12904
|
</svg>
|
|
12880
12905
|
</div>
|
|
12881
|
-
`,
|
|
12906
|
+
`,lH=xe`
|
|
12882
12907
|
${Ro("inline-block")}
|
|
12883
12908
|
|
|
12884
12909
|
:host {
|
|
@@ -12968,67 +12993,67 @@ const vH=G`
|
|
|
12968
12993
|
outline-width: 0px;
|
|
12969
12994
|
}
|
|
12970
12995
|
`
|
|
12971
|
-
function
|
|
12996
|
+
function cH(e,t){return null==e||null==t?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function dH(e,t){return null==e||null==t?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function hH(e){let t,n,i
|
|
12972
12997
|
function o(e,i,o=0,s=e.length){if(o<s){if(0!==t(i,i))return s
|
|
12973
12998
|
do{const t=o+s>>>1
|
|
12974
|
-
n(e[t],i)<0?o=t+1:s=t}while(o<s)}return o}return 2!==e.length?(t=
|
|
12999
|
+
n(e[t],i)<0?o=t+1:s=t}while(o<s)}return o}return 2!==e.length?(t=cH,n=(t,n)=>cH(e(t),n),i=(t,n)=>e(t)-n):(t=e===cH||e===dH?e:uH,n=e,i=e),{left:o,center:function(e,t,n=0,s=e.length){const r=o(e,t,n,s-1)
|
|
12975
13000
|
return r>n&&i(e[r-1],t)>-i(e[r],t)?r-1:r},right:function(e,i,o=0,s=e.length){if(o<s){if(0!==t(i,i))return s
|
|
12976
13001
|
do{const t=o+s>>>1
|
|
12977
|
-
n(e[t],i)<=0?o=t+1:s=t}while(o<s)}return o}}}function
|
|
12978
|
-
|
|
12979
|
-
class
|
|
13002
|
+
n(e[t],i)<=0?o=t+1:s=t}while(o<s)}return o}}}function uH(){return 0}function pH(e){return null===e?NaN:+e}const fH=hH(cH).right
|
|
13003
|
+
hH(pH).center
|
|
13004
|
+
class mH extends Map{constructor(e,t=vH){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:t}}),null!=e)for(const[t,n]of e)this.set(t,n)}get(e){return super.get(gH(this,e))}has(e){return super.has(gH(this,e))}set(e,t){return super.set(function({_intern:e,_key:t},n){const i=t(n)
|
|
12980
13005
|
return e.has(i)?e.get(i):(e.set(i,n),n)}(this,e),t)}delete(e){return super.delete(function({_intern:e,_key:t},n){const i=t(n)
|
|
12981
13006
|
e.has(i)&&(n=e.get(i),e.delete(i))
|
|
12982
|
-
return n}(this,e))}}function
|
|
12983
|
-
return e.has(i)?e.get(i):n}function
|
|
12984
|
-
function
|
|
13007
|
+
return n}(this,e))}}function gH({_intern:e,_key:t},n){const i=t(n)
|
|
13008
|
+
return e.has(i)?e.get(i):n}function vH(e){return null!==e&&"object"==typeof e?e.valueOf():e}const bH=Math.sqrt(50),yH=Math.sqrt(10),wH=Math.sqrt(2)
|
|
13009
|
+
function xH(e,t,n){const i=(t-e)/Math.max(0,n),o=Math.floor(Math.log10(i)),s=i/Math.pow(10,o),r=s>=bH?10:s>=yH?5:s>=wH?2:1
|
|
12985
13010
|
let a,l,c
|
|
12986
|
-
return o<0?(c=Math.pow(10,-o)/r,a=Math.round(e*c),l=Math.round(t*c),a/c<e&&++a,l/c>t&&--l,c=-c):(c=Math.pow(10,o)*r,a=Math.round(e/c),l=Math.round(t/c),a*c<e&&++a,l*c>t&&--l),l<a&&.5<=n&&n<2?
|
|
13011
|
+
return o<0?(c=Math.pow(10,-o)/r,a=Math.round(e*c),l=Math.round(t*c),a/c<e&&++a,l/c>t&&--l,c=-c):(c=Math.pow(10,o)*r,a=Math.round(e/c),l=Math.round(t/c),a*c<e&&++a,l*c>t&&--l),l<a&&.5<=n&&n<2?xH(e,t,2*n):[a,l,c]}function CH(e,t,n){return xH(e=+e,t=+t,n=+n)[2]}function kH(e,t,n=pH){if((i=e.length)&&!isNaN(t=+t)){if(t<=0||i<2)return+n(e[0],0,e)
|
|
12987
13012
|
if(t>=1)return+n(e[i-1],i-1,e)
|
|
12988
13013
|
var i,o=(i-1)*t,s=Math.floor(o),r=+n(e[s],s,e)
|
|
12989
|
-
return r+(+n(e[s+1],s+1,e)-r)*(o-s)}}function
|
|
13014
|
+
return r+(+n(e[s+1],s+1,e)-r)*(o-s)}}function SH(e,t,n){e=+e,t=+t,n=(o=arguments.length)<2?(t=e,e=0,1):o<3?1:+n
|
|
12990
13015
|
for(var i=-1,o=0|Math.max(0,Math.ceil((t-e)/n)),s=new Array(o);++i<o;)s[i]=e+i*n
|
|
12991
|
-
return s}function
|
|
13016
|
+
return s}function $H(e,t){switch(arguments.length){case 0:break
|
|
12992
13017
|
case 1:this.range(e)
|
|
12993
13018
|
break
|
|
12994
|
-
default:this.range(t).domain(e)}return this}const
|
|
12995
|
-
function
|
|
13019
|
+
default:this.range(t).domain(e)}return this}const MH=Symbol("implicit")
|
|
13020
|
+
function _H(){var e=new mH,t=[],n=[],i=MH
|
|
12996
13021
|
function o(o){let s=e.get(o)
|
|
12997
|
-
if(void 0===s){if(i!==
|
|
13022
|
+
if(void 0===s){if(i!==MH)return i
|
|
12998
13023
|
e.set(o,s=t.push(o)-1)}return n[s%n.length]}return o.domain=function(n){if(!arguments.length)return t.slice()
|
|
12999
|
-
t=[],e=new
|
|
13024
|
+
t=[],e=new mH
|
|
13000
13025
|
for(const i of n)e.has(i)||e.set(i,t.push(i)-1)
|
|
13001
|
-
return o},o.range=function(e){return arguments.length?(n=Array.from(e),o):n.slice()},o.unknown=function(e){return arguments.length?(i=e,o):i},o.copy=function(){return
|
|
13026
|
+
return o},o.range=function(e){return arguments.length?(n=Array.from(e),o):n.slice()},o.unknown=function(e){return arguments.length?(i=e,o):i},o.copy=function(){return _H(t,n).unknown(i)},$H.apply(o,arguments),o}function EH(){var e,t,n=_H().unknown(void 0),i=n.domain,o=n.range,s=0,r=1,a=!1,l=0,c=0,d=.5
|
|
13002
13027
|
function h(){var n=i().length,h=r<s,u=h?r:s,p=h?s:r
|
|
13003
13028
|
e=(p-u)/Math.max(1,n-l+2*c),a&&(e=Math.floor(e)),u+=(p-u-e*(n-l))*d,t=e*(1-l),a&&(u=Math.round(u),t=Math.round(t))
|
|
13004
|
-
var f=
|
|
13005
|
-
return o(h?f.reverse():f)}return delete n.unknown,n.domain=function(e){return arguments.length?(i(e),h()):i()},n.range=function(e){return arguments.length?([s,r]=e,s=+s,r=+r,h()):[s,r]},n.rangeRound=function(e){return[s,r]=e,s=+s,r=+r,a=!0,h()},n.bandwidth=function(){return t},n.step=function(){return e},n.round=function(e){return arguments.length?(a=!!e,h()):a},n.padding=function(e){return arguments.length?(l=Math.min(1,c=+e),h()):l},n.paddingInner=function(e){return arguments.length?(l=Math.min(1,e),h()):l},n.paddingOuter=function(e){return arguments.length?(c=+e,h()):c},n.align=function(e){return arguments.length?(d=Math.max(0,Math.min(1,e)),h()):d},n.copy=function(){return
|
|
13006
|
-
function
|
|
13007
|
-
var n}function
|
|
13008
|
-
return o<i?(i=
|
|
13009
|
-
for(e[i]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++r<i;)o[r]=
|
|
13010
|
-
return function(t){var n=
|
|
13011
|
-
return s[n](o[n](t))}}function
|
|
13029
|
+
var f=SH(n).map((function(t){return u+e*t}))
|
|
13030
|
+
return o(h?f.reverse():f)}return delete n.unknown,n.domain=function(e){return arguments.length?(i(e),h()):i()},n.range=function(e){return arguments.length?([s,r]=e,s=+s,r=+r,h()):[s,r]},n.rangeRound=function(e){return[s,r]=e,s=+s,r=+r,a=!0,h()},n.bandwidth=function(){return t},n.step=function(){return e},n.round=function(e){return arguments.length?(a=!!e,h()):a},n.padding=function(e){return arguments.length?(l=Math.min(1,c=+e),h()):l},n.paddingInner=function(e){return arguments.length?(l=Math.min(1,e),h()):l},n.paddingOuter=function(e){return arguments.length?(c=+e,h()):c},n.align=function(e){return arguments.length?(d=Math.max(0,Math.min(1,e)),h()):d},n.copy=function(){return EH(i(),[s,r]).round(a).paddingInner(l).paddingOuter(c).align(d)},$H.apply(h(),arguments)}function IH(e){return+e}var DH=[0,1]
|
|
13031
|
+
function AH(e){return e}function TH(e,t){return(t-=e=+e)?function(n){return(n-e)/t}:(n=isNaN(t)?NaN:.5,function(){return n})
|
|
13032
|
+
var n}function OH(e,t,n){var i=e[0],o=e[1],s=t[0],r=t[1]
|
|
13033
|
+
return o<i?(i=TH(o,i),s=n(r,s)):(i=TH(i,o),s=n(s,r)),function(e){return s(i(e))}}function RH(e,t,n){var i=Math.min(e.length,t.length)-1,o=new Array(i),s=new Array(i),r=-1
|
|
13034
|
+
for(e[i]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++r<i;)o[r]=TH(e[r],e[r+1]),s[r]=n(t[r],t[r+1])
|
|
13035
|
+
return function(t){var n=fH(e,t,1,i)-1
|
|
13036
|
+
return s[n](o[n](t))}}function FH(){var e,t,n,i,o,s,r=DH,a=DH,l=Rz,c=AH
|
|
13012
13037
|
function d(){var e,t,n,l=Math.min(r.length,a.length)
|
|
13013
|
-
return c!==
|
|
13038
|
+
return c!==AH&&(e=r[0],t=r[l-1],e>t&&(n=e,e=t,t=n),c=function(n){return Math.max(e,Math.min(t,n))}),i=l>2?RH:OH,o=s=null,h}function h(t){return null==t||isNaN(t=+t)?n:(o||(o=i(r.map(e),a,l)))(e(c(t)))}return h.invert=function(n){return c(t((s||(s=i(a,r.map(e),Iz)))(n)))},h.domain=function(e){return arguments.length?(r=Array.from(e,IH),d()):r.slice()},h.range=function(e){return arguments.length?(a=Array.from(e),d()):a.slice()},h.rangeRound=function(e){return a=Array.from(e),l=Fz,d()},h.clamp=function(e){return arguments.length?(c=!!e||AH,d()):c!==AH},h.interpolate=function(e){return arguments.length?(l=e,d()):l},h.unknown=function(e){return arguments.length?(n=e,h):n},function(n,i){return e=n,t=i,d()}}function NH(e,t){if((n=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"))<0)return null
|
|
13014
13039
|
var n,i=e.slice(0,n)
|
|
13015
|
-
return[i.length>1?i[0]+i.slice(2):i,+e.slice(n+1)]}function
|
|
13016
|
-
function
|
|
13040
|
+
return[i.length>1?i[0]+i.slice(2):i,+e.slice(n+1)]}function PH(e){return(e=NH(Math.abs(e)))?e[1]:NaN}var LH,zH=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i
|
|
13041
|
+
function VH(e){if(!(t=zH.exec(e)))throw new Error("invalid format: "+e)
|
|
13017
13042
|
var t
|
|
13018
|
-
return new
|
|
13043
|
+
return new HH({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}function HH(e){this.fill=void 0===e.fill?" ":e.fill+"",this.align=void 0===e.align?">":e.align+"",this.sign=void 0===e.sign?"-":e.sign+"",this.symbol=void 0===e.symbol?"":e.symbol+"",this.zero=!!e.zero,this.width=void 0===e.width?void 0:+e.width,this.comma=!!e.comma,this.precision=void 0===e.precision?void 0:+e.precision,this.trim=!!e.trim,this.type=void 0===e.type?"":e.type+""}function BH(e,t){var n=NH(e,t)
|
|
13019
13044
|
if(!n)return e+""
|
|
13020
13045
|
var i=n[0],o=n[1]
|
|
13021
|
-
return o<0?"0."+new Array(-o).join("0")+i:i.length>o+1?i.slice(0,o+1)+"."+i.slice(o+1):i+new Array(o-i.length+2).join("0")}
|
|
13022
|
-
var
|
|
13046
|
+
return o<0?"0."+new Array(-o).join("0")+i:i.length>o+1?i.slice(0,o+1)+"."+i.slice(o+1):i+new Array(o-i.length+2).join("0")}VH.prototype=HH.prototype,HH.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}
|
|
13047
|
+
var qH={"%":(e,t)=>(100*e).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:function(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)},e:(e,t)=>e.toExponential(t),f:(e,t)=>e.toFixed(t),g:(e,t)=>e.toPrecision(t),o:e=>Math.round(e).toString(8),p:(e,t)=>BH(100*e,t),r:BH,s:function(e,t){var n=NH(e,t)
|
|
13023
13048
|
if(!n)return e+""
|
|
13024
|
-
var i=n[0],o=n[1],s=o-(
|
|
13025
|
-
return s===r?i:s>r?i+new Array(s-r+1).join("0"):s>0?i.slice(0,s)+"."+i.slice(s):"0."+new Array(1-s).join("0")+
|
|
13026
|
-
function
|
|
13027
|
-
function
|
|
13028
|
-
return s.reverse().join(n)}),o=void 0===e.currency?"":e.currency[0]+"",s=void 0===e.currency?"":e.currency[1]+"",r=void 0===e.decimal?".":e.decimal+"",a=void 0===e.numerals?
|
|
13029
|
-
function h(e){var t=(e=
|
|
13030
|
-
"n"===b?(m=!0,b="g"):
|
|
13031
|
-
var y="$"===u?o:"#"===u&&/[boxX]/.test(b)?"0"+b.toLowerCase():"",w="$"===u?s:/[%p]/.test(b)?l:"",x=
|
|
13049
|
+
var i=n[0],o=n[1],s=o-(LH=3*Math.max(-8,Math.min(8,Math.floor(o/3))))+1,r=i.length
|
|
13050
|
+
return s===r?i:s>r?i+new Array(s-r+1).join("0"):s>0?i.slice(0,s)+"."+i.slice(s):"0."+new Array(1-s).join("0")+NH(e,Math.max(0,t+s-1))[0]},X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)}
|
|
13051
|
+
function UH(e){return e}var jH,WH,GH,ZH=Array.prototype.map,KH=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"]
|
|
13052
|
+
function XH(e){var t,n,i=void 0===e.grouping||void 0===e.thousands?UH:(t=ZH.call(e.grouping,Number),n=e.thousands+"",function(e,i){for(var o=e.length,s=[],r=0,a=t[0],l=0;o>0&&a>0&&(l+a+1>i&&(a=Math.max(1,i-l)),s.push(e.substring(o-=a,o+a)),!((l+=a+1)>i));)a=t[r=(r+1)%t.length]
|
|
13053
|
+
return s.reverse().join(n)}),o=void 0===e.currency?"":e.currency[0]+"",s=void 0===e.currency?"":e.currency[1]+"",r=void 0===e.decimal?".":e.decimal+"",a=void 0===e.numerals?UH:function(e){return function(t){return t.replace(/[0-9]/g,(function(t){return e[+t]}))}}(ZH.call(e.numerals,String)),l=void 0===e.percent?"%":e.percent+"",c=void 0===e.minus?"−":e.minus+"",d=void 0===e.nan?"NaN":e.nan+""
|
|
13054
|
+
function h(e){var t=(e=VH(e)).fill,n=e.align,h=e.sign,u=e.symbol,p=e.zero,f=e.width,m=e.comma,g=e.precision,v=e.trim,b=e.type
|
|
13055
|
+
"n"===b?(m=!0,b="g"):qH[b]||(void 0===g&&(g=12),v=!0,b="g"),(p||"0"===t&&"="===n)&&(p=!0,t="0",n="=")
|
|
13056
|
+
var y="$"===u?o:"#"===u&&/[boxX]/.test(b)?"0"+b.toLowerCase():"",w="$"===u?s:/[%p]/.test(b)?l:"",x=qH[b],C=/[defgprs%]/.test(b)
|
|
13032
13057
|
function k(e){var o,s,l,u=y,k=w
|
|
13033
13058
|
if("c"===b)k=x(e)+k,e=""
|
|
13034
13059
|
else{var S=(e=+e)<0||1/e<0
|
|
@@ -13037,7 +13062,7 @@ break
|
|
|
13037
13062
|
case"0":0===o&&(o=i),t=i
|
|
13038
13063
|
break
|
|
13039
13064
|
default:if(!+e[i])break e
|
|
13040
|
-
o>0&&(o=0)}return o>0?e.slice(0,o)+e.slice(t+1):e}(e)),S&&0==+e&&"+"!==h&&(S=!1),u=(S?"("===h?h:c:"-"===h||"("===h?"":h)+u,k=("s"===b?
|
|
13065
|
+
o>0&&(o=0)}return o>0?e.slice(0,o)+e.slice(t+1):e}(e)),S&&0==+e&&"+"!==h&&(S=!1),u=(S?"("===h?h:c:"-"===h||"("===h?"":h)+u,k=("s"===b?KH[8+LH/3]:"")+k+(S&&"("===h?")":""),C)for(o=-1,s=e.length;++o<s;)if(48>(l=e.charCodeAt(o))||l>57){k=(46===l?r+e.slice(o+1):e.slice(o))+k,e=e.slice(0,o)
|
|
13041
13066
|
break}}m&&!p&&(e=i(e,1/0))
|
|
13042
13067
|
var $=u.length+e.length+k.length,M=$<f?new Array(f-$+1).join(t):""
|
|
13043
13068
|
switch(m&&p&&(e=i(M+e,M.length?f-k.length:1/0),M=""),n){case"<":e=u+e+k+M
|
|
@@ -13046,19 +13071,19 @@ case"=":e=u+M+e+k
|
|
|
13046
13071
|
break
|
|
13047
13072
|
case"^":e=M.slice(0,$=M.length>>1)+u+e+k+M.slice($)
|
|
13048
13073
|
break
|
|
13049
|
-
default:e=M+u+e+k}return a(e)}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 e+""},k}return{format:h,formatPrefix:function(e,t){var n=h(((e=
|
|
13050
|
-
return function(e){return n(o*e)+s}}}}function
|
|
13051
|
-
const i=(t=+t)<(e=+e),o=i?
|
|
13074
|
+
default:e=M+u+e+k}return a(e)}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 e+""},k}return{format:h,formatPrefix:function(e,t){var n=h(((e=VH(e)).type="f",e)),i=3*Math.max(-8,Math.min(8,Math.floor(PH(t)/3))),o=Math.pow(10,-i),s=KH[8+i/3]
|
|
13075
|
+
return function(e){return n(o*e)+s}}}}function YH(e,t,n,i){var o,s=function(e,t,n){n=+n
|
|
13076
|
+
const i=(t=+t)<(e=+e),o=i?CH(t,e,n):CH(e,t,n)
|
|
13052
13077
|
return(i?-1:1)*(o<0?1/-o:o)}(e,t,n)
|
|
13053
|
-
switch((i=
|
|
13054
|
-
return null!=i.precision||isNaN(o=function(e,t){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(
|
|
13055
|
-
case"":case"e":case"g":case"p":case"r":null!=i.precision||isNaN(o=function(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,
|
|
13078
|
+
switch((i=VH(null==i?",f":i)).type){case"s":var r=Math.max(Math.abs(e),Math.abs(t))
|
|
13079
|
+
return null!=i.precision||isNaN(o=function(e,t){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(PH(t)/3)))-PH(Math.abs(e)))}(s,r))||(i.precision=o),GH(i,r)
|
|
13080
|
+
case"":case"e":case"g":case"p":case"r":null!=i.precision||isNaN(o=function(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,PH(t)-PH(e))+1}(s,Math.max(Math.abs(e),Math.abs(t))))||(i.precision=o-("e"===i.type))
|
|
13056
13081
|
break
|
|
13057
|
-
case"f":case"%":null!=i.precision||isNaN(o=function(e){return Math.max(0,-
|
|
13082
|
+
case"f":case"%":null!=i.precision||isNaN(o=function(e){return Math.max(0,-PH(Math.abs(e)))}(s))||(i.precision=o-2*("%"===i.type))}return WH(i)}function JH(e){var t=e.domain
|
|
13058
13083
|
return e.ticks=function(e){var n=t()
|
|
13059
13084
|
return function(e,t,n){if(!((n=+n)>0))return[]
|
|
13060
13085
|
if((e=+e)==(t=+t))return[e]
|
|
13061
|
-
const i=t<e,[o,s,r]=i?
|
|
13086
|
+
const i=t<e,[o,s,r]=i?xH(t,e,n):xH(e,t,n)
|
|
13062
13087
|
if(!(s>=o))return[]
|
|
13063
13088
|
const a=s-o+1,l=new Array(a)
|
|
13064
13089
|
if(i)if(r<0)for(let e=0;e<a;++e)l[e]=(s-e)/-r
|
|
@@ -13066,33 +13091,33 @@ else for(let e=0;e<a;++e)l[e]=(s-e)*r
|
|
|
13066
13091
|
else if(r<0)for(let e=0;e<a;++e)l[e]=(o+e)/-r
|
|
13067
13092
|
else for(let e=0;e<a;++e)l[e]=(o+e)*r
|
|
13068
13093
|
return l}(n[0],n[n.length-1],null==e?10:e)},e.tickFormat=function(e,n){var i=t()
|
|
13069
|
-
return
|
|
13094
|
+
return YH(i[0],i[i.length-1],null==e?10:e,n)},e.nice=function(n){null==n&&(n=10)
|
|
13070
13095
|
var i,o,s=t(),r=0,a=s.length-1,l=s[r],c=s[a],d=10
|
|
13071
|
-
for(c<l&&(o=l,l=c,c=o,o=r,r=a,a=o);d-- >0;){if((o=
|
|
13096
|
+
for(c<l&&(o=l,l=c,c=o,o=r,r=a,a=o);d-- >0;){if((o=CH(l,c,n))===i)return s[r]=l,s[a]=c,t(s)
|
|
13072
13097
|
if(o>0)l=Math.floor(l/o)*o,c=Math.ceil(c/o)*o
|
|
13073
13098
|
else{if(!(o<0))break
|
|
13074
|
-
l=Math.ceil(l*o)/o,c=Math.floor(c*o)/o}i=o}return e},e}function
|
|
13075
|
-
return e.copy=function(){return t=e,
|
|
13076
|
-
var t}
|
|
13099
|
+
l=Math.ceil(l*o)/o,c=Math.floor(c*o)/o}i=o}return e},e}function QH(){var e=FH()(AH,AH)
|
|
13100
|
+
return e.copy=function(){return t=e,QH().domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp()).unknown(t.unknown())
|
|
13101
|
+
var t},$H.apply(e,arguments),JH(e)}function eB(){var e,t=[],n=[],i=[]
|
|
13077
13102
|
function o(){var e=0,o=Math.max(1,n.length)
|
|
13078
|
-
for(i=new Array(o-1);++e<o;)i[e-1]=
|
|
13079
|
-
return s}function s(t){return null==t||isNaN(t=+t)?e:n[
|
|
13103
|
+
for(i=new Array(o-1);++e<o;)i[e-1]=kH(t,e/o)
|
|
13104
|
+
return s}function s(t){return null==t||isNaN(t=+t)?e:n[fH(i,t)]}return s.invertExtent=function(e){var o=n.indexOf(e)
|
|
13080
13105
|
return o<0?[NaN,NaN]:[o>0?i[o-1]:t[0],o<i.length?i[o]:t[t.length-1]]},s.domain=function(e){if(!arguments.length)return t.slice()
|
|
13081
13106
|
t=[]
|
|
13082
13107
|
for(let n of e)null==n||isNaN(n=+n)||t.push(n)
|
|
13083
|
-
return t.sort(
|
|
13084
|
-
const
|
|
13085
|
-
class
|
|
13108
|
+
return t.sort(cH),o()},s.range=function(e){return arguments.length?(n=Array.from(e),o()):n.slice()},s.unknown=function(t){return arguments.length?(e=t,s):e},s.quantiles=function(){return i.slice()},s.copy=function(){return eB().domain(t).range(n).unknown(e)},$H.apply(s,arguments)}jH=XH({thousands:",",grouping:[3],currency:["$",""]}),WH=jH.format,GH=jH.formatPrefix
|
|
13109
|
+
const tB="bottom-left",nB="bottom-right",iB="top-left",oB="top",sB="show",rB="hide",aB="linear",lB="ordinal"
|
|
13110
|
+
class cB{get labelsFontSize(){return this._labelsFontSize}get diesRenderInfo(){return this._diesRenderInfo}constructor(e){this.wafermap=e,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)
|
|
13086
13111
|
const e=e=>null!==e
|
|
13087
13112
|
void 0===this.wafermap.diesTable&&(this._diesRenderInfo=this.wafermap.dies.map((e=>this.computeDieRenderInfo(e))).filter(e))}computeDieRenderInfo(e){const t=this.wafermap.dataManager.margin,n=this.wafermap.dataManager.horizontalScale(e.x),i=this.wafermap.dataManager.verticalScale(e.y)
|
|
13088
|
-
return void 0===n||void 0===i?null:{x:n+t.right,y:i+t.top,fillStyle:this.calculateFillStyle(e.value,this.wafermap.colorScaleMode,this.wafermap.highlightedTags,e.tags),text:this.buildLabel(e.value,this.wafermap.maxCharacters,this.wafermap.dieLabelsHidden,this.wafermap.dieLabelsSuffix)}}calculateLabelsFontSize(e,t){return Math.min(e.height,e.width/(.5*Math.max(2,t))*this.fontSizeFactor)}createD3ColorScale(e,t){return this.isColorScaleLinear(t)?
|
|
13113
|
+
return void 0===n||void 0===i?null:{x:n+t.right,y:i+t.top,fillStyle:this.calculateFillStyle(e.value,this.wafermap.colorScaleMode,this.wafermap.highlightedTags,e.tags),text:this.buildLabel(e.value,this.wafermap.maxCharacters,this.wafermap.dieLabelsHidden,this.wafermap.dieLabelsSuffix)}}calculateLabelsFontSize(e,t){return Math.min(e.height,e.width/(.5*Math.max(2,t))*this.fontSizeFactor)}createD3ColorScale(e,t){return this.isColorScaleLinear(t)?QH().domain(e.values.map((e=>+e))).range(e.colors):_H().domain(e.values).range(e.colors)}dieHasData(e){return null!=e&&""!==e}buildLabel(e,t,n,i){if(n||!this.dieHasData(e))return""
|
|
13089
13114
|
const o=`${e}${i}`
|
|
13090
13115
|
return o.length>=t?`${o.substring(0,t)}…`:o}calculateOpacity(e,t){if(!t||0===t.length)return 1
|
|
13091
13116
|
const n=new Set(t)
|
|
13092
|
-
return e?.some((e=>n.has(e)))?1:this.nonHighlightedOpacity}isColorScaleLinear(e){return e===
|
|
13117
|
+
return e?.some((e=>n.has(e)))?1:this.nonHighlightedOpacity}isColorScaleLinear(e){return e===aB}isColorScaleOrdinal(e){return e===lB}calculateFillStyle(e,t,n,i){let o=this.emptyDieColor
|
|
13093
13118
|
if(this.dieHasData(e)&&(isNaN(+e)?o=this.nanDieColor:this.isColorScaleLinear(t)?o=this.d3ColorScale(+e):this.isColorScaleOrdinal(t)&&(o=this.d3ColorScale(e))),void 0===o)return this.emptyDieColor
|
|
13094
13119
|
let s=Zo(o)
|
|
13095
|
-
return null===s?this.emptyDieColor:(s=new Vo(s.r,s.g,s.b,this.calculateOpacity(i,n)),s.toStringWebRGBA())}}class
|
|
13120
|
+
return null===s?this.emptyDieColor:(s=new Vo(s.r,s.g,s.b,this.calculateOpacity(i,n)),s.toStringWebRGBA())}}class dB{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(e){this.wafermap=e,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(e){this.wafermap=e,this.defaultPadding=0,this.baseMarginPercentage=.04}updateContainerDimensions(){const e={width:this.wafermap.canvasWidth,height:this.wafermap.canvasHeight},t=Math.min(e.width,e.height),n={top:(e.height-t)/2,right:(e.width-t)/2,bottom:(e.height-t)/2,left:(e.width-t)/2},i={top:t*this.baseMarginPercentage,right:t*this.baseMarginPercentage,bottom:t*this.baseMarginPercentage,left:t*this.baseMarginPercentage}
|
|
13096
13121
|
this._margin=this.calculateMarginAddition(i,n),this._containerDimensions=this.calculateContainerDimensions(e,this._margin)
|
|
13097
13122
|
const o=Math.min(this._containerDimensions.width,this._containerDimensions.height)
|
|
13098
13123
|
this._radius=o/2,this.updateScales()}updateScales(){const e=Math.min(this._containerDimensions.width,this._containerDimensions.height),t=this.gridDimensionsValidAndDefined()?this.calculateGridDimensionsFromBoundingBox():this.calculateGridDimensionsFromDies(this.wafermap.dies),n=this.wafermap.originLocation
|
|
@@ -13102,11 +13127,11 @@ this._dieDimensions={width:isNaN(i)?0:i,height:isNaN(o)?0:o}}gridDimensionsValid
|
|
|
13102
13127
|
return"number"==typeof this.wafermap.gridMaxY&&"number"==typeof this.wafermap.gridMinY&&"number"==typeof this.wafermap.gridMaxX&&"number"==typeof this.wafermap.gridMinX&&(e.origin.x=this.wafermap.gridMinX,e.origin.y=this.wafermap.gridMinY,e.rows=this.wafermap.gridMaxY-this.wafermap.gridMinY+1,e.cols=this.wafermap.gridMaxX-this.wafermap.gridMinX+1),e}calculateGridDimensionsFromDies(e){if(0===e.length||void 0===e[0])return{origin:{x:0,y:0},rows:0,cols:0}
|
|
13103
13128
|
const t={x:e[0].x,y:e[0].y},n={x:e[0].x,y:e[0].y}
|
|
13104
13129
|
for(const i of e)i.x<t.x&&(t.x=i.x),i.y<t.y&&(t.y=i.y),i.x>n.x&&(n.x=i.x),i.y>n.y&&(n.y=i.y)
|
|
13105
|
-
return{origin:t,rows:n.y-t.y+1,cols:n.x-t.x+1}}calculateContainerDimensions(e,t){return{width:e.width-t.left-t.right,height:e.height-t.top-t.bottom}}createHorizontalScale(e,t,n){const i=
|
|
13106
|
-
return e===
|
|
13107
|
-
return e===
|
|
13108
|
-
return e===
|
|
13109
|
-
return e===
|
|
13130
|
+
return{origin:t,rows:n.y-t.y+1,cols:n.x-t.x+1}}calculateContainerDimensions(e,t){return{width:e.width-t.left-t.right,height:e.height-t.top-t.bottom}}createHorizontalScale(e,t,n){const i=EH().domain(SH(t.origin.x,t.origin.x+t.cols)).paddingInner(0).paddingOuter(0).align(0).round(!1)
|
|
13131
|
+
return e===tB||e===iB?i.range([0,n]):i.range([n,0])}createInvertedHorizontalScale(e,t,n){const i=eB().domain([0,n])
|
|
13132
|
+
return e===tB||e===iB?i.range(SH(t.origin.x,t.origin.x+t.cols)):i.range(SH(t.origin.x,t.origin.x+t.cols).reverse())}createVerticalScale(e,t,n){const i=EH().domain(SH(t.origin.y,t.origin.y+t.rows)).paddingInner(this.defaultPadding).paddingOuter(0).align(0).round(!1)
|
|
13133
|
+
return e===tB||e===nB?i.range([n,0]):i.range([0,n])}createInvertedVerticalScale(e,t,n){const i=eB().domain([0,n])
|
|
13134
|
+
return e===tB||e===nB?i.range(SH(t.origin.y,t.origin.y+t.rows).reverse()):i.range(SH(t.origin.y,t.origin.y+t.rows))}calculateMarginAddition(e,t){return{top:e.top+t.top,right:e.right+t.right,bottom:e.bottom+t.bottom,left:e.left+t.left}}}(e),this.prerendering=new cB(e)}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(e){return this.dataMap.get(`${e.x}_${e.y}`)}updateDataMap(){this.dataMap=new Map(this.wafermap.dies.map((e=>[`${e.x}_${e.y}`,e])))}}class hB{constructor(e){this.wafermap=e,this.minDieDim=50}updateSortedDiesAndDrawWafer(){this.dies=this.wafermap.dataManager.diesRenderInfo.sort(((e,t)=>e.fillStyle>t.fillStyle?1:t.fillStyle>e.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?rB:sB,this.wafermap.hoverTransform=this.calculateHoverTransform())}calculateHoverTransform(){if(void 0!==this.wafermap.hoverDie){const e=this.wafermap.dataManager.horizontalScale(this.wafermap.hoverDie.x)
|
|
13110
13135
|
if(void 0===e)return""
|
|
13111
13136
|
const t=this.wafermap.dataManager.verticalScale(this.wafermap.hoverDie.y)
|
|
13112
13137
|
if(void 0===t)return""
|
|
@@ -13119,117 +13144,117 @@ if(e*t*(this.wafermap.transform.k||1)>=this.minDieDim){const n=this.wafermap.dat
|
|
|
13119
13144
|
i.font=`${n.toString()}px sans-serif`,i.fillStyle="#ffffff",i.textAlign="center",i.lineCap="butt"
|
|
13120
13145
|
const o=i.measureText("M"),s=this.wafermap.transform.invert([0,0]),r=this.wafermap.transform.invert([this.wafermap.canvas.width,this.wafermap.canvas.height])
|
|
13121
13146
|
s[0]-=e,s[1]-=t
|
|
13122
|
-
for(const n of this.dies)this.isDieVisible(n,s,r)&&i.fillText(n.text,n.x+e/2,n.y+t/2+o.width/2,e-e/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(e,t,n){return e.x>=t[0]&&e.x<n[0]&&e.y>=t[1]&&e.y<n[1]}}const
|
|
13123
|
-
class
|
|
13124
|
-
!function(e){e[e.Sparse=0]="Sparse",e[e.Dense=1]="Dense"}(
|
|
13125
|
-
class
|
|
13126
|
-
class
|
|
13127
|
-
class
|
|
13147
|
+
for(const n of this.dies)this.isDieVisible(n,s,r)&&i.fillText(n.text,n.x+e/2,n.y+t/2+o.width/2,e-e/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(e,t,n){return e.x>=t[0]&&e.x<n[0]&&e.y>=t[1]&&e.y<n[1]}}const uB=["highlightedTags","canvasWidth","canvasHeight","originLocation","gridMinX","gridMaxX","gridMinY","gridMaxY","dies","maxCharacters","colorScale","colorScaleMode","dieLabelsHidden","dieLabelsSuffix","transform","hoverDie"]
|
|
13148
|
+
class pB extends YE{constructor(e){super(uB),this.wafermap=e,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?u.queueUpdate((()=>{this.wafermap.update(),this.untrackAll(),this.updateQueued=!1})):(async()=>{await this.wafermap.currentTask,u.queueUpdate((()=>{this.wafermap.update(),this.untrackAll(),this.updateQueued=!1,this.wafermap.currentTask=void 0}))})())}}var fB,mB,gB,vB,bB,yB,wB,xB,CB
|
|
13149
|
+
!function(e){e[e.Sparse=0]="Sparse",e[e.Dense=1]="Dense"}(fB||(fB={})),function(e){e[e.HALF=0]="HALF",e[e.SINGLE=1]="SINGLE",e[e.DOUBLE=2]="DOUBLE"}(mB||(mB={})),function(e){e[e.DAY=0]="DAY",e[e.MILLISECOND=1]="MILLISECOND"}(gB||(gB={})),function(e){e[e.SECOND=0]="SECOND",e[e.MILLISECOND=1]="MILLISECOND",e[e.MICROSECOND=2]="MICROSECOND",e[e.NANOSECOND=3]="NANOSECOND"}(vB||(vB={})),function(e){e[e.YEAR_MONTH=0]="YEAR_MONTH",e[e.DAY_TIME=1]="DAY_TIME",e[e.MONTH_DAY_NANO=2]="MONTH_DAY_NANO"}(bB||(bB={})),function(e){e[e.NONE=0]="NONE",e[e.Null=1]="Null",e[e.Int=2]="Int",e[e.Float=3]="Float",e[e.Binary=4]="Binary",e[e.Utf8=5]="Utf8",e[e.Bool=6]="Bool",e[e.Decimal=7]="Decimal",e[e.Date=8]="Date",e[e.Time=9]="Time",e[e.Timestamp=10]="Timestamp",e[e.Interval=11]="Interval",e[e.List=12]="List",e[e.Struct=13]="Struct",e[e.Union=14]="Union",e[e.FixedSizeBinary=15]="FixedSizeBinary",e[e.FixedSizeList=16]="FixedSizeList",e[e.Map=17]="Map",e[e.Duration=18]="Duration",e[e.LargeBinary=19]="LargeBinary",e[e.LargeUtf8=20]="LargeUtf8",e[e.Dictionary=-1]="Dictionary",e[e.Int8=-2]="Int8",e[e.Int16=-3]="Int16",e[e.Int32=-4]="Int32",e[e.Int64=-5]="Int64",e[e.Uint8=-6]="Uint8",e[e.Uint16=-7]="Uint16",e[e.Uint32=-8]="Uint32",e[e.Uint64=-9]="Uint64",e[e.Float16=-10]="Float16",e[e.Float32=-11]="Float32",e[e.Float64=-12]="Float64",e[e.DateDay=-13]="DateDay",e[e.DateMillisecond=-14]="DateMillisecond",e[e.TimestampSecond=-15]="TimestampSecond",e[e.TimestampMillisecond=-16]="TimestampMillisecond",e[e.TimestampMicrosecond=-17]="TimestampMicrosecond",e[e.TimestampNanosecond=-18]="TimestampNanosecond",e[e.TimeSecond=-19]="TimeSecond",e[e.TimeMillisecond=-20]="TimeMillisecond",e[e.TimeMicrosecond=-21]="TimeMicrosecond",e[e.TimeNanosecond=-22]="TimeNanosecond",e[e.DenseUnion=-23]="DenseUnion",e[e.SparseUnion=-24]="SparseUnion",e[e.IntervalDayTime=-25]="IntervalDayTime",e[e.IntervalYearMonth=-26]="IntervalYearMonth",e[e.DurationSecond=-27]="DurationSecond",e[e.DurationMillisecond=-28]="DurationMillisecond",e[e.DurationMicrosecond=-29]="DurationMicrosecond",e[e.DurationNanosecond=-30]="DurationNanosecond"}(yB||(yB={})),function(e){e[e.OFFSET=0]="OFFSET",e[e.DATA=1]="DATA",e[e.VALIDITY=2]="VALIDITY",e[e.TYPE=3]="TYPE"}(wB||(wB={}))
|
|
13150
|
+
class kB{static isNull(e){return(null==e?void 0:e.typeId)===yB.Null}static isInt(e){return(null==e?void 0:e.typeId)===yB.Int}static isFloat(e){return(null==e?void 0:e.typeId)===yB.Float}static isBinary(e){return(null==e?void 0:e.typeId)===yB.Binary}static isLargeBinary(e){return(null==e?void 0:e.typeId)===yB.LargeBinary}static isUtf8(e){return(null==e?void 0:e.typeId)===yB.Utf8}static isLargeUtf8(e){return(null==e?void 0:e.typeId)===yB.LargeUtf8}static isBool(e){return(null==e?void 0:e.typeId)===yB.Bool}static isDecimal(e){return(null==e?void 0:e.typeId)===yB.Decimal}static isDate(e){return(null==e?void 0:e.typeId)===yB.Date}static isTime(e){return(null==e?void 0:e.typeId)===yB.Time}static isTimestamp(e){return(null==e?void 0:e.typeId)===yB.Timestamp}static isInterval(e){return(null==e?void 0:e.typeId)===yB.Interval}static isDuration(e){return(null==e?void 0:e.typeId)===yB.Duration}static isList(e){return(null==e?void 0:e.typeId)===yB.List}static isStruct(e){return(null==e?void 0:e.typeId)===yB.Struct}static isUnion(e){return(null==e?void 0:e.typeId)===yB.Union}static isFixedSizeBinary(e){return(null==e?void 0:e.typeId)===yB.FixedSizeBinary}static isFixedSizeList(e){return(null==e?void 0:e.typeId)===yB.FixedSizeList}static isMap(e){return(null==e?void 0:e.typeId)===yB.Map}static isDictionary(e){return(null==e?void 0:e.typeId)===yB.Dictionary}static isDenseUnion(e){return kB.isUnion(e)&&e.mode===fB.Dense}static isSparseUnion(e){return kB.isUnion(e)&&e.mode===fB.Sparse}constructor(e){this.typeId=e}}xB=Symbol.toStringTag,kB[xB]=((CB=kB.prototype).children=null,CB.ArrayType=Array,CB.OffsetArrayType=Int32Array,CB[Symbol.toStringTag]="DataType")
|
|
13151
|
+
class SB extends kB{constructor(){super(yB.Null)}toString(){return"Null"}}SB[Symbol.toStringTag]=(e=>e[Symbol.toStringTag]="Null")(SB.prototype)
|
|
13152
|
+
class $B extends kB{constructor(e,t){super(yB.Int),this.isSigned=e,this.bitWidth=t}get ArrayType(){switch(this.bitWidth){case 8:return this.isSigned?Int8Array:Uint8Array
|
|
13128
13153
|
case 16:return this.isSigned?Int16Array:Uint16Array
|
|
13129
13154
|
case 32:return this.isSigned?Int32Array:Uint32Array
|
|
13130
|
-
case 64:return this.isSigned?BigInt64Array:BigUint64Array}throw new Error(`Unrecognized ${this[Symbol.toStringTag]} type`)}toString(){return`${this.isSigned?"I":"Ui"}nt${this.bitWidth}`}}
|
|
13131
|
-
class
|
|
13132
|
-
case
|
|
13133
|
-
case
|
|
13134
|
-
class
|
|
13135
|
-
class
|
|
13136
|
-
class
|
|
13137
|
-
class
|
|
13138
|
-
class
|
|
13139
|
-
class
|
|
13140
|
-
class
|
|
13141
|
-
class
|
|
13142
|
-
case 64:return BigInt64Array}throw new Error(`Unrecognized ${this[Symbol.toStringTag]} type`)}}
|
|
13143
|
-
class
|
|
13144
|
-
class
|
|
13145
|
-
class
|
|
13146
|
-
class
|
|
13147
|
-
class
|
|
13148
|
-
class
|
|
13149
|
-
class
|
|
13150
|
-
class
|
|
13151
|
-
class
|
|
13152
|
-
if(super(
|
|
13155
|
+
case 64:return this.isSigned?BigInt64Array:BigUint64Array}throw new Error(`Unrecognized ${this[Symbol.toStringTag]} type`)}toString(){return`${this.isSigned?"I":"Ui"}nt${this.bitWidth}`}}$B[Symbol.toStringTag]=(e=>(e.isSigned=null,e.bitWidth=null,e[Symbol.toStringTag]="Int"))($B.prototype)
|
|
13156
|
+
class MB extends kB{constructor(e){super(yB.Float),this.precision=e}get ArrayType(){switch(this.precision){case mB.HALF:return Uint16Array
|
|
13157
|
+
case mB.SINGLE:return Float32Array
|
|
13158
|
+
case mB.DOUBLE:return Float64Array}throw new Error(`Unrecognized ${this[Symbol.toStringTag]} type`)}toString(){return`Float${this.precision<<5||16}`}}MB[Symbol.toStringTag]=(e=>(e.precision=null,e[Symbol.toStringTag]="Float"))(MB.prototype)
|
|
13159
|
+
class _B extends kB{constructor(){super(yB.Binary)}toString(){return"Binary"}}_B[Symbol.toStringTag]=(e=>(e.ArrayType=Uint8Array,e[Symbol.toStringTag]="Binary"))(_B.prototype)
|
|
13160
|
+
class EB extends kB{constructor(){super(yB.LargeBinary)}toString(){return"LargeBinary"}}EB[Symbol.toStringTag]=(e=>(e.ArrayType=Uint8Array,e.OffsetArrayType=BigInt64Array,e[Symbol.toStringTag]="LargeBinary"))(EB.prototype)
|
|
13161
|
+
class IB extends kB{constructor(){super(yB.Utf8)}toString(){return"Utf8"}}IB[Symbol.toStringTag]=(e=>(e.ArrayType=Uint8Array,e[Symbol.toStringTag]="Utf8"))(IB.prototype)
|
|
13162
|
+
class DB extends kB{constructor(){super(yB.LargeUtf8)}toString(){return"LargeUtf8"}}DB[Symbol.toStringTag]=(e=>(e.ArrayType=Uint8Array,e.OffsetArrayType=BigInt64Array,e[Symbol.toStringTag]="LargeUtf8"))(DB.prototype)
|
|
13163
|
+
class AB extends kB{constructor(){super(yB.Bool)}toString(){return"Bool"}}AB[Symbol.toStringTag]=(e=>(e.ArrayType=Uint8Array,e[Symbol.toStringTag]="Bool"))(AB.prototype)
|
|
13164
|
+
class TB extends kB{constructor(e,t,n=128){super(yB.Decimal),this.scale=e,this.precision=t,this.bitWidth=n}toString(){return`Decimal[${this.precision}e${this.scale>0?"+":""}${this.scale}]`}}TB[Symbol.toStringTag]=(e=>(e.scale=null,e.precision=null,e.ArrayType=Uint32Array,e[Symbol.toStringTag]="Decimal"))(TB.prototype)
|
|
13165
|
+
class OB extends kB{constructor(e){super(yB.Date),this.unit=e}toString(){return`Date${32*(this.unit+1)}<${gB[this.unit]}>`}}OB[Symbol.toStringTag]=(e=>(e.unit=null,e.ArrayType=Int32Array,e[Symbol.toStringTag]="Date"))(OB.prototype)
|
|
13166
|
+
class RB extends kB{constructor(e,t){super(yB.Time),this.unit=e,this.bitWidth=t}toString(){return`Time${this.bitWidth}<${vB[this.unit]}>`}get ArrayType(){switch(this.bitWidth){case 32:return Int32Array
|
|
13167
|
+
case 64:return BigInt64Array}throw new Error(`Unrecognized ${this[Symbol.toStringTag]} type`)}}RB[Symbol.toStringTag]=(e=>(e.unit=null,e.bitWidth=null,e[Symbol.toStringTag]="Time"))(RB.prototype)
|
|
13168
|
+
class FB extends kB{constructor(e,t){super(yB.Timestamp),this.unit=e,this.timezone=t}toString(){return`Timestamp<${vB[this.unit]}${this.timezone?`, ${this.timezone}`:""}>`}}FB[Symbol.toStringTag]=(e=>(e.unit=null,e.timezone=null,e.ArrayType=Int32Array,e[Symbol.toStringTag]="Timestamp"))(FB.prototype)
|
|
13169
|
+
class NB extends kB{constructor(e){super(yB.Interval),this.unit=e}toString(){return`Interval<${bB[this.unit]}>`}}NB[Symbol.toStringTag]=(e=>(e.unit=null,e.ArrayType=Int32Array,e[Symbol.toStringTag]="Interval"))(NB.prototype)
|
|
13170
|
+
class PB extends kB{constructor(e){super(yB.Duration),this.unit=e}toString(){return`Duration<${vB[this.unit]}>`}}PB[Symbol.toStringTag]=(e=>(e.unit=null,e.ArrayType=BigInt64Array,e[Symbol.toStringTag]="Duration"))(PB.prototype)
|
|
13171
|
+
class LB extends kB{constructor(e){super(yB.List),this.children=[e]}toString(){return`List<${this.valueType}>`}get valueType(){return this.children[0].type}get valueField(){return this.children[0]}get ArrayType(){return this.valueType.ArrayType}}LB[Symbol.toStringTag]=(e=>(e.children=null,e[Symbol.toStringTag]="List"))(LB.prototype)
|
|
13172
|
+
class zB extends kB{constructor(e){super(yB.Struct),this.children=e}toString(){return`Struct<{${this.children.map((e=>`${e.name}:${e.type}`)).join(", ")}}>`}}zB[Symbol.toStringTag]=(e=>(e.children=null,e[Symbol.toStringTag]="Struct"))(zB.prototype)
|
|
13173
|
+
class VB extends kB{constructor(e,t,n){super(yB.Union),this.mode=e,this.children=n,this.typeIds=t=Int32Array.from(t),this.typeIdToChildIndex=t.reduce(((e,t,n)=>(e[t]=n)&&e||e),Object.create(null))}toString(){return`${this[Symbol.toStringTag]}<${this.children.map((e=>`${e.type}`)).join(" | ")}>`}}VB[Symbol.toStringTag]=(e=>(e.mode=null,e.typeIds=null,e.children=null,e.typeIdToChildIndex=null,e.ArrayType=Int8Array,e[Symbol.toStringTag]="Union"))(VB.prototype)
|
|
13174
|
+
class HB extends kB{constructor(e){super(yB.FixedSizeBinary),this.byteWidth=e}toString(){return`FixedSizeBinary[${this.byteWidth}]`}}HB[Symbol.toStringTag]=(e=>(e.byteWidth=null,e.ArrayType=Uint8Array,e[Symbol.toStringTag]="FixedSizeBinary"))(HB.prototype)
|
|
13175
|
+
class BB extends kB{constructor(e,t){super(yB.FixedSizeList),this.listSize=e,this.children=[t]}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}>`}}BB[Symbol.toStringTag]=(e=>(e.children=null,e.listSize=null,e[Symbol.toStringTag]="FixedSizeList"))(BB.prototype)
|
|
13176
|
+
class qB extends kB{constructor(e,t=!1){var n,i,o
|
|
13177
|
+
if(super(yB.Map),this.children=[e],this.keysSorted=t,e&&(e.name="entries",null===(n=null==e?void 0:e.type)||void 0===n?void 0:n.children)){const t=null===(i=null==e?void 0:e.type)||void 0===i?void 0:i.children[0]
|
|
13153
13178
|
t&&(t.name="key")
|
|
13154
13179
|
const n=null===(o=null==e?void 0:e.type)||void 0===o?void 0:o.children[1]
|
|
13155
|
-
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((e=>`${e.name}:${e.type}`)).join(", ")}}>`}}
|
|
13156
|
-
const
|
|
13157
|
-
var
|
|
13158
|
-
class
|
|
13159
|
-
return Number(e)}(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}>`}}
|
|
13160
|
-
class
|
|
13180
|
+
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((e=>`${e.name}:${e.type}`)).join(", ")}}>`}}qB[Symbol.toStringTag]=(e=>(e.children=null,e.keysSorted=null,e[Symbol.toStringTag]="Map_"))(qB.prototype)
|
|
13181
|
+
const UB=(jB=-1,()=>++jB)
|
|
13182
|
+
var jB
|
|
13183
|
+
class WB extends kB{constructor(e,t,n,i){super(yB.Dictionary),this.indices=t,this.dictionary=e,this.isOrdered=i||!1,this.id=null==n?UB():function(e){if("bigint"==typeof e&&(e<Number.MIN_SAFE_INTEGER||e>Number.MAX_SAFE_INTEGER))throw new TypeError(`${e} is not safe to convert to a number.`)
|
|
13184
|
+
return Number(e)}(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}>`}}WB[Symbol.toStringTag]=(e=>(e.id=null,e.indices=null,e.isOrdered=null,e.dictionary=null,e[Symbol.toStringTag]="Dictionary"))(WB.prototype)
|
|
13185
|
+
class GB{constructor(e){this.wafermap=e,this.invalidGridDimensions=!1,this.invalidDiesTableSchema=!1}getValidity(){return{invalidGridDimensions:this.invalidGridDimensions,invalidDiesTableSchema:this.invalidDiesTableSchema}}isValid(){return Object.values(this.getValidity()).every((e=>!1===e))}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
|
|
13161
13186
|
else{const e=this.wafermap.diesTable.schema.fields,t=e.find((e=>"colIndex"===e.name)),n=e.find((e=>"rowIndex"===e.name)),i=e.find((e=>"value"===e.name))
|
|
13162
|
-
t&&n&&i&&
|
|
13187
|
+
t&&n&&i&&kB.isInt(t.type)&&32===t.type.bitWidth&&kB.isInt(n.type)&&32===n.type.bitWidth&&kB.isFloat(i.type)&&i.type.precision===mB.DOUBLE||(this.invalidDiesTableSchema=!0)}return!this.invalidDiesTableSchema}}
|
|
13163
13188
|
/**
|
|
13164
13189
|
* @license
|
|
13165
13190
|
* Copyright 2019 Google LLC
|
|
13166
13191
|
* SPDX-License-Identifier: Apache-2.0
|
|
13167
|
-
*/const
|
|
13168
|
-
return
|
|
13192
|
+
*/const ZB=Symbol("Comlink.proxy"),KB=Symbol("Comlink.endpoint"),XB=Symbol("Comlink.releaseProxy"),YB=Symbol("Comlink.finalizer"),JB=Symbol("Comlink.thrown"),QB=e=>"object"==typeof e&&null!==e||"function"==typeof e,eq=new Map([["proxy",{canHandle:e=>QB(e)&&e[ZB],serialize(e){const{port1:t,port2:n}=new MessageChannel
|
|
13193
|
+
return tq(e,t),[n,[n]]},deserialize:e=>(e.start(),iq(e))}],["throw",{canHandle:e=>QB(e)&&JB in e,serialize({value:e}){let t
|
|
13169
13194
|
return t=e instanceof Error?{isError:!0,value:{message:e.message,name:e.name,stack:e.stack}}:{isError:!1,value:e},[t,[]]},deserialize(e){if(e.isError)throw Object.assign(new Error(e.value.message),e.value)
|
|
13170
13195
|
throw e.value}}]])
|
|
13171
|
-
function
|
|
13196
|
+
function tq(e,t=globalThis,n=["*"]){t.addEventListener("message",(function i(o){if(!o||!o.data)return
|
|
13172
13197
|
if(!function(e,t){for(const n of e){if(t===n||"*"===n)return!0
|
|
13173
13198
|
if(n instanceof RegExp&&n.test(t))return!0}return!1}(n,o.origin))return void console.warn(`Invalid origin '${o.origin}' for comlink proxy`)
|
|
13174
|
-
const{id:s,type:r,path:a}=Object.assign({path:[]},o.data),l=(o.data.argumentList||[]).map(
|
|
13199
|
+
const{id:s,type:r,path:a}=Object.assign({path:[]},o.data),l=(o.data.argumentList||[]).map(pq)
|
|
13175
13200
|
let c
|
|
13176
13201
|
try{const t=a.slice(0,-1).reduce(((e,t)=>e[t]),e),n=a.reduce(((e,t)=>e[t]),e)
|
|
13177
13202
|
switch(r){case"GET":c=n
|
|
13178
13203
|
break
|
|
13179
|
-
case"SET":t[a.slice(-1)[0]]=
|
|
13204
|
+
case"SET":t[a.slice(-1)[0]]=pq(o.data.value),c=!0
|
|
13180
13205
|
break
|
|
13181
13206
|
case"APPLY":c=n.apply(t,l)
|
|
13182
13207
|
break
|
|
13183
|
-
case"CONSTRUCT":c=function(e){return Object.assign(e,{[
|
|
13208
|
+
case"CONSTRUCT":c=function(e){return Object.assign(e,{[ZB]:!0})}(new n(...l))
|
|
13184
13209
|
break
|
|
13185
13210
|
case"ENDPOINT":{const{port1:t,port2:n}=new MessageChannel
|
|
13186
|
-
|
|
13211
|
+
tq(e,n),c=hq(t,[t])}break
|
|
13187
13212
|
case"RELEASE":c=void 0
|
|
13188
13213
|
break
|
|
13189
|
-
default:return}}catch(e){c={value:e,[
|
|
13190
|
-
t.postMessage(Object.assign(Object.assign({},o),{id:s}),a),"RELEASE"===r&&(t.removeEventListener("message",i),
|
|
13191
|
-
t.postMessage(Object.assign(Object.assign({},n),{id:s}),i)}))})),t.start&&t.start()}function
|
|
13192
|
-
|
|
13193
|
-
function
|
|
13194
|
-
const o=new Proxy(n,{get(n,s){if(
|
|
13214
|
+
default:return}}catch(e){c={value:e,[JB]:0}}Promise.resolve(c).catch((e=>({value:e,[JB]:0}))).then((n=>{const[o,a]=uq(n)
|
|
13215
|
+
t.postMessage(Object.assign(Object.assign({},o),{id:s}),a),"RELEASE"===r&&(t.removeEventListener("message",i),nq(t),YB in e&&"function"==typeof e[YB]&&e[YB]())})).catch((e=>{const[n,i]=uq({value:new TypeError("Unserializable return value"),[JB]:0})
|
|
13216
|
+
t.postMessage(Object.assign(Object.assign({},n),{id:s}),i)}))})),t.start&&t.start()}function nq(e){(function(e){return"MessagePort"===e.constructor.name})(e)&&e.close()}function iq(e,t){return lq(e,[],t)}function oq(e){if(e)throw new Error("Proxy has been released and is not useable")}function sq(e){return fq(e,{type:"RELEASE"}).then((()=>{nq(e)}))}const rq=new WeakMap,aq="FinalizationRegistry"in globalThis&&new FinalizationRegistry((e=>{const t=(rq.get(e)||0)-1
|
|
13217
|
+
rq.set(e,t),0===t&&sq(e)}))
|
|
13218
|
+
function lq(e,t=[],n=function(){}){let i=!1
|
|
13219
|
+
const o=new Proxy(n,{get(n,s){if(oq(i),s===XB)return()=>{!function(e){aq&&aq.unregister(e)}(o),sq(e),i=!0}
|
|
13195
13220
|
if("then"===s){if(0===t.length)return{then:()=>o}
|
|
13196
|
-
const n=
|
|
13197
|
-
return n.then.bind(n)}return
|
|
13198
|
-
const[r,a]=
|
|
13199
|
-
return
|
|
13221
|
+
const n=fq(e,{type:"GET",path:t.map((e=>e.toString()))}).then(pq)
|
|
13222
|
+
return n.then.bind(n)}return lq(e,[...t,s])},set(n,o,s){oq(i)
|
|
13223
|
+
const[r,a]=uq(s)
|
|
13224
|
+
return fq(e,{type:"SET",path:[...t,o].map((e=>e.toString())),value:r},a).then(pq)},apply(n,o,s){oq(i)
|
|
13200
13225
|
const r=t[t.length-1]
|
|
13201
|
-
if(r===
|
|
13202
|
-
if("bind"===r)return
|
|
13203
|
-
const[a,l]=
|
|
13204
|
-
return
|
|
13205
|
-
const[s,r]=
|
|
13206
|
-
return
|
|
13207
|
-
return function(e,t){const n=(
|
|
13208
|
-
|
|
13226
|
+
if(r===KB)return fq(e,{type:"ENDPOINT"}).then(pq)
|
|
13227
|
+
if("bind"===r)return lq(e,t.slice(0,-1))
|
|
13228
|
+
const[a,l]=cq(s)
|
|
13229
|
+
return fq(e,{type:"APPLY",path:t.map((e=>e.toString())),argumentList:a},l).then(pq)},construct(n,o){oq(i)
|
|
13230
|
+
const[s,r]=cq(o)
|
|
13231
|
+
return fq(e,{type:"CONSTRUCT",path:t.map((e=>e.toString())),argumentList:s},r).then(pq)}})
|
|
13232
|
+
return function(e,t){const n=(rq.get(t)||0)+1
|
|
13233
|
+
rq.set(t,n),aq&&aq.register(e,t,e)}(o,e),o}function cq(e){const t=e.map(uq)
|
|
13209
13234
|
return[t.map((e=>e[0])),(n=t.map((e=>e[1])),Array.prototype.concat.apply([],n))]
|
|
13210
|
-
var n}const
|
|
13211
|
-
function
|
|
13212
|
-
return[{type:"HANDLER",name:t,value:i},o]}return[{type:"RAW",value:e},
|
|
13213
|
-
case"RAW":return e.value}}function
|
|
13214
|
-
e.addEventListener("message",(function t(n){n.data&&n.data.id&&n.data.id===o&&(e.removeEventListener("message",t),i(n.data))})),e.start&&e.start(),e.postMessage(Object.assign({id:o},t),n)}))}let
|
|
13215
|
-
class Mq{constructor(e){this.wafermap=e,this.minDieDim=100}async setupWafer(e){if(void 0===this.matrixRenderer){const{matrixRenderer:e}=await(async()=>{if(void 0===$q){const e=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"})
|
|
13216
|
-
|
|
13235
|
+
var n}const dq=new WeakMap
|
|
13236
|
+
function hq(e,t){return dq.set(e,t),e}function uq(e){for(const[t,n]of eq)if(n.canHandle(e)){const[i,o]=n.serialize(e)
|
|
13237
|
+
return[{type:"HANDLER",name:t,value:i},o]}return[{type:"RAW",value:e},dq.get(e)||[]]}function pq(e){switch(e.type){case"HANDLER":return eq.get(e.name).deserialize(e.value)
|
|
13238
|
+
case"RAW":return e.value}}function fq(e,t,n){return new Promise((i=>{const o=new Array(4).fill(0).map((()=>Math.floor(Math.random()*Number.MAX_SAFE_INTEGER).toString(16))).join("-")
|
|
13239
|
+
e.addEventListener("message",(function t(n){n.data&&n.data.id&&n.data.id===o&&(e.removeEventListener("message",t),i(n.data))})),e.start&&e.start(),e.postMessage(Object.assign({id:o},t),n)}))}let mq
|
|
13240
|
+
class gq{constructor(e){this.wafermap=e,this.minDieDim=100}async setupWafer(e){if(void 0===this.matrixRenderer){const{matrixRenderer:e}=await(async()=>{if(void 0===mq){const e=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"})
|
|
13241
|
+
mq=URL.createObjectURL(e)}const e=new Worker(mq),t=iq(e)
|
|
13217
13242
|
return{matrixRenderer:await new t,terminate:()=>e.terminate()}})()
|
|
13218
13243
|
this.matrixRenderer=e
|
|
13219
13244
|
const t=this.wafermap.workerCanvas.transferControlToOffscreen()
|
|
13220
|
-
await this.matrixRenderer.setCanvas(
|
|
13221
|
-
await this.matrixRenderer.setTransformConfig({transform:e.transform,topLeftCanvasCorner:{x:t[0]-e.dieDimensions.width,y:t[1]-e.dieDimensions.height},bottomRightCanvasCorner:{x:n[0],y:n[1]}}),await this.matrixRenderer.drawWafer(),!e.dieLabelsHidden&&e.dieDimensions&&e.dieDimensions.width*e.dieDimensions.height*(e.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?
|
|
13245
|
+
await this.matrixRenderer.setCanvas(hq(t,[t]))}await this.matrixRenderer.setCanvasDimensions(e.canvasDimensions),await this.matrixRenderer.setRenderConfig(e.renderConfig),await this.matrixRenderer.setMatrixData(e.columnIndices,e.rowIndices,e.values)}async drawWafer(e){const t=e.transform.invert([0,0]),n=e.transform.invert([e.canvasDimensions.width,e.canvasDimensions.height])
|
|
13246
|
+
await this.matrixRenderer.setTransformConfig({transform:e.transform,topLeftCanvasCorner:{x:t[0]-e.dieDimensions.width,y:t[1]-e.dieDimensions.height},bottomRightCanvasCorner:{x:n[0],y:n[1]}}),await this.matrixRenderer.drawWafer(),!e.dieLabelsHidden&&e.dieDimensions&&e.dieDimensions.width*e.dieDimensions.height*(e.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?rB:sB,this.wafermap.hoverTransform=this.calculateHoverTransform())}calculateHoverTransform(){if(void 0!==this.wafermap.hoverDie){const e=this.wafermap.computations.horizontalScale(this.wafermap.hoverDie.x)
|
|
13222
13247
|
if(void 0===e)return""
|
|
13223
13248
|
const t=this.wafermap.computations.verticalScale(this.wafermap.hoverDie.y)
|
|
13224
13249
|
if(void 0===t)return""
|
|
13225
13250
|
const n=this.wafermap.transform.apply([e+this.wafermap.computations.margin.left,t+this.wafermap.computations.margin.top])
|
|
13226
|
-
return`translate(${n[0]}, ${n[1]})`}return""}}class
|
|
13251
|
+
return`translate(${n[0]}, ${n[1]})`}return""}}class vq{constructor(e){this.wafermap=e,this.onMouseMove=e=>{if(!this.wafermap.isExperimentalUpdate())return
|
|
13227
13252
|
const t=this.wafermap.transform.invert([e.offsetX,e.offsetY]),n=this.calculateDieCoordinates({x:t[0],y:t[1]})
|
|
13228
13253
|
if(void 0===n||!this.isDieInGrid(n.x,n.y))return void(this.wafermap.hoverDie=void 0)
|
|
13229
13254
|
const i=this.wafermap.diesTable.getChild("colIndex").toArray(),o=this.wafermap.diesTable.getChild("rowIndex").toArray()
|
|
13230
13255
|
for(let e=0;e<i.length;e++)if(i[e]===n.x&&o[e]===n.y)return void(this.wafermap.hoverDie={index:e,x:n.x,y:n.y})
|
|
13231
|
-
this.wafermap.hoverDie=void 0},this.onMouseOut=e=>{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(e){if(this.wafermap.isExperimentalUpdate()){const t=this.wafermap.originLocation,n=t===
|
|
13232
|
-
return{x:n(this.wafermap.computations.horizontalScale.invert(e.x-this.wafermap.computations.margin.left)),y:i(this.wafermap.computations.verticalScale.invert(e.y-this.wafermap.computations.margin.top))}}}isDieInGrid(e,t){return e>=this.wafermap.computations.gridMinX&&e<=this.wafermap.computations.gridMaxX&&t>=this.wafermap.computations.gridMinY&&t<=this.wafermap.computations.gridMaxY}}class
|
|
13256
|
+
this.wafermap.hoverDie=void 0},this.onMouseOut=e=>{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(e){if(this.wafermap.isExperimentalUpdate()){const t=this.wafermap.originLocation,n=t===tB||t===iB?Math.floor:Math.ceil,i=t===tB||t===nB?Math.ceil:Math.floor
|
|
13257
|
+
return{x:n(this.wafermap.computations.horizontalScale.invert(e.x-this.wafermap.computations.margin.left)),y:i(this.wafermap.computations.verticalScale.invert(e.y-this.wafermap.computations.margin.top))}}}isDieInGrid(e,t){return e>=this.wafermap.computations.gridMinX&&e<=this.wafermap.computations.gridMaxX&&t>=this.wafermap.computations.gridMinY&&t<=this.wafermap.computations.gridMaxY}}class bq{constructor(e){this.wafermap=e,this.scaleExtent=[1,100],this.minExtentPoint=[0,0],this.onWheelMove=e=>{e.preventDefault()},this.wafermapNotifier=m.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(){rH().on("zoom",null)(LL(this.wafermap)),this.wafermap.removeEventListener("wheel",this.onWheelMove)}handleChange(e,t){e!==this.wafermap||"canvasWidth"!==t&&"canvasHeight"!==t||this.createZoomBehavior()}createZoomBehavior(){rH().scaleExtent(this.scaleExtent).translateExtent([this.minExtentPoint,[this.wafermap.canvasWidth,this.wafermap.canvasHeight]]).on("zoom",(e=>{this.wafermap.transform=e.transform}))(LL(this.wafermap))}}class yq{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(e){this.wafermap=e,this.baseMarginPercentage=.04,this.fontSizeFactor=.8,this.colorScaleResolution=10}componentResizeUpdate(){const e={width:this.wafermap.canvasWidth,height:this.wafermap.canvasHeight},t=Math.min(e.width,e.height),n={top:(e.height-t)/2,right:(e.width-t)/2,bottom:(e.height-t)/2,left:(e.width-t)/2},i={top:t*this.baseMarginPercentage,right:t*this.baseMarginPercentage,bottom:t*this.baseMarginPercentage,left:t*this.baseMarginPercentage}
|
|
13233
13258
|
this._margin=this.calculateMarginAddition(i,n),this._containerDimensions=this.calculateContainerDimensions(e,this.margin),this.inputDataUpdate()}inputDataUpdate(){if(void 0===this._containerDimensions)return void this.componentResizeUpdate()
|
|
13234
13259
|
const e=Math.min(this._containerDimensions.width,this._containerDimensions.height)
|
|
13235
13260
|
this.gridDimensionsValidAndDefined()?this.setGridDimensionsFromBoundingBox():this.setGridDimensionsFromDies()
|
|
@@ -13237,27 +13262,27 @@ const t=this.wafermap.originLocation
|
|
|
13237
13262
|
this._horizontalScale=this.createHorizontalScale(t,e),this._verticalScale=this.createVerticalScale(t,e),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
|
|
13238
13263
|
const e=this.wafermap.diesTable.getChild("colIndex").toArray(),t=this.wafermap.diesTable.getChild("rowIndex").toArray(),n={x:e[0],y:t[0]},i={x:e[0],y:t[0]}
|
|
13239
13264
|
for(let o=0;o<e.length;o++)e[o]<n.x&&(n.x=e[o]),e[o]>i.x&&(i.x=e[o]),t[o]<n.y&&(n.y=t[o]),t[o]>i.y&&(i.y=t[o])
|
|
13240
|
-
this._gridMinX=n.x,this._gridMinY=n.y,this._gridMaxX=i.x,this._gridMaxY=i.y}calculateContainerDimensions(e,t){return{width:e.width-t.left-t.right,height:e.height-t.top-t.bottom}}createHorizontalScale(e,t){const n=
|
|
13241
|
-
return e===
|
|
13242
|
-
return e===
|
|
13265
|
+
this._gridMinX=n.x,this._gridMinY=n.y,this._gridMaxX=i.x,this._gridMaxY=i.y}calculateContainerDimensions(e,t){return{width:e.width-t.left-t.right,height:e.height-t.top-t.bottom}}createHorizontalScale(e,t){const n=QH()
|
|
13266
|
+
return e===tB||e===iB?n.domain([this._gridMinX,this._gridMaxX+1]).range([0,t]):n.domain([this._gridMinX-1,this._gridMaxX]).range([t,0])}createVerticalScale(e,t){const n=QH()
|
|
13267
|
+
return e===tB||e===nB?n.domain([this._gridMinY-1,this._gridMaxY]).range([t,0]):n.domain([this._gridMinY,this._gridMaxY+1]).range([0,t])}calculateMarginAddition(e,t){return{top:e.top+t.top,right:e.right+t.right,bottom:e.bottom+t.bottom,left:e.left+t.left}}calculateColorScale(){if(this.wafermap.colorScaleMode===aB){const e=this.wafermap.colorScale.values.map((e=>+e)),t=QH().domain(e).range(this.wafermap.colorScale.colors)
|
|
13243
13268
|
let n=e[0],i=e[0]
|
|
13244
13269
|
e.forEach((e=>{e<n&&(n=e),e>i&&(i=e)}))
|
|
13245
|
-
return
|
|
13270
|
+
return SH(n,i,(i-n)/(e.length*this.colorScaleResolution)).concat(i).map((e=>({color:t(e),value:e})))}return this.wafermap.colorScale.colors.map(((e,t)=>({color:e,value:+this.wafermap.colorScale.values[t]}))).sort(((e,t)=>e.value-t.value))}calculateLabelsFontSize(e,t){return Math.min(e.height,e.width/(.5*Math.max(2,t))*this.fontSizeFactor)}}class wq extends Vt{constructor(){super(...arguments),this.waferMapUpdateTracker=new pB(this.asRequiredFieldsWaferMap),this.originLocation=tB,this.gridMinX=void 0,this.gridMaxX=void 0,this.gridMinY=void 0,this.gridMaxY=void 0,this.orientation=oB,this.maxCharacters=4,this.dieLabelsHidden=!1,this.dieLabelsSuffix="",this.colorScaleMode=aB,this.computations=new yq(this.asRequiredFieldsWaferMap),this.dataManager=new dB(this.asRequiredFieldsWaferMap),this.workerRenderer=new gq(this.asRequiredFieldsWaferMap),this.renderer=new hB(this.asRequiredFieldsWaferMap),this.renderQueued=!1,this.transform=YV,this.hoverTransform="",this.hoverOpacity=rB,this.hoverWidth=0,this.hoverHeight=0,this.highlightedTags=[],this.dies=[],this.colorScale={colors:[],values:[]},this.hoverHandler=new class{constructor(e){this.wafermap=e,this.onMouseMove=e=>{if(this.wafermap.isExperimentalUpdate())return
|
|
13246
13271
|
const t={x:e.offsetX,y:e.offsetY}
|
|
13247
13272
|
if(!this.hoversOverDie(t))return void(this.wafermap.hoverDie=void 0)
|
|
13248
13273
|
const n=this.wafermap.transform.invert([t.x,t.y]),i=this.calculateDieCoordinates({x:n[0],y:n[1]})
|
|
13249
|
-
this.wafermap.hoverDie=void 0!==i?this.wafermap.dataManager.getWaferMapDie(i):void 0},this.onMouseOut=e=>{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(e){if(!this.wafermap.isExperimentalUpdate()){const t=this.wafermap.originLocation,n=t===
|
|
13274
|
+
this.wafermap.hoverDie=void 0!==i?this.wafermap.dataManager.getWaferMapDie(i):void 0},this.onMouseOut=e=>{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(e){if(!this.wafermap.isExperimentalUpdate()){const t=this.wafermap.originLocation,n=t===tB||t===iB?Math.floor:Math.ceil,i=t===tB||t===nB?Math.floor:Math.ceil
|
|
13250
13275
|
return{x:n(this.wafermap.dataManager.invertedHorizontalScale(e.x-this.wafermap.dataManager.margin.left)),y:i(this.wafermap.dataManager.invertedVerticalScale(e.y-this.wafermap.dataManager.margin.top))}}}hoversOverDie(e){const t=this.wafermap.canvasContext.getImageData(e.x,e.y,1,1).data
|
|
13251
13276
|
let n=0
|
|
13252
13277
|
for(const e of t)n+=e
|
|
13253
|
-
return n>0}}(this.asRequiredFieldsWaferMap),this.experimentalHoverHandler=new
|
|
13278
|
+
return n>0}}(this.asRequiredFieldsWaferMap),this.experimentalHoverHandler=new vq(this.asRequiredFieldsWaferMap),this.zoomHandler=new bq(this.asRequiredFieldsWaferMap),this.resizeObserver=this.createResizeObserver(),this.waferMapValidator=new GB(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()
|
|
13254
13279
|
const e=this.createSnapshot()
|
|
13255
13280
|
this.waferMapUpdateTracker.requiresWorkerWaferSetup&&await this.workerRenderer.setupWafer(e),await this.workerRenderer.drawWafer(e)}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}createSnapshot(){const e={width:this.canvasWidth??0,height:this.canvasHeight??0},t={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,o=this.dieLabelsHidden
|
|
13256
13281
|
if(void 0===this.diesTable)return{canvasDimensions:e,renderConfig:t,dieDimensions:n,transform:i,dieLabelsHidden:o,columnIndices:Int32Array.from([]),rowIndices:Int32Array.from([]),values:Float64Array.from([])}
|
|
13257
13282
|
return{canvasDimensions:e,renderConfig:t,columnIndices:this.diesTable.getChild("colIndex").toArray(),rowIndices:this.diesTable.getChild("rowIndex").toArray(),values:this.diesTable.getChild("value").toArray(),dieDimensions:n,transform:i,dieLabelsHidden:o}}validate(){this.waferMapValidator.validateGridDimensions(),this.waferMapValidator.validateDiesTableSchema()}createResizeObserver(){return new ResizeObserver((e=>{const t=e[0]
|
|
13258
13283
|
if(void 0===t)return
|
|
13259
13284
|
const{height:n,width:i}=t.contentRect
|
|
13260
|
-
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}}e([le({attribute:"origin-location"})],
|
|
13261
|
-
const
|
|
13262
|
-
yi.getOrCreate().withPrefix("nimble").register(
|
|
13285
|
+
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}}e([le({attribute:"origin-location"})],wq.prototype,"originLocation",void 0),e([le({attribute:"grid-min-x",converter:re})],wq.prototype,"gridMinX",void 0),e([le({attribute:"grid-max-x",converter:re})],wq.prototype,"gridMaxX",void 0),e([le({attribute:"grid-min-y",converter:re})],wq.prototype,"gridMinY",void 0),e([le({attribute:"grid-max-y",converter:re})],wq.prototype,"gridMaxY",void 0),e([le],wq.prototype,"orientation",void 0),e([le({attribute:"max-characters",converter:re})],wq.prototype,"maxCharacters",void 0),e([le({attribute:"die-labels-hidden",mode:"boolean"})],wq.prototype,"dieLabelsHidden",void 0),e([le({attribute:"die-labels-suffix"})],wq.prototype,"dieLabelsSuffix",void 0),e([le({attribute:"color-scale-mode"})],wq.prototype,"colorScaleMode",void 0),e([g],wq.prototype,"renderer",void 0),e([g],wq.prototype,"canvasWidth",void 0),e([g],wq.prototype,"canvasHeight",void 0),e([g],wq.prototype,"transform",void 0),e([g],wq.prototype,"hoverTransform",void 0),e([g],wq.prototype,"hoverOpacity",void 0),e([g],wq.prototype,"hoverWidth",void 0),e([g],wq.prototype,"hoverHeight",void 0),e([g],wq.prototype,"hoverDie",void 0),e([g],wq.prototype,"highlightedTags",void 0),e([g],wq.prototype,"dies",void 0),e([g],wq.prototype,"diesTable",void 0),e([g],wq.prototype,"colorScale",void 0)
|
|
13286
|
+
const xq=wq.compose({baseName:"wafer-map",template:aH,styles:lH})
|
|
13287
|
+
yi.getOrCreate().withPrefix("nimble").register(xq())}()
|
|
13263
13288
|
//# sourceMappingURL=all-components-bundle.min.js.map
|