openseadragondeltaemap
Version:
Draws overlay over a targetscan, and shows calibration info according to deltaE standards
1 lines • 63.9 kB
JavaScript
const t=function(){let t=Boolean(arguments.length);return Array.from(arguments).forEach(e=>{t=t&&"number"==typeof e&&Number.isFinite(e)}),t},e=function(t,e){const n=function(t,e){if(isNaN(t)||!Number.isInteger(e)||e<1)return"NaN";const n=Math.abs(t);if(0===n)return"0";if(n===1/0)return String(t);const r=Math.floor(Math.log(n)/Math.log(10));return function(t,e){return t<"1e-"+e&&t>"-1e-"+e?0:Number(Math.round(t+"e"+e)+"e-"+e)}(t/Math.pow(10,r),e-1)+"e"+r}(t,e);return Number(n)},n=function(t){return"object"==typeof t&&(t instanceof String||t instanceof Number||t instanceof Boolean)||"string"==typeof t||"number"==typeof t||"boolean"==typeof t||"bigint"==typeof t||"symbol"==typeof t},r=function(t){return t&&(t.getRootNode()instanceof Document||t.getRootNode()instanceof ShadowRoot)},i=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},a=new WeakMap,o=function(t,e){a.set(t,e)},s=function(t,e,n){if(this.name="Patch",this.element=document.createElement("deltaepatch"),t.name||(t.name="unnamed patch"),t&&t.location&&t.observed){if(this.element.style.left=100*t.location.x/n.w+"%",this.element.style.top=100*t.location.y/n.h+"%",this.element.style.width=100*t.location.w/n.w+"%",this.element.style.height=100*t.location.h/n.h+"%",e.appendChild(this.element),o(this.element,t),t.validity&&i(t.validity,"valid")){const e=t.validity.valid;this.element.classList.add(e?"valid":"invalid")}}else console.warn(`Bad DeltaE Patch data, for ${t.name} of ${t.targetName}`,t)},l=function(e,n,r){if(this.name="Chart",this.element=document.createElement("deltaechart"),e.name||(e.name="unnamed targetchart"),!e||!e.location||!e.observed)return void console.warn("Bad DeltaE Targetchart data, for "+e.name,e);if(this.element.style.left=100*e.location.x/r.w+"%",this.element.style.top=100*e.location.y/r.h+"%",this.element.style.width=100*e.location.w/r.w+"%",this.element.style.height=100*e.location.h/r.h+"%",e.location.r&&t(e.location.r)){this.element.style.transformOrigin="center center";const t=`rotate(${e.location.r}deg)`;this.element.style.transform=t}if(n.appendChild(this.element),o(this.element,e),e.validity&&i(e.validity,"valid")){const t=e.validity.valid;this.element.classList.add(t?"valid":"invalid")}this.patches=[];const a={w:e.location.w,h:e.location.h};e.colorPatches&&e.colorPatches.forEach(t=>{t.patchType="colorPatch",t.targetName=e.targetName,this.patches.push(new s(t,this.element,a))}),e.edgePatches&&e.edgePatches.forEach(t=>{t.patchType="edgePatch",t.targetName=e.targetName,this.patches.push(new s(t,this.element,a))})},u=t=>Boolean(t&&"string"==typeof t&&1===t.length),c=t=>u(t)&&Boolean(t.match(/[0-9]/)),h=t=>u(t)&&t.toLowerCase()!==t.toUpperCase(),f=t=>u(t)&&t===t.toLowerCase()&&t!==t.toUpperCase(),d=t=>u(t)&&t===t.toUpperCase()&&t!==t.toLowerCase(),p=(t,e)=>{const n=t.match(e);return n&&n[0]===t},m=(t,e)=>{const n=new RegExp("^"+e),r=new RegExp(e+"$"),i=new RegExp(e+e,"g");return t.replace(i,e).replace(i,e).replace(i,e).replace(n,"").replace(r,"")},g=t=>{const e=new RegExp("[\0-,-]");return t.trim().replace(/\s+/g," ").replace(e,"")},y=(t,e,n,r)=>{let i,a,o,s,l;return i=r.delimitLetterNumber&&h(t)&&c(e),a=r.delimitLowerUpper&&f(t)&&d(e),o=r.delimitNumberLetter&&c(t)&&h(e),s=r.delimitUpperLower&&d(t)&&f(e),l=r.delimitUpperUpperLower&&d(t)&&d(e)&&f(n),i||a||o||s||l},v={delimit:[],preserve:[],delimitInput:"",delimitLetterNumber:!0,delimitLowerUpper:!0,delimitNumberLetter:!0,delimitUpperLower:!1,delimitUpperUpperLower:!0,delimitOutput:" "},w={preprocess:t=>t,postProcess:t=>t,firstWordFirstChar:t=>t,firstWordNextChars:t=>t,nextWordsFirstChar:t=>t,nextWordsNextChars:t=>t};class b{static foldReplacing(t="",e=""){return this._fold(t,()=>e)}static foldMaintaining(t=""){return this._fold(t,t=>t)}static _fold(t,e){if(null===t)return"";if("number"==typeof t)return""+t;if("string"!=typeof t)throw new Error("Invalid input data type");return t.split("").map(t=>{if(t.charCodeAt(0)<128)return t;{const n=this.mapping.get(t.charCodeAt(0));return void 0===n?e(t):n}}).join("")}}b.mapping=new Map([[192,"A"],[193,"A"],[194,"A"],[195,"A"],[196,"A"],[197,"A"],[256,"A"],[258,"A"],[260,"A"],[399,"A"],[461,"A"],[478,"A"],[480,"A"],[506,"A"],[512,"A"],[514,"A"],[550,"A"],[570,"A"],[7424,"A"],[7680,"A"],[7840,"A"],[7842,"A"],[7844,"A"],[7846,"A"],[7848,"A"],[7850,"A"],[7852,"A"],[7854,"A"],[7856,"A"],[7858,"A"],[7860,"A"],[7862,"A"],[9398,"A"],[65313,"A"],[224,"a"],[225,"a"],[226,"a"],[227,"a"],[228,"a"],[229,"a"],[257,"a"],[259,"a"],[261,"a"],[462,"a"],[479,"a"],[481,"a"],[507,"a"],[513,"a"],[515,"a"],[551,"a"],[592,"a"],[601,"a"],[602,"a"],[7567,"a"],[7573,"a"],[7681,"a"],[7834,"a"],[7841,"a"],[7843,"a"],[7845,"a"],[7847,"a"],[7849,"a"],[7851,"a"],[7853,"a"],[7855,"a"],[7857,"a"],[7859,"a"],[7861,"a"],[7863,"a"],[8336,"a"],[8340,"a"],[9424,"a"],[11365,"a"],[11375,"a"],[65345,"a"],[42802,"AA"],[198,"AE"],[482,"AE"],[508,"AE"],[7425,"AE"],[42804,"AO"],[42806,"AU"],[42808,"AV"],[42810,"AV"],[42812,"AY"],[9372,"(a)"],[42803,"aa"],[230,"ae"],[483,"ae"],[509,"ae"],[7426,"ae"],[42805,"ao"],[42807,"au"],[42809,"av"],[42811,"av"],[42813,"ay"],[385,"B"],[386,"B"],[579,"B"],[665,"B"],[7427,"B"],[7682,"B"],[7684,"B"],[7686,"B"],[9399,"B"],[65314,"B"],[384,"b"],[387,"b"],[595,"b"],[7532,"b"],[7552,"b"],[7683,"b"],[7685,"b"],[7687,"b"],[9425,"b"],[65346,"b"],[9373,"(b)"],[199,"C"],[262,"C"],[264,"C"],[266,"C"],[268,"C"],[391,"C"],[571,"C"],[663,"C"],[7428,"C"],[7688,"C"],[9400,"C"],[65315,"C"],[231,"c"],[263,"c"],[265,"c"],[267,"c"],[269,"c"],[392,"c"],[572,"c"],[597,"c"],[7689,"c"],[8580,"c"],[9426,"c"],[42814,"c"],[42815,"c"],[65347,"c"],[9374,"(c)"],[208,"D"],[270,"D"],[272,"D"],[393,"D"],[394,"D"],[395,"D"],[7429,"D"],[7430,"D"],[7690,"D"],[7692,"D"],[7694,"D"],[7696,"D"],[7698,"D"],[9401,"D"],[42873,"D"],[65316,"D"],[240,"d"],[271,"d"],[273,"d"],[396,"d"],[545,"d"],[598,"d"],[599,"d"],[7533,"d"],[7553,"d"],[7569,"d"],[7691,"d"],[7693,"d"],[7695,"d"],[7697,"d"],[7699,"d"],[9427,"d"],[42874,"d"],[65348,"d"],[452,"DZ"],[497,"DZ"],[453,"Dz"],[498,"Dz"],[9375,"(d)"],[568,"db"],[454,"dz"],[499,"dz"],[675,"dz"],[677,"dz"],[200,"E"],[201,"E"],[202,"E"],[203,"E"],[274,"E"],[276,"E"],[278,"E"],[280,"E"],[282,"E"],[398,"E"],[400,"E"],[516,"E"],[518,"E"],[552,"E"],[582,"E"],[7431,"E"],[7700,"E"],[7702,"E"],[7704,"E"],[7706,"E"],[7708,"E"],[7864,"E"],[7866,"E"],[7868,"E"],[7870,"E"],[7872,"E"],[7874,"E"],[7876,"E"],[7878,"E"],[9402,"E"],[11387,"E"],[65317,"E"],[232,"e"],[233,"e"],[234,"e"],[235,"e"],[275,"e"],[277,"e"],[279,"e"],[281,"e"],[283,"e"],[477,"e"],[517,"e"],[519,"e"],[553,"e"],[583,"e"],[600,"e"],[603,"e"],[604,"e"],[605,"e"],[606,"e"],[666,"e"],[7432,"e"],[7570,"e"],[7571,"e"],[7572,"e"],[7701,"e"],[7703,"e"],[7705,"e"],[7707,"e"],[7709,"e"],[7865,"e"],[7867,"e"],[7869,"e"],[7871,"e"],[7873,"e"],[7875,"e"],[7877,"e"],[7879,"e"],[8337,"e"],[9428,"e"],[11384,"e"],[65349,"e"],[9376,"(e)"],[401,"F"],[7710,"F"],[9403,"F"],[42800,"F"],[42875,"F"],[43003,"F"],[65318,"F"],[402,"f"],[7534,"f"],[7554,"f"],[7711,"f"],[7835,"f"],[9429,"f"],[42876,"f"],[65350,"f"],[9377,"(f)"],[64256,"ff"],[64259,"ffi"],[64260,"ffl"],[64257,"fi"],[64258,"fl"],[284,"G"],[286,"G"],[288,"G"],[290,"G"],[403,"G"],[484,"G"],[485,"G"],[486,"G"],[487,"G"],[500,"G"],[610,"G"],[667,"G"],[7712,"G"],[9404,"G"],[42877,"G"],[42878,"G"],[65319,"G"],[285,"g"],[287,"g"],[289,"g"],[291,"g"],[501,"g"],[608,"g"],[609,"g"],[7543,"g"],[7545,"g"],[7555,"g"],[7713,"g"],[9430,"g"],[42879,"g"],[65351,"g"],[9378,"(g)"],[292,"H"],[294,"H"],[542,"H"],[668,"H"],[7714,"H"],[7716,"H"],[7718,"H"],[7720,"H"],[7722,"H"],[9405,"H"],[11367,"H"],[11381,"H"],[65320,"H"],[293,"h"],[295,"h"],[543,"h"],[613,"h"],[614,"h"],[686,"h"],[687,"h"],[7715,"h"],[7717,"h"],[7719,"h"],[7721,"h"],[7723,"h"],[7830,"h"],[9431,"h"],[11368,"h"],[11382,"h"],[65352,"h"],[502,"HV"],[9379,"(h)"],[405,"hv"],[204,"I"],[205,"I"],[206,"I"],[207,"I"],[296,"I"],[298,"I"],[300,"I"],[302,"I"],[304,"I"],[406,"I"],[407,"I"],[463,"I"],[520,"I"],[522,"I"],[618,"I"],[7547,"I"],[7724,"I"],[7726,"I"],[7880,"I"],[7882,"I"],[9406,"I"],[43006,"I"],[65321,"I"],[236,"i"],[237,"i"],[238,"i"],[239,"i"],[297,"i"],[299,"i"],[301,"i"],[303,"i"],[305,"i"],[464,"i"],[521,"i"],[523,"i"],[616,"i"],[7433,"i"],[7522,"i"],[7548,"i"],[7574,"i"],[7725,"i"],[7727,"i"],[7881,"i"],[7883,"i"],[8305,"i"],[9432,"i"],[65353,"i"],[306,"IJ"],[9380,"(i)"],[307,"ij"],[308,"J"],[584,"J"],[7434,"J"],[9407,"J"],[65322,"J"],[309,"j"],[496,"j"],[567,"j"],[585,"j"],[607,"j"],[644,"j"],[669,"j"],[9433,"j"],[11388,"j"],[65354,"j"],[9381,"(j)"],[310,"K"],[408,"K"],[488,"K"],[7435,"K"],[7728,"K"],[7730,"K"],[7732,"K"],[9408,"K"],[11369,"K"],[42816,"K"],[42818,"K"],[42820,"K"],[65323,"K"],[311,"k"],[409,"k"],[489,"k"],[670,"k"],[7556,"k"],[7729,"k"],[7731,"k"],[7733,"k"],[9434,"k"],[11370,"k"],[42817,"k"],[42819,"k"],[42821,"k"],[65355,"k"],[9382,"(k)"],[313,"L"],[315,"L"],[317,"L"],[319,"L"],[321,"L"],[573,"L"],[671,"L"],[7436,"L"],[7734,"L"],[7736,"L"],[7738,"L"],[7740,"L"],[9409,"L"],[11360,"L"],[11362,"L"],[42822,"L"],[42824,"L"],[42880,"L"],[65324,"L"],[314,"l"],[316,"l"],[318,"l"],[320,"l"],[322,"l"],[410,"l"],[564,"l"],[619,"l"],[620,"l"],[621,"l"],[7557,"l"],[7735,"l"],[7737,"l"],[7739,"l"],[7741,"l"],[9435,"l"],[11361,"l"],[42823,"l"],[42825,"l"],[42881,"l"],[65356,"l"],[455,"LJ"],[7930,"LL"],[456,"Lj"],[9383,"(l)"],[457,"lj"],[7931,"ll"],[682,"ls"],[683,"lz"],[412,"M"],[7437,"M"],[7742,"M"],[7744,"M"],[7746,"M"],[9410,"M"],[11374,"M"],[43005,"M"],[43007,"M"],[65325,"M"],[623,"m"],[624,"m"],[625,"m"],[7535,"m"],[7558,"m"],[7743,"m"],[7745,"m"],[7747,"m"],[9436,"m"],[65357,"m"],[9384,"(m)"],[209,"N"],[323,"N"],[325,"N"],[327,"N"],[330,"N"],[413,"N"],[504,"N"],[544,"N"],[628,"N"],[7438,"N"],[7748,"N"],[7750,"N"],[7752,"N"],[7754,"N"],[9411,"N"],[65326,"N"],[241,"n"],[324,"n"],[326,"n"],[328,"n"],[329,"n"],[331,"n"],[414,"n"],[505,"n"],[565,"n"],[626,"n"],[627,"n"],[7536,"n"],[7559,"n"],[7749,"n"],[7751,"n"],[7753,"n"],[7755,"n"],[8319,"n"],[9437,"n"],[65358,"n"],[458,"NJ"],[459,"Nj"],[9385,"(n)"],[460,"nj"],[210,"O"],[211,"O"],[212,"O"],[213,"O"],[214,"O"],[216,"O"],[332,"O"],[334,"O"],[336,"O"],[390,"O"],[415,"O"],[416,"O"],[465,"O"],[490,"O"],[492,"O"],[510,"O"],[524,"O"],[526,"O"],[554,"O"],[556,"O"],[558,"O"],[560,"O"],[7439,"O"],[7440,"O"],[7756,"O"],[7758,"O"],[7760,"O"],[7762,"O"],[7884,"O"],[7886,"O"],[7888,"O"],[7890,"O"],[7892,"O"],[7894,"O"],[7896,"O"],[7898,"O"],[7900,"O"],[7902,"O"],[7904,"O"],[7906,"O"],[9412,"O"],[42826,"O"],[42828,"O"],[65327,"O"],[242,"o"],[243,"o"],[244,"o"],[245,"o"],[246,"o"],[248,"o"],[333,"o"],[335,"o"],[337,"o"],[417,"o"],[466,"o"],[491,"o"],[493,"o"],[511,"o"],[525,"o"],[527,"o"],[555,"o"],[557,"o"],[559,"o"],[561,"o"],[596,"o"],[629,"o"],[7446,"o"],[7447,"o"],[7575,"o"],[7757,"o"],[7759,"o"],[7761,"o"],[7763,"o"],[7885,"o"],[7887,"o"],[7889,"o"],[7891,"o"],[7893,"o"],[7895,"o"],[7897,"o"],[7899,"o"],[7901,"o"],[7903,"o"],[7905,"o"],[7907,"o"],[8338,"o"],[9438,"o"],[11386,"o"],[42827,"o"],[42829,"o"],[65359,"o"],[338,"OE"],[630,"OE"],[42830,"OO"],[546,"OU"],[7445,"OU"],[9386,"(o)"],[339,"oe"],[7444,"oe"],[42831,"oo"],[547,"ou"],[420,"P"],[7448,"P"],[7764,"P"],[7766,"P"],[9413,"P"],[11363,"P"],[42832,"P"],[42834,"P"],[42836,"P"],[65328,"P"],[421,"p"],[7537,"p"],[7549,"p"],[7560,"p"],[7765,"p"],[7767,"p"],[9439,"p"],[42833,"p"],[42835,"p"],[42837,"p"],[43004,"p"],[65360,"p"],[9387,"(p)"],[586,"Q"],[9414,"Q"],[42838,"Q"],[42840,"Q"],[65329,"Q"],[312,"q"],[587,"q"],[672,"q"],[9440,"q"],[42839,"q"],[42841,"q"],[65361,"q"],[9388,"(q)"],[569,"qp"],[340,"R"],[342,"R"],[344,"R"],[528,"R"],[530,"R"],[588,"R"],[640,"R"],[641,"R"],[7449,"R"],[7450,"R"],[7768,"R"],[7770,"R"],[7772,"R"],[7774,"R"],[9415,"R"],[11364,"R"],[42842,"R"],[42882,"R"],[65330,"R"],[341,"r"],[343,"r"],[345,"r"],[529,"r"],[531,"r"],[589,"r"],[636,"r"],[637,"r"],[638,"r"],[639,"r"],[7523,"r"],[7538,"r"],[7539,"r"],[7561,"r"],[7769,"r"],[7771,"r"],[7773,"r"],[7775,"r"],[9441,"r"],[42843,"r"],[42883,"r"],[65362,"r"],[9389,"(r)"],[346,"S"],[348,"S"],[350,"S"],[352,"S"],[536,"S"],[7776,"S"],[7778,"S"],[7780,"S"],[7782,"S"],[7784,"S"],[9416,"S"],[42801,"S"],[42885,"S"],[65331,"S"],[347,"s"],[349,"s"],[351,"s"],[353,"s"],[383,"s"],[537,"s"],[575,"s"],[642,"s"],[7540,"s"],[7562,"s"],[7777,"s"],[7779,"s"],[7781,"s"],[7783,"s"],[7785,"s"],[7836,"s"],[7837,"s"],[9442,"s"],[42884,"s"],[65363,"s"],[7838,"SS"],[9390,"(s)"],[223,"ss"],[64262,"st"],[354,"T"],[356,"T"],[358,"T"],[428,"T"],[430,"T"],[538,"T"],[574,"T"],[7451,"T"],[7786,"T"],[7788,"T"],[7790,"T"],[7792,"T"],[9417,"T"],[42886,"T"],[65332,"T"],[355,"t"],[357,"t"],[359,"t"],[427,"t"],[429,"t"],[539,"t"],[566,"t"],[647,"t"],[648,"t"],[7541,"t"],[7787,"t"],[7789,"t"],[7791,"t"],[7793,"t"],[7831,"t"],[9443,"t"],[11366,"t"],[65364,"t"],[222,"TH"],[42854,"TH"],[42792,"TZ"],[9391,"(t)"],[680,"tc"],[254,"th"],[7546,"th"],[42855,"th"],[678,"ts"],[42793,"tz"],[217,"U"],[218,"U"],[219,"U"],[220,"U"],[360,"U"],[362,"U"],[364,"U"],[366,"U"],[368,"U"],[370,"U"],[431,"U"],[467,"U"],[469,"U"],[471,"U"],[473,"U"],[475,"U"],[532,"U"],[534,"U"],[580,"U"],[7452,"U"],[7550,"U"],[7794,"U"],[7796,"U"],[7798,"U"],[7800,"U"],[7802,"U"],[7908,"U"],[7910,"U"],[7912,"U"],[7914,"U"],[7916,"U"],[7918,"U"],[7920,"U"],[9418,"U"],[65333,"U"],[249,"u"],[250,"u"],[251,"u"],[252,"u"],[361,"u"],[363,"u"],[365,"u"],[367,"u"],[369,"u"],[371,"u"],[432,"u"],[468,"u"],[470,"u"],[472,"u"],[474,"u"],[476,"u"],[533,"u"],[535,"u"],[649,"u"],[7524,"u"],[7577,"u"],[7795,"u"],[7797,"u"],[7799,"u"],[7801,"u"],[7803,"u"],[7909,"u"],[7911,"u"],[7913,"u"],[7915,"u"],[7917,"u"],[7919,"u"],[7921,"u"],[9444,"u"],[65365,"u"],[9392,"(u)"],[7531,"ue"],[434,"V"],[581,"V"],[7456,"V"],[7804,"V"],[7806,"V"],[7932,"V"],[9419,"V"],[42846,"V"],[42856,"V"],[65334,"V"],[651,"v"],[652,"v"],[7525,"v"],[7564,"v"],[7805,"v"],[7807,"v"],[9445,"v"],[11377,"v"],[11380,"v"],[42847,"v"],[65366,"v"],[42848,"VY"],[9393,"(v)"],[42849,"vy"],[372,"W"],[503,"W"],[7457,"W"],[7808,"W"],[7810,"W"],[7812,"W"],[7814,"W"],[7816,"W"],[9420,"W"],[11378,"W"],[65335,"W"],[373,"w"],[447,"w"],[653,"w"],[7809,"w"],[7811,"w"],[7813,"w"],[7815,"w"],[7817,"w"],[7832,"w"],[9446,"w"],[11379,"w"],[65367,"w"],[9394,"(w)"],[7818,"X"],[7820,"X"],[9421,"X"],[65336,"X"],[7565,"x"],[7819,"x"],[7821,"x"],[8339,"x"],[9447,"x"],[65368,"x"],[9395,"(x)"],[221,"Y"],[374,"Y"],[376,"Y"],[435,"Y"],[562,"Y"],[590,"Y"],[655,"Y"],[7822,"Y"],[7922,"Y"],[7924,"Y"],[7926,"Y"],[7928,"Y"],[7934,"Y"],[9422,"Y"],[65337,"Y"],[253,"y"],[255,"y"],[375,"y"],[436,"y"],[563,"y"],[591,"y"],[654,"y"],[7823,"y"],[7833,"y"],[7923,"y"],[7925,"y"],[7927,"y"],[7929,"y"],[7935,"y"],[9448,"y"],[65369,"y"],[9396,"(y)"],[377,"Z"],[379,"Z"],[381,"Z"],[437,"Z"],[540,"Z"],[548,"Z"],[7458,"Z"],[7824,"Z"],[7826,"Z"],[7828,"Z"],[9423,"Z"],[11371,"Z"],[42850,"Z"],[65338,"Z"],[378,"z"],[380,"z"],[382,"z"],[438,"z"],[541,"z"],[549,"z"],[576,"z"],[656,"z"],[657,"z"],[7542,"z"],[7566,"z"],[7825,"z"],[7827,"z"],[7829,"z"],[9449,"z"],[11372,"z"],[42851,"z"],[65370,"z"],[9397,"(z)"],[8304,"0"],[8320,"0"],[9450,"0"],[9471,"0"],[65296,"0"],[185,"1"],[8321,"1"],[9312,"1"],[9461,"1"],[10102,"1"],[10112,"1"],[10122,"1"],[65297,"1"],[9352,"1."],[9332,"(1)"],[178,"2"],[8322,"2"],[9313,"2"],[9462,"2"],[10103,"2"],[10113,"2"],[10123,"2"],[65298,"2"],[9353,"2."],[9333,"(2)"],[179,"3"],[8323,"3"],[9314,"3"],[9463,"3"],[10104,"3"],[10114,"3"],[10124,"3"],[65299,"3"],[9354,"3."],[9334,"(3)"],[8308,"4"],[8324,"4"],[9315,"4"],[9464,"4"],[10105,"4"],[10115,"4"],[10125,"4"],[65300,"4"],[9355,"4."],[9335,"(4)"],[8309,"5"],[8325,"5"],[9316,"5"],[9465,"5"],[10106,"5"],[10116,"5"],[10126,"5"],[65301,"5"],[9356,"5."],[9336,"(5)"],[8310,"6"],[8326,"6"],[9317,"6"],[9466,"6"],[10107,"6"],[10117,"6"],[10127,"6"],[65302,"6"],[9357,"6."],[9337,"(6)"],[8311,"7"],[8327,"7"],[9318,"7"],[9467,"7"],[10108,"7"],[10118,"7"],[10128,"7"],[65303,"7"],[9358,"7."],[9338,"(7)"],[8312,"8"],[8328,"8"],[9319,"8"],[9468,"8"],[10109,"8"],[10119,"8"],[10129,"8"],[65304,"8"],[9359,"8."],[9339,"(8)"],[8313,"9"],[8329,"9"],[9320,"9"],[9469,"9"],[10110,"9"],[10120,"9"],[10130,"9"],[65305,"9"],[9360,"9."],[9340,"(9)"],[9321,"10"],[9470,"10"],[10111,"10"],[10121,"10"],[10131,"10"],[9361,"10."],[9341,"(10)"],[9322,"11"],[9451,"11"],[9362,"11."],[9342,"(11)"],[9323,"12"],[9452,"12"],[9363,"12."],[9343,"(12)"],[9324,"13"],[9453,"13"],[9364,"13."],[9344,"(13)"],[9325,"14"],[9454,"14"],[9365,"14."],[9345,"(14)"],[9326,"15"],[9455,"15"],[9366,"15."],[9346,"(15)"],[9327,"16"],[9456,"16"],[9367,"16."],[9347,"(16)"],[9328,"17"],[9457,"17"],[9368,"17."],[9348,"(17)"],[9329,"18"],[9458,"18"],[9369,"18."],[9349,"(18)"],[9330,"19"],[9459,"19"],[9370,"19."],[9350,"(19)"],[9331,"20"],[9460,"20"],[9371,"20."],[9351,"(20)"],[171,'"'],[187,'"'],[8220,'"'],[8221,'"'],[8222,'"'],[8243,'"'],[8246,'"'],[10077,'"'],[10078,'"'],[10094,'"'],[10095,'"'],[65282,'"'],[8216,"'"],[8217,"'"],[8218,"'"],[8219,"'"],[8242,"'"],[8245,"'"],[8249,"'"],[8250,"'"],[10075,"'"],[10076,"'"],[65287,"'"],[8208,"-"],[8209,"-"],[8210,"-"],[8211,"-"],[8212,"-"],[8315,"-"],[8331,"-"],[65293,"-"],[8261,"["],[10098,"["],[65339,"["],[8262,"]"],[10099,"]"],[65341,"]"],[8317,"("],[8333,"("],[10088,"("],[10090,"("],[65288,"("],[11816,"(("],[8318,")"],[8334,")"],[10089,")"],[10091,")"],[65289,")"],[11817,"))"],[10092,"<"],[10096,"<"],[65308,"<"],[10093,">"],[10097,">"],[65310,">"],[10100,"{"],[65371,"{"],[10101,"}"],[65373,"}"],[8314,"+"],[8330,"+"],[65291,"+"],[8316,"="],[8332,"="],[65309,"="],[65281,"!"],[8252,"!!"],[8265,"!?"],[65283,"#"],[65284,"$"],[8274,"%"],[65285,"%"],[65286,"&"],[8270,"*"],[65290,"*"],[65292,","],[65294,"."],[8260,"/"],[65295,"/"],[65306,":"],[8271,";"],[65307,";"],[65311,"?"],[8263,"??"],[8264,"?!"],[65312,"@"],[65340,"\\"],[8248,"^"],[65342,"^"],[65343,"_"],[8275,"~"],[65374,"~"]]);var x=b;const _=t=>t.toLowerCase(),M=t=>t.toUpperCase(),N=function(t,e){const n=n=>{const r=t.map((t,r)=>{t=n.preprocess(t,n.delimitOutput);const i=e.preserve.some(e=>p(t,e));return 0===r?i?t:n.firstWordFirstChar(t.substr(0,1))+n.firstWordNextChars(t.substr(1)):i?t:n.nextWordsFirstChar(t.substr(0,1))+n.nextWordsNextChars(t.substr(1))}).join(n.delimitOutput);return n.postProcess(r,n.delimitOutput)},r={preprocess:function(t,e){return((t,e)=>{const n="…,:;[\\](){}\\-‐–—'\".!?".replace("\\"+e,"").replace(e,""),r=new RegExp("(\\D)[…,:;[\\](){}\\-‐–—'\".!?](\\D)","g"),i=new RegExp("^[…,:;[\\](){}\\-‐–—'\".!?]",""),a=new RegExp("[…,:;[\\](){}\\-‐–—'\".!?]$",""),o=new RegExp("(\\d)["+n+"](\\d)","g");return(t=(t=(t=(t=t.replace(r,"$1$2")).replace(r,"$1$2")).replace(o,"$1$2")).replace(i,"")).replace(a,"")})(t=(t=((t,e)=>{const n="-:,./".replace(e,""),r=new RegExp("(\\d)["+n+"](\\d)","g"),i=e||"_";return t.match(r)?t.replace(r,`$1${i}$2`).replace(r,`$1${i}$2`):t})(t,e)).replace(/‘’`/g,"'").replace(/“”/g,'"'),e)},postProcess:function(t,e){return(t=>x.foldReplacing(t))(t)}},i=(t,e)=>{const i=Object.assign({},w,r,{delimitOutput:"",firstWordFirstChar:t,firstWordNextChars:_,nextWordsFirstChar:e,nextWordsNextChars:_});return n(i)},a=t=>{const e=Object.assign({},w,r,{delimitOutput:t,firstWordFirstChar:_,firstWordNextChars:_,nextWordsFirstChar:_,nextWordsNextChars:_});return n(e)};return{camelCase:()=>i(_,M),pascalCase:()=>i(M,M),humanSentence:()=>{const t=Object.assign({},w,{delimitOutput:" ",firstWordFirstChar:M,firstWordNextChars:_,nextWordsFirstChar:_,nextWordsNextChars:_});return n(t)},humanTitle:()=>{const t=Object.assign({},w,{delimitOutput:" ",firstWordFirstChar:M,nextWordsFirstChar:M});return n(t)},dotCase:()=>a("."),paramCase:()=>a("-"),pathCase:()=>a("/"),searchCase:()=>a("+"),snakeCase:()=>a("_"),spaceCase:()=>a(" "),constantCase:()=>{const t=Object.assign({},w,r,{delimitOutput:"_",firstWordFirstChar:M,firstWordNextChars:M,nextWordsFirstChar:M,nextWordsNextChars:M});return n(t)},headerCase:()=>{const t=Object.assign({},w,r,{delimitOutput:"-",firstWordFirstChar:M,firstWordNextChars:_,nextWordsFirstChar:M,nextWordsNextChars:_});return n(t)}}},A=function(t,e){if(!t)return;let n={};const r=Object.assign({},v,e);var i;n.orgin={input:t},r.delimitInput?n.orgin.standardised=m(g(t),r.delimitInput):n.orgin.standardised=g(t),n.orgin.isAlphaNumeric=(i=n.orgin.standardised)&&i.split&&!i.split("").some(t=>!(h(t)||c(t)));let a,o=n.orgin.standardised;a=n.orgin.isAlphaNumeric?r.delimitOutput:r.delimitInput||r.delimitOutput;const s=[].concat(r.preserve,r.delimit);if(s.length&&(o=((t,e,n)=>{let r=new Array(t.length);return r.fill(!0),e.forEach(e=>{Array.from(t.matchAll(e)).reverse().forEach(e=>{const i=e.index+e[0].length;let a=!0;for(let t=e.index;t<i;t++)a=a&&r[t];if(a){const a=t.substr(0,e.index),o=t.substr(i);t=a+n+e[0]+n+o;for(let t=e.index;t<i;t++)r[t]=!1;for(let t=0;t<2*n.length;t++)r.splice(i,0,!1);console.assert(r.length===t.length,`mask (${r.length}) updated according line (${t},\n ${t.length})`)}})}),t=m(t,n)})(o,s,a)),n.orgin.isAlphaNumeric){let t=o.split(a);n.phrase=t.map(t=>r.preserve.some(e=>p(t,e))?t:((t,e)=>{let n=t[0];for(let r=1;r<t.length;r++)y(t[r-1],t[r],t[r+1]||"",e)&&(n+=e.delimitOutput),n+=t[r];return n})(t,r)).join(a),n.words=n.phrase.split(a)}else n.phrase=o,n.words=o.split(a);return Object.assign(n,N(n.words,r))};function E(t,e){return e||(e={}),A(t,e)}const C=t=>["",null,void 0].includes(t);function k(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}var O,L,S=(1===(O=k).length&&(L=O,O=function(t,e){return k(L(t),e)}),{left:function(t,e,n,r){for(null==n&&(n=0),null==r&&(r=t.length);n<r;){var i=n+r>>>1;O(t[i],e)<0?n=i+1:r=i}return n},right:function(t,e,n,r){for(null==n&&(n=0),null==r&&(r=t.length);n<r;){var i=n+r>>>1;O(t[i],e)>0?r=i:n=i+1}return n}}).right;var T=Math.sqrt(50),R=Math.sqrt(10),$=Math.sqrt(2);function U(t,e,n){var r=(e-t)/Math.max(0,n),i=Math.floor(Math.log(r)/Math.LN10),a=r/Math.pow(10,i);return i>=0?(a>=T?10:a>=R?5:a>=$?2:1)*Math.pow(10,i):-Math.pow(10,-i)/(a>=T?10:a>=R?5:a>=$?2:1)}var z=Array.prototype.slice;function j(t){return t}function P(t){return"translate("+(t+.5)+",0)"}function H(t){return"translate(0,"+(t+.5)+")"}function D(t){return function(e){return+t(e)}}function I(t){var e=Math.max(0,t.bandwidth()-1)/2;return t.round()&&(e=Math.round(e)),function(n){return+t(n)+e}}function W(){return!this.__axis}function F(t,e){var n=[],r=null,i=null,a=6,o=6,s=3,l=1===t||4===t?-1:1,u=4===t||2===t?"x":"y",c=1===t||3===t?P:H;function h(h){var f=null==r?e.ticks?e.ticks.apply(e,n):e.domain():r,d=null==i?e.tickFormat?e.tickFormat.apply(e,n):j:i,p=Math.max(a,0)+s,m=e.range(),g=+m[0]+.5,y=+m[m.length-1]+.5,v=(e.bandwidth?I:D)(e.copy()),w=h.selection?h.selection():h,b=w.selectAll(".domain").data([null]),x=w.selectAll(".tick").data(f,e).order(),_=x.exit(),M=x.enter().append("g").attr("class","tick"),N=x.select("line"),A=x.select("text");b=b.merge(b.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),x=x.merge(M),N=N.merge(M.append("line").attr("stroke","currentColor").attr(u+"2",l*a)),A=A.merge(M.append("text").attr("fill","currentColor").attr(u,l*p).attr("dy",1===t?"0em":3===t?"0.71em":"0.32em")),h!==w&&(b=b.transition(h),x=x.transition(h),N=N.transition(h),A=A.transition(h),_=_.transition(h).attr("opacity",1e-6).attr("transform",(function(t){return isFinite(t=v(t))?c(t):this.getAttribute("transform")})),M.attr("opacity",1e-6).attr("transform",(function(t){var e=this.parentNode.__axis;return c(e&&isFinite(e=e(t))?e:v(t))}))),_.remove(),b.attr("d",4===t||2==t?o?"M"+l*o+","+g+"H0.5V"+y+"H"+l*o:"M0.5,"+g+"V"+y:o?"M"+g+","+l*o+"V0.5H"+y+"V"+l*o:"M"+g+",0.5H"+y),x.attr("opacity",1).attr("transform",(function(t){return c(v(t))})),N.attr(u+"2",l*a),A.attr(u,l*p).text(d),w.filter(W).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",2===t?"start":4===t?"end":"middle"),w.each((function(){this.__axis=v}))}return h.scale=function(t){return arguments.length?(e=t,h):e},h.ticks=function(){return n=z.call(arguments),h},h.tickArguments=function(t){return arguments.length?(n=null==t?[]:z.call(t),h):n.slice()},h.tickValues=function(t){return arguments.length?(r=null==t?null:z.call(t),h):r&&r.slice()},h.tickFormat=function(t){return arguments.length?(i=t,h):i},h.tickSize=function(t){return arguments.length?(a=o=+t,h):a},h.tickSizeInner=function(t){return arguments.length?(a=+t,h):a},h.tickSizeOuter=function(t){return arguments.length?(o=+t,h):o},h.tickPadding=function(t){return arguments.length?(s=+t,h):s},h}var q="http://www.w3.org/1999/xhtml",B={svg:"http://www.w3.org/2000/svg",xhtml:q,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function V(t){var e=t+="",n=e.indexOf(":");return n>=0&&"xmlns"!==(e=t.slice(0,n))&&(t=t.slice(n+1)),B.hasOwnProperty(e)?{space:B[e],local:t}:t}function Y(t){return function(){var e=this.ownerDocument,n=this.namespaceURI;return n===q&&e.documentElement.namespaceURI===q?e.createElement(t):e.createElementNS(n,t)}}function G(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function Z(t){var e=V(t);return(e.local?G:Y)(e)}function K(){}function J(t){return null==t?K:function(){return this.querySelector(t)}}function X(){return[]}function Q(t){return new Array(t.length)}function tt(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}tt.prototype={constructor:tt,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,e){return this._parent.insertBefore(t,e)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}};function et(t,e,n,r,i,a){for(var o,s=0,l=e.length,u=a.length;s<u;++s)(o=e[s])?(o.__data__=a[s],r[s]=o):n[s]=new tt(t,a[s]);for(;s<l;++s)(o=e[s])&&(i[s]=o)}function nt(t,e,n,r,i,a,o){var s,l,u,c={},h=e.length,f=a.length,d=new Array(h);for(s=0;s<h;++s)(l=e[s])&&(d[s]=u="$"+o.call(l,l.__data__,s,e),u in c?i[s]=l:c[u]=l);for(s=0;s<f;++s)(l=c[u="$"+o.call(t,a[s],s,a)])?(r[s]=l,l.__data__=a[s],c[u]=null):n[s]=new tt(t,a[s]);for(s=0;s<h;++s)(l=e[s])&&c[d[s]]===l&&(i[s]=l)}function rt(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}function it(t){return function(){this.removeAttribute(t)}}function at(t){return function(){this.removeAttributeNS(t.space,t.local)}}function ot(t,e){return function(){this.setAttribute(t,e)}}function st(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function lt(t,e){return function(){var n=e.apply(this,arguments);null==n?this.removeAttribute(t):this.setAttribute(t,n)}}function ut(t,e){return function(){var n=e.apply(this,arguments);null==n?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,n)}}function ct(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function ht(t){return function(){this.style.removeProperty(t)}}function ft(t,e,n){return function(){this.style.setProperty(t,e,n)}}function dt(t,e,n){return function(){var r=e.apply(this,arguments);null==r?this.style.removeProperty(t):this.style.setProperty(t,r,n)}}function pt(t,e){return t.style.getPropertyValue(e)||ct(t).getComputedStyle(t,null).getPropertyValue(e)}function mt(t){return function(){delete this[t]}}function gt(t,e){return function(){this[t]=e}}function yt(t,e){return function(){var n=e.apply(this,arguments);null==n?delete this[t]:this[t]=n}}function vt(t){return t.trim().split(/^|\s+/)}function wt(t){return t.classList||new bt(t)}function bt(t){this._node=t,this._names=vt(t.getAttribute("class")||"")}function xt(t,e){for(var n=wt(t),r=-1,i=e.length;++r<i;)n.add(e[r])}function _t(t,e){for(var n=wt(t),r=-1,i=e.length;++r<i;)n.remove(e[r])}function Mt(t){return function(){xt(this,t)}}function Nt(t){return function(){_t(this,t)}}function At(t,e){return function(){(e.apply(this,arguments)?xt:_t)(this,t)}}function Et(){this.textContent=""}function Ct(t){return function(){this.textContent=t}}function kt(t){return function(){var e=t.apply(this,arguments);this.textContent=null==e?"":e}}function Ot(){this.innerHTML=""}function Lt(t){return function(){this.innerHTML=t}}function St(t){return function(){var e=t.apply(this,arguments);this.innerHTML=null==e?"":e}}function Tt(){this.nextSibling&&this.parentNode.appendChild(this)}function Rt(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function $t(){return null}function Ut(){var t=this.parentNode;t&&t.removeChild(this)}function zt(){var t=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function jt(){var t=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}bt.prototype={add:function(t){this._names.indexOf(t)<0&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},remove:function(t){var e=this._names.indexOf(t);e>=0&&(this._names.splice(e,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};var Pt={};"undefined"!=typeof document&&("onmouseenter"in document.documentElement||(Pt={mouseenter:"mouseover",mouseleave:"mouseout"}));function Ht(t,e,n){return t=Dt(t,e,n),function(e){var n=e.relatedTarget;n&&(n===this||8&n.compareDocumentPosition(this))||t.call(this,e)}}function Dt(t,e,n){return function(r){try{t.call(this,this.__data__,e,n)}finally{}}}function It(t){return t.trim().split(/^|\s+/).map((function(t){var e="",n=t.indexOf(".");return n>=0&&(e=t.slice(n+1),t=t.slice(0,n)),{type:t,name:e}}))}function Wt(t){return function(){var e=this.__on;if(e){for(var n,r=0,i=-1,a=e.length;r<a;++r)n=e[r],t.type&&n.type!==t.type||n.name!==t.name?e[++i]=n:this.removeEventListener(n.type,n.listener,n.capture);++i?e.length=i:delete this.__on}}}function Ft(t,e,n){var r=Pt.hasOwnProperty(t.type)?Ht:Dt;return function(i,a,o){var s,l=this.__on,u=r(e,a,o);if(l)for(var c=0,h=l.length;c<h;++c)if((s=l[c]).type===t.type&&s.name===t.name)return this.removeEventListener(s.type,s.listener,s.capture),this.addEventListener(s.type,s.listener=u,s.capture=n),void(s.value=e);this.addEventListener(t.type,u,n),s={type:t.type,name:t.name,value:e,listener:u,capture:n},l?l.push(s):this.__on=[s]}}function qt(t,e,n){var r=ct(t),i=r.CustomEvent;"function"==typeof i?i=new i(e,n):(i=r.document.createEvent("Event"),n?(i.initEvent(e,n.bubbles,n.cancelable),i.detail=n.detail):i.initEvent(e,!1,!1)),t.dispatchEvent(i)}function Bt(t,e){return function(){return qt(this,t,e)}}function Vt(t,e){return function(){return qt(this,t,e.apply(this,arguments))}}var Yt=[null];function Gt(t,e){this._groups=t,this._parents=e}function Zt(t,e){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(e).domain(t)}return this}function Kt(t,e,n){t.prototype=e.prototype=n,n.constructor=t}function Jt(t,e){var n=Object.create(t.prototype);for(var r in e)n[r]=e[r];return n}function Xt(){}Gt.prototype=function(){return new Gt([[document.documentElement]],Yt)}.prototype={constructor:Gt,select:function(t){"function"!=typeof t&&(t=J(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var a,o,s=e[i],l=s.length,u=r[i]=new Array(l),c=0;c<l;++c)(a=s[c])&&(o=t.call(a,a.__data__,c,s))&&("__data__"in a&&(o.__data__=a.__data__),u[c]=o);return new Gt(r,this._parents)},selectAll:function(t){"function"!=typeof t&&(t=function(t){return null==t?X:function(){return this.querySelectorAll(t)}}(t));for(var e=this._groups,n=e.length,r=[],i=[],a=0;a<n;++a)for(var o,s=e[a],l=s.length,u=0;u<l;++u)(o=s[u])&&(r.push(t.call(o,o.__data__,u,s)),i.push(o));return new Gt(r,i)},filter:function(t){"function"!=typeof t&&(t=function(t){return function(){return this.matches(t)}}(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var a,o=e[i],s=o.length,l=r[i]=[],u=0;u<s;++u)(a=o[u])&&t.call(a,a.__data__,u,o)&&l.push(a);return new Gt(r,this._parents)},data:function(t,e){if(!t)return d=new Array(this.size()),u=-1,this.each((function(t){d[++u]=t})),d;var n=e?nt:et,r=this._parents,i=this._groups;"function"!=typeof t&&(t=function(t){return function(){return t}}(t));for(var a=i.length,o=new Array(a),s=new Array(a),l=new Array(a),u=0;u<a;++u){var c=r[u],h=i[u],f=h.length,d=t.call(c,c&&c.__data__,u,r),p=d.length,m=s[u]=new Array(p),g=o[u]=new Array(p);n(c,h,m,g,l[u]=new Array(f),d,e);for(var y,v,w=0,b=0;w<p;++w)if(y=m[w]){for(w>=b&&(b=w+1);!(v=g[b])&&++b<p;);y._next=v||null}}return(o=new Gt(o,r))._enter=s,o._exit=l,o},enter:function(){return new Gt(this._enter||this._groups.map(Q),this._parents)},exit:function(){return new Gt(this._exit||this._groups.map(Q),this._parents)},join:function(t,e,n){var r=this.enter(),i=this,a=this.exit();return r="function"==typeof t?t(r):r.append(t+""),null!=e&&(i=e(i)),null==n?a.remove():n(a),r&&i?r.merge(i).order():i},merge:function(t){for(var e=this._groups,n=t._groups,r=e.length,i=n.length,a=Math.min(r,i),o=new Array(r),s=0;s<a;++s)for(var l,u=e[s],c=n[s],h=u.length,f=o[s]=new Array(h),d=0;d<h;++d)(l=u[d]||c[d])&&(f[d]=l);for(;s<r;++s)o[s]=e[s];return new Gt(o,this._parents)},order:function(){for(var t=this._groups,e=-1,n=t.length;++e<n;)for(var r,i=t[e],a=i.length-1,o=i[a];--a>=0;)(r=i[a])&&(o&&4^r.compareDocumentPosition(o)&&o.parentNode.insertBefore(r,o),o=r);return this},sort:function(t){function e(e,n){return e&&n?t(e.__data__,n.__data__):!e-!n}t||(t=rt);for(var n=this._groups,r=n.length,i=new Array(r),a=0;a<r;++a){for(var o,s=n[a],l=s.length,u=i[a]=new Array(l),c=0;c<l;++c)(o=s[c])&&(u[c]=o);u.sort(e)}return new Gt(i,this._parents).order()},call:function(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this},nodes:function(){var t=new Array(this.size()),e=-1;return this.each((function(){t[++e]=this})),t},node:function(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var r=t[e],i=0,a=r.length;i<a;++i){var o=r[i];if(o)return o}return null},size:function(){var t=0;return this.each((function(){++t})),t},empty:function(){return!this.node()},each:function(t){for(var e=this._groups,n=0,r=e.length;n<r;++n)for(var i,a=e[n],o=0,s=a.length;o<s;++o)(i=a[o])&&t.call(i,i.__data__,o,a);return this},attr:function(t,e){var n=V(t);if(arguments.length<2){var r=this.node();return n.local?r.getAttributeNS(n.space,n.local):r.getAttribute(n)}return this.each((null==e?n.local?at:it:"function"==typeof e?n.local?ut:lt:n.local?st:ot)(n,e))},style:function(t,e,n){return arguments.length>1?this.each((null==e?ht:"function"==typeof e?dt:ft)(t,e,null==n?"":n)):pt(this.node(),t)},property:function(t,e){return arguments.length>1?this.each((null==e?mt:"function"==typeof e?yt:gt)(t,e)):this.node()[t]},classed:function(t,e){var n=vt(t+"");if(arguments.length<2){for(var r=wt(this.node()),i=-1,a=n.length;++i<a;)if(!r.contains(n[i]))return!1;return!0}return this.each(("function"==typeof e?At:e?Mt:Nt)(n,e))},text:function(t){return arguments.length?this.each(null==t?Et:("function"==typeof t?kt:Ct)(t)):this.node().textContent},html:function(t){return arguments.length?this.each(null==t?Ot:("function"==typeof t?St:Lt)(t)):this.node().innerHTML},raise:function(){return this.each(Tt)},lower:function(){return this.each(Rt)},append:function(t){var e="function"==typeof t?t:Z(t);return this.select((function(){return this.appendChild(e.apply(this,arguments))}))},insert:function(t,e){var n="function"==typeof t?t:Z(t),r=null==e?$t:"function"==typeof e?e:J(e);return this.select((function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)}))},remove:function(){return this.each(Ut)},clone:function(t){return this.select(t?jt:zt)},datum:function(t){return arguments.length?this.property("__data__",t):this.node().__data__},on:function(t,e,n){var r,i,a=It(t+""),o=a.length;if(!(arguments.length<2)){for(s=e?Ft:Wt,null==n&&(n=!1),r=0;r<o;++r)this.each(s(a[r],e,n));return this}var s=this.node().__on;if(s)for(var l,u=0,c=s.length;u<c;++u)for(r=0,l=s[u];r<o;++r)if((i=a[r]).type===l.type&&i.name===l.name)return l.value},dispatch:function(t,e){return this.each(("function"==typeof e?Vt:Bt)(t,e))}};var Qt=1/.7,te="\\s*([+-]?\\d+)\\s*",ee="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",ne="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",re=/^#([0-9a-f]{3,8})$/,ie=new RegExp("^rgb\\("+[te,te,te]+"\\)$"),ae=new RegExp("^rgb\\("+[ne,ne,ne]+"\\)$"),oe=new RegExp("^rgba\\("+[te,te,te,ee]+"\\)$"),se=new RegExp("^rgba\\("+[ne,ne,ne,ee]+"\\)$"),le=new RegExp("^hsl\\("+[ee,ne,ne]+"\\)$"),ue=new RegExp("^hsla\\("+[ee,ne,ne,ee]+"\\)$"),ce={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};function he(){return this.rgb().formatHex()}function fe(){return this.rgb().formatRgb()}function de(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=re.exec(t))?(n=e[1].length,e=parseInt(e[1],16),6===n?pe(e):3===n?new ve(e>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===n?me(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===n?me(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|240&e,((15&e)<<4|15&e)/255):null):(e=ie.exec(t))?new ve(e[1],e[2],e[3],1):(e=ae.exec(t))?new ve(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=oe.exec(t))?me(e[1],e[2],e[3],e[4]):(e=se.exec(t))?me(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=le.exec(t))?_e(e[1],e[2]/100,e[3]/100,1):(e=ue.exec(t))?_e(e[1],e[2]/100,e[3]/100,e[4]):ce.hasOwnProperty(t)?pe(ce[t]):"transparent"===t?new ve(NaN,NaN,NaN,0):null}function pe(t){return new ve(t>>16&255,t>>8&255,255&t,1)}function me(t,e,n,r){return r<=0&&(t=e=n=NaN),new ve(t,e,n,r)}function ge(t){return t instanceof Xt||(t=de(t)),t?new ve((t=t.rgb()).r,t.g,t.b,t.opacity):new ve}function ye(t,e,n,r){return 1===arguments.length?ge(t):new ve(t,e,n,null==r?1:r)}function ve(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}function we(){return"#"+xe(this.r)+xe(this.g)+xe(this.b)}function be(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(1===t?")":", "+t+")")}function xe(t){return((t=Math.max(0,Math.min(255,Math.round(t)||0)))<16?"0":"")+t.toString(16)}function _e(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new Ne(t,e,n,r)}function Me(t){if(t instanceof Ne)return new Ne(t.h,t.s,t.l,t.opacity);if(t instanceof Xt||(t=de(t)),!t)return new Ne;if(t instanceof Ne)return t;var e=(t=t.rgb()).r/255,n=t.g/255,r=t.b/255,i=Math.min(e,n,r),a=Math.max(e,n,r),o=NaN,s=a-i,l=(a+i)/2;return s?(o=e===a?(n-r)/s+6*(n<r):n===a?(r-e)/s+2:(e-n)/s+4,s/=l<.5?a+i:2-a-i,o*=60):s=l>0&&l<1?0:o,new Ne(o,s,l,t.opacity)}function Ne(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}function Ae(t,e,n){return 255*(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)}function Ee(t){return function(){return t}}function Ce(t){return 1==(t=+t)?ke:function(e,n){return n-e?function(t,e,n){return t=Math.pow(t,n),e=Math.pow(e,n)-t,n=1/n,function(r){return Math.pow(t+r*e,n)}}(e,n,t):Ee(isNaN(e)?n:e)}}function ke(t,e){var n=e-t;return n?function(t,e){return function(n){return t+n*e}}(t,n):Ee(isNaN(t)?e:t)}Kt(Xt,de,{copy:function(t){return Object.assign(new this.constructor,this,t)},displayable:function(){return this.rgb().displayable()},hex:he,formatHex:he,formatHsl:function(){return Me(this).formatHsl()},formatRgb:fe,toString:fe}),Kt(ve,ye,Jt(Xt,{brighter:function(t){return t=null==t?Qt:Math.pow(Qt,t),new ve(this.r*t,this.g*t,this.b*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new ve(this.r*t,this.g*t,this.b*t,this.opacity)},rgb:function(){return this},displayable:function(){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:we,formatHex:we,formatRgb:be,toString:be})),Kt(Ne,(function(t,e,n,r){return 1===arguments.length?Me(t):new Ne(t,e,n,null==r?1:r)}),Jt(Xt,{brighter:function(t){return t=null==t?Qt:Math.pow(Qt,t),new Ne(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new Ne(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=this.h%360+360*(this.h<0),e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*e,i=2*n-r;return new ve(Ae(t>=240?t-240:t+120,i,r),Ae(t,i,r),Ae(t<120?t+240:t-120,i,r),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl:function(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"hsl(":"hsla(")+(this.h||0)+", "+100*(this.s||0)+"%, "+100*(this.l||0)+"%"+(1===t?")":", "+t+")")}}));var Oe=function t(e){var n=Ce(e);function r(t,e){var r=n((t=ye(t)).r,(e=ye(e)).r),i=n(t.g,e.g),a=n(t.b,e.b),o=ke(t.opacity,e.opacity);return function(e){return t.r=r(e),t.g=i(e),t.b=a(e),t.opacity=o(e),t+""}}return r.gamma=t,r}(1);function Le(t,e){e||(e=[]);var n,r=t?Math.min(e.length,t.length):0,i=e.slice();return function(a){for(n=0;n<r;++n)i[n]=t[n]*(1-a)+e[n]*a;return i}}function Se(t,e){var n,r=e?e.length:0,i=t?Math.min(r,t.length):0,a=new Array(i),o=new Array(r);for(n=0;n<i;++n)a[n]=Pe(t[n],e[n]);for(;n<r;++n)o[n]=e[n];return function(t){for(n=0;n<i;++n)o[n]=a[n](t);return o}}function Te(t,e){var n=new Date;return t=+t,e=+e,function(r){return n.setTime(t*(1-r)+e*r),n}}function Re(t,e){return t=+t,e=+e,function(n){return t*(1-n)+e*n}}function $e(t,e){var n,r={},i={};for(n in null!==t&&"object"==typeof t||(t={}),null!==e&&"object"==typeof e||(e={}),e)n in t?r[n]=Pe(t[n],e[n]):i[n]=e[n];return function(t){for(n in r)i[n]=r[n](t);return i}}var Ue=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,ze=new RegExp(Ue.source,"g");function je(t,e){var n,r,i,a=Ue.lastIndex=ze.lastIndex=0,o=-1,s=[],l=[];for(t+="",e+="";(n=Ue.exec(t))&&(r=ze.exec(e));)(i=r.index)>a&&(i=e.slice(a,i),s[o]?s[o]+=i:s[++o]=i),(n=n[0])===(r=r[0])?s[o]?s[o]+=r:s[++o]=r:(s[++o]=null,l.push({i:o,x:Re(n,r)})),a=ze.lastIndex;return a<e.length&&(i=e.slice(a),s[o]?s[o]+=i:s[++o]=i),s.length<2?l[0]?function(t){return function(e){return t(e)+""}}(l[0].x):function(t){return function(){return t}}(e):(e=l.length,function(t){for(var n,r=0;r<e;++r)s[(n=l[r]).i]=n.x(t);return s.join("")})}function Pe(t,e){var n,r=typeof e;return null==e||"boolean"===r?Ee(e):("number"===r?Re:"string"===r?(n=de(e))?(e=n,Oe):je:e instanceof de?Oe:e instanceof Date?Te:function(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}(e)?Le:Array.isArray(e)?Se:"function"!=typeof e.valueOf&&"function"!=typeof e.toString||isNaN(e)?$e:Re)(t,e)}function He(t,e){return t=+t,e=+e,function(n){return Math.round(t*(1-n)+e*n)}}function De(t){return+t}var Ie=[0,1];function We(t){return t}function Fe(t,e){return(e-=t=+t)?function(n){return(n-t)/e}:function(t){return function(){return t}}(isNaN(e)?NaN:.5)}function qe(t,e,n){var r=t[0],i=t[1],a=e[0],o=e[1];return i<r?(r=Fe(i,r),a=n(o,a)):(r=Fe(r,i),a=n(a,o)),function(t){return a(r(t))}}function Be(t,e,n){var r=Math.min(t.length,e.length)-1,i=new Array(r),a=new Array(r),o=-1;for(t[r]<t[0]&&(t=t.slice().reverse(),e=e.slice().reverse());++o<r;)i[o]=Fe(t[o],t[o+1]),a[o]=n(e[o],e[o+1]);return function(e){var n=S(t,e,1,r)-1;return a[n](i[n](e))}}function Ve(t,e){return e.domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp()).unknown(t.unknown())}function Ye(){var t,e,n,r,i,a,o=Ie,s=Ie,l=Pe,u=We;function c(){var t=Math.min(o.length,s.length);return u!==We&&(u=function(t,e){var n;return t>e&&(n=t,t=e,e=n),function(n){return Math.max(t,Math.min(e,n))}}(o[0],o[t-1])),r=t>2?Be:qe,i=a=null,h}function h(e){return isNaN(e=+e)?n:(i||(i=r(o.map(t),s,l)))(t(u(e)))}return h.invert=function(n){return u(e((a||(a=r(s,o.map(t),Re)))(n)))},h.domain=function(t){return arguments.length?(o=Array.from(t,De),c()):o.slice()},h.range=function(t){return arguments.length?(s=Array.from(t),c()):s.slice()},h.rangeRound=function(t){return s=Array.from(t),l=He,c()},h.clamp=function(t){return arguments.length?(u=!!t||We,c()):u!==We},h.interpolate=function(t){return arguments.length?(l=t,c()):l},h.unknown=function(t){return arguments.length?(n=t,h):n},function(n,r){return t=n,e=r,c()}}function Ge(){return Ye()(We,We)}function Ze(t,e){if((n=(t=e?t.toExponential(e-1):t.toExponential()).indexOf("e"))<0)return null;var n,r=t.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+t.slice(n+1)]}function Ke(t){return(t=Ze(Math.abs(t)))?t[1]:NaN}var Je,Xe=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Qe(t){if(!(e=Xe.exec(t)))throw new Error("invalid format: "+t);var e;return new tn({fill:e[1],align:e[2],sign:e[3],symbol:e[4],zero:e[5],width:e[6],comma:e[7],precision:e[8]&&e[8].slice(1),trim:e[9],type:e[10]})}function tn(t){this.fill=void 0===t.fill?" ":t.fill+"",this.align=void 0===t.align?">":t.align+"",this.sign=void 0===t.sign?"-":t.sign+"",this.symbol=void 0===t.symbol?"":t.symbol+"",this.zero=!!t.zero,this.width=void 0===t.width?void 0:+t.width,this.comma=!!t.comma,this.precision=void 0===t.precision?void 0:+t.precision,this.trim=!!t.trim,this.type=void 0===t.type?"":t.type+""}function en(t,e){var n=Ze(t,e);if(!n)return t+"";var r=n[0],i=n[1];return i<0?"0."+new Array(-i).join("0")+r:r.length>i+1?r.slice(0,i+1)+"."+r.slice(i+1):r+new Array(i-r.length+2).join("0")}Qe.prototype=tn.prototype,tn.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};var nn={"%":function(t,e){return(100*t).toFixed(e)},b:function(t){return Math.round(t).toString(2)},c:function(t){return t+""},d:function(t){return Math.round(t).toString(10)},e:function(t,e){return t.toExponential(e)},f:function(t,e){return t.toFixed(e)},g:function(t,e){return t.toPrecision(e)},o:function(t){return Math.round(t).toString(8)},p:function(t,e){return en(100*t,e)},r:en,s:function(t,e){var n=Ze(t,e);if(!n)return t+"";var r=n[0],i=n[1],a=i-(Je=3*Math.max(-8,Math.min(8,Math.floor(i/3))))+1,o=r.length;return a===o?r:a>o?r+new Array(a-o+1).join("0"):a>0?r.slice(0,a)+"."+r.slice(a):"0."+new Array(1-a).join("0")+Ze(t,Math.max(0,e+a-1))[0]},X:function(t){return Math.round(t).toString(16).toUpperCase()},x:function(t){return Math.round(t).toString(16)}};function rn(t){return t}var an,on,sn,ln=Array.prototype.map,un=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function cn(t){var e,n,r=void 0===t.grouping||void 0===t.thousands?rn:(e=ln.call(t.grouping,Number),n=t.thousands+"",function(t,r){for(var i=t.length,a=[],o=0,s=e[0],l=0;i>0&&s>0&&(l+s+1>r&&(s=Math.max(1,r-l)),a.push(t.substring(i-=s,i+s)),!((l+=s+1)>r));)s=e[o=(o+1)%e.length];return a.reverse().join(n)}),i=void 0===t.currency?"":t.currency[0]+"",a=void 0===t.currency?"":t.currency[1]+"",o=void 0===t.decimal?".":t.decimal+"",s=void 0===t.numerals?rn:function(t){return function(e){return e.replace(/[0-9]/g,(function(e){return t[+e]}))}}(ln.call(t.numerals,String)),l=void 0===t.percent?"%":t.percent+"",u=void 0===t.minus?"-":t.minus+"",c=void 0===t.nan?"NaN":t.nan+"";function h(t){var e=(t=Qe(t)).fill,n=t.align,h=t.sign,f=t.symbol,d=t.zero,p=t.width,m=t.comma,g=t.precision,y=t.trim,v=t.type;"n"===v?(m=!0,v="g"):nn[v]||(void 0===g&&(g=12),y=!0,v="g"),(d||"0"===e&&"="===n)&&(d=!0,e="0",n="=");var w="$"===f?i:"#"===f&&/[boxX]/.test(v)?"0"+v.toLowerCase():"",b="$"===f?a:/[%p]/.test(v)?l:"",x=nn[v],_=/[defgprs%]/.test(v);function M(t){var i,a,l,f=w,M=b;if("c"===v)M=x(t)+M,t="";else{